eehitus-my-task-list-ui 1.1.0 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +74 -1
- package/dist/index.cjs.js.LICENSE.txt +65 -0
- package/dist/index.esm.js +74 -1
- package/dist/index.esm.js.LICENSE.txt +65 -0
- package/dist/index.umd.js +74 -1
- package/dist/index.umd.js.LICENSE.txt +65 -0
- package/dist/l10n/eehitus-my-task-list-ui-combined_translations_et.json +1 -1
- package/dist/types/components/DemoPlannings.d.ts +3 -0
- package/dist/types/components/common/components/accordionSelect/AccordionSelect.d.ts +15 -0
- package/dist/types/components/common/components/icons/EhrIcon.d.ts +3 -0
- package/dist/types/components/common/components/modalWrapper/ModalWrapper.d.ts +27 -0
- package/dist/types/components/common/components/pageTitle/PageTitle.d.ts +6 -0
- package/dist/types/components/common/components/tediTable/TediTable.d.ts +4 -0
- package/dist/types/components/common/constants/Constants.d.ts +29 -6
- package/dist/types/components/common/stateServices/DocumentStateService.d.ts +5 -3
- package/dist/types/components/page/myPlannings/AddNewPlanningButton.d.ts +7 -0
- package/dist/types/components/page/myPlannings/MyPlannings.d.ts +9 -0
- package/dist/types/components/page/myPlannings/components/PlanningsCompletedSection.d.ts +3 -0
- package/dist/types/components/page/myPlannings/components/PlanningsInstitutionSection.d.ts +3 -0
- package/dist/types/components/page/myPlannings/components/PlanningsOngoingSection.d.ts +3 -0
- package/dist/types/components/page/myPlannings/components/PlanningsProceedingsSection.d.ts +3 -0
- package/dist/types/indexExport.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,75 @@
|
|
|
1
1
|
/*! For license information please see index.cjs.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var e={20:(e,t,n)=>{var s=n(953),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(e,t,n){var s,i={},d=null,c=null;for(s in void 0!==n&&(d=""+n),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(c=t.ref),t)r.call(t,s)&&!l.hasOwnProperty(s)&&(i[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===i[s]&&(i[s]=t[s]);return{$$typeof:o,type:e,key:d,ref:c,props:i,_owner:a.current}}t.Fragment=i,t.jsx=d,t.jsxs=d},848:(e,t,n)=>{e.exports=n(20)},953:e=>{e.exports=require("react")}},t={};function n(s){var o=t[s];if(void 0!==o)return o.exports;var i=t[s]={exports:{}};return e[s](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};n.r(s),n.d(s,{DetailSearch:()=>Do,MyAdministrativeProceedings:()=>gn,MyApprovals:()=>Ws,MyDocuments:()=>Is,MyInvolvements:()=>zs,MyOpinions:()=>qs,MyProceedings:()=>Js,documentsReducer:()=>I,filterReducer:()=>u,myOperationsReducer:()=>N,proceedingsReducer:()=>y,rootReducer:()=>Y});const o=require("@reduxjs/toolkit");const i=(0,o.createSlice)({name:"filter",initialState:{classifiers:{},documentTypes:[],institutionUsers:[],institutions:[],usageClassifierTypes:[]},reducers:{classifiersLoaded:(e,t)=>{e.classifiers=t.payload},documentTypesLoaded:(e,t)=>{e.documentTypes=t.payload},institutionUsersLoaded:(e,t)=>{e.institutionUsers=t.payload},institutionsLoaded:(e,t)=>{e.institutions=t.payload},usageClassifierTypesLoaded:(e,t)=>{e.usageClassifierTypes=t.payload}}}),{classifiersLoaded:r,documentTypesLoaded:a,institutionUsersLoaded:l,institutionsLoaded:d,usageClassifierTypesLoaded:c}=i.actions,u=i.reducer;const p=(0,o.createSlice)({name:"documents",initialState:{workingDocuments:[],signingDocuments:[],finishedDocuments:[],allowedDocumentTypesToStart:[]},reducers:{workingDocumentsLoaded:(e,t)=>{e.workingDocuments=t.payload},signingDocumentsLoaded:(e,t)=>{e.signingDocuments=t.payload},finishedDocumentsLoaded:(e,t)=>{e.finishedDocuments=t.payload},deleteDocument(e,t){e.workingDocuments=e.workingDocuments.filter((e=>e.docNr!==t.payload))},allowedDocumentTypesLoaded:(e,t)=>{e.allowedDocumentTypesToStart=t.payload}}}),{workingDocumentsLoaded:h,signingDocumentsLoaded:m,finishedDocumentsLoaded:g,deleteDocument:S,allowedDocumentTypesLoaded:f}=p.actions,I=p.reducer;const T=(0,o.createSlice)({name:"proceedings",initialState:{myProceedings:[],proceedingsToComment:[],incomingDocuments:[]},reducers:{myProceedingsLoaded:(e,t)=>{e.myProceedings=t.payload},proceedingsToCommentLoaded:(e,t)=>{e.proceedingsToComment=t.payload},incomingDocumentsLoaded:(e,t)=>{e.incomingDocuments=t.payload}}}),{myProceedingsLoaded:E,proceedingsToCommentLoaded:_,incomingDocumentsLoaded:v}=T.actions,y=T.reducer;const b=(0,o.createSlice)({name:"myOperations",initialState:{myOperations:[],toCommentOperations:[],operationInvitations:[]},reducers:{myOperationsLoaded:(e,t)=>{e.myOperations=t.payload},toCommentOperationsLoaded:(e,t)=>{e.toCommentOperations=t.payload},operationInvitationsLoaded:(e,t)=>{e.operationInvitations=t.payload}}}),{myOperationsLoaded:D,toCommentOperationsLoaded:x,operationInvitationsLoaded:M}=b.actions,N=b.reducer;const O=(0,o.createSlice)({name:"detailSearch",initialState:{buildings:[],documents:[],proceedings:[]},reducers:{buildingsLoaded:(e,t)=>{e.buildings=t.payload},documentsLoaded:(e,t)=>{e.documents=t.payload},proceedingsLoaded:(e,t)=>{e.proceedings=t.payload}}}),{buildingsLoaded:A,documentsLoaded:U,proceedingsLoaded:w}=O.actions,j=O.reducer,C={notices:[]},L=(0,o.createSlice)({name:"notification",initialState:C,reducers:{setNotifications:(e,t)=>{e.notices=t.payload},removeNotification:(e,t)=>{const n=e.notices.filter((e=>e.id!==t.payload));e.notices=n},cleanState:e=>C}}),P=(0,o.createSelector)((e=>e.myViewsPage.notifications.notices),(e=>e)),{cleanState:R,setNotifications:K,removeNotification:F}=L.actions,k=L.reducer,Y=(0,o.combineReducers)({filter:u,myDocuments:I,myProceedings:y,myOperations:N,detailSearch:j,notifications:k});var G=n(953),V=n.n(G);const B=require("react-intl"),H=require("ehr-components"),J="SIGNING_DOCUMENTS",W="WORKING_DOCUMENTS",q="FINISHED_DOCUMENTS",$="INCOMING_DOCUMENTS",z="MY_APPROVALS",X="MY_OPINIONS",Q="MY_INVOLVEMENTS",Z="MY_OPERATIONS",ee="OPERATIONS_TO_COMMENT",te="OPERATION_INVITATIONS",ne="PROCEEDINGS_TO_COMMENT",se="BUILDINGS_SEARCH";let oe=function(e){return e.DEFAULT="default",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e}({});const ie="BUILDING",re="PROCEEDING",ae="DOCUMENT";let le=function(e){return e.KOV="KOV",e.MKM="MKM",e.A="A",e.N="N",e.KT="KT",e.JUR="JUR",e.AMAS="AMAS",e.TJA="TJA",e}({});let de=function(e){return e.MENTOIMLIIK_AUTO_REG="MENTOIMLIIK_AUTO_REG",e.MENTOIMLIIK_KAASAMINE="MENTOIMLIIK_KAASAMINE",e.MENTOIMLIIK_MASSKAASAMINE="MENTOIMLIIK_MASSKAASAMINE",e.MENTOIMLIIK_YKSIKKAASAMINE="MENTOIMLIIK_YKSIKKAASAMINE",e.MENTOIMLIIK_ARVAMUS="MENTOIMLIIK_ARVAMUS",e.MENTOIMLIIK_VALINE_KOOSK="MENTOIMLIIK_VALINE_KOOSK",e.MENTOIMLIIK_SISENE_KOOSK="MENTOIMLIIK_SISENE_KOOSK",e.MENTOIMLIIK_KOOSK="MENTOIMLIIK_KOOSK",e.MENTOIMLIIK_MARKUS_TAIEND="MENTOIMLIIK_MARKUS_TAIEND",e.MENTOIMLIIK_MEN_MARKUS="MENTOIMLIIK_MEN_MARKUS",e.MENTOIMLIIK_EHIT_KK_RING="MENTOIMLIIK_EHIT_KK_RING",e.MENTOIMLIIK_ADS="MENTOIMLIIK_ADS",e.MENTOIMLIIK_ADS_SAADA="MENTOIMLIIK_ADS_SAADA",e.MENTOIMLIIK_ADS_ESIT="MENTOIMLIIK_ADS_ESIT",e.MENTOIMLIIK_AVALIK="MENTOIMLIIK_AVALIK",e.MENTOIMLIIK_AVALIK_TAGASISIDE="MENTOIMLIIK_AVALIK_TAGASISIDE",e.MENTOIMLIIK_RAHV_KAASAMINE="MENTOIMLIIK_RAHV_KAASAMINE",e.MENTOIMLIIK_KAAS_TAGASISIDE="MENTOIMLIIK_KAAS_TAGASISIDE",e.MENTOIMLIIK_ALLKIRJASTAMINE="MENTOIMLIIK_ALLKIRJASTAMINE",e.MENTOIMLIIK_KMH_PR="MENTOIMLIIK_KMH_PR",e.MENTOIMLIIK_KMH_AR="MENTOIMLIIK_KMH_AR",e}({});const ce="12975",ue="12976",pe="11274",he="11275",me="12977",ge="12978",Se=["11272","12972",ce,"12974",ge,he],fe=["11273","12973",ue,"12971",me,pe],Ie=[ce,ue],Te={[ue]:me,[ce]:ge},Ee={[ue]:pe,[ce]:he},_e=require("axios");var ve=n.n(_e);const ye="https://devkluster.ehr.ee".replace(/\/+$/,"");class be{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class De extends Error{constructor(e,t){super(t),this.name="RequiredError",this.field=e}}const xe="https://example.com",Me=function(e,t,n){if(null==n)throw new De(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},Ne=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];for(const e of s)for(const n in e)if(Array.isArray(e[n])){t.delete(n);for(const s of e[n])t.append(n,s)}else t.set(n,e[n]);e.search=t.toString()},Oe=function(e){return e.pathname+e.search+e.hash},Ae=function(e,t,n,s){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const r={...e.options,url:((null==s?void 0:s.basePath)||i)+e.url};return o.request(r)}},Ue=function(e){const t=function(e){return{getAllDocumentTypes:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/alldocumenttypes",xe);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Ne(n,{},t.query);let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Oe(n),options:o}},getBusinessTypesList:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/businesstypelist",xe);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Ne(n,{},t.query);let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Oe(n),options:o}},getClassifierByType:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Me("getClassifierByType","classifierType",t);const s="/classifier/{classifierType}".replace("{classifierType}",encodeURIComponent(String(t))),o=new URL(s,xe);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};Ne(o,{},n.query);let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Oe(o),options:r}},getClassifiersByRelatedType:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Me("getClassifiersByRelatedType","relatedClassifierType",t);const s="/classifier/related-type/{relatedClassifierType}".replace("{relatedClassifierType}",encodeURIComponent(String(t))),o=new URL(s,xe);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};Ne(o,{},n.query);let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Oe(o),options:r}},getClassifiersByType:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Me("getClassifiersByType","classifierTypesCommaSeparated",t);const s="/classifiers/{classifierTypesCommaSeparated}".replace("{classifierTypesCommaSeparated}",encodeURIComponent(String(t))),o=new URL(s,xe);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};Ne(o,{},n.query);let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Oe(o),options:r}},getDocumentTypes:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/documenttypes",xe);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Ne(n,{},t.query);let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Oe(n),options:o}},getFileTypes:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/filetypes",xe);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Ne(n,{},t.query);let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Oe(n),options:o}},getHealth:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/health",xe);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Ne(n,{},t.query);let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Oe(n),options:o}},getUsageClassifierTypes:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/classifier/usage",xe);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Ne(n,{},t.query);let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Oe(n),options:o}},getUserRolesList:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/userroleslist",xe);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Ne(n,{},t.query);let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Oe(n),options:o}}}}(e);return{async getAllDocumentTypes(n){const s=await t.getAllDocumentTypes(n);return Ae(s,ve(),ye,e)},async getBusinessTypesList(n){const s=await t.getBusinessTypesList(n);return Ae(s,ve(),ye,e)},async getClassifierByType(n,s){const o=await t.getClassifierByType(n,s);return Ae(o,ve(),ye,e)},async getClassifiersByRelatedType(n,s){const o=await t.getClassifiersByRelatedType(n,s);return Ae(o,ve(),ye,e)},async getClassifiersByType(n,s){const o=await t.getClassifiersByType(n,s);return Ae(o,ve(),ye,e)},async getDocumentTypes(n){const s=await t.getDocumentTypes(n);return Ae(s,ve(),ye,e)},async getFileTypes(n){const s=await t.getFileTypes(n);return Ae(s,ve(),ye,e)},async getHealth(n){const s=await t.getHealth(n);return Ae(s,ve(),ye,e)},async getUsageClassifierTypes(n){const s=await t.getUsageClassifierTypes(n);return Ae(s,ve(),ye,e)},async getUserRolesList(n){const s=await t.getUserRolesList(n);return Ae(s,ve(),ye,e)}}};class we extends be{getAllDocumentTypes(e){return Ue(this.configuration).getAllDocumentTypes(e).then((e=>e(this.axios,this.basePath)))}getBusinessTypesList(e){return Ue(this.configuration).getBusinessTypesList(e).then((e=>e(this.axios,this.basePath)))}getClassifierByType(e,t){return Ue(this.configuration).getClassifierByType(e,t).then((e=>e(this.axios,this.basePath)))}getClassifiersByRelatedType(e,t){return Ue(this.configuration).getClassifiersByRelatedType(e,t).then((e=>e(this.axios,this.basePath)))}getClassifiersByType(e,t){return Ue(this.configuration).getClassifiersByType(e,t).then((e=>e(this.axios,this.basePath)))}getDocumentTypes(e){return Ue(this.configuration).getDocumentTypes(e).then((e=>e(this.axios,this.basePath)))}getFileTypes(e){return Ue(this.configuration).getFileTypes(e).then((e=>e(this.axios,this.basePath)))}getHealth(e){return Ue(this.configuration).getHealth(e).then((e=>e(this.axios,this.basePath)))}getUsageClassifierTypes(e){return Ue(this.configuration).getUsageClassifierTypes(e).then((e=>e(this.axios,this.basePath)))}getUserRolesList(e){return Ue(this.configuration).getUserRolesList(e).then((e=>e(this.axios,this.basePath)))}}class je{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const Ce="http://localhost:8080".replace(/\/+$/,"");class Le{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ce,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class Pe extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const Re="https://example.com",Ke=function(e,t,n){if(null==n)throw new Pe(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function Fe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach((t=>Fe(e,t,n))):Object.keys(t).forEach((s=>Fe(e,t[s],`${n}${""!==n?".":""}${s}`))):e.has(n)?e.append(n,t):e.set(n,t))}const ke=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];Fe(t,s),e.search=t.toString()},Ye=function(e,t,n){const s="string"!=typeof e;return(s&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(void 0!==e?e:{}):e||""},Ge=function(e){return e.pathname+e.search+e.hash},Ve=function(e,t,n,s){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const r={...e.options,url:((null==s?void 0:s.basePath)||i)+e.url};return o.request(r)}};const Be=function(e){const t=function(e){return{getJurKovPersons:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/jur/kov",Re);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};ke(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Ge(n),options:o}},getJurPersonCoordRelJurs:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getJurPersonCoordRelJurs","personId",t);const s="/person/jur/{personId}/coord".replace("{personId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getUserPossibleProceedingSupervisorsByEHAKCode:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getUserPossibleProceedingSupervisorsByEHAKCode","eHAKCode",t);const s="/user/possiblesupervisors/{EHAKCode}".replace("{EHAKCode}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getUserPossibleProceedingSupervisorsByIdAndEHAKCode:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ke("getUserPossibleProceedingSupervisorsByIdAndEHAKCode","id",t),Ke("getUserPossibleProceedingSupervisorsByIdAndEHAKCode","eHAKCode",n);const o="/user/possiblesupervisors/{id}/{EHAKCode}".replace("{id}",encodeURIComponent(String(t))).replace("{EHAKCode}",encodeURIComponent(String(n))),i=new URL(o,Re);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s};ke(i,{});let l=r&&r.headers?r.headers:{};return a.headers={...l,...s.headers},{url:Ge(i),options:a}},getUserPossibleProceedingSupervisorsByJurId:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getUserPossibleProceedingSupervisorsByJurId","personId",t);const s="/user/jur/possiblesupervisors/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}}}}(e);return{async getJurKovPersons(n){const s=await t.getJurKovPersons(n);return Ve(s,ve(),Ce,e)},async getJurPersonCoordRelJurs(n,s){const o=await t.getJurPersonCoordRelJurs(n,s);return Ve(o,ve(),Ce,e)},async getUserPossibleProceedingSupervisorsByEHAKCode(n,s){const o=await t.getUserPossibleProceedingSupervisorsByEHAKCode(n,s);return Ve(o,ve(),Ce,e)},async getUserPossibleProceedingSupervisorsByIdAndEHAKCode(n,s,o){const i=await t.getUserPossibleProceedingSupervisorsByIdAndEHAKCode(n,s,o);return Ve(i,ve(),Ce,e)},async getUserPossibleProceedingSupervisorsByJurId(n,s){const o=await t.getUserPossibleProceedingSupervisorsByJurId(n,s);return Ve(o,ve(),Ce,e)}}};class He extends Le{getJurKovPersons(e){return Be(this.configuration).getJurKovPersons(e).then((e=>e(this.axios,this.basePath)))}getJurPersonCoordRelJurs(e,t){return Be(this.configuration).getJurPersonCoordRelJurs(e,t).then((e=>e(this.axios,this.basePath)))}getUserPossibleProceedingSupervisorsByEHAKCode(e,t){return Be(this.configuration).getUserPossibleProceedingSupervisorsByEHAKCode(e,t).then((e=>e(this.axios,this.basePath)))}getUserPossibleProceedingSupervisorsByIdAndEHAKCode(e,t,n){return Be(this.configuration).getUserPossibleProceedingSupervisorsByIdAndEHAKCode(e,t,n).then((e=>e(this.axios,this.basePath)))}getUserPossibleProceedingSupervisorsByJurId(e,t){return Be(this.configuration).getUserPossibleProceedingSupervisorsByJurId(e,t).then((e=>e(this.axios,this.basePath)))}}const Je=function(e){const t=function(e){return{addAllyksusToJurPerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URL("/person/jur/addAllyksus",Re);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};ke(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Ye(t,i,e),{url:Ge(s),options:i}},addPerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URL("/person",Re);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};ke(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Ye(t,i,e),{url:Ge(s),options:i}},deletePerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("deletePerson","personId",t);const s="/person/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"DELETE",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},findKovsAndJurPersonsInTheSameAdministrativeDivision:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Ke("findKovsAndJurPersonsInTheSameAdministrativeDivision","regNameOrCode",t);const i="/person/kovs-and-institutions/{regNameOrCode}".replace("{regNameOrCode}",encodeURIComponent(String(t))),r=new URL(i,Re);let a;e&&(a=e.baseOptions);const l={method:"PUT",...a,...o},d={},c={};void 0!==n&&(c.searchFromAll=n),d["Content-Type"]="application/json",ke(r,c);let u=a&&a.headers?a.headers:{};return l.headers={...d,...u,...o.headers},l.data=Ye(s,l,e),{url:Ge(r),options:l}},findPublicSectorInstitutions:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ke("findPublicSectorInstitutions","regNameOrCode",t);const o="/person/public-sector-institutions/{regNameOrCode}".replace("{regNameOrCode}",encodeURIComponent(String(t))),i=new URL(o,Re);let r;e&&(r=e.baseOptions);const a={method:"PUT",...r,...s},l={"Content-Type":"application/json"};ke(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},a.data=Ye(n,a,e),{url:Ge(i),options:a}},findRolesByDbName:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/personroles",Re);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};ke(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Ge(n),options:o}},getAllActiveInstitutions:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/jur",Re);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};ke(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Ge(n),options:o}},getAllClassifierBusinessTypeDtos:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/jur/businessTypes",Re);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};ke(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Ge(n),options:o}},getJurPerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getJurPerson","personId",t);const s="/person/jur/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getJurPersonAncestors:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getJurPersonAncestors","jurPersonId",t);const s="/person/jur/ancestor/{jurPersonId}".replace("{jurPersonId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getJurPersonSuccessors:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getJurPersonSuccessors","jurPersonId",t);const s="/person/jur/successor/{jurPersonId}".replace("{jurPersonId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getJurPersonsByEhakCode:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getJurPersonsByEhakCode","ehakCode",t);const s="/person/jur/byEhakCode/{ehakCode}".replace("{ehakCode}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getPerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getPerson","personId",t);const s="/person/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getPersonDetails:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/details",Re);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};ke(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Ge(n),options:o}},refreshUpdateArPersonFromAR:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("refreshUpdateArPersonFromAR","regCode",t);const s="/person/jur/refresh/{regCode}".replace("{regCode}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},removeYlemyksusReference:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("removeYlemyksusReference","allyksusId",t);const s="/person/jur/removeYlemyksusReference/{allyksusId}".replace("{allyksusId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"PUT",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},updatePerson:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ke("updatePerson","personId",t);const o="/person/{personId}".replace("{personId}",encodeURIComponent(String(t))),i=new URL(o,Re);let r;e&&(r=e.baseOptions);const a={method:"PUT",...r,...s},l={"Content-Type":"application/json"};ke(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},a.data=Ye(n,a,e),{url:Ge(i),options:a}}}}(e);return{async addAllyksusToJurPerson(n,s){const o=await t.addAllyksusToJurPerson(n,s);return Ve(o,ve(),Ce,e)},async addPerson(n,s){const o=await t.addPerson(n,s);return Ve(o,ve(),Ce,e)},async deletePerson(n,s){const o=await t.deletePerson(n,s);return Ve(o,ve(),Ce,e)},async findKovsAndJurPersonsInTheSameAdministrativeDivision(n,s,o,i){const r=await t.findKovsAndJurPersonsInTheSameAdministrativeDivision(n,s,o,i);return Ve(r,ve(),Ce,e)},async findPublicSectorInstitutions(n,s,o){const i=await t.findPublicSectorInstitutions(n,s,o);return Ve(i,ve(),Ce,e)},async findRolesByDbName(n){const s=await t.findRolesByDbName(n);return Ve(s,ve(),Ce,e)},async getAllActiveInstitutions(n){const s=await t.getAllActiveInstitutions(n);return Ve(s,ve(),Ce,e)},async getAllClassifierBusinessTypeDtos(n){const s=await t.getAllClassifierBusinessTypeDtos(n);return Ve(s,ve(),Ce,e)},async getJurPerson(n,s){const o=await t.getJurPerson(n,s);return Ve(o,ve(),Ce,e)},async getJurPersonAncestors(n,s){const o=await t.getJurPersonAncestors(n,s);return Ve(o,ve(),Ce,e)},async getJurPersonSuccessors(n,s){const o=await t.getJurPersonSuccessors(n,s);return Ve(o,ve(),Ce,e)},async getJurPersonsByEhakCode(n,s){const o=await t.getJurPersonsByEhakCode(n,s);return Ve(o,ve(),Ce,e)},async getPerson(n,s){const o=await t.getPerson(n,s);return Ve(o,ve(),Ce,e)},async getPersonDetails(n){const s=await t.getPersonDetails(n);return Ve(s,ve(),Ce,e)},async refreshUpdateArPersonFromAR(n,s){const o=await t.refreshUpdateArPersonFromAR(n,s);return Ve(o,ve(),Ce,e)},async removeYlemyksusReference(n,s){const o=await t.removeYlemyksusReference(n,s);return Ve(o,ve(),Ce,e)},async updatePerson(n,s,o){const i=await t.updatePerson(n,s,o);return Ve(i,ve(),Ce,e)}}};class We extends Le{addAllyksusToJurPerson(e,t){return Je(this.configuration).addAllyksusToJurPerson(e,t).then((e=>e(this.axios,this.basePath)))}addPerson(e,t){return Je(this.configuration).addPerson(e,t).then((e=>e(this.axios,this.basePath)))}deletePerson(e,t){return Je(this.configuration).deletePerson(e,t).then((e=>e(this.axios,this.basePath)))}findKovsAndJurPersonsInTheSameAdministrativeDivision(e,t,n,s){return Je(this.configuration).findKovsAndJurPersonsInTheSameAdministrativeDivision(e,t,n,s).then((e=>e(this.axios,this.basePath)))}findPublicSectorInstitutions(e,t,n){return Je(this.configuration).findPublicSectorInstitutions(e,t,n).then((e=>e(this.axios,this.basePath)))}findRolesByDbName(e){return Je(this.configuration).findRolesByDbName(e).then((e=>e(this.axios,this.basePath)))}getAllActiveInstitutions(e){return Je(this.configuration).getAllActiveInstitutions(e).then((e=>e(this.axios,this.basePath)))}getAllClassifierBusinessTypeDtos(e){return Je(this.configuration).getAllClassifierBusinessTypeDtos(e).then((e=>e(this.axios,this.basePath)))}getJurPerson(e,t){return Je(this.configuration).getJurPerson(e,t).then((e=>e(this.axios,this.basePath)))}getJurPersonAncestors(e,t){return Je(this.configuration).getJurPersonAncestors(e,t).then((e=>e(this.axios,this.basePath)))}getJurPersonSuccessors(e,t){return Je(this.configuration).getJurPersonSuccessors(e,t).then((e=>e(this.axios,this.basePath)))}getJurPersonsByEhakCode(e,t){return Je(this.configuration).getJurPersonsByEhakCode(e,t).then((e=>e(this.axios,this.basePath)))}getPerson(e,t){return Je(this.configuration).getPerson(e,t).then((e=>e(this.axios,this.basePath)))}getPersonDetails(e){return Je(this.configuration).getPersonDetails(e).then((e=>e(this.axios,this.basePath)))}refreshUpdateArPersonFromAR(e,t){return Je(this.configuration).refreshUpdateArPersonFromAR(e,t).then((e=>e(this.axios,this.basePath)))}removeYlemyksusReference(e,t){return Je(this.configuration).removeYlemyksusReference(e,t).then((e=>e(this.axios,this.basePath)))}updatePerson(e,t,n){return Je(this.configuration).updatePerson(e,t,n).then((e=>e(this.axios,this.basePath)))}}const qe=function(e){const t=function(e){return{searchPerson:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Ke("searchPerson","input",t);const i=new URL("/search/searchPerson",Re);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...o},l={};void 0!==t&&(l.input=t),void 0!==n&&(l.xRoad=n),void 0!==s&&(l.isPrivate=s),ke(i,l);let d=r&&r.headers?r.headers:{};return a.headers={...d,...o.headers},{url:Ge(i),options:a}}}}(e);return{async searchPerson(n,s,o,i){const r=await t.searchPerson(n,s,o,i);return Ve(r,ve(),Ce,e)}}};class $e extends Le{searchPerson(e,t,n,s){return qe(this.configuration).searchPerson(e,t,n,s).then((e=>e(this.axios,this.basePath)))}}const ze=function(e){const t=function(e){return{addRoleToUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URL("/user/addrole",Re);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};ke(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Ye(t,i,e),{url:Ge(s),options:i}},addUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URL("/user",Re);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};ke(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Ye(t,i,e),{url:Ge(s),options:i}},appointSubstituteUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URL("/user-substitution/appoint-substitute",Re);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},r={"Content-Type":"application/json"};ke(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Ye(t,i,e),{url:Ge(s),options:i}},deleteUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("deleteUser","userId",t);const s="/user/{userId}".replace("{userId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"DELETE",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},deleteUserRole:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("deleteUserRole","userRoleRelId",t);const s="/user/role/{userRoleRelId}".replace("{userRoleRelId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"DELETE",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},findUsersByRoleId:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("findUsersByRoleId","roleId",t);const s="/user/byroleid/{roleId}".replace("{roleId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getAllClassifierUserRoleDtos:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/user/roles/all",Re);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};ke(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Ge(n),options:o}},getHealth:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/health",Re);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};ke(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Ge(n),options:o}},getJurUsers:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getJurUsers","personId",t);const s="/jur/user/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getJurUsersWithoutGivenRole:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ke("getJurUsersWithoutGivenRole","personId",t),Ke("getJurUsersWithoutGivenRole","roleId",n);const o="/jur/user/withoutrole/{personId}/{roleId}".replace("{personId}",encodeURIComponent(String(t))).replace("{roleId}",encodeURIComponent(String(n))),i=new URL(o,Re);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s};ke(i,{});let l=r&&r.headers?r.headers:{};return a.headers={...l,...s.headers},{url:Ge(i),options:a}},getUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getUser","userId",t);const s="/user/{userId}".replace("{userId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getUserPossibleRecipients:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URL("/user/possiblerecipients",Re);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},r={};void 0!==t&&(r.searchInput=t),ke(s,r);let a=o&&o.headers?o.headers:{};return i.headers={...a,...n.headers},{url:Ge(s),options:i}},getUsers:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ke("getUsers","personId",t);const s="/user/usersByPersonId/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(s,Re);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};ke(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Ge(o),options:r}},getUsersJurPerson:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ke("getUsersJurPerson","userId",t);const o="/user/jur/{userId}".replace("{userId}",encodeURIComponent(String(t))),i=new URL(o,Re);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s},l={};void 0!==n&&(l.valid=n),ke(i,l);let d=r&&r.headers?r.headers:{};return a.headers={...d,...s.headers},{url:Ge(i),options:a}},updateUser:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ke("updateUser","userId",t);const o="/user/{userId}".replace("{userId}",encodeURIComponent(String(t))),i=new URL(o,Re);let r;e&&(r=e.baseOptions);const a={method:"PUT",...r,...s},l={"Content-Type":"application/json"};ke(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},a.data=Ye(n,a,e),{url:Ge(i),options:a}},updateUserRole:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ke("updateUserRole","userRoleRelId",t);const o="/user/modifyrole/{userRoleRelId}".replace("{userRoleRelId}",encodeURIComponent(String(t))),i=new URL(o,Re);let r;e&&(r=e.baseOptions);const a={method:"PUT",...r,...s},l={"Content-Type":"application/json"};ke(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},a.data=Ye(n,a,e),{url:Ge(i),options:a}}}}(e);return{async addRoleToUser(n,s){const o=await t.addRoleToUser(n,s);return Ve(o,ve(),Ce,e)},async addUser(n,s){const o=await t.addUser(n,s);return Ve(o,ve(),Ce,e)},async appointSubstituteUser(n,s){const o=await t.appointSubstituteUser(n,s);return Ve(o,ve(),Ce,e)},async deleteUser(n,s){const o=await t.deleteUser(n,s);return Ve(o,ve(),Ce,e)},async deleteUserRole(n,s){const o=await t.deleteUserRole(n,s);return Ve(o,ve(),Ce,e)},async findUsersByRoleId(n,s){const o=await t.findUsersByRoleId(n,s);return Ve(o,ve(),Ce,e)},async getAllClassifierUserRoleDtos(n){const s=await t.getAllClassifierUserRoleDtos(n);return Ve(s,ve(),Ce,e)},async getHealth(n){const s=await t.getHealth(n);return Ve(s,ve(),Ce,e)},async getJurUsers(n,s){const o=await t.getJurUsers(n,s);return Ve(o,ve(),Ce,e)},async getJurUsersWithoutGivenRole(n,s,o){const i=await t.getJurUsersWithoutGivenRole(n,s,o);return Ve(i,ve(),Ce,e)},async getUser(n,s){const o=await t.getUser(n,s);return Ve(o,ve(),Ce,e)},async getUserPossibleRecipients(n,s){const o=await t.getUserPossibleRecipients(n,s);return Ve(o,ve(),Ce,e)},async getUsers(n,s){const o=await t.getUsers(n,s);return Ve(o,ve(),Ce,e)},async getUsersJurPerson(n,s,o){const i=await t.getUsersJurPerson(n,s,o);return Ve(i,ve(),Ce,e)},async updateUser(n,s,o){const i=await t.updateUser(n,s,o);return Ve(i,ve(),Ce,e)},async updateUserRole(n,s,o){const i=await t.updateUserRole(n,s,o);return Ve(i,ve(),Ce,e)}}};class Xe extends Le{addRoleToUser(e,t){return ze(this.configuration).addRoleToUser(e,t).then((e=>e(this.axios,this.basePath)))}addUser(e,t){return ze(this.configuration).addUser(e,t).then((e=>e(this.axios,this.basePath)))}appointSubstituteUser(e,t){return ze(this.configuration).appointSubstituteUser(e,t).then((e=>e(this.axios,this.basePath)))}deleteUser(e,t){return ze(this.configuration).deleteUser(e,t).then((e=>e(this.axios,this.basePath)))}deleteUserRole(e,t){return ze(this.configuration).deleteUserRole(e,t).then((e=>e(this.axios,this.basePath)))}findUsersByRoleId(e,t){return ze(this.configuration).findUsersByRoleId(e,t).then((e=>e(this.axios,this.basePath)))}getAllClassifierUserRoleDtos(e){return ze(this.configuration).getAllClassifierUserRoleDtos(e).then((e=>e(this.axios,this.basePath)))}getHealth(e){return ze(this.configuration).getHealth(e).then((e=>e(this.axios,this.basePath)))}getJurUsers(e,t){return ze(this.configuration).getJurUsers(e,t).then((e=>e(this.axios,this.basePath)))}getJurUsersWithoutGivenRole(e,t,n){return ze(this.configuration).getJurUsersWithoutGivenRole(e,t,n).then((e=>e(this.axios,this.basePath)))}getUser(e,t){return ze(this.configuration).getUser(e,t).then((e=>e(this.axios,this.basePath)))}getUserPossibleRecipients(e,t){return ze(this.configuration).getUserPossibleRecipients(e,t).then((e=>e(this.axios,this.basePath)))}getUsers(e,t){return ze(this.configuration).getUsers(e,t).then((e=>e(this.axios,this.basePath)))}getUsersJurPerson(e,t,n){return ze(this.configuration).getUsersJurPerson(e,t,n).then((e=>e(this.axios,this.basePath)))}updateUser(e,t,n){return ze(this.configuration).updateUser(e,t,n).then((e=>e(this.axios,this.basePath)))}updateUserRole(e,t,n){return ze(this.configuration).updateUserRole(e,t,n).then((e=>e(this.axios,this.basePath)))}}class Qe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const Ze="http://localhost:8080".replace(/\/+$/,"");class et{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ze,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class tt extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const nt="https://example.com",st=function(e,t,n){if(null==n)throw new tt(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function ot(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach((t=>ot(e,t,n))):Object.keys(t).forEach((s=>ot(e,t[s],`${n}${""!==n?".":""}${s}`))):e.has(n)?e.append(n,t):e.set(n,t))}const it=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];ot(t,s),e.search=t.toString()},rt=function(e,t,n){const s="string"!=typeof e;return(s&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(void 0!==e?e:{}):e||""},at=function(e){return e.pathname+e.search+e.hash},lt=function(e,t,n,s){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const r={...e.options,url:((null==s?void 0:s.basePath)||o.defaults.baseURL||i)+e.url};return o.request(r)}},dt=function(e){const t=function(e){return{findIncomingDocuments:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("findIncomingDocuments","documentBaseQueryDto",t);const s=new URL("/documents/incomingdocuments",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}},findWorkingDocuments1:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("findWorkingDocuments1","documentBaseQueryDto",t);const s=new URL("/documents/basedocuments",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}}}}(e);return{async findIncomingDocuments(n,s){const o=await t.findIncomingDocuments(n,s);return lt(o,ve(),Ze,e)},async findWorkingDocuments1(n,s){const o=await t.findWorkingDocuments1(n,s);return lt(o,ve(),Ze,e)}}};class ct extends et{findIncomingDocuments(e,t){return dt(this.configuration).findIncomingDocuments(e,t).then((e=>e(this.axios,this.basePath)))}findWorkingDocuments1(e,t){return dt(this.configuration).findWorkingDocuments1(e,t).then((e=>e(this.axios,this.basePath)))}}const ut=function(e){const t=function(e){return{searchDetailBuildings:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("searchDetailBuildings","buildingSearchDto",t);const s=new URL("/search/buildings",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}},searchDetailDocuments:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("searchDetailDocuments","documentSearchDto",t);const s=new URL("/search/documents",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}},searchDetailProceedings:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("searchDetailProceedings","proceedingSearchDto",t);const s=new URL("/search/proceedings",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}}}}(e);return{async searchDetailBuildings(n,s){const o=await t.searchDetailBuildings(n,s);return lt(o,ve(),Ze,e)},async searchDetailDocuments(n,s){const o=await t.searchDetailDocuments(n,s);return lt(o,ve(),Ze,e)},async searchDetailProceedings(n,s){const o=await t.searchDetailProceedings(n,s);return lt(o,ve(),Ze,e)}}};class pt extends et{searchDetailBuildings(e,t){return ut(this.configuration).searchDetailBuildings(e,t).then((e=>e(this.axios,this.basePath)))}searchDetailDocuments(e,t){return ut(this.configuration).searchDetailDocuments(e,t).then((e=>e(this.axios,this.basePath)))}searchDetailProceedings(e,t){return ut(this.configuration).searchDetailProceedings(e,t).then((e=>e(this.axios,this.basePath)))}}const ht=function(e){const t=function(e){return{findOperationInvitations:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("findOperationInvitations","operationQueryDto",t);const s=new URL("/myoperations/operationinvitations",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}},findOperations:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("findOperations","operationQueryDto",t);const s=new URL("/myoperations/myoperations",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}},findOperationsToComment:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("findOperationsToComment","operationQueryDto",t);const s=new URL("/myoperations/operationstocomment",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}}}}(e);return{async findOperationInvitations(n,s){const o=await t.findOperationInvitations(n,s);return lt(o,ve(),Ze,e)},async findOperations(n,s){const o=await t.findOperations(n,s);return lt(o,ve(),Ze,e)},async findOperationsToComment(n,s){const o=await t.findOperationsToComment(n,s);return lt(o,ve(),Ze,e)}}};class mt extends et{findOperationInvitations(e,t){return ht(this.configuration).findOperationInvitations(e,t).then((e=>e(this.axios,this.basePath)))}findOperations(e,t){return ht(this.configuration).findOperations(e,t).then((e=>e(this.axios,this.basePath)))}findOperationsToComment(e,t){return ht(this.configuration).findOperationsToComment(e,t).then((e=>e(this.axios,this.basePath)))}}const gt=function(e){const t=function(e){return{findAreaProceedings:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("findAreaProceedings","proceedingQueryDto",t);const s=new URL("/myproceedings/my-area-proceedings",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}},findProceedings:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st("findProceedings","myProceedingsRequestDto",t);const s=new URL("/myproceedings/myproceedings",nt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};it(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=rt(t,i,e),{url:at(s),options:i}}}}(e);return{async findAreaProceedings(n,s){const o=await t.findAreaProceedings(n,s);return lt(o,ve(),Ze,e)},async findProceedings(n,s){const o=await t.findProceedings(n,s);return lt(o,ve(),Ze,e)}}};class St extends et{findAreaProceedings(e,t){return gt(this.configuration).findAreaProceedings(e,t).then((e=>e(this.axios,this.basePath)))}findProceedings(e,t){return gt(this.configuration).findProceedings(e,t).then((e=>e(this.axios,this.basePath)))}}class ft{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const It="http://localhost:8080".replace(/\/+$/,"");class Tt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:It,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class Et extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const _t="https://example.com",vt=function(e,t,n){if(null==n)throw new Et(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},yt=async function(e,t){if(t&&t.accessToken){const n="function"==typeof t.accessToken?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+n}};function bt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach((t=>bt(e,t,n))):Object.keys(t).forEach((s=>bt(e,t[s],`${n}${""!==n?".":""}${s}`))):e.has(n)?e.append(n,t):e.set(n,t))}const Dt=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];bt(t,s),e.search=t.toString()},xt=function(e,t,n){const s="string"!=typeof e;return(s&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(void 0!==e?e:{}):e||""},Mt=function(e){return e.pathname+e.search+e.hash},Nt=function(e,t,n,s){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const r={...e.options,url:((null==s?void 0:s.basePath)||o.defaults.baseURL||i)+e.url};return o.request(r)}};const Ot=function(e){const t=function(e){return{addAuthz:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("addAuthz","documentType",t),vt("addAuthz","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/addAuthz".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s};Dt(i,{});let l=r&&r.headers?r.headers:{};return a.headers={...l,...s.headers},{url:Mt(i),options:a}},apiVersion:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/version",_t);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Dt(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Mt(n),options:o}},autoUpdateOwnershipType:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/document/updateOwnershipType",_t);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Dt(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Mt(n),options:o}},createDoDokuDokuRel:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("createDoDokuDokuRel","documentId",t),vt("createDoDokuDokuRel","addEntityDto",n);const o="/document/{documentId}/createDoDokuDokuRel".replace("{documentId}",encodeURIComponent(String(t))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"POST",...r,...s},l={};await yt(l,e),l["Content-Type"]="application/json",Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},a.data=xt(n,a,e),{url:Mt(i),options:a}},createDocument:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("createDocument","documentType",t);const o="/document/{documentType}".replace("{documentType}",encodeURIComponent(String(t))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"POST",...r,...s},l={};await yt(l,e),l["Content-Type"]="application/json",Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},a.data=xt(n,a,e),{url:Mt(i),options:a}},createNewVersion:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("createNewVersion","documentType",t),vt("createNewVersion","applicationNumber",n),vt("createNewVersion","versionDto",s);const i="/document/{documentType}/{applicationNumber}/version/new".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"POST",...a,...o},d={};await yt(d,e),d["Content-Type"]="application/json",Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},l.data=xt(s,l,e),{url:Mt(r),options:l}},deleteApplicationByNumber:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("deleteApplicationByNumber","documentType",t),vt("deleteApplicationByNumber","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"DELETE",...r,...s},l={};await yt(l,e),Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},{url:Mt(i),options:a}},endProceedingCircleDocuments:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("endProceedingCircleDocuments","documentType",t),vt("endProceedingCircleDocuments","applicationNumber",n),vt("endProceedingCircleDocuments","proceedingId",s);const i="/document/{documentType}/{applicationNumber}/proceeding/{proceedingId}/endCircle".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{proceedingId}",encodeURIComponent(String(s))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"POST",...a,...o},d={};await yt(d,e),Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},{url:Mt(r),options:l}},getAccessRights:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("getAccessRights","documentType",t),vt("getAccessRights","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/rights".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s},l={};await yt(l,e),Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},{url:Mt(i),options:a}},getApplicationById:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vt("getApplicationById","documentId",t);const s="/document/{documentId}".replace("{documentId}",encodeURIComponent(String(t))),o=new URL(s,_t);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n},a={};await yt(a,e),Dt(o,{});let l=i&&i.headers?i.headers:{};return r.headers={...a,...l,...n.headers},{url:Mt(o),options:r}},getApplicationByNumber:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("getApplicationByNumber","documentType",t),vt("getApplicationByNumber","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s},l={};await yt(l,e),Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},{url:Mt(i),options:a}},getApplicationByNumberOld:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("getApplicationByNumberOld","ehrCode",t),vt("getApplicationByNumberOld","applicationNumber",n);const o="/document/old/{ehrCode}/{applicationNumber}".replace("{ehrCode}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s},l={};await yt(l,e),Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},{url:Mt(i),options:a}},getApplicationByNumberWithVersion:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("getApplicationByNumberWithVersion","documentType",t),vt("getApplicationByNumberWithVersion","applicationNumber",n),vt("getApplicationByNumberWithVersion","version",s);const i="/document/{documentType}/{applicationNumber}/{version}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{version}",encodeURIComponent(String(s))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...o},d={};await yt(d,e),Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},{url:Mt(r),options:l}},getApplicationStateFee:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("getApplicationStateFee","documentType",t),vt("getApplicationStateFee","applicationNumber",n),vt("getApplicationStateFee","applicationDto",s);const i="/document/{documentType}/{applicationNumber}/stateFee".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"POST",...a,...o},d={};await yt(d,e),d["Content-Type"]="application/json",Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},l.data=xt(s,l,e),{url:Mt(r),options:l}},getApplicationStateFeeOfVersion:async function(t,n,s,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};vt("getApplicationStateFeeOfVersion","documentType",t),vt("getApplicationStateFeeOfVersion","applicationNumber",n),vt("getApplicationStateFeeOfVersion","version",s),vt("getApplicationStateFeeOfVersion","applicationDto",o);const r="/document/{documentType}/{applicationNumber}/{version}/stateFee".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{version}",encodeURIComponent(String(s))),a=new URL(r,_t);let l;e&&(l=e.baseOptions);const d={method:"POST",...l,...i},c={};await yt(c,e),c["Content-Type"]="application/json",Dt(a,{});let u=l&&l.headers?l.headers:{};return d.headers={...c,...u,...i.headers},d.data=xt(o,d,e),{url:Mt(a),options:d}},getDocumentFileRels:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vt("getDocumentFileRels","docNr",t);const s=new URL("/document/fileRels",_t);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},r={},a={};await yt(r,e),void 0!==t&&(a.docNr=t),Dt(s,a);let l=o&&o.headers?o.headers:{};return i.headers={...r,...l,...n.headers},{url:Mt(s),options:i}},getDotysBasedOnUserRights:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URL("/document/starting_rights",_t);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},r={};void 0!==t&&(r.ehrCode=t),Dt(s,r);let a=o&&o.headers?o.headers:{};return i.headers={...a,...n.headers},{url:Mt(s),options:i}},getHealth:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/health",_t);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Dt(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Mt(n),options:o}},getLastStateHistory:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("getLastStateHistory","documentType",t),vt("getLastStateHistory","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/state-history/last".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s};Dt(i,{});let l=r&&r.headers?r.headers:{};return a.headers={...l,...s.headers},{url:Mt(i),options:a}},initializeAds:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("initializeAds","documentType",t),vt("initializeAds","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/initAds".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s};Dt(i,{});let l=r&&r.headers?r.headers:{};return a.headers={...l,...s.headers},{url:Mt(i),options:a}},mergeInstitutions:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vt("mergeInstitutions","mergeInstitutionsDTO",t);const s=new URL("/document/merge",_t);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};Dt(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=xt(t,i,e),{url:Mt(s),options:i}},reSubmit:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("reSubmit","documentType",t),vt("reSubmit","applicationNumber",n),vt("reSubmit","proceedingNumber",s);const i="/document/{documentType}/{applicationNumber}/resubmit/{proceedingNumber}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{proceedingNumber}",encodeURIComponent(String(s))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"POST",...a,...o},d={};await yt(d,e),Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},{url:Mt(r),options:l}},recalculatestate:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("recalculatestate","documentType",t),vt("recalculatestate","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/recalculatedetailstate".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s};Dt(i,{});let l=r&&r.headers?r.headers:{};return a.headers={...l,...s.headers},{url:Mt(i),options:a}},revertCreateNewVersion:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("revertCreateNewVersion","documentType",t),vt("revertCreateNewVersion","applicationNumber",n),vt("revertCreateNewVersion","versionDto",s);const i="/document/{documentType}/{applicationNumber}/version/revert".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"POST",...a,...o},d={};await yt(d,e),d["Content-Type"]="application/json",Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},l.data=xt(s,l,e),{url:Mt(r),options:l}},saveAndValidate:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("saveAndValidate","documentType",t),vt("saveAndValidate","applicationNumber",n),vt("saveAndValidate","applicationDto",s);const i="/document/{documentType}/{applicationNumber}/saveAndValidate".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"POST",...a,...o},d={};await yt(d,e),d["Content-Type"]="application/json",Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},l.data=xt(s,l,e),{url:Mt(r),options:l}},saveApplicationByNumber:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("saveApplicationByNumber","documentType",t),vt("saveApplicationByNumber","applicationNumber",n),vt("saveApplicationByNumber","applicationDto",s);const i="/document/{documentType}/{applicationNumber}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"PUT",...a,...o},d={};await yt(d,e),d["Content-Type"]="application/json",Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},l.data=xt(s,l,e),{url:Mt(r),options:l}},setWaterExtractionPointsTestDates:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("setWaterExtractionPointsTestDates","documentType",t),vt("setWaterExtractionPointsTestDates","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/water-extraction-point/set-test-dates".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"PUT",...r,...s},l={};await yt(l,e),Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},{url:Mt(i),options:a}},setWaterExtractionPointsTestDatesForBuilding:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("setWaterExtractionPointsTestDatesForBuilding","documentType",t),vt("setWaterExtractionPointsTestDatesForBuilding","applicationNumber",n),vt("setWaterExtractionPointsTestDatesForBuilding","ehrCode",s);const i="/document/{documentType}/{applicationNumber}/building/{ehrCode}/water-extraction-point/set-test-dates".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{ehrCode}",encodeURIComponent(String(s))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"PUT",...a,...o},d={};await yt(d,e),Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},{url:Mt(r),options:l}},submitStraightToRegistry:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("submitStraightToRegistry","documentType",t),vt("submitStraightToRegistry","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/submitToRegistry".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"POST",...r,...s},l={};await yt(l,e),Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},{url:Mt(i),options:a}},submitToProcessing:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("submitToProcessing","documentType",t),vt("submitToProcessing","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/submitToProcessing".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"PUT",...r,...s},l={};await yt(l,e),Dt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},{url:Mt(i),options:a}},submitToSigning:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("submitToSigning","documentType",t),vt("submitToSigning","applicationNumber",n),vt("submitToSigning","applicationDto",s);const i="/document/{documentType}/{applicationNumber}/submitToSigning".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"PUT",...a,...o},d={};await yt(d,e),d["Content-Type"]="application/json",Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},l.data=xt(s,l,e),{url:Mt(r),options:l}},submitToSupervisorProcessing:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};vt("submitToSupervisorProcessing","documentType",t),vt("submitToSupervisorProcessing","applicationNumber",n),vt("submitToSupervisorProcessing","supervisorId",s);const i="/document/{documentType}/{applicationNumber}/submitToSupervisor/{supervisorId}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{supervisorId}",encodeURIComponent(String(s))),r=new URL(i,_t);let a;e&&(a=e.baseOptions);const l={method:"POST",...a,...o},d={};await yt(d,e),Dt(r,{});let c=a&&a.headers?a.headers:{};return l.headers={...d,...c,...o.headers},{url:Mt(r),options:l}},validateSavedDocument:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};vt("validateSavedDocument","documentType",t),vt("validateSavedDocument","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/completeApplicationChecks".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s};Dt(i,{});let l=r&&r.headers?r.headers:{};return a.headers={...l,...s.headers},{url:Mt(i),options:a}}}}(e);return{async addAuthz(n,s,o){const i=await t.addAuthz(n,s,o);return Nt(i,ve(),It,e)},async apiVersion(n){const s=await t.apiVersion(n);return Nt(s,ve(),It,e)},async autoUpdateOwnershipType(n){const s=await t.autoUpdateOwnershipType(n);return Nt(s,ve(),It,e)},async createDoDokuDokuRel(n,s,o){const i=await t.createDoDokuDokuRel(n,s,o);return Nt(i,ve(),It,e)},async createDocument(n,s,o){const i=await t.createDocument(n,s,o);return Nt(i,ve(),It,e)},async createNewVersion(n,s,o,i){const r=await t.createNewVersion(n,s,o,i);return Nt(r,ve(),It,e)},async deleteApplicationByNumber(n,s,o){const i=await t.deleteApplicationByNumber(n,s,o);return Nt(i,ve(),It,e)},async endProceedingCircleDocuments(n,s,o,i){const r=await t.endProceedingCircleDocuments(n,s,o,i);return Nt(r,ve(),It,e)},async getAccessRights(n,s,o){const i=await t.getAccessRights(n,s,o);return Nt(i,ve(),It,e)},async getApplicationById(n,s){const o=await t.getApplicationById(n,s);return Nt(o,ve(),It,e)},async getApplicationByNumber(n,s,o){const i=await t.getApplicationByNumber(n,s,o);return Nt(i,ve(),It,e)},async getApplicationByNumberOld(n,s,o){const i=await t.getApplicationByNumberOld(n,s,o);return Nt(i,ve(),It,e)},async getApplicationByNumberWithVersion(n,s,o,i){const r=await t.getApplicationByNumberWithVersion(n,s,o,i);return Nt(r,ve(),It,e)},async getApplicationStateFee(n,s,o,i){const r=await t.getApplicationStateFee(n,s,o,i);return Nt(r,ve(),It,e)},async getApplicationStateFeeOfVersion(n,s,o,i,r){const a=await t.getApplicationStateFeeOfVersion(n,s,o,i,r);return Nt(a,ve(),It,e)},async getDocumentFileRels(n,s){const o=await t.getDocumentFileRels(n,s);return Nt(o,ve(),It,e)},async getDotysBasedOnUserRights(n,s){const o=await t.getDotysBasedOnUserRights(n,s);return Nt(o,ve(),It,e)},async getHealth(n){const s=await t.getHealth(n);return Nt(s,ve(),It,e)},async getLastStateHistory(n,s,o){const i=await t.getLastStateHistory(n,s,o);return Nt(i,ve(),It,e)},async initializeAds(n,s,o){const i=await t.initializeAds(n,s,o);return Nt(i,ve(),It,e)},async mergeInstitutions(n,s){const o=await t.mergeInstitutions(n,s);return Nt(o,ve(),It,e)},async reSubmit(n,s,o,i){const r=await t.reSubmit(n,s,o,i);return Nt(r,ve(),It,e)},async recalculatestate(n,s,o){const i=await t.recalculatestate(n,s,o);return Nt(i,ve(),It,e)},async revertCreateNewVersion(n,s,o,i){const r=await t.revertCreateNewVersion(n,s,o,i);return Nt(r,ve(),It,e)},async saveAndValidate(n,s,o,i){const r=await t.saveAndValidate(n,s,o,i);return Nt(r,ve(),It,e)},async saveApplicationByNumber(n,s,o,i){const r=await t.saveApplicationByNumber(n,s,o,i);return Nt(r,ve(),It,e)},async setWaterExtractionPointsTestDates(n,s,o){const i=await t.setWaterExtractionPointsTestDates(n,s,o);return Nt(i,ve(),It,e)},async setWaterExtractionPointsTestDatesForBuilding(n,s,o,i){const r=await t.setWaterExtractionPointsTestDatesForBuilding(n,s,o,i);return Nt(r,ve(),It,e)},async submitStraightToRegistry(n,s,o){const i=await t.submitStraightToRegistry(n,s,o);return Nt(i,ve(),It,e)},async submitToProcessing(n,s,o){const i=await t.submitToProcessing(n,s,o);return Nt(i,ve(),It,e)},async submitToSigning(n,s,o,i){const r=await t.submitToSigning(n,s,o,i);return Nt(r,ve(),It,e)},async submitToSupervisorProcessing(n,s,o,i){const r=await t.submitToSupervisorProcessing(n,s,o,i);return Nt(r,ve(),It,e)},async validateSavedDocument(n,s,o){const i=await t.validateSavedDocument(n,s,o);return Nt(i,ve(),It,e)}}};class At extends Tt{addAuthz(e,t,n){return Ot(this.configuration).addAuthz(e,t,n).then((e=>e(this.axios,this.basePath)))}apiVersion(e){return Ot(this.configuration).apiVersion(e).then((e=>e(this.axios,this.basePath)))}autoUpdateOwnershipType(e){return Ot(this.configuration).autoUpdateOwnershipType(e).then((e=>e(this.axios,this.basePath)))}createDoDokuDokuRel(e,t,n){return Ot(this.configuration).createDoDokuDokuRel(e,t,n).then((e=>e(this.axios,this.basePath)))}createDocument(e,t,n){return Ot(this.configuration).createDocument(e,t,n).then((e=>e(this.axios,this.basePath)))}createNewVersion(e,t,n,s){return Ot(this.configuration).createNewVersion(e,t,n,s).then((e=>e(this.axios,this.basePath)))}deleteApplicationByNumber(e,t,n){return Ot(this.configuration).deleteApplicationByNumber(e,t,n).then((e=>e(this.axios,this.basePath)))}endProceedingCircleDocuments(e,t,n,s){return Ot(this.configuration).endProceedingCircleDocuments(e,t,n,s).then((e=>e(this.axios,this.basePath)))}getAccessRights(e,t,n){return Ot(this.configuration).getAccessRights(e,t,n).then((e=>e(this.axios,this.basePath)))}getApplicationById(e,t){return Ot(this.configuration).getApplicationById(e,t).then((e=>e(this.axios,this.basePath)))}getApplicationByNumber(e,t,n){return Ot(this.configuration).getApplicationByNumber(e,t,n).then((e=>e(this.axios,this.basePath)))}getApplicationByNumberOld(e,t,n){return Ot(this.configuration).getApplicationByNumberOld(e,t,n).then((e=>e(this.axios,this.basePath)))}getApplicationByNumberWithVersion(e,t,n,s){return Ot(this.configuration).getApplicationByNumberWithVersion(e,t,n,s).then((e=>e(this.axios,this.basePath)))}getApplicationStateFee(e,t,n,s){return Ot(this.configuration).getApplicationStateFee(e,t,n,s).then((e=>e(this.axios,this.basePath)))}getApplicationStateFeeOfVersion(e,t,n,s,o){return Ot(this.configuration).getApplicationStateFeeOfVersion(e,t,n,s,o).then((e=>e(this.axios,this.basePath)))}getDocumentFileRels(e,t){return Ot(this.configuration).getDocumentFileRels(e,t).then((e=>e(this.axios,this.basePath)))}getDotysBasedOnUserRights(e,t){return Ot(this.configuration).getDotysBasedOnUserRights(e,t).then((e=>e(this.axios,this.basePath)))}getHealth(e){return Ot(this.configuration).getHealth(e).then((e=>e(this.axios,this.basePath)))}getLastStateHistory(e,t,n){return Ot(this.configuration).getLastStateHistory(e,t,n).then((e=>e(this.axios,this.basePath)))}initializeAds(e,t,n){return Ot(this.configuration).initializeAds(e,t,n).then((e=>e(this.axios,this.basePath)))}mergeInstitutions(e,t){return Ot(this.configuration).mergeInstitutions(e,t).then((e=>e(this.axios,this.basePath)))}reSubmit(e,t,n,s){return Ot(this.configuration).reSubmit(e,t,n,s).then((e=>e(this.axios,this.basePath)))}recalculatestate(e,t,n){return Ot(this.configuration).recalculatestate(e,t,n).then((e=>e(this.axios,this.basePath)))}revertCreateNewVersion(e,t,n,s){return Ot(this.configuration).revertCreateNewVersion(e,t,n,s).then((e=>e(this.axios,this.basePath)))}saveAndValidate(e,t,n,s){return Ot(this.configuration).saveAndValidate(e,t,n,s).then((e=>e(this.axios,this.basePath)))}saveApplicationByNumber(e,t,n,s){return Ot(this.configuration).saveApplicationByNumber(e,t,n,s).then((e=>e(this.axios,this.basePath)))}setWaterExtractionPointsTestDates(e,t,n){return Ot(this.configuration).setWaterExtractionPointsTestDates(e,t,n).then((e=>e(this.axios,this.basePath)))}setWaterExtractionPointsTestDatesForBuilding(e,t,n,s){return Ot(this.configuration).setWaterExtractionPointsTestDatesForBuilding(e,t,n,s).then((e=>e(this.axios,this.basePath)))}submitStraightToRegistry(e,t,n){return Ot(this.configuration).submitStraightToRegistry(e,t,n).then((e=>e(this.axios,this.basePath)))}submitToProcessing(e,t,n){return Ot(this.configuration).submitToProcessing(e,t,n).then((e=>e(this.axios,this.basePath)))}submitToSigning(e,t,n,s){return Ot(this.configuration).submitToSigning(e,t,n,s).then((e=>e(this.axios,this.basePath)))}submitToSupervisorProcessing(e,t,n,s){return Ot(this.configuration).submitToSupervisorProcessing(e,t,n,s).then((e=>e(this.axios,this.basePath)))}validateSavedDocument(e,t,n){return Ot(this.configuration).validateSavedDocument(e,t,n).then((e=>e(this.axios,this.basePath)))}}class Ut{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const wt="https://devkluster.ehr.ee/api/file-upload-api/v1".replace(/\/+$/,"");class jt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class Ct extends Error{constructor(e,t){super(t),this.name="RequiredError",this.field=e}}const Lt="https://example.com",Pt=function(e,t,n){if(null==n)throw new Ct(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},Rt=async function(e,t){if(t&&t.accessToken){const n="function"==typeof t.accessToken?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+n}},Kt=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];for(const e of s)for(const n in e)if(Array.isArray(e[n])){t.delete(n);for(const s of e[n])t.append(n,s)}else t.set(n,e[n]);e.search=t.toString()},Ft=function(e,t,n){const s="string"!=typeof e;return(s&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(void 0!==e?e:{}):e||""},kt=function(e){return e.pathname+e.search+e.hash},Yt=function(e,t,n,s){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const r={...e.options,url:((null==s?void 0:s.basePath)||i)+e.url};return o.request(r)}},Gt=function(e){const t=function(e){return{cloneFilesAndCreateRels:async function(t,n,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Pt("cloneFilesAndCreateRels","fileIds",t);const i=new URL("/fileClone",Lt);let r;e&&(r=e.baseOptions);const a={method:"POST",...r,...o},l={},d={};await Rt(l,e),t&&(d.fileIds=t),void 0!==n&&(d.docNr=n),void 0!==s&&(d.relType=s),Kt(i,d);let c=r&&r.headers?r.headers:{};return a.headers={...l,...c,...o.headers},{url:kt(i),options:a}},deleteFile:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Pt("deleteFile","fileId",t);const s="/file/{fileId}".replace("{fileId}",encodeURIComponent(String(t))),o=new URL(s,Lt);let i;e&&(i=e.baseOptions);const r={method:"DELETE",...i,...n},a={};await Rt(a,e),Kt(o,{});let l=i&&i.headers?i.headers:{};return r.headers={...a,...l,...n.headers},{url:kt(o),options:r}},downloadFile:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Pt("downloadFile","fileId",t);const s="/file/{fileId}".replace("{fileId}",encodeURIComponent(String(t))),o=new URL(s,Lt);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n},a={};await Rt(a,e),Kt(o,{});let l=i&&i.headers?i.headers:{};return r.headers={...a,...l,...n.headers},{url:kt(o),options:r}},updateFile:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Pt("updateFile","fileId",t);const o="/file/{fileId}".replace("{fileId}",encodeURIComponent(String(t))),i=new URL(o,Lt);let r;e&&(r=e.baseOptions);const a={method:"PUT",...r,...s},l={};await Rt(l,e),l["Content-Type"]="application/json",Kt(i,{});let d=r&&r.headers?r.headers:{};return a.headers={...l,...d,...s.headers},a.data=Ft(n,a,e),{url:kt(i),options:a}},updateFileInfo:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Pt("updateFileInfo","doFail",t);const s=new URL("/file/info",Lt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={};await Rt(r,e),r["Content-Type"]="application/json",Kt(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Ft(t,i,e),{url:kt(s),options:i}},uploadFile:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URL("/file",Lt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={},a=new(e&&e.formDataCtor||FormData);await Rt(r,e),void 0!==t&&a.append("file",t),r["Content-Type"]="multipart/form-data",Kt(s,{});let l=o&&o.headers?o.headers:{};return i.headers={...r,...l,...n.headers},i.data=a,{url:kt(s),options:i}},uploadFileWithFileInfo:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=new URL("/fileWithInfo",Lt);let i;e&&(i=e.baseOptions);const r={method:"POST",...i,...s},a={},l=new(e&&e.formDataCtor||FormData);await Rt(a,e),void 0!==t&&l.append("file",t),void 0!==n&&l.append("fileInfo",new Blob([JSON.stringify(n)],{type:"application/json"})),a["Content-Type"]="multipart/form-data",Kt(o,{});let d=i&&i.headers?i.headers:{};return r.headers={...a,...d,...s.headers},r.data=l,{url:kt(o),options:r}},uploadFileWithFileInfoAndDocRel:async function(t,n,s,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const r=new URL("/fileWithInfoAndDocRel",Lt);let a;e&&(a=e.baseOptions);const l={method:"POST",...a,...i},d={},c=new(e&&e.formDataCtor||FormData);await Rt(d,e),void 0!==t&&c.append("file",t),void 0!==n&&c.append("fileInfo",new Blob([JSON.stringify(n)],{type:"application/json"})),void 0!==s&&c.append("docNr",s),void 0!==o&&c.append("relType",o),d["Content-Type"]="multipart/form-data",Kt(r,{});let u=a&&a.headers?a.headers:{};return l.headers={...d,...u,...i.headers},l.data=c,{url:kt(r),options:l}}}}(e);return{async cloneFilesAndCreateRels(n,s,o,i){const r=await t.cloneFilesAndCreateRels(n,s,o,i);return Yt(r,ve(),wt,e)},async deleteFile(n,s){const o=await t.deleteFile(n,s);return Yt(o,ve(),wt,e)},async downloadFile(n,s){const o=await t.downloadFile(n,s);return Yt(o,ve(),wt,e)},async updateFile(n,s,o){const i=await t.updateFile(n,s,o);return Yt(i,ve(),wt,e)},async updateFileInfo(n,s){const o=await t.updateFileInfo(n,s);return Yt(o,ve(),wt,e)},async uploadFile(n,s){const o=await t.uploadFile(n,s);return Yt(o,ve(),wt,e)},async uploadFileWithFileInfo(n,s,o){const i=await t.uploadFileWithFileInfo(n,s,o);return Yt(i,ve(),wt,e)},async uploadFileWithFileInfoAndDocRel(n,s,o,i,r){const a=await t.uploadFileWithFileInfoAndDocRel(n,s,o,i,r);return Yt(a,ve(),wt,e)}}};class Vt extends jt{cloneFilesAndCreateRels(e,t,n,s){return Gt(this.configuration).cloneFilesAndCreateRels(e,t,n,s).then((e=>e(this.axios,this.basePath)))}deleteFile(e,t){return Gt(this.configuration).deleteFile(e,t).then((e=>e(this.axios,this.basePath)))}downloadFile(e,t){return Gt(this.configuration).downloadFile(e,t).then((e=>e(this.axios,this.basePath)))}updateFile(e,t,n){return Gt(this.configuration).updateFile(e,t,n).then((e=>e(this.axios,this.basePath)))}updateFileInfo(e,t){return Gt(this.configuration).updateFileInfo(e,t).then((e=>e(this.axios,this.basePath)))}uploadFile(e,t){return Gt(this.configuration).uploadFile(e,t).then((e=>e(this.axios,this.basePath)))}uploadFileWithFileInfo(e,t,n){return Gt(this.configuration).uploadFileWithFileInfo(e,t,n).then((e=>e(this.axios,this.basePath)))}uploadFileWithFileInfoAndDocRel(e,t,n,s,o){return Gt(this.configuration).uploadFileWithFileInfoAndDocRel(e,t,n,s,o).then((e=>e(this.axios,this.basePath)))}}class Bt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const Ht="https://devkluster.ehr.ee/api/yld-esi/v1".replace(/\/+$/,"");class Jt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ht,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class Wt extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const qt="https://example.com",$t=function(e,t,n){if(null==n)throw new Wt(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function zt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach((t=>zt(e,t,n))):Object.keys(t).forEach((s=>zt(e,t[s],`${n}${""!==n?".":""}${s}`))):e.has(n)?e.append(n,t):e.set(n,t))}const Xt=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];zt(t,s),e.search=t.toString()},Qt=function(e){return e.pathname+e.search+e.hash},Zt=function(e,t,n,s){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const r={...e.options,url:((null==s?void 0:s.basePath)||o.defaults.baseURL||i)+e.url};return o.request(r)}};const en=function(e){return{esileht:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};$t("esileht","id",t),$t("esileht","language",n);const o="/public/page/{id}/{language}".replace("{id}",encodeURIComponent(String(t))).replace("{language}",encodeURIComponent(String(n))),i=new URL(o,qt);let r;e&&(r=e.baseOptions);const a={method:"GET",...r,...s};Xt(i,{});let l=r&&r.headers?r.headers:{};return a.headers={...l,...s.headers},{url:Qt(i),options:a}},lehed:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/api/pages",qt);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Xt(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Qt(n),options:o}},lehedId:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/api/pages/dotyid",qt);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...t};Xt(n,{});let i=s&&s.headers?s.headers:{};return o.headers={...i,...t.headers},{url:Qt(n),options:o}},leht:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$t("leht","id",t);const s="/api/pages/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,qt);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n};Xt(o,{});let a=i&&i.headers?i.headers:{};return r.headers={...a,...n.headers},{url:Qt(o),options:r}},lehtdSave:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$t("lehtdSave","esileht",t);const s=new URL("/api/pages",qt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={};r["Content-Type"]="application/json",Xt(s,{});let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=function(e,t,n){const s="string"!=typeof e;return(s&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(void 0!==e?e:{}):e||""}(t,i,e),{url:Qt(s),options:i}}}},tn=function(e){const t=en(e);return{async esileht(n,s,o){const i=await t.esileht(n,s,o);return Zt(i,ve(),Ht,e)},async lehed(n){const s=await t.lehed(n);return Zt(s,ve(),Ht,e)},async lehedId(n){const s=await t.lehedId(n);return Zt(s,ve(),Ht,e)},async leht(n,s){const o=await t.leht(n,s);return Zt(o,ve(),Ht,e)},async lehtdSave(n,s){const o=await t.lehtdSave(n,s);return Zt(o,ve(),Ht,e)}}};class nn extends Jt{esileht(e,t,n){return tn(this.configuration).esileht(e,t,n).then((e=>e(this.axios,this.basePath)))}lehed(e){return tn(this.configuration).lehed(e).then((e=>e(this.axios,this.basePath)))}lehedId(e){return tn(this.configuration).lehedId(e).then((e=>e(this.axios,this.basePath)))}leht(e,t){return tn(this.configuration).leht(e,t).then((e=>e(this.axios,this.basePath)))}lehtdSave(e,t){return tn(this.configuration).lehtdSave(e,t).then((e=>e(this.axios,this.basePath)))}}class sn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const on={myViewsApiEndpoint:window.REACT_APP_MY_VIEWS_API_PATH,classifierApiEndpoint:window.REACT_APP_CLASSIFIER_SERVICE_ENDPOINT,userApiEndpoint:window.REACT_APP_USER_SERVICE_ENDPOINT,documentApiEndpoint:window.REACT_APP_DOCUMENT_SERVICE_ENDPOINT,fileUploadApiEndpoint:window.REACT_APP_FILE_UPLOAD_API_ENDPOINT,frontPageApiEndpoint:window.REACT_APP_YLD_API},rn={proceedingApiService:new St(new ft({basePath:on.myViewsApiEndpoint})),classifierApiService:new we(new je({basePath:on.classifierApiEndpoint})),personApiService:new We(new Qe({basePath:on.userApiEndpoint})),userApiService:new Xe(new Qe({basePath:on.userApiEndpoint})),myDocumentBaseApiService:new ct(new ft({basePath:on.myViewsApiEndpoint})),documentApiService:new At(new Ut({basePath:on.documentApiEndpoint})),fileApiService:new Vt(new Bt({basePath:on.fileUploadApiEndpoint})),frontPageApi:new nn(new sn({basePath:on.frontPageApiEndpoint})),institutionKovEndpointApi:new He(new Qe({basePath:on.userApiEndpoint}))};var an=n(848);const ln=11272,dn=e=>{var t;let{userInfo:n}=e;const s=(0,B.useIntl)(),[o,i]=(0,G.useState)(!0),[r,a]=(0,G.useState)(""),[l,d]=(0,G.useState)(""),c=(null===(t=n.activeRole)||void 0===t?void 0:t.businessType)===le.MKM;(0,G.useEffect)((()=>{c?u():p()}),[]);const u=async()=>{rn.frontPageApi.leht(ln).then((e=>{const t=e.data;t[0].body&&(a(t[0].body),d(t[0].body))}))},p=async()=>{rn.frontPageApi.esileht(ln,"ee").then((e=>{const t=e.data;t.body&&(a(t.body),d(t.body))}))};return(0,an.jsx)(H.Section,{collapsed:!1,title:"my_admin_proceedings.admin_proceedings_reminder",showSettings:!0,children:(0,an.jsxs)("div",{className:o?"d-flex justify-content-between":"",children:[(0,an.jsx)(H.RichTextEditor,{placeholder:o?"":s.formatMessage({id:"placeholder.writing"}),onChange:e=>d(e),value:l,readOnly:o,view:o}),c&&o&&(0,an.jsx)(H.Link,{onClick:()=>i(!1),type:"edit"}),!o&&(0,an.jsxs)("div",{className:"pt-2",children:[(0,an.jsx)(H.Button,{colourScheme:"light",squared:!0,onClick:()=>{d(r),i(!0)},children:s.formatMessage({id:"button.cancel"})}),(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",squared:!0,onClick:()=>(async()=>{i(!o),a(l),rn.frontPageApi.lehtdSave({id:ln,body:l,language:"ee"})})(),children:s.formatMessage({id:"button.save"})})]})]})})},cn={default:"header-arrow-up-down-icon",des:"header-arrow-down-icon",asc:"header-arrow-up-icon"},un=e=>(0,an.jsx)(H.Tooltip,{content:(0,an.jsx)(H.Text,{raw:e.tooltipText}),placement:"bottom",theme:"dark",children:e.functionCall?(0,an.jsx)(H.Link,{onClick:t=>{var n;return null===(n=e.functionCall)||void 0===n?void 0:n.call(e,t)},text:e.linkName,href:e.href}):(0,an.jsx)(H.Link,{text:e.linkName,href:e.href,onClick:t=>{t.preventDefault(),t.stopPropagation();const n=window.open(e.href,"_blank");null==n||n.focus()}})},e.linkName),pn=e=>{let{proceedings:t,linkGen:n}=e;const s=(0,B.useIntl)(),o=[{id:"document_type",property:"documentType",size:180,getValue:e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""}},{id:"proceeding_nr",property:"proceedingNr",size:130,getValue:e=>{return(t=e).proceedingNr?(0,an.jsx)(un,{linkName:t.proceedingNr,tooltipText:"detailsearch.tooltip.open_proceeding",functionCall:e=>{n(!0,e,void 0,`administrativeActProceeding/${t.proceedingNr}`)}}):(0,an.jsx)(an.Fragment,{children:"-"});var t}},{id:"doty",property:"document",size:160,getValue:e=>e.document&&null!==e.document?(0,an.jsx)(un,{linkName:e.document,tooltipText:"detailsearch.tooltip.open_document",functionCall:t=>{n(!0,t,"DOCUMENT",e.document)}}):""},{id:"ehr_code",property:"ehrCode",size:130,getValue:e=>e.ehrCode&&null!==e.ehrCode?e.ehrCode.map(((t,s)=>(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(un,{linkName:t,tooltipText:"detailsearch.tooltip.open_building",functionCall:e=>{n(!0,e,"BUILDING",t)}}),s!==e.ehrCode.length-1?(0,an.jsx)("span",{children:", "}):""]}))):""},{id:"proceeding_state",property:"state",size:130,getValue:e=>e.state}];return(0,an.jsx)(H.TableComponent,{config:{thead:{headers:o.map((e=>({id:e.id,size:e.size,className:"table-header-field text-align-left",label:s.formatMessage({id:"my_admin_proceedings.table.header."+e.id}),tooltip:{text:s.formatMessage({id:"my_admin_proceedings.table.tooltip."+e.id})},propertyName:e.property,sortable:!0,isShown:!0,type:"input",valueFormatter:t=>e.getValue(t)}))),icons:cn,expandableRow:!1,isFilter:!1}},data:t,handleEvent:()=>!0})},hn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const[n,s]=(0,G.useState)(!1),[o,i]=(0,G.useState)(void 0),[r,a]=(0,G.useState)([]);(0,G.useEffect)((()=>{i(void 0),l()}),[e,t]);const l=async()=>{var n;if((null===(n=e.activeRole)||void 0===n?void 0:n.businessType)===le.TJA){s(!0);try{var o;const n=t?{institutionId:e.activeRole.businessId}:{userId:e.userId},s=await rn.proceedingApiService.findAreaProceedings(n);a(null!==(o=null==s?void 0:s.data)&&void 0!==o?o:[])}catch(e){i("my_admin_proceedings.proceedings_request.error")}finally{s(!1)}}else a([])};return{loading:n,proceedings:r,error:o}},mn=e=>{let{userInfo:t,linkGen:n}=e;const s=(0,B.useIntl)(),[o,i]=(0,G.useState)(!1),{loading:r,error:a,proceedings:l}=hn(t,o);return(0,an.jsxs)(H.Section,{collapsed:!1,title:"my_admin_proceedings.my_proceedings",showSettings:!0,children:[a&&(0,an.jsx)(H.MessageBlock,{dismissible:!1,theme:"danger",children:s.formatMessage({id:a})}),r&&(0,an.jsxs)(H.Row,{className:"mb-4 justify-content-center",children:[(0,an.jsx)("br",{}),(0,an.jsx)(H.Loader,{}),(0,an.jsx)("br",{})]}),!r&&!(null==l||!l.length)&&!a&&(0,an.jsx)(pn,{proceedings:l,linkGen:n}),(0,an.jsx)("div",{className:"d-flex justify-content-start my-2",children:(0,an.jsx)(H.Checkbox,{name:"checkbox",onChange:e=>i(e),text:s.formatMessage({id:"my_proceedings.view_all_institution_admin_proceedings"}),checked:o})})]})},gn=e=>{var t;let{userInfo:n,linkGen:s}=e;const o=(0,B.useIntl)(),i=(null===(t=n.activeRole)||void 0===t?void 0:t.businessType)===le.TJA;return(0,an.jsxs)("div",{children:[(0,an.jsx)("h2",{children:o.formatMessage({id:"my_admin_proceedings.page_title"})}),i&&(0,an.jsx)("div",{className:"d-flex justify-content-end mt-2",children:(0,an.jsx)(H.Button,{withPlus:!0,type:"submit",onClick:()=>{s(!0,void 0,"","/administrativeActProceeding")},children:o.formatMessage({id:"my_admin_proceedings.new_proceeding"})})}),(0,an.jsx)(dn,{userInfo:n}),i&&(0,an.jsx)(mn,{userInfo:n,linkGen:s})]})},Sn=require("react-redux"),fn=require("moment");var In=n.n(fn);function Tn(e,t,n){const s=n(e).trim(),o=n(t).trim();return s.toLowerCase()===o.toLowerCase()?0:""===s?1:""===o?-1:s.toLowerCase()>o.toLowerCase()?1:-1}function En(e,t,n){const s=n(e),o=n(t);return s===o?0:s>o?1:-1}function _n(e){if("0"===e.done&&"0"===e.all)return 15;if(e.done===e.all)return 9;let t=parseInt(e.done)/parseInt(e.all);return 1===t&&(t+=parseInt(e.all)/1e4),t}function vn(e,t,n){const s=n(e),o=n(t),i=_n(s),r=_n(o);return r===i?0:i>r?1:-1}function yn(e,t,n){const s=n(e),o=n(t);return s===o?0:s>o?1:-1}function bn(e,t,n){if(0===e.length)return e;const s={string:Tn,number:En,object:vn,date:yn}[typeof t(e[0])];return[...e].sort(((e,o)=>s(e,o,t)*n))}const Dn=0,xn=1,Mn=-1;function Nn(e,t){return{column:e,direction:e===t.column?function(e){switch(e){case Dn:return xn;case xn:return Mn;case Mn:return xn}}(t.direction):xn}}const On=e=>-1===e.sortDirection?(0,an.jsx)("svg",{width:"10",height:"8",viewBox:"0 8 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,an.jsx)("path",{d:"M1.55 6.05L5 2.6L8.45 6.05L9.5 5L5 0.5L0.5 5L1.55 6.05ZM1.55 9.95L5 13.4L8.45 9.95L9.5 11L5 15.5L0.5 11L1.55 9.95Z",fill:"#5D6071"})}):1===e.sortDirection?(0,an.jsx)("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,an.jsx)("path",{d:"M1.55 6.05L5 2.6L8.45 6.05L9.5 5L5 0.5L0.5 5L1.55 6.05ZM1.55 9.95L5 13.4L8.45 9.95L9.5 11L5 15.5L0.5 11L1.55 9.95Z",fill:"#5D6071"})}):(0,an.jsx)("svg",{width:"10",height:"16",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,an.jsx)("path",{d:"M1.55 6.05L5 2.6L8.45 6.05L9.5 5L5 0.5L0.5 5L1.55 6.05ZM1.55 9.95L5 13.4L8.45 9.95L9.5 11L5 15.5L0.5 11L1.55 9.95Z",fill:"#5D6071"})}),An=e=>{const[t,n]=(0,G.useState)(!1);return(0,an.jsx)(an.Fragment,{children:e.fileId&&(0,an.jsx)(H.ControlledPopover,{content:(0,an.jsxs)("div",{style:{width:"250px"},children:[(0,an.jsx)("h4",{children:(0,an.jsx)(B.FormattedMessage,{id:"download.file"})}),(0,an.jsx)("br",{}),(0,an.jsxs)("div",{className:"d-flex justify-content-between mt-2",children:[(0,an.jsx)(H.Button,{colourScheme:"light",type:"reset",squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.cancel"})}),(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",onClick:()=>{e.fileId&&e.fileApi.downloadFile(e.fileId,{responseType:"blob"}).then((e=>{const s=e.headers["content-disposition"];let o="download";if(s){const e=s.match(/filename\*=UTF-8''(.+?)(;|$)/);e&&e.length>=2&&(o=decodeURIComponent(e[1].replace(/\+/g," ")))}const i=new Blob([e.data],{}),r=document.createElement("a");r.download=o,r.href=URL.createObjectURL(i),r.addEventListener("click",(()=>{setTimeout((()=>URL.revokeObjectURL(r.href)),3e4)})),r.click(),n(!t)})).catch((e=>console.log(e)))},squared:!0,type:"submit",children:(0,an.jsx)(B.FormattedMessage,{id:"button.download"})})]})]}),open:t,placement:"bottom-end",toggle:()=>n(!t),children:(0,an.jsx)(H.Icon,{tooltipText:(0,an.jsx)(B.FormattedMessage,{id:"tooltip.download"}),type:"download"})})})};let Un=function(e){return e.DO_DOKUSEIS_ESITATUD="DO_DOKUSEIS_ESITATUD",e.DO_DOKUSEIS_KEHTETU="DO_DOKUSEIS_KEHTETU",e.DO_DOKUSEIS_KOOSTAMISEL="DO_DOKUSEIS_KOOSTAMISEL",e.DO_DOKUSEIS_EELNOU_AKTIIVNE="DO_DOKUSEIS_EELNOU_AKTIIVNE",e.DO_DOKUSEIS_ALLKIRJASTAMISEL="DO_DOKUSEIS_ALLKIRJASTAMISEL",e.DO_DOKUSEIS_MENETLUSES="DO_DOKUSEIS_MENETLUSES",e.DO_DOKUSEIS_MUUTMISEL="DO_DOKUSEIS_MUUTMISEL",e.DO_DOKUSEIS_TAIENDAMISEL="DO_DOKUSEIS_TAIENDAMISEL",e.DO_DOKUSEIS_TYHISTATUD="DO_DOKUSEIS_TYHISTATUD",e.DO_DOKUSEIS_VANA_VERSIOON="DO_DOKUSEIS_VANA_VERSIOON",e.DO_DOKUSEIS_LOOBUTUD="DO_DOKUSEIS_LOOBUTUD",e.DO_DOKUSEIS_ALLKIRJASTATUD="DO_DOKUSEIS_ALLKIRJASTATUD",e.DO_DOKUSEIS_MENETLETUD="DO_DOKUSEIS_MENETLETUD",e.DO_DOKUSEIS_LUBATUD="DO_DOKUSEIS_LUBATUD",e.DO_DOKUSEIS_LUB_TEAV="DO_DOKUSEIS_LUB_TEAV",e.DO_DOKUSEIS_KEELDUTUD="DO_DOKUSEIS_KEELDUTUD",e.DO_DOKUSEIS_TEAVITATUD="DO_DOKUSEIS_TEAVITATUD",e.DO_DOKUSEIS_REG_KANTUD="DO_DOKUSEIS_REG_KANTUD",e.DO_DOKUSEIS_ANTUD="DO_DOKUSEIS_ANTUD",e.DO_DOKUSEIS_KEHTIV="DO_DOKUSEIS_KEHTIV",e.DO_DOKUSEIS_TUNNIST_KEHTETUKS="DO_DOKUSEIS_TUNNIST_KEHTETUKS",e.DO_DOKUSEIS_KOOSK_RINGIL="DO_DOKUSEIS_KOOSK_RINGIL",e.DO_DOKUSEIS_EM_KINNITATUD_AKTUAL="DO_DOKUSEIS_EM_KINNITATUD_AKTUAL",e}({});const wn=[{code:Un.DO_DOKUSEIS_ESITATUD,value:"Esitatud"},{code:Un.DO_DOKUSEIS_KOOSTAMISEL,value:"Koostamisel"},{code:Un.DO_DOKUSEIS_MENETLUSES,value:"Menetluses"},{code:Un.DO_DOKUSEIS_MUUTMISEL,value:"Muutmisel"},{code:Un.DO_DOKUSEIS_TAIENDAMISEL,value:"Täiendamisel"}],jn=[{code:Un.DO_DOKUSEIS_KEHTETU,value:"Kehtetu"},{code:Un.DO_DOKUSEIS_REG_KANTUD,value:"Registrisse kantud"},{code:Un.DO_DOKUSEIS_TYHISTATUD,value:"Tühistatud"},{code:Un.DO_DOKUSEIS_LOOBUTUD,value:"Tagasi võetud"}];function Cn(e){const t=(e,t)=>({name:e,type:t});switch(Un[e]){case Un.DO_DOKUSEIS_ESITATUD:return t("Esitatud",oe.INFO);case Un.DO_DOKUSEIS_KEHTETU:return t("Kehtetu",oe.DEFAULT);case Un.DO_DOKUSEIS_KOOSTAMISEL:case Un.DO_DOKUSEIS_EELNOU_AKTIIVNE:return t("Koostamisel",oe.INFO);case Un.DO_DOKUSEIS_ALLKIRJASTAMISEL:return t("Allkirjastamisel",oe.INFO);case Un.DO_DOKUSEIS_MENETLUSES:return t("Menetluses",oe.INFO);case Un.DO_DOKUSEIS_MUUTMISEL:return t("Muutmisel",oe.INFO);case Un.DO_DOKUSEIS_TAIENDAMISEL:return t("Täiendamisel",oe.WARNING);case Un.DO_DOKUSEIS_TYHISTATUD:return t("Tühistatud",oe.DEFAULT);case Un.DO_DOKUSEIS_VANA_VERSIOON:return t("Vana versioon",oe.DEFAULT);case Un.DO_DOKUSEIS_LOOBUTUD:return t("Tagasi võetud",oe.DEFAULT);case Un.DO_DOKUSEIS_ALLKIRJASTATUD:return t("Allkirjastatud",oe.INFO);case Un.DO_DOKUSEIS_MENETLETUD:return t("Menetletud",oe.SUCCESS);case Un.DO_DOKUSEIS_LUBATUD:return t("Lubatud/Teavitatud",oe.SUCCESS);case Un.DO_DOKUSEIS_LUB_TEAV:return t("Lubatud/Teavitatud",oe.WARNING);case Un.DO_DOKUSEIS_KEELDUTUD:return t("Keelatud/Tagasi lükatud",oe.DANGER);case Un.DO_DOKUSEIS_TEAVITATUD:return t("Teavitatud",oe.SUCCESS);case Un.DO_DOKUSEIS_REG_KANTUD:return t("Registrisse kantud",oe.SUCCESS);case Un.DO_DOKUSEIS_ANTUD:return t("Antud",oe.SUCCESS);case Un.DO_DOKUSEIS_EM_KINNITATUD_AKTUAL:case Un.DO_DOKUSEIS_KEHTIV:return t("Kehtiv",oe.SUCCESS);case Un.DO_DOKUSEIS_TUNNIST_KEHTETUKS:return t("Tunnistatud kehtetuks",oe.DEFAULT);case Un.DO_DOKUSEIS_KOOSK_RINGIL:return t("Kooskõlastusringil",oe.INFO);default:return t(e,oe.DEFAULT)}}function Ln(e){let t=[];e===W?t=wn:e===q&&(t=jn);return function(e){return e.map((e=>({id:e.code+"",label:e.value,level:2,children:[],selectable:!0,value:!1})))}(t.sort(((e,t)=>e.value.localeCompare(t.value))))}function Pn(e,t){if(t.documentTypes.length>0&&(e=e.filter((e=>void 0!==e.doty&&t.documentTypes.includes(e.doty)))),t.ehrCode.length>0&&(e=e.filter((e=>{var n;return null===(n=e.ehrCode)||void 0===n?void 0:n.some((e=>{var n;return null!==(n=e.startsWith(t.ehrCode.trim()))&&void 0!==n&&n}))}))),t.buildingName.length>0&&(e=e.filter((e=>{var n;return null===(n=e.buildingName)||void 0===n?void 0:n.some((e=>{var n,s;return null!==(n=null==e||null===(s=e.toLocaleLowerCase())||void 0===s?void 0:s.includes(t.buildingName.toLocaleLowerCase()))&&void 0!==n&&n}))}))),t.wordInAddress.length>0&&(e=e.filter((e=>{var n,s;return null!==(n=null===(s=e.buildingAddress)||void 0===s?void 0:s.some((e=>null==e?void 0:e.toLocaleLowerCase().includes(t.wordInAddress.trim().toLocaleLowerCase()))))&&void 0!==n&&n}))),t.documentNumber.length>0&&(e=e.filter((e=>{var n,s;return null!==(n=null===(s=e.docNr)||void 0===s?void 0:s.includes(t.documentNumber.trim()))&&void 0!==n&&n}))),t.documentStates.length>0&&(e=e.filter((e=>{return(n=e.stateCode)&&[Un.DO_DOKUSEIS_MENETLETUD,Un.DO_DOKUSEIS_LUBATUD,Un.DO_DOKUSEIS_LUB_TEAV,Un.DO_DOKUSEIS_KEELDUTUD,Un.DO_DOKUSEIS_TEAVITATUD,Un.DO_DOKUSEIS_REG_KANTUD,Un.DO_DOKUSEIS_ANTUD,Un.DO_DOKUSEIS_KEHTIV].includes(n)?t.documentStates.includes(Un.DO_DOKUSEIS_REG_KANTUD):e.stateCode&&t.documentStates.includes(e.stateCode);var n}))),t.institutionUsers.length>0&&(e=e.filter((e=>(void 0!==e.presenter||null!==e.presenter)&&t.institutionUsers.find((t=>{var n;return!0===(null===(n=e.connectedPersonId)||void 0===n?void 0:n.includes(t))}))))),t.proceedingNumber.length>0&&(e=e.filter((e=>{var n,s;return null!==(n=null===(s=e.proceedingNr)||void 0===s?void 0:s.includes(t.proceedingNumber.trim()))&&void 0!==n&&n}))),t.institutions.length>0&&(e=e.filter((e=>void 0!==e.institutionId&&t.institutions.includes(e.institutionId)))),!0===t.proceedingMissing&&(e=e.filter((e=>null===e.proceedingNr||void 0===e.proceedingNr))),t.documentDate.from.length>0&&0===t.documentDate.to.length){const n=new Date(t.documentDate.from).getTime();e=e.filter((e=>new Date(In()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n))}if(t.documentDate.to.length>0&&0===t.documentDate.from.length){const n=new Date(t.documentDate.to).getTime();e=e.filter((e=>new Date(In()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=n))}if(t.documentDate.from.length>0&&t.documentDate.to.length>0){const n=new Date(t.documentDate.from).getTime(),s=new Date(t.documentDate.to).getTime();e=e.filter((e=>new Date(In()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n&&new Date(In()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=s))}return e}function Rn(e){return null!=e}function Kn(e,t){return Object.keys(e).find((n=>e[n]===Object.values(e).find((e=>e.includes(t)))))}function Fn(e){var t,n,s,o;const[i,r]=(0,G.useState)(!1);function a(){r(!i)}const l=(0,an.jsxs)("div",{children:[(0,an.jsx)("h4",{children:(0,an.jsx)(B.FormattedMessage,{defaultMessage:"Kas olete kindel, et soovite selle rea kustutada?",id:null!==(t=e.titleText)&&void 0!==t?t:"common.confirmation.modal.header"})}),(0,an.jsx)("p",{children:(0,an.jsx)(B.FormattedMessage,{defaultMessage:"Kustutatud ridu ei ole võimalik hiljem taastada",id:null!==(n=e.messageText)&&void 0!==n?n:"common.confirmation.modal.description"})}),(0,an.jsxs)("div",{children:[(0,an.jsx)(H.Button,{colourScheme:"light",squared:!0,type:"reset",children:(0,an.jsx)(B.FormattedMessage,{defaultMessage:"Loobun",id:"common.confirmation.modal.no"})}),(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"danger",onClick:()=>(e.onConfirm(),void a()),squared:!0,type:"submit",children:(0,an.jsx)(B.FormattedMessage,{defaultMessage:"Kustutan",id:"common.confirmation.modal.yes"})})]})]});return(0,an.jsx)(H.ControlledPopover,{delegateFocusOnOpen:null===(s=e.delegateFocusOnOpen)||void 0===s||s,className:"popover-confirm",content:e.content||l,open:i,placement:"top-end",theme:"danger",toggle:()=>a(),wrapperClassName:null!==(o=e.wrapperClassName)&&void 0!==o?o:"",children:e.children})}function kn(e){return(0,an.jsx)(Fn,{titleText:e.titleText,messageText:e.messageText,onConfirm:e.onConfirm,children:(0,an.jsx)(H.Icon,{tooltipText:(0,an.jsx)(B.FormattedMessage,{id:"tooltip.delete"}),type:"delete"})})}const Yn=e=>{let{linkName:t,functionCall:n,tooltipText:s}=e;return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(H.Link,{onClick:e=>null==n?void 0:n(e),text:(0,an.jsx)(H.Text,{raw:t})}),(0,an.jsx)(H.Info,{tooltipText:s})]})};var Gn,Vn=new Uint8Array(16);function Bn(){if(!Gn&&!(Gn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gn(Vn)}const Hn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Jn=function(e){return"string"==typeof e&&Hn.test(e)};for(var Wn=[],qn=0;qn<256;++qn)Wn.push((qn+256).toString(16).substr(1));const $n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Wn[e[t+0]]+Wn[e[t+1]]+Wn[e[t+2]]+Wn[e[t+3]]+"-"+Wn[e[t+4]]+Wn[e[t+5]]+"-"+Wn[e[t+6]]+Wn[e[t+7]]+"-"+Wn[e[t+8]]+Wn[e[t+9]]+"-"+Wn[e[t+10]]+Wn[e[t+11]]+Wn[e[t+12]]+Wn[e[t+13]]+Wn[e[t+14]]+Wn[e[t+15]]).toLowerCase();if(!Jn(n))throw TypeError("Stringified UUID is invalid");return n};const zn=function(e,t,n){var s=(e=e||{}).random||(e.rng||Bn)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=s[o];return t}return $n(s)},Xn=e=>{let{notificationStyle:t,header:n,link:s,body:o,onCloseNotification:i,isNotClosable:r,customBody:a}=e;const l=(0,B.useIntl)(),d=null!=a?a:(0,an.jsxs)("div",{children:[(0,an.jsx)("h3",{className:"alert-heading",children:n}),(0,an.jsx)("p",{className:"alert-body mb-0",children:o}),s&&(0,an.jsx)("div",{className:"mx-2",children:(0,an.jsx)(H.Link,{onClick:s.onClick,text:l.formatMessage({id:s.text})})})]});return r?(0,an.jsx)("div",{id:"danger-toast",className:`alert ${t}`,children:d}):(0,an.jsxs)("div",{id:"danger-toast",className:`alert alert-toast-box ${t}`,children:[(0,an.jsx)("a",{className:"toast-close icon-close",role:"button","data-toggle":"tooltip","data-tooltip-placement":"bottom","data-tooltip-class":"tooltip-icon","data-tooltip-trigger":"hover focus","data-tooltip-title":"Sulgen","aria-label":"Sulgen","data-animation":"false",onClick:i}),d]})};let Qn=function(e){return e.Danger="danger",e.Warning="warning",e.Info="info",e.Success="success",e}({});const Zn=()=>{const e=(0,B.useIntl)(),t=(0,Sn.useDispatch)(),n=(0,Sn.useSelector)(P),[s,o]=(0,G.useState)();(0,G.useEffect)((()=>{n&&o(n)}),[n]);const i=t=>{if(t)return"string"==typeof t?e.formatMessage({id:t}):t.values?e.formatMessage({id:t.id},{...t.values}):e.formatMessage({id:t.id})};return(0,an.jsx)(an.Fragment,{children:(0,an.jsx)("div",{className:"notification-alert-box",children:(0,an.jsx)("ul",{children:(null==s?void 0:s.length)>0&&s.map((e=>{var n;return(0,an.jsx)("li",{children:e.theme&&(0,an.jsx)(Xn,{notificationStyle:"alert-"+e.theme+" show",header:i(null!==(n=e.messageCode)&&void 0!==n?n:e.header),body:e.messageCode?void 0:i(e.body),onCloseNotification:()=>{return n=e.id,void t(F(n));var n},link:e.link})},e.id)}))})})})},es=(0,o.createAsyncThunk)("globalUI/handleNotification",(async(e,t)=>{let{dispatch:n,getState:s}=t;const o=s().myViewsPage.notifications.notices,i=zn(),r={...e,id:i};n(K([...o,r])),e.theme!==Qn.Danger&&setTimeout((()=>{n(F(i))}),7e3)})),ts=(0,o.createAsyncThunk)("document/createDocument",(async(e,t)=>{let{addEntityDto:n,successCallback:s}=e,{dispatch:o}=t;try{const e=await rn.documentApiService.createDocument(n.documentType,n);return s&&s(e.data),o(R()),e.data}catch(e){o(es({header:"request.error.create_document.title",body:"request.error.create_document.message",theme:Qn.Danger}))}})),ns=e=>{var t;let{doty:n,documentId:s,linkGen:o,userInfo:i}=e;const r=(0,Sn.useDispatch)(),[a,l]=(0,G.useState)(!1),d=(null==i||null===(t=i.activeRole)||void 0===t?void 0:t.businessType)===le.TJA,c=(e,t)=>{if(!t)return;r(ts({addEntityDto:{documentType:t,baseDocumentId:s},successCallback:t=>((e,t)=>{const n=`${e.documentTypeWithYear}/${e.documentNumber}`;e&&o(!0,t,ae,n)})(t,e)}))};return(0,an.jsx)(H.ControlledPopover,{content:(()=>{const e=n,t=Te[e],s=Ee[e];return(0,an.jsxs)("div",{children:[(0,an.jsxs)("ul",{children:[(0,an.jsx)("li",{className:"d-flex justify-content-between",children:(0,an.jsx)(Yn,{linkName:"my_documents.document_table.more_actions.request_document_cancellation",tooltipText:`my_documents.document_table.more_actions.request_document_cancellation.tooltip.${e}`,functionCall:e=>{c(e,s),l(!a)}})}),d&&(0,an.jsx)("li",{className:"d-flex justify-content-between",children:(0,an.jsx)(Yn,{linkName:"my_documents.document_table.more_actions.cancel_document",tooltipText:`my_documents.document_table.more_actions.cancel_document.tooltip.${e}`,functionCall:e=>{c(e,t),l(!a)}})})]}),(0,an.jsx)(H.Button,{onClick:()=>{l(!1)},squared:!0,colourScheme:"light",children:(0,an.jsx)(B.FormattedMessage,{id:"button.cancel"})})]})})(),open:a,placement:"bottom-end",toggle:()=>l(!a),children:(0,an.jsx)("div",{className:"pl-2",children:(0,an.jsx)(H.Icon,{tooltipText:(0,an.jsx)(B.FormattedMessage,{id:"tooltip.more_actions"}),type:"more"})})})},ss=e=>{var t;let{linkGen:n,userInfo:s,documentType:o,onAllUsersChecked:i,isAllUsersChecked:r,filter:a,onDocumentDelete:l,fileApi:d,hidePresenter:c}=e;const u=(0,B.useIntl)(),[p,h]=(0,G.useState)({offset:0,limit:10}),[m,g]=(0,G.useState)([]),[S,f]=(0,G.useState)({column:0,direction:Dn}),[I,T]=(0,G.useState)(!1),[E,_]=(0,G.useState)(!1),[v,y]=(0,G.useState)(!1),b=(0,Sn.useSelector)((e=>e.myViewsPage.myDocuments.workingDocuments)),D=(0,Sn.useSelector)((e=>e.myViewsPage.myDocuments.signingDocuments)),x=(0,Sn.useSelector)((e=>e.myViewsPage.myDocuments.finishedDocuments)),M=(0,Sn.useSelector)((e=>e.myViewsPage.myProceedings.incomingDocuments)),N=(null===(t=s.activeRole)||void 0===t?void 0:t.businessType)!==le.A;(0,G.useEffect)((()=>{b&&o===W&&(Object.keys(a).length>0?(g(Pn(b,a)),h({offset:0,limit:10})):g(b))}),[b,a]),(0,G.useEffect)((()=>{D&&o===J&&(Object.keys(a).length>0?(g(Pn(D,a)),h({offset:0,limit:10})):g(D))}),[D,a]),(0,G.useEffect)((()=>{x&&o===q&&(Object.keys(a).length>0?(g(Pn(x,a)),h({offset:0,limit:10})):g(x))}),[x,a]),(0,G.useEffect)((()=>{M&&o===$&&(Object.keys(a).length>0?(g(Pn(M,a)),h({offset:0,limit:10})):g(M))}),[M,a]);const O=["my_documents.doc_date","my_documents.reg_date","my_documents.doc_nr","my_documents.document_type","my_documents.building_name","my_documents.ehr_code","my_documents.building_address","my_documents.state","my_documents.proceeding_nr"];c||O.push("my_documents.presenter");const A=[e=>Rn(e.docDate)?new Date(In()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>o===$?Rn(e.deadlineDate)?new Date(In()(e.deadlineDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER:Rn(e.regDate)?new Date(In()(e.regDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.docNr)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""},e=>e.buildingName&&Rn(e.buildingName[0])?e.buildingName[0]:"",e=>e.ehrCode&&Rn(e.ehrCode[0])?e.ehrCode[0]:"",e=>e.buildingAddress&&Rn(e.buildingAddress[0])?e.buildingAddress[0]:"",e=>{var t;return null!==(t=e.state)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},e=>e.presenter?e.presenter.join(","):""];const U=e=>{var t;const i=[(0,an.jsx)(An,{fileApi:d,fileId:e.generatedFileId,docNr:null!==(t=e.docNr)&&void 0!==t?t:""},e.docId+"download")];return o===W&&e.stateCode===Un.DO_DOKUSEIS_KOOSTAMISEL?i.push((0,an.jsx)(kn,{onConfirm:()=>{l(e.docNr)},titleText:"my_documents.delete_document_confirmation.modal.header",messageText:"my_documents.delete_document_confirmation.modal.message"},e.docNr)):o===q&&e.doty&&Ie.includes(e.doty)&&![Un.DO_DOKUSEIS_TYHISTATUD,Un.DO_DOKUSEIS_TUNNIST_KEHTETUKS].includes(e.stateCode)&&i.push((0,an.jsx)(ns,{doty:e.doty,documentId:e.docId,linkGen:n,userInfo:s})),i};return(0,an.jsxs)(H.Section,{form:!0,children:[m&&(0,an.jsx)(H.CollapseTable,{content:m.slice(p.offset,p.offset+p.limit).map((e=>{var t,s,i,r,a,l,d;return(0,an.jsx)(H.CollapseTableRow,{fields:[e.docDate,o===$?In()(e.deadlineDate,"DD.MM.YYYY").valueOf()<In()().valueOf()?(0,an.jsx)("div",{className:"red-text",children:null===(t=e.deadlineDate)||void 0===t?void 0:t.toString()}):e.deadlineDate:e.regDate,(0,an.jsx)(H.Tooltip,{content:(0,an.jsx)(H.Text,{raw:"my_documents.tooltip.open_document"}),placement:"bottom",theme:"dark",children:(0,an.jsx)(H.Link,{onClick:t=>{n(!0,t,ae,e.docNr)},text:e.docNr,href:n(!1,void 0,ae,e.docNr)})},e.docNr),e.documentType,e.buildingName?(0,an.jsx)("div",{children:v?(0,an.jsxs)("div",{children:[e.buildingName.map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[e,";",(0,an.jsx)("br",{})]},t))),e.buildingName.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),y(!v)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.link.view_less_building_names"})})]}):1===e.buildingName.length?e.buildingName:(0,an.jsxs)("div",{children:[null===(s=e.buildingName)||void 0===s?void 0:s.slice(0,4).map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[e,";",(0,an.jsx)("br",{})]},t))),null===(i=e.buildingName)||void 0===i?void 0:i.slice(4,5),e.buildingName.length>5?" ...":"",e.buildingName.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),y(!v)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.link.view_all_building_names"})})})]})}):"",e.ehrCode?(0,an.jsx)("div",{children:E?(0,an.jsxs)("div",{children:[e.ehrCode.map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[(0,an.jsx)(un,{linkName:e,tooltipText:"my_documents.tooltip.open_building",functionCall:t=>{n(!0,t,ie,e)},href:n(!1,void 0,ie,e)}),(0,an.jsx)("br",{})]},t))),e.ehrCode.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),_(!E)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.link.view_less_ehrCodes"})})]}):(0,an.jsxs)("div",{children:[null===(r=e.ehrCode)||void 0===r?void 0:r.slice(0,4).map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[(0,an.jsx)(un,{linkName:e,tooltipText:"my_documents.tooltip.open_building",functionCall:t=>{n(!0,t,ie,e)},href:n(!1,void 0,ie,e)}),(0,an.jsx)("br",{})]},t))),null===(a=e.ehrCode)||void 0===a?void 0:a.slice(4,5).map((e=>(0,an.jsx)(un,{linkName:e,tooltipText:"my_documents.tooltip.open_building",functionCall:t=>{n(!0,t,ie,e)},href:n(!1,void 0,ie,e)}))),e.ehrCode.length>5?" ...":"",e.ehrCode.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),_(!E)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.link.view_all_ehrCodes"})})})]})}):"",e.buildingAddress?(0,an.jsx)("div",{children:I?(0,an.jsxs)("div",{children:[e.buildingAddress.map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[e,";",(0,an.jsx)("br",{})]},t))),e.buildingAddress.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),T(!I)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.link.view_less_addresses"})})]}):1===e.buildingAddress.length?e.buildingAddress:(0,an.jsxs)("div",{children:[null===(l=e.buildingAddress)||void 0===l?void 0:l.slice(0,4).map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[e,";",(0,an.jsx)("br",{})]},t))),null===(d=e.buildingAddress)||void 0===d?void 0:d.slice(4,5),e.buildingAddress.length>5?" ...":"",e.buildingAddress.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),T(!I)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.link.view_all_addresses"})})})]})}):"",e.stateCode?(0,an.jsx)(H.Status,{type:Cn(e.stateCode).type,children:Cn(e.stateCode).name}):"",o===J?(0,an.jsx)(H.Tooltip,{content:(0,an.jsx)(H.Text,{raw:"my_documents.tooltip.open_proceeding"}),placement:"bottom",theme:"dark",children:(0,an.jsx)(H.Link,{onClick:t=>{n(!0,t,re,e.proceedingNr)},text:e.proceedingNr,href:n(!1,void 0,re,e.proceedingNr)})},e.proceedingNr):e.proceedingNr,e.presenter?e.presenter.map(((t,n)=>(0,an.jsxs)("div",{children:[t,n!==e.presenter.length-1?(0,an.jsx)("span",{children:", "}):""]}))):""],tools:U(e),editable:!0},e.docId)})),headers:function(){const e=[...O];return e[1]="my_documents.deadline",(o===$?e:O).map(((e,t)=>(0,an.jsxs)("div",{children:[(0,an.jsx)("a",{className:"link-gray",style:{paddingRight:"2px"},onClick:()=>{const e=Nn(t,S);f(e),e.direction!==Dn&&g(bn(m,A[t],e.direction))},children:S.column===t?(0,an.jsx)(On,{sortDirection:S.direction}):(0,an.jsx)(On,{sortDirection:Dn})}),u.formatMessage({id:e})]})))}(),paginationEnabled:!0,pager:{offset:p.offset,limit:p.limit,total:m.length},onPaginationReload:h,editable:!0}),(0,an.jsx)(H.Row,{children:N&&o!==$?(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Checkbox,{name:"checkbox",onChange:e=>i(e),text:(0,an.jsx)(H.Text,{raw:"my_documents.view_all_institution_documents"}),checked:r})}):(0,an.jsx)(H.Col,{})})]})},os=require("reactstrap");function is(e,t,n,s,o){return s?(0,an.jsx)(H.FieldWrapper,{labelCol:o,component:(0,an.jsxs)(os.Row,{className:"w-100 px-0 mx-0",children:[(0,an.jsx)(os.Col,{xs:"auto",md:1.5,className:"pl-0 px-0",children:(0,an.jsx)(H.Checkbox,{"data-testid":"checkbox",info:{content:s,placement:"top-start"},name:"checkbox",text:"",checked:e})}),(0,an.jsx)(os.Col,{className:"px-0",children:(0,an.jsx)(H.Text,{raw:(0,an.jsx)(B.FormattedMessage,{id:n})})})]}),label:(0,an.jsx)(B.FormattedMessage,{id:"label.empty"})}):(0,an.jsx)(H.FieldWrapper,{labelCol:o,component:(0,an.jsx)(H.Checkbox,{"data-testid":"checkbox",name:"checkbox",onChange:e=>t(e),text:(0,an.jsx)(H.Text,{raw:(0,an.jsx)(B.FormattedMessage,{id:n})}),checked:e}),label:(0,an.jsx)(B.FormattedMessage,{id:"label.empty"})})}const rs=["110","11002","111","11119","11129","11139","11149","11158","11159","11191","11199","112","11201","11202","11203","11204","11205","11206","11211","11212","11213","11214","11219","11229","11231","11232","11233","11234","11239","11241","11249","11251","11271","11272","11273","11274","11275","11291","11299","113","11301","11302","11303","11304","11305","11306","11311","11312","11313","11314","11318","11319","11328","11329","11331","11332","11333","11334","11338","11339","11341","11348","11349","11351","11359","11371","11381","11391","11399","114","11411","11412","11413","11430","115","11511","11512","11513","11514","11515","11516","11518","11521","11522","11523","11524","11525","11526","11527","11531","11542","11551","11561","11563","11564","11565","11566","11567","11569","11571","11573","11574","11576","11577","11578","11581","11582","11584","11601","118","11802","11811","11821","11831","120","121","12119","12129","12139","12149","12158","12159","12199","122","12211","12212","12213","12214","12219","12229","12231","12232","12233","12234","12239","12241","12249","12251","12271","12291","12299","123","12311","12312","12313","12314","12318","12319","12328","12329","12331","12332","12333","12334","12338","12339","12341","12348","12349","12351","12359","12371","12381","12391","12399","127","12711","12731","12741","12742","12743","12744","12745","12899","129","12902","12911","12912","12921","12922","12931","12932","12942","12972","12973","12971","12974","12975","12976","12977","12978","12994","12999","130","13001","13002","13003","13009","131","13101","900","91511","91561","92731","92741","92743","92744","92745","11583"];function as(e){return function(e){let t={id:"0",label:"00000",parentId:"0",level:1,value:!1,selectable:!1,children:[]};for(let n of e){let e=n.id.toString(),s=t;for(let t=1;t<=n.id;t++)if(s.children){let n=s.children.find((n=>n.id.toString()===e.slice(0,t)));n&&(s=n)}s.children&&s.children.push({id:e+"",parentId:s.id,label:n.name+(null!==n.validTo&&In()(n.validTo).isBefore(In()(new Date))?" (kuni "+In()(n.validTo).format("DD.MM.YYYY")+")":""),level:s.level+1,children:[],selectable:!0,value:!1})}return t.children?t.children:[]}(e.filter((e=>rs.includes(e.id.toString()))).sort(((e,t)=>e.id-t.id)))}function ls(e){return function(e){return e.map((e=>({id:e.id+"",label:e.firstName+" "+e.lastName+" ("+e.personalCode+")",level:2,children:[],selectable:!0,value:!1})))}(e.sort(((e,t)=>e.firstName.localeCompare(t.firstName))))}function ds(e){return function(e){return e.map((e=>({id:e.id+"",label:e.regName,level:2,children:[],selectable:!0,value:!1})))}(e.sort(((e,t)=>e.regName.localeCompare(t.regName))))}function cs(e){var t,n,s,o;return(0,an.jsxs)("div",{className:"d-flex align-items-center",children:[(0,an.jsx)("div",{className:"range--from",style:{flexGrow:1},children:(0,an.jsx)(H.DatePicker,{disabled:null!==(t=e.disabled)&&void 0!==t&&t,maxLength:e.maxLength,onBlur:(t,n)=>e.onBlur?e.onBlur(t,n):null,onChange:(t,n)=>function(t,n){const s={...e.value};s.from=t,e.onChange(s,n)}(t,n),onFocus:(t,n)=>e.onFocus?e.onFocus(t,n):null,value:null===(n=e.value)||void 0===n?void 0:n.from})}),(0,an.jsx)("span",{className:"px-1",children:"—"}),(0,an.jsx)("div",{className:"range--to",style:{flexGrow:1},children:(0,an.jsx)(H.DatePicker,{disabled:null!==(s=e.disabled)&&void 0!==s&&s,maxLength:e.maxLength,onBlur:(t,n)=>e.onBlur?e.onBlur(t,n):null,onChange:(t,n)=>function(t,n){const s={...e.value};s.to=t,e.onChange(s,n)}(t,n),onFocus:(t,n)=>e.onFocus?e.onFocus(t,n):null,value:null===(o=e.value)||void 0===o?void 0:o.to})})]})}const us=e=>{const t=(0,B.useIntl)(),n=/^[\\s0-9]{0,9}$/,s=/^([\\s0-9]{5}:[\\s0-9]{3}:[\\s0-9]{1,4}|[\\s0-9]{5}:[\\s0-9]{1,3}|[\\s0-9]{1,5})$/,o={documentTypes:[],ehrCode:"",buildingName:"",wordInAddress:"",documentNumber:"",cadastralNumber:"",documentStates:[],institutionUsers:[],proceedingNumber:"",institutions:[],proceedingMissing:!1,documentDate:{from:"",to:""}},[i,r]=(0,G.useState)(o);(0,G.useEffect)((()=>{Object.keys(e.filterState).length>0&&r(e.filterState)}),[e.documentType]);const[a,l]=(0,G.useState)(!0),[d,c]=(0,G.useState)(!0),[u,p]=(0,G.useState)(""),[h,m]=(0,G.useState)([]),[g,S]=(0,G.useState)([]),[f,I]=(0,G.useState)([]),[T,E]=(0,G.useState)(Ln(e.documentType)),[_,v]=(0,G.useState)([]),y=(0,Sn.useSelector)((e=>e.myViewsPage.filter.documentTypes)),b=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutionUsers)),D=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutions));function x(e){return n.test(e)}function M(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],i[t]=n,r((e=>({...e})))}function N(e,t){var n;i[t]=e,"ehrCode"===t&&x(e)?l(!0):"cadastralNumber"===t&&(0===(n=e).length||s.test(n))&&c(!0),r((e=>({...e})))}(0,G.useEffect)((()=>{E(Ln(e.documentType))}),[e.documentType]),(0,G.useEffect)((()=>{if(y){const e=as(y);m(e)}if(b&&e.isKov){const e=ls(b?[...b]:[]);I(e)}if(D){const e=ds([...D]);S(e)}}),[y,b,D]);return(0,an.jsxs)(H.Form,{onSubmit:()=>e.onSubmit(i),children:[(0,an.jsxs)(H.Row,{className:"align-items-start",children:[(0,an.jsxs)(H.Col,{sm:10,className:"mx-0 px-0",children:[(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:h,onSelect:e=>M(e,"documentTypes"),allSelection:!0,onRemoveItem:e=>M(e,"documentTypes"),value:i.documentTypes,selectedOptions:_}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.document_type"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.document_type",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>N(e,"buildingName"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.buildingName}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.building_name"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.building_name",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>N(e,"documentNumber"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.documentNumber}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.document_number"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.document_number",placement:"top-start"}}),e.documentType!==$&&e.documentType!==J&&(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:T,onSelect:e=>M(e,"documentStates"),allSelection:!0,onRemoveItem:e=>M(e,"documentStates"),value:i.documentStates,selectedOptions:_}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.document_state"}),labelCol:{sm:20,md:8,lg:8}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>N(e,"proceedingNumber"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.proceedingNumber}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.proceeding_number"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.proceeding_number",placement:"top-start"}}),is(i.proceedingMissing,(function(e){r((t=>({...t,proceedingMissing:e})))}),"my_documents.filter.label.proceeding_missing","my_documents.filter.tooltip.proceeding_missing"),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(cs,{onChange:e=>(e=>{""!==e.from&&!In()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!In()(e.to,"YYYY-MM-DD",!0).isValid()?p(t.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?p(t.formatMessage({id:"filter.invalid_date_range"})):p(""),r((t=>({...t,documentDate:e})))})(e),value:i.documentDate}),errorMessage:u.length>0?u:null,label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.document_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.document_date",placement:"top-start"}})]}),(0,an.jsxs)(H.Col,{sm:10,className:"mx-0 px-0",children:[(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>N(e,"ehrCode"),onBlur:e=>l(x(e.trim())),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.ehrCode}),errorMessage:!a&&(0,an.jsx)(H.Text,{raw:"filter.invalid_building_code"}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.ehrCode"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.ehrCode",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>N(e,"wordInAddress"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.wordInAddress}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.word_in_address"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.word_in_address",placement:"top-start"}}),e.documentType!==$&&e.documentType!==J&&e.isKov&&(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:f,onSelect:e=>M(e,"institutionUsers"),allSelection:!0,onRemoveItem:e=>M(e,"institutionUsers"),value:i.institutionUsers,selectedOptions:_}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.institution_users"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.institution_users",placement:"top-start"}}),e.documentType!==$&&(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:g,onSelect:e=>M(e,"institutions"),allSelection:!0,onRemoveItem:e=>M(e,"institutions"),value:i.institutions,selectedOptions:_}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.institution"}),labelCol:{sm:20,md:8,lg:8}}),e.isKov&&e.documentType===J&&(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:f,onSelect:e=>M(e,"institutionUsers"),allSelection:!0,onRemoveItem:e=>M(e,"institutionUsers"),value:i.institutionUsers,selectedOptions:_}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.filter.label.institution_users"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.institution_users",placement:"top-start"}})]})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{onClick:()=>(v([]),void r(o)),colourScheme:"light",squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.epmty_fields"})})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!(a&&d),squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.search"})})})]})]})},ps=["11566","11567","11569","11576","11577"],hs=[pe,he,me,ge],ms=e=>{const[t,n]=(0,G.useState)(!1),[s,o]=(0,G.useState)(""),[i,r]=(0,G.useState)(!1),[a,l]=(0,G.useState)([]),d=(0,Sn.useSelector)((e=>e.myViewsPage.myDocuments.allowedDocumentTypesToStart)),c=e=>null==e||Number.isNaN(e)||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length;(0,G.useEffect)((()=>{if(d){const e=d.filter((e=>!ps.includes(e.code)&&!hs.includes(e.code)));l(e.map((e=>({code:e.code,texts:e.value}))))}}),[d]);return(0,an.jsx)(H.ControlledPopover,{maxWidth:900,open:t,content:(0,an.jsx)("div",{style:{width:"600px"},children:(0,an.jsxs)(H.Form,{onSubmit:()=>{r(!0)},children:[(0,an.jsx)("h2",{children:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.popover.title.composing_new_document"})}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Select,{filterable:!0,placeholder:"placeholder.choose",name:"role",onChange:e=>o(e),options:a,value:s}),errorMessage:i&&c(s)&&(0,an.jsx)(H.Text,{raw:"common.select.required"}),label:(0,an.jsx)(H.Text,{raw:"my_documents.popover.label.new_document_type"}),name:"documentType",info:{content:"my_documents.popover.tooltip.document_type"}}),(0,an.jsxs)("div",{className:"d-flex justify-content-between mt-2",children:[(0,an.jsx)(H.Button,{colourScheme:"light",onClick:()=>{r(!1),o("")},children:(0,an.jsx)(B.FormattedMessage,{id:"button.cancel"})}),(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",onClick:t=>{c(s)||(e.linkGen(!0,t,"DOCUMENT","",{doty:s}),n(!1))},children:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.popover.button.compose_new_document"})})]})]})}),placement:"bottom-end",toggle:()=>{n(!t)},children:(0,an.jsx)(H.Button,{withPlus:!0,colourScheme:"info",onClick:()=>{n(!t)},children:(0,an.jsx)(B.FormattedMessage,{id:"my_documents.button.start_new_document"})})})},gs=["11273","11272","11274","11275","11002","11051","11201","11271","11301","11371","11412","11413","11430","11522","11525","11527","11542","11566","11567","11569","11571","11576","11577","11581","11582","11584","11831","12731","12743","12744","12745","12899","12922","12932","12942","12973","12975","12976","12977","12978","12999","11526","11601","11583"],Ss=["11273","11272","11274","11275","11002","11051","11201","11271","11301","11371","11412","11413","11430","11522","11525","11527","11542","11566","11567","11569","11571","11573","11574","11576","11577","11581","11582","11584","11831","12731","12743","12744","12745","12899","12922","12932","12942","12951","12952","12953","12973","12975","12976","12977","12978","12999","11526","11601","11583"],fs=["11273","11272","11582","11525","11271","11201","11301","11371","11002","11581","12271","12371","12921","12931","12995","12996","12902","11802","12999","12922","12932","12942","12899","11526","12972","12973"],Is=e=>{var t,n,s,o,i,r,c;let{linkGen:u,userInfo:p}=e;const I=(0,Sn.useDispatch)(),[T,E]=(0,G.useState)({signingDocs:!1,workingDocs:!1,finishedDocs:!1}),[_,v]=(0,G.useState)(!1),[y,b]=(0,G.useState)(!0),[D,x]=(0,G.useState)(!0),[M,N]=(0,G.useState)([]),[O,A]=(0,G.useState)([]),[U,w]=(0,G.useState)([]),[j,C]=(0,G.useState)({}),[L,P]=(0,G.useState)({}),[R,K]=(0,G.useState)({}),F="A"!==(null===(t=p.activeRole)||void 0===t?void 0:t.businessType);const k={userId:null===(n=p.activeRole)||void 0===n?void 0:n.userId,personId:null===(s=p.activeRole)||void 0===s?void 0:s.businessId,dotys:gs,states:[Un.DO_DOKUSEIS_ESITATUD,Un.DO_DOKUSEIS_KOOSTAMISEL,Un.DO_DOKUSEIS_EELNOU_AKTIIVNE,Un.DO_DOKUSEIS_ALLKIRJASTAMISEL,Un.DO_DOKUSEIS_MENETLUSES,Un.DO_DOKUSEIS_TAIENDAMISEL,Un.DO_DOKUSEIS_MUUTMISEL]},Y={userId:null===(o=p.activeRole)||void 0===o?void 0:o.userId,personId:null===(i=p.activeRole)||void 0===i?void 0:i.businessId,dotys:Ss,states:[Un.DO_DOKUSEIS_KEHTETU,Un.DO_DOKUSEIS_TUNNIST_KEHTETUKS,Un.DO_DOKUSEIS_REG_KANTUD,"DO_DOKUSEIS_TAGASTATUD",Un.DO_DOKUSEIS_KEELDUTUD,Un.DO_DOKUSEIS_TYHISTATUD,Un.DO_DOKUSEIS_LOOBUTUD,Un.DO_DOKUSEIS_ALLKIRJASTATUD,Un.DO_DOKUSEIS_MENETLETUD,Un.DO_DOKUSEIS_LUBATUD,Un.DO_DOKUSEIS_LUB_TEAV,Un.DO_DOKUSEIS_TEAVITATUD,Un.DO_DOKUSEIS_ANTUD,Un.DO_DOKUSEIS_KEHTIV]},V={userId:null===(r=p.activeRole)||void 0===r?void 0:r.userId,personId:null===(c=p.activeRole)||void 0===c?void 0:c.businessId,roles:["DO_DOKU_ISIK_ROLL_ALLAK"],dotys:fs,states:[Un.DO_DOKUSEIS_ALLKIRJASTAMISEL]};return(0,G.useEffect)((()=>{var e,t;rn.classifierApiService.getAllDocumentTypes().then((e=>{I(a(e.data))})).catch((e=>{console.log(e)})),rn.institutionKovEndpointApi.getJurKovPersons().then((e=>{I(d(e.data))})).catch((e=>{console.log(e)})),F&&rn.userApiService.getJurUsers(null!==(e=null===(t=p.activeRole)||void 0===t?void 0:t.businessId)&&void 0!==e?e:0).then((e=>{I(l(e.data))})).catch((e=>{console.log(e)})),rn.documentApiService.getDotysBasedOnUserRights().then((e=>{const t=e.data.filter((e=>"12922"!==e.code&&"11412"!==e.code&&"11413"!==e.code&&"12932"!==e.code&&"11430"!==e.code&&"12942"!==e.code));I(f(t))})).catch((e=>{console.log("Following error occured:",e)}))}),[p]),(0,G.useEffect)((()=>{(()=>{const e=k;T.workingDocs&&(e.userId=void 0),b(!0),rn.myDocumentBaseApiService.findWorkingDocuments1(e).then((e=>{I(h(e.data)),b(!1),A(e.data)})).catch((e=>{console.log("Following error occured:",e),b(!1)}))})()}),[T.workingDocs,p]),(0,G.useEffect)((()=>{!function(){const e=Y;T.finishedDocs&&(e.userId=void 0),x(!0),rn.myDocumentBaseApiService.findWorkingDocuments1(e).then((e=>{I(g(e.data)),x(!1),w(e.data)})).catch((e=>{console.log("Following error occured:",e),x(!1)}))}()}),[T.finishedDocs,p]),(0,G.useEffect)((()=>{!function(){const e=V;T.signingDocs&&(e.userId=void 0),v(!0),rn.myDocumentBaseApiService.findWorkingDocuments1(e).then((e=>{I(m(e.data)),v(!1),N(e.data)})).catch((e=>{console.log("Following error occured:",e),v(!1)}))}()}),[T.signingDocs,p]),(0,an.jsxs)("div",{children:[(0,an.jsx)(Zn,{}),(0,an.jsx)("div",{className:"d-flex justify-content-end mt-2",children:(0,an.jsx)(ms,{linkGen:u})}),F&&(0,an.jsx)(H.Section,{collapsed:!1,title:"my_documents.my_documents_to_sign",showSettings:!0,filterContents:(0,an.jsx)(us,{documentType:J,filterState:j,onSubmit:e=>C(e),isKov:F}),children:_?(0,an.jsx)(H.SectionLoader,{}):0===M.length?(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_documents.signing_documents.no_docs"})}):(0,an.jsx)(ss,{linkGen:u,userInfo:p,documentType:J,onAllUsersChecked:e=>{E({signingDocs:e,workingDocs:T.workingDocs,finishedDocs:T.finishedDocs})},isAllUsersChecked:T.signingDocs,filter:j,fileApi:rn.fileApiService,hidePresenter:!0})}),(0,an.jsx)(H.Section,{collapsed:!1,title:"my_documents.working_documents",showSettings:!0,filterContents:(0,an.jsx)(us,{documentType:W,filterState:L,onSubmit:e=>P(e),isKov:F}),children:y?(0,an.jsx)(H.SectionLoader,{}):0===O.length?(0,an.jsxs)("div",{children:[(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_documents.working_documents.no_docs"})}),F&&(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Link,{text:"my_documents.view_all_institution_documents",onClick:()=>{E({signingDocs:T.signingDocs,workingDocs:!0,finishedDocs:T.finishedDocs})}})}),(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(ms,{linkGen:u})})]}):(0,an.jsx)(ss,{linkGen:u,userInfo:p,documentType:W,onAllUsersChecked:e=>{E({signingDocs:T.signingDocs,workingDocs:e,finishedDocs:T.finishedDocs})},isAllUsersChecked:T.workingDocs,filter:L,onDocumentDelete:e=>function(e){const t=e.slice(0,e.indexOf("/")),n=e.slice(e.indexOf("/")+1);rn.documentApiService.deleteApplicationByNumber(t,n),I(S(e))}(e),fileApi:rn.fileApiService})}),(0,an.jsx)(H.Section,{collapsed:!1,title:"my_documents.finished_documents",showSettings:!0,filterContents:(0,an.jsx)(us,{documentType:q,filterState:R,onSubmit:e=>K(e),isKov:F}),children:D?(0,an.jsx)(H.SectionLoader,{}):0===U.length?(0,an.jsxs)("div",{children:[(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_documents.finished_documents.no_docs"})}),F&&(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Link,{text:"my_documents.view_all_institution_documents",onClick:()=>{E({signingDocs:T.signingDocs,workingDocs:T.workingDocs,finishedDocs:!0})}})}),(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(ms,{linkGen:u})})]}):(0,an.jsx)(ss,{linkGen:u,userInfo:p,documentType:q,onAllUsersChecked:e=>{E({signingDocs:T.signingDocs,workingDocs:T.workingDocs,finishedDocs:e}),x(!0)},isAllUsersChecked:T.finishedDocs,filter:R,fileApi:rn.fileApiService})})]})},Ts={MENSEIS_TAIENDAMISEL:["MENSEIS_TAIENDAMISEL","MENSEIS_ESITATUD_TAPSUST","MENSEIS_MEN_EHITUSL_TAOT_TAPS","MENSEIS_MEN_KASUTUSL_TAOT_TAPS","MENSEIS_MEN_EDASTATUD_MARK_LAHEND"],MENSEIS_ALGATATUD:["MENSEIS_ALGATATUD","MENSEIS_ESITATUD"],MENSEIS_KAIMASOLEV:["MENSEIS_KAIMASOLEV","MENSEIS_MEN","MENSEIS_MEN_KNT_TAOT","MENSEIS_EHITUSTEGEVUS_ALANUD","MENSEIS_EHITUSTEGEVUS_LOPPENUD","MENSEIS_EHITUSTEG_LOPP","MENSEIS_LAMMUTATUD","MENSEIS_MEN_EHITUSL_TAOT","MENSEIS_MEN_KASUTUSL_TAOT","MENSEIS_MEN_LAMMUTUSL_TAOT"],MENSEIS_LOPETATUD:["MENSEIS_LOPETATUD","MENSEIS_MEN_ALLKIRJASTATUD","MENSEIS_MEN_KNT_ANTUD","MENSEIS_MEN_KNT_KEELD","MENSEIS_EHITUSL_KEHTETU","MENSEIS_KASUTUSL_KEHTETU","MENSEIS_KNT_KEHTETU","MENSEIS_MEN_EHITUSL_ANTUD","MENSEIS_MEN_EHITUSL_KEELD","MENSEIS_MEN_KASUTUSL_ANTUD","MENSEIS_MEN_KASUTUSL_KEELD","MENSEIS_MEN_LAMMUTUSL_ANTUD","MENSEIS_MEN_LAMMUTUSL_KEELD","MENSEIS_MEN_PRO_TING_ANTUD","MENSEIS_MEN_TEAVITATUD"],MENSEIS_MUUTMISEL:["MENSEIS_MUUTMISEL","MENSEIS_MEN_TAIENDAB"],MENSEIS_PEATATUD:["MENSEIS_PEATATUD"],MENSEIS_ARHIIVIS:["MENSEIS_ARHIIVIS"]};function Es(e){return Kn(Ts,e)}function _s(e){const t=Es(e);return t?function(e){switch(e){case"MENSEIS_TAIENDAMISEL":return{name:"Algdokument täiendamisel",type:"warning"};case"MENSEIS_ALGATATUD":return{name:"Algatatud",type:"info"};case"MENSEIS_KAIMASOLEV":return{name:"Käimasolev",type:"info"};case"MENSEIS_LOPETATUD":return{name:"Lõpetatud",type:"success"};case"MENSEIS_MUUTMISEL":return{name:"Algdokument muutmisel",type:"info"};case"MENSEIS_PEATATUD":return{name:"Peatatud",type:"warning"};case"MENSEIS_ARHIIVIS":return{name:"Arhiivis",type:"default"};default:return{name:e,type:"default"}}}(t):{name:e,type:"default"}}const vs=[{code:"MENSEIS_TAIENDAMISEL",value:"Algdokument täiendamisel"},{code:"MENSEIS_ALGATATUD",value:"Algatatud"},{code:"MENSEIS_KAIMASOLEV",value:"Käimasolev"},{code:"MENSEIS_LOPETATUD",value:"Lõpetatud"},{code:"MENSEIS_MUUTMISEL",value:"Algdokument muutmisel"},{code:"MENSEIS_PEATATUD",value:"Peatatud"}];function ys(){return vs.map((e=>({id:e.code+"",label:e.value,level:2,children:[],selectable:!0,value:!1})))}function bs(e,t){if(console.log("filterService",t),t.documentTypes.length>0&&(e=e.filter((e=>void 0!==e.doty&&t.documentTypes.includes(e.doty)))),t.ehrCode.length>0&&(e=e.filter((e=>{var n;return null===(n=e.ehrCode)||void 0===n?void 0:n.some((e=>{var n;return null!==(n=e.startsWith(t.ehrCode.trim()))&&void 0!==n&&n}))}))),t.buildingName.length>0&&(e=e.filter((e=>{var n;return null===(n=e.buildingName)||void 0===n?void 0:n.some((e=>{var n,s;return null!==(n=null===(s=e.toLocaleLowerCase())||void 0===s?void 0:s.includes(t.buildingName.toLocaleLowerCase()))&&void 0!==n&&n}))}))),t.wordInAddress.length>0&&(e=e.filter((e=>{var n,s;return null!==(n=null===(s=e.address)||void 0===s?void 0:s.some((e=>e.toLocaleLowerCase().includes(t.wordInAddress.trim().toLocaleLowerCase()))))&&void 0!==n&&n}))),t.proceedingNumber.length>0&&(e=e.filter((e=>{var n,s;return null!==(n=null===(s=e.proceedingNr)||void 0===s?void 0:s.includes(t.proceedingNumber.trim()))&&void 0!==n&&n}))),t.proceedingStates.length>0&&(e=e.filter((e=>void 0!==e.stateCode&&t.proceedingStates.includes(Es(e.stateCode))))),t.connectedPerson.length>0&&(e=e.filter((e=>{var n,s;return null!==(n=null===(s=e.supervisor)||void 0===s?void 0:s.startsWith(t.connectedPerson))&&void 0!==n&&n}))),!1===t.showProceedingInArchive&&(e=e.filter((e=>"Ei"===e.archived))),t.supervisors.length>0&&(e=e.filter((e=>void 0!==e.supervisorId&&t.supervisors.includes(e.supervisorId.toString())))),t.proceedingDate.from.length>0&&0===t.proceedingDate.to.length){const n=new Date(t.proceedingDate.from).getTime();e=e.filter((e=>new Date(In()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n))}if(t.proceedingDate.to.length>0&&0===t.proceedingDate.from.length){const n=new Date(t.proceedingDate.to).getTime();e=e.filter((e=>new Date(In()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=n))}if(t.proceedingDate.from.length>0&&t.proceedingDate.to.length>0){const n=new Date(t.proceedingDate.from).getTime(),s=new Date(t.proceedingDate.to).getTime();e=e.filter((e=>new Date(In()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n&&new Date(In()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=s))}if(t.lastEventDate.length>0){const n=new Date(t.lastEventDate).getTime();e=e.filter((e=>e.lastEventDate&&new Date(In()(e.lastEventDate).format("YYYY-MM-DD")).getTime()<=n))}return e}function Ds(){return vs.filter((e=>"MENSEIS_TAIENDAMISEL"!==e.code&&"MENSEIS_MUUTMISEL"!==e.code&&"MENSEIS_LOPETATUD"!==e.code&&"MENSEIS_PEATATUD"!==e.code)).map((e=>({id:e.code})))}let xs=function(e){return e.Document="DOCUMENT",e.Proceeding="PROCEEDING",e.AdminProceeding="ADMIN_PROCEEDING",e.ProceedingDecision="PROCEEDING_DECISION",e.Operation="OPERATION",e.MyDocuments="MY_DOCUMENTS",e.MyProceedings="MY_PROCEEDINGS",e.MyAdministrativeProceedings="MY_ADMIN_PROCEEDINGS",e.Building="BUILDING",e.NewEnergy="NEW_ENERGY",e.ArchiveBuildingRegistryFile="ARCHIVE_BUILDINGREGISTRYFILE",e.ArchiveBuildingDatasOf2003="ARCHIVE_BUILDINGDATAASOF2003",e.ArchiveBuildingDatasOf2014="ARCHIVE_BUILDINGDATAASOF2014",e.Restriction="RESTRICTION",e.NotFound="404",e}({});const Ms=e=>e?(e=>[...Se,...fe].includes(e))(e)?xs.AdminProceeding:xs.Proceeding:xs.NotFound,Ns=e=>{const t=(0,B.useIntl)(),[n,s]=(0,G.useState)({offset:0,limit:50}),[o,i]=(0,G.useState)([]),[r,a]=(0,G.useState)({column:5,direction:xn}),[l,d]=(0,G.useState)(!1),[c,u]=(0,G.useState)(!1),[p,h]=(0,G.useState)(!1),m=(0,Sn.useSelector)((e=>e.myViewsPage.myProceedings.myProceedings)),g=[e=>Rn(e.dateStart)?new Date(In()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>Rn(e.deadline)?new Date(In()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.state)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.proceedingCircleNr)&&void 0!==t?t:""},e=>e.operationsCount?{done:e.operationsCount.split("/")[0],all:e.operationsCount.split("/")[1]}:"",e=>Rn(e.innerCommentDeadline)?new Date(e.innerCommentDeadline).getTime():Number.MAX_SAFE_INTEGER,e=>Rn(e.lastEventDate)?new Date(e.lastEventDate).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.document)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""},e=>e.buildingName&&e.buildingName[0]?e.buildingName[0]:"",e=>e.ehrCode&&e.ehrCode[0]?e.ehrCode[0]:"",e=>e.address&&e.address[0]?e.address[0]:"",e=>{var t;return null!==(t=e.proceedingName)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.supervisor)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.documentPresenter)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.archived)&&void 0!==t?t:""},e=>e.proceedingLength?e.proceedingLength:Number.MAX_SAFE_INTEGER];(0,G.useEffect)((()=>{if(m){const e=5,t=Nn(e,r);t.direction===Dn&&(t.direction=xn),a(t),i(bn(m,g[e],t.direction))}}),[m]),(0,G.useEffect)((()=>{m&&Object.keys(e.filter).length>0&&(r.direction===Dn?i(bs(m,e.filter)):i(bn(bs(m,e.filter),g[r.column],r.direction)),s({offset:0,limit:50}))}),[e.filter,m]),(0,G.useEffect)((()=>{r&&r.direction!==Dn&&0!==o.length&&i(bn(o,g[r.column],r.direction))}),[r]);const S=["my_proceedings.date_start","my_proceedings.deadline","my_proceedings.proceeding_nr","my_proceedings.state","my_proceedings.proceeding_circle_nr","my_proceedings.operations_count","my_proceedings.inner_comment_deadline","my_proceedings.last_event","my_proceedings.document","my_proceedings.document_type","my_proceedings.building_name","my_proceedings.ehr_code","my_proceedings.address","my_proceedings.proceeding_name","my_proceedings.supervisor","my_proceedings.document_presenter","my_proceedings.archived","my_proceedings.proceeding_length"];return(0,an.jsxs)(H.Section,{form:!0,children:[o&&(0,an.jsx)(H.CollapseTable,{content:(t=>{const s=t,{linkGen:o}=e;return s.slice(n.offset,n.offset+n.limit).map((t=>{var n,s,i,r,a,m;let g={addresses:[],ehrCodes:[],buildingNames:[]};t.address&&(null===(n=t.address)||void 0===n?void 0:n.length)>1&&(g=function(e,t,n){let s={addresses:[],ehrCodes:[],buildingNames:[]};if(e&&e.length>1){let o=[];for(let s=0;s<e.length;s++){let i=e[s].split(",");o.push({county:i[0],city:i[1]?i[1].trimStart():"",other:i[2]?i[2].trimStart()+","+i[3]:"",ehrCode:t?t[s]:"",buildingName:n?n[s]:""})}const i=o.reduce(((e,t)=>{var n;const{county:s}=t;return e[s]=null!==(n=e[s])&&void 0!==n?n:[],e[s].push(t),e}),{});let r=[];o.forEach((e=>{const t=e.county;r.includes(t)||r.push(t)}));let a=[];o.forEach((e=>{const t=e.city;a.includes(t)||a.push(t)})),r.forEach((e=>{const t=i[e].reduce(((e,t)=>{var n;const{city:s}=t;return e[s]=null!==(n=e[s])&&void 0!==n?n:[],e[s].push(t),e}),{});i[e]=t}));let l=[],d=[],c=[];r.forEach((e=>{a.forEach((t=>{let n="";if(i[e][t]){n+=e+", "+t;for(let s=0;s<i[e][t].length;s++){const o=i[e][t][s];n+=", "+o.other,0===s?l.push(n):l.push(o.other),d.push(o.ehrCode),c.push(o.buildingName)}}}))})),s={addresses:l,ehrCodes:d,buildingNames:c}}return s}(t.address,t.ehrCode,t.buildingName));const S=Ms(t.doty);return(0,an.jsx)(H.CollapseTableRow,{fields:[t.dateStart,In()(t.deadline,"DD.MM.YYYY").valueOf()<In()().valueOf()?(0,an.jsx)("div",{className:"red-text",children:null===(s=t.deadline)||void 0===s?void 0:s.toString()}):t.deadline,(0,an.jsx)(H.Tooltip,{content:(0,an.jsx)(H.Text,{raw:"my_proceedings.tooltip.open_proceeding"}),placement:"bottom",theme:"dark",children:(0,an.jsx)(H.Link,{onClick:e=>{o(!0,e,S,t.proceedingNr)},text:t.proceedingNr,href:o(!1,void 0,S,t.proceedingNr)})},t.proceedingNr),t.stateCode?(0,an.jsx)(H.Status,{type:_s(t.stateCode).type,children:_s(t.stateCode).name}):"",t.proceedingCircleNr,t.operationsCount,t.innerCommentDeadline?In()(t.innerCommentDeadline).valueOf()<=In()().valueOf()?(0,an.jsx)("div",{style:{color:"#00b649"},children:In()(t.innerCommentDeadline).format("DD.MM.YYYY")}):In()(t.innerCommentDeadline).format("DD.MM.YYYY"):"",t.lastEventDate?In()(t.lastEventDate).format("DD.MM.YYYY"):"",(0,an.jsx)(un,{linkName:t.document,tooltipText:"my_proceedings.tooltip.open_document",functionCall:n=>{e.linkGen(!0,n,"DOCUMENT",t.document)}}),t.documentType,t.buildingName&&(null===(i=t.buildingName)||void 0===i?void 0:i.length)>0?(0,an.jsx)("div",{children:p?(0,an.jsxs)("div",{children:[g.buildingNames.map((e=>(0,an.jsxs)(an.Fragment,{children:[e,";",(0,an.jsx)("br",{})]}))),t.buildingName.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),h(!p)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.link.view_less_building_names"})})]}):1===t.buildingName.length?t.buildingName:(0,an.jsxs)("div",{children:[null===(r=g.buildingNames)||void 0===r?void 0:r.slice(0,4).map((e=>(0,an.jsxs)(an.Fragment,{children:[e,";",(0,an.jsx)("br",{})]}))),null===(a=g.buildingNames)||void 0===a?void 0:a.slice(4,5),t.buildingName.length>5?" ...":"",t.buildingName.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),h(!p)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.link.view_all_building_names"})})})]})}):"",t.ehrCode?(0,an.jsx)("div",{children:c?(0,an.jsxs)("div",{children:[g.ehrCodes.map((t=>(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(un,{linkName:t,tooltipText:"my_proceedings.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}),(0,an.jsx)("br",{})]}))),t.ehrCode.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),u(!c)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.link.view_less_ehrCodes"})})]}):1===t.ehrCode.length?(0,an.jsx)(un,{linkName:t.ehrCode[0],tooltipText:"my_proceedings.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t.ehrCode)},href:e.linkGen(!1,void 0,"BUILDING",t.ehrCode)}):(0,an.jsxs)("div",{children:[g.ehrCodes.slice(0,4).map(((t,n)=>(0,an.jsxs)(V().Fragment,{children:[(0,an.jsx)(un,{linkName:t,tooltipText:"my_proceedings.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}),(0,an.jsx)("br",{})]},n))),g.ehrCodes.slice(4,5).map((t=>(0,an.jsx)(un,{linkName:t,tooltipText:"my_proceedings.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}))),t.ehrCode.length>5?" ...":"",t.ehrCode.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),u(!c)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.link.view_all_ehrCodes"})})})]})}):"",t.address?(0,an.jsx)("div",{style:{width:125},children:l?(0,an.jsxs)("div",{children:[g.addresses.map((e=>(0,an.jsxs)(an.Fragment,{children:[e,";",(0,an.jsx)("br",{})]}))),t.address.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),d(!l)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.link.view_less_addresses"})})]}):1===t.address.length?t.address:(0,an.jsxs)("div",{children:[g.addresses.slice(0,4).map((e=>(0,an.jsxs)(an.Fragment,{children:[e,";",(0,an.jsx)("br",{})]}))),null===(m=g.addresses)||void 0===m?void 0:m.slice(4,5),t.address.length>5?" ...":"",t.address.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),d(!l)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.link.view_all_addresses"})})})]})}):"",t.proceedingName,t.supervisor,t.documentPresenter,t.archived,t.proceedingLength]},t.id)}))})(o),headers:S.map(((e,n)=>(0,an.jsxs)("div",{children:[(0,an.jsx)("a",{className:"link-gray",style:{paddingRight:"2px"},onClick:()=>{const e=Nn(n,r);a(e)},children:r.column===n?(0,an.jsx)(On,{sortDirection:r.direction}):(0,an.jsx)(On,{sortDirection:Dn})}),t.formatMessage({id:e})]}))),paginationEnabled:!0,pager:{offset:n.offset,limit:n.limit,total:o.length},onPaginationReload:s}),(0,an.jsx)(an.Fragment,{children:e.isKov?(0,an.jsx)("div",{className:"d-flex justify-content-start",children:(0,an.jsx)(H.Checkbox,{name:"checkbox",onChange:t=>e.onAllUsersChecked(t),text:(0,an.jsx)(H.Text,{raw:"my_proceedings.view_all_institution_proceedings"}),checked:e.isAllUsersChecked})}):null})]})},Os={documentTypes:[],ehrCode:"",buildingName:"",wordInAddress:"",proceedingNumber:"",cadastralNumber:"",proceedingStates:["MENSEIS_ALGATATUD","MENSEIS_KAIMASOLEV"],connectedPerson:"",showProceedingInArchive:!1,supervisors:[],proceedingDate:{from:"",to:""},lastEventDate:""},As=e=>{let{onSubmit:t,isKov:n,filterState:s}=e;const o=(0,B.useIntl)(),i=/^[\\s0-9]{0,9}$/,r=/^([\\s0-9]{5}:[\\s0-9]{3}:[\\s0-9]{1,4}|[\\s0-9]{5}:[\\s0-9]{1,3}|[\\s0-9]{1,5})$/,[a,l]=(0,G.useState)(s),[d,c]=(0,G.useState)(!0),[u,p]=(0,G.useState)(!0),[h,m]=(0,G.useState)(""),[g,S]=(0,G.useState)(""),[f,I]=(0,G.useState)([]),[T,E]=(0,G.useState)([]),[_]=(0,G.useState)(ys()),[v,y]=(0,G.useState)([]),[b,D]=(0,G.useState)(Ds()),x=(0,Sn.useSelector)((e=>e.myViewsPage.filter.documentTypes)),M=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutionUsers));function N(e){return i.test(e)}function O(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],D(n.map((e=>({id:e})))),l((e=>({...e,[t]:n})))}function A(e,t){var n;"ehrCode"===t&&N(e)?c(!0):"cadastralNumber"===t&&(0===(n=e).length||r.test(n))&&p(!0),l((n=>({...n,[t]:e})))}(0,G.useEffect)((()=>{if(x){const e=as(x);I(e)}if(M&&n){const e=ls([...M]);E(e)}}),[x,M]);return(0,an.jsxs)(H.Form,{onSubmit:()=>t(a),children:[(0,an.jsxs)(H.Row,{className:"align-items-start",children:[(0,an.jsxs)(H.Col,{sm:10,className:"mx-0 px-0",children:[(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:f,onSelect:e=>O(e,"documentTypes"),allSelection:!0,onRemoveItem:e=>O(e,"documentTypes"),value:a.documentTypes,selectedOptions:v}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.document_type"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.document_type",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>A(e,"proceedingNumber"),placeholder:o.formatMessage({id:"placeholder.writing"}),value:a.proceedingNumber}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.proceeding_number"}),labelCol:{sm:20,md:8,lg:8}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:_,onSelect:e=>{O(e,"proceedingStates")},allSelection:!0,onRemoveItem:e=>O(e,"proceedingStates"),value:a.proceedingStates,selectedOptions:b}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.proceeding_state"}),labelCol:{sm:20,md:8,lg:8}}),is(a.showProceedingInArchive,(function(e){l((t=>({...t,showProceedingInArchive:e})))}),"my_proceedings.filter.label.show_archived_proceedings"),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)("div",{className:"daterange_in_form",children:(0,an.jsx)(H.DateRange,{name:"daterange",onChange:e=>(e=>{""!==e.from&&!In()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!In()(e.to,"YYYY-MM-DD",!0).isValid()?m(o.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?m(o.formatMessage({id:"filter.invalid_date_range"})):m(""),l((t=>({...t,proceedingDate:e})))})(e),value:a.proceedingDate})}),errorMessage:h.length>0?h:null,label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.proceeding_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.proceeding_date",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.DatePicker,{name:"datepicker-field",value:a.lastEventDate,onChange:e=>function(e){""===e||In()(e,"YYYY-MM-DD",!0).isValid()?S(""):S(o.formatMessage({id:"filter.invalid_date_format"})),l((t=>({...t,lastEventDate:e})))}(e)}),errorMessage:g.length>0?g:null,label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.last_event_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.last_event_date",placement:"top-start"}})]}),(0,an.jsxs)(H.Col,{sm:10,className:"mx-0 px-0",children:[(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>A(e,"ehrCode"),onBlur:e=>c(N(e.trim())),placeholder:o.formatMessage({id:"placeholder.writing"}),value:a.ehrCode}),errorMessage:!d&&(0,an.jsx)(H.Text,{raw:"filter.invalid_building_code"}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.ehrCode"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.ehrCode",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>A(e,"buildingName"),placeholder:o.formatMessage({id:"placeholder.writing"}),value:a.buildingName}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.building_name"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.building_name",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>A(e,"wordInAddress"),placeholder:o.formatMessage({id:"placeholder.writing"}),value:a.wordInAddress}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.word_in_address"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.word_in_address",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>A(e,"connectedPerson"),placeholder:o.formatMessage({id:"placeholder.writing"}),value:a.connectedPerson}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.connected_person"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.connected_person",placement:"top-start"}}),n&&(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:T,onSelect:e=>O(e,"supervisors"),allSelection:!0,onRemoveItem:e=>O(e,"supervisors"),value:a.supervisors,selectedOptions:v}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_proceedings.filter.label.supervisor"}),labelCol:{sm:20,md:8,lg:8}})]})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{onClick:()=>(y([]),l(Os),void D(Ds())),colourScheme:"light",squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.epmty_fields"})})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!(d&&u),squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.search"})})})]})]})},Us={MENTOIMSEIS_OOTEL:["MENTOIMSEIS_OOTEL","MENTOIMSEIS_JATKAMINE"],MENTOIMSEIS_TEOSTAMISEL:["MENTOIMSEIS_TEOSTAMISEL"],MENTOIMSEIS_TYHISTATUD:["MENTOIMSEIS_TYHISTATUD"],MENTOIMSEIS_TEOSTATUD:["MENTOIMSEIS_TEOSTATUD","MENTOIMSEIS_KOOSKOLA","MENTOIMSEIS_KOOSKOLA_MARK","MENTOIMSEIS_VALMIS","MENTOIMSEIS_VANA_VERSIOON","MENTOIMSEIS_ARHIIVIS","MENTOIMSEIS_EDASTATUD"],MENTOIMSEIS_LOOBUTUD:["MENTOIMSEIS_LOOBUTUD","MENTOIMSEIS_KEELDUTUD","MENTOIMSEIS_TAGASI_LYKATUD"],MENTOIMSEIS_TAHTAEG_MOODUNUD:["MENTOIMSEIS_TAHTAEG_MOODUNUD"]};let ws=function(e){return e.MENTOIMSEIS_ARHIIVIS="MENTOIMSEIS_ARHIIVIS",e.MENTOIMSEIS_TYISTATUD="MENTOIMSEIS_TYISTATUD",e.MENTOIMSEIS_EDASTATUD="MENTOIMSEIS_EDASTATUD",e.MENTOIMSEIS_TEOSTAMISEL="MENTOIMSEIS_TEOSTAMISEL",e.MENTOIMSEIS_TYHISTATUD="MENTOIMSEIS_TYHISTATUD",e.MENTOIMSEIS_VALMIS="MENTOIMSEIS_VALMIS",e.MENTOIMSEIS_KEELDUTUD="MENTOIMSEIS_KEELDUTUD",e.MENTOIMSEIS_KOOSKOLA="MENTOIMSEIS_KOOSKOLA",e.MENTOIMSEIS_KOOSKOLA_MARK="MENTOIMSEIS_KOOSKOLA_MARK",e.MENTOIMSEIS_OOTEL="MENTOIMSEIS_OOTEL",e.MENTOIMSEIS_TAGASI_LYKATUD="MENTOIMSEIS_TAGASI_LYKATUD",e.MENTOIMSEIS_ADS="MENTOIMSEIS_ADS",e.MENTOIMSEIS_ADS_ESITAMATA="MENTOIMSEIS_ADS_ESITAMATA",e.MENTOIMSEIS_ADS_JOUSTUNUD="MENTOIMSEIS_ADS_JOUSTUNUD",e.MENTOIMSEIS_ADS_KONTROLL="MENTOIMSEIS_ADS_KONTROLL",e.MENTOIMSEIS_ADS_PROBLEEM="MENTOIMSEIS_ADS_PROBLEEM",e.MENTOIMSEIS_ADS_TYHISTATUD="MENTOIMSEIS_ADS_TYHISTATUD",e.MENTOIMSEIS_ADS_TYISTATUD="MENTOIMSEIS_ADS_TYISTATUD",e.MENTOIMSEIS_VANA_VERSIOON="MENTOIMSEIS_VANA_VERSIOON",e.MENTOIMSEIS_LOOBUTUD="MENTOIMSEIS_LOOBUTUD",e.MENTOIMSEIS_TEOSTATUD="MENTOIMSEIS_TEOSTATUD",e.MENTOIMSEIS_TAHTAEG_MOODUNUD="MENTOIMSEIS_TAHTAEG_MOODUNUD",e.MENTOIMSEIS_JATKAMINE="MENTOIMSEIS_JATKAMINE",e}({});function js(e){return Kn(Us,e)}const Cs={[ws.MENTOIMSEIS_OOTEL]:"info",[ws.MENTOIMSEIS_TEOSTAMISEL]:"info",[ws.MENTOIMSEIS_TYHISTATUD]:"default",[ws.MENTOIMSEIS_TEOSTATUD]:"success",[ws.MENTOIMSEIS_LOOBUTUD]:"default",[ws.MENTOIMSEIS_TAHTAEG_MOODUNUD]:"default"},Ls={[ws.MENTOIMSEIS_OOTEL]:"my_operations.operation.state.idle",[ws.MENTOIMSEIS_TEOSTAMISEL]:"my_operations.operation.state.in_process",[ws.MENTOIMSEIS_TYHISTATUD]:"my_operations.operation.state.cancelled",[ws.MENTOIMSEIS_TEOSTATUD]:"my_operations.operation.state.done",[ws.MENTOIMSEIS_LOOBUTUD]:"my_operations.operation.state.abandoned",[ws.MENTOIMSEIS_TAHTAEG_MOODUNUD]:"my_operations.operation.state.expired"};function Ps(e,t){return((e,t)=>({state:Object.keys(Ls).includes(e)?t.formatMessage({id:Ls[e]}):e,type:Object.keys(Cs).includes(e)?Cs[e]:"default"}))(js(e),t)}const Rs=(e,t)=>({code:e,value:t.formatMessage({id:Ls[e]})});function Ks(e,t){let n;return n=e===Q?[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_TYHISTATUD,ws.MENTOIMSEIS_TEOSTATUD,ws.MENTOIMSEIS_LOOBUTUD,ws.MENTOIMSEIS_TAHTAEG_MOODUNUD].map((e=>Rs(e,t))):e===te?[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_TYHISTATUD,ws.MENTOIMSEIS_LOOBUTUD,ws.MENTOIMSEIS_TAHTAEG_MOODUNUD].map((e=>Rs(e,t))):e===ne?[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_TEOSTATUD,ws.MENTOIMSEIS_LOOBUTUD].map((e=>Rs(e,t))):[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_TEOSTATUD,ws.MENTOIMSEIS_LOOBUTUD,ws.MENTOIMSEIS_TAHTAEG_MOODUNUD].map((e=>Rs(e,t))),function(e){return e.map((e=>({id:e.code+"",label:e.value,level:2,children:[],selectable:!0,value:!1})))}(n)}function Fs(){return[{code:"11271",value:"Ehitusluba"},{code:"11201",value:"Ehitusteatis"},{code:"11371",value:"Kasutusluba"},{code:"11301",value:"Kasutusteatis"},{code:"11002",value:"Projekteerimistingimused"},{code:"11051",value:"5G pääsupunkti taotlus"}].map((e=>({id:`${e.code}`,label:e.value,level:2,children:[],selectable:!0,value:!1})))}function ks(e,t){if(t.documentTypes.length>0&&(e=e.filter((e=>e.doty&&void 0!==e.doty&&t.documentTypes.includes(e.doty)))),t.ehrCode.length>0&&(e=e.filter((e=>{var n;return null===(n=e.ehrCode)||void 0===n?void 0:n.some((e=>{var n;return null!==(n=e.startsWith(t.ehrCode.trim()))&&void 0!==n&&n}))}))),t.institutions.length>0&&(e=e.filter((e=>{var n;return e.supervisorJurId&&void 0!==e.supervisorJurId&&t.institutions.includes(null===(n=e.supervisorJurId)||void 0===n?void 0:n.toString())}))),t.wordInAddress.length>0&&(e=e.filter((e=>{var n,s;return null!==(n=null===(s=e.address)||void 0===s?void 0:s.some((e=>null==e?void 0:e.toLocaleLowerCase().includes(t.wordInAddress.trim().toLocaleLowerCase()))))&&void 0!==n&&n}))),t.proceedingNumber.length>0&&(e=e.filter((e=>{var n,s;return null!==(n=null===(s=e.proceedingNr)||void 0===s?void 0:s.includes(t.proceedingNumber.trim()))&&void 0!==n&&n}))),t.operationStates.length>0&&(e=e.filter((e=>e.stateCode&&void 0!==e.stateCode&&t.operationStates.includes(js(e.stateCode))))),t.institutionUsers&&t.institutionUsers.length>0&&(e=e.filter((e=>e.operationExecutorId&&void 0!==e.operationExecutorId&&t.institutionUsers.includes(e.operationExecutorId.toString())))),t.operationDate.from.length>0&&0===t.operationDate.to.length){const n=new Date(t.operationDate.from).getTime();e=e.filter((e=>new Date(In()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n))}if(t.operationDate.to.length>0&&0===t.operationDate.from.length){const n=new Date(t.operationDate.to).getTime();e=e.filter((e=>new Date(In()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=n))}if(t.operationDeadline.from.length>0){const n=new Date(t.operationDeadline.from).getTime();e=e.filter((e=>!e.deadline||new Date(In()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n))}if(t.operationDeadline.to.length>0){const n=new Date(t.operationDeadline.to).getTime();e=e.filter((e=>!e.deadline||new Date(In()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=n))}if(t.operationDate.from.length>0&&t.operationDate.to.length>0){const n=new Date(t.operationDate.from).getTime(),s=new Date(t.operationDate.to).getTime();e=e.filter((e=>new Date(In()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n&&new Date(In()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=s))}return e}function Ys(e){return[{id:ws.MENTOIMSEIS_OOTEL},{id:ws.MENTOIMSEIS_TEOSTAMISEL},{id:ws.MENTOIMSEIS_TEOSTATUD},{id:ws.MENTOIMSEIS_LOOBUTUD}].filter((t=>e.includes(t.id)))}let Gs=function(e){return e.Document="DOCUMENT",e.Proceeding="PROCEEDING",e.AdminProceeding="ADMIN_PROCEEDING",e.AdminOperation="ADMIN_OPERATION",e.ProceedingDecision="PROCEEDING_DECISION",e.Operation="OPERATION",e.MyDocuments="MY_DOCUMENTS",e.MyProceedings="MY_PROCEEDINGS",e.MyAdministrativeProceedings="MY_ADMIN_PROCEEDINGS",e.Building="BUILDING",e.NewEnergy="NEW_ENERGY",e.ArchiveBuildingRegistryFile="ARCHIVE_BUILDINGREGISTRYFILE",e.ArchiveBuildingDatasOf2003="ARCHIVE_BUILDINGDATAASOF2003",e.ArchiveBuildingDatasOf2014="ARCHIVE_BUILDINGDATAASOF2014",e.Restriction="RESTRICTION",e.NotFound="404",e}({});const Vs=["11273","11272"],Bs=e=>{const t=(0,B.useIntl)(),[n,s]=(0,G.useState)({offset:0,limit:10}),[o,i]=(0,G.useState)([]),[r,a]=(0,G.useState)({column:1,direction:Mn}),[l,d]=(0,G.useState)(!1),[c,u]=(0,G.useState)(!1),[p,h]=(0,G.useState)(!1),m=(0,Sn.useSelector)((e=>e.myViewsPage.myOperations.myOperations)),g=(0,Sn.useSelector)((e=>e.myViewsPage.myOperations.toCommentOperations)),S=(0,Sn.useSelector)((e=>e.myViewsPage.myOperations.operationInvitations)),f=(0,Sn.useSelector)((e=>e.myViewsPage.myProceedings.proceedingsToComment)),I=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutions)),T=(0,Sn.useSelector)((e=>e.myViewsPage.filter.documentTypes)),E=[e=>Rn(e.invitationDate)?new Date(In()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>Rn(e.deadline)?new Date(In()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.state)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.operationExecutor)&&void 0!==t?t:""},e=>{var t,n;return null!==(t=null===(n=T.find((t=>t.id.toString()===e.doty)))||void 0===n?void 0:n.name)&&void 0!==t?t:""},e=>void 0!==e.buildingName&&null!==e.buildingName&&Rn(e.buildingName[0])?e.buildingName[0]:"",e=>void 0!==e.ehrCode&&null!==e.ehrCode&&Rn(e.ehrCode[0])?e.ehrCode[0]:"",e=>void 0!==e.address&&null!==e.address&&Rn(e.address[0])?e.address[0]:"",e=>{var t,n;return null!==(t=null===(n=I.find((t=>t.id===e.supervisorJurId)))||void 0===n?void 0:n.regName)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.supervisor)&&void 0!==t?t:""}];(0,G.useEffect)((()=>{!m||e.viewType!==X&&e.viewType!==z||(i(ks(m,e.filter)),s({offset:0,limit:10}))}),[m,e.filter]),(0,G.useEffect)((()=>{m&&e.viewType===Q&&(i(bn(ks(m,e.filter),E[0],Mn)),s({offset:0,limit:10}))}),[m,e.filter]),(0,G.useEffect)((()=>{g&&e.viewType===ee&&(r.direction===Dn?i(ks(g,e.filter)):i(bn(ks(g,e.filter),E[r.column],r.direction)),s({offset:0,limit:10}))}),[g,e.filter]),(0,G.useEffect)((()=>{S&&e.viewType===te&&(i(ks(S,e.filter)),s({offset:0,limit:10}))}),[S,e.filter]),(0,G.useEffect)((()=>{f&&e.viewType===ne&&(r.direction===Dn?i(ks(f,e.filter)):i(bn(ks(f,e.filter),E[r.column],r.direction)))}),[f,e.filter]);const _=["my_operations.invitation_date","my_operations.deadline","my_operations.proceeding_nr","my_operations.state","my_operations.operation_executor","my_operations.connected_document_type","my_operations.building_name","my_operations.ehr_code","my_operations.building_address","my_operations.institution","my_operations.supervisor"],v=["my_operations.deadline","my_operations.proceeding_nr","my_operations.state","my_operations.supervisor","my_operations.connected_document_type","my_operations.building_address"],y=[e=>Rn(e.deadline)?new Date(In()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.state)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.supervisor)&&void 0!==t?t:""},e=>{var t,n;return null!==(t=null===(n=T.find((t=>t.id.toString()===e.doty)))||void 0===n?void 0:n.name)&&void 0!==t?t:""},e=>void 0!==e.address&&null!==e.address&&Rn(e.address[0])?e.address[0]:""];const b=t=>{let n=Gs.Operation;return e.viewType===ne?(n=t.doty&&Vs.includes(t.doty)?Gs.AdminProceeding:Gs.Proceeding,e.linkGen(!1,void 0,n,t.proceedingNr)):((t.doty&&Vs.includes(t.doty)||t.typeCode===de.MENTOIMLIIK_KAAS_TAGASISIDE)&&(n=Gs.AdminOperation),e.linkGen(!1,void 0,n,t.id))};return(0,an.jsxs)(H.Section,{form:!0,children:[o&&(0,an.jsx)(H.CollapseTable,{content:(s=>s.slice(n.offset,n.offset+n.limit).map((n=>{var s,o,i,r,a,m,g,S;const f=[n.invitationDate,In()(n.deadline,"DD.MM.YYYY").valueOf()<In()().valueOf()?(0,an.jsx)("div",{className:"red-text",children:n.deadline}):n.deadline,(0,an.jsx)(H.Tooltip,{content:(0,an.jsx)(H.Text,{raw:"my_operations.tooltip.open_proceeding"}),placement:"bottom",theme:"dark",children:(0,an.jsx)(H.Link,{text:n.proceedingNr,href:b(n)})},n.proceedingNr),n.stateCode?(0,an.jsx)(H.Status,{type:Ps(n.stateCode,t).type,children:Ps(n.stateCode,t).state}):"",n.operationExecutor,n.doty?null===(s=T.find((e=>e.id.toString()===n.doty)))||void 0===s?void 0:s.name:"",n.buildingName?(0,an.jsx)("div",{children:p?(0,an.jsxs)("div",{children:[n.buildingName.map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[e,";",(0,an.jsx)("br",{})]},t))),n.buildingName.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),h(!p)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.link.view_less_building_names"})})]}):1===n.buildingName.length?n.buildingName:(0,an.jsxs)("div",{children:[null===(o=n.buildingName)||void 0===o?void 0:o.slice(0,4).map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[e,";",(0,an.jsx)("br",{})]},t))),null===(i=n.buildingName)||void 0===i?void 0:i.slice(4,5),n.buildingName.length>5?" ...":"",n.buildingName.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),h(!p)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.link.view_all_building_names"})})})]})}):"",n.ehrCode?(0,an.jsx)("div",{children:c?(0,an.jsxs)("div",{children:[n.ehrCode.map(((t,n)=>(0,an.jsxs)(V().Fragment,{children:[(0,an.jsx)(un,{linkName:t,tooltipText:"my_operations.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}),(0,an.jsx)("br",{})]},n))),n.ehrCode.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),u(!c)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.link.view_less_ehrCodes"})})]}):(0,an.jsxs)("div",{children:[null===(r=n.ehrCode)||void 0===r?void 0:r.slice(0,4).map(((t,n)=>(0,an.jsxs)(V().Fragment,{children:[(0,an.jsx)(un,{linkName:t,tooltipText:"my_operations.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}),(0,an.jsx)("br",{})]},n))),null===(a=n.ehrCode)||void 0===a?void 0:a.slice(4,5).map((t=>(0,an.jsx)(un,{linkName:t,tooltipText:"my_operations.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}))),n.ehrCode.length>5?" ...":"",n.ehrCode.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),u(!c)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.link.view_all_ehrCodes"})})})]})}):"",n.address?(0,an.jsx)("div",{children:l?(0,an.jsxs)("div",{children:[n.address.map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[e,";",(0,an.jsx)("br",{})]},t))),n.address.length>5&&(0,an.jsx)(H.Link,{type:"hide",onClick:e=>{e.preventDefault(),d(!l)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.link.view_less_addresses"})})]}):1===n.address.length?n.address:(0,an.jsxs)("div",{children:[null===(m=n.address)||void 0===m?void 0:m.slice(0,4).map(((e,t)=>(0,an.jsxs)(V().Fragment,{children:[e,";",(0,an.jsx)("br",{})]},t))),null===(g=n.address)||void 0===g?void 0:g.slice(4,5),n.address.length>5?" ...":"",n.address.length>5&&(0,an.jsx)("div",{className:"pr-3",children:(0,an.jsx)(H.Link,{type:"show",onClick:e=>{e.preventDefault(),d(!l)},text:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.link.view_all_addresses"})})})]})}):"",n.supervisorJurId?null===(S=I.find((e=>e.id===n.supervisorJurId)))||void 0===S?void 0:S.regName:"",n.supervisor],E=[...f];E.splice(4,1);const _=[...f].slice(1,4).concat(f[10]).concat(f[5]).concat(f[8]);return(0,an.jsx)(H.CollapseTableRow,{fields:e.viewType===Q?E:e.viewType===ne?_:f},n.id)})))(o),headers:function(){const n=[..._];n.splice(4,1);const s=e.viewType===Q?n:e.viewType===ne?v:_,l=[...E];l.splice(4,1);const d=e.viewType===Q?l:e.viewType===ne?y:E;return s.map(((e,n)=>(0,an.jsxs)("div",{children:[(0,an.jsx)("a",{className:"link-gray",style:{paddingRight:"2px"},onClick:()=>{const e=Nn(n,r);a(e),e.direction!==Dn&&i(bn(o,d[n],e.direction))},children:r.column===n?(0,an.jsx)(On,{sortDirection:r.direction}):(0,an.jsx)(On,{sortDirection:Dn})}),t.formatMessage({id:e})]})))}(),paginationEnabled:!0,pager:{offset:n.offset,limit:n.limit,total:o.length},onPaginationReload:s}),(e.viewType===z||e.viewType===X)&&(0,an.jsx)("div",{className:"d-flex justify-content-start",children:(0,an.jsx)(H.Checkbox,{name:"checkbox",onChange:t=>e.onAllUsersChecked(t),text:e.viewType===z?(0,an.jsx)(H.Text,{raw:"my_approvals.view_all_institution_approvals"}):(0,an.jsx)(H.Text,{raw:"my_opinions.view_all_institution_opinions"}),checked:e.isAllUsersChecked})})]})},Hs=e=>{var t;const n=(0,B.useIntl)(),s=/^[\\s0-9]{0,9}$/,o=/^([\\s0-9]{5}:[\\s0-9]{3}:[\\s0-9]{1,4}|[\\s0-9]{5}:[\\s0-9]{1,3}|[\\s0-9]{1,5})$/,i=null!==(t=e.initialFilter)&&void 0!==t?t:{documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[],institutionUsers:[],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},r={...i,operationStates:[ws.MENTOIMSEIS_TEOSTAMISEL]},a={...i,operationStates:[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_JATKAMINE]},l={...i,operationStates:[ws.MENTOIMSEIS_OOTEL]},[d,c]=(0,G.useState)(e.filterState),[u,p]=(0,G.useState)(Ys(d.operationStates)),[h,m]=(0,G.useState)(!0),[g,S]=(0,G.useState)(!0),[f,I]=(0,G.useState)(""),[T,E]=(0,G.useState)(""),_=(0,G.useMemo)((()=>Fs()),[]),[v,y]=(0,G.useState)([]),[b,D]=(0,G.useState)([]),x=(0,G.useMemo)((()=>Ks(e.viewType,n)),[e.viewType]),[M,N]=(0,G.useState)([]),O=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutionUsers)),A=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutions));function U(e){return s.test(e)}function w(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],d[t]=n,c((e=>({...e})))}function j(e,t){var n;d[t]=e,"ehrCode"===t&&U(e)?m(!0):"cadastralNumber"===t&&(0===(n=e).length||o.test(n))&&S(!0),c((e=>({...e})))}(0,G.useEffect)((()=>{if(O){const e=ls(O?[...O]:[]);D(e)}if(A){const e=ds([...A]);y(e)}}),[O,A]);return(0,an.jsxs)(H.Form,{onSubmit:()=>e.onSubmit(d),children:[(0,an.jsx)(H.Row,{className:"align-items-start",children:(0,an.jsx)(H.Col,{sm:10,className:"mx-0 px-0",children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:_,onSelect:e=>w(e,"documentTypes"),allSelection:!0,onRemoveItem:e=>w(e,"documentTypes"),value:d.documentTypes,selectedOptions:M}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.document_type"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})})}),(0,an.jsx)(H.Row,{className:"align-items-start",children:(0,an.jsx)(H.Col,{sm:10,className:"mx-0 px-0",children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>j(e,"ehrCode"),onBlur:e=>S(U(e.trim())),placeholder:n.formatMessage({id:"placeholder.writing"}),value:d.ehrCode}),errorMessage:!h&&(0,an.jsx)(H.Text,{raw:"filter.invalid_building_code"}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.ehrCode"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})})}),(0,an.jsxs)(H.Row,{className:"align-items-start",children:[(0,an.jsxs)(H.Col,{sm:10,className:"mx-0 px-0",children:[(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:v,onSelect:e=>w(e,"institutions"),allSelection:!0,onRemoveItem:e=>w(e,"institutions"),value:d.institutions,selectedOptions:M}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.institution"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>j(e,"proceedingNumber"),placeholder:n.formatMessage({id:"placeholder.writing"}),value:d.proceedingNumber}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.proceeding_number"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:x,onSelect:e=>w(e,"operationStates"),allSelection:!0,onRemoveItem:e=>w(e,"operationStates"),value:d.operationStates,selectedOptions:u}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.operation_state"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(cs,{onChange:e=>(e=>{""!==e.from&&!In()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!In()(e.to,"YYYY-MM-DD",!0).isValid()?I(n.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?I(n.formatMessage({id:"filter.invalid_date_range"})):I(""),c((t=>({...t,operationDate:e})))})(e),value:d.operationDate}),errorMessage:f.length>0?f:null,label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.operation_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})]}),(0,an.jsxs)(H.Col,{sm:10,className:"mx-0 px-0",children:[(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>j(e,"wordInAddress"),placeholder:n.formatMessage({id:"placeholder.writing"}),value:d.wordInAddress}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.word_in_address"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:b,onSelect:e=>w(e,"institutionUsers"),allSelection:!0,onRemoveItem:e=>w(e,"institutionUsers"),value:d.institutionUsers,selectedOptions:M}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.institution_users"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(cs,{onChange:e=>(e=>{""!==e.from&&!In()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!In()(e.to,"YYYY-MM-DD",!0).isValid()?E(n.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?E(n.formatMessage({id:"filter.invalid_date_range"})):E(""),c((t=>({...t,operationDeadline:e})))})(e),value:d.operationDeadline}),errorMessage:T.length>0?T:null,label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.operation_deadline"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})]})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{onClick:()=>function(){let t;switch(N([]),e.viewType){case Z:t=r;break;case ee:case ne:t=a;break;case te:t=l;break;default:t=i}c(t),p(Ys(t.operationStates))}(),colourScheme:"light",squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.epmty_fields"})})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!(h&&g),squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.search"})})})]})]})},Js=e=>{var t,n,s,o;let{classifierApiEndpoint:i,fileUploadApiEndpoint:r,linkGen:d,myViewsApiEndpoint:c,userInfo:u,userApiEndpoint:p}=e;const h=(0,Sn.useDispatch)(),[m,g]=(0,G.useState)({proceedings:!1}),[S,f]=(0,G.useState)(!0),[I,T]=(0,G.useState)(!0),[y,b]=(0,G.useState)(!0),[D,x]=(0,G.useState)([]),[M,N]=(0,G.useState)([]),[O,A]=(0,G.useState)([]),U=new we(new ft({basePath:i})),w=new Xe(new ft({basePath:p})),j=new St(new ft({basePath:c})),C=new ct(new ft({basePath:c})),L=new mt(new ft({basePath:c})),P=new Vt(new Bt({basePath:r})),R="A"!==(null===(t=u.activeRole)||void 0===t?void 0:t.businessType);let K=new Date;K.setDate(K.getDate()-7);const F={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:["MENTOIMSEIS_OOTEL","MENTOIMSEIS_TEOSTAMISEL"],institutionUsers:[(null===(n=u.activeRole)||void 0===n?void 0:n.userId)+""],operationDate:{from:"",to:""},operationDeadline:{from:K.toISOString().split("T")[0],to:""}},[k,Y]=(0,G.useState)({documentTypes:[],ehrCode:"",buildingName:"",wordInAddress:"",proceedingNumber:"",cadastralNumber:"",proceedingStates:["MENSEIS_ALGATATUD","MENSEIS_KAIMASOLEV"],connectedPerson:"",showProceedingInArchive:!1,supervisors:[],proceedingDate:{from:"",to:""},lastEventDate:""}),[V,B]=(0,G.useState)(F),[J,W]=(0,G.useState)({});const q={userId:null===(s=u.activeRole)||void 0===s?void 0:s.userId,personId:null===(o=u.activeRole)||void 0===o?void 0:o.businessId,dotys:["11525","11271","11201","11301","11271","11371","11002","11582","11581","12271","12371","11413","11412","11430","11583","11274","11275"],states:[Un.DO_DOKUSEIS_ESITATUD,Un.DO_DOKUSEIS_MENETLUSES]};return(0,G.useEffect)((()=>{!function(e){var t,n;const s={userId:e.institutionUsers?Number(e.institutionUsers[0]):null===(t=u.activeRole)||void 0===t?void 0:t.userId,personId:null===(n=u.activeRole)||void 0===n?void 0:n.businessId,states:e.operationStates,type:[de.MENTOIMLIIK_MEN_MARKUS]};T(!0),L.findOperationsToComment(s).then((e=>{h(_(e.data)),N(e.data),T(!1)})).catch((e=>{console.log("Following error occured:",e),T(!1)}))}(V)}),[u,V]),(0,G.useEffect)((()=>{(()=>{const e=q;m.proceedings&&(e.userId=void 0),f(!0),j.findProceedings(e).then((e=>{h(E(e.data)),x(e.data),f(!1)})).catch((e=>{console.log("Following error occured:",e),f(!1)}))})()}),[m.proceedings]),(0,G.useEffect)((()=>{!function(){const e=q;e.userId=void 0,b(!0),C.findIncomingDocuments(e).then((e=>{h(v(e.data)),b(!1),A(e.data)})).catch((e=>{console.log("Following error occured:",e),b(!1)}))}()}),[u]),(0,G.useEffect)((()=>{var e,t;U.getAllDocumentTypes().then((e=>{h(a(e.data))})).catch((e=>{console.log(e)})),R&&w.getJurUsers(null!==(e=null===(t=u.activeRole)||void 0===t?void 0:t.businessId)&&void 0!==e?e:0).then((e=>{h(l(e.data))})).catch((e=>{console.log(e)}))}),[u]),(0,an.jsxs)("div",{children:[(0,an.jsx)(H.Section,{collapsed:!1,title:"my_proceedings.my_proceedings",showSettings:!0,filterContents:(0,an.jsx)(As,{onSubmit:e=>{Y(e)},isKov:R,filterState:k}),children:S?(0,an.jsx)(H.SectionLoader,{}):0===D.length?(0,an.jsxs)("div",{children:[(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_proceedings.no_proceedings"})}),R&&(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Link,{text:"my_proceedings.view_all_institution_proceedings",onClick:()=>{g({proceedings:!0})}})})]}):(0,an.jsx)(Ns,{linkGen:d,isKov:R,onAllUsersChecked:e=>{g({proceedings:e})},isAllUsersChecked:m.proceedings,filter:k})}),R&&(0,an.jsx)(H.Section,{collapsed:!1,title:"my_proceedings.section_title.proceedings_to_comment",showSettings:!0,filterContents:(0,an.jsx)(Hs,{viewType:ne,initialFilter:F,filterState:V,onSubmit:e=>B(e)}),children:I?(0,an.jsx)(H.SectionLoader,{}):0===M.length?(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_proceedings.proceedings_to_comment.no_proceedings"})}):(0,an.jsx)(Bs,{linkGen:d,viewType:ne,filter:V})}),R&&(0,an.jsx)(H.Section,{collapsed:!1,title:"my_documents.incoming_documents",showSettings:!0,filterContents:(0,an.jsx)(us,{documentType:$,filterState:J,onSubmit:e=>W(e),isKov:R}),children:y?(0,an.jsx)(H.SectionLoader,{}):0===O.length?(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_documents.incoming_documents.no_docs"})}):(0,an.jsx)(ss,{linkGen:d,userInfo:u,documentType:$,filter:J,fileApi:P})})]})},Ws=e=>{let{classifierApiEndpoint:t,linkGen:n,myViewsApiEndpoint:s,userApiEndpoint:o,userInfo:{activeRole:i}}=e;const r=(0,Sn.useDispatch)(),[c,u]=(0,G.useState)(!0),[p,h]=(0,G.useState)(!1),[m,g]=(0,G.useState)(!1),[S,f]=(0,G.useState)(null),[I,T]=(0,G.useState)(null),[E,_]=(0,G.useState)(null),v={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[],institutionUsers:[],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},y={...v,operationStates:[ws.MENTOIMSEIS_TEOSTAMISEL]},b={...v,operationStates:[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_JATKAMINE]},N={...v,operationStates:[ws.MENTOIMSEIS_OOTEL]},[O,A]=(0,G.useState)(y),[U,w]=(0,G.useState)(b),[j,C]=(0,G.useState)(N),[L,P]=(0,G.useState)(!1),R=new He(new ft({basePath:o})),K=new Xe(new ft({basePath:o})),F=new mt(new ft({basePath:s})),k=new we(new ft({basePath:t}));return(0,G.useEffect)((()=>{var e;R.getJurKovPersons().then((e=>{r(d(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)})),K.getJurUsers(null!==(e=null==i?void 0:i.businessId)&&void 0!==e?e:0).then((e=>{r(l(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)})),k.getAllDocumentTypes().then((e=>{r(a(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)}))}),[]),(0,G.useEffect)((()=>{!function(){const e={userId:null==i?void 0:i.userId,personId:null==i?void 0:i.businessId,type:[de.MENTOIMLIIK_VALINE_KOOSK],states:Us.MENTOIMSEIS_TEOSTAMISEL.concat(Us.MENTOIMSEIS_TEOSTATUD,Us.MENTOIMSEIS_LOOBUTUD,Us.MENTOIMSEIS_TAHTAEG_MOODUNUD)};L&&(e.userId=void 0),u(!0),F.findOperations(e).then((e=>{r(D(e.data)),f(e.data),u(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),u(!1)}))}()}),[L]),(0,G.useEffect)((()=>{h(!0),F.findOperationsToComment({userId:null==i?void 0:i.userId,type:[de.MENTOIMLIIK_VALINE_KOOSK],states:Us.MENTOIMSEIS_TEOSTAMISEL.concat(Us.MENTOIMSEIS_TEOSTATUD,Us.MENTOIMSEIS_LOOBUTUD,Us.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{r(x(e.data)),T(e.data),h(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),h(!1)})),g(!0),F.findOperationInvitations({userId:void 0,personId:null==i?void 0:i.businessId,type:[de.MENTOIMLIIK_VALINE_KOOSK],states:Us.MENTOIMSEIS_OOTEL.concat(Us.MENTOIMSEIS_TEOSTAMISEL,Us.MENTOIMSEIS_TYHISTATUD,Us.MENTOIMSEIS_LOOBUTUD,Us.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{r(M(e.data)),_(e.data),g(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),g(!1)}))}),[]),(0,an.jsxs)("div",{children:[(0,an.jsxs)(H.Section,{collapsed:!1,title:"my_approvals.my_approvals",showSettings:!0,filterContents:(0,an.jsx)(Hs,{viewType:Z,filterState:O,onSubmit:e=>A(e)}),children:[c&&(0,an.jsx)(H.SectionLoader,{}),c||S?(0,an.jsx)(Bs,{linkGen:n,viewType:z,filter:O,isAllUsersChecked:L,onAllUsersChecked:e=>{P(e)}}):(0,an.jsxs)("div",{children:[(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_approvals.no_approvals"})}),(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Link,{text:"my_approvals.view_all_institution_approvals",onClick:()=>{P(!0)}})})]})]}),(0,an.jsxs)(H.Section,{collapsed:!1,title:"my_approvals.approvals_to_comment",showSettings:!0,filterContents:(0,an.jsx)(Hs,{viewType:ee,filterState:U,onSubmit:e=>w(e)}),children:[p&&(0,an.jsx)(H.SectionLoader,{}),p||I?(0,an.jsx)(Bs,{linkGen:n,viewType:ee,filter:U}):(0,an.jsx)("div",{children:(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_approvals.no_approvals_to_comment"})})})]}),(0,an.jsxs)(H.Section,{collapsed:!1,title:"my_approvals.approval_invitations",showSettings:!0,filterContents:(0,an.jsx)(Hs,{viewType:te,filterState:j,onSubmit:e=>C(e)}),children:[m&&(0,an.jsx)(H.SectionLoader,{}),m||E?(0,an.jsx)(Bs,{linkGen:n,viewType:te,filter:j}):(0,an.jsx)("div",{children:(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_approvals.no_approval_invitations"})})})]})]})},qs=e=>{let{classifierApiEndpoint:t,linkGen:n,myViewsApiEndpoint:s,userApiEndpoint:o,userInfo:{activeRole:i}}=e;const r=(0,Sn.useDispatch)(),[c,u]=(0,G.useState)(!1),[p,h]=(0,G.useState)(!1),[m,g]=(0,G.useState)(!1),[S,f]=(0,G.useState)(null),[I,T]=(0,G.useState)(null),[E,_]=(0,G.useState)(null),v={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[],institutionUsers:[],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},y={...v,operationStates:[ws.MENTOIMSEIS_TEOSTAMISEL]},b={...v,operationStates:[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_JATKAMINE]},N={...v,operationStates:[ws.MENTOIMSEIS_OOTEL]},[O,A]=(0,G.useState)(y),[U,w]=(0,G.useState)(b),[j,C]=(0,G.useState)(N),[L,P]=(0,G.useState)(!1),R=new He(new ft({basePath:o})),K=new Xe(new ft({basePath:o})),F=new mt(new ft({basePath:s})),k=new we(new ft({basePath:t}));return(0,G.useEffect)((()=>{var e;R.getJurKovPersons().then((e=>{r(d(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)})),K.getJurUsers(null!==(e=null==i?void 0:i.businessId)&&void 0!==e?e:0).then((e=>{r(l(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)})),k.getAllDocumentTypes().then((e=>{r(a(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)}))}),[]),(0,G.useEffect)((()=>{!function(){const e=L?null==i?void 0:i.businessId:null==i?void 0:i.userId;u(!0),F.findOperations({personId:L?e:void 0,userId:L?void 0:e,type:[de.MENTOIMLIIK_ARVAMUS],states:Us.MENTOIMSEIS_TEOSTAMISEL.concat(Us.MENTOIMSEIS_TEOSTATUD,Us.MENTOIMSEIS_LOOBUTUD,Us.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{r(D(e.data)),f(e.data),u(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),u(!1)}))}()}),[L]),(0,G.useEffect)((()=>{h(!0),F.findOperationsToComment({userId:null==i?void 0:i.userId,type:[de.MENTOIMLIIK_ARVAMUS],states:Us.MENTOIMSEIS_TEOSTAMISEL.concat(Us.MENTOIMSEIS_TEOSTATUD,Us.MENTOIMSEIS_LOOBUTUD,Us.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{r(x(e.data)),T(e.data),h(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),h(!1)})),g(!0),F.findOperationInvitations({userId:void 0,personId:null==i?void 0:i.businessId,type:[de.MENTOIMLIIK_ARVAMUS],states:Us.MENTOIMSEIS_OOTEL.concat(Us.MENTOIMSEIS_TEOSTAMISEL,Us.MENTOIMSEIS_TYHISTATUD,Us.MENTOIMSEIS_LOOBUTUD,Us.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{r(M(e.data)),_(e.data),g(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),g(!1)}))}),[]),(0,an.jsxs)("div",{children:[(0,an.jsxs)(H.Section,{collapsed:!1,title:"my_opinions.my_opinions",showSettings:!0,filterContents:(0,an.jsx)(Hs,{viewType:Z,filterState:O,onSubmit:e=>A(e)}),children:[c&&(0,an.jsx)(H.SectionLoader,{}),c||S?(0,an.jsx)(Bs,{linkGen:n,viewType:X,filter:O,isAllUsersChecked:L,onAllUsersChecked:e=>{P(e)}}):(0,an.jsxs)("div",{children:[(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_opinions.no_opinions"})}),(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Link,{text:"my_opinions.view_all_institution_opinions",onClick:()=>{P(!0)}})})]})]}),(0,an.jsxs)(H.Section,{collapsed:!1,title:"my_opinions.opinions_to_comment",showSettings:!0,filterContents:(0,an.jsx)(Hs,{viewType:ee,filterState:U,onSubmit:e=>w(e)}),children:[p&&(0,an.jsx)(H.SectionLoader,{}),p||I?(0,an.jsx)(Bs,{linkGen:n,viewType:ee,filter:U}):(0,an.jsx)("div",{children:(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_opinions.no_opinions_to_comment"})})})]}),(0,an.jsxs)(H.Section,{collapsed:!1,title:"my_opinions.opinion_invitations",showSettings:!0,filterContents:(0,an.jsx)(Hs,{viewType:te,filterState:j,onSubmit:e=>C(e)}),children:[m&&(0,an.jsx)(H.SectionLoader,{}),m||E?(0,an.jsx)(Bs,{linkGen:n,viewType:te,filter:j}):(0,an.jsx)("div",{children:(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_opinions.no_opinion_invitations"})})})]})]})},$s=e=>{const t=(0,B.useIntl)(),n=/^[\\s0-9]{0,9}$/,s=/^([\\s0-9]{5}:[\\s0-9]{3}:[\\s0-9]{1,4}|[\\s0-9]{5}:[\\s0-9]{1,3}|[\\s0-9]{1,5})$/,o={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_TEOSTATUD,ws.MENTOIMSEIS_LOOBUTUD],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},[i,r]=(0,G.useState)(e.filterState),[a,l]=(0,G.useState)(Ys(i.operationStates)),[d,c]=(0,G.useState)(!0),[u,p]=(0,G.useState)(!0),[h,m]=(0,G.useState)(""),g=(0,G.useMemo)((()=>Fs()),[]),[S,f]=(0,G.useState)([]),I=(0,G.useMemo)((()=>Ks(Q,t)),[]),[T,E]=(0,G.useState)([]),_=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutions));function v(e){return n.test(e)}function y(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],i[t]=n,r((e=>({...e})))}function b(e,t){var n;i[t]=e,"ehrCode"===t&&v(e)?c(!0):"cadastralNumber"===t&&(0===(n=e).length||s.test(n))&&p(!0),r((e=>({...e})))}(0,G.useEffect)((()=>{if(_){const e=ds([..._]);f(e)}}),[_]);return(0,an.jsxs)(H.Form,{onSubmit:()=>e.onSubmit(i),children:[(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:g,onSelect:e=>y(e,"documentTypes"),allSelection:!0,onRemoveItem:e=>y(e,"documentTypes"),value:i.documentTypes,selectedOptions:T}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.document_type"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,an.jsx)(H.Col,{})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>b(e,"ehrCode"),onBlur:e=>c(v(e.trim())),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.ehrCode}),errorMessage:!d&&(0,an.jsx)(H.Text,{raw:"filter.invalid_building_code"}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.ehrCode"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>b(e,"wordInAddress"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.wordInAddress}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.word_in_address"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:S,onSelect:e=>y(e,"institutions"),allSelection:!0,onRemoveItem:e=>y(e,"institutions"),value:i.institutions,selectedOptions:T}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.institution"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,an.jsx)(H.Col,{})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>b(e,"proceedingNumber"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.proceedingNumber}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_operations.filter.label.proceeding_number"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:I,onSelect:e=>y(e,"operationStates"),allSelection:!0,onRemoveItem:e=>y(e,"operationStates"),value:i.operationStates,selectedOptions:a}),label:(0,an.jsx)(B.FormattedMessage,{id:"my_involvements.filter.label.involvement_state"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.FieldWrapper,{component:(0,an.jsx)(cs,{onChange:e=>(e=>{""!==e.from&&!In()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!In()(e.to,"YYYY-MM-DD",!0).isValid()?m(t.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?m(t.formatMessage({id:"filter.invalid_date_range"})):m(""),r((t=>({...t,operationDate:e})))})(e),value:i.operationDate}),errorMessage:h.length>0?h:null,label:(0,an.jsx)(B.FormattedMessage,{id:"my_involvements.filter.label.involvement_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,an.jsx)(H.Col,{})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{onClick:()=>(E([]),r(o),void l(Ys(o.operationStates))),colourScheme:"light",squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.epmty_fields"})})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!(d&&u),squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.search"})})})]})]})},zs=e=>{var t;let{classifierApiEndpoint:n,linkGen:s,myViewsApiEndpoint:o,userInfo:i,userApiEndpoint:r}=e;const l=(0,Sn.useDispatch)(),[c,u]=(0,G.useState)(!1),[p,h]=(0,G.useState)([]),m=!(void 0===i||"A"===(null==i||null===(t=i.activeRole)||void 0===t?void 0:t.businessType)),g={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_TEOSTATUD,ws.MENTOIMSEIS_LOOBUTUD],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},[S,f]=(0,G.useState)(g),I=new He(new ft({basePath:r})),T=new mt(new ft({basePath:o})),E=new we(new ft({basePath:n}));return(0,G.useEffect)((()=>{var e;I.getJurKovPersons().then((e=>{l(d(e.data))})).catch((e=>{console.log(e)})),E.getAllDocumentTypes().then((e=>{l(a(e.data))})).catch((e=>{console.log(e)})),u(!0),T.findOperations({userId:void 0,personId:m?null===(e=i.activeRole)||void 0===e?void 0:e.businessId:i.personId,type:[de.MENTOIMLIIK_KAASAMINE,de.MENTOIMLIIK_KAAS_TAGASISIDE],states:[ws.MENTOIMSEIS_OOTEL,ws.MENTOIMSEIS_TEOSTAMISEL,ws.MENTOIMSEIS_TEOSTATUD,ws.MENTOIMSEIS_VALMIS,ws.MENTOIMSEIS_JATKAMINE,ws.MENTOIMSEIS_TYHISTATUD,ws.MENTOIMSEIS_LOOBUTUD,ws.MENTOIMSEIS_KEELDUTUD,ws.MENTOIMSEIS_TAGASI_LYKATUD,ws.MENTOIMSEIS_TAHTAEG_MOODUNUD]}).then((e=>{l(D(e.data)),h(e.data),u(!1)})).catch((e=>{console.log("Following error occured:",e),u(!1)}))}),[i]),(0,an.jsx)("div",{children:(0,an.jsx)(H.Section,{collapsed:!1,title:"my_involvements.my_involvements",showSettings:!0,filterContents:(0,an.jsx)($s,{filterState:S,onSubmit:e=>f(e)}),children:c?(0,an.jsx)(H.SectionLoader,{}):0===p.length?(0,an.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,an.jsx)(H.Text,{raw:"my_involvements.no_involvements"})}):(0,an.jsx)(Bs,{linkGen:s,viewType:Q,filter:S})})})};function Xs(e){return e.map((e=>({id:e.code+"",label:e.value,level:2,children:[],selectable:!0,value:!1})))}function Qs(e){let t=Xs([{code:"EHITIS_SEISUND_KAVAN",value:"Kavandatav"},{code:"EHITIS_SEISUND_PYSTI",value:"Püstitamisel"},{code:"EHITIS_SEISUND_OLEMA",value:"Olemas"},{code:"EHITIS_SEISUND_LAMEL",value:"Lammutamisel"},{code:"EHITIS_SEISUND_LAMUT",value:"Lammutatud"},{code:"EHITIS_SEISUND_REATA",value:"Realiseerimata"},{code:"EHITIS_SEISUND_KUSTU",value:"Kustutatud"}]);return e?t:t.slice(0,-1)}const Zs=[{code:"EHITIS_OMANDI_LIIK_KINNIS",value:"Kinnisasi"},{code:"EHITIS_OMANDI_LIIK_VALLAS",value:"Vallasasi"},{code:"EHITIS_OMANDI_LIIK_VALLASRO",value:"Reaalosa kui vallasasi"}];function eo(){return Xs(Zs)}function to(e){let t=[];for(let n of e)t.push(n.id),t.push(...to(n.children?n.children:[]));return t}const no=e=>{const t=(0,B.useIntl)(),n={buildingLocation:"",buildingName:"",buildingStates:[],firstUseDate:{from:"",to:""},firstUseMissing:!1,buildingType:[],purposeOfUse:[],ownershipType:[],owner:void 0,isPrivatePerson:!1,searchType:se},s=(0,Sn.useSelector)((e=>e.myViewsPage.filter.usageClassifierTypes)),o=(0,Sn.useSelector)((e=>e.myViewsPage.detailSearch.buildings)),[i,r]=(0,G.useState)(n),[a,l]=(0,G.useState)([]),[d,c]=(0,G.useState)(Qs(e.isAdminRole)),[u]=(0,G.useState)(Xs([{code:"H",value:"Hoone"},{code:"R",value:"Rajatis"}])),[p]=(0,G.useState)(eo()),[h,m]=(0,G.useState)([]),[g,S]=(0,G.useState)({}),[f,I]=(0,G.useState)(""),[T,E]=(0,G.useState)({}),[_,v]=(0,G.useState)(""),[y,b]=(0,G.useState)(!1),[D,x]=(0,G.useState)({code:"",value:""}),M=(0,G.useRef)(),[N,O]=(0,G.useState)({});function A(e,t){let n;n=e.selectedData.length>0?void 0!==e.selectedData[0].data?e.selectedData[0].data.map((e=>e.id)):e.selectedData.map((e=>e.id)).flat():[],i[t]=n,r((e=>({...e})))}function U(e,t){let n;if(e.selectedData.length>0){n=to(void 0===e.selectedData[0].data?e.selectedData:e.selectedData[0].data)}else n=[];i[t]=n,r((e=>({...e})))}function w(e,t){i[t]=e,r((e=>({...e})))}(0,G.useEffect)((()=>{if(s.length>0){const e=function(e){let t={id:"00000",label:"00000",parentId:"0",level:1,value:!1,selectable:!1,children:[]};for(let n of e){const{code:e,name:s,validTo:o}=n;let i=e.replace(/0/g,""),r=i.slice(0,i.length-1),a=t;for(let e=2;e<=r.length;e++)if(a.children){let t=a.children.find((t=>t.id.replace(/0/g,"")===r.slice(0,e)));t&&(a=t)}if(a.children){const t=`${e} ${s}${null!=o&&o.trim()?` (kuni ${o})`:""}`;a.children.push({id:n.id+"",parentId:a.id,label:t,level:a.level+1,children:[],selectable:!0,value:!1})}}return t.children?t.children:[]}([...s].sort(((e,t)=>Number(e.code)-Number(t.code))));m(e)}}),[s]),(0,G.useEffect)((()=>{c(Qs(e.isAdminRole))}),[e.isAdminRole]);const j={sm:20,md:8,lg:8};return(0,an.jsxs)(H.Form,{onSubmit:()=>function(){if(JSON.stringify(n)===JSON.stringify(i))E({header:"detailsearch.empty_filter_error.header",message:"detailsearch.empty_filter_error.message"});else if(i.firstUseMissing){let t={...i};t.firstUseDate={from:"",to:""},e.onSubmit(t)}else E({header:"",message:""}),e.onSubmit(i)}(),children:[T.header&&T.header.length>0&&T.message&&T.message.length>0&&(0,an.jsx)(H.MessageBlock,{dismissible:!0,header:(0,an.jsx)(B.FormattedMessage,{id:T.header}),onDismiss:()=>E({header:"",message:""}),theme:"danger",messages:[(0,an.jsx)(B.FormattedMessage,{id:T.message})]}),o&&o.length>=500&&(0,an.jsx)(H.MessageBlock,{dismissible:!0,header:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.empty_filter_error.header"}),theme:"warning",messages:[(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter_error_message.more_than_500_results"})]}),(0,an.jsxs)(H.Row,{className:"align-items-start",children:[(0,an.jsxs)(H.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>w(e,"buildingLocation"),placeholder:t.formatMessage({id:"detailssearch.filter.placeholder.address"}),value:i.buildingLocation}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.building_location"}),info:{content:"detailsearch.filter.tooltip.building_location",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>w(e,"buildingName"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.buildingName}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.building_name"}),info:{content:"detailsearch.filter.tooltip.building_name",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:d,onSelect:e=>A(e,"buildingStates"),allSelection:!0,onRemoveItem:e=>A(e,"buildingStates"),value:i.buildingStates,selectedOptions:a}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.building_state"}),info:{content:"detailsearch.filter.tooltip.building_state",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)("div",{className:"daterange_in_form",children:(0,an.jsx)(H.NumberRangeExtended,{value:{from:i.firstUseDate.from,to:i.firstUseDate.to},onChange:e=>function(e){I(""),E({header:"",message:""});let t=null!==e.from?e.from:"",n=null!==e.to?e.to:"";r((e=>({...e,firstUseDate:{from:t,to:n}})))}(e),onBlur:e=>function(e){let n=Number(e.from),s=Number(e.to);n<0||n>2100||s<0||s>2100?I(t.formatMessage({id:"detailsearch.error_field.year-between"})):null!==e.from&&null!==e.to&&n>s?I(t.formatMessage({id:"detailsearch.error_field.beginning-bigger"})):(I(""),E({header:"",message:""}))}(e),onlyPositive:!0,disabled:i.firstUseMissing})}),errorMessage:f,label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.first_use"}),info:{content:"detailsearch.filter.tooltip.first_use",placement:"top-start"}}),(0,an.jsx)(an.Fragment,{children:is(i.firstUseMissing,(function(e){r((t=>({...t,firstUseMissing:e})))}),"detailsearch.filter.label.checkbox.first_use_missing","detailsearch.filter.tooltip.checkbox.first_use_missing",j)})]}),(0,an.jsxs)(H.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:u,onSelect:e=>A(e,"buildingType"),allSelection:!0,onRemoveItem:e=>A(e,"buildingType"),value:i.buildingType,selectedOptions:a}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.building_type"}),info:{content:"detailsearch.filter.tooltip.building_type",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:h,onSelect:e=>U(e,"purposeOfUse"),allSelection:!0,onRemoveItem:e=>U(e,"purposeOfUse"),value:i.purposeOfUse,selectedOptions:a,isSearchExactMatch:!0}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.purpose_of_use"}),info:{content:"detailsearch.filter.tooltip.purpose_of_use",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:p,onSelect:e=>A(e,"ownershipType"),allSelection:!0,onRemoveItem:e=>A(e,"ownershipType"),value:i.ownershipType,selectedOptions:a}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.ownershiptype"}),info:{content:"detailsearch.filter.tooltip.ownershiptype",placement:"top-start"}})]}),e.isAdminPlusRole&&(0,an.jsx)(an.Fragment,{children:(0,an.jsxs)(H.Row,{className:"align-items-center w-100",children:[(0,an.jsx)(H.Col,{xs:20,md:20,lg:10,className:"px-0",children:(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.PersonSearchPageExtended,{person:g,disabled:!1,labelKey:"code",valueKey:"value",onInputChange:e=>{!function(e){v(e)}(e)},updatedFromAR:()=>{},onPersonUpdate:e=>function(e){var t,n,s;if(S(e),e&&e.id&&e.id>0&&O(e),e&&(_===e.idCode||_===(null===(t=e.id)||void 0===t?void 0:t.toString())||_===e.regCode)||e&&D.code===e.regCode)i.owner=null===(s=e.id)||void 0===s?void 0:s.toString(),r((e=>({...e})));else if(e||_.substring(4)!==(null===(n=N.id)||void 0===n?void 0:n.toString()))e||(i.owner=void 0,r((e=>({...e}))));else{var o;i.owner=null===(o=N.id)||void 0===o?void 0:o.toString(),r((e=>({...e})))}}(e),searchPerson:e.callSearchPerson,handlePersonSelection:e=>x(e),isShowError:e=>{b(e),e||E({header:"",message:""})},searchOnBlur:!0,ref:M,isOptionalField:!0,isPrivateOwner:i.isPrivatePerson}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.owner"}),info:{content:"detailsearch.filter.tooltip.owner.extended",placement:"top-start"}})}),(0,an.jsx)(H.Col,{xs:20,md:20,lg:10,children:is(i.isPrivatePerson,(function(e){r((t=>({...t,isPrivatePerson:e})))}),"detailsearch.filter.label.checkbox.owner.private","",{xs:20,md:1})})]})})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{onClick:()=>(l([]),r(n),M.current.clearTypeahead(),void S({})),colourScheme:"light",squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.epmty_fields"})})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!!(f.length>0||y),squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.search"})})})]})]})},so=e=>{const t=(0,B.useIntl)(),n={buildingLocation:"",buildingName:"",institutions:[],documentDate:{from:"",to:""},documentType:[],documentNr:"",documentState:[],connectedPerson:void 0},[s,o]=(0,G.useState)(n),[i,r]=(0,G.useState)(""),[a,l]=(0,G.useState)([]),[d,c]=(0,G.useState)([]),[u,p]=(0,G.useState)([]),[h]=(0,G.useState)(Xs([{code:Un.DO_DOKUSEIS_ESITATUD,value:"Esitatud"},{code:Un.DO_DOKUSEIS_KOOSTAMISEL,value:"Koostamisel"},{code:Un.DO_DOKUSEIS_MENETLUSES,value:"Menetluses"},{code:Un.DO_DOKUSEIS_MUUTMISEL,value:"Muutmisel"},{code:Un.DO_DOKUSEIS_TAIENDAMISEL,value:"Täiendamisel"},{code:Un.DO_DOKUSEIS_KEHTETU,value:"Kehtetu"},{code:Un.DO_DOKUSEIS_REG_KANTUD,value:"Registrisse kantud"},{code:Un.DO_DOKUSEIS_TYHISTATUD,value:"Tühistatud"},{code:Un.DO_DOKUSEIS_LOOBUTUD,value:"Tagasi võetud"},{code:Un.DO_DOKUSEIS_ALLKIRJASTAMISEL,value:"Allkirjastamisel"},{code:Un.DO_DOKUSEIS_VANA_VERSIOON,value:"Vana versioon"}].sort(((e,t)=>e.value.localeCompare(t.value))))),[m,g]=(0,G.useState)({}),[S,f]=(0,G.useState)(""),[I,T]=(0,G.useState)(!1),[E,_]=(0,G.useState)({code:"",value:""}),[v,y]=(0,G.useState)({}),[b,D]=(0,G.useState)(!1),x=(0,G.useRef)(),M=(0,Sn.useSelector)((e=>e.myViewsPage.filter.documentTypes)),N=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutions)),O=(0,Sn.useSelector)((e=>e.myViewsPage.detailSearch.documents));function A(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],s[t]=n,o((e=>({...e})))}function U(e,t){s[t]=e.trim(),o((e=>({...e})))}function w(e){return!(!In()(e,"YYYY-MM-DD",!0).isValid()&&!In()(e,"D.M.YYYY",!0).isValid())}(0,G.useEffect)((()=>{if(M){const e=as(M);c(e)}if(N){const e=ds([...N]);p(e)}}),[M,N]);const j={sm:20,md:8,lg:8};return(0,an.jsxs)(H.Form,{onSubmit:()=>{i.length>0?D(!0):JSON.stringify(n)===JSON.stringify(s)?y({header:"detailsearch.empty_filter_error.header",message:"detailsearch.empty_filter_error.message"}):(e.onSubmit(s),y({header:"",message:""}))},children:[v.header&&v.header.length>0&&v.message&&v.message.length>0&&(0,an.jsx)(H.MessageBlock,{dismissible:!0,header:(0,an.jsx)(B.FormattedMessage,{id:v.header}),onDismiss:()=>y({header:"",message:""}),theme:"danger",messages:[(0,an.jsx)(B.FormattedMessage,{id:v.message})]}),O&&O.length>500&&(0,an.jsx)(H.MessageBlock,{dismissible:!0,header:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.empty_filter_error.header"}),theme:"warning",messages:[(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter_error_message.more_than_500_results"})]}),(0,an.jsxs)(H.Row,{className:"align-items-start",children:[(0,an.jsxs)(H.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>U(e,"buildingLocation"),placeholder:t.formatMessage({id:"detailsearch.filter.placeholder.address_catastralUnit_ehrCode"}),value:s.buildingLocation}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.building_location"}),info:{content:"detailsearch.filter.tooltip.address_catastralUnit_ehrCode.extended",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>U(e,"buildingName"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:s.buildingName}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.building_name"}),info:{content:"detailsearch.filter.tooltip.building_name",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:u,onSelect:e=>A(e,"institutions"),allSelection:!0,onRemoveItem:e=>A(e,"institutions"),value:s.institutions,selectedOptions:a}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.institution"})}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)("div",{className:"daterange_in_form",children:(0,an.jsx)(H.DateRange,{onBlur:()=>{D(!0)},value:s.documentDate,onChange:e=>(e=>{""!==e.from&&!w(e.from)||""!==e.to&&!w(e.to)?r(t.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&In()(e.from)>In()(e.to)?r(t.formatMessage({id:"filter.invalid_date_range"})):""!==e.from&&(In()(e.from)<In()("01.01.1990")||In()(e.from)>In()())||""!==e.to&&(In()(e.to)<In()("01.01.1990")||In()(e.to)>In()())?r(t.formatMessage({id:"detailsearch.document.date_range_error.message"},{dateToday:In()().format("DD.MM.YYYY")})):In()(e.to).diff(In()(e.from),"days")>367?r(t.formatMessage({id:"detailsearch.filter_error_message.date_range_too_long"})):(r(""),D(!1)),o((t=>({...t,documentDate:e})))})(e)})}),errorMessage:b&&i.length>0?i:null,label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.document_date"}),info:{content:"detailsearch.filter.tooltip.document_date",placement:"top-start"}})]}),(0,an.jsxs)(H.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:d,onSelect:e=>A(e,"documentType"),allSelection:!0,onRemoveItem:e=>A(e,"documentType"),value:s.documentType,selectedOptions:a}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.document_type"}),info:{content:"detailsearch.filter.tooltip.document_type",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>U(e,"documentNr"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:s.documentNr}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.document_nr"}),info:{content:"detailsearch.filter.tooltip.document_nr",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:h,onSelect:e=>A(e,"documentState"),allSelection:!0,onRemoveItem:e=>A(e,"documentState"),value:s.documentState,selectedOptions:a}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.document_state"})})]})]}),!e.isNonAuthenticatedUser&&(0,an.jsx)(H.Row,{children:(0,an.jsx)(H.Col,{xs:20,md:20,lg:10,className:"px-0",children:(0,an.jsx)(H.FieldWrapper,{labelCol:j,component:(0,an.jsx)(H.PersonSearchPageExtended,{person:m,disabled:!1,labelKey:"code",valueKey:"value",onInputChange:e=>{!function(e){f(e),E.code.length>0&&_({code:"",value:""})}(e)},updatedFromAR:()=>{},onPersonUpdate:e=>function(e){var t;g(e),e&&(S===e.idCode||S===(null===(t=e.id)||void 0===t?void 0:t.toString())||S===e.regCode)||e&&E.code===e.regCode?(s.connectedPerson=e.id,o((e=>({...e})))):e||(s.connectedPerson=void 0,o((e=>({...e}))))}(e),searchPerson:e.callSearchPerson,handlePersonSelection:e=>_(e),isShowError:e=>{T(e),e||y({header:"",message:""})},searchOnBlur:!0,ref:x,isOptionalField:!0}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.connected_person"}),info:{content:"detailsearch.filter.tooltip.connected_person.extended",placement:"top-start"}})})}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{onClick:()=>(l([]),o(n),x.current.clearTypeahead(),void g({})),colourScheme:"light",squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.epmty_fields"})})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!!(b&&i.length>0||I),squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.search"})})})]})]})},oo=e=>{const t=(0,B.useIntl)(),n={documentType:[],documentNr:"",proceedingDate:{from:"",to:""},proceedingNr:"",institutions:[]},[s,o]=(0,G.useState)(n),[i,r]=(0,G.useState)([]),[a,l]=(0,G.useState)([]),[d,c]=(0,G.useState)([]),[u,p]=(0,G.useState)(""),[h,m]=(0,G.useState)({}),[g,S]=(0,G.useState)(!1),f=(0,Sn.useSelector)((e=>e.myViewsPage.filter.documentTypes)),I=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutions)),T=(0,Sn.useSelector)((e=>e.myViewsPage.detailSearch.proceedings));function E(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],s[t]=n,o((e=>({...e})))}function _(e,t){s[t]=e,o((e=>({...e})))}function v(e){return!(!In()(e,"YYYY-MM-DD",!0).isValid()&&!In()(e,"D.M.YYYY",!0).isValid())}(0,G.useEffect)((()=>{if(f){const e=as(f);l(e)}if(I){const e=ds([...I]);c(e)}}),[f,I]);const y={sm:20,md:8,lg:8};return(0,an.jsxs)(H.Form,{onSubmit:()=>{u.length>0?S(!0):JSON.stringify(n)===JSON.stringify(s)?m({header:"detailsearch.empty_filter_error.header",message:"detailsearch.empty_filter_error.message"}):(e.onSubmit(s),m({header:"",message:""}))},children:[h.header&&h.header.length>0&&h.message&&h.message.length>0&&(0,an.jsx)(H.MessageBlock,{dismissible:!0,header:(0,an.jsx)(B.FormattedMessage,{id:h.header}),onDismiss:()=>m({header:"",message:""}),theme:"danger",messages:[(0,an.jsx)(B.FormattedMessage,{id:h.message})]}),T&&T.length>500&&(0,an.jsx)(H.MessageBlock,{dismissible:!0,header:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.empty_filter_error.header"}),theme:"warning",messages:[(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter_error_message.more_than_500_results"})]}),(0,an.jsxs)(H.Row,{className:"align-items-start",children:[(0,an.jsxs)(H.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,an.jsx)(H.FieldWrapper,{labelCol:y,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:a,onSelect:e=>E(e,"documentType"),allSelection:!0,onRemoveItem:e=>E(e,"documentType"),value:s.documentType,selectedOptions:i}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.document_type"}),info:{content:"detailsearch.filter.tooltip.document_type",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:y,component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>_(e,"documentNr"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:s.documentNr}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.document_nr"}),info:{content:"detailsearch.filter.tooltip.document_nr",placement:"top-start"}}),(0,an.jsx)(H.FieldWrapper,{labelCol:y,component:(0,an.jsx)("div",{className:"daterange_in_form",children:(0,an.jsx)(H.DateRange,{onChange:e=>(e=>{""!==e.from&&!v(e.from)||""!==e.to&&!v(e.to)?p(t.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&In()(e.from)>In()(e.to)?p(t.formatMessage({id:"filter.invalid_date_range"})):""!==e.from&&(In()(e.from)<In()("01.01.1990")||In()(e.from)>In()())||""!==e.to&&(In()(e.to)<In()("01.01.1990")||In()(e.to)>In()())?p(t.formatMessage({id:"detailsearch.proceeding.date_range_error.message"},{dateToday:In()().format("DD.MM.YYYY")})):In()(e.to).diff(In()(e.from),"days")>367?p(t.formatMessage({id:"detailsearch.filter_error_message.date_range_too_long"})):(p(""),S(!1)),o((t=>({...t,proceedingDate:e})))})(e),value:s.proceedingDate,onBlur:()=>{S(!0)}})}),errorMessage:g&&u.length>0?u:null,label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.proceeding_date"}),info:{content:"detailsearch.filter.tooltip.proceeding_date",placement:"top-start"}})]}),(0,an.jsxs)(H.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,an.jsx)(H.FieldWrapper,{labelCol:y,component:(0,an.jsx)(H.Input,{name:"input",onChange:e=>_(e,"proceedingNr"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:s.proceedingNr}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.proceeding_nr"})}),(0,an.jsx)(H.FieldWrapper,{labelCol:y,component:(0,an.jsx)(H.Multiselect,{name:"multiselect",options:d,onSelect:e=>E(e,"institutions"),allSelection:!0,onRemoveItem:e=>E(e,"institutions"),value:s.institutions,selectedOptions:i}),label:(0,an.jsx)(B.FormattedMessage,{id:"detailsearch.filter.label.institution"})})]})]}),(0,an.jsxs)(H.Row,{children:[(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{onClick:()=>(r([]),void o(n)),colourScheme:"light",squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.epmty_fields"})})}),(0,an.jsx)(H.Col,{children:(0,an.jsx)(H.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!!(g&&u.length>0),squared:!0,children:(0,an.jsx)(B.FormattedMessage,{id:"button.search"})})})]})]})},io={EHITIS_SEISUND_KAVAN:["EHITIS_SEISUND_KAVAN","EHITIS_SEISUND_EHITAM_LUBA","EHITIS_SEISUND_MENETLUSES"],EHITIS_SEISUND_PYSTI:["EHITIS_SEISUND_PYSTI","EHITIS_SEISUND_EHITAMISEL"],EHITIS_SEISUND_OLEMA:["EHITIS_SEISUND_OLEMA","EHITIS_SEISUND_KASUTUSEL","EHITIS_SEISUND_KASUT_OSALINE","EHITIS_SEISUND_KASUT_LUBA_EIKEH","EHITIS_SEISUND_LAMMUT_LUBA","EHITIS_SEISUND_KASUT_MAAS","EHITIS_SEISUND_EBASEADUSLIK","EHITIS_SEISUND_MAARAMATA"],EHITIS_SEISUND_LAMEL:["EHITIS_SEISUND_LAMEL","EHITIS_SEISUND_LAMMUTAMISEL"],EHITIS_SEISUND_LAMUT:["EHITIS_SEISUND_LAMUT","EHITIS_SEISUND_LAMMUTATUD"],EHITIS_SEISUND_REATA:["EHITIS_SEISUND_REATA","EHITIS_SEISUND_EHITAM_LUBA_EIKEH"],EHITIS_SEISUND_KUSTU:["EHITIS_SEISUND_KUSTU","EHITIS_SEISUND_KUSTUTATUD","EHITIS_SEISUND_REG_OBJ_LOPP","EHITIS_SEISUND_ARHIIVIS"]};function ro(e){const t=function(e){return Kn(io,e)}(e);return t?function(e){switch(e){case"EHITIS_SEISUND_KAVAN":return{name:"Kavandatav",type:"info"};case"EHITIS_SEISUND_PYSTI":return{name:"EHITIS_SEISUND_PYSTI",type:"info"};case"EHITIS_SEISUND_OLEMA":return{name:"On",type:"success"};case"EHITIS_SEISUND_LAMEL":return{name:"Lammutamisel",type:"info"};case"EHITIS_SEISUND_LAMUT":return{name:"Lammutatud",type:"default"};case"EHITIS_SEISUND_REATA":return{name:"Realiseerimata",type:"default"};case"EHITIS_SEISUND_KUSTU":return{name:"Kustutatud",type:"default"};default:return{name:e,type:"default"}}}(t):{name:e,type:"default"}}const ao=e=>{const t=(0,B.useIntl)(),[n,s]=(0,G.useState)([]),o=(0,Sn.useSelector)((e=>e.myViewsPage.detailSearch.buildings));(0,G.useEffect)((()=>{if(o&&o.length>0){const t=e.isAdminRole?o:o.filter((e=>"EHITIS_SEISUND_KUSTU"!==e.buildingState.code));s(t)}}),[o]);const i=[{id:"ehr_code",property:"ehrCode",size:130,isFrozen:!0,getValue:e=>e.ehrCode?e.ehrCode:"",getFormattedValue:t=>{const{generateLink:n}=e,s=t.ehrCode?n(ie,String(t.ehrCode),null,!1,!1,null):null;return t.ehrCode&&null!==t.ehrCode?(0,an.jsx)(un,{linkName:t.ehrCode,tooltipText:"detailsearch.tooltip.open_building",href:s||void 0}):""}},{id:"building_address",property:"buildingaddress",size:160,getValue:e=>{var t;return null!==(t=e.buildingaddress)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingaddress&&null!==e.buildingaddress?e.buildingaddress.map((e=>(0,an.jsx)("div",{children:e}))):""},{id:"building_name",property:"buildingName",size:130,getValue:e=>{var t;return null!==(t=e.buildingName)&&void 0!==t?t:""}},{id:"building_state",property:"buildingState",size:130,getValue:e=>{var t;return null!==(t=e.buildingState)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingState&&null!==e.buildingState?(0,an.jsx)(H.Status,{type:ro(e.buildingState.code).type,children:e.buildingState.value}):""},{id:"purpose_of_use",property:"purposeOfUse",size:150,getValue:e=>{var t,n;return null!==(t=null===(n=e.purposeOfUse)||void 0===n?void 0:n.value)&&void 0!==t?t:""}},{id:"first_use_date",property:"firstUseDate",size:150,getValue:e=>{var t;return null!==(t=e.firstUseDate)&&void 0!==t?t:""}},{id:"under_area",property:"underArea",size:130,getValue:e=>e.underArea?e.underArea:""},{id:"floor_count",property:"floorCount",size:130,getValue:e=>e.floorCount?e.floorCount:""},{id:"ownership_type",property:"ownershipType",size:130,getValue:e=>{var t,n;return null!==(t=null===(n=e.ownershipType)||void 0===n?void 0:n.value)&&void 0!==t?t:""}},{id:"owner",property:"owner",size:130,getValue:e=>{var t;return null!==(t=e.owner)&&void 0!==t?t:""},getFormattedValue:e=>e.owner?e.owner.map((e=>function(e){var t;const n=e.eesnimi?e.eesnimi+" "+e.perenimi:void 0,s=e.isikukood?(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)("br",{}),"IK "+e.isikukood]}):void 0,o=null!==e.regKood,i=null!==(t=e.jiNimi)&&void 0!==t?t:"";return!0===o?(0,an.jsx)("div",{children:i}):n?(0,an.jsxs)("div",{children:[n,null!=s?s:""]}):""}(e))):""}];return(0,an.jsx)("div",{children:(0,an.jsx)(H.TableComponent,{config:{thead:{headers:(e.isAdminPlusRole?i:i.slice(0,-1)).map((e=>({id:e.id,size:e.size,className:"table-header-field text-align-left",label:t.formatMessage({id:"detailsearch.buildings.table.header."+e.id}),tooltip:{text:t.formatMessage({id:"detailsearch.buildings.table.tooltip."+e.id})},propertyName:e.property,sortable:!0,isShown:!0,isFrozen:e.isFrozen,type:"input",valueFormatter:t=>e.getFormattedValue?e.getFormattedValue(t):e.getValue(t)}))),icons:cn,expandableRow:!1,isFilter:!1}},data:function(e){return e.map((e=>({buildingaddress:e.buildingaddress,buildingId:e.buildingId,buildingName:e.buildingName,buildingType:e.buildingType,ehrCode:e.ehrCode,firstUseDate:e.firstUseDate,owner:e.owner,ownershipType:e.ownershipType,purposeOfUse:e.purposeOfUse,buildingState:e.buildingState,floorCount:e.floorCount,underArea:e.underArea})))}(n),handleEvent:()=>!0})})},lo="DD.MM.YYYY",co="YYYY-MM-DD";class uo{static dateToStr(e){return uo.formatDate(lo,e)}static dateToStrForDatepicker(e){return uo.formatDate(co,e)}static dateWithTimeToStr(e){return uo.formatDate("DD.MM.YYYY HH:mm",e)}static formatDate(e,t){return t?In()(t).format(e):""}static dateToMs(e,t){const n=In()(t,e);return t&&n.isValid()?n.valueOf():void 0}}const po=e=>{var t,n,s,o,i,r;const a=(0,B.useIntl)(),[l,d]=(0,G.useState)([]),c=(0,Sn.useSelector)((e=>e.myViewsPage.detailSearch.documents)),u=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutions)),p=null!==(t=null===(n=e.userInfo)||void 0===n||null===(s=n.activeRole)||void 0===s?void 0:s.businessType)&&void 0!==t?t:"",h=null!==(o=null===(i=e.userInfo)||void 0===i||null===(r=i.activeRole)||void 0===r?void 0:r.businessId)&&void 0!==o?o:0;(0,G.useEffect)((()=>{c&&c.length>0&&d(c)}),[c]);const m=e.filterStateDocumentsSearch.buildingLocation,g=e.filterStateDocumentsSearch.buildingName;const S=m?m.toString().toLowerCase().replace(/[&|=;~!$>*%_()?.+:'"\\]/g,"").replace(/\t/g," ").replace(/\s{2,}/g," ").replace(/\s?-\s?/g,"-"):"";function f(e,t){const n=(s=function(e){return e.replace(/\btn\b/g,"").replace(/\btänav\b/g,"").replace(/\btee\b/g,"").replace(/\bmaantee\b/g,"").replace(/\bmnt\b/g,"").replace(/\bküla\b/g,"").replace(/\blinnaosa\b/g,"").replace(/\blinn\b/g,"").replace(/\bpuiestee\b/g,"").replace(/\bpst\b/g,"").replace(/\bvald\b/g,"").replace(/\balevik\b/g,"").replace(/\balev\b/g,"").replace(/\bpõik\b/g,"").replace(/\blõik\b/g,"")}(e),s.replaceAll("//","").replaceAll(",","").split(/\s+/g).reduce(((e,t)=>{if(Number.isNaN(Number(t[0]))&&Number.isNaN(Number(t[1])))e.push(t);else{const n=` ${t}`;e[e.length-1]+=n}return e}),[]));var s;const o=t.replace(/\s+/g," ").split(/\/\/\s+(?=[a-z]+\b)/gi);return n.every((e=>{const t=e.trim().split(/\s+/);return o.some((e=>t.every((t=>new RegExp(`(?<![\\/\\-])\\b${t}\\b`,"i").test(e)))))}))}const I=["tn","tänav","tee","maantee","mnt","küla","linnaosa","linn","puiestee","pst","vald","alevik","alev","põik","lõik"];function T(e,t){var n;const s=null===(n=t.buildingAddress)||void 0===n?void 0:n.map((t=>function(e,t){return I.some((n=>{const s=new RegExp(`\\b(\\w+)\\s+${n}\\b`,"i"),o=e.match(s);if(o){const e=o[1];return new RegExp(`\\b${e}\\s+${n}\\b`,"i").test(t)}return!1}))}(e,t.toLowerCase())));return!!s&&s.indexOf(!0)>-1}function E(e){const t=e.filter((e=>function(e,t){var n;const s=null===(n=t.buildingAddress)||void 0===n?void 0:n.map((t=>f(e,t.toLowerCase())));return!!s&&s.indexOf(!0)>-1}(S,e)));return I.some((e=>function(e){return!new RegExp(`\\b${e}\\b`,"gi").test(e)}(e)))?t.filter((e=>T(S,e))):t}function _(){return!Number.isNaN(Number(S))}function v(){if(S&&S.indexOf(", ")>-1){return S.split(", ").reverse().join(", ")}return S}function y(e){const t=e.buildingName,n=e.buildingAddress;return t&&n&&(n.some((e=>e.toLowerCase().split(" ").some((e=>t.some((t=>t.toLowerCase().includes(e)))))))||t.some((e=>e.toLowerCase().split(" ").some((e=>n.some((t=>t.toLowerCase().includes(e))))))))}function b(e){let t=0;if(e.buildingAddress&&e.buildingAddress.length>0&&e.buildingAddress[0].length<200){const n=S.replace(",","").split(" ");let s=e.buildingAddress[0].toLowerCase().split(", ");const o=new Set;s.forEach((e=>{const t=e.split(" ")[0];return o.add(t)})),s=Array.from(o),s.forEach((e=>(n.includes(e)&&(t+=1),t)))}else t=-1;return t}const D=new RegExp(`\\b${S}\\b(?![\\/\\-])`,"i"),x=new RegExp(`\\b${v()}\\b(?![\\/\\-])`,"i"),M=S.replace(",","").split(/(?:\/|\s)+/g);function N(e){const t=e.buildingAddress;return t?t.findIndex((e=>e.toLowerCase()===S||e.toLowerCase()===v()))>-1?"exact":t.findIndex((e=>D.test(e.toLowerCase())||x.test(e.toLowerCase())))>-1?"partial":t.findIndex((e=>{const t=e.toLowerCase().replace(",","").replace(/\/\//g," ");return M.every((e=>t.includes(e)))}))>-1?"vague":"other":""}const O=["exact","partial","vague","other"];function A(e){return e.map((e=>{return t=e,{...t,title:t.docId,addressWithBuilding:y(t),addressMatch:N(t),addressRank:b(t)};var t})).sort(((e,t)=>{const n=O.indexOf(e.addressMatch),s=O.indexOf(t.addressMatch);return n!==s?n-s:e.addressWithBuilding!==t.addressWithBuilding?""===g?e.addressWithBuilding?1:-1:e.addressWithBuilding?-1:1:t.addressRank-e.addressRank}))}const U=[{id:"doc_date",property:"docDate",size:130,getValue:e=>uo.dateToStr(e.docDate),isFrozen:!0},{id:"reg_date",property:"regDate",size:130,getValue:e=>uo.dateToStr(e.regDate)},{id:"doc_nr",property:"docNr",size:160,getValue:e=>{var t;return null!==(t=e.docNr)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e,s=t.docNr?n(ae,String(t.docNr),null,!1,!1,{docId:t.docId,ehrCode:t.ehrCode}):null;return t.docNr&&null!==t.docNr?(0,an.jsx)(un,{linkName:t.docNr,tooltipText:"detailsearch.tooltip.open_document",href:s||void 0}):""}},{id:"document_type",property:"documentType",size:160,getValue:e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""}},{id:"building_name",property:"buildingName",size:130,getValue:e=>{var t;return null!==(t=e.buildingName)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingName&&null!==e.buildingName?e.buildingName.map((e=>(0,an.jsx)("div",{children:e}))):""},{id:"ehr_code",property:"ehrCode",size:130,getValue:e=>{var t;return null!==(t=e.ehrCode)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e;return t.ehrCode?t.ehrCode.map(((e,s)=>{const o=t.ehrCode?n(ie,String(e),null,!1,!1,null):null;return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(un,{linkName:e,tooltipText:"detailsearch.tooltip.open_building",href:o||void 0}),s!==t.ehrCode.length-1?(0,an.jsx)("span",{children:", "}):""]})})):""}},{id:"building_address",property:"buildingAddress",size:130,getValue:e=>{var t;return null!==(t=e.buildingAddress)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingAddress&&null!==e.buildingAddress?e.buildingAddress.map((e=>(0,an.jsx)("div",{children:e}))):""},{id:"doc_state",property:"stateCode",size:180,getValue:e=>{var t;return null!==(t=e.stateCode)&&void 0!==t?t:""},getFormattedValue:e=>e.stateCode&&null!==e.stateCode?(0,an.jsx)(H.Status,{type:Cn(e.stateCode).type,children:Cn(e.stateCode).name}):""},{id:"proceeding_nr",property:"proceedingNr",size:130,getValue:e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},getFormattedValue:t=>{var n;const{generateLink:s}=e,o=Ms(null===(n=t.doty)||void 0===n?void 0:n.toString()),i=t.proceedingNr?s(o,String(t.proceedingNr),null,!1,!1,null):null;return t.proceedingNr?p===le.MKM||t.institutionId&&h===t.institutionId?(0,an.jsx)(un,{linkName:t.proceedingNr,tooltipText:"detailsearch.tooltip.open_proceeding",href:i||void 0}):t.proceedingNr:""}},{id:"presenter",property:"presenter",size:130,getValue:e=>{var t;return null!==(t=e.presenter)&&void 0!==t?t:""},getFormattedValue:e=>e.presenter?e.presenter.map(((t,n)=>(0,an.jsxs)("div",{children:[t,n!==e.presenter.length-1?(0,an.jsx)("span",{children:", "}):""]}))):""},{id:"institution",property:"institutionName",size:130,getValue:e=>{var t;return null!==(t=e.institutionName)&&void 0!==t?t:""}}];return(0,an.jsx)(H.TableComponent,{config:{thead:{headers:U.map((e=>({id:e.id,size:e.size,className:"table-header-field text-align-left",label:a.formatMessage({id:"detailsearch.documents.table.header."+e.id}),tooltip:{text:a.formatMessage({id:"detailsearch.documents.table.tooltip."+e.id})},propertyName:e.property,sortable:!0,isShown:!0,isFrozen:e.isFrozen,type:"input",valueFormatter:t=>e.getFormattedValue?e.getFormattedValue(t):null==e?void 0:e.getValue(t)}))),icons:cn,expandableRow:!1,isFilter:!1}},data:function(e){let t;if(0===(null==m?void 0:m.indexOf('"'))&&(null==m?void 0:m.lastIndexOf('"'))===m.length-1){const n=E(e);t=_()||S.length<2?n:A(n)}else t=_()||S.length<2?e:A(e);const n=t.map((e=>{var t,n,s,o;return{docId:e.docId,docDate:null!==(t=uo.dateToMs(lo,e.docDate))&&void 0!==t?t:"",regDate:null!==(n=uo.dateToMs(lo,e.regDate))&&void 0!==n?n:"",deadlineDate:e.deadlineDate,docNr:e.docNr,documentType:e.documentType,doty:e.doty,buildingName:e.buildingName,ehrCode:e.ehrCode,buildingAddress:e.buildingAddress,state:e.state,stateCode:e.stateCode,proceedingNr:e.proceedingNr,presenter:e.presenter,institutionId:e.institutionId,institutionName:null!==(s=null===(o=u.find((t=>t.id===e.institutionId)))||void 0===o?void 0:o.regName)&&void 0!==s?s:""}}));return n}(l),handleEvent:()=>!0})},ho=e=>{var t,n,s,o;const i=(0,B.useIntl)(),[r,a]=(0,G.useState)([]),l=(0,Sn.useSelector)((e=>e.myViewsPage.detailSearch.proceedings)),d=(0,Sn.useSelector)((e=>e.myViewsPage.filter.documentTypes)),c=(0,Sn.useSelector)((e=>e.myViewsPage.filter.institutions)),u=e.userInfo&&e.userInfo.activeRole&&null!==(t=e.userInfo.activeRole)&&void 0!==t&&t.businessType?null===(n=e.userInfo.activeRole)||void 0===n?void 0:n.businessType:"",p=e.userInfo&&e.userInfo.activeRole&&null!==(s=e.userInfo.activeRole)&&void 0!==s&&s.businessId?null===(o=e.userInfo.activeRole)||void 0===o?void 0:o.businessId:0;(0,G.useEffect)((()=>{l&&l.length>0&&a(l)}),[l]);const h=[{id:"date_start",property:"dateStart",size:130,getValue:e=>uo.dateToStr(e.dateStart),isFrozen:!0},{id:"date_end",property:"dateEnd",size:130,getValue:e=>uo.dateToStr(e.dateEnd)},{id:"proceeding_nr",property:"proceedingNr",size:130,getValue:e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e,s=Ms(t.doty),o=t.proceedingNr?n(s,String(t.proceedingNr),null,!1,!1,null):null;return t.proceedingNr&&null!==t.proceedingNr?"MKM"===u||t.institutionId&&p===t.institutionId?(0,an.jsx)(un,{linkName:t.proceedingNr,tooltipText:"detailsearch.tooltip.open_proceeding",href:o||void 0}):t.proceedingNr:""}},{id:"proceeding_state",property:"proceedingState",size:200,getValue:e=>{var t;return null!==(t=e.proceedingStateCode)&&void 0!==t?t:""},getFormattedValue:e=>e.proceedingStateCode&&null!==e.proceedingStateCode?(0,an.jsx)(H.Status,{type:_s(e.proceedingStateCode).type,children:_s(e.proceedingStateCode).name}):""},{id:"document",property:"docNr",size:160,getValue:e=>{var t;return null!==(t=e.docNr)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e,s=t.docNr?n(ae,String(t.docNr),null,!1,!1,null):null;return t.docNr&&null!==t.docNr?(0,an.jsx)(un,{linkName:t.docNr,tooltipText:"detailsearch.tooltip.open_document",href:s||void 0}):""}},{id:"document_type",property:"documentType",size:180,getValue:e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""}},{id:"building_name",property:"buildingName",size:130,getValue:e=>{var t;return null!==(t=e.buildingName)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingName&&null!==e.buildingName?e.buildingName.map((e=>(0,an.jsx)("div",{children:e}))):""},{id:"ehr_code",property:"ehrCode",size:130,getValue:e=>{var t;return null!==(t=e.ehrCode)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e;return t.ehrCode&&null!==t.ehrCode?t.ehrCode.map(((e,s)=>{const o=t.ehrCode?n(ie,String(e),null,!1,!1,null):null;return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(un,{linkName:e,tooltipText:"detailsearch.tooltip.open_building",href:o||void 0}),s!==t.ehrCode.length-1?(0,an.jsx)("span",{children:", "}):""]})})):""}},{id:"building_address",property:"buildingAddress",size:160,getValue:e=>{var t;return null!==(t=e.buildingAddress)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingAddress&&null!==e.buildingAddress?e.buildingAddress.map((e=>(0,an.jsx)("div",{children:e}))):""},{id:"proceeding_name",property:"proceedingName",size:160,getValue:e=>{var t;return null!==(t=e.proceedingName)&&void 0!==t?t:""}},{id:"supervisor",property:"supervisorName",size:130,getValue:e=>{var t;return null!==(t=e.supervisorName)&&void 0!==t?t:""}},{id:"institution",property:"institutionName",size:130,getValue:e=>{var t;return null!==(t=e.institutionName)&&void 0!==t?t:""}},{id:"archived",property:"archived",size:130,getValue:e=>e.archived&&"2"===e.archived?"Jah":"Ei"}];return(0,an.jsx)(H.TableComponent,{config:{thead:{headers:h.map((e=>({id:e.id,size:e.size,className:"table-header-field text-align-left",label:i.formatMessage({id:"detailsearch.proceedings.table.header."+e.id}),tooltip:{text:i.formatMessage({id:"detailsearch.proceedings.table.tooltip."+e.id})},propertyName:e.property,sortable:!0,isShown:!0,isFrozen:e.isFrozen,type:"input",valueFormatter:t=>e.getFormattedValue?e.getFormattedValue(t):e.getValue(t)}))),icons:cn,expandableRow:!1,isFilter:!1}},data:function(e){const t=e.map((e=>{var t,n,s,o,i,r;return{proceedingId:e.proceedingId,dateStart:null!==(t=uo.dateToMs(lo,e.dateStart))&&void 0!==t?t:"",dateEnd:null!==(n=uo.dateToMs(lo,e.dateEnd))&&void 0!==n?n:"",proceedingNr:e.proceedingNr,proceedingState:e.proceedingState,proceedingStateCode:e.proceedingStateCode,docNr:e.docNr,documentType:null!==(s=null===(o=d.find((t=>t.id.toString()===e.documentType)))||void 0===o?void 0:o.name)&&void 0!==s?s:"",doty:e.documentType,proceedingName:e.proceedingName,institutionId:e.institutionId,institutionName:null!==(i=null===(r=c.find((t=>t.id===e.institutionId)))||void 0===r?void 0:r.regName)&&void 0!==i?i:"",supervisorId:e.supervisorId,supervisorName:e.supervisorName,archived:e.archived,buildingName:e.buildingName,ehrCode:e.ehrCode,buildingAddress:e.buildingAddress}}));return t}(r),handleEvent:()=>!0})},mo="https://devkluster.ehr.ee/api/building/v2".replace(/\/+$/,"");class go{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mo,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class So extends Error{constructor(e,t){super(t),this.name="RequiredError",this.field=e}}const fo="https://example.com",Io=function(e,t,n){if(null==n)throw new So(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},To=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];for(const e of s)for(const n in e)if(Array.isArray(e[n])){t.delete(n);for(const s of e[n])t.append(n,s)}else t.set(n,e[n]);e.search=t.toString()},Eo=function(e,t,n){const s="string"!=typeof e;return(s&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(void 0!==e?e:{}):e||""},_o=function(e){return e.pathname+e.search+e.hash},vo=function(e,t,n,s){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const r={...e.options,url:((null==s?void 0:s.basePath)||i)+e.url};return o.request(r)}},yo=function(e){const t=function(e){return{buildingChangesGet:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Io("buildingChangesGet","ehrCode",t),Io("buildingChangesGet","dokNr",n);const o=new URL("/buildingChanges",fo);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...s},a={};void 0!==t&&(a.ehr_code=t),void 0!==n&&(a.dok_nr=n),To(o,a,s.query);let l=i&&i.headers?i.headers:{};return r.headers={...l,...s.headers},{url:_o(o),options:r}},buildingCompareGet:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Io("buildingCompareGet","doEhitisId1",t),Io("buildingCompareGet","doEhitisId2",n);const o=new URL("/buildingCompare",fo);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...s},a={};void 0!==t&&(a.do_ehitis_id1=t),void 0!==n&&(a.do_ehitis_id2=n),To(o,a,s.query);let l=i&&i.headers?i.headers:{};return r.headers={...l,...s.headers},{url:_o(o),options:r}},buildingDataGet:async function(t,n,s,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const r=new URL("/buildingData",fo);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...i},d={};void 0!==t&&(d.ehr_code=t),void 0!==n&&(d.ehr_id=n),void 0!==s&&(d.version=s),void 0!==o&&(d.json=o),To(r,d,i.query);let c=a&&a.headers?a.headers:{};return l.headers={...c,...i.headers},{url:_o(r),options:l}},buildingDeepCopyPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Io("buildingDeepCopyPost","deepCopyPostRequest",t);const s=new URL("/buildingDeepCopy",fo);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};To(s,{},n.query);let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Eo(t,i,e),{url:_o(s),options:i}},buildingOwnerSearchPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Io("buildingOwnerSearchPost","bSearchOPostRequest",t);const s=new URL("/buildingOwnerSearch",fo);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};To(s,{},n.query);let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Eo(t,i,e),{url:_o(s),options:i}},buildingSearchPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Io("buildingSearchPost","bSearchPostRequest",t);const s=new URL("/buildingSearch",fo);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};To(s,{},n.query);let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Eo(t,i,e),{url:_o(s),options:i}},buildingSecureDataArrayPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Io("buildingSecureDataArrayPost","requestBody",t);const s=new URL("/buildingSecureDataArray",fo);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};To(s,{},n.query);let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Eo(t,i,e),{url:_o(s),options:i}},buildingSecureDataGet:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=new URL("/buildingSecureData",fo);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...s},a={};void 0!==t&&(a.ehr_code=t),void 0!==n&&(a.ehr_id=n),To(o,a,s.query);let l=i&&i.headers?i.headers:{};return r.headers={...l,...s.headers},{url:_o(o),options:r}},buildingVersionsGet:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Io("buildingVersionsGet","ehrCode",t);const s=new URL("/buildingVersions",fo);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},r={};void 0!==t&&(r.ehr_code=t),To(s,r,n.query);let a=o&&o.headers?o.headers:{};return i.headers={...a,...n.headers},{url:_o(s),options:i}},buildingsDataPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Io("buildingsDataPost","ehrCodesPostRequest",t);const s=new URL("/buildingsData",fo);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},r={"Content-Type":"application/json"};To(s,{},n.query);let a=o&&o.headers?o.headers:{};return i.headers={...r,...a,...n.headers},i.data=Eo(t,i,e),{url:_o(s),options:i}},findEhrcodesDateafterGet:async function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Io("findEhrcodesDateafterGet","timestamp",t);const o=new URL("/find/ehrcodes/dateafter",fo);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...s},a={};void 0!==t&&(a.timestamp=t instanceof Date?t.toISOString():t),void 0!==n&&(a.offset=n),To(o,a,s.query);let l=i&&i.headers?i.headers:{};return r.headers={...l,...s.headers},{url:_o(o),options:r}},findEhrcodesDocIdGet:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Io("findEhrcodesDocIdGet","id",t);const s=new URL("/find/ehrcodes/docId",fo);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},r={};void 0!==t&&(r.id=t),To(s,r,n.query);let a=o&&o.headers?o.headers:{};return i.headers={...a,...n.headers},{url:_o(s),options:i}}}}(e);return{async buildingChangesGet(n,s,o){const i=await t.buildingChangesGet(n,s,o);return vo(i,ve(),mo,e)},async buildingCompareGet(n,s,o){const i=await t.buildingCompareGet(n,s,o);return vo(i,ve(),mo,e)},async buildingDataGet(n,s,o,i,r){const a=await t.buildingDataGet(n,s,o,i,r);return vo(a,ve(),mo,e)},async buildingDeepCopyPost(n,s){const o=await t.buildingDeepCopyPost(n,s);return vo(o,ve(),mo,e)},async buildingOwnerSearchPost(n,s){const o=await t.buildingOwnerSearchPost(n,s);return vo(o,ve(),mo,e)},async buildingSearchPost(n,s){const o=await t.buildingSearchPost(n,s);return vo(o,ve(),mo,e)},async buildingSecureDataArrayPost(n,s){const o=await t.buildingSecureDataArrayPost(n,s);return vo(o,ve(),mo,e)},async buildingSecureDataGet(n,s,o){const i=await t.buildingSecureDataGet(n,s,o);return vo(i,ve(),mo,e)},async buildingVersionsGet(n,s){const o=await t.buildingVersionsGet(n,s);return vo(o,ve(),mo,e)},async buildingsDataPost(n,s){const o=await t.buildingsDataPost(n,s);return vo(o,ve(),mo,e)},async findEhrcodesDateafterGet(n,s,o){const i=await t.findEhrcodesDateafterGet(n,s,o);return vo(i,ve(),mo,e)},async findEhrcodesDocIdGet(n,s){const o=await t.findEhrcodesDocIdGet(n,s);return vo(o,ve(),mo,e)}}};class bo extends go{buildingChangesGet(e,t,n){return yo(this.configuration).buildingChangesGet(e,t,n).then((e=>e(this.axios,this.basePath)))}buildingCompareGet(e,t,n){return yo(this.configuration).buildingCompareGet(e,t,n).then((e=>e(this.axios,this.basePath)))}buildingDataGet(e,t,n,s,o){return yo(this.configuration).buildingDataGet(e,t,n,s,o).then((e=>e(this.axios,this.basePath)))}buildingDeepCopyPost(e,t){return yo(this.configuration).buildingDeepCopyPost(e,t).then((e=>e(this.axios,this.basePath)))}buildingOwnerSearchPost(e,t){return yo(this.configuration).buildingOwnerSearchPost(e,t).then((e=>e(this.axios,this.basePath)))}buildingSearchPost(e,t){return yo(this.configuration).buildingSearchPost(e,t).then((e=>e(this.axios,this.basePath)))}buildingSecureDataArrayPost(e,t){return yo(this.configuration).buildingSecureDataArrayPost(e,t).then((e=>e(this.axios,this.basePath)))}buildingSecureDataGet(e,t,n){return yo(this.configuration).buildingSecureDataGet(e,t,n).then((e=>e(this.axios,this.basePath)))}buildingVersionsGet(e,t){return yo(this.configuration).buildingVersionsGet(e,t).then((e=>e(this.axios,this.basePath)))}buildingsDataPost(e,t){return yo(this.configuration).buildingsDataPost(e,t).then((e=>e(this.axios,this.basePath)))}findEhrcodesDateafterGet(e,t,n){return yo(this.configuration).findEhrcodesDateafterGet(e,t,n).then((e=>e(this.axios,this.basePath)))}findEhrcodesDocIdGet(e,t){return yo(this.configuration).findEhrcodesDocIdGet(e,t).then((e=>e(this.axios,this.basePath)))}}const Do=e=>{var t,n,s,o;let{buildingsActualDataApiEndpoint:i,classifierApiEndpoint:r,linkGen:l,generateLink:u,myViewsApiEndpoint:p,searchType:h,userApiEndpoint:m,userInfo:g}=e;const S=(0,Sn.useDispatch)(),f=["MKM","KOV","TJA"].includes(g&&g.activeRole&&null!==(t=g.activeRole)&&void 0!==t&&t.businessType?null===(n=g.activeRole)||void 0===n?void 0:n.businessType:""),I=["MKM","KOV","TJA","N","KT"].includes(g&&g.activeRole&&null!==(s=g.activeRole)&&void 0!==s&&s.businessType?null===(o=g.activeRole)||void 0===o?void 0:o.businessType:""),T=!g,[E,_]=(0,G.useState)({}),[v,y]=(0,G.useState)({}),[b,D]=(0,G.useState)({}),[x,M]=(0,G.useState)([]),[N,O]=(0,G.useState)([]),[j,C]=(0,G.useState)([]),[L,P]=(0,G.useState)(!1),[R,K]=(0,G.useState)(!1),[F,k]=(0,G.useState)(!1),Y=new we(new ft({basePath:r})),V=new He(new Qe({basePath:m})),B=new pt(new ft({basePath:p})),J=new $e(new Qe({basePath:m})),W=new bo(new ft({basePath:i})),q=async(e,t,n)=>{try{const s=await J.searchPerson(e,t,n);return s.data}catch(e){console.log("= = = callSearchPerson error occured:",e)}};return(0,G.useEffect)((()=>{Y.getAllDocumentTypes().then((e=>{S(a(e.data))})).catch((e=>{console.log(e)})),V.getJurKovPersons().then((e=>{S(d(e.data))})).catch((e=>{console.log(e)})),Y.getUsageClassifierTypes().then((e=>{S(c(e.data))})).catch((e=>{console.log(e)}))}),[]),(0,G.useEffect)((()=>{if(Object.keys(b).length>0){k(!0);B.searchDetailProceedings(b).then((e=>{S(w(e.data)),C(e.data),k(!1)})).catch((e=>{console.log(e),k(!1)}))}}),[b]),(0,G.useEffect)((()=>{if(Object.keys(v).length>0){K(!0);B.searchDetailDocuments(v).then((e=>{S(U(e.data)),O(e.data),K(!1)})).catch((e=>{console.log(e),K(!1)}))}}),[v]),(0,G.useEffect)((()=>{if(Object.keys(E).length>0){let e;P(!0),e=I?W.buildingOwnerSearchPost(E):W.buildingSearchPost(E),e.then((e=>{S(A(e.data)),M(e.data),P(!1)})).catch((e=>{console.log(e),P(!1)}))}}),[E,I]),(0,an.jsxs)("div",{children:[(0,an.jsx)(H.Section,{collapsed:h!==se,title:"detailsearch.buildings_detail_search",children:(0,an.jsxs)("div",{children:[(0,an.jsx)("div",{className:"filter-block",style:{paddingBottom:20},children:(0,an.jsx)(no,{onSubmit:e=>{_(e)},isAdminRole:f,isAdminPlusRole:I,callSearchPerson:q})}),Object.keys(E).length>0&&0===x.length&&!L?(0,an.jsx)("div",{style:{height:210},className:"d-flex justify-content-center align-items-center",children:(0,an.jsx)(H.Text,{raw:"detailsearch.empty_search_result"})}):L?(0,an.jsx)(H.SectionLoader,{}):(0,an.jsx)(ao,{linkGen:l,generateLink:u,isAdminRole:f,isAdminPlusRole:I})]})}),(0,an.jsx)(H.Section,{collapsed:"DOCUMENTS_SEARCH"!==h,title:"detailsearch.documents_detail_search",children:(0,an.jsxs)("div",{children:[(0,an.jsx)("div",{className:"filter-block",style:{paddingBottom:20},children:(0,an.jsx)(so,{onSubmit:e=>{y(e)},callSearchPerson:q,isNonAuthenticatedUser:T})}),Object.keys(v).length>0&&0===N.length&&!R?(0,an.jsx)("div",{style:{height:210},className:"d-flex justify-content-center align-items-center",children:(0,an.jsx)(H.Text,{raw:"detailsearch.empty_search_result"})}):R?(0,an.jsx)(H.SectionLoader,{}):(0,an.jsx)(po,{linkGen:l,generateLink:u,userInfo:g,filterStateDocumentsSearch:v})]})}),f&&(0,an.jsx)(H.Section,{collapsed:"PROCEEDINGS_SEARCH"!==h,title:"detailsearch.proceedings_detail_search",children:(0,an.jsxs)("div",{children:[(0,an.jsx)("div",{className:"filter-block",style:{paddingBottom:20},children:(0,an.jsx)(oo,{onSubmit:e=>{D(e)}})}),Object.keys(b).length>0&&0===j.length&&!F?(0,an.jsx)("div",{style:{height:210},className:"d-flex justify-content-center align-items-center",children:(0,an.jsx)(H.Text,{raw:"detailsearch.empty_search_result"})}):F?(0,an.jsx)(H.SectionLoader,{}):(0,an.jsx)(ho,{linkGen:l,userInfo:g,generateLink:u})]})})]})};module.exports=s})();
|
|
2
|
+
(()=>{var e,t,n={20:(e,t,n)=>{"use strict";var r=n(953),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},848:(e,t,n)=>{"use strict";e.exports=n(20)},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},953:e=>{"use strict";e.exports=require("react")}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{DetailSearch:()=>YZ,MyAdministrativeProceedings:()=>vn,MyApprovals:()=>gZ,MyDocuments:()=>zX,MyInvolvements:()=>yZ,MyOpinions:()=>vZ,MyPlannings:()=>FJ,MyProceedings:()=>mZ,documentsReducer:()=>g,filterReducer:()=>c,myOperationsReducer:()=>T,proceedingsReducer:()=>w,rootReducer:()=>U});const e=require("@reduxjs/toolkit");const t=(0,e.createSlice)({name:"filter",initialState:{classifiers:{},documentTypes:[],institutionUsers:[],institutions:[],usageClassifierTypes:[]},reducers:{classifiersLoaded:(e,t)=>{e.classifiers=t.payload},documentTypesLoaded:(e,t)=>{e.documentTypes=t.payload},institutionUsersLoaded:(e,t)=>{e.institutionUsers=t.payload},institutionsLoaded:(e,t)=>{e.institutions=t.payload},usageClassifierTypesLoaded:(e,t)=>{e.usageClassifierTypes=t.payload}}}),{classifiersLoaded:n,documentTypesLoaded:r,institutionUsersLoaded:a,institutionsLoaded:s,usageClassifierTypesLoaded:l}=t.actions,c=t.reducer;const u=(0,e.createSlice)({name:"documents",initialState:{workingDocuments:[],signingDocuments:[],finishedDocuments:[],allowedDocumentTypesToStart:[]},reducers:{workingDocumentsLoaded:(e,t)=>{e.workingDocuments=t.payload},signingDocumentsLoaded:(e,t)=>{e.signingDocuments=t.payload},finishedDocumentsLoaded:(e,t)=>{e.finishedDocuments=t.payload},deleteDocument(e,t){e.workingDocuments=e.workingDocuments.filter((e=>e.docNr!==t.payload))},allowedDocumentTypesLoaded:(e,t)=>{e.allowedDocumentTypesToStart=t.payload}}}),{workingDocumentsLoaded:d,signingDocumentsLoaded:p,finishedDocumentsLoaded:f,deleteDocument:h,allowedDocumentTypesLoaded:m}=u.actions,g=u.reducer;const v=(0,e.createSlice)({name:"proceedings",initialState:{myProceedings:[],proceedingsToComment:[],incomingDocuments:[]},reducers:{myProceedingsLoaded:(e,t)=>{e.myProceedings=t.payload},proceedingsToCommentLoaded:(e,t)=>{e.proceedingsToComment=t.payload},incomingDocumentsLoaded:(e,t)=>{e.incomingDocuments=t.payload}}}),{myProceedingsLoaded:b,proceedingsToCommentLoaded:y,incomingDocumentsLoaded:x}=v.actions,w=v.reducer;const S=(0,e.createSlice)({name:"myOperations",initialState:{myOperations:[],toCommentOperations:[],operationInvitations:[]},reducers:{myOperationsLoaded:(e,t)=>{e.myOperations=t.payload},toCommentOperationsLoaded:(e,t)=>{e.toCommentOperations=t.payload},operationInvitationsLoaded:(e,t)=>{e.operationInvitations=t.payload}}}),{myOperationsLoaded:_,toCommentOperationsLoaded:E,operationInvitationsLoaded:k}=S.actions,T=S.reducer;const C=(0,e.createSlice)({name:"detailSearch",initialState:{buildings:[],documents:[],proceedings:[]},reducers:{buildingsLoaded:(e,t)=>{e.buildings=t.payload},documentsLoaded:(e,t)=>{e.documents=t.payload},proceedingsLoaded:(e,t)=>{e.proceedings=t.payload}}}),{buildingsLoaded:O,documentsLoaded:I,proceedingsLoaded:M}=C.actions,D=C.reducer,j={notices:[]},A=(0,e.createSlice)({name:"notification",initialState:j,reducers:{setNotifications:(e,t)=>{e.notices=t.payload},removeNotification:(e,t)=>{const n=e.notices.filter((e=>e.id!==t.payload));e.notices=n},cleanState:e=>j}}),N=(0,e.createSelector)((e=>e.myViewsPage.notifications.notices),(e=>e)),{cleanState:P,setNotifications:R,removeNotification:L}=A.actions,F=A.reducer,U=(0,e.combineReducers)({filter:c,myDocuments:g,myProceedings:w,myOperations:T,detailSearch:D,notifications:F});var B=o(953),z=o.t(B,2),K=o.n(B);const $=require("react-intl"),V=require("ehr-components"),H="SIGNING_DOCUMENTS",W="WORKING_DOCUMENTS",Y="FINISHED_DOCUMENTS",q="INCOMING_DOCUMENTS",G="MY_APPROVALS",J="MY_OPINIONS",X="MY_INVOLVEMENTS",Z="MY_OPERATIONS",Q="OPERATIONS_TO_COMMENT",ee="OPERATION_INVITATIONS",te="PROCEEDINGS_TO_COMMENT",ne="BUILDINGS_SEARCH";let re=function(e){return e.Default="default",e.Info="info",e.Success="success",e.Warning="warning",e.Danger="danger",e}({}),oe=function(e){return e.Danger="danger",e.Default="neutral",e.Info="brand",e.Success="success",e.Warning="warning",e}({});const ie="BUILDING",ae="PROCEEDING",se="DOCUMENT";let le=function(e){return e.KOV="KOV",e.MKM="MKM",e.A="A",e.N="N",e.KT="KT",e.JUR="JUR",e.AMAS="AMAS",e.TJA="TJA",e}({});let ce=function(e){return e.MENTOIMLIIK_AUTO_REG="MENTOIMLIIK_AUTO_REG",e.MENTOIMLIIK_KAASAMINE="MENTOIMLIIK_KAASAMINE",e.MENTOIMLIIK_MASSKAASAMINE="MENTOIMLIIK_MASSKAASAMINE",e.MENTOIMLIIK_YKSIKKAASAMINE="MENTOIMLIIK_YKSIKKAASAMINE",e.MENTOIMLIIK_ARVAMUS="MENTOIMLIIK_ARVAMUS",e.MENTOIMLIIK_VALINE_KOOSK="MENTOIMLIIK_VALINE_KOOSK",e.MENTOIMLIIK_SISENE_KOOSK="MENTOIMLIIK_SISENE_KOOSK",e.MENTOIMLIIK_KOOSK="MENTOIMLIIK_KOOSK",e.MENTOIMLIIK_MARKUS_TAIEND="MENTOIMLIIK_MARKUS_TAIEND",e.MENTOIMLIIK_MEN_MARKUS="MENTOIMLIIK_MEN_MARKUS",e.MENTOIMLIIK_EHIT_KK_RING="MENTOIMLIIK_EHIT_KK_RING",e.MENTOIMLIIK_ADS="MENTOIMLIIK_ADS",e.MENTOIMLIIK_ADS_SAADA="MENTOIMLIIK_ADS_SAADA",e.MENTOIMLIIK_ADS_ESIT="MENTOIMLIIK_ADS_ESIT",e.MENTOIMLIIK_AVALIK="MENTOIMLIIK_AVALIK",e.MENTOIMLIIK_AVALIK_TAGASISIDE="MENTOIMLIIK_AVALIK_TAGASISIDE",e.MENTOIMLIIK_RAHV_KAASAMINE="MENTOIMLIIK_RAHV_KAASAMINE",e.MENTOIMLIIK_KAAS_TAGASISIDE="MENTOIMLIIK_KAAS_TAGASISIDE",e.MENTOIMLIIK_ALLKIRJASTAMINE="MENTOIMLIIK_ALLKIRJASTAMINE",e.MENTOIMLIIK_KMH_PR="MENTOIMLIIK_KMH_PR",e.MENTOIMLIIK_KMH_AR="MENTOIMLIIK_KMH_AR",e}({}),ue=function(e){return e.Proceeding="PROCEEDING",e.Document="DOCUMENT",e.Operation="OPERATION",e}({}),de=function(e){return e.PlanningsProceedings="PlanningsProceedings",e.PlanningsInstitution="PlanningsInstitution",e.PlanningsOngoing="PlanningsOngoing",e.PlanningsCompleted="PlanningsCompleted",e}({});const pe="12975",fe="12976",he="11274",me="11275",ge="12977",ve="12978",be=["11272","12972",pe,"12974",ve,me],ye=["11273","12973",fe,"12971",ge,he],xe=[pe,fe],we={[fe]:ge,[pe]:ve},Se={[fe]:he,[pe]:me},_e=require("axios");var Ee=o.n(_e);const ke="https://devkluster.ehr.ee".replace(/\/+$/,"");class Te{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ke,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class Ce extends Error{constructor(e,t){super(t),this.name="RequiredError",this.field=e}}const Oe="https://example.com",Ie=function(e,t,n){if(null==n)throw new Ce(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},Me=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(const e of r)for(const n in e)if(Array.isArray(e[n])){t.delete(n);for(const r of e[n])t.append(n,r)}else t.set(n,e[n]);e.search=t.toString()},De=function(e){return e.pathname+e.search+e.hash},je=function(e,t,n,r){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const a={...e.options,url:((null==r?void 0:r.basePath)||i)+e.url};return o.request(a)}},Ae=function(e){const t=function(e){return{getAllDocumentTypes:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/alldocumenttypes",Oe);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Me(n,{},t.query);let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:De(n),options:o}},getBusinessTypesList:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/businesstypelist",Oe);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Me(n,{},t.query);let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:De(n),options:o}},getClassifierByType:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie("getClassifierByType","classifierType",t);const r="/classifier/{classifierType}".replace("{classifierType}",encodeURIComponent(String(t))),o=new URL(r,Oe);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Me(o,{},n.query);let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:De(o),options:a}},getClassifiersByRelatedType:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie("getClassifiersByRelatedType","relatedClassifierType",t);const r="/classifier/related-type/{relatedClassifierType}".replace("{relatedClassifierType}",encodeURIComponent(String(t))),o=new URL(r,Oe);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Me(o,{},n.query);let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:De(o),options:a}},getClassifiersByType:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie("getClassifiersByType","classifierTypesCommaSeparated",t);const r="/classifiers/{classifierTypesCommaSeparated}".replace("{classifierTypesCommaSeparated}",encodeURIComponent(String(t))),o=new URL(r,Oe);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Me(o,{},n.query);let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:De(o),options:a}},getDocumentTypes:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/documenttypes",Oe);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Me(n,{},t.query);let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:De(n),options:o}},getFileTypes:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/filetypes",Oe);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Me(n,{},t.query);let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:De(n),options:o}},getHealth:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/health",Oe);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Me(n,{},t.query);let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:De(n),options:o}},getUsageClassifierTypes:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/classifier/usage",Oe);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Me(n,{},t.query);let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:De(n),options:o}},getUserRolesList:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/userroleslist",Oe);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Me(n,{},t.query);let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:De(n),options:o}}}}(e);return{async getAllDocumentTypes(n){const r=await t.getAllDocumentTypes(n);return je(r,Ee(),ke,e)},async getBusinessTypesList(n){const r=await t.getBusinessTypesList(n);return je(r,Ee(),ke,e)},async getClassifierByType(n,r){const o=await t.getClassifierByType(n,r);return je(o,Ee(),ke,e)},async getClassifiersByRelatedType(n,r){const o=await t.getClassifiersByRelatedType(n,r);return je(o,Ee(),ke,e)},async getClassifiersByType(n,r){const o=await t.getClassifiersByType(n,r);return je(o,Ee(),ke,e)},async getDocumentTypes(n){const r=await t.getDocumentTypes(n);return je(r,Ee(),ke,e)},async getFileTypes(n){const r=await t.getFileTypes(n);return je(r,Ee(),ke,e)},async getHealth(n){const r=await t.getHealth(n);return je(r,Ee(),ke,e)},async getUsageClassifierTypes(n){const r=await t.getUsageClassifierTypes(n);return je(r,Ee(),ke,e)},async getUserRolesList(n){const r=await t.getUserRolesList(n);return je(r,Ee(),ke,e)}}};class Ne extends Te{getAllDocumentTypes(e){return Ae(this.configuration).getAllDocumentTypes(e).then((e=>e(this.axios,this.basePath)))}getBusinessTypesList(e){return Ae(this.configuration).getBusinessTypesList(e).then((e=>e(this.axios,this.basePath)))}getClassifierByType(e,t){return Ae(this.configuration).getClassifierByType(e,t).then((e=>e(this.axios,this.basePath)))}getClassifiersByRelatedType(e,t){return Ae(this.configuration).getClassifiersByRelatedType(e,t).then((e=>e(this.axios,this.basePath)))}getClassifiersByType(e,t){return Ae(this.configuration).getClassifiersByType(e,t).then((e=>e(this.axios,this.basePath)))}getDocumentTypes(e){return Ae(this.configuration).getDocumentTypes(e).then((e=>e(this.axios,this.basePath)))}getFileTypes(e){return Ae(this.configuration).getFileTypes(e).then((e=>e(this.axios,this.basePath)))}getHealth(e){return Ae(this.configuration).getHealth(e).then((e=>e(this.axios,this.basePath)))}getUsageClassifierTypes(e){return Ae(this.configuration).getUsageClassifierTypes(e).then((e=>e(this.axios,this.basePath)))}getUserRolesList(e){return Ae(this.configuration).getUserRolesList(e).then((e=>e(this.axios,this.basePath)))}}class Pe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const Re="http://localhost:8080".replace(/\/+$/,"");class Le{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Re,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class Fe extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const Ue="https://example.com",Be=function(e,t,n){if(null==n)throw new Fe(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach((t=>ze(e,t,n))):Object.keys(t).forEach((r=>ze(e,t[r],`${n}${""!==n?".":""}${r}`))):e.has(n)?e.append(n,t):e.set(n,t))}const Ke=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];ze(t,r),e.search=t.toString()},$e=function(e,t,n){const r="string"!=typeof e;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(void 0!==e?e:{}):e||""},Ve=function(e){return e.pathname+e.search+e.hash},He=function(e,t,n,r){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const a={...e.options,url:((null==r?void 0:r.basePath)||i)+e.url};return o.request(a)}};const We=function(e){const t=function(e){return{getJurKovPersons:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/jur/kov",Ue);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ke(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:Ve(n),options:o}},getJurPersonCoordRelJurs:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getJurPersonCoordRelJurs","personId",t);const r="/person/jur/{personId}/coord".replace("{personId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getUserPossibleProceedingSupervisorsByEHAKCode:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getUserPossibleProceedingSupervisorsByEHAKCode","eHAKCode",t);const r="/user/possiblesupervisors/{EHAKCode}".replace("{EHAKCode}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getUserPossibleProceedingSupervisorsByIdAndEHAKCode:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Be("getUserPossibleProceedingSupervisorsByIdAndEHAKCode","id",t),Be("getUserPossibleProceedingSupervisorsByIdAndEHAKCode","eHAKCode",n);const o="/user/possiblesupervisors/{id}/{EHAKCode}".replace("{id}",encodeURIComponent(String(t))).replace("{EHAKCode}",encodeURIComponent(String(n))),i=new URL(o,Ue);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r};Ke(i,{});let l=a&&a.headers?a.headers:{};return s.headers={...l,...r.headers},{url:Ve(i),options:s}},getUserPossibleProceedingSupervisorsByJurId:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getUserPossibleProceedingSupervisorsByJurId","personId",t);const r="/user/jur/possiblesupervisors/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}}}}(e);return{async getJurKovPersons(n){const r=await t.getJurKovPersons(n);return He(r,Ee(),Re,e)},async getJurPersonCoordRelJurs(n,r){const o=await t.getJurPersonCoordRelJurs(n,r);return He(o,Ee(),Re,e)},async getUserPossibleProceedingSupervisorsByEHAKCode(n,r){const o=await t.getUserPossibleProceedingSupervisorsByEHAKCode(n,r);return He(o,Ee(),Re,e)},async getUserPossibleProceedingSupervisorsByIdAndEHAKCode(n,r,o){const i=await t.getUserPossibleProceedingSupervisorsByIdAndEHAKCode(n,r,o);return He(i,Ee(),Re,e)},async getUserPossibleProceedingSupervisorsByJurId(n,r){const o=await t.getUserPossibleProceedingSupervisorsByJurId(n,r);return He(o,Ee(),Re,e)}}};class Ye extends Le{getJurKovPersons(e){return We(this.configuration).getJurKovPersons(e).then((e=>e(this.axios,this.basePath)))}getJurPersonCoordRelJurs(e,t){return We(this.configuration).getJurPersonCoordRelJurs(e,t).then((e=>e(this.axios,this.basePath)))}getUserPossibleProceedingSupervisorsByEHAKCode(e,t){return We(this.configuration).getUserPossibleProceedingSupervisorsByEHAKCode(e,t).then((e=>e(this.axios,this.basePath)))}getUserPossibleProceedingSupervisorsByIdAndEHAKCode(e,t,n){return We(this.configuration).getUserPossibleProceedingSupervisorsByIdAndEHAKCode(e,t,n).then((e=>e(this.axios,this.basePath)))}getUserPossibleProceedingSupervisorsByJurId(e,t){return We(this.configuration).getUserPossibleProceedingSupervisorsByJurId(e,t).then((e=>e(this.axios,this.basePath)))}}const qe=function(e){const t=function(e){return{addAllyksusToJurPerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new URL("/person/jur/addAllyksus",Ue);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};Ke(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=$e(t,i,e),{url:Ve(r),options:i}},addPerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new URL("/person",Ue);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};Ke(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=$e(t,i,e),{url:Ve(r),options:i}},deletePerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("deletePerson","personId",t);const r="/person/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"DELETE",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},findKovsAndJurPersonsInTheSameAdministrativeDivision:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Be("findKovsAndJurPersonsInTheSameAdministrativeDivision","regNameOrCode",t);const i="/person/kovs-and-institutions/{regNameOrCode}".replace("{regNameOrCode}",encodeURIComponent(String(t))),a=new URL(i,Ue);let s;e&&(s=e.baseOptions);const l={method:"PUT",...s,...o},c={},u={};void 0!==n&&(u.searchFromAll=n),c["Content-Type"]="application/json",Ke(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},l.data=$e(r,l,e),{url:Ve(a),options:l}},findPublicSectorInstitutions:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Be("findPublicSectorInstitutions","regNameOrCode",t);const o="/person/public-sector-institutions/{regNameOrCode}".replace("{regNameOrCode}",encodeURIComponent(String(t))),i=new URL(o,Ue);let a;e&&(a=e.baseOptions);const s={method:"PUT",...a,...r},l={"Content-Type":"application/json"};Ke(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},s.data=$e(n,s,e),{url:Ve(i),options:s}},findRolesByDbName:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/personroles",Ue);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ke(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:Ve(n),options:o}},getAllActiveInstitutions:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/jur",Ue);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ke(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:Ve(n),options:o}},getAllClassifierBusinessTypeDtos:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/jur/businessTypes",Ue);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ke(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:Ve(n),options:o}},getJurPerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getJurPerson","personId",t);const r="/person/jur/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getJurPersonAncestors:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getJurPersonAncestors","jurPersonId",t);const r="/person/jur/ancestor/{jurPersonId}".replace("{jurPersonId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getJurPersonSuccessors:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getJurPersonSuccessors","jurPersonId",t);const r="/person/jur/successor/{jurPersonId}".replace("{jurPersonId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getJurPersonsByEhakCode:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getJurPersonsByEhakCode","ehakCode",t);const r="/person/jur/byEhakCode/{ehakCode}".replace("{ehakCode}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getPerson:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getPerson","personId",t);const r="/person/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getPersonDetails:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/person/details",Ue);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ke(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:Ve(n),options:o}},refreshUpdateArPersonFromAR:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("refreshUpdateArPersonFromAR","regCode",t);const r="/person/jur/refresh/{regCode}".replace("{regCode}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},removeYlemyksusReference:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("removeYlemyksusReference","allyksusId",t);const r="/person/jur/removeYlemyksusReference/{allyksusId}".replace("{allyksusId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"PUT",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},updatePerson:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Be("updatePerson","personId",t);const o="/person/{personId}".replace("{personId}",encodeURIComponent(String(t))),i=new URL(o,Ue);let a;e&&(a=e.baseOptions);const s={method:"PUT",...a,...r},l={"Content-Type":"application/json"};Ke(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},s.data=$e(n,s,e),{url:Ve(i),options:s}}}}(e);return{async addAllyksusToJurPerson(n,r){const o=await t.addAllyksusToJurPerson(n,r);return He(o,Ee(),Re,e)},async addPerson(n,r){const o=await t.addPerson(n,r);return He(o,Ee(),Re,e)},async deletePerson(n,r){const o=await t.deletePerson(n,r);return He(o,Ee(),Re,e)},async findKovsAndJurPersonsInTheSameAdministrativeDivision(n,r,o,i){const a=await t.findKovsAndJurPersonsInTheSameAdministrativeDivision(n,r,o,i);return He(a,Ee(),Re,e)},async findPublicSectorInstitutions(n,r,o){const i=await t.findPublicSectorInstitutions(n,r,o);return He(i,Ee(),Re,e)},async findRolesByDbName(n){const r=await t.findRolesByDbName(n);return He(r,Ee(),Re,e)},async getAllActiveInstitutions(n){const r=await t.getAllActiveInstitutions(n);return He(r,Ee(),Re,e)},async getAllClassifierBusinessTypeDtos(n){const r=await t.getAllClassifierBusinessTypeDtos(n);return He(r,Ee(),Re,e)},async getJurPerson(n,r){const o=await t.getJurPerson(n,r);return He(o,Ee(),Re,e)},async getJurPersonAncestors(n,r){const o=await t.getJurPersonAncestors(n,r);return He(o,Ee(),Re,e)},async getJurPersonSuccessors(n,r){const o=await t.getJurPersonSuccessors(n,r);return He(o,Ee(),Re,e)},async getJurPersonsByEhakCode(n,r){const o=await t.getJurPersonsByEhakCode(n,r);return He(o,Ee(),Re,e)},async getPerson(n,r){const o=await t.getPerson(n,r);return He(o,Ee(),Re,e)},async getPersonDetails(n){const r=await t.getPersonDetails(n);return He(r,Ee(),Re,e)},async refreshUpdateArPersonFromAR(n,r){const o=await t.refreshUpdateArPersonFromAR(n,r);return He(o,Ee(),Re,e)},async removeYlemyksusReference(n,r){const o=await t.removeYlemyksusReference(n,r);return He(o,Ee(),Re,e)},async updatePerson(n,r,o){const i=await t.updatePerson(n,r,o);return He(i,Ee(),Re,e)}}};class Ge extends Le{addAllyksusToJurPerson(e,t){return qe(this.configuration).addAllyksusToJurPerson(e,t).then((e=>e(this.axios,this.basePath)))}addPerson(e,t){return qe(this.configuration).addPerson(e,t).then((e=>e(this.axios,this.basePath)))}deletePerson(e,t){return qe(this.configuration).deletePerson(e,t).then((e=>e(this.axios,this.basePath)))}findKovsAndJurPersonsInTheSameAdministrativeDivision(e,t,n,r){return qe(this.configuration).findKovsAndJurPersonsInTheSameAdministrativeDivision(e,t,n,r).then((e=>e(this.axios,this.basePath)))}findPublicSectorInstitutions(e,t,n){return qe(this.configuration).findPublicSectorInstitutions(e,t,n).then((e=>e(this.axios,this.basePath)))}findRolesByDbName(e){return qe(this.configuration).findRolesByDbName(e).then((e=>e(this.axios,this.basePath)))}getAllActiveInstitutions(e){return qe(this.configuration).getAllActiveInstitutions(e).then((e=>e(this.axios,this.basePath)))}getAllClassifierBusinessTypeDtos(e){return qe(this.configuration).getAllClassifierBusinessTypeDtos(e).then((e=>e(this.axios,this.basePath)))}getJurPerson(e,t){return qe(this.configuration).getJurPerson(e,t).then((e=>e(this.axios,this.basePath)))}getJurPersonAncestors(e,t){return qe(this.configuration).getJurPersonAncestors(e,t).then((e=>e(this.axios,this.basePath)))}getJurPersonSuccessors(e,t){return qe(this.configuration).getJurPersonSuccessors(e,t).then((e=>e(this.axios,this.basePath)))}getJurPersonsByEhakCode(e,t){return qe(this.configuration).getJurPersonsByEhakCode(e,t).then((e=>e(this.axios,this.basePath)))}getPerson(e,t){return qe(this.configuration).getPerson(e,t).then((e=>e(this.axios,this.basePath)))}getPersonDetails(e){return qe(this.configuration).getPersonDetails(e).then((e=>e(this.axios,this.basePath)))}refreshUpdateArPersonFromAR(e,t){return qe(this.configuration).refreshUpdateArPersonFromAR(e,t).then((e=>e(this.axios,this.basePath)))}removeYlemyksusReference(e,t){return qe(this.configuration).removeYlemyksusReference(e,t).then((e=>e(this.axios,this.basePath)))}updatePerson(e,t,n){return qe(this.configuration).updatePerson(e,t,n).then((e=>e(this.axios,this.basePath)))}}const Je=function(e){const t=function(e){return{searchPerson:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Be("searchPerson","input",t);const i=new URL("/search/searchPerson",Ue);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...o},l={};void 0!==t&&(l.input=t),void 0!==n&&(l.xRoad=n),void 0!==r&&(l.isPrivate=r),Ke(i,l);let c=a&&a.headers?a.headers:{};return s.headers={...c,...o.headers},{url:Ve(i),options:s}}}}(e);return{async searchPerson(n,r,o,i){const a=await t.searchPerson(n,r,o,i);return He(a,Ee(),Re,e)}}};class Xe extends Le{searchPerson(e,t,n,r){return Je(this.configuration).searchPerson(e,t,n,r).then((e=>e(this.axios,this.basePath)))}}const Ze=function(e){const t=function(e){return{addRoleToUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new URL("/user/addrole",Ue);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};Ke(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=$e(t,i,e),{url:Ve(r),options:i}},addUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new URL("/user",Ue);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};Ke(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=$e(t,i,e),{url:Ve(r),options:i}},appointSubstituteUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new URL("/user-substitution/appoint-substitute",Ue);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},a={"Content-Type":"application/json"};Ke(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=$e(t,i,e),{url:Ve(r),options:i}},deleteUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("deleteUser","userId",t);const r="/user/{userId}".replace("{userId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"DELETE",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},deleteUserRole:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("deleteUserRole","userRoleRelId",t);const r="/user/role/{userRoleRelId}".replace("{userRoleRelId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"DELETE",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},findUsersByRoleId:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("findUsersByRoleId","roleId",t);const r="/user/byroleid/{roleId}".replace("{roleId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getAllClassifierUserRoleDtos:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/user/roles/all",Ue);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ke(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:Ve(n),options:o}},getHealth:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/health",Ue);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ke(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:Ve(n),options:o}},getJurUsers:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getJurUsers","personId",t);const r="/jur/user/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getJurUsersWithoutGivenRole:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Be("getJurUsersWithoutGivenRole","personId",t),Be("getJurUsersWithoutGivenRole","roleId",n);const o="/jur/user/withoutrole/{personId}/{roleId}".replace("{personId}",encodeURIComponent(String(t))).replace("{roleId}",encodeURIComponent(String(n))),i=new URL(o,Ue);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r};Ke(i,{});let l=a&&a.headers?a.headers:{};return s.headers={...l,...r.headers},{url:Ve(i),options:s}},getUser:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getUser","userId",t);const r="/user/{userId}".replace("{userId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getUserPossibleRecipients:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new URL("/user/possiblerecipients",Ue);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},a={};void 0!==t&&(a.searchInput=t),Ke(r,a);let s=o&&o.headers?o.headers:{};return i.headers={...s,...n.headers},{url:Ve(r),options:i}},getUsers:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be("getUsers","personId",t);const r="/user/usersByPersonId/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(r,Ue);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Ke(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:Ve(o),options:a}},getUsersJurPerson:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Be("getUsersJurPerson","userId",t);const o="/user/jur/{userId}".replace("{userId}",encodeURIComponent(String(t))),i=new URL(o,Ue);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},l={};void 0!==n&&(l.valid=n),Ke(i,l);let c=a&&a.headers?a.headers:{};return s.headers={...c,...r.headers},{url:Ve(i),options:s}},updateUser:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Be("updateUser","userId",t);const o="/user/{userId}".replace("{userId}",encodeURIComponent(String(t))),i=new URL(o,Ue);let a;e&&(a=e.baseOptions);const s={method:"PUT",...a,...r},l={"Content-Type":"application/json"};Ke(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},s.data=$e(n,s,e),{url:Ve(i),options:s}},updateUserRole:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Be("updateUserRole","userRoleRelId",t);const o="/user/modifyrole/{userRoleRelId}".replace("{userRoleRelId}",encodeURIComponent(String(t))),i=new URL(o,Ue);let a;e&&(a=e.baseOptions);const s={method:"PUT",...a,...r},l={"Content-Type":"application/json"};Ke(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},s.data=$e(n,s,e),{url:Ve(i),options:s}}}}(e);return{async addRoleToUser(n,r){const o=await t.addRoleToUser(n,r);return He(o,Ee(),Re,e)},async addUser(n,r){const o=await t.addUser(n,r);return He(o,Ee(),Re,e)},async appointSubstituteUser(n,r){const o=await t.appointSubstituteUser(n,r);return He(o,Ee(),Re,e)},async deleteUser(n,r){const o=await t.deleteUser(n,r);return He(o,Ee(),Re,e)},async deleteUserRole(n,r){const o=await t.deleteUserRole(n,r);return He(o,Ee(),Re,e)},async findUsersByRoleId(n,r){const o=await t.findUsersByRoleId(n,r);return He(o,Ee(),Re,e)},async getAllClassifierUserRoleDtos(n){const r=await t.getAllClassifierUserRoleDtos(n);return He(r,Ee(),Re,e)},async getHealth(n){const r=await t.getHealth(n);return He(r,Ee(),Re,e)},async getJurUsers(n,r){const o=await t.getJurUsers(n,r);return He(o,Ee(),Re,e)},async getJurUsersWithoutGivenRole(n,r,o){const i=await t.getJurUsersWithoutGivenRole(n,r,o);return He(i,Ee(),Re,e)},async getUser(n,r){const o=await t.getUser(n,r);return He(o,Ee(),Re,e)},async getUserPossibleRecipients(n,r){const o=await t.getUserPossibleRecipients(n,r);return He(o,Ee(),Re,e)},async getUsers(n,r){const o=await t.getUsers(n,r);return He(o,Ee(),Re,e)},async getUsersJurPerson(n,r,o){const i=await t.getUsersJurPerson(n,r,o);return He(i,Ee(),Re,e)},async updateUser(n,r,o){const i=await t.updateUser(n,r,o);return He(i,Ee(),Re,e)},async updateUserRole(n,r,o){const i=await t.updateUserRole(n,r,o);return He(i,Ee(),Re,e)}}};class Qe extends Le{addRoleToUser(e,t){return Ze(this.configuration).addRoleToUser(e,t).then((e=>e(this.axios,this.basePath)))}addUser(e,t){return Ze(this.configuration).addUser(e,t).then((e=>e(this.axios,this.basePath)))}appointSubstituteUser(e,t){return Ze(this.configuration).appointSubstituteUser(e,t).then((e=>e(this.axios,this.basePath)))}deleteUser(e,t){return Ze(this.configuration).deleteUser(e,t).then((e=>e(this.axios,this.basePath)))}deleteUserRole(e,t){return Ze(this.configuration).deleteUserRole(e,t).then((e=>e(this.axios,this.basePath)))}findUsersByRoleId(e,t){return Ze(this.configuration).findUsersByRoleId(e,t).then((e=>e(this.axios,this.basePath)))}getAllClassifierUserRoleDtos(e){return Ze(this.configuration).getAllClassifierUserRoleDtos(e).then((e=>e(this.axios,this.basePath)))}getHealth(e){return Ze(this.configuration).getHealth(e).then((e=>e(this.axios,this.basePath)))}getJurUsers(e,t){return Ze(this.configuration).getJurUsers(e,t).then((e=>e(this.axios,this.basePath)))}getJurUsersWithoutGivenRole(e,t,n){return Ze(this.configuration).getJurUsersWithoutGivenRole(e,t,n).then((e=>e(this.axios,this.basePath)))}getUser(e,t){return Ze(this.configuration).getUser(e,t).then((e=>e(this.axios,this.basePath)))}getUserPossibleRecipients(e,t){return Ze(this.configuration).getUserPossibleRecipients(e,t).then((e=>e(this.axios,this.basePath)))}getUsers(e,t){return Ze(this.configuration).getUsers(e,t).then((e=>e(this.axios,this.basePath)))}getUsersJurPerson(e,t,n){return Ze(this.configuration).getUsersJurPerson(e,t,n).then((e=>e(this.axios,this.basePath)))}updateUser(e,t,n){return Ze(this.configuration).updateUser(e,t,n).then((e=>e(this.axios,this.basePath)))}updateUserRole(e,t,n){return Ze(this.configuration).updateUserRole(e,t,n).then((e=>e(this.axios,this.basePath)))}}class et{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const tt="http://localhost:8080".replace(/\/+$/,"");class nt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class rt extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const ot="https://example.com",it=function(e,t,n){if(null==n)throw new rt(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function at(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach((t=>at(e,t,n))):Object.keys(t).forEach((r=>at(e,t[r],`${n}${""!==n?".":""}${r}`))):e.has(n)?e.append(n,t):e.set(n,t))}const st=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];at(t,r),e.search=t.toString()},lt=function(e,t,n){const r="string"!=typeof e;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(void 0!==e?e:{}):e||""},ct=function(e){return e.pathname+e.search+e.hash},ut=function(e,t,n,r){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const a={...e.options,url:((null==r?void 0:r.basePath)||o.defaults.baseURL||i)+e.url};return o.request(a)}},dt=function(e){const t=function(e){return{findIncomingDocuments:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("findIncomingDocuments","documentBaseQueryDto",t);const r=new URL("/documents/incomingdocuments",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}},findWorkingDocuments1:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("findWorkingDocuments1","documentBaseQueryDto",t);const r=new URL("/documents/basedocuments",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}}}}(e);return{async findIncomingDocuments(n,r){const o=await t.findIncomingDocuments(n,r);return ut(o,Ee(),tt,e)},async findWorkingDocuments1(n,r){const o=await t.findWorkingDocuments1(n,r);return ut(o,Ee(),tt,e)}}};class pt extends nt{findIncomingDocuments(e,t){return dt(this.configuration).findIncomingDocuments(e,t).then((e=>e(this.axios,this.basePath)))}findWorkingDocuments1(e,t){return dt(this.configuration).findWorkingDocuments1(e,t).then((e=>e(this.axios,this.basePath)))}}const ft=function(e){const t=function(e){return{searchDetailBuildings:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("searchDetailBuildings","buildingSearchDto",t);const r=new URL("/search/buildings",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}},searchDetailDocuments:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("searchDetailDocuments","documentSearchDto",t);const r=new URL("/search/documents",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}},searchDetailProceedings:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("searchDetailProceedings","proceedingSearchDto",t);const r=new URL("/search/proceedings",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}}}}(e);return{async searchDetailBuildings(n,r){const o=await t.searchDetailBuildings(n,r);return ut(o,Ee(),tt,e)},async searchDetailDocuments(n,r){const o=await t.searchDetailDocuments(n,r);return ut(o,Ee(),tt,e)},async searchDetailProceedings(n,r){const o=await t.searchDetailProceedings(n,r);return ut(o,Ee(),tt,e)}}};class ht extends nt{searchDetailBuildings(e,t){return ft(this.configuration).searchDetailBuildings(e,t).then((e=>e(this.axios,this.basePath)))}searchDetailDocuments(e,t){return ft(this.configuration).searchDetailDocuments(e,t).then((e=>e(this.axios,this.basePath)))}searchDetailProceedings(e,t){return ft(this.configuration).searchDetailProceedings(e,t).then((e=>e(this.axios,this.basePath)))}}const mt=function(e){const t=function(e){return{findOperationInvitations:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("findOperationInvitations","operationQueryDto",t);const r=new URL("/myoperations/operationinvitations",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}},findOperations:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("findOperations","operationQueryDto",t);const r=new URL("/myoperations/myoperations",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}},findOperationsToComment:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("findOperationsToComment","operationQueryDto",t);const r=new URL("/myoperations/operationstocomment",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}}}}(e);return{async findOperationInvitations(n,r){const o=await t.findOperationInvitations(n,r);return ut(o,Ee(),tt,e)},async findOperations(n,r){const o=await t.findOperations(n,r);return ut(o,Ee(),tt,e)},async findOperationsToComment(n,r){const o=await t.findOperationsToComment(n,r);return ut(o,Ee(),tt,e)}}};class gt extends nt{findOperationInvitations(e,t){return mt(this.configuration).findOperationInvitations(e,t).then((e=>e(this.axios,this.basePath)))}findOperations(e,t){return mt(this.configuration).findOperations(e,t).then((e=>e(this.axios,this.basePath)))}findOperationsToComment(e,t){return mt(this.configuration).findOperationsToComment(e,t).then((e=>e(this.axios,this.basePath)))}}const vt=function(e){const t=function(e){return{findAreaProceedings:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("findAreaProceedings","proceedingQueryDto",t);const r=new URL("/myproceedings/my-area-proceedings",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}},findProceedings:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};it("findProceedings","myProceedingsRequestDto",t);const r=new URL("/myproceedings/myproceedings",ot);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};st(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=lt(t,i,e),{url:ct(r),options:i}}}}(e);return{async findAreaProceedings(n,r){const o=await t.findAreaProceedings(n,r);return ut(o,Ee(),tt,e)},async findProceedings(n,r){const o=await t.findProceedings(n,r);return ut(o,Ee(),tt,e)}}};class bt extends nt{findAreaProceedings(e,t){return vt(this.configuration).findAreaProceedings(e,t).then((e=>e(this.axios,this.basePath)))}findProceedings(e,t){return vt(this.configuration).findProceedings(e,t).then((e=>e(this.axios,this.basePath)))}}class yt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const xt="http://localhost:8080".replace(/\/+$/,"");class wt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class St extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const _t="https://example.com",Et=function(e,t,n){if(null==n)throw new St(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},kt=async function(e,t){if(t&&t.accessToken){const n="function"==typeof t.accessToken?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+n}};function Tt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach((t=>Tt(e,t,n))):Object.keys(t).forEach((r=>Tt(e,t[r],`${n}${""!==n?".":""}${r}`))):e.has(n)?e.append(n,t):e.set(n,t))}const Ct=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Tt(t,r),e.search=t.toString()},Ot=function(e,t,n){const r="string"!=typeof e;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(void 0!==e?e:{}):e||""},It=function(e){return e.pathname+e.search+e.hash},Mt=function(e,t,n,r){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const a={...e.options,url:((null==r?void 0:r.basePath)||o.defaults.baseURL||i)+e.url};return o.request(a)}};const Dt=function(e){const t=function(e){return{addAuthz:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("addAuthz","documentType",t),Et("addAuthz","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/addAuthz".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r};Ct(i,{});let l=a&&a.headers?a.headers:{};return s.headers={...l,...r.headers},{url:It(i),options:s}},apiVersion:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/version",_t);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ct(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:It(n),options:o}},autoUpdateOwnershipType:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/document/updateOwnershipType",_t);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ct(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:It(n),options:o}},createDoDokuDokuRel:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("createDoDokuDokuRel","documentId",t),Et("createDoDokuDokuRel","addEntityDto",n);const o="/document/{documentId}/createDoDokuDokuRel".replace("{documentId}",encodeURIComponent(String(t))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"POST",...a,...r},l={};await kt(l,e),l["Content-Type"]="application/json",Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},s.data=Ot(n,s,e),{url:It(i),options:s}},createDocument:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("createDocument","documentType",t);const o="/document/{documentType}".replace("{documentType}",encodeURIComponent(String(t))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"POST",...a,...r},l={};await kt(l,e),l["Content-Type"]="application/json",Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},s.data=Ot(n,s,e),{url:It(i),options:s}},createNewVersion:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("createNewVersion","documentType",t),Et("createNewVersion","applicationNumber",n),Et("createNewVersion","versionDto",r);const i="/document/{documentType}/{applicationNumber}/version/new".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"POST",...s,...o},c={};await kt(c,e),c["Content-Type"]="application/json",Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},l.data=Ot(r,l,e),{url:It(a),options:l}},deleteApplicationByNumber:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("deleteApplicationByNumber","documentType",t),Et("deleteApplicationByNumber","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"DELETE",...a,...r},l={};await kt(l,e),Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:It(i),options:s}},endProceedingCircleDocuments:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("endProceedingCircleDocuments","documentType",t),Et("endProceedingCircleDocuments","applicationNumber",n),Et("endProceedingCircleDocuments","proceedingId",r);const i="/document/{documentType}/{applicationNumber}/proceeding/{proceedingId}/endCircle".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{proceedingId}",encodeURIComponent(String(r))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"POST",...s,...o},c={};await kt(c,e),Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:It(a),options:l}},getAccessRights:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("getAccessRights","documentType",t),Et("getAccessRights","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/rights".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},l={};await kt(l,e),Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:It(i),options:s}},getApplicationById:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Et("getApplicationById","documentId",t);const r="/document/{documentId}".replace("{documentId}",encodeURIComponent(String(t))),o=new URL(r,_t);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n},s={};await kt(s,e),Ct(o,{});let l=i&&i.headers?i.headers:{};return a.headers={...s,...l,...n.headers},{url:It(o),options:a}},getApplicationByNumber:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("getApplicationByNumber","documentType",t),Et("getApplicationByNumber","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},l={};await kt(l,e),Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:It(i),options:s}},getApplicationByNumberOld:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("getApplicationByNumberOld","ehrCode",t),Et("getApplicationByNumberOld","applicationNumber",n);const o="/document/old/{ehrCode}/{applicationNumber}".replace("{ehrCode}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},l={};await kt(l,e),Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:It(i),options:s}},getApplicationByNumberWithVersion:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("getApplicationByNumberWithVersion","documentType",t),Et("getApplicationByNumberWithVersion","applicationNumber",n),Et("getApplicationByNumberWithVersion","version",r);const i="/document/{documentType}/{applicationNumber}/{version}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{version}",encodeURIComponent(String(r))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={};await kt(c,e),Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:It(a),options:l}},getApplicationStateFee:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("getApplicationStateFee","documentType",t),Et("getApplicationStateFee","applicationNumber",n),Et("getApplicationStateFee","applicationDto",r);const i="/document/{documentType}/{applicationNumber}/stateFee".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"POST",...s,...o},c={};await kt(c,e),c["Content-Type"]="application/json",Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},l.data=Ot(r,l,e),{url:It(a),options:l}},getApplicationStateFeeOfVersion:async function(t,n,r,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Et("getApplicationStateFeeOfVersion","documentType",t),Et("getApplicationStateFeeOfVersion","applicationNumber",n),Et("getApplicationStateFeeOfVersion","version",r),Et("getApplicationStateFeeOfVersion","applicationDto",o);const a="/document/{documentType}/{applicationNumber}/{version}/stateFee".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{version}",encodeURIComponent(String(r))),s=new URL(a,_t);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...i},u={};await kt(u,e),u["Content-Type"]="application/json",Ct(s,{});let d=l&&l.headers?l.headers:{};return c.headers={...u,...d,...i.headers},c.data=Ot(o,c,e),{url:It(s),options:c}},getDocumentFileRels:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Et("getDocumentFileRels","docNr",t);const r=new URL("/document/fileRels",_t);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},a={},s={};await kt(a,e),void 0!==t&&(s.docNr=t),Ct(r,s);let l=o&&o.headers?o.headers:{};return i.headers={...a,...l,...n.headers},{url:It(r),options:i}},getDotysBasedOnUserRights:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new URL("/document/starting_rights",_t);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},a={};void 0!==t&&(a.ehrCode=t),Ct(r,a);let s=o&&o.headers?o.headers:{};return i.headers={...s,...n.headers},{url:It(r),options:i}},getHealth:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/health",_t);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Ct(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:It(n),options:o}},getLastStateHistory:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("getLastStateHistory","documentType",t),Et("getLastStateHistory","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/state-history/last".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r};Ct(i,{});let l=a&&a.headers?a.headers:{};return s.headers={...l,...r.headers},{url:It(i),options:s}},initializeAds:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("initializeAds","documentType",t),Et("initializeAds","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/initAds".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r};Ct(i,{});let l=a&&a.headers?a.headers:{};return s.headers={...l,...r.headers},{url:It(i),options:s}},mergeInstitutions:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Et("mergeInstitutions","mergeInstitutionsDTO",t);const r=new URL("/document/merge",_t);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};Ct(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=Ot(t,i,e),{url:It(r),options:i}},reSubmit:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("reSubmit","documentType",t),Et("reSubmit","applicationNumber",n),Et("reSubmit","proceedingNumber",r);const i="/document/{documentType}/{applicationNumber}/resubmit/{proceedingNumber}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{proceedingNumber}",encodeURIComponent(String(r))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"POST",...s,...o},c={};await kt(c,e),Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:It(a),options:l}},recalculatestate:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("recalculatestate","documentType",t),Et("recalculatestate","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/recalculatedetailstate".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r};Ct(i,{});let l=a&&a.headers?a.headers:{};return s.headers={...l,...r.headers},{url:It(i),options:s}},revertCreateNewVersion:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("revertCreateNewVersion","documentType",t),Et("revertCreateNewVersion","applicationNumber",n),Et("revertCreateNewVersion","versionDto",r);const i="/document/{documentType}/{applicationNumber}/version/revert".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"POST",...s,...o},c={};await kt(c,e),c["Content-Type"]="application/json",Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},l.data=Ot(r,l,e),{url:It(a),options:l}},saveAndValidate:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("saveAndValidate","documentType",t),Et("saveAndValidate","applicationNumber",n),Et("saveAndValidate","applicationDto",r);const i="/document/{documentType}/{applicationNumber}/saveAndValidate".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"POST",...s,...o},c={};await kt(c,e),c["Content-Type"]="application/json",Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},l.data=Ot(r,l,e),{url:It(a),options:l}},saveApplicationByNumber:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("saveApplicationByNumber","documentType",t),Et("saveApplicationByNumber","applicationNumber",n),Et("saveApplicationByNumber","applicationDto",r);const i="/document/{documentType}/{applicationNumber}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"PUT",...s,...o},c={};await kt(c,e),c["Content-Type"]="application/json",Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},l.data=Ot(r,l,e),{url:It(a),options:l}},setWaterExtractionPointsTestDates:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("setWaterExtractionPointsTestDates","documentType",t),Et("setWaterExtractionPointsTestDates","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/water-extraction-point/set-test-dates".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"PUT",...a,...r},l={};await kt(l,e),Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:It(i),options:s}},setWaterExtractionPointsTestDatesForBuilding:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("setWaterExtractionPointsTestDatesForBuilding","documentType",t),Et("setWaterExtractionPointsTestDatesForBuilding","applicationNumber",n),Et("setWaterExtractionPointsTestDatesForBuilding","ehrCode",r);const i="/document/{documentType}/{applicationNumber}/building/{ehrCode}/water-extraction-point/set-test-dates".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{ehrCode}",encodeURIComponent(String(r))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"PUT",...s,...o},c={};await kt(c,e),Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:It(a),options:l}},submitStraightToRegistry:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("submitStraightToRegistry","documentType",t),Et("submitStraightToRegistry","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/submitToRegistry".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"POST",...a,...r},l={};await kt(l,e),Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:It(i),options:s}},submitToProcessing:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("submitToProcessing","documentType",t),Et("submitToProcessing","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/submitToProcessing".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"PUT",...a,...r},l={};await kt(l,e),Ct(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:It(i),options:s}},submitToSigning:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("submitToSigning","documentType",t),Et("submitToSigning","applicationNumber",n),Et("submitToSigning","applicationDto",r);const i="/document/{documentType}/{applicationNumber}/submitToSigning".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"PUT",...s,...o},c={};await kt(c,e),c["Content-Type"]="application/json",Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},l.data=Ot(r,l,e),{url:It(a),options:l}},submitToSupervisorProcessing:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Et("submitToSupervisorProcessing","documentType",t),Et("submitToSupervisorProcessing","applicationNumber",n),Et("submitToSupervisorProcessing","supervisorId",r);const i="/document/{documentType}/{applicationNumber}/submitToSupervisor/{supervisorId}".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))).replace("{supervisorId}",encodeURIComponent(String(r))),a=new URL(i,_t);let s;e&&(s=e.baseOptions);const l={method:"POST",...s,...o},c={};await kt(c,e),Ct(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:It(a),options:l}},validateSavedDocument:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Et("validateSavedDocument","documentType",t),Et("validateSavedDocument","applicationNumber",n);const o="/document/{documentType}/{applicationNumber}/completeApplicationChecks".replace("{documentType}",encodeURIComponent(String(t))).replace("{applicationNumber}",encodeURIComponent(String(n))),i=new URL(o,_t);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r};Ct(i,{});let l=a&&a.headers?a.headers:{};return s.headers={...l,...r.headers},{url:It(i),options:s}}}}(e);return{async addAuthz(n,r,o){const i=await t.addAuthz(n,r,o);return Mt(i,Ee(),xt,e)},async apiVersion(n){const r=await t.apiVersion(n);return Mt(r,Ee(),xt,e)},async autoUpdateOwnershipType(n){const r=await t.autoUpdateOwnershipType(n);return Mt(r,Ee(),xt,e)},async createDoDokuDokuRel(n,r,o){const i=await t.createDoDokuDokuRel(n,r,o);return Mt(i,Ee(),xt,e)},async createDocument(n,r,o){const i=await t.createDocument(n,r,o);return Mt(i,Ee(),xt,e)},async createNewVersion(n,r,o,i){const a=await t.createNewVersion(n,r,o,i);return Mt(a,Ee(),xt,e)},async deleteApplicationByNumber(n,r,o){const i=await t.deleteApplicationByNumber(n,r,o);return Mt(i,Ee(),xt,e)},async endProceedingCircleDocuments(n,r,o,i){const a=await t.endProceedingCircleDocuments(n,r,o,i);return Mt(a,Ee(),xt,e)},async getAccessRights(n,r,o){const i=await t.getAccessRights(n,r,o);return Mt(i,Ee(),xt,e)},async getApplicationById(n,r){const o=await t.getApplicationById(n,r);return Mt(o,Ee(),xt,e)},async getApplicationByNumber(n,r,o){const i=await t.getApplicationByNumber(n,r,o);return Mt(i,Ee(),xt,e)},async getApplicationByNumberOld(n,r,o){const i=await t.getApplicationByNumberOld(n,r,o);return Mt(i,Ee(),xt,e)},async getApplicationByNumberWithVersion(n,r,o,i){const a=await t.getApplicationByNumberWithVersion(n,r,o,i);return Mt(a,Ee(),xt,e)},async getApplicationStateFee(n,r,o,i){const a=await t.getApplicationStateFee(n,r,o,i);return Mt(a,Ee(),xt,e)},async getApplicationStateFeeOfVersion(n,r,o,i,a){const s=await t.getApplicationStateFeeOfVersion(n,r,o,i,a);return Mt(s,Ee(),xt,e)},async getDocumentFileRels(n,r){const o=await t.getDocumentFileRels(n,r);return Mt(o,Ee(),xt,e)},async getDotysBasedOnUserRights(n,r){const o=await t.getDotysBasedOnUserRights(n,r);return Mt(o,Ee(),xt,e)},async getHealth(n){const r=await t.getHealth(n);return Mt(r,Ee(),xt,e)},async getLastStateHistory(n,r,o){const i=await t.getLastStateHistory(n,r,o);return Mt(i,Ee(),xt,e)},async initializeAds(n,r,o){const i=await t.initializeAds(n,r,o);return Mt(i,Ee(),xt,e)},async mergeInstitutions(n,r){const o=await t.mergeInstitutions(n,r);return Mt(o,Ee(),xt,e)},async reSubmit(n,r,o,i){const a=await t.reSubmit(n,r,o,i);return Mt(a,Ee(),xt,e)},async recalculatestate(n,r,o){const i=await t.recalculatestate(n,r,o);return Mt(i,Ee(),xt,e)},async revertCreateNewVersion(n,r,o,i){const a=await t.revertCreateNewVersion(n,r,o,i);return Mt(a,Ee(),xt,e)},async saveAndValidate(n,r,o,i){const a=await t.saveAndValidate(n,r,o,i);return Mt(a,Ee(),xt,e)},async saveApplicationByNumber(n,r,o,i){const a=await t.saveApplicationByNumber(n,r,o,i);return Mt(a,Ee(),xt,e)},async setWaterExtractionPointsTestDates(n,r,o){const i=await t.setWaterExtractionPointsTestDates(n,r,o);return Mt(i,Ee(),xt,e)},async setWaterExtractionPointsTestDatesForBuilding(n,r,o,i){const a=await t.setWaterExtractionPointsTestDatesForBuilding(n,r,o,i);return Mt(a,Ee(),xt,e)},async submitStraightToRegistry(n,r,o){const i=await t.submitStraightToRegistry(n,r,o);return Mt(i,Ee(),xt,e)},async submitToProcessing(n,r,o){const i=await t.submitToProcessing(n,r,o);return Mt(i,Ee(),xt,e)},async submitToSigning(n,r,o,i){const a=await t.submitToSigning(n,r,o,i);return Mt(a,Ee(),xt,e)},async submitToSupervisorProcessing(n,r,o,i){const a=await t.submitToSupervisorProcessing(n,r,o,i);return Mt(a,Ee(),xt,e)},async validateSavedDocument(n,r,o){const i=await t.validateSavedDocument(n,r,o);return Mt(i,Ee(),xt,e)}}};class jt extends wt{addAuthz(e,t,n){return Dt(this.configuration).addAuthz(e,t,n).then((e=>e(this.axios,this.basePath)))}apiVersion(e){return Dt(this.configuration).apiVersion(e).then((e=>e(this.axios,this.basePath)))}autoUpdateOwnershipType(e){return Dt(this.configuration).autoUpdateOwnershipType(e).then((e=>e(this.axios,this.basePath)))}createDoDokuDokuRel(e,t,n){return Dt(this.configuration).createDoDokuDokuRel(e,t,n).then((e=>e(this.axios,this.basePath)))}createDocument(e,t,n){return Dt(this.configuration).createDocument(e,t,n).then((e=>e(this.axios,this.basePath)))}createNewVersion(e,t,n,r){return Dt(this.configuration).createNewVersion(e,t,n,r).then((e=>e(this.axios,this.basePath)))}deleteApplicationByNumber(e,t,n){return Dt(this.configuration).deleteApplicationByNumber(e,t,n).then((e=>e(this.axios,this.basePath)))}endProceedingCircleDocuments(e,t,n,r){return Dt(this.configuration).endProceedingCircleDocuments(e,t,n,r).then((e=>e(this.axios,this.basePath)))}getAccessRights(e,t,n){return Dt(this.configuration).getAccessRights(e,t,n).then((e=>e(this.axios,this.basePath)))}getApplicationById(e,t){return Dt(this.configuration).getApplicationById(e,t).then((e=>e(this.axios,this.basePath)))}getApplicationByNumber(e,t,n){return Dt(this.configuration).getApplicationByNumber(e,t,n).then((e=>e(this.axios,this.basePath)))}getApplicationByNumberOld(e,t,n){return Dt(this.configuration).getApplicationByNumberOld(e,t,n).then((e=>e(this.axios,this.basePath)))}getApplicationByNumberWithVersion(e,t,n,r){return Dt(this.configuration).getApplicationByNumberWithVersion(e,t,n,r).then((e=>e(this.axios,this.basePath)))}getApplicationStateFee(e,t,n,r){return Dt(this.configuration).getApplicationStateFee(e,t,n,r).then((e=>e(this.axios,this.basePath)))}getApplicationStateFeeOfVersion(e,t,n,r,o){return Dt(this.configuration).getApplicationStateFeeOfVersion(e,t,n,r,o).then((e=>e(this.axios,this.basePath)))}getDocumentFileRels(e,t){return Dt(this.configuration).getDocumentFileRels(e,t).then((e=>e(this.axios,this.basePath)))}getDotysBasedOnUserRights(e,t){return Dt(this.configuration).getDotysBasedOnUserRights(e,t).then((e=>e(this.axios,this.basePath)))}getHealth(e){return Dt(this.configuration).getHealth(e).then((e=>e(this.axios,this.basePath)))}getLastStateHistory(e,t,n){return Dt(this.configuration).getLastStateHistory(e,t,n).then((e=>e(this.axios,this.basePath)))}initializeAds(e,t,n){return Dt(this.configuration).initializeAds(e,t,n).then((e=>e(this.axios,this.basePath)))}mergeInstitutions(e,t){return Dt(this.configuration).mergeInstitutions(e,t).then((e=>e(this.axios,this.basePath)))}reSubmit(e,t,n,r){return Dt(this.configuration).reSubmit(e,t,n,r).then((e=>e(this.axios,this.basePath)))}recalculatestate(e,t,n){return Dt(this.configuration).recalculatestate(e,t,n).then((e=>e(this.axios,this.basePath)))}revertCreateNewVersion(e,t,n,r){return Dt(this.configuration).revertCreateNewVersion(e,t,n,r).then((e=>e(this.axios,this.basePath)))}saveAndValidate(e,t,n,r){return Dt(this.configuration).saveAndValidate(e,t,n,r).then((e=>e(this.axios,this.basePath)))}saveApplicationByNumber(e,t,n,r){return Dt(this.configuration).saveApplicationByNumber(e,t,n,r).then((e=>e(this.axios,this.basePath)))}setWaterExtractionPointsTestDates(e,t,n){return Dt(this.configuration).setWaterExtractionPointsTestDates(e,t,n).then((e=>e(this.axios,this.basePath)))}setWaterExtractionPointsTestDatesForBuilding(e,t,n,r){return Dt(this.configuration).setWaterExtractionPointsTestDatesForBuilding(e,t,n,r).then((e=>e(this.axios,this.basePath)))}submitStraightToRegistry(e,t,n){return Dt(this.configuration).submitStraightToRegistry(e,t,n).then((e=>e(this.axios,this.basePath)))}submitToProcessing(e,t,n){return Dt(this.configuration).submitToProcessing(e,t,n).then((e=>e(this.axios,this.basePath)))}submitToSigning(e,t,n,r){return Dt(this.configuration).submitToSigning(e,t,n,r).then((e=>e(this.axios,this.basePath)))}submitToSupervisorProcessing(e,t,n,r){return Dt(this.configuration).submitToSupervisorProcessing(e,t,n,r).then((e=>e(this.axios,this.basePath)))}validateSavedDocument(e,t,n){return Dt(this.configuration).validateSavedDocument(e,t,n).then((e=>e(this.axios,this.basePath)))}}class At{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const Nt="https://devkluster.ehr.ee/api/file-upload-api/v1".replace(/\/+$/,"");class Pt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class Rt extends Error{constructor(e,t){super(t),this.name="RequiredError",this.field=e}}const Lt="https://example.com",Ft=function(e,t,n){if(null==n)throw new Rt(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},Ut=async function(e,t){if(t&&t.accessToken){const n="function"==typeof t.accessToken?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+n}},Bt=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(const e of r)for(const n in e)if(Array.isArray(e[n])){t.delete(n);for(const r of e[n])t.append(n,r)}else t.set(n,e[n]);e.search=t.toString()},zt=function(e,t,n){const r="string"!=typeof e;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(void 0!==e?e:{}):e||""},Kt=function(e){return e.pathname+e.search+e.hash},$t=function(e,t,n,r){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const a={...e.options,url:((null==r?void 0:r.basePath)||i)+e.url};return o.request(a)}},Vt=function(e){const t=function(e){return{cloneFilesAndCreateRels:async function(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Ft("cloneFilesAndCreateRels","fileIds",t);const i=new URL("/fileClone",Lt);let a;e&&(a=e.baseOptions);const s={method:"POST",...a,...o},l={},c={};await Ut(l,e),t&&(c.fileIds=t),void 0!==n&&(c.docNr=n),void 0!==r&&(c.relType=r),Bt(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...o.headers},{url:Kt(i),options:s}},deleteFile:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ft("deleteFile","fileId",t);const r="/file/{fileId}".replace("{fileId}",encodeURIComponent(String(t))),o=new URL(r,Lt);let i;e&&(i=e.baseOptions);const a={method:"DELETE",...i,...n},s={};await Ut(s,e),Bt(o,{});let l=i&&i.headers?i.headers:{};return a.headers={...s,...l,...n.headers},{url:Kt(o),options:a}},downloadFile:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ft("downloadFile","fileId",t);const r="/file/{fileId}".replace("{fileId}",encodeURIComponent(String(t))),o=new URL(r,Lt);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n},s={};await Ut(s,e),Bt(o,{});let l=i&&i.headers?i.headers:{};return a.headers={...s,...l,...n.headers},{url:Kt(o),options:a}},updateFile:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ft("updateFile","fileId",t);const o="/file/{fileId}".replace("{fileId}",encodeURIComponent(String(t))),i=new URL(o,Lt);let a;e&&(a=e.baseOptions);const s={method:"PUT",...a,...r},l={};await Ut(l,e),l["Content-Type"]="application/json",Bt(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},s.data=zt(n,s,e),{url:Kt(i),options:s}},updateFileInfo:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ft("updateFileInfo","doFail",t);const r=new URL("/file/info",Lt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={};await Ut(a,e),a["Content-Type"]="application/json",Bt(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=zt(t,i,e),{url:Kt(r),options:i}},uploadFile:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new URL("/file",Lt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={},s=new(e&&e.formDataCtor||FormData);await Ut(a,e),void 0!==t&&s.append("file",t),a["Content-Type"]="multipart/form-data",Bt(r,{});let l=o&&o.headers?o.headers:{};return i.headers={...a,...l,...n.headers},i.data=s,{url:Kt(r),options:i}},uploadFileWithFileInfo:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=new URL("/fileWithInfo",Lt);let i;e&&(i=e.baseOptions);const a={method:"POST",...i,...r},s={},l=new(e&&e.formDataCtor||FormData);await Ut(s,e),void 0!==t&&l.append("file",t),void 0!==n&&l.append("fileInfo",new Blob([JSON.stringify(n)],{type:"application/json"})),s["Content-Type"]="multipart/form-data",Bt(o,{});let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=l,{url:Kt(o),options:a}},uploadFileWithFileInfoAndDocRel:async function(t,n,r,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const a=new URL("/fileWithInfoAndDocRel",Lt);let s;e&&(s=e.baseOptions);const l={method:"POST",...s,...i},c={},u=new(e&&e.formDataCtor||FormData);await Ut(c,e),void 0!==t&&u.append("file",t),void 0!==n&&u.append("fileInfo",new Blob([JSON.stringify(n)],{type:"application/json"})),void 0!==r&&u.append("docNr",r),void 0!==o&&u.append("relType",o),c["Content-Type"]="multipart/form-data",Bt(a,{});let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},l.data=u,{url:Kt(a),options:l}}}}(e);return{async cloneFilesAndCreateRels(n,r,o,i){const a=await t.cloneFilesAndCreateRels(n,r,o,i);return $t(a,Ee(),Nt,e)},async deleteFile(n,r){const o=await t.deleteFile(n,r);return $t(o,Ee(),Nt,e)},async downloadFile(n,r){const o=await t.downloadFile(n,r);return $t(o,Ee(),Nt,e)},async updateFile(n,r,o){const i=await t.updateFile(n,r,o);return $t(i,Ee(),Nt,e)},async updateFileInfo(n,r){const o=await t.updateFileInfo(n,r);return $t(o,Ee(),Nt,e)},async uploadFile(n,r){const o=await t.uploadFile(n,r);return $t(o,Ee(),Nt,e)},async uploadFileWithFileInfo(n,r,o){const i=await t.uploadFileWithFileInfo(n,r,o);return $t(i,Ee(),Nt,e)},async uploadFileWithFileInfoAndDocRel(n,r,o,i,a){const s=await t.uploadFileWithFileInfoAndDocRel(n,r,o,i,a);return $t(s,Ee(),Nt,e)}}};class Ht extends Pt{cloneFilesAndCreateRels(e,t,n,r){return Vt(this.configuration).cloneFilesAndCreateRels(e,t,n,r).then((e=>e(this.axios,this.basePath)))}deleteFile(e,t){return Vt(this.configuration).deleteFile(e,t).then((e=>e(this.axios,this.basePath)))}downloadFile(e,t){return Vt(this.configuration).downloadFile(e,t).then((e=>e(this.axios,this.basePath)))}updateFile(e,t,n){return Vt(this.configuration).updateFile(e,t,n).then((e=>e(this.axios,this.basePath)))}updateFileInfo(e,t){return Vt(this.configuration).updateFileInfo(e,t).then((e=>e(this.axios,this.basePath)))}uploadFile(e,t){return Vt(this.configuration).uploadFile(e,t).then((e=>e(this.axios,this.basePath)))}uploadFileWithFileInfo(e,t,n){return Vt(this.configuration).uploadFileWithFileInfo(e,t,n).then((e=>e(this.axios,this.basePath)))}uploadFileWithFileInfoAndDocRel(e,t,n,r,o){return Vt(this.configuration).uploadFileWithFileInfoAndDocRel(e,t,n,r,o).then((e=>e(this.axios,this.basePath)))}}class Wt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const Yt="https://devkluster.ehr.ee/api/yld-esi/v1".replace(/\/+$/,"");class qt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class Gt extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const Jt="https://example.com",Xt=function(e,t,n){if(null==n)throw new Gt(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function Zt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach((t=>Zt(e,t,n))):Object.keys(t).forEach((r=>Zt(e,t[r],`${n}${""!==n?".":""}${r}`))):e.has(n)?e.append(n,t):e.set(n,t))}const Qt=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Zt(t,r),e.search=t.toString()},en=function(e){return e.pathname+e.search+e.hash},tn=function(e,t,n,r){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const a={...e.options,url:((null==r?void 0:r.basePath)||o.defaults.baseURL||i)+e.url};return o.request(a)}};const nn=function(e){return{esileht:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Xt("esileht","id",t),Xt("esileht","language",n);const o="/public/page/{id}/{language}".replace("{id}",encodeURIComponent(String(t))).replace("{language}",encodeURIComponent(String(n))),i=new URL(o,Jt);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r};Qt(i,{});let l=a&&a.headers?a.headers:{};return s.headers={...l,...r.headers},{url:en(i),options:s}},lehed:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/api/pages",Jt);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Qt(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:en(n),options:o}},lehedId:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new URL("/api/pages/dotyid",Jt);let r;e&&(r=e.baseOptions);const o={method:"GET",...r,...t};Qt(n,{});let i=r&&r.headers?r.headers:{};return o.headers={...i,...t.headers},{url:en(n),options:o}},leht:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xt("leht","id",t);const r="/api/pages/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(r,Jt);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n};Qt(o,{});let s=i&&i.headers?i.headers:{};return a.headers={...s,...n.headers},{url:en(o),options:a}},lehtdSave:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xt("lehtdSave","esileht",t);const r=new URL("/api/pages",Jt);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={};a["Content-Type"]="application/json",Qt(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=function(e,t,n){const r="string"!=typeof e;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(void 0!==e?e:{}):e||""}(t,i,e),{url:en(r),options:i}}}},rn=function(e){const t=nn(e);return{async esileht(n,r,o){const i=await t.esileht(n,r,o);return tn(i,Ee(),Yt,e)},async lehed(n){const r=await t.lehed(n);return tn(r,Ee(),Yt,e)},async lehedId(n){const r=await t.lehedId(n);return tn(r,Ee(),Yt,e)},async leht(n,r){const o=await t.leht(n,r);return tn(o,Ee(),Yt,e)},async lehtdSave(n,r){const o=await t.lehtdSave(n,r);return tn(o,Ee(),Yt,e)}}};class on extends qt{esileht(e,t,n){return rn(this.configuration).esileht(e,t,n).then((e=>e(this.axios,this.basePath)))}lehed(e){return rn(this.configuration).lehed(e).then((e=>e(this.axios,this.basePath)))}lehedId(e){return rn(this.configuration).lehedId(e).then((e=>e(this.axios,this.basePath)))}leht(e,t){return rn(this.configuration).leht(e,t).then((e=>e(this.axios,this.basePath)))}lehtdSave(e,t){return rn(this.configuration).lehtdSave(e,t).then((e=>e(this.axios,this.basePath)))}}class an{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const sn={myViewsApiEndpoint:window.REACT_APP_MY_VIEWS_API_PATH,classifierApiEndpoint:window.REACT_APP_CLASSIFIER_SERVICE_ENDPOINT,userApiEndpoint:window.REACT_APP_USER_SERVICE_ENDPOINT,documentApiEndpoint:window.REACT_APP_DOCUMENT_SERVICE_ENDPOINT,fileUploadApiEndpoint:window.REACT_APP_FILE_UPLOAD_API_ENDPOINT,frontPageApiEndpoint:window.REACT_APP_YLD_API},ln={proceedingApiService:new bt(new yt({basePath:sn.myViewsApiEndpoint})),classifierApiService:new Ne(new Pe({basePath:sn.classifierApiEndpoint})),personApiService:new Ge(new et({basePath:sn.userApiEndpoint})),userApiService:new Qe(new et({basePath:sn.userApiEndpoint})),myDocumentBaseApiService:new pt(new yt({basePath:sn.myViewsApiEndpoint})),documentApiService:new jt(new At({basePath:sn.documentApiEndpoint})),fileApiService:new Ht(new Wt({basePath:sn.fileUploadApiEndpoint})),frontPageApi:new on(new an({basePath:sn.frontPageApiEndpoint})),institutionKovEndpointApi:new Ye(new et({basePath:sn.userApiEndpoint}))};var cn=o(848);const un=11272,dn=e=>{var t;let{userInfo:n}=e;const r=(0,$.useIntl)(),[o,i]=(0,B.useState)(!0),[a,s]=(0,B.useState)(""),[l,c]=(0,B.useState)(""),u=(null===(t=n.activeRole)||void 0===t?void 0:t.businessType)===le.MKM;(0,B.useEffect)((()=>{u?d():p()}),[]);const d=async()=>{ln.frontPageApi.leht(un).then((e=>{const t=e.data;t[0].body&&(s(t[0].body),c(t[0].body))}))},p=async()=>{ln.frontPageApi.esileht(un,"ee").then((e=>{const t=e.data;t.body&&(s(t.body),c(t.body))}))};return(0,cn.jsx)(V.Section,{collapsed:!1,title:"my_admin_proceedings.admin_proceedings_reminder",showSettings:!0,children:(0,cn.jsxs)("div",{className:o?"d-flex justify-content-between":"",children:[(0,cn.jsx)(V.RichTextEditor,{placeholder:o?"":r.formatMessage({id:"placeholder.writing"}),onChange:e=>c(e),value:l,readOnly:o,view:o}),u&&o&&(0,cn.jsx)(V.Link,{onClick:()=>i(!1),type:"edit"}),!o&&(0,cn.jsxs)("div",{className:"pt-2",children:[(0,cn.jsx)(V.Button,{colourScheme:"light",squared:!0,onClick:()=>{c(a),i(!0)},children:r.formatMessage({id:"button.cancel"})}),(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",squared:!0,onClick:()=>(async()=>{i(!o),s(l),ln.frontPageApi.lehtdSave({id:un,body:l,language:"ee"})})(),children:r.formatMessage({id:"button.save"})})]})]})})},pn={default:"header-arrow-up-down-icon",des:"header-arrow-down-icon",asc:"header-arrow-up-icon"},fn=e=>(0,cn.jsx)(V.Tooltip,{content:(0,cn.jsx)(V.Text,{raw:e.tooltipText}),placement:"bottom",theme:"dark",children:e.functionCall?(0,cn.jsx)(V.Link,{onClick:t=>{var n;return null===(n=e.functionCall)||void 0===n?void 0:n.call(e,t)},text:e.linkName,href:e.href}):(0,cn.jsx)(V.Link,{text:e.linkName,href:e.href,onClick:t=>{t.preventDefault(),t.stopPropagation();const n=window.open(e.href,"_blank");null==n||n.focus()}})},e.linkName),hn=e=>{let{proceedings:t,linkGen:n}=e;const r=(0,$.useIntl)(),o=[{id:"document_type",property:"documentType",size:180,getValue:e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""}},{id:"proceeding_nr",property:"proceedingNr",size:130,getValue:e=>{return(t=e).proceedingNr?(0,cn.jsx)(fn,{linkName:t.proceedingNr,tooltipText:"detailsearch.tooltip.open_proceeding",functionCall:e=>{n(!0,e,void 0,`administrativeActProceeding/${t.proceedingNr}`)}}):(0,cn.jsx)(cn.Fragment,{children:"-"});var t}},{id:"doty",property:"document",size:160,getValue:e=>e.document&&null!==e.document?(0,cn.jsx)(fn,{linkName:e.document,tooltipText:"detailsearch.tooltip.open_document",functionCall:t=>{n(!0,t,"DOCUMENT",e.document)}}):""},{id:"ehr_code",property:"ehrCode",size:130,getValue:e=>e.ehrCode&&null!==e.ehrCode?e.ehrCode.map(((t,r)=>(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(fn,{linkName:t,tooltipText:"detailsearch.tooltip.open_building",functionCall:e=>{n(!0,e,"BUILDING",t)}}),r!==e.ehrCode.length-1?(0,cn.jsx)("span",{children:", "}):""]}))):""},{id:"proceeding_state",property:"state",size:130,getValue:e=>e.state}];return(0,cn.jsx)(V.TableComponent,{config:{thead:{headers:o.map((e=>({id:e.id,size:e.size,className:"table-header-field text-align-left",label:r.formatMessage({id:"my_admin_proceedings.table.header."+e.id}),tooltip:{text:r.formatMessage({id:"my_admin_proceedings.table.tooltip."+e.id})},propertyName:e.property,sortable:!0,isShown:!0,type:"input",valueFormatter:t=>e.getValue(t)}))),icons:pn,expandableRow:!1,isFilter:!1}},data:t,handleEvent:()=>!0})},mn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const[n,r]=(0,B.useState)(!1),[o,i]=(0,B.useState)(void 0),[a,s]=(0,B.useState)([]);(0,B.useEffect)((()=>{i(void 0),l()}),[e,t]);const l=async()=>{var n;if((null===(n=e.activeRole)||void 0===n?void 0:n.businessType)===le.TJA){r(!0);try{var o;const n=t?{institutionId:e.activeRole.businessId}:{userId:e.userId},r=await ln.proceedingApiService.findAreaProceedings(n);s(null!==(o=null==r?void 0:r.data)&&void 0!==o?o:[])}catch(e){i("my_admin_proceedings.proceedings_request.error")}finally{r(!1)}}else s([])};return{loading:n,proceedings:a,error:o}},gn=e=>{let{userInfo:t,linkGen:n}=e;const r=(0,$.useIntl)(),[o,i]=(0,B.useState)(!1),{loading:a,error:s,proceedings:l}=mn(t,o);return(0,cn.jsxs)(V.Section,{collapsed:!1,title:"my_admin_proceedings.my_proceedings",showSettings:!0,children:[s&&(0,cn.jsx)(V.MessageBlock,{dismissible:!1,theme:"danger",children:r.formatMessage({id:s})}),a&&(0,cn.jsxs)(V.Row,{className:"mb-4 justify-content-center",children:[(0,cn.jsx)("br",{}),(0,cn.jsx)(V.Loader,{}),(0,cn.jsx)("br",{})]}),!a&&!(null==l||!l.length)&&!s&&(0,cn.jsx)(hn,{proceedings:l,linkGen:n}),(0,cn.jsx)("div",{className:"d-flex justify-content-start my-2",children:(0,cn.jsx)(V.Checkbox,{name:"checkbox",onChange:e=>i(e),text:r.formatMessage({id:"my_proceedings.view_all_institution_admin_proceedings"}),checked:o})})]})},vn=e=>{var t;let{userInfo:n,linkGen:r}=e;const o=(0,$.useIntl)(),i=(null===(t=n.activeRole)||void 0===t?void 0:t.businessType)===le.TJA;return(0,cn.jsxs)("div",{children:[(0,cn.jsx)("h2",{children:o.formatMessage({id:"my_admin_proceedings.page_title"})}),i&&(0,cn.jsx)("div",{className:"d-flex justify-content-end mt-2",children:(0,cn.jsx)(V.Button,{withPlus:!0,type:"submit",onClick:()=>{r(!0,void 0,"","/administrativeActProceeding")},children:o.formatMessage({id:"my_admin_proceedings.new_proceeding"})})}),(0,cn.jsx)(dn,{userInfo:n}),i&&(0,cn.jsx)(gn,{userInfo:n,linkGen:r})]})};const bn=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const yn="object"==typeof global&&global&&global.Object===Object&&global;var xn="object"==typeof self&&self&&self.Object===Object&&self;const wn=yn||xn||Function("return this")();const Sn=function(){return wn.Date.now()};var _n=/\s/;const En=function(e){for(var t=e.length;t--&&_n.test(e.charAt(t)););return t};var kn=/^\s+/;const Tn=function(e){return e?e.slice(0,En(e)+1).replace(kn,""):e};const Cn=wn.Symbol;var On=Object.prototype,In=On.hasOwnProperty,Mn=On.toString,Dn=Cn?Cn.toStringTag:void 0;const jn=function(e){var t=In.call(e,Dn),n=e[Dn];try{e[Dn]=void 0;var r=!0}catch(e){}var o=Mn.call(e);return r&&(t?e[Dn]=n:delete e[Dn]),o};var An=Object.prototype.toString;const Nn=function(e){return An.call(e)};var Pn=Cn?Cn.toStringTag:void 0;const Rn=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Pn&&Pn in Object(e)?jn(e):Nn(e)};const Ln=function(e){return null!=e&&"object"==typeof e};const Fn=function(e){return"symbol"==typeof e||Ln(e)&&"[object Symbol]"==Rn(e)};var Un=/^[-+]0x[0-9a-f]+$/i,Bn=/^0b[01]+$/i,zn=/^0o[0-7]+$/i,Kn=parseInt;const $n=function(e){if("number"==typeof e)return e;if(Fn(e))return NaN;if(bn(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=bn(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Tn(e);var n=Bn.test(e);return n||zn.test(e)?Kn(e.slice(2),n?2:8):Un.test(e)?NaN:+e};var Vn=Math.max,Hn=Math.min;const Wn=function(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=Sn();if(h(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Hn(n,i-(e-c)):n}(e))}function g(e){return s=void 0,p&&r?f(e):(r=o=void 0,a)}function v(){var e=Sn(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=$n(t)||0,bn(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Vn($n(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},v.flush=function(){return void 0===s?a:g(Sn())},v};const Yn=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o};const qn=function(){this.__data__=[],this.size=0};const Gn=function(e,t){return e===t||e!=e&&t!=t};const Jn=function(e,t){for(var n=e.length;n--;)if(Gn(e[n][0],t))return n;return-1};var Xn=Array.prototype.splice;const Zn=function(e){var t=this.__data__,n=Jn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Xn.call(t,n,1),--this.size,!0)};const Qn=function(e){var t=this.__data__,n=Jn(t,e);return n<0?void 0:t[n][1]};const er=function(e){return Jn(this.__data__,e)>-1};const tr=function(e,t){var n=this.__data__,r=Jn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function nr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nr.prototype.clear=qn,nr.prototype.delete=Zn,nr.prototype.get=Qn,nr.prototype.has=er,nr.prototype.set=tr;const rr=nr;const or=function(){this.__data__=new rr,this.size=0};const ir=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const ar=function(e){return this.__data__.get(e)};const sr=function(e){return this.__data__.has(e)};const lr=function(e){if(!bn(e))return!1;var t=Rn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const cr=wn["__core-js_shared__"];var ur,dr=(ur=/[^.]+$/.exec(cr&&cr.keys&&cr.keys.IE_PROTO||""))?"Symbol(src)_1."+ur:"";const pr=function(e){return!!dr&&dr in e};var fr=Function.prototype.toString;const hr=function(e){if(null!=e){try{return fr.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var mr=/^\[object .+?Constructor\]$/,gr=Function.prototype,vr=Object.prototype,br=gr.toString,yr=vr.hasOwnProperty,xr=RegExp("^"+br.call(yr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const wr=function(e){return!(!bn(e)||pr(e))&&(lr(e)?xr:mr).test(hr(e))};const Sr=function(e,t){return null==e?void 0:e[t]};const _r=function(e,t){var n=Sr(e,t);return wr(n)?n:void 0};const Er=_r(wn,"Map");const kr=_r(Object,"create");const Tr=function(){this.__data__=kr?kr(null):{},this.size=0};const Cr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var Or=Object.prototype.hasOwnProperty;const Ir=function(e){var t=this.__data__;if(kr){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Or.call(t,e)?t[e]:void 0};var Mr=Object.prototype.hasOwnProperty;const Dr=function(e){var t=this.__data__;return kr?void 0!==t[e]:Mr.call(t,e)};const jr=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kr&&void 0===t?"__lodash_hash_undefined__":t,this};function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ar.prototype.clear=Tr,Ar.prototype.delete=Cr,Ar.prototype.get=Ir,Ar.prototype.has=Dr,Ar.prototype.set=jr;const Nr=Ar;const Pr=function(){this.size=0,this.__data__={hash:new Nr,map:new(Er||rr),string:new Nr}};const Rr=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Lr=function(e,t){var n=e.__data__;return Rr(t)?n["string"==typeof t?"string":"hash"]:n.map};const Fr=function(e){var t=Lr(this,e).delete(e);return this.size-=t?1:0,t};const Ur=function(e){return Lr(this,e).get(e)};const Br=function(e){return Lr(this,e).has(e)};const zr=function(e,t){var n=Lr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Kr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kr.prototype.clear=Pr,Kr.prototype.delete=Fr,Kr.prototype.get=Ur,Kr.prototype.has=Br,Kr.prototype.set=zr;const $r=Kr;const Vr=function(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!Er||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $r(r)}return n.set(e,t),this.size=n.size,this};function Hr(e){var t=this.__data__=new rr(e);this.size=t.size}Hr.prototype.clear=or,Hr.prototype.delete=ir,Hr.prototype.get=ar,Hr.prototype.has=sr,Hr.prototype.set=Vr;const Wr=Hr;const Yr=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const qr=function(e){return this.__data__.has(e)};function Gr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $r;++t<n;)this.add(e[t])}Gr.prototype.add=Gr.prototype.push=Yr,Gr.prototype.has=qr;const Jr=Gr;const Xr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};const Zr=function(e,t){return e.has(t)};const Qr=function(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,f=2&n?new Jr:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var g=a?r(m,h,d,t,e,i):r(h,m,d,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(f){if(!Xr(t,(function(e,t){if(!Zr(f,t)&&(h===e||o(h,e,n,r,i)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!o(h,m,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p};const eo=wn.Uint8Array;const to=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};const no=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var ro=Cn?Cn.prototype:void 0,oo=ro?ro.valueOf:void 0;const io=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new eo(e),new eo(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Gn(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=to;case"[object Set]":var l=1&r;if(s||(s=no),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=Qr(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(oo)return oo.call(e)==oo.call(t)}return!1};const ao=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};const so=Array.isArray;const lo=function(e,t,n){var r=t(e);return so(e)?r:ao(r,n(e))};const co=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i};const uo=function(){return[]};var po=Object.prototype.propertyIsEnumerable,fo=Object.getOwnPropertySymbols;const ho=fo?function(e){return null==e?[]:(e=Object(e),co(fo(e),(function(t){return po.call(e,t)})))}:uo;const mo=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};const go=function(e){return Ln(e)&&"[object Arguments]"==Rn(e)};var vo=Object.prototype,bo=vo.hasOwnProperty,yo=vo.propertyIsEnumerable;const xo=go(function(){return arguments}())?go:function(e){return Ln(e)&&bo.call(e,"callee")&&!yo.call(e,"callee")};const wo=function(){return!1};var So="object"==typeof exports&&exports&&!exports.nodeType&&exports,_o=So&&"object"==typeof module&&module&&!module.nodeType&&module,Eo=_o&&_o.exports===So?wn.Buffer:void 0;const ko=(Eo?Eo.isBuffer:void 0)||wo;var To=/^(?:0|[1-9]\d*)$/;const Co=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&To.test(e))&&e>-1&&e%1==0&&e<t};const Oo=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Io={};Io["[object Float32Array]"]=Io["[object Float64Array]"]=Io["[object Int8Array]"]=Io["[object Int16Array]"]=Io["[object Int32Array]"]=Io["[object Uint8Array]"]=Io["[object Uint8ClampedArray]"]=Io["[object Uint16Array]"]=Io["[object Uint32Array]"]=!0,Io["[object Arguments]"]=Io["[object Array]"]=Io["[object ArrayBuffer]"]=Io["[object Boolean]"]=Io["[object DataView]"]=Io["[object Date]"]=Io["[object Error]"]=Io["[object Function]"]=Io["[object Map]"]=Io["[object Number]"]=Io["[object Object]"]=Io["[object RegExp]"]=Io["[object Set]"]=Io["[object String]"]=Io["[object WeakMap]"]=!1;const Mo=function(e){return Ln(e)&&Oo(e.length)&&!!Io[Rn(e)]};const Do=function(e){return function(t){return e(t)}};var jo="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ao=jo&&"object"==typeof module&&module&&!module.nodeType&&module,No=Ao&&Ao.exports===jo&&yn.process,Po=function(){try{var e=Ao&&Ao.require&&Ao.require("util").types;return e||No&&No.binding&&No.binding("util")}catch(e){}}();var Ro=Po&&Po.isTypedArray;const Lo=Ro?Do(Ro):Mo;var Fo=Object.prototype.hasOwnProperty;const Uo=function(e,t){var n=so(e),r=!n&&xo(e),o=!n&&!r&&ko(e),i=!n&&!r&&!o&&Lo(e),a=n||r||o||i,s=a?mo(e.length,String):[],l=s.length;for(var c in e)!t&&!Fo.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Co(c,l))||s.push(c);return s};var Bo=Object.prototype;const zo=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Bo)};const Ko=function(e,t){return function(n){return e(t(n))}};const $o=Ko(Object.keys,Object);var Vo=Object.prototype.hasOwnProperty;const Ho=function(e){if(!zo(e))return $o(e);var t=[];for(var n in Object(e))Vo.call(e,n)&&"constructor"!=n&&t.push(n);return t};const Wo=function(e){return null!=e&&Oo(e.length)&&!lr(e)};const Yo=function(e){return Wo(e)?Uo(e):Ho(e)};const qo=function(e){return lo(e,Yo,ho)};var Go=Object.prototype.hasOwnProperty;const Jo=function(e,t,n,r,o,i){var a=1&n,s=qo(e),l=s.length;if(l!=qo(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Go.call(t,u)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,i):r(m,g,u,e,t,i);if(!(void 0===v?m===g||o(m,g,n,r,i):v)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f};const Xo=_r(wn,"DataView");const Zo=_r(wn,"Promise");const Qo=_r(wn,"Set");const ei=_r(wn,"WeakMap");var ti="[object Map]",ni="[object Promise]",ri="[object Set]",oi="[object WeakMap]",ii="[object DataView]",ai=hr(Xo),si=hr(Er),li=hr(Zo),ci=hr(Qo),ui=hr(ei),di=Rn;(Xo&&di(new Xo(new ArrayBuffer(1)))!=ii||Er&&di(new Er)!=ti||Zo&&di(Zo.resolve())!=ni||Qo&&di(new Qo)!=ri||ei&&di(new ei)!=oi)&&(di=function(e){var t=Rn(e),n="[object Object]"==t?e.constructor:void 0,r=n?hr(n):"";if(r)switch(r){case ai:return ii;case si:return ti;case li:return ni;case ci:return ri;case ui:return oi}return t});const pi=di;var fi="[object Arguments]",hi="[object Array]",mi="[object Object]",gi=Object.prototype.hasOwnProperty;const vi=function(e,t,n,r,o,i){var a=so(e),s=so(t),l=a?hi:pi(e),c=s?hi:pi(t),u=(l=l==fi?mi:l)==mi,d=(c=c==fi?mi:c)==mi,p=l==c;if(p&&ko(e)){if(!ko(t))return!1;a=!0,u=!1}if(p&&!u)return i||(i=new Wr),a||Lo(e)?Qr(e,t,n,r,o,i):io(e,t,l,n,r,o,i);if(!(1&n)){var f=u&&gi.call(e,"__wrapped__"),h=d&&gi.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,g=h?t.value():t;return i||(i=new Wr),o(m,g,n,r,i)}}return!!p&&(i||(i=new Wr),Jo(e,t,n,r,o,i))};const bi=function e(t,n,r,o,i){return t===n||(null==t||null==n||!Ln(t)&&!Ln(n)?t!=t&&n!=n:vi(t,n,r,o,e,i))};const yi=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new Wr;if(r)var p=r(c,u,l,e,t,d);if(!(void 0===p?bi(u,c,3,r,d):p))return!1}}return!0};const xi=function(e){return e==e&&!bn(e)};const wi=function(e){for(var t=Yo(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,xi(o)]}return t};const Si=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};const _i=function(e){var t=wi(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||yi(n,e,t)}};var Ei=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ki=/^\w*$/;const Ti=function(e,t){if(so(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Fn(e))||(ki.test(e)||!Ei.test(e)||null!=t&&e in Object(t))};function Ci(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ci.Cache||$r),n}Ci.Cache=$r;const Oi=Ci;var Ii=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mi=/\\(\\)?/g;const Di=function(e){var t=Oi(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ii,(function(e,n,r,o){t.push(r?o.replace(Mi,"$1"):n||e)})),t}));var ji=Cn?Cn.prototype:void 0,Ai=ji?ji.toString:void 0;const Ni=function e(t){if("string"==typeof t)return t;if(so(t))return Yn(t,e)+"";if(Fn(t))return Ai?Ai.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};const Pi=function(e){return null==e?"":Ni(e)};const Ri=function(e,t){return so(e)?e:Ti(e,t)?[e]:Di(Pi(e))};const Li=function(e){if("string"==typeof e||Fn(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};const Fi=function(e,t){for(var n=0,r=(t=Ri(t,e)).length;null!=e&&n<r;)e=e[Li(t[n++])];return n&&n==r?e:void 0};const Ui=function(e,t,n){var r=null==e?void 0:Fi(e,t);return void 0===r?n:r};const Bi=function(e,t){return null!=e&&t in Object(e)};const zi=function(e,t,n){for(var r=-1,o=(t=Ri(t,e)).length,i=!1;++r<o;){var a=Li(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Oo(o)&&Co(a,o)&&(so(e)||xo(e))};const Ki=function(e,t){return null!=e&&zi(e,t,Bi)};const $i=function(e,t){return Ti(e)&&xi(t)?Si(Li(e),t):function(n){var r=Ui(n,e);return void 0===r&&r===t?Ki(n,e):bi(t,r,3)}};const Vi=function(e){return e};const Hi=function(e){return function(t){return null==t?void 0:t[e]}};const Wi=function(e){return function(t){return Fi(t,e)}};const Yi=function(e){return Ti(e)?Hi(Li(e)):Wi(e)};const qi=function(e){return"function"==typeof e?e:null==e?Vi:"object"==typeof e?so(e)?$i(e[0],e[1]):_i(e):Yi(e)};const Gi=function(){try{var e=_r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const Ji=function(e,t,n){"__proto__"==t&&Gi?Gi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Xi=Object.prototype.hasOwnProperty;const Zi=function(e,t,n){var r=e[t];Xi.call(e,t)&&Gn(r,n)&&(void 0!==n||t in e)||Ji(e,t,n)};const Qi=function(e,t,n,r){if(!bn(e))return e;for(var o=-1,i=(t=Ri(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var l=Li(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var u=s[l];void 0===(c=r?r(u,l,s):void 0)&&(c=bn(u)?u:Co(t[o+1])?[]:{})}Zi(s,l,c),s=s[l]}return e};const ea=function(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Fi(e,a);n(s,a)&&Qi(i,Ri(a,e),s)}return i};const ta=Ko(Object.getPrototypeOf,Object);const na=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)ao(t,ho(e)),e=ta(e);return t}:uo;const ra=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var oa=Object.prototype.hasOwnProperty;const ia=function(e){if(!bn(e))return ra(e);var t=zo(e),n=[];for(var r in e)("constructor"!=r||!t&&oa.call(e,r))&&n.push(r);return n};const aa=function(e){return Wo(e)?Uo(e,!0):ia(e)};const sa=function(e){return lo(e,aa,na)};const la=function(e,t){if(null==e)return{};var n=Yn(sa(e),(function(e){return[e]}));return t=qi(t),ea(e,n,(function(e,n){return t(e,n[0])}))},ca=require("react-dom");var ua=o(942);const da=require("dayjs");var pa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ha(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var ma={exports:{}};ma.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t){e.exports=function(){if(typeof document>"u"||typeof window>"u")return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var e=document.documentElement,t=null,n="initial",r=n,o=Date.now(),i=!1,a=["button","input","select","textarea"],s=[],l=[16,17,18,91,93],c=[],u={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},d=!1,p={x:null,y:null},f={2:"touch",3:"touch",4:"mouse"},h=!1;try{var m=Object.defineProperty({},"passive",{get:function(){h=!0}});window.addEventListener("test",null,m)}catch{}var g=function(){u[C()]="mouse",v()},v=function(){var e=!h||{passive:!0,capture:!0};document.addEventListener("DOMContentLoaded",b,!0),window.PointerEvent?(window.addEventListener("pointerdown",y,!0),window.addEventListener("pointermove",w,!0)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",y,!0),window.addEventListener("MSPointerMove",w,!0)):(window.addEventListener("mousedown",y,!0),window.addEventListener("mousemove",w,!0),"ontouchstart"in window&&(window.addEventListener("touchstart",y,e),window.addEventListener("touchend",y,!0))),window.addEventListener(C(),w,e),window.addEventListener("keydown",y,!0),window.addEventListener("keyup",y,!0),window.addEventListener("focusin",S,!0),window.addEventListener("focusout",_,!0)},b=function(){if(i=!("false"===e.getAttribute("data-whatpersist")||"false"===document.body.getAttribute("data-whatpersist")))try{window.sessionStorage.getItem("what-input")&&(n=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(r=window.sessionStorage.getItem("what-intent"))}catch{}x("input"),x("intent")},y=function(e){var t=e.which,o=u[e.type];"pointer"===o&&(o=k(e));var i=!c.length&&-1===l.indexOf(t),s=c.length&&-1!==c.indexOf(t),d="keyboard"===o&&t&&(i||s)||"mouse"===o||"touch"===o;if(T(o)&&(d=!1),d&&n!==o&&(E("input",n=o),x("input")),d&&r!==o){var p=document.activeElement;p&&p.nodeName&&(-1===a.indexOf(p.nodeName.toLowerCase())||"button"===p.nodeName.toLowerCase()&&!D(p,"form"))&&(E("intent",r=o),x("intent"))}},x=function(t){e.setAttribute("data-what"+t,"input"===t?n:r),O(t)},w=function(e){var t=u[e.type];"pointer"===t&&(t=k(e)),M(e),(!d&&!T(t)||d&&"wheel"===e.type||"mousewheel"===e.type||"DOMMouseScroll"===e.type)&&r!==t&&(E("intent",r=t),x("intent"))},S=function(n){n.target.nodeName?(t=n.target.nodeName.toLowerCase(),e.setAttribute("data-whatelement",t),n.target.classList&&n.target.classList.length&&e.setAttribute("data-whatclasses",n.target.classList.toString().replace(" ",","))):_()},_=function(){t=null,e.removeAttribute("data-whatelement"),e.removeAttribute("data-whatclasses")},E=function(e,t){if(i)try{window.sessionStorage.setItem("what-"+e,t)}catch{}},k=function(e){return"number"==typeof e.pointerType?f[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},T=function(e){var t=Date.now(),r="mouse"===e&&"touch"===n&&t-o<200;return o=t,r},C=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},O=function(e){for(var t=0,o=s.length;t<o;t++)s[t].type===e&&s[t].fn.call(void 0,"input"===e?n:r)},I=function(e){for(var t=0,n=s.length;t<n;t++)if(s[t].fn===e)return t},M=function(e){p.x!==e.screenX||p.y!==e.screenY?(d=!1,p.x=e.screenX,p.y=e.screenY):d=!0},D=function(e,t){var n=window.Element.prototype;if(n.matches||(n.matches=n.msMatchesSelector||n.webkitMatchesSelector),n.closest)return e.closest(t);do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null};return"addEventListener"in window&&Array.prototype.indexOf&&g(),{ask:function(e){return"intent"===e?r:n},element:function(){return t},ignoreKeys:function(e){l=e},specificKeys:function(e){c=e},registerOnChange:function(e,t){s.push({fn:e,type:t||"input"})},unRegisterOnChange:function(e){var t=I(e);(t||0===t)&&s.splice(t,1)},clearStorage:function(){window.sessionStorage.clear()}}}()}]);const ga=fa(ma.exports);function va(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var ba="object"==typeof global&&global&&global.Object===Object&&global,ya="object"==typeof self&&self&&self.Object===Object&&self,xa=ba||ya||Function("return this")(),wa=function(){return xa.Date.now()},Sa=/\s/;var _a=/^\s+/;function Ea(e){return e&&e.slice(0,function(e){for(var t=e.length;t--&&Sa.test(e.charAt(t)););return t}(e)+1).replace(_a,"")}var ka=xa.Symbol,Ta=Object.prototype,Ca=Ta.hasOwnProperty,Oa=Ta.toString,Ia=ka?ka.toStringTag:void 0;var Ma=Object.prototype.toString;var Da=ka?ka.toStringTag:void 0;function ja(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Da&&Da in Object(e)?function(e){var t=Ca.call(e,Ia),n=e[Ia];try{e[Ia]=void 0;var r=!0}catch{}var o=Oa.call(e);return r&&(t?e[Ia]=n:delete e[Ia]),o}(e):function(e){return Ma.call(e)}(e)}function Aa(e){return null!=e&&"object"==typeof e}function Na(e){return"symbol"==typeof e||Aa(e)&&"[object Symbol]"==ja(e)}var Pa=/^[-+]0x[0-9a-f]+$/i,Ra=/^0b[01]+$/i,La=/^0o[0-7]+$/i,Fa=parseInt;function Ua(e){if("number"==typeof e)return e;if(Na(e))return NaN;if(va(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=va(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ea(e);var n=Ra.test(e);return n||La.test(e)?Fa(e.slice(2),n?2:8):Pa.test(e)?NaN:+e}var Ba=Math.max,za=Math.min;function Ka(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=wa();if(h(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?za(n,i-(e-c)):n}(e))}function g(e){return s=void 0,p&&r?f(e):(r=o=void 0,a)}function v(){var e=wa(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=Ua(t)||0,va(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Ba(Ua(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},v.flush=function(){return void 0===s?a:g(wa())},v}const $a=["xs","sm","md","lg","xl","xxl"],Va=()=>{const[e,t]=(0,B.useState)(Ha());return(0,B.useEffect)((()=>{const e=Ka((()=>{t(Ha())}),20);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),e},Ha=()=>{let e=null;return typeof window<"u"&&(e=window.matchMedia("(min-width: 1400px)").matches?"xxl":window.matchMedia("(min-width: 1200px)").matches?"xl":window.matchMedia("(min-width: 992px)").matches?"lg":window.matchMedia("(min-width: 768px)").matches?"md":window.matchMedia("(min-width: 576px)").matches?"sm":"xs"),e},Wa=()=>{const e=Va(),t=B.useMemo((()=>e?$a.slice(0,$a.indexOf(e)+1):[]),[e]);return{getCurrentBreakpointProps:B.useCallback(((e,n={})=>{const{sm:r,md:o,lg:i,xl:a,xxl:s,...l}=e,c=[...t.map((t=>la("xs"===t?l:e[t],(e=>void 0!==e))))].filter(Boolean);return Object.assign(n,...c)}),[t])}},Ya=["xs","sm"],qa=["md"],Ga=["lg","xl","xxl"],Ja=e=>{const t=Va(),n=null==e?void 0:e.reduce(((e,t)=>{switch(t){case"desktop":return[...e,...Ga];case"tablet":return[...e,...qa];case"mobile":return[...e,...Ya];default:return[...e,t]}}),[]);return!!t&&n.includes(t)},Xa={"primary-main":"primary-main-ea0565ff","primary-active":"primary-active-d24cbc9e","primary-active-subtle":"primary-active-subtle-c2ab8b5f","primary-highlight":"primary-highlight-212d11b7","primary-highlight-subtle":"primary-highlight-subtle-715c2641","accent-main":"accent-main-f55c9be5","accent-highlight":"accent-highlight-6810179d","bg-default":"bg-default-099a281c","bg-muted":"bg-muted-13732b1c","bg-subtle":"bg-subtle-e7130c61","bg-disabled":"bg-disabled-eed0584e","bg-inverted":"bg-inverted-2bf8047e","bg-inverted-contrast":"bg-inverted-contrast-304e2c10",black:"black-d9cad7d6",white:"white-5992ce1a","positive-main":"positive-main-dfc533f2","positive-active":"positive-active-f4288715","positive-highlight":"positive-highlight-6594b5a8","important-main":"important-main-67d03aad","important-active":"important-active-5ebf547d","important-highlight":"important-highlight-aa19e975","info-main":"info-main-80c1cd50","info-active":"info-active-5f165e38","info-highlight":"info-highlight-578939bc","warning-main":"warning-main-2fae5383","warning-highlight":"warning-highlight-f87e48b3",transparent:"transparent-74d01799"},Za=e=>e?Xa[e]:"",Qa=e=>{const{getCurrentBreakpointProps:t}=Wa(),{children:n,className:r,tabIndex:o,element:i="p",modifiers:a,color:s,...l}=t(e,{tabIndex:e.id?-1:void 0}),c="string"==typeof a?[a]:a,u=ua(r,null==c?void 0:c.map((e=>`text-${e}`)),{[`text-${s}`]:s});return(0,cn.jsx)(i,{className:u,...l,tabIndex:o,children:n})},es=e=>{const{children:t,element:n="h1",...r}=e;return(0,cn.jsx)(Qa,{element:n,...r,children:t})};function ts(){return ts=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ts.apply(null,arguments)}const ns=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ts}},Symbol.toStringTag,{value:"Module"}));var rs={exports:{}};var os=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,as=Object.prototype.propertyIsEnumerable;var ss,ls,cs,us,ds=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch{return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))is.call(n,a)&&(o[a]=n[a]);if(os){r=os(n);for(var s=0;s<r.length;s++)as.call(n,r[s])&&(o[r[s]]=n[r[s]])}}return o};function ps(){if(ls)return ss;ls=1;return ss="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}rs.exports=function(){if(us)return cs;us=1;var e=ps();function t(){}function n(){}return n.resetWarningCache=t,cs=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},cs}()();const fs=fa(rs.exports);function hs(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const ms=Object.freeze(Object.defineProperty({__proto__:null,default:hs},Symbol.toStringTag,{value:"Module"})),gs="$$material";function vs(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var bs=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),ys="-ms-",xs="-moz-",ws="-webkit-",Ss="comm",_s="rule",Es="decl",ks="@keyframes",Ts=Math.abs,Cs=String.fromCharCode,Os=Object.assign;function Is(e){return e.trim()}function Ms(e,t,n){return e.replace(t,n)}function Ds(e,t){return e.indexOf(t)}function js(e,t){return 0|e.charCodeAt(t)}function As(e,t,n){return e.slice(t,n)}function Ns(e){return e.length}function Ps(e){return e.length}function Rs(e,t){return t.push(e),e}var Ls=1,Fs=1,Us=0,Bs=0,zs=0,Ks="";function $s(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ls,column:Fs,length:a,return:""}}function Vs(e,t){return Os($s("",null,null,"",null,null,0),e,{length:-e.length},t)}function Hs(){return zs=Bs<Us?js(Ks,Bs++):0,Fs++,10===zs&&(Fs=1,Ls++),zs}function Ws(){return js(Ks,Bs)}function Ys(){return Bs}function qs(e,t){return As(Ks,e,t)}function Gs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Js(e){return Ls=Fs=1,Us=Ns(Ks=e),Bs=0,[]}function Xs(e){return Ks="",e}function Zs(e){return Is(qs(Bs-1,tl(91===e?e+2:40===e?e+1:e)))}function Qs(e){for(;(zs=Ws())&&zs<33;)Hs();return Gs(e)>2||Gs(zs)>3?"":" "}function el(e,t){for(;--t&&Hs()&&!(zs<48||zs>102||zs>57&&zs<65||zs>70&&zs<97););return qs(e,Ys()+(t<6&&32==Ws()&&32==Hs()))}function tl(e){for(;Hs();)switch(zs){case e:return Bs;case 34:case 39:34!==e&&39!==e&&tl(zs);break;case 40:41===e&&tl(e);break;case 92:Hs()}return Bs}function nl(e,t){for(;Hs()&&e+zs!==57&&(e+zs!==84||47!==Ws()););return"/*"+qs(t,Bs-1)+"*"+Cs(47===e?e:Hs())}function rl(e){for(;!Gs(Ws());)Hs();return qs(e,Bs)}function ol(e){return Xs(il("",null,null,null,[""],e=Js(e),0,[0],e))}function il(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,b=0,y="",x=o,w=i,S=r,_=y;g;)switch(h=b,b=Hs()){case 40:if(108!=h&&58==js(_,d-1)){-1!=Ds(_+=Ms(Zs(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:_+=Zs(b);break;case 9:case 10:case 13:case 32:_+=Qs(h);break;case 92:_+=el(Ys()-1,7);continue;case 47:switch(Ws()){case 42:case 47:Rs(sl(nl(Hs(),Ys()),t,n),l);break;default:_+="/"}break;case 123*m:s[c++]=Ns(_)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==v&&(_=Ms(_,/\f/g,"")),f>0&&Ns(_)-d&&Rs(f>32?ll(_+";",r,n,d-1):ll(Ms(_," ","")+";",r,n,d-2),l);break;case 59:_+=";";default:if(Rs(S=al(_,t,n,c,u,o,s,y,x=[],w=[],d),i),123===b)if(0===u)il(_,t,S,S,x,i,d,s,w);else switch(99===p&&110===js(_,3)?100:p){case 100:case 108:case 109:case 115:il(e,S,S,r&&Rs(al(e,S,S,0,0,o,s,y,o,x=[],d),w),o,w,d,s,r?x:w);break;default:il(_,S,S,S,[""],w,0,s,w)}}c=u=f=0,m=v=1,y=_="",d=a;break;case 58:d=1+Ns(_),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==(zs=Bs>0?js(Ks,--Bs):0,Fs--,10===zs&&(Fs=1,Ls--),zs))continue;switch(_+=Cs(b),b*m){case 38:v=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(Ns(_)-1)*v,v=1;break;case 64:45===Ws()&&(_+=Zs(Hs())),p=Ws(),u=d=Ns(y=_+=rl(Ys())),b++;break;case 45:45===h&&2==Ns(_)&&(m=0)}}return i}function al(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=Ps(p),h=0,m=0,g=0;h<r;++h)for(var v=0,b=As(e,d+1,d=Ts(m=a[h])),y=e;v<f;++v)(y=Is(m>0?p[v]+" "+b:Ms(b,/&\f/g,p[v])))&&(l[g++]=y);return $s(e,t,n,0===o?_s:s,l,c,u)}function sl(e,t,n){return $s(e,t,n,Ss,Cs(zs),As(e,2,-2),0)}function ll(e,t,n,r){return $s(e,t,n,Es,As(e,0,r),As(e,r+1,-1),r)}function cl(e,t){for(var n="",r=Ps(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function ul(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Es:return e.return=e.return||e.value;case Ss:return"";case ks:return e.return=e.value+"{"+cl(e.children,r)+"}";case _s:e.value=e.props.join(",")}return Ns(n=cl(e.children,r))?e.return=e.value+"{"+n+"}":""}function dl(e){return function(t){t.root||(t=t.return)&&e(t)}}function pl(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var fl=function(e,t,n){for(var r=0,o=0;r=o,o=Ws(),38===r&&12===o&&(t[n]=1),!Gs(o);)Hs();return qs(e,Bs)},hl=function(e,t){return Xs(function(e,t){var n=-1,r=44;do{switch(Gs(r)){case 0:38===r&&12===Ws()&&(t[n]=1),e[n]+=fl(Bs-1,t,n);break;case 2:e[n]+=Zs(r);break;case 4:if(44===r){e[++n]=58===Ws()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Cs(r)}}while(r=Hs());return e}(Js(e),t))},ml=new WeakMap,gl=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ml.get(n))&&!r){ml.set(e,!0);for(var o=[],i=hl(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},vl=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function bl(e,t){switch(function(e,t){return 45^js(e,0)?(((t<<2^js(e,0))<<2^js(e,1))<<2^js(e,2))<<2^js(e,3):0}(e,t)){case 5103:return ws+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ws+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ws+e+xs+e+ys+e+e;case 6828:case 4268:return ws+e+ys+e+e;case 6165:return ws+e+ys+"flex-"+e+e;case 5187:return ws+e+Ms(e,/(\w+).+(:[^]+)/,ws+"box-$1$2"+ys+"flex-$1$2")+e;case 5443:return ws+e+ys+"flex-item-"+Ms(e,/flex-|-self/,"")+e;case 4675:return ws+e+ys+"flex-line-pack"+Ms(e,/align-content|flex-|-self/,"")+e;case 5548:return ws+e+ys+Ms(e,"shrink","negative")+e;case 5292:return ws+e+ys+Ms(e,"basis","preferred-size")+e;case 6060:return ws+"box-"+Ms(e,"-grow","")+ws+e+ys+Ms(e,"grow","positive")+e;case 4554:return ws+Ms(e,/([^-])(transform)/g,"$1"+ws+"$2")+e;case 6187:return Ms(Ms(Ms(e,/(zoom-|grab)/,ws+"$1"),/(image-set)/,ws+"$1"),e,"")+e;case 5495:case 3959:return Ms(e,/(image-set\([^]*)/,ws+"$1$`$1");case 4968:return Ms(Ms(e,/(.+:)(flex-)?(.*)/,ws+"box-pack:$3"+ys+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ws+e+e;case 4095:case 3583:case 4068:case 2532:return Ms(e,/(.+)-inline(.+)/,ws+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ns(e)-1-t>6)switch(js(e,t+1)){case 109:if(45!==js(e,t+4))break;case 102:return Ms(e,/(.+:)(.+)-([^]+)/,"$1"+ws+"$2-$3$1"+xs+(108==js(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ds(e,"stretch")?bl(Ms(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==js(e,t+1))break;case 6444:switch(js(e,Ns(e)-3-(~Ds(e,"!important")&&10))){case 107:return Ms(e,":",":"+ws)+e;case 101:return Ms(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ws+(45===js(e,14)?"inline-":"")+"box$3$1"+ws+"$2$3$1"+ys+"$2box$3")+e}break;case 5936:switch(js(e,t+11)){case 114:return ws+e+ys+Ms(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ws+e+ys+Ms(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ws+e+ys+Ms(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ws+e+ys+e+e}return e}var yl,xl=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Es:e.return=bl(e.value,e.length);break;case ks:return cl([Vs(e,{value:Ms(e.value,"@","@"+ws)})],r);case _s:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return cl([Vs(e,{props:[Ms(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return cl([Vs(e,{props:[Ms(t,/:(plac\w+)/,":"+ws+"input-$1")]}),Vs(e,{props:[Ms(t,/:(plac\w+)/,":-moz-$1")]}),Vs(e,{props:[Ms(t,/:(plac\w+)/,ys+"input-$1")]})],r)}return""}))}}],wl=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o=e.stylisPlugins||xl,i={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;a.push(e)}));var s,l,c=[gl,vl],u=[ul,dl((function(e){l.insert(e)}))],d=function(e){var t=Ps(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}(c.concat(o,u));s=function(e,t,n,r){l=n,function(e){cl(ol(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new bs({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(a),p},Sl={exports:{}},_l={};Sl.exports=function(){if(yl)return _l;yl=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case h:case f:case a:return e;default:return p}}case n:return p}}}function x(e){return y(e)===c}return _l.AsyncMode=l,_l.ConcurrentMode=c,_l.ContextConsumer=s,_l.ContextProvider=a,_l.Element=t,_l.ForwardRef=u,_l.Fragment=r,_l.Lazy=h,_l.Memo=f,_l.Portal=n,_l.Profiler=i,_l.StrictMode=o,_l.Suspense=d,_l.isAsyncMode=function(e){return x(e)||y(e)===l},_l.isConcurrentMode=x,_l.isContextConsumer=function(e){return y(e)===s},_l.isContextProvider=function(e){return y(e)===a},_l.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},_l.isForwardRef=function(e){return y(e)===u},_l.isFragment=function(e){return y(e)===r},_l.isLazy=function(e){return y(e)===h},_l.isMemo=function(e){return y(e)===f},_l.isPortal=function(e){return y(e)===n},_l.isProfiler=function(e){return y(e)===i},_l.isStrictMode=function(e){return y(e)===o},_l.isSuspense=function(e){return y(e)===d},_l.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},_l.typeOf=y,_l}();var El=Sl.exports,kl={};kl[El.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},kl[El.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Tl(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var Cl=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ol=function(e,t,n){Cl(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var Il={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ml=/[A-Z]|^ms/g,Dl=/_EMO_([^_]+?)_([^]*?)_EMO_/g,jl=function(e){return 45===e.charCodeAt(1)},Al=function(e){return null!=e&&"boolean"!=typeof e},Nl=pl((function(e){return jl(e)?e:e.replace(Ml,"-$&").toLowerCase()})),Pl=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Dl,(function(e,t,n){return Ll={name:t,styles:n,next:Ll},t}))}return 1===Il[e]||jl(e)||"number"!=typeof t||0===t?t:t+"px"};function Rl(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Ll={name:o.name,styles:o.styles,next:Ll},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Ll={name:a.name,styles:a.styles,next:Ll},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Rl(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":Al(s)&&(r+=Nl(i)+":"+Pl(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=Rl(e,t,a);switch(i){case"animation":case"animationName":r+=Nl(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var c=0;c<a.length;c++)Al(a[c])&&(r+=Nl(i)+":"+Pl(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=Ll,l=n(e);return Ll=s,Rl(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var Ll,Fl=/label:\s*([^\s;{]+)\s*(;|$)/g;function Ul(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Ll=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Rl(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)if(o+=Rl(n,t,e[a]),r){o+=i[a]}Fl.lastIndex=0;for(var s,l="";null!==(s=Fl.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Ll}}var Bl=!!B.useInsertionEffect&&B.useInsertionEffect,zl=Bl||function(e){return e()},Kl=Bl||B.useLayoutEffect,$l=B.createContext(typeof HTMLElement<"u"?wl({key:"css"}):null),Vl=$l.Provider,Hl=function(e){return(0,B.forwardRef)((function(t,n){var r=(0,B.useContext)($l);return e(t,r,n)}))},Wl=B.createContext({}),Yl={}.hasOwnProperty,ql="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Gl=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Cl(t,n,r),zl((function(){return Ol(t,n,r)})),null},Jl=Hl((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[ql],i=[r],a="";"string"==typeof e.className?a=Tl(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=Ul(i,void 0,B.useContext(Wl));a+=t.key+"-"+s.name;var l={};for(var c in e)Yl.call(e,c)&&"css"!==c&&c!==ql&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),B.createElement(B.Fragment,null,B.createElement(Gl,{cache:t,serialized:s,isStringTag:"string"==typeof o}),B.createElement(o,l))})),Xl=Jl,Zl=function(e,t){var n=arguments;if(null==t||!Yl.call(t,"css"))return B.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Xl,o[1]=function(e,t){var n={};for(var r in t)Yl.call(t,r)&&(n[r]=t[r]);return n[ql]=e,n}(e,t);for(var i=2;i<r;i++)o[i]=n[i];return B.createElement.apply(null,o)};!function(e){var t;t||(t=e.JSX||(e.JSX={}))}(Zl||(Zl={}));var Ql=Hl((function(e,t){var n=Ul([e.styles],void 0,B.useContext(Wl)),r=B.useRef();return Kl((function(){var e=t.key+"-global",o=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),o.hydrate([a])),r.current=[o,i],function(){o.flush()}}),[t]),Kl((function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Ol(t,n.next,!0),o.tags.length){var i=o.tags[o.tags.length-1].nextElementSibling;o.before=i,o.flush()}t.insert("",n,o,!1)}}),[t,n.name]),null}));function ec(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ul(t)}function tc(){var e=ec.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var nc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,rc=pl((function(e){return nc.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),oc=rc,ic=function(e){return"theme"!==e},ac=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?oc:ic},sc=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},lc=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Cl(t,n,r),zl((function(){return Ol(t,n,r)})),null},cc=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=sc(t,n,i),l=s||ac(a),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var p=u[0];d.push(p[0]);for(var f=u.length,h=1;h<f;h++)d.push(u[h],p[h])}var m=Hl((function(e,t,n){var r=c&&e.as||a,i="",u=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=B.useContext(Wl)}"string"==typeof e.className?i=Tl(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var h=Ul(d.concat(u),t.registered,p);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var m=c&&void 0===s?ac(r):l,g={};for(var v in e)c&&"as"===v||m(v)&&(g[v]=e[v]);return g.className=i,n&&(g.ref=n),B.createElement(B.Fragment,null,B.createElement(lc,{cache:t,serialized:h,isStringTag:"string"==typeof r}),B.createElement(r,g))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+o}}),m.withComponent=function(t,r){return e(t,ts({},n,r,{shouldForwardProp:sc(m,r,!0)})).apply(void 0,d)},m}}.bind(null);let uc;["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){cc[e]=cc(e)})),"object"==typeof document&&(uc=wl({key:"css",prepend:!0}));const dc=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:function(e){const{styles:t,defaultTheme:n={}}=e;return(0,cn.jsx)(Ql,{styles:"function"==typeof t?e=>t(function(e){return null==e||0===Object.keys(e).length}(e)?n:e):t})},StyledEngineProvider:function(e){const{injectFirst:t,children:n}=e;return t&&uc?(0,cn.jsx)(Vl,{value:uc,children:n}):n},ThemeContext:Wl,css:ec,default:function(e,t){return cc(e,t)},internal_processStyles:(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},keyframes:tc},Symbol.toStringTag,{value:"Module"}));function pc(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function fc(e){if(B.isValidElement(e)||!pc(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=fc(e[n])})),t}function hc(e,t,n={clone:!0}){const r=n.clone?ts({},e):e;return pc(e)&&pc(t)&&Object.keys(t).forEach((o=>{B.isValidElement(t[o])?r[o]=t[o]:pc(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&pc(e[o])?r[o]=hc(e[o],t[o],n):n.clone?r[o]=pc(t[o])?fc(t[o]):t[o]:r[o]=t[o]})),r}const mc=Object.freeze(Object.defineProperty({__proto__:null,default:hc,isPlainObject:pc},Symbol.toStringTag,{value:"Module"})),gc=["values","unit","step"];function vc(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=vs(e,gc),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>ts({},e,{[t.key]:t.val})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return ts({keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},o)}const bc={borderRadius:4};function yc(e,t){return t?hc(e,t,{clone:!1}):e}const xc={xs:0,sm:600,md:900,lg:1200,xl:1536},wc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${xc[e]}px)`};function Sc(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||wc;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||wc;return Object.keys(t).reduce(((r,o)=>{if(-1!==Object.keys(e.values||xc).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r}),{})}return n(t)}function _c({values:e,breakpoints:t,base:n}){const r=n||function(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r<e.length&&(n[t]=!0)})):r.forEach((t=>{null!=e[t]&&(n[t]=!0)})),n}(e,t),o=Object.keys(r);if(0===o.length)return e;let i;return o.reduce(((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[i],i=r):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t)),{})}function Ec(e){if("string"!=typeof e)throw new Error(hs(7));return e.charAt(0).toUpperCase()+e.slice(1)}const kc=Object.freeze(Object.defineProperty({__proto__:null,default:Ec},Symbol.toStringTag,{value:"Module"}));function Tc(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Cc(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Tc(e,n)||r,t&&(o=t(o,r,e)),o}function Oc(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=Tc(e.theme,r)||{};return Sc(e,i,(e=>{let r=Cc(a,o,e);return e===r&&"string"==typeof e&&(r=Cc(a,o,`${t}${"default"===e?"":Ec(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}const Ic={m:"margin",p:"padding"},Mc={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Dc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},jc=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!Dc[e])return[e];e=Dc[e]}const[t,n]=e.split(""),r=Ic[t],o=Mc[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),Ac=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Nc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Pc(e,t,n,r){var o;const i=null!=(o=Tc(e,t,!1))?o:n;return"number"==typeof i?e=>"string"==typeof e?e:i*e:Array.isArray(i)?e=>"string"==typeof e?e:i[e]:"function"==typeof i?i:()=>{}}function Rc(e){return Pc(e,"spacing",8)}function Lc(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function Fc(e,t,n,r){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=Lc(t,n),e)),{})}(jc(n),r);return Sc(e,e[n],o)}function Uc(e,t){const n=Rc(e.theme);return Object.keys(e).map((r=>Fc(e,t,r,n))).reduce(yc,{})}function Bc(e){return Uc(e,Ac)}function zc(e){return Uc(e,Nc)}function Kc(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?yc(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function $c(e){return"number"!=typeof e?e:`${e}px solid`}function Vc(e,t){return Oc({prop:e,themeKey:"borders",transform:t})}Bc.propTypes={},Bc.filterProps=Ac,zc.propTypes={},zc.filterProps=Nc;const Hc=Vc("border",$c),Wc=Vc("borderTop",$c),Yc=Vc("borderRight",$c),qc=Vc("borderBottom",$c),Gc=Vc("borderLeft",$c),Jc=Vc("borderColor"),Xc=Vc("borderTopColor"),Zc=Vc("borderRightColor"),Qc=Vc("borderBottomColor"),eu=Vc("borderLeftColor"),tu=Vc("outline",$c),nu=Vc("outlineColor"),ru=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Pc(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Lc(t,e)});return Sc(e,e.borderRadius,n)}return null};ru.propTypes={},ru.filterProps=["borderRadius"],Kc(Hc,Wc,Yc,qc,Gc,Jc,Xc,Zc,Qc,eu,ru,tu,nu);const ou=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Pc(e.theme,"spacing",8),n=e=>({gap:Lc(t,e)});return Sc(e,e.gap,n)}return null};ou.propTypes={},ou.filterProps=["gap"];const iu=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Pc(e.theme,"spacing",8),n=e=>({columnGap:Lc(t,e)});return Sc(e,e.columnGap,n)}return null};iu.propTypes={},iu.filterProps=["columnGap"];const au=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Pc(e.theme,"spacing",8),n=e=>({rowGap:Lc(t,e)});return Sc(e,e.rowGap,n)}return null};au.propTypes={},au.filterProps=["rowGap"];function su(e,t){return"grey"===t?t:e}Kc(ou,iu,au,Oc({prop:"gridColumn"}),Oc({prop:"gridRow"}),Oc({prop:"gridAutoFlow"}),Oc({prop:"gridAutoColumns"}),Oc({prop:"gridAutoRows"}),Oc({prop:"gridTemplateColumns"}),Oc({prop:"gridTemplateRows"}),Oc({prop:"gridTemplateAreas"}),Oc({prop:"gridArea"}));function lu(e){return e<=1&&0!==e?100*e+"%":e}Kc(Oc({prop:"color",themeKey:"palette",transform:su}),Oc({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:su}),Oc({prop:"backgroundColor",themeKey:"palette",transform:su}));const cu=Oc({prop:"width",transform:lu}),uu=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||xc[t];return o?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:lu(t)}};return Sc(e,e.maxWidth,t)}return null};uu.filterProps=["maxWidth"];const du=Oc({prop:"minWidth",transform:lu}),pu=Oc({prop:"height",transform:lu}),fu=Oc({prop:"maxHeight",transform:lu}),hu=Oc({prop:"minHeight",transform:lu});Oc({prop:"size",cssProperty:"width",transform:lu}),Oc({prop:"size",cssProperty:"height",transform:lu});Kc(cu,uu,du,pu,fu,hu,Oc({prop:"boxSizing"}));const mu={border:{themeKey:"borders",transform:$c},borderTop:{themeKey:"borders",transform:$c},borderRight:{themeKey:"borders",transform:$c},borderBottom:{themeKey:"borders",transform:$c},borderLeft:{themeKey:"borders",transform:$c},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:$c},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ru},color:{themeKey:"palette",transform:su},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:su},backgroundColor:{themeKey:"palette",transform:su},p:{style:zc},pt:{style:zc},pr:{style:zc},pb:{style:zc},pl:{style:zc},px:{style:zc},py:{style:zc},padding:{style:zc},paddingTop:{style:zc},paddingRight:{style:zc},paddingBottom:{style:zc},paddingLeft:{style:zc},paddingX:{style:zc},paddingY:{style:zc},paddingInline:{style:zc},paddingInlineStart:{style:zc},paddingInlineEnd:{style:zc},paddingBlock:{style:zc},paddingBlockStart:{style:zc},paddingBlockEnd:{style:zc},m:{style:Bc},mt:{style:Bc},mr:{style:Bc},mb:{style:Bc},ml:{style:Bc},mx:{style:Bc},my:{style:Bc},margin:{style:Bc},marginTop:{style:Bc},marginRight:{style:Bc},marginBottom:{style:Bc},marginLeft:{style:Bc},marginX:{style:Bc},marginY:{style:Bc},marginInline:{style:Bc},marginInlineStart:{style:Bc},marginInlineEnd:{style:Bc},marginBlock:{style:Bc},marginBlockStart:{style:Bc},marginBlockEnd:{style:Bc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ou},rowGap:{style:au},columnGap:{style:iu},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:lu},maxWidth:{style:uu},minWidth:{transform:lu},height:{transform:lu},maxHeight:{transform:lu},minHeight:{transform:lu},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function gu(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=Tc(n,s)||{};return c?c(o):Sc(o,t,(t=>{let n=Cc(u,l,t);return t===n&&"string"==typeof t&&(n=Cc(u,l,`${e}${"default"===t?"":Ec(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=null!=(r=i.unstable_sxConfig)?r:mu;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const o=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),s=Object.keys(o);let l=o;return Object.keys(r).forEach((n=>{const o=function(e,t){return"function"==typeof e?e(t):e}(r[n],i);if(null!=o)if("object"==typeof o)if(a[n])l=yc(l,e(n,o,i,a));else{const e=Sc({theme:i},o,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,o)?l=yc(l,e):l[n]=t({sx:o,theme:i})}else l=yc(l,e(n,o,i,a))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(s,l)}return Array.isArray(o)?o.map(s):s(o)}}const vu=gu();function bu(e,t){const n=this;return n.vars&&"function"==typeof n.getColorSchemeSelector?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}vu.filterProps=["sx"];const yu=["breakpoints","palette","spacing","shape"];function xu(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=vs(e,yu),s=vc(n),l=function(e=8){if(e.mui)return e;const t=Rc({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(o);let c=hc({breakpoints:s,direction:"ltr",components:{},palette:ts({mode:"light"},r),spacing:l,shape:ts({},bc,i)},a);return c.applyStyles=bu,c=t.reduce(((e,t)=>hc(e,t)),c),c.unstable_sxConfig=ts({},mu,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return vu({sx:e,theme:this})},c}const wu=Object.freeze(Object.defineProperty({__proto__:null,default:xu,private_createBreakpoints:vc,unstable_applyStyles:bu},Symbol.toStringTag,{value:"Module"}));function Su(e=null){const t=B.useContext(Wl);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}const _u=xu();function Eu(e=_u){return Su(e)}const ku=["sx"];function Tu(e){const{sx:t}=e,n=vs(e,ku),{systemProps:r,otherProps:o}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:mu;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r})(n);let i;return i=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return pc(n)?ts({},r,n):r}:ts({},r,t),ts({},o,{sx:i})}const Cu=Object.freeze(Object.defineProperty({__proto__:null,default:vu,extendSxProp:Tu,unstable_createStyleFunctionSx:gu,unstable_defaultSxConfig:mu},Symbol.toStringTag,{value:"Module"})),Ou=e=>e,Iu=(()=>{let e=Ou;return{configure(t){e=t},generate:t=>e(t),reset(){e=Ou}}})();function Mu(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Mu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Du(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Mu(e))&&(r&&(r+=" "),r+=t);return r}const ju={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Au(e,t,n="Mui"){const r=ju[t];return r?`${n}-${r}`:`${Iu.generate(e)}-${t}`}function Nu(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=Au(e,t,n)})),r}var Pu,Ru={exports:{}},Lu={};Ru.exports=function(){if(Pu)return Lu;Pu=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var f=p.$$typeof;switch(f){case e:switch(p=p.type){case n:case o:case r:case l:case c:return p;default:switch(p=p&&p.$$typeof){case a:case s:case d:case u:case i:return p;default:return f}}case t:return f}}}return Lu.ContextConsumer=i,Lu.ContextProvider=a,Lu.Element=e,Lu.ForwardRef=s,Lu.Fragment=n,Lu.Lazy=d,Lu.Memo=u,Lu.Portal=t,Lu.Profiler=o,Lu.StrictMode=r,Lu.Suspense=l,Lu.SuspenseList=c,Lu.isContextConsumer=function(e){return h(e)===i},Lu.isContextProvider=function(e){return h(e)===a},Lu.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Lu.isForwardRef=function(e){return h(e)===s},Lu.isFragment=function(e){return h(e)===n},Lu.isLazy=function(e){return h(e)===d},Lu.isMemo=function(e){return h(e)===u},Lu.isPortal=function(e){return h(e)===t},Lu.isProfiler=function(e){return h(e)===o},Lu.isStrictMode=function(e){return h(e)===r},Lu.isSuspense=function(e){return h(e)===l},Lu.isSuspenseList=function(e){return h(e)===c},Lu.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===c||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===s||e.$$typeof===f||void 0!==e.getModuleId)},Lu.typeOf=h,Lu}();var Fu=Ru.exports;const Uu=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Bu(e){const t=`${e}`.match(Uu);return t&&t[1]||""}function zu(e,t=""){return e.displayName||e.name||Bu(e)||t}function Ku(e,t,n){const r=zu(t);return e.displayName||(""!==r?`${n}(${r})`:n)}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return zu(e,"Component");if("object"==typeof e)switch(e.$$typeof){case Fu.ForwardRef:return Ku(e,e.render,"ForwardRef");case Fu.Memo:return Ku(e,e.type,"memo");default:return}}},getFunctionName:Bu},Symbol.toStringTag,{value:"Module"}));function Vu(e,t){const n=ts({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=ts({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},i&&Object.keys(i)?o&&Object.keys(o)?(n[r]=ts({},i),Object.keys(o).forEach((e=>{n[r][e]=Vu(o[e],i[e])}))):n[r]=i:n[r]=o}else void 0===n[r]&&(n[r]=e[r])})),n}function Hu(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?Vu(t.components[n].defaultProps,r):r}const Wu=typeof window<"u"?B.useLayoutEffect:B.useEffect;B.useSyncExternalStore;function Yu(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const qu=Object.freeze(Object.defineProperty({__proto__:null,default:Yu},Symbol.toStringTag,{value:"Module"}));function Gu(e){if(e.type)return e;if("#"===e.charAt(0))return Gu(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(hs(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(hs(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}function Ju(e,t){return e=Gu(e),t=function(e,t=0,n=1){return Yu(e,t,n)}(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}(e)}(fs.element,()=>null).isRequired=(fs.element.isRequired,()=>null);fs.elementType;fs.oneOfType([fs.func,fs.object]);function Xu(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}function Zu(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}function Qu(e){return e&&e.ownerDocument||document}function ed(e){return Qu(e).defaultView||window}function td(e,t){"function"==typeof e?e(t):e&&(e.current=t)}let nd=0;const rd=B.useId;function od(e){if(void 0!==rd){const t=rd();return e??t}return function(e){const[t,n]=B.useState(e),r=e||t;return B.useEffect((()=>{null==t&&(nd+=1,n(`mui-${nd}`))}),[t]),r}(e)}function id(e){const t=B.useRef(e);return Wu((()=>{t.current=e})),B.useRef(((...e)=>(0,t.current)(...e))).current}function ad(...e){return B.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{td(e,t)}))}),e)}const sd={};const ld=[];class cd{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new cd}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function ud(){const e=function(e,t){const n=B.useRef(sd);return n.current===sd&&(n.current=e(t)),n}(cd.create).current;return function(e){B.useEffect(e,ld)}(e.disposeEffect),e}let dd=!0,pd=!1;const fd=new cd,hd={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function md(e){e.metaKey||e.altKey||e.ctrlKey||(dd=!0)}function gd(){dd=!1}function vd(){"hidden"===this.visibilityState&&pd&&(dd=!0)}function bd(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return dd||function(e){const{type:t,tagName:n}=e;return!!("INPUT"===n&&hd[t]&&!e.readOnly||"TEXTAREA"===n&&!e.readOnly||e.isContentEditable)}(t)}function yd(){const e=B.useCallback((e=>{null!=e&&function(e){e.addEventListener("keydown",md,!0),e.addEventListener("mousedown",gd,!0),e.addEventListener("pointerdown",gd,!0),e.addEventListener("touchstart",gd,!0),e.addEventListener("visibilitychange",vd,!0)}(e.ownerDocument)}),[]),t=B.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!bd(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(pd=!0,fd.start(100,(()=>{pd=!1})),t.current=!1,!0)},ref:e}}let xd;function wd(){if(xd)return xd;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),xd="reverse",e.scrollLeft>0?xd="default":(e.scrollLeft=1,0===e.scrollLeft&&(xd="negative")),document.body.removeChild(e),xd}function Sd(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(wd()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}Number.isInteger;function _d(){return null}_d.isRequired=_d;function Ed(e,t,n=void 0){const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}function kd(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}function Td(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}const Cd=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Od(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=e,a=vs(e,Cd),s=i?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(r,o),{props:l,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=Du(null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),t=ts({},null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),a=ts({},n,o,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=kd(ts({},o,r)),s=Td(r),l=Td(o),c=t(a),u=Du(null==c?void 0:c.className,null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),d=ts({},null==c?void 0:c.style,null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),p=ts({},c,n,l,s);return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}(ts({},a,{externalSlotProps:s}));return function(e,t,n){return void 0===e||function(e){return"string"==typeof e}(e)?t:ts({},t,{ownerState:ts({},t.ownerState,n)})}(n,ts({},l,{ref:ad(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref)}),o)}function Id(e){var t;return parseInt(B.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}const Md=B.createContext(),Dd=()=>B.useContext(Md)??!1,jd=B.createContext(void 0);function Ad({props:e,name:t}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Vu(o.defaultProps,r):o.styleOverrides||o.variants?r:Vu(o,r)}({props:e,name:t,theme:{components:B.useContext(jd)}})}function Nd(e){return(Nd="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})(e)}function Pd(e){var t=function(e,t){if("object"!=Nd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Nd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Nd(t)?t:t+""}function Rd(e,t){return ts({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Ld={},Fd={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(Fd);var Ud=Fd.exports;const Bd=ha(ms),zd=ha(qu);var Kd=Ud;Object.defineProperty(Ld,"__esModule",{value:!0});var $d=Ld.alpha=np;Ld.blend=function(e,t,n,r=1){const o=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),i=Xd(e),a=Xd(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return Qd({type:"rgb",values:s})},Ld.colorChannel=void 0;var Vd=Ld.darken=rp;Ld.decomposeColor=Xd,Ld.emphasize=ip;var Hd=Ld.getContrastRatio=function(e,t){const n=tp(e),r=tp(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)};Ld.getLuminance=tp,Ld.hexToRgb=Jd,Ld.hslToRgb=ep;var Wd=Ld.lighten=op;Ld.private_safeAlpha=function(e,t,n){try{return np(e,t)}catch{return e}},Ld.private_safeColorChannel=void 0,Ld.private_safeDarken=function(e,t,n){try{return rp(e,t)}catch{return e}},Ld.private_safeEmphasize=function(e,t,n){try{return ip(e,t)}catch{return e}},Ld.private_safeLighten=function(e,t,n){try{return op(e,t)}catch{return e}},Ld.recomposeColor=Qd,Ld.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=Xd(e);return`#${t.map(((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e))).join("")}`};var Yd=Kd(Bd),qd=Kd(zd);function Gd(e,t=0,n=1){return(0,qd.default)(e,t,n)}function Jd(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}function Xd(e){if(e.type)return e;if("#"===e.charAt(0))return Xd(Jd(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,Yd.default)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,Yd.default)(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const Zd=e=>{const t=Xd(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e)).join(" ")};Ld.colorChannel=Zd;function Qd(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function ep(e){e=Xd(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Qd({type:s,values:l})}function tp(e){let t="hsl"===(e=Xd(e)).type||"hsla"===e.type?Xd(ep(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function np(e,t){return e=Xd(e),t=Gd(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Qd(e)}function rp(e,t){if(e=Xd(e),t=Gd(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Qd(e)}function op(e,t){if(e=Xd(e),t=Gd(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Qd(e)}function ip(e,t=.15){return tp(e)>.5?rp(e,t):op(e,t)}Ld.private_safeColorChannel=(e,t)=>{try{return Zd(e)}catch{return e}};const ap={black:"#000",white:"#fff"},sp={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},lp="#f3e5f5",cp="#ce93d8",up="#ba68c8",dp="#ab47bc",pp="#9c27b0",fp="#7b1fa2",hp="#e57373",mp="#ef5350",gp="#f44336",vp="#d32f2f",bp="#c62828",yp="#ffb74d",xp="#ffa726",wp="#ff9800",Sp="#f57c00",_p="#e65100",Ep="#e3f2fd",kp="#90caf9",Tp="#42a5f5",Cp="#1976d2",Op="#1565c0",Ip="#4fc3f7",Mp="#29b6f6",Dp="#03a9f4",jp="#0288d1",Ap="#01579b",Np="#81c784",Pp="#66bb6a",Rp="#4caf50",Lp="#388e3c",Fp="#2e7d32",Up="#1b5e20",Bp=["mode","contrastThreshold","tonalOffset"],zp={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ap.white,default:ap.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Kp={text:{primary:ap.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ap.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function $p(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Wd(e.main,o):"dark"===t&&(e.dark=Vd(e.main,i)))}function Vp(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=vs(e,Bp),i=e.primary||function(e="light"){return"dark"===e?{main:kp,light:Ep,dark:Tp}:{main:Cp,light:Tp,dark:Op}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:cp,light:lp,dark:dp}:{main:pp,light:up,dark:fp}}(t),s=e.error||function(e="light"){return"dark"===e?{main:gp,light:hp,dark:vp}:{main:vp,light:mp,dark:bp}}(t),l=e.info||function(e="light"){return"dark"===e?{main:Mp,light:Ip,dark:jp}:{main:jp,light:Dp,dark:Ap}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Pp,light:Np,dark:Lp}:{main:Fp,light:Rp,dark:Up}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:xp,light:yp,dark:Sp}:{main:"#ed6c02",light:wp,dark:_p}}(t);function d(e){return Hd(e,Kp.text.primary)>=n?Kp.text.primary:zp.text.primary}const p=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e=ts({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(hs(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(hs(12,t?` (${t})`:"",JSON.stringify(e.main)));return $p(e,"light",o,r),$p(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e},f={dark:Kp,light:zp};return hc(ts({common:ts({},ap),mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:sp,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},f[t]),o)}const Hp=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Wp(e){return Math.round(1e5*e)/1e5}const Yp={textTransform:"uppercase"},qp='"Roboto", "Helvetica", "Arial", sans-serif';function Gp(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=qp,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,p=vs(n,Hp),f=o/14,h=d||(e=>e/c*f+"rem"),m=(e,t,n,o,i)=>ts({fontFamily:r,fontWeight:e,fontSize:h(t),lineHeight:n},r===qp?{letterSpacing:`${Wp(o/t)}em`}:{},i,u),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(s,14,1.75,.4,Yp),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Yp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return hc(ts({htmlFontSize:c,pxToRem:h,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),p,{clone:!1})}function Jp(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const Xp=["none",Jp(0,2,1,-1,0,1,1,0,0,1,3,0),Jp(0,3,1,-2,0,2,2,0,0,1,5,0),Jp(0,3,3,-2,0,3,4,0,0,1,8,0),Jp(0,2,4,-1,0,4,5,0,0,1,10,0),Jp(0,3,5,-1,0,5,8,0,0,1,14,0),Jp(0,3,5,-1,0,6,10,0,0,1,18,0),Jp(0,4,5,-2,0,7,10,1,0,2,16,1),Jp(0,5,5,-3,0,8,10,1,0,3,14,2),Jp(0,5,6,-3,0,9,12,1,0,3,16,2),Jp(0,6,6,-3,0,10,14,1,0,4,18,3),Jp(0,6,7,-4,0,11,15,1,0,4,20,3),Jp(0,7,8,-4,0,12,17,2,0,5,22,4),Jp(0,7,8,-4,0,13,19,2,0,5,24,4),Jp(0,7,9,-4,0,14,21,2,0,5,26,4),Jp(0,8,9,-5,0,15,22,2,0,6,28,5),Jp(0,8,10,-5,0,16,24,2,0,6,30,5),Jp(0,8,11,-5,0,17,26,2,0,6,32,5),Jp(0,9,11,-5,0,18,28,2,0,7,34,6),Jp(0,9,12,-6,0,19,29,2,0,7,36,6),Jp(0,10,13,-6,0,20,31,3,0,8,38,7),Jp(0,10,13,-6,0,21,33,3,0,8,40,7),Jp(0,10,14,-6,0,22,35,3,0,8,42,7),Jp(0,11,14,-7,0,23,36,3,0,9,44,8),Jp(0,11,15,-7,0,24,38,3,0,9,46,8)],Zp=["duration","easing","delay"],Qp={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ef={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function tf(e){return`${Math.round(e)}ms`}function nf(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function rf(e){const t=ts({},Qp,e.easing),n=ts({},ef,e.duration);return ts({getAutoHeightDuration:nf,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0}=r;vs(r,Zp);return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:tf(o)} ${i} ${"string"==typeof a?a:tf(a)}`)).join(",")}},e,{easing:t,duration:n})}const of={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},af=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const sf=function(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=vs(e,af);if(e.vars)throw new Error(hs(18));const s=Vp(r),l=xu(e);let c=hc(l,{mixins:Rd(l.breakpoints,n),palette:s,shadows:Xp.slice(),typography:Gp(s,i),transitions:rf(o),zIndex:ts({},of)});return c=hc(c,a),c=t.reduce(((e,t)=>hc(e,t)),c),c.unstable_sxConfig=ts({},mu,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return vu({sx:e,theme:this})},c}();function lf(){const e=Eu(sf);return e[gs]||e}function cf({props:e,name:t}){return function({props:e,name:t,defaultTheme:n,themeId:r}){let o=Eu(n);return o=o[r]||o,Hu({theme:o,name:t,props:e})}({props:e,name:t,defaultTheme:sf,themeId:gs})}var uf={};const df=ha(ns);var pf,ff={exports:{}};const hf=ha(dc),mf=ha(mc),gf=ha(kc),vf=ha($u),bf=ha(wu),yf=ha(Cu);var xf=Ud;Object.defineProperty(uf,"__esModule",{value:!0});var wf=uf.default=function(e={}){const{themeId:t,defaultTheme:n=Af,rootShouldForwardProp:r=jf,slotShouldForwardProp:o=jf}=e,i=e=>(0,Cf.default)((0,Sf.default)({},e,{theme:Pf((0,Sf.default)({},e,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(e,a={})=>{(0,Ef.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:s,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=Rf(Nf(l))}=a,p=(0,_f.default)(a,Mf),f=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,h=u||!1;let m=jf;"Root"===l||"root"===l?m=r:l?m=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const g=(0,Ef.default)(e,(0,Sf.default)({shouldForwardProp:m,label:undefined},p)),v=e=>"function"==typeof e&&e.__emotion_real!==e||(0,kf.isPlainObject)(e)?r=>Lf(e,(0,Sf.default)({},r,{theme:Pf({theme:r.theme,defaultTheme:n,themeId:t})})):e,b=(r,...o)=>{let a=v(r);const l=o?o.map(v):[];s&&d&&l.push((e=>{const r=Pf((0,Sf.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const o=r.components[s].styleOverrides,i={};return Object.entries(o).forEach((([t,n])=>{i[t]=Lf(n,(0,Sf.default)({},e,{theme:r}))})),d(e,i)})),s&&!f&&l.push((e=>{var r;const o=Pf((0,Sf.default)({},e,{defaultTheme:n,themeId:t}));return Lf({variants:null==o||null==(r=o.components)||null==(r=r[s])?void 0:r.variants},(0,Sf.default)({},e,{theme:o}))})),h||l.push(i);const c=l.length-o.length;if(Array.isArray(r)&&c>0){const e=new Array(c).fill("");a=[...r,...e],a.raw=[...r.raw,...e]}const u=g(a,...l);return e.muiName&&(u.muiName=e.muiName),u};return g.withConfig&&(b.withConfig=g.withConfig),b}};uf.shouldForwardProp=jf,uf.systemDefaultTheme=void 0;var Sf=xf(df),_f=xf((pf||(pf=1,function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}(ff)),ff.exports)),Ef=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=Df(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(hf),kf=mf,Tf=(xf(gf),xf(vf),xf(bf)),Cf=xf(yf);const Of=["ownerState"],If=["variants"],Mf=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Df(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Df=function(e){return e?n:t})(e)}function jf(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const Af=uf.systemDefaultTheme=(0,Tf.default)(),Nf=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Pf({defaultTheme:e,theme:t,themeId:n}){return function(e){return 0===Object.keys(e).length}(t)?e:t[n]||t}function Rf(e){return e?(t,n)=>n[e]:null}function Lf(e,t){let{ownerState:n}=t,r=(0,_f.default)(t,Of);const o="function"==typeof e?e((0,Sf.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap((e=>Lf(e,(0,Sf.default)({ownerState:n},r))));if(o&&"object"==typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,_f.default)(o,If);return e.forEach((e=>{let o=!0;"function"==typeof e.props?o=e.props((0,Sf.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,Sf.default)({ownerState:n},r,n)):e.style))})),t}return o}const Ff=e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e,Uf=wf({themeId:gs,defaultTheme:sf,rootShouldForwardProp:Ff}),Bf=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)},zf={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",inputModeToggleButtonAriaLabel:(e,t)=>e?`text input view is open, go to ${t} view`:`${t} view is open, go to text input view`,start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerDefaultToolbarTitle:"Select date",dateTimePickerDefaultToolbarTitle:"Select date & time",timePickerDefaultToolbarTitle:"Select time",dateRangePickerDefaultToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,openDatePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?`Choose date, selected date is ${t.format(t.date(e),"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?`Choose time, selected time is ${t.format(t.date(e),"fullTime")}`:"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date"};(e=>{ts({},e)})(zf);const Kf=B.createContext(null);const $f={icon:"icon-8081be27","icon--block":"icon--block-4aa6379d","icon--inline":"icon--inline-5d045b85"},Vf=(0,B.forwardRef)(((e,t)=>{const{className:n,name:r,filled:o=!1,label:i,type:a="outlined",size:s=24,display:l="block",color:c,...u}=e,d=ua("notranslate","material-symbols",$f.icon,$f[`icon--${l}`],{[`material-symbols--${a}`]:a,[`text-${c}`]:c},n),p={...s?{"--icon-internal-variation-size":s/16+"rem"}:{},...o?{"--icon-internal-variation-fill":1}:{}};return(0,cn.jsx)("span",{"data-name":"icon",role:"img","aria-hidden":!i,...u,className:d,style:p,ref:t,"aria-label":i,children:r})}));Vf.displayName="Icon";const Hf={btn:"btn-a9ce955b","btn--small":"btn--small-5daaaf3d","btn--icon-only":"btn--icon-only-375cfc7d","btn--tertiary":"btn--tertiary-c1cc08ad","btn--default":"btn--default-eca73b71","btn--primary":"btn--primary-22126c0a","btn--is-active":"btn--is-active-a0b6b950","btn--is-hovered":"btn--is-hovered-4a27da20","btn--secondary":"btn--secondary-a76a0864","btn--important":"btn--important-1a53be26","btn--positive":"btn--positive-46a2598e","btn--inverted":"btn--inverted-3fc5447d","btn--link":"btn--link-92dffb55","btn--text-color":"btn--text-color-2cc027f7",btn__text:"btn__text-7d9d1a13","btn--is-loading":"btn--is-loading-00320401","btn--icon":"btn--icon-456b539f",btn__inner:"btn__inner-804ab13a","btn__icon--left":"btn__icon--left-50b31870","btn__icon--right":"btn__icon--right-9b9e8607",btn__icon:"btn__icon-738969c8",btn__spinner:"btn__spinner-5ad34e4e","btn--underline":"btn--underline-e2d2c82b","btn--no-style":"btn--no-style-ed081476","btn--full-width":"btn--full-width-9809b856"},Wf=(0,B.forwardRef)((({children:e,as:t,text:n,className:r,visualType:o="primary",color:i="default",size:a,icon:s,iconLeft:l,iconRight:c,underline:u=!1,isHovered:d,isActive:p,isLoading:f=!1,noStyle:h,renderWrapperElement:m,fullWidth:g,onClick:v,...b},y)=>{const x=t||"button",w=s||l||c,S=h?ua(Hf["btn--no-style"],r,{[Hf["btn--full-width"]]:g}):ua(Hf.btn,Hf[`btn--${o}`],Hf[`btn--${i}`],r,{[Hf[`btn--${a}`]]:a},{[Hf["btn--underline"]]:u},{[Hf["btn--is-hovered"]]:d},{[Hf["btn--is-active"]]:p},{[Hf["btn--is-loading"]]:f},{[Hf["btn--icon-only"]]:s},{[Hf["btn--icon"]]:w},{[Hf["btn--full-width"]]:g}),_=(e,t)=>{const n={size:16,className:ua(Hf.btn__icon,Hf[`btn__icon--${e}`],{[Hf.btn__spinner]:f})},r="string"==typeof t?{...n,name:t}:{...n,...t,className:ua(n.className,null==t?void 0:t.className)};return f?(0,cn.jsx)(DY,{className:r.className}):(0,cn.jsx)(Vf,{...r})};return(0,cn.jsx)(oY,{visibility:"hide",children:(0,cn.jsx)(x,{"data-name":"button-content",...b,"aria-disabled":f||b["aria-disabled"],onClick:e=>{v&&!f&&v(e)},ref:y,className:S,children:h?e:(0,cn.jsxs)("span",{className:Hf.btn__inner,children:[s&&_("centre",s),l&&_("left",l),(0,cn.jsx)("span",{className:Hf.btn__text,children:e}),f&&!w&&(0,cn.jsx)(DY,{position:"absolute",className:Hf.btn__spinner}),c&&_("right",c)]})})})}));Wf.displayName="ButtonContent";const Yf=Wf,qf=(0,B.forwardRef)(((e,t)=>{const{children:n,as:r,type:o,formNoValidate:i,visualType:a,color:s,size:l,icon:c,iconLeft:u,iconRight:d,underline:p,isHovered:f,isActive:h,noStyle:m,...g}=e;return(0,cn.jsx)(Yf,{"data-name":"button",...g,type:o||"button",formNoValidate:!!(i??"submit"===o)||void 0,ref:t,as:r||"button",visualType:a,color:s,size:l,icon:c,iconLeft:u,iconRight:d,underline:p,isHovered:f,isActive:h,noStyle:m,children:n})}));qf.displayName="Button";const Gf=qf;function Jf(e){return"string"==typeof e&&"%"===e[e.length-1]&&function(e){const t=parseFloat(e);return!isNaN(t)&&isFinite(t)}(e.substring(0,e.length-1))}function Xf(e,t,n){0===t&&!n&&null!=e&&e.style&&(null==e?void 0:e.children.length)>0&&(e.style.display="none")}const Zf={animating:"rah-animating",animatingUp:"rah-animating--up",animatingDown:"rah-animating--down",animatingToHeightZero:"rah-animating--to-height-zero",animatingToHeightAuto:"rah-animating--to-height-auto",animatingToHeightSpecific:"rah-animating--to-height-specific",static:"rah-static",staticHeightZero:"rah-static--height-zero",staticHeightAuto:"rah-static--height-auto",staticHeightSpecific:"rah-static--height-specific"};function Qf(e,t){return[e.static,0===t&&e.staticHeightZero,"number"==typeof t&&t>0?e.staticHeightSpecific:null,"auto"===t&&e.staticHeightAuto].filter((e=>e)).join(" ")}const eh=["animateOpacity","animationStateClasses","applyInlineTransitions","children","className","contentClassName","contentRef","delay","duration","easing","height","onHeightAnimationEnd","onHeightAnimationStart","style","disableDisplayNone"],th=B.forwardRef(((e,t)=>{const{animateOpacity:n=!1,animationStateClasses:r={},applyInlineTransitions:o=!0,children:i,className:a="",contentClassName:s,delay:l=0,disableDisplayNone:c=!1,duration:u=500,easing:d="ease",height:p,onHeightAnimationEnd:f,onHeightAnimationStart:h,style:m,contentRef:g}=e,v=Object.assign({},e);eh.forEach((e=>{delete v[e]}));const b=(0,B.useRef)(p),y=(0,B.useRef)(null),x=(0,B.useRef)(),w=(0,B.useRef)(),S=(0,B.useRef)(Object.assign(Object.assign({},Zf),r)),_=(0,B.useRef)(!!(typeof window<"u"&&window.matchMedia)&&window.matchMedia("(prefers-reduced-motion)").matches),E=_.current?0:l,k=_.current?0:u;let T=p,C="visible";"number"==typeof p?(T=p<0?0:p,C="hidden"):Jf(T)&&(T="0%"===p?0:p,C="hidden");const[O,I]=(0,B.useState)(T),[M,D]=(0,B.useState)(C),[j,A]=(0,B.useState)(!1),[N,P]=(0,B.useState)(Qf(S.current,p));(0,B.useEffect)((()=>{Xf(y.current,O,c)}),[]),(0,B.useEffect)((()=>{if(p!==b.current&&y.current){(function(e,t){0===t&&null!=e&&e.style&&(e.style.display="")})(y.current,b.current),y.current.style.overflow="hidden";const e=y.current.offsetHeight;y.current.style.overflow="";const t=k+E;let n,r,o,i="hidden";const a="auto"===b.current;"number"==typeof p?(n=p<0?0:p,r=n):Jf(p)?(n="0%"===p?0:p,r=n):(n=e,r="auto",i=void 0),a&&(r=n,n=e);const s=[S.current.animating,("auto"===b.current||p<b.current)&&S.current.animatingUp,("auto"===p||p>b.current)&&S.current.animatingDown,0===r&&S.current.animatingToHeightZero,"auto"===r&&S.current.animatingToHeightAuto,"number"==typeof r&&r>0?S.current.animatingToHeightSpecific:null].filter((e=>e)).join(" "),l=Qf(S.current,r);I(n),D("hidden"),A(!a),P(s),clearTimeout(w.current),clearTimeout(x.current),a?(o=!0,w.current=setTimeout((()=>{I(r),D(i),A(o),null==h||h(r)}),50),x.current=setTimeout((()=>{A(!1),P(l),Xf(y.current,r,c),null==f||f(r)}),t)):(null==h||h(n),w.current=setTimeout((()=>{I(r),D(i),A(!1),P(l),"auto"!==p&&Xf(y.current,n,c),null==f||f(n)}),t))}return b.current=p,()=>{clearTimeout(w.current),clearTimeout(x.current)}}),[p]);const R=Object.assign(Object.assign({},m),{height:O,overflow:M||(null==m?void 0:m.overflow)});j&&o&&(R.transition=`height ${k}ms ${d} ${E}ms`,null!=m&&m.transition&&(R.transition=`${m.transition}, ${R.transition}`),R.WebkitTransition=R.transition);const L={};n&&(L.transition=`opacity ${k}ms ${d} ${E}ms`,L.WebkitTransition=L.transition,0===O&&(L.opacity=0));const F=typeof v["aria-hidden"]<"u"?v["aria-hidden"]:0===p;return B.createElement("div",Object.assign({},v,{"aria-hidden":F,className:`${N} ${a}`,style:R,ref:t}),B.createElement("div",{className:s,style:L,ref:e=>{y.current=e,g&&(g.current=e)}},i))})),nh={collapse__title:"collapse__title-8b98d783",collapse__icon:"collapse__icon-6cfc1cff","collapse--is-open":"collapse--is-open-67cf3662",collapse__content:"collapse__content-c7ea2935"},rh=e=>{const{getLabel:t}=IY(),{id:n,children:r,className:o,openText:i=t("open"),closeText:a=t("close"),hideCollapseText:s=!1,title:l,titleRowProps:c,defaultOpen:u,open:d,onToggle:p,...f}=e,[h,m]=B.useState(u),g=uY(),v=g||(void 0!==d?d:h),b=ua(nh.collapse,o,{[nh["collapse--is-open"]]:v}),y=()=>{m((e=>!e)),null==p||p(!v)},x=(0,cn.jsx)("div",{className:nh.collapse__content,children:r});return(0,cn.jsxs)("div",{"data-name":"collapse",...f,className:b,children:[(0,cn.jsx)("button",{type:"button","data-name":"collapse-trigger",className:nh.collapse__title,"aria-expanded":v,"aria-controls":n,onKeyDown:e=>{("Enter"===e.code||"Space"===e.code)&&!e.repeat&&(e.preventDefault(),y())},onClick:y,children:(0,cn.jsxs)(PY,{justifyContent:"between",alignItems:"center",wrap:"nowrap",...c,element:"span",children:[l&&(0,cn.jsx)(RY,{children:l}),(0,cn.jsx)(RY,{width:"auto",children:(0,cn.jsxs)(PY,{element:"span",alignItems:"center",gutter:1,children:[(0,cn.jsx)(oY,{visibility:"hide",children:(0,cn.jsx)(RY,{width:"auto",className:ua({"visually-hidden":s}),children:(0,cn.jsx)(Qa,{element:"span",color:"primary",children:v?a:i})})}),(0,cn.jsx)(RY,{width:"auto",children:(0,cn.jsx)(Vf,{className:nh.collapse__icon,name:"expand_more"})})]})})]})}),g?x:(0,cn.jsx)(th,{duration:300,id:n,height:v?"auto":0,"data-testid":"collapse-inner",children:x})]})},oh=(0,B.forwardRef)(((e,t)=>{const{getLabel:n}=IY(),{visualType:r="link",as:o,children:i,...a}=e;return(0,cn.jsxs)(Yf,{"data-name":"anchor",...a,ref:t,as:o||"a",visualType:r,children:[i,"_blank"===a.target&&(0,cn.jsxs)("span",{className:"sr-only",children:["(",n("anchor.new-tab"),")"]})]})}));oh.displayName="Anchor";const ih=B.createContext({menuOpen:!1,toggleMenu:()=>null,headerType:"system",reference:()=>null,floating:()=>null,getReferenceProps:()=>({}),getFloatingProps:()=>({}),context:{},y:null,headerElement:null,headerBottomElement:null,headerBottomSize:void 0}),ah={card:"card-1dcacf64","card--borderless":"card--borderless-32e5f5c2","card--no-border-radius-top":"card--no-border-radius-top-b4365e4f",card__content:"card__content-815d48ff","card--no-border-radius-right":"card--no-border-radius-right-3ceb8758","card--no-border-radius-bottom":"card--no-border-radius-bottom-63f3360b","card--no-border-radius-left":"card--no-border-radius-left-a3acce4a","card--border-left":"card--border-left-e9b3151f","card--border-top":"card--border-top-e2a66b39","card__header--default":"card__header--default-90734e02","card__header--primary-main":"card__header--primary-main-8de91e10","card__header--primary-active":"card__header--primary-active-6877b9af","card__header--white":"card__header--white-9243bce2","card__header--bg-muted":"card__header--bg-muted-7904d086",card__header:"card__header-5d78acc3"},sh=B.createContext({}),lh=e=>{const t=null==e?void 0:e.replace(/(top-)|(left-)/s,"");return[null==e?void 0:e.replace(new RegExp(`(${t})|-`,"g"),""),t]},ch=e=>{const t=e=>"object"==typeof e&&"vertical"in e&&"horizontal"in e;return{"--card-content-padding-top":`${"number"==typeof e?e:t(e)?e.vertical:null==e?void 0:e.top}rem`,"--card-content-padding-right":`${"number"==typeof e?e:t(e)?e.horizontal:null==e?void 0:e.right}rem`,"--card-content-padding-bottom":`${"number"==typeof e?e:t(e)?e.vertical:null==e?void 0:e.bottom}rem`,"--card-content-padding-left":`${"number"==typeof e?e:t(e)?e.horizontal:null==e?void 0:e.left}rem`}},uh=(0,B.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=Wa(),{children:r,className:o,padding:i,background:a="bg-default",borderRadius:s,borderless:l,border:c="border-default",...u}=n(e,{padding:1}),[d,p]=lh(c),f=ua(ah.card,o,{[ah[`card--border-${d}`]]:d,[ah["card--borderless"]]:l,[ah["card--no-border-radius-top"]]:!1===s||!1===(null==s?void 0:s.top),[ah["card--no-border-radius-right"]]:!1===s||!1===(null==s?void 0:s.right),[ah["card--no-border-radius-bottom"]]:!1===s||!1===(null==s?void 0:s.bottom),[ah["card--no-border-radius-left"]]:!1===s||!1===(null==s?void 0:s.left)});return(0,cn.jsx)(sh.Provider,{value:{padding:i,background:a},children:(0,cn.jsx)("div",{"data-name":"card",...u,className:f,ref:t,style:p?{"--card-border-color":`var(--color-${p})`}:void 0,children:r})})}));uh.displayName="Card";const dh=e=>{const{variant:t,...n}=e,{getCurrentBreakpointProps:r}=Wa(),{padding:o}=B.useContext(sh),{children:i,className:a,background:s,padding:l,...c}=r(n,{background:t??"default",padding:o}),u=ua(ah.card__header,ah[`card__header--${s}`],a);return(0,cn.jsx)("div",{"data-name":"card-header",style:ch(l),...c,className:u,children:i})};dh.displayName="CardHeader";const ph=e=>{const{padding:t,background:n}=B.useContext(sh),{getCurrentBreakpointProps:r}=Wa(),{children:o,className:i,padding:a,background:s,...l}=r(e,{padding:t,background:n}),c=ua(ah.card__content,{[Za(s)]:s},i);return(0,cn.jsx)("div",{"data-name":"card-content","data-padding":"number"==typeof a?`${a}rem`:void 0,style:ch(a),...l,className:c,children:o})};ph.displayName="CardContent";const fh="card__notification-content-4c89a40e",hh="card__notification-b07a1cfd",mh=e=>{const{children:t,padding:n,className:r,...o}=e,i=ua(hh,r);return(0,cn.jsx)(ph,{"data-name":"card-notification",padding:n,className:fh,children:(0,cn.jsx)(qY,{className:i,...o,children:t})})},gh=({children:e})=>(0,cn.jsx)(cn.Fragment,{children:e});function vh(){return typeof window<"u"}function bh(e){return wh(e)?(e.nodeName||"").toLowerCase():"#document"}function yh(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function xh(e){var t;return null==(t=(wh(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function wh(e){return!!vh()&&(e instanceof Node||e instanceof yh(e).Node)}function Sh(e){return!!vh()&&(e instanceof Element||e instanceof yh(e).Element)}function _h(e){return!!vh()&&(e instanceof HTMLElement||e instanceof yh(e).HTMLElement)}function Eh(e){return!(!vh()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof yh(e).ShadowRoot)}function kh(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dh(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Th(e){return["table","td","th"].includes(bh(e))}function Ch(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function Oh(e){const t=Ih(),n=Sh(e)?Dh(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Ih(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Mh(e){return["html","body","#document"].includes(bh(e))}function Dh(e){return yh(e).getComputedStyle(e)}function jh(e){return Sh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ah(e){if("html"===bh(e))return e;const t=e.assignedSlot||e.parentNode||Eh(e)&&e.host||xh(e);return Eh(t)?t.host:t}function Nh(e){const t=Ah(e);return Mh(t)?e.ownerDocument?e.ownerDocument.body:e.body:_h(t)&&kh(t)?t:Nh(t)}function Ph(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Nh(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=yh(o);if(i){const e=Rh(a);return t.concat(a,a.visualViewport||[],kh(o)?o:[],e&&n?Ph(e):[])}return t.concat(o,Ph(o,[],n))}function Rh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lh(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Fh(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Eh(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Uh(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Bh(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function zh(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Vh()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Kh(e){return!Bh().includes("jsdom/")&&(!Vh()&&0===e.width&&0===e.height||Vh()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function $h(){return/apple/i.test(navigator.vendor)}function Vh(){const e=/android/i;return e.test(Uh())||e.test(Bh())}function Hh(){return Uh().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Wh(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Yh(e){return(null==e?void 0:e.ownerDocument)||document}function qh(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Gh(e){return"composedPath"in e?e.composedPath()[0]:e.target}gh.displayName="HeaderContent";function Jh(e){return _h(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Xh(e){e.preventDefault(),e.stopPropagation()}function Zh(e){return!!e&&("combobox"===e.getAttribute("role")&&Jh(e))}const Qh=Math.min,em=Math.max,tm=Math.round,nm=Math.floor,rm=e=>({x:e,y:e}),om={left:"right",right:"left",bottom:"top",top:"bottom"},im={start:"end",end:"start"};function am(e,t,n){return em(e,Qh(t,n))}function sm(e,t){return"function"==typeof e?e(t):e}function lm(e){return e.split("-")[0]}function cm(e){return e.split("-")[1]}function um(e){return"x"===e?"y":"x"}function dm(e){return"y"===e?"height":"width"}function pm(e){return["top","bottom"].includes(lm(e))?"y":"x"}function fm(e){return um(pm(e))}function hm(e){return e.replace(/start|end/g,(e=>im[e]))}function mm(e){return e.replace(/left|right|bottom|top/g,(e=>om[e]))}function gm(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function vm(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var bm=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),ym=typeof Element>"u",xm=ym?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wm=!ym&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Sm=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},_m=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Sm(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{xm.call(a,bm)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!Sm(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},Em=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},km=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Em(e)?0:e.tabIndex},Tm=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Cm=function(e){return"INPUT"===e.tagName},Om=function(e){return function(e){return Cm(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||wm(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if(typeof window<"u"&&typeof window.CSS<"u"&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Im=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Mm=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=xm.call(e,"details>summary:first-of-type")?e.parentElement:e;if(xm.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Im(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=wm(e);if(a&&!a.shadowRoot&&!0===r(a))return Im(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&wm(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=wm(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Dm=function(e,t){return!(t.disabled||Sm(t)||function(e){return Cm(e)&&"hidden"===e.type}(t)||Mm(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!xm.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},jm=function(e,t){return!(Om(t)||km(t)<0||!Dm(e,t))},Am=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Nm=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,s=function(e,t){var n=km(e);return n<0&&t&&!Em(e)?0:n}(a,i),l=i?e(t.candidates):a;0===s?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})})),r.sort(Tm).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Pm=function(e,t){var n;return n=(t=t||{}).getShadowRoot?_m([e],t.includeContainer,{filter:jm.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Am}):function(e,t,n){if(Sm(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(bm));return t&&xm.call(e,bm)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,jm.bind(null,t)),Nm(n)};function Rm(e,t,n){let{reference:r,floating:o}=e;const i=pm(t),a=fm(t),s=dm(a),l=lm(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(cm(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1)}return f}async function Lm(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=sm(t,e),h=gm(f),m=s[p?"floating"===d?"reference":"floating":d],g=vm(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=vm(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-x.top+h.top)/y.y,bottom:(x.bottom-g.bottom+h.bottom)/y.y,left:(g.left-x.left+h.left)/y.x,right:(x.right-g.right+h.right)/y.x}}function Fm(e){const t=Dh(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_h(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=tm(n)!==i||tm(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Um(e){return Sh(e)?e:e.contextElement}function Bm(e){const t=Um(e);if(!_h(t))return rm(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Fm(t);let a=(i?tm(n.width):n.width)/r,s=(i?tm(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const zm=rm(0);function Km(e){const t=yh(e);return Ih()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:zm}function $m(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Um(e);let a=rm(1);t&&(r?Sh(r)&&(a=Bm(r)):a=Bm(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==yh(e))&&t}(i,n,r)?Km(i):rm(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=yh(i),t=r&&Sh(r)?yh(r):r;let n=e,o=Rh(n);for(;o&&r&&t!==n;){const e=Bm(o),t=o.getBoundingClientRect(),r=Dh(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=yh(o),o=Rh(n)}}return vm({width:u,height:d,x:l,y:c})}function Vm(e,t){const n=jh(e).scrollLeft;return t?t.left+n:$m(xh(e)).left+n}function Hm(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Vm(e,r)),y:r.top+t.scrollTop}}function Wm(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=yh(e),r=xh(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Ih();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=xh(e),n=jh(e),r=e.ownerDocument.body,o=em(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=em(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Vm(e);const s=-n.scrollTop;return"rtl"===Dh(r).direction&&(a+=em(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(xh(e));else if(Sh(t))r=function(e,t){const n=$m(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=_h(e)?Bm(e):rm(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Km(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vm(r)}function Ym(e,t){const n=Ah(e);return!(n===t||!Sh(n)||Mh(n))&&("fixed"===Dh(n).position||Ym(n,t))}function qm(e,t){const n=t.get(e);if(n)return n;let r=Ph(e,[],!1).filter((e=>Sh(e)&&"body"!==bh(e))),o=null;const i="fixed"===Dh(e).position;let a=i?Ah(e):e;for(;Sh(a)&&!Mh(a);){const t=Dh(a),n=Oh(a);!n&&"fixed"===t.position&&(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||kh(a)&&!n&&Ym(e,a))?r=r.filter((e=>e!==a)):o=t,a=Ah(a)}return t.set(e,r),r}function Gm(e,t,n){const r=_h(t),o=xh(t),i="fixed"===n,a=$m(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=rm(0);if(r||!r&&!i)if(("body"!==bh(t)||kh(o))&&(s=jh(t)),r){const e=$m(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Vm(o));const c=!o||r||i?rm(0):Hm(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Jm(e){return"static"===Dh(e).position}function Xm(e,t){if(!_h(e)||"fixed"===Dh(e).position)return null;if(t)return t(e);let n=e.offsetParent;return xh(e)===n&&(n=n.ownerDocument.body),n}function Zm(e,t){const n=yh(e);if(Ch(e))return n;if(!_h(e)){let t=Ah(e);for(;t&&!Mh(t);){if(Sh(t)&&!Jm(t))return t;t=Ah(t)}return n}let r=Xm(e,t);for(;r&&Th(r)&&Jm(r);)r=Xm(r,t);return r&&Mh(r)&&Jm(r)&&!Oh(r)?n:r||function(e){let t=Ah(e);for(;_h(t)&&!Mh(t);){if(Oh(t))return t;if(Ch(t))return null;t=Ah(t)}return null}(e)||n}const Qm={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=xh(r),s=!!t&&Ch(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=rm(1);const u=rm(0),d=_h(r);if((d||!d&&!i)&&(("body"!==bh(r)||kh(a))&&(l=jh(r)),_h(r))){const e=$m(r);c=Bm(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?rm(0):Hm(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:xh,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Ch(t)?[]:qm(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=Wm(t,n,o);return e.top=em(r.top,e.top),e.right=Qh(r.right,e.right),e.bottom=Qh(r.bottom,e.bottom),e.left=em(r.left,e.left),e}),Wm(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Zm,getElementRects:async function(e){const t=this.getOffsetParent||Zm,n=this.getDimensions,r=await n(e.floating);return{reference:Gm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Fm(e);return{width:t,height:n}},getScale:Bm,isElement:Sh,isRTL:function(e){return"rtl"===Dh(e).direction}};function eg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tg(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Um(e),u=o||i?[...c?Ph(c):[],...Ph(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=xh(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-nm(d)+"px "+-nm(o.clientWidth-(u+p))+"px "+-nm(o.clientHeight-(d+f))+"px "+-nm(u)+"px",threshold:em(0,Qh(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1===r&&!eg(c,e.getBoundingClientRect())&&a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch{r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let h,m=l?$m(e):null;return l&&function t(){const r=$m(e);m&&!eg(m,r)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const ng=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=lm(n),s=cm(n),l="y"===pm(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=sm(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},rg=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=sm(e,t),c={x:n,y:r},u=await Lm(t,l),d=pm(lm(o)),p=um(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=am(f+u["y"===p?"top":"left"],f,f-u[e])}if(a){const e="y"===d?"bottom":"right";h=am(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:a}}}}}},og=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=sm(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=lm(o),b=pm(s),y=lm(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(y||!m?[mm(s)]:function(e){const t=mm(e);return[hm(e),t,hm(t)]}(s)),S="none"!==h;!p&&S&&w.push(...function(e,t,n,r){const o=cm(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(lm(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(hm)))),i}(s,m,h,x));const _=[s,...w],E=await Lm(t,g),k=[];let T=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&k.push(E[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=cm(e),o=fm(e),i=dm(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=mm(a)),[a,mm(a)]}(o,a,x);k.push(E[e[0]],E[e[1]])}if(T=[...T,{placement:o,overflows:k}],!k.every((e=>e<=0))){var C,O;const e=((null==(C=i.flip)?void 0:C.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n=null==(O=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!n)switch(f){case"bestFit":{var I;const e=null==(I=T.filter((e=>{if(S){const t=pm(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},ig=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=sm(e,t)||{};if(null==c)return{};const d=gm(u),p={x:n,y:r},f=fm(o),h=dm(f),m=await a.getDimensions(c),g="y"===f,v=g?"top":"left",b=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[f]-p[f]-i.floating[h],w=p[f]-i.reference[f],S=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let _=S?S[y]:0;(!_||!await(null==a.isElement?void 0:a.isElement(S)))&&(_=s.floating[y]||i.floating[h]);const E=x/2-w/2,k=_/2-m[h]/2-1,T=Qh(d[v],k),C=Qh(d[b],k),O=T,I=_-m[h]-C,M=_/2-m[h]/2+E,D=am(O,M,I),j=!l.arrow&&null!=cm(o)&&M!==D&&i.reference[h]/2-(M<O?T:C)-m[h]/2<0,A=j?M<O?M-O:M-I:0;return{[f]:p[f]+A,data:{[f]:D,centerOffset:M-D-A,...j&&{alignmentOffset:A}},reset:j}}}),ag=(e,t,n)=>{const r=new Map,o={platform:Qm,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Rm(c,r,l),p=r,f={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:v,data:b,reset:y}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=g??u,d=v??d,f={...f,[i]:{...f[i],...b}},y&&h<=50&&(h++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=Rm(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var sg=typeof document<"u"?B.useLayoutEffect:B.useEffect;function lg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!lg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||lg(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function cg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ug(e,t){const n=cg(e);return Math.round(t*n)/n}function dg(e){const t=B.useRef(e);return sg((()=>{t.current=e})),t}const pg=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?ig({element:n.current,padding:r}).fn(t):{}:n?ig({element:n,padding:r}).fn(t):{}}}),fg=(e,t)=>({...ng(e),options:[e,t]}),hg=(e,t)=>({...rg(e),options:[e,t]}),mg=(e,t)=>({...og(e),options:[e,t]}),gg=(e,t)=>({...pg(e),options:[e,t]});function vg(e){return B.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e)}const bg={...z},yg=bg.useInsertionEffect||(e=>e());function xg(e){const t=B.useRef((()=>{0}));return yg((()=>{t.current=e})),B.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var wg=typeof document<"u"?B.useLayoutEffect:B.useEffect;function Sg(){return Sg=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},Sg.apply(this,arguments)}let _g=!1,Eg=0;const kg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Eg++;const Tg=bg.useId||function(){const[e,t]=B.useState((()=>_g?kg():void 0));return wg((()=>{null==e&&t(kg())}),[]),B.useEffect((()=>{_g=!0}),[]),e};const Cg=B.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...h}={},...m}=e,g=Tg(),[v,b]=B.useState(!1);if(wg((()=>{r&&"rtl"===Dh(r).direction&&b(!0)}),[r]),!r)return null;const[y,x]=n.split("-"),w="top"===y||"bottom"===y;let S=u;(w&&null!=i&&i.x||!w&&null!=i&&i.y)&&(S=null);const _=2*c,E=_/2,k=a/2*(l/-8+1),T=s/2*l/4,C=!!p,O=S&&"end"===x?"bottom":"top";let I=S&&"end"===x?"right":"left";S&&v&&(I="end"===x?"left":"right");const M=null!=(null==o?void 0:o.x)?S||o.x:"",D=null!=(null==o?void 0:o.y)?S||o.y:"",j=p||"M0,0 H"+a+" L"+(a-k)+","+(s-T)+" Q"+a/2+","+s+" "+k+","+(s-T)+" Z",A={top:C?"rotate(180deg)":"",left:C?"rotate(90deg)":"rotate(-90deg)",bottom:C?"":"rotate(180deg)",right:C?"rotate(-90deg)":"rotate(90deg)"}[y];return B.createElement("svg",Sg({},m,{"aria-hidden":!0,ref:t,width:C?a:a+_,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[I]:M,[O]:D,[y]:w||C?"100%":"calc(100% - "+_/2+"px)",transform:[A,f].filter((e=>!!e)).join(" "),...h}}),_>0&&B.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:_+(p?0:1),d:j}),B.createElement("path",{stroke:_&&!p?m.fill:"none",d:j}),B.createElement("clipPath",{id:g},B.createElement("rect",{x:-E,y:E*(C?-1:1),width:a+_,height:a})))}));const Og=B.createContext(null),Ig=B.createContext(null),Mg=()=>{var e;return(null==(e=B.useContext(Og))?void 0:e.id)||null},Dg=()=>B.useContext(Ig);function jg(e){return"data-floating-ui-"+e}function Ag(e){const t=(0,B.useRef)(e);return wg((()=>{t.current=e})),t}const Ng=jg("safe-polygon");function Pg(e,t,n){return n&&!Wh(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function Rg(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=Dg(),h=Mg(),m=Ag(c),g=Ag(l),v=Ag(n),b=B.useRef(),y=B.useRef(-1),x=B.useRef(),w=B.useRef(-1),S=B.useRef(!0),_=B.useRef(!1),E=B.useRef((()=>{})),k=B.useRef(!1),T=B.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);B.useEffect((()=>{if(s)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(y.current),clearTimeout(w.current),S.current=!0,k.current=!1)}}),[s,i]),B.useEffect((()=>{if(!s||!m.current||!n)return;function e(e){T()&&r(!1,e,"hover")}const t=Yh(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[a.floating,n,r,s,m,T]);const C=B.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Pg(g.current,"close",b.current);o&&!x.current?(clearTimeout(y.current),y.current=window.setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(y.current),r(!1,e,n))}),[g,r]),O=xg((()=>{E.current(),x.current=void 0})),I=xg((()=>{if(_.current){const e=Yh(a.floating).body;e.style.pointerEvents="",e.removeAttribute(Ng),_.current=!1}})),M=xg((()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)));B.useEffect((()=>{if(s&&Sh(a.domReference)){var e;const r=a.domReference;return n&&r.addEventListener("mouseleave",l),null==(e=a.floating)||e.addEventListener("mouseleave",l),p&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",i),()=>{var e;n&&r.removeEventListener("mouseleave",l),null==(e=a.floating)||e.removeEventListener("mouseleave",l),p&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",i)}}function t(e){if(clearTimeout(y.current),S.current=!1,u&&!Wh(b.current)||d>0&&!Pg(g.current,"open"))return;const t=Pg(g.current,"open",b.current);t?y.current=window.setTimeout((()=>{v.current||r(!0,e,"hover")}),t):n||r(!0,e,"hover")}function i(e){if(M())return;E.current();const t=Yh(a.floating);if(clearTimeout(w.current),k.current=!1,m.current&&o.current.floatingContext){n||clearTimeout(y.current),x.current=m.current({...o.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){I(),O(),M()||C(e,!0,"safe-polygon")}});const r=x.current;return t.addEventListener("mousemove",r),void(E.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!Fh(a.floating,e.relatedTarget))&&C(e)}function l(e){M()||o.current.floatingContext&&(null==m.current||m.current({...o.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){I(),O(),M()||C(e)}})(e))}}),[a,s,e,u,d,p,C,O,I,r,n,v,f,g,m,o,M]),wg((()=>{var e;if(s&&n&&null!=(e=m.current)&&e.__options.blockPointerEvents&&T()){_.current=!0;const e=a.floating;if(Sh(a.domReference)&&e){var t;const n=Yh(a.floating).body;n.setAttribute(Ng,"");const r=a.domReference,o=null==f||null==(t=f.nodesRef.current.find((e=>e.id===h)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[s,n,h,a,f,m,T]),wg((()=>{n||(b.current=void 0,k.current=!1,O(),I())}),[n,O,I]),B.useEffect((()=>()=>{O(),clearTimeout(y.current),clearTimeout(w.current),I()}),[s,a.domReference,O,I]);const D=B.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){!S.current&&!v.current&&r(!0,t,"hover")}u&&!Wh(b.current)||n||0===d||k.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(w.current),"touch"===b.current?o():(k.current=!0,w.current=window.setTimeout(o,d)))}}}),[u,r,n,v,d]),j=B.useMemo((()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(e){M()||C(e.nativeEvent,!1)}})),[C,M]);return B.useMemo((()=>s?{reference:D,floating:j}:{}),[s,D,j])}let Lg=0;function Fg(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Lg);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Lg=requestAnimationFrame(i)}function Ug(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let Bg=new WeakMap,zg=new WeakSet,Kg={},$g=0;const Vg=e=>e&&(e.host||Vg(e.parentNode));function Hg(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=((e,t)=>t.map((t=>{if(e.contains(t))return t;const n=Vg(t);return e.contains(n)?n:null})).filter((e=>null!=e)))(t,e),s=new Set,l=new Set(a),c=[];Kg[o]||(Kg[o]=new WeakMap);const u=Kg[o];return a.forEach((function e(t){!t||s.has(t)||(s.add(t),t.parentNode&&e(t.parentNode))})),function e(t){!t||l.has(t)||[].forEach.call(t.children,(t=>{if("script"!==bh(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Bg.get(t)||0)+1,a=(u.get(t)||0)+1;Bg.set(t,r),u.set(t,a),c.push(t),1===r&&n&&zg.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),$g++,()=>{c.forEach((e=>{const t=(Bg.get(e)||0)-1,n=(u.get(e)||0)-1;Bg.set(e,t),u.set(e,n),t||(!zg.has(e)&&i&&e.removeAttribute(i),zg.delete(e)),n||e.removeAttribute(o)})),$g--,$g||(Bg=new WeakMap,Bg=new WeakMap,zg=new WeakSet,Kg={})}}function Wg(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=Yh(e[0]).body;return Hg(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Yg=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function qg(e,t){const n=Pm(e,Yg());"prev"===t&&n.reverse();const r=n.indexOf(Lh(Yh(e)));return n.slice(r+1)[0]}function Gg(){return qg(document.body,"next")}function Jg(){return qg(document.body,"prev")}function Xg(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Fh(n,r)}function Zg(e){Pm(e,Yg()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Qg(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const ev={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function tv(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const nv=B.forwardRef((function(e,t){const[n,r]=B.useState();wg((()=>($h()&&r("button"),document.addEventListener("keydown",tv),()=>{document.removeEventListener("keydown",tv)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[jg("focus-guard")]:"",style:ev};return B.createElement("span",Sg({},e,o))})),rv=B.createContext(null),ov=jg("portal");function iv(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=Tg(),o=av(),[i,a]=B.useState(null),s=B.useRef(null);return wg((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{s.current=null}))}),[i]),wg((()=>{if(!r||s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(ov,""),e.appendChild(n),s.current=n,a(n)}),[t,r]),wg((()=>{if(null===n||!r||s.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!Sh(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(ov,""),e=i||e,e.appendChild(l),s.current=l,a(l)}),[t,n,r,o]),i}({id:n,root:r}),[a,s]=B.useState(null),l=B.useRef(null),c=B.useRef(null),u=B.useRef(null),d=B.useRef(null),p=null==a?void 0:a.modal,f=null==a?void 0:a.open,h=!!a&&!a.modal&&a.open&&o&&!(!r&&!i);return B.useEffect((()=>{if(i&&o&&!p)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&Xg(e)&&("focusin"===e.type?Qg:Zg)(i)}}),[i,o,p]),B.useEffect((()=>{i&&(f||Qg(i))}),[f,i]),B.createElement(rv.Provider,{value:B.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s})),[o,i])},h&&i&&B.createElement(nv,{"data-type":"outside",ref:l,onFocus:e=>{if(Xg(e,i)){var t;null==(t=u.current)||t.focus()}else{const e=Jg()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),h&&i&&B.createElement("span",{"aria-owns":i.id,style:ev}),i&&ca.createPortal(t,i),h&&i&&B.createElement(nv,{"data-type":"outside",ref:c,onFocus:e=>{if(Xg(e,i)){var t;null==(t=d.current)||t.focus()}else{const t=Gg()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),null!=a&&a.closeOnFocusOut&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const av=()=>B.useContext(rv),sv="data-floating-ui-focusable";function lv(e){return e?e.hasAttribute(sv)?e:e.querySelector("["+sv+"]")||e:null}let cv=[];function uv(e){cv=cv.filter((e=>e.isConnected));let t=e;if(t&&"body"!==bh(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==xm.call(e,bm)&&jm(t,e)}(t,Yg())){const e=Pm(t,Yg())[0];e&&(t=e)}cv.push(t),cv.length>20&&(cv=cv.slice(-20))}}function dv(){return cv.slice().reverse().find((e=>e.isConnected))}const pv=B.forwardRef((function(e,t){return B.createElement("button",Sg({},e,{type:"button",ref:t,tabIndex:-1,style:ev}))}));function fv(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:h,onOpenChange:m,events:g,dataRef:v,floatingId:b,elements:{domReference:y,floating:x}}=t,w="number"==typeof a&&a<0,S=Zh(y)&&w,_=!(typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype)||i,E=Ag(o),k=Ag(a),T=Ag(s),C=Dg(),O=av(),I=B.useRef(null),M=B.useRef(null),D=B.useRef(!1),j=B.useRef(!1),A=B.useRef(-1),N=null!=O,P=lv(x),R=xg((function(e){return void 0===e&&(e=P),e?Pm(e,Yg()):[]})),L=xg((e=>{const t=R(e);return E.current.map((e=>y&&"reference"===e?y:P&&"floating"===e?P:t)).filter(Boolean).flat()}));function F(e){return!r&&u&&c?B.createElement(pv,{ref:"start"===e?I:M,onClick:e=>m(!1,e.nativeEvent)},"string"==typeof u?u:"Dismiss"):null}B.useEffect((()=>{if(r||!c)return;function e(e){if("Tab"===e.key){Fh(P,Lh(Yh(P)))&&0===R().length&&!S&&Xh(e);const t=L(),n=Gh(e);"reference"===E.current[0]&&n===y&&(Xh(e),e.shiftKey?Fg(t[t.length-1]):Fg(t[1])),"floating"===E.current[1]&&n===P&&e.shiftKey&&(Xh(e),Fg(t[0]))}}const t=Yh(P);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,y,P,c,E,S,R,L]),B.useEffect((()=>{if(!r&&x)return x.addEventListener("focusin",e),()=>{x.removeEventListener("focusin",e)};function e(e){const t=Gh(e),n=R().indexOf(t);-1!==n&&(A.current=n)}}),[r,x,R]),B.useEffect((()=>{if(!r&&d)return x&&_h(y)?(y.addEventListener("focusout",t),y.addEventListener("pointerdown",e),x.addEventListener("focusout",t),()=>{y.removeEventListener("focusout",t),y.removeEventListener("pointerdown",e),x.removeEventListener("focusout",t)}):void 0;function e(){j.current=!0,setTimeout((()=>{j.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(Fh(y,t)||Fh(x,t)||Fh(t,x)||Fh(null==O?void 0:O.portalNode,t)||null!=t&&t.hasAttribute(jg("focus-guard"))||C&&(Ug(C.nodesRef.current,h).find((e=>{var n,r;return Fh(null==(n=e.context)?void 0:n.elements.floating,t)||Fh(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(C.nodesRef.current,h).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));if(l&&n&&Lh(Yh(P))===Yh(P).body){_h(P)&&P.focus();const e=A.current,t=R(),n=t[e]||t[t.length-1]||P;_h(n)&&n.focus()}(S||!c)&&t&&n&&!j.current&&t!==dv()&&(D.current=!0,m(!1,e,"focus-out"))}))}}),[r,y,x,P,c,h,C,O,m,d,l,R,S]),B.useEffect((()=>{var e;if(r)return;const t=Array.from((null==O||null==(e=O.portalNode)?void 0:e.querySelectorAll("["+jg("portal")+"]"))||[]);if(x){const e=[x,...t,I.current,M.current,E.current.includes("reference")||S?y:null].filter((e=>null!=e)),n=c||S?Wg(e,_,!_):Wg(e);return()=>{n()}}}),[r,y,x,c,E,O,S,_]),wg((()=>{if(r||!_h(P))return;const e=Lh(Yh(P));queueMicrotask((()=>{const t=L(P),n=k.current,r=("number"==typeof n?t[n]:n.current)||P,o=Fh(P,e);!w&&!o&&p&&Fg(r,{preventScroll:r===P})}))}),[r,p,P,w,L,k]),wg((()=>{if(r||!P)return;let e=!1;const t=Yh(P),n=Lh(t);let o=v.current.openEvent;function i(t){let{open:n,reason:r,event:i,nested:a}=t;n&&(o=i),"escape-key"===r&&f.domReference.current&&uv(f.domReference.current),"hover"===r&&"mouseleave"===i.type&&(D.current=!0),"outside-press"===r&&(a?(D.current=!1,e=!0):D.current=!(zh(i)||Kh(i)))}uv(n),g.on("openchange",i);const a=t.createElement("span");return a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,ev),N&&y&&y.insertAdjacentElement("afterend",a),()=>{g.off("openchange",i);const n=Lh(t),r=Fh(x,n)||C&&Ug(C.nodesRef.current,h).some((e=>{var t;return Fh(null==(t=e.context)?void 0:t.elements.floating,n)}));(r||o&&["click","mousedown"].includes(o.type))&&f.domReference.current&&uv(f.domReference.current);const s="boolean"==typeof T.current?dv()||a:T.current.current||a;queueMicrotask((()=>{T.current&&!D.current&&_h(s)&&(!(s!==n&&n!==t.body)||r)&&s.focus({preventScroll:e}),a.remove()}))}}),[r,x,P,T,v,f,g,C,h,N,y]),B.useEffect((()=>{queueMicrotask((()=>{D.current=!1}))}),[r]),wg((()=>{if(!r&&O)return O.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:m,refs:f}),()=>{O.setFocusManagerState(null)}}),[r,O,c,p,m,f,d]),wg((()=>{if(r||!P||"function"!=typeof MutationObserver||w)return;const e=()=>{const e=P.getAttribute("tabindex"),t=R(),n=Lh(Yh(x)),r=t.indexOf(n);-1!==r&&(A.current=r),E.current.includes("floating")||n!==f.domReference.current&&0===t.length?"0"!==e&&P.setAttribute("tabindex","0"):"-1"!==e&&P.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,x,P,f,E,R,w]);const U=!r&&_&&(!c||!S)&&(N||c);return B.createElement(B.Fragment,null,U&&B.createElement(nv,{"data-type":"inside",ref:null==O?void 0:O.beforeInsideRef,onFocus:e=>{if(c){const e=L();Fg("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=O&&O.preserveTabOrder&&O.portalNode)if(D.current=!1,Xg(e,O.portalNode)){const e=Gg()||y;null==e||e.focus()}else{var t;null==(t=O.beforeOutsideRef.current)||t.focus()}}}),!S&&F("start"),n,F("end"),U&&B.createElement(nv,{"data-type":"inside",ref:null==O?void 0:O.afterInsideRef,onFocus:e=>{if(c)Fg(L()[0]);else if(null!=O&&O.preserveTabOrder&&O.portalNode)if(d&&(D.current=!0),Xg(e,O.portalNode)){const e=Jg()||y;null==e||e.focus()}else{var t;null==(t=O.afterOutsideRef.current)||t.focus()}}}))}let hv=0;let mv=()=>{};const gv=B.forwardRef((function(e,t){const{lockScroll:n=!1,...r}=e;return wg((()=>{if(n)return hv++,1===hv&&(mv=function(){const e=/iP(hone|ad|od)|iOS/.test(Uh()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var a,s;const e=(null==(a=window.visualViewport)?void 0:a.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{hv--,0===hv&&mv()}}),[n]),B.createElement("div",Sg({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function vv(e){return _h(e.target)&&"BUTTON"===e.target.tagName}function bv(e){return Jh(e)}function yv(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,p=B.useRef(),f=B.useRef(!1),h=B.useMemo((()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==s&&(Wh(t,!0)&&c||(!n||!l||o.current.openEvent&&d&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===s&&p.current?p.current=void 0:Wh(t,!0)&&c||(!n||!l||o.current.openEvent&&d&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,!e.defaultPrevented&&u&&!vv(e)&&(" "===e.key&&!bv(i)&&(e.preventDefault(),f.current=!0),"Enter"===e.key&&r(!(n&&l),e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!u||vv(e)||bv(i)||" "===e.key&&f.current&&(f.current=!1,r(!(n&&l),e.nativeEvent,"click"))}})),[o,i,s,c,u,r,n,d,l]);return B.useMemo((()=>a?{reference:h}:{}),[a,h])}const xv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wv={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Sv=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function _v(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:h}=t,m=Dg(),g=xg("function"==typeof l?l:()=>!1),v="function"==typeof l?g:l,b=B.useRef(!1),y=B.useRef(!1),{escapeKey:x,outsidePress:w}=Sv(f),{escapeKey:S,outsidePress:_}=Sv(h),E=B.useRef(!1),k=xg((e=>{var t;if(!n||!a||!s||"Escape"!==e.key||E.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=m?Ug(m.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),T=xg((e=>{var t;const n=()=>{var t;k(e),null==(t=Gh(e))||t.removeEventListener("keydown",n)};null==(t=Gh(e))||t.addEventListener("keydown",n)})),C=xg((e=>{var t;const n=b.current;b.current=!1;const a=y.current;if(y.current=!1,"click"===c&&a||n||"function"==typeof v&&!v(e))return;const s=Gh(e),l="["+jg("inert")+"]",u=Yh(o.floating).querySelectorAll(l);let d=Sh(s)?s:null;for(;d&&!Mh(d);){const e=Ah(d);if(Mh(e)||!Sh(e))break;d=e}if(u.length&&Sh(s)&&!function(e){return e.matches("html,body")}(s)&&!Fh(s,o.floating)&&Array.from(u).every((e=>!Fh(d,e))))return;if(_h(s)&&M){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===Dh(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,f=m&&Ug(m.nodesRef.current,p).some((t=>{var n;return qh(e,null==(n=t.context)?void 0:n.elements.floating)}));if(qh(e,o.floating)||qh(e,o.domReference)||f)return;const h=m?Ug(m.nodesRef.current,p):[];if(h.length>0){let e=!0;if(h.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),O=xg((e=>{var t;const n=()=>{var t;C(e),null==(t=Gh(e))||t.removeEventListener(c,n)};null==(t=Gh(e))||t.addEventListener(c,n)}));B.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),E.current=!0}function u(){e=window.setTimeout((()=>{E.current=!1}),Ih()?5:0)}const d=Yh(o.floating);s&&(d.addEventListener("keydown",S?T:k,S),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",u)),v&&d.addEventListener(c,_?O:C,_);let f=[];return p&&(Sh(o.domReference)&&(f=Ph(o.domReference)),Sh(o.floating)&&(f=f.concat(Ph(o.floating))),!Sh(o.reference)&&o.reference&&o.reference.contextElement&&(f=f.concat(Ph(o.reference.contextElement)))),f=f.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),f.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",S?T:k,S),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",u)),v&&d.removeEventListener(c,_?O:C,_),f.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,v,c,n,r,p,a,x,w,k,S,T,C,_,O]),B.useEffect((()=>{b.current=!1}),[v,c]);const I=B.useMemo((()=>({onKeyDown:k,[xv[d]]:e=>{u&&r(!1,e.nativeEvent,"reference-press")}})),[k,r,u,d]),M=B.useMemo((()=>({onKeyDown:k,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[wv[c]]:()=>{b.current=!0}})),[k,c]);return B.useMemo((()=>a?{reference:I,floating:M}:{}),[a,I,M])}function Ev(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Tg(),i=B.useRef({}),[a]=B.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),s=null!=Mg();const[l,c]=B.useState(r.reference),u=xg(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),d=B.useMemo((()=>({setPositionReference:c})),[]),p=B.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return B.useMemo((()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d})),[t,u,p,a,o,d])}function kv(e){void 0===e&&(e={});const{nodeId:t}=e,n=Ev({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=B.useState(null),[s,l]=B.useState(null),c=(null==o?void 0:o.domReference)||i,u=B.useRef(null),d=Dg();wg((()=>{c&&(u.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=B.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=B.useState(r);lg(p,r)||f(r);const[h,m]=B.useState(null),[g,v]=B.useState(null),b=B.useCallback((e=>{e!==S.current&&(S.current=e,m(e))}),[]),y=B.useCallback((e=>{e!==_.current&&(_.current=e,v(e))}),[]),x=i||h,w=a||g,S=B.useRef(null),_=B.useRef(null),E=B.useRef(u),k=null!=l,T=dg(l),C=dg(o),O=dg(c),I=B.useCallback((()=>{if(!S.current||!_.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),ag(S.current,_.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};M.current&&!lg(E.current,t)&&(E.current=t,ca.flushSync((()=>{d(t)})))}))}),[p,t,n,C,O]);sg((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const M=B.useRef(!1);sg((()=>(M.current=!0,()=>{M.current=!1})),[]),sg((()=>{if(x&&(S.current=x),w&&(_.current=w),x&&w){if(T.current)return T.current(x,w,I);I()}}),[x,w,I,T,k]);const D=B.useMemo((()=>({reference:S,floating:_,setReference:b,setFloating:y})),[b,y]),j=B.useMemo((()=>({reference:x,floating:w})),[x,w]),A=B.useMemo((()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=ug(j.floating,u.x),r=ug(j.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...cg(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,j.floating,u.x,u.y]);return B.useMemo((()=>({...u,update:I,refs:D,elements:j,floatingStyles:A})),[u,I,D,j,A])}({...e,elements:{...o,...s&&{reference:s}}}),f=B.useCallback((e=>{const t=Sh(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),p.refs.setReference(t)}),[p.refs]),h=B.useCallback((e=>{(Sh(e)||null===e)&&(u.current=e,a(e)),(Sh(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Sh(e))&&p.refs.setReference(e)}),[p.refs]),m=B.useMemo((()=>({...p.refs,setReference:h,setPositionReference:f,domReference:u})),[p.refs,h,f]),g=B.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),v=B.useMemo((()=>({...p,...r,refs:m,elements:g,nodeId:t})),[p,m,g,t,r]);return wg((()=>{r.dataRef.current.floatingContext=v;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=v)})),B.useMemo((()=>({...p,context:v,refs:m,elements:g})),[p,m,g,v])}function Tv(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=B.useRef(!1),u=B.useRef(),d=B.useRef(!0);B.useEffect((()=>{if(!s)return;const e=yh(a.domReference);function t(){!n&&_h(a.domReference)&&a.domReference===Lh(Yh(a.domReference))&&(c.current=!0)}function r(){d.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[a.domReference,n,s]),B.useEffect((()=>{if(s)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;("reference-press"===t||"escape-key"===t)&&(c.current=!0)}}),[o,s]),B.useEffect((()=>()=>{clearTimeout(u.current)}),[]);const p=B.useMemo((()=>({onPointerDown(e){Kh(e.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(e){if(c.current)return;const t=Gh(e.nativeEvent);if(l&&Sh(t))try{if($h()&&Hh())throw Error();if(!t.matches(":focus-visible"))return}catch{if(!d.current&&!Jh(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){c.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=Sh(t)&&t.hasAttribute(jg("focus-guard"))&&"outside"===t.getAttribute("data-type");u.current=window.setTimeout((()=>{var e;const s=Lh(a.domReference?a.domReference.ownerDocument:document);!t&&s===a.domReference||Fh(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,s)||Fh(a.domReference,s)||o||r(!1,n,"focus")}))}})),[i,a.domReference,r,l]);return B.useMemo((()=>s?{reference:p}:{}),[s,p])}const Cv="active",Ov="selected";function Iv(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Cv]:t,[Ov]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[sv]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>(t&&Object.entries(t).forEach((t=>{let[n,i]=t;if(!o||![Cv,Ov].includes(n))if(0===n.indexOf("on")){var a;if(r.has(n)||r.set(n,[]),"function"==typeof i)null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))}}else e[n]=i})),e)),{})}}function Mv(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=B.useCallback((t=>Iv(t,e,"reference")),t),i=B.useCallback((t=>Iv(t,e,"floating")),n),a=B.useCallback((t=>Iv(t,e,"item")),r);return B.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}const Dv=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function jv(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=null!=(n=Dv.get(a))?n:a,l=Tg(),c=null!=Mg(),u=B.useMemo((()=>"tooltip"===s||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===s?"dialog":s,"aria-controls":r?o:void 0,..."listbox"===s&&{role:"combobox"},..."menu"===s&&{id:l},..."menu"===s&&c&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}}),[s,o,c,r,l,a]),d=B.useMemo((()=>{const e={id:o,...s&&{role:s}};return"tooltip"===s||"label"===a?e:{...e,..."menu"===s&&{"aria-labelledby":l}}}),[s,o,l,a]),p=B.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[o,a]);return B.useMemo((()=>i?{reference:u,floating:d,item:p}:{}),[i,u,d,p])}function Av(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e<i;a=e++){const[i,s]=t[e]||[0,0],[l,c]=t[a]||[0,0];s>=r!=c>=r&&n<=(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}function Nv(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:p,nodeId:f,tree:h}=e;return function(e){function m(){clearTimeout(o),p()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:v}=e,b=[g,v],y=Gh(e),x="mouseleave"===e.type,w=Fh(d.floating,y),S=Fh(d.domReference,y),_=d.domReference.getBoundingClientRect(),E=d.floating.getBoundingClientRect(),k=u.split("-")[0],T=n>E.right-E.width/2,C=c>E.bottom-E.height/2,O=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(b,_),I=E.width>_.width,M=E.height>_.height,D=(I?_:E).left,j=(I?_:E).right,A=(M?_:E).top,N=(M?_:E).bottom;if(w&&(i=!0,!x))return;if(S&&(i=!1),S&&!x)return void(i=!0);if(x&&Sh(e.relatedTarget)&&Fh(d.floating,e.relatedTarget)||h&&Ug(h.nodesRef.current,f).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===k&&c>=_.bottom-1||"bottom"===k&&c<=_.top+1||"left"===k&&n>=_.right-1||"right"===k&&n<=_.left+1)return m();let P=[];switch(k){case"top":P=[[D,_.top+1],[D,E.bottom-1],[j,E.bottom-1],[j,_.top+1]];break;case"bottom":P=[[D,E.top+1],[D,_.bottom-1],[j,_.bottom-1],[j,E.top+1]];break;case"left":P=[[E.right-1,N],[E.right-1,A],[_.left+1,A],[_.left+1,N]];break;case"right":P=[[_.right-1,N],[_.right-1,A],[E.left+1,A],[E.left+1,N]]}if(!Av([g,v],P)){if(i&&!O)return m();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,c=Math.sqrt(o*o+i*i)/r;return a=e,s=t,l=n,c}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}Av([g,v],function(e){let[n,r]=e;switch(k){case"top":return[[I?n+t/2:T?n+4*t:n-4*t,r+t+1],[I?n-t/2:T?n+4*t:n-4*t,r+t+1],[E.left,T||I?E.bottom-t:E.top],[E.right,T?I?E.bottom-t:E.top:E.bottom-t]];case"bottom":return[[I?n+t/2:T?n+4*t:n-4*t,r-t],[I?n-t/2:T?n+4*t:n-4*t,r-t],[E.left,T||I?E.top+t:E.bottom],[E.right,T?I?E.top+t:E.bottom:E.top+t]];case"left":{const e=[n+t+1,M?r+t/2:C?r+4*t:r-4*t],o=[n+t+1,M?r-t/2:C?r+4*t:r-4*t];return[[C||M?E.right-t:E.left,E.top],[C?M?E.right-t:E.left:E.right-t,E.bottom],e,o]}case"right":return[[n-t,M?r+t/2:C?r+4*t:r-4*t],[n-t,M?r-t/2:C?r+4*t:r-4*t],[C||M?E.left+t:E.right,E.top],[C?M?E.left+t:E.right:E.left+t,E.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:n},c}const Pv={tooltip:"tooltip-413196ab","tooltip--none":"tooltip--none-01bd521a","tooltip--small":"tooltip--small-f23b2c64","tooltip--medium":"tooltip--medium-33ed6e9a","tooltip--large":"tooltip--large-84d7b683",tooltip__arrow:"tooltip__arrow-7d8214bc","tooltip__arrow--stroke":"tooltip__arrow--stroke-092e3c3e",tooltip__trigger:"tooltip__trigger-f6422045","tooltip__trigger--click":"tooltip__trigger--click-bb6703b1"},Rv=10,Lv=B.createContext({open:!1,isMounted:!1,openWith:"hover",reference:()=>null,floating:()=>null,focusManager:{},arrowRef:{current:null},x:null,y:null,strategy:"absolute",getReferenceProps:()=>({}),getFloatingProps:()=>({}),arrow:{x:0,y:0,centerOffset:0},placement:"top",context:{}}),Fv=e=>{const{getLabel:t}=IY(),n=dY(),{children:r,placement:o="bottom",openWith:i=(n?"click":"hover"),defaultOpen:a=!1,open:s,onToggle:l,role:c="tooltip",offset:u=Rv}=e,{order:d=["reference","content"],modal:p=!1,initialFocus:f=-1,...h}=e.focusManager??{},{visuallyHiddenDismiss:m=!!p&&t("close")}=h??{},[g,v]=B.useState(a),b=B.useRef(null),y=l&&typeof s<"u"?s:g,x=iY(),{x:w,y:S,refs:_,strategy:E,context:k,middlewareData:T,placement:C}=kv({placement:o,open:y,onOpenChange:e=>{typeof s>"u"&&v(e),null==l||l(e)},middleware:[fg(u),mg(),hg({padding:8}),gg({element:b,padding:4})],whileElementsMounted:tg}),{getReferenceProps:O,getFloatingProps:I}=Mv([Rg(k,{handleClose:Nv(),enabled:"hover"===i}),yv(k),Tv(k,{enabled:"hover"===i}),jv(k,{role:c}),_v(k,{outsidePressEvent:"click"===i?"mousedown":"pointerdown"})]);return(0,cn.jsx)(Lv.Provider,{value:{open:y,isMounted:x,openWith:i,reference:_.setReference,floating:_.setFloating,arrowRef:b,focusManager:{order:d,initialFocus:f,modal:p,visuallyHiddenDismiss:m,...h},x:w,y:S,strategy:E,getReferenceProps:O,getFloatingProps:I,arrow:{...T.arrow},context:k,placement:C},children:r})},Uv=e=>{const{children:t,maxWidth:n="medium",cardProps:r,className:o}=e,{open:i,x:a,y:s,strategy:l,focusManager:c,floating:u,arrowRef:d,getFloatingProps:p,placement:f,context:h}=B.useContext(Lv),[m,g]=lh(null==r?void 0:r.border),v=()=>m&&g?`var(--color-${g})`:"none",b="none"!==v();return(0,cn.jsx)(iv,{"data-name":"tooltip",children:(()=>{const e=(0,cn.jsx)(fv,{...c,context:h,children:(0,cn.jsxs)("div",{...p({ref:u,style:{position:l,left:a??0,top:s??0},className:ua(Pv.tooltip,o,{[Pv[`tooltip--${n}`]]:n})}),"data-placement":f,children:[(0,cn.jsx)(Cg,{ref:e=>d.current=e,context:h,fill:null!=r&&r.background?`var(--color-${null==r?void 0:r.background})`:"var(--color-bg-default)",stroke:v(),strokeWidth:b?4:0,className:ua(Pv.tooltip__arrow,{[Pv["tooltip__arrow--stroke"]]:b}),height:7,width:14}),(0,cn.jsx)(uh,{padding:.5,borderless:!0,...r,children:(0,cn.jsx)(ph,{children:t})})]})});return i?e:null})()})},Bv=e=>{const{children:t}=e,{getLabel:n}=IY(),{getReferenceProps:r,reference:o,openWith:i}=B.useContext(Lv),a=vg([o,t.ref]);return B.cloneElement(t,r({ref:a,tabIndex:0,label:t.type===Vf?n("tooltip.icon-trigger"):void 0,...t.props,className:ua(Pv.tooltip__trigger,{[Pv["tooltip__trigger--click"]]:"click"===i},t.props.className)}))},zv="header__dropdown-cb8faff9",Kv="header__dropdown--open-03680708",$v=e=>{const{children:t,triggerProps:n,defaultOpen:r,open:o,onToggle:i,shouldAnimate:a,tooltipProps:s}=e,[l,c]=B.useState(r),[u,d]=B.useState(Rv),{headerElement:p}=B.useContext(ih),f=B.useRef(null);B.useEffect((()=>{if(null!=p&&p.current&&null!=f&&f.current){const e=p.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=e.bottom-t.bottom;d(n)}}),[p,f,t]);const h=void 0!==o?o:l;return(0,cn.jsxs)(Fv,{offset:u,openWith:"click",role:"dialog",onToggle:e=>{c(e),null==i||i(e)},open:h,children:[(0,cn.jsx)(Bv,{children:(0,cn.jsx)(Gf,{...n,ref:f,className:ua(zv,n.className,{[Kv]:a&&h})})}),(0,cn.jsx)(Uv,{...s,cardProps:{...null==s?void 0:s.cardProps,border:"top-primary-active-subtle",borderless:!1,background:"bg-muted"},children:t})]})},Vv={modal:"modal-11cfca5e","modal--center":"modal--center-b671c09c","modal--no-overlay":"modal--no-overlay-a990d10a",modal__inner:"modal__inner-10a95cee","modal--right":"modal--right-d7b9213c","modal--bottom":"modal--bottom-b9033478","modal--10":"modal--10-bc4c5908","modal--8":"modal--8-46477dbb","modal--6":"modal--6-cd8246bc",modal__card:"modal__card-f5ca2013","close-button":"close-button-9544f148"},Hv=B.createContext({isOpen:!1,reference:()=>null,floating:()=>null,getReferenceProps:()=>({}),getFloatingProps:()=>({}),closeModal:()=>null,context:{},isDismissable:!0,escapeKey:!0,outsidePress:!0}),Wv=e=>{const{children:t,defaultOpen:n=!1,onToggle:r,isDismissable:o=!0,escapeKey:i=!0,outsidePress:a=!0}=e,[s,l]=B.useState(n),c=r&&typeof e.open<"u"?e.open:s,{refs:u,context:d}=kv({open:c,onOpenChange:e=>e?m():h()}),{getReferenceProps:p,getFloatingProps:f}=Mv([yv(d),jv(d),_v(d,{enabled:o,escapeKey:i,outsidePress:a})]),h=()=>{typeof e.open>"u"&&l(!1),null==r||r(!1)},m=()=>{typeof e.open>"u"&&l(!0),null==r||r(!0)};return(0,cn.jsx)(Hv.Provider,{value:{isOpen:c,reference:u.setReference,floating:u.setFloating,getReferenceProps:p,getFloatingProps:f,closeModal:h,context:d,isDismissable:o,escapeKey:i,outsidePress:a},children:t})},Yv=e=>{const{children:t}=e,{closeModal:n}=B.useContext(Hv);return B.cloneElement(t,{onClick:()=>{var e,r;null==(r=(e=t.props).onClick)||r.call(e),n()}})},qv=e=>{const{children:t,size:n=6,cardProps:r={},hideCloseButton:o,position:i,lockScroll:a=!0,trapFocus:s=!0,returnFocus:l=!0,overlay:c,visuallyHiddenDismiss:u=!1}=e,{getLabel:d}=IY(),p=e["aria-labelledby"],f=e["aria-describedby"],{isOpen:h,floating:m,getFloatingProps:g,context:v,isDismissable:b}=B.useContext(Hv),y=B.useMemo((()=>{let e=!1;const n=e=>e.type.displayName;return o?t:B.Children.map(t,((t,r)=>e||!B.isValidElement(t)||"CardHeader"!==n(t)&&"CardContent"!==n(t)?t:(e=!0,B.cloneElement(t,{...t.props,children:(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(Yv,{children:(0,cn.jsx)(VY,{size:"large",className:Vv["close-button"]})}),t.props.children]})}))))}),[t,d,o]);return(0,cn.jsx)(iv,{"data-name":"modal",children:h&&(0,cn.jsx)(gv,{lockScroll:a,className:ua(Vv.modal,Vv[`modal--${n}`],Vv[`modal--${i}`],{[Vv["modal--no-overlay"]]:"none"===c}),children:(0,cn.jsx)(fv,{context:v,closeOnFocusOut:!s&&b,visuallyHiddenDismiss:u?d("modal.close"):void 0,returnFocus:l,modal:s,children:(0,cn.jsx)("div",{...g({ref:m,className:Vv.modal__inner,"aria-labelledby":p,"aria-describedby":f,"aria-modal":s}),children:(0,cn.jsx)(uh,{...r,className:ua(Vv.modal__card,null==r?void 0:r.className),children:y})})})})})},Gv=e=>{const{children:t}=e,{getReferenceProps:n,reference:r}=B.useContext(Hv);return B.cloneElement(t,n({ref:r,...t.props}))},Jv="header-modal__close-824b7dc8",Xv=e=>{const{triggerProps:t,defaultOpen:n,open:r,onToggle:o,children:i,ariaLabelledby:a}=e,{getLabel:s}=IY();return(0,cn.jsxs)(Wv,{defaultOpen:n,open:r,onToggle:o,children:[(0,cn.jsx)(Gv,{children:(0,cn.jsx)(Gf,{...t})}),(0,cn.jsx)(qv,{"aria-labelledby":a,hideCloseButton:!0,position:"right",children:(0,cn.jsxs)(ph,{padding:0,children:[(0,cn.jsx)(uh,{borderless:!0,background:"primary-highlight-subtle",padding:.5,borderRadius:!1,children:(0,cn.jsx)(ph,{children:(0,cn.jsx)(Qa,{element:"div",modifiers:"right",children:(0,cn.jsx)(Yv,{children:(0,cn.jsx)(VY,{title:s("modal.close"),size:"large",className:Jv})})})})}),(0,cn.jsx)(uh,{border:"top-border-default",borderRadius:!1,padding:0,children:(0,cn.jsx)(ph,{children:i})})]})})]})},Zv=e=>{const{languages:t}=e,n=Ja(["desktop","tablet"]),{getLabel:r}=IY(),[o,i]=B.useState(!1),a=null==t?void 0:t.find((e=>e.isSelected)),s={children:null==a?void 0:a.label,"aria-label":`${r("header.select-lang")} ${(null==a?void 0:a["aria-label"])??(null==a?void 0:a.label)}`,visualType:n?"link":"tertiary",iconRight:n?{name:"expand_more",color:"primary",size:24}:void 0},l=({isSelected:e,onClick:t,label:n,"aria-label":r},o=!0)=>(0,cn.jsx)(Gf,{visualType:o?"link":e?"primary":"tertiary","aria-current":e,"aria-label":r,onClick:()=>(e=>{null==e||e({onToggle:i})})(t),children:n}),c=(0,cn.jsxs)("div",{children:[(0,cn.jsx)(Qa,{color:"muted",modifiers:"small",children:r("header.select-lang")}),(0,cn.jsx)($v,{shouldAnimate:!0,open:o,onToggle:i,tooltipProps:{cardProps:{padding:1}},triggerProps:s,children:(0,cn.jsx)(XY,{verticalSpacing:{size:.75},element:"ul",children:(null==t?void 0:t.map((e=>(0,cn.jsx)(JY,{children:l(e)},e.label))))||[]})})]}),u=(0,cn.jsx)(Xv,{ariaLabelledby:"header-language-modal-label",open:o,onToggle:i,triggerProps:s,children:(0,cn.jsx)(uh,{borderless:!0,children:(0,cn.jsxs)(ph,{children:[(0,cn.jsx)(es,{id:"header-language-modal-label",className:"sr-only",children:r("header.select-lang")}),(0,cn.jsx)(PY,{alignItems:"center",element:"ul",children:null==t?void 0:t.map((e=>(0,cn.jsx)(RY,{width:"auto",children:l(e,!1)},e.label)))})]})})});return n?c:u};Zv.displayName="HeaderLanguage";const Qv={tag:"tag-de7cd582","tag--default":"tag--default-77443d27","tag--type-ghost":"tag--type-ghost-80dfabdb","tag--large":"tag--large-81928b3e","tag--color-default":"tag--color-default-9aabde81","tag--type-default":"tag--type-default-328f991f","tag--type-secondary":"tag--type-secondary-495a8ed8","tag--color-accent":"tag--color-accent-798040f8","tag--type-borderless":"tag--type-borderless-1c5fcca7","tag--type-invisible":"tag--type-invisible-c8d11eb5","tag--icon-only":"tag--icon-only-1f412944","tag--disabled":"tag--disabled-06b14065","tag--with-arrow":"tag--with-arrow-a7d0d694","tag--color-primary":"tag--color-primary-d4a64cd4","tag--color-positive":"tag--color-positive-f823c0df","tag--color-warning":"tag--color-warning-3efdfe52","tag--color-important":"tag--color-important-81499159","tag--status-error":"tag--status-error-30c88b17","tag--status-success":"tag--status-success-e31be3e2","tag--status-inactive":"tag--status-inactive-09947563","tag--rounded":"tag--rounded-e9419f54"},eb=(0,B.forwardRef)(((e,t)=>{const{children:n,size:r,className:o,title:i,color:a="default",status:s,type:l="default",rounded:c=!1,hasArrow:u=!1,isLoading:d=!1,isDisabled:p=!1,iconOnly:f=!1,id:h}=e,m=d?rq:i?"abbr":"div",g=ua(Qv.tag,o,{[Qv[`tag--${r}`]]:r},{[Qv[`tag--type-${l}`]]:l},{[Qv[`tag--color-${a}`]]:a},{[Qv[`tag--status-${s}`]]:s},{[Qv["tag--rounded"]]:c},{[Qv["tag--icon-only"]]:f},{[Qv["tag--disabled"]]:p},{[Qv["tag--with-arrow"]]:u&&!c});return(0,cn.jsx)(m,{id:h,"data-name":"tag",className:g,title:i,ref:t,children:n})}));eb.displayName="Tag";const tb="header-role-collapse-7664165f",nb="header-role-wrapper-c65bcd63",rb="header-role-children-3fdd2c2c",ob=e=>{const{renderModal:t=!1,...n}=e,[r,o]=B.useState(!1);return t?(0,cn.jsx)(ab,{...n,open:r,onToggle:o}):(0,cn.jsx)(ib,{...n,open:r,onToggle:o})};ob.displayName="HeaderRole";const ib=e=>{const{getLabel:t}=IY(),{children:n,open:r,onToggle:o,primaryInfo:i,secondaryInfo:a,label:s=t("header.role-label")}=e,l="function"==typeof n?n({onToggle:o}):n,c=(0,cn.jsx)($v,{shouldAnimate:!0,open:r,onToggle:o,tooltipProps:{cardProps:{padding:0},maxWidth:"medium"},triggerProps:{children:i,"aria-label":`${s??""} ${a??""} ${i??""}`,visualType:"link",iconRight:{name:"expand_more",color:"primary",size:24}},children:(0,cn.jsx)("div",{className:nb,children:(0,cn.jsx)(QY,{fadeSize:0,children:(0,cn.jsx)("div",{className:rb,children:l})})})});return(0,cn.jsxs)("div",{children:[s===t("header.role-label")?(0,cn.jsx)("div",{children:(0,cn.jsx)(eb,{color:"primary",type:"secondary",children:s})}):(0,cn.jsxs)(Qa,{color:"muted",modifiers:["bold","small"],children:[s,!!a&&(0,cn.jsxs)(cn.Fragment,{children:[" ",(0,cn.jsxs)(Qa,{element:"span",modifiers:["small","normal"],children:[(0,cn.jsx)("span",{style:{color:"var(--color-border-default)"},children:"|"})," ",a]})]})]}),l?c:i]})},ab=e=>{const{getLabel:t}=IY(),{children:n,open:r,onToggle:o,primaryInfo:i,secondaryInfo:a,label:s=t("header.role-label")}=e,l=(0,cn.jsxs)(Qa,{element:"span",color:"muted",modifiers:"bold",children:[s," ",i,a&&(0,cn.jsx)(Qa,{element:"span",modifiers:"normal",children:` | ${a}`})]}),c="function"==typeof n?n({onToggle:o}):n;return(0,cn.jsx)(uh,{background:"bg-muted",borderRadius:!1,borderless:!0,children:(0,cn.jsx)(ph,{padding:0,children:c?(0,cn.jsx)(rh,{id:"role-collapse",open:r,onToggle:o,className:tb,hideCollapseText:!0,title:l,children:(0,cn.jsx)("div",{className:nb,children:(0,cn.jsx)(QY,{fadeSize:0,children:(0,cn.jsx)("div",{className:rb,children:c})})})}):(0,cn.jsx)("div",{className:rb,children:l})})})},sb=e=>{const{children:t,onActionClick:n,closeOnAction:r=!0,iconName:o}=e,[i,a]=B.useState(!1),s=Ja(["desktop"]),l=Ja(["mobile"]),{getLabel:c}=IY(),{headerType:u}=B.useContext(ih),d={children:c("header.settings"),visualType:"tertiary",icon:{name:o||"account_circle",color:"primary",size:36}};if("public"===u)return(0,cn.jsx)(Gf,{icon:l?{name:"login",color:"primary",size:24}:void 0,visualType:l?"tertiary":"primary",onClick:n,children:c("header.login")});const p="function"==typeof t?t({onToggle:a}):t;if(!p)return(0,cn.jsx)(Gf,{icon:{name:"logout",color:"primary",size:24},visualType:"tertiary",onClick:n,children:c("header.logout")});const f=()=>(0,cn.jsx)(Gf,{onClick:()=>{n(),r&&a(!1)},iconLeft:"logout",visualType:"link",children:c("header.logout")}),h=(0,cn.jsx)($v,{open:i,onToggle:a,tooltipProps:{cardProps:{padding:1}},triggerProps:d,children:(0,cn.jsxs)(BY,{size:1,children:[p,(0,cn.jsx)(iq,{isStretched:!0}),(0,cn.jsx)(f,{})]})}),m=(0,cn.jsxs)(Xv,{open:i,onToggle:a,ariaLabelledby:"header-settings-modal-label",triggerProps:d,children:[(0,cn.jsx)(es,{id:"header-settings-modal-label",className:"sr-only",children:c("header.settings")}),p,(0,cn.jsx)(iq,{isStretched:!0}),(0,cn.jsx)(uh,{borderless:!0,children:(0,cn.jsx)(ph,{children:(0,cn.jsx)(f,{})})}),(0,cn.jsx)(iq,{isStretched:!0})]});return s?h:m};sb.displayName="HeaderSettings";B.createContext({activeStep:0,allowStepLabelClick:!0,handleActiveStepChange:()=>null});function lb(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=lb(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function cb(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=lb(e))&&(r&&(r+=" "),r+=t);return r}function ub(e){return Ad(e)}function db(e){return Au("MuiSvgIcon",e)}Nu("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const pb=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],fb=Uf("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Ec(n.color)}`],t[`fontSize${Ec(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var n,r,o,i,a,s,l,c,u,d,p,f,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=e.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=e.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=e.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:null!=(d=null==(p=(e.vars||e).palette)||null==(p=p[t.color])?void 0:p.main)?d:{action:null==(f=(e.vars||e).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.disabled,inherit:void 0}[t.color]}})),hb=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:i="inherit",component:a="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:u,viewBox:d="0 0 24 24"}=n,p=vs(n,pb),f=B.isValidElement(r)&&"svg"===r.type,h=ts({},n,{color:i,component:a,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d,hasSvgAsChild:f}),m={};c||(m.viewBox=d);const g=(e=>{const{color:t,fontSize:n,classes:r}=e;return Ed({root:["root","inherit"!==t&&`color${Ec(t)}`,`fontSize${Ec(n)}`]},db,r)})(h);return(0,cn.jsxs)(fb,ts({as:a,className:Du(g.root,o),focusable:"false",color:l,"aria-hidden":!u||void 0,role:u?"img":void 0,ref:t},m,p,f&&r.props,{ownerState:h,children:[f?r.props.children:r,u?(0,cn.jsx)("title",{children:u}):null]}))}));function mb(e,t){function n(n,r){return(0,cn.jsx)(hb,ts({"data-testid":`${t}Icon`,ref:r},n,{children:e}))}return n.muiName=hb.muiName,B.memo(B.forwardRef(n))}function gb(e,t){return(gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vb(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gb(e,t)}function bb(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}hb.muiName="SvgIcon";const yb=!1;const xb=B.createContext(null);var wb=function(e){return e.scrollTop},Sb="unmounted",_b="exited",Eb="entering",kb="entered",Tb="exiting",Cb=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=_b,r.appearStatus=Eb):o=kb:o=t.unmountOnExit||t.mountOnEnter?Sb:_b,r.state={status:o},r.nextCallback=null,r}vb(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Sb?{status:_b}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Eb&&n!==kb&&(t=Eb):(n===Eb||n===kb)&&(t=Tb)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Eb){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ca.findDOMNode(this);n&&wb(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===_b&&this.setState({status:Sb})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[ca.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||yb?this.safeSetState({status:kb},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:Eb},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:kb},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ca.findDOMNode(this);t&&!yb?(this.props.onExit(r),this.safeSetState({status:Tb},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:_b},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:_b},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ca.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Sb)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=vs(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return B.createElement(xb.Provider,{value:null},"function"==typeof n?n(e,r):B.cloneElement(B.Children.only(n),r))},t}(B.Component);function Ob(){}Cb.contextType=xb,Cb.propTypes={},Cb.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ob,onEntering:Ob,onEntered:Ob,onExit:Ob,onExiting:Ob,onExited:Ob},Cb.UNMOUNTED=Sb,Cb.EXITED=_b,Cb.ENTERING=Eb,Cb.ENTERED=kb,Cb.EXITING=Tb;var Ib=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=bb(e.className,t):e.setAttribute("class",bb(e.className&&e.className.baseVal||"",t))}(e,t)}))},Mb=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}vb(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&wb(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return function(e,t){e.classList?e.classList.add(t):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}(e,t)}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&Ib(e,r),o&&Ib(e,o),i&&Ib(e,i)},n.render=function(){var e=this.props;e.classNames;var t=vs(e,["classNames"]);return B.createElement(Cb,ts({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(B.Component);function Db(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jb(e,t){var n=Object.create(null);return e&&B.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,B.isValidElement)(e)?t(e):e}(e)})),n}function Ab(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Nb(e,t){return jb(e.children,(function(n){return(0,B.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Ab(n,"appear",e),enter:Ab(n,"enter",e),exit:Ab(n,"exit",e)})}))}function Pb(e,t,n){var r=jb(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var c=r[l][a];s[r[l][a]]=n(c)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}(t,r);return Object.keys(o).forEach((function(i){var a=o[i];if((0,B.isValidElement)(a)){var s=i in t,l=i in r,c=t[i],u=(0,B.isValidElement)(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&(0,B.isValidElement)(c)&&(o[i]=(0,B.cloneElement)(a,{onExited:n.bind(null,a),in:c.props.in,exit:Ab(a,"exit",e),enter:Ab(a,"enter",e)})):o[i]=(0,B.cloneElement)(a,{in:!1}):o[i]=(0,B.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:Ab(a,"exit",e),enter:Ab(a,"enter",e)})}})),o}Mb.defaultProps={classNames:""},Mb.propTypes={};var Rb=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Lb=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(Db(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}vb(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Nb(e,r):Pb(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=jb(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=ts({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=vs(e,["component","childFactory"]),o=this.state.contextValue,i=Rb(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?B.createElement(xb.Provider,{value:o},i):B.createElement(xb.Provider,{value:o},B.createElement(t,r,i))},t}(B.Component);Lb.propTypes={},Lb.defaultProps={component:"div",childFactory:function(e){return e}};const Fb=e=>e.scrollTop;function Ub(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}function Bb(e){return Au("MuiPaper",e)}Nu("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const zb=["className","component","elevation","square","variant"],Kb=Uf("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return ts({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&ts({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${$d("#fff",Bf(t.elevation))}, ${$d("#fff",Bf(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),$b=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:s="elevation"}=n,l=vs(n,zb),c=ts({},n,{component:o,elevation:i,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return Ed({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Bb,o)})(c);return(0,cn.jsx)(Kb,ts({as:o,ownerState:c,className:Du(u.root,r),ref:t},l))}));const Vb=Nu("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Hb=["center","classes","className"];let Wb,Yb,qb,Gb,Jb=e=>e;const Xb=tc(Wb||(Wb=Jb`
|
|
3
|
+
0% {
|
|
4
|
+
transform: scale(0);
|
|
5
|
+
opacity: 0.1;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
100% {
|
|
9
|
+
transform: scale(1);
|
|
10
|
+
opacity: 0.3;
|
|
11
|
+
}
|
|
12
|
+
`)),Zb=tc(Yb||(Yb=Jb`
|
|
13
|
+
0% {
|
|
14
|
+
opacity: 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
100% {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
}
|
|
20
|
+
`)),Qb=tc(qb||(qb=Jb`
|
|
21
|
+
0% {
|
|
22
|
+
transform: scale(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
50% {
|
|
26
|
+
transform: scale(0.92);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
100% {
|
|
30
|
+
transform: scale(1);
|
|
31
|
+
}
|
|
32
|
+
`)),ey=Uf("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),ty=Uf((function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=B.useState(!1),p=Du(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),f={width:a,height:a,top:-a/2+i,left:-a/2+o},h=Du(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),B.useEffect((()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}}),[l,s,c]),(0,cn.jsx)("span",{className:p,style:f,children:(0,cn.jsx)("span",{className:h})})}),{name:"MuiTouchRipple",slot:"Ripple"})(Gb||(Gb=Jb`
|
|
33
|
+
opacity: 0;
|
|
34
|
+
position: absolute;
|
|
35
|
+
|
|
36
|
+
&.${0} {
|
|
37
|
+
opacity: 0.3;
|
|
38
|
+
transform: scale(1);
|
|
39
|
+
animation-name: ${0};
|
|
40
|
+
animation-duration: ${0}ms;
|
|
41
|
+
animation-timing-function: ${0};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.${0} {
|
|
45
|
+
animation-duration: ${0}ms;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& .${0} {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
display: block;
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
background-color: currentColor;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
& .${0} {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
animation-name: ${0};
|
|
60
|
+
animation-duration: ${0}ms;
|
|
61
|
+
animation-timing-function: ${0};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
& .${0} {
|
|
65
|
+
position: absolute;
|
|
66
|
+
/* @noflip */
|
|
67
|
+
left: 0px;
|
|
68
|
+
top: 0;
|
|
69
|
+
animation-name: ${0};
|
|
70
|
+
animation-duration: 2500ms;
|
|
71
|
+
animation-timing-function: ${0};
|
|
72
|
+
animation-iteration-count: infinite;
|
|
73
|
+
animation-delay: 200ms;
|
|
74
|
+
}
|
|
75
|
+
`),Vb.rippleVisible,Xb,550,(({theme:e})=>e.transitions.easing.easeInOut),Vb.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),Vb.child,Vb.childLeaving,Zb,550,(({theme:e})=>e.transitions.easing.easeInOut),Vb.childPulsate,Qb,(({theme:e})=>e.transitions.easing.easeInOut)),ny=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=vs(n,Hb),[s,l]=B.useState([]),c=B.useRef(0),u=B.useRef(null);B.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[s]);const d=B.useRef(!1),p=ud(),f=B.useRef(null),h=B.useRef(null),m=B.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;l((e=>[...e,(0,cn.jsx)(ty,{classes:{ripple:Du(o.ripple,Vb.ripple),rippleVisible:Du(o.rippleVisible,Vb.rippleVisible),ripplePulsate:Du(o.ripplePulsate,Vb.ripplePulsate),child:Du(o.child,Vb.child),childLeaving:Du(o.childLeaving,Vb.childLeaving),childPulsate:Du(o.childPulsate,Vb.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},c.current)])),c.current+=1,u.current=a}),[o]),g=B.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:h.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},p.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,m,p]),v=B.useCallback((()=>{g({},{pulsate:!0})}),[g]),b=B.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void p.start(0,(()=>{b(e,t)}));f.current=null,l((e=>e.length>0?e.slice(1):e)),u.current=t}),[p]);return B.useImperativeHandle(t,(()=>({pulsate:v,start:g,stop:b})),[v,g,b]),(0,cn.jsx)(ey,ts({className:Du(Vb.root,o.root,i),ref:h},a,{children:(0,cn.jsx)(Lb,{component:null,exit:!0,children:s})}))}));function ry(e){return Au("MuiButtonBase",e)}const oy=Nu("MuiButtonBase",["root","disabled","focusVisible"]),iy=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],ay=Uf("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${oy.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),sy=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:h,onContextMenu:m,onDragLeave:g,onFocus:v,onFocusVisible:b,onKeyDown:y,onKeyUp:x,onMouseDown:w,onMouseLeave:S,onMouseUp:_,onTouchEnd:E,onTouchMove:k,onTouchStart:T,tabIndex:C=0,TouchRippleProps:O,touchRippleRef:I,type:M}=n,D=vs(n,iy),j=B.useRef(null),A=B.useRef(null),N=ad(A,I),{isFocusVisibleRef:P,onFocus:R,onBlur:L,ref:F}=yd(),[U,z]=B.useState(!1);l&&U&&z(!1),B.useImperativeHandle(r,(()=>({focusVisible:()=>{z(!0),j.current.focus()}})),[]);const[K,$]=B.useState(!1);B.useEffect((()=>{$(!0)}),[]);const V=K&&!c&&!l;function H(e,t,n=u){return id((r=>(t&&t(r),!n&&A.current&&A.current[e](r),!0)))}B.useEffect((()=>{U&&d&&!c&&K&&A.current.pulsate()}),[c,d,U,K]);const W=H("start",w),Y=H("stop",m),q=H("stop",g),G=H("stop",_),J=H("stop",(e=>{U&&e.preventDefault(),S&&S(e)})),X=H("start",T),Z=H("stop",E),Q=H("stop",k),ee=H("stop",(e=>{L(e),!1===P.current&&z(!1),f&&f(e)}),!1),te=id((e=>{j.current||(j.current=e.currentTarget),R(e),!0===P.current&&(z(!0),b&&b(e)),v&&v(e)})),ne=()=>{const e=j.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},re=B.useRef(!1),oe=id((e=>{d&&!re.current&&U&&A.current&&" "===e.key&&(re.current=!0,A.current.stop(e,(()=>{A.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),y&&y(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!l&&(e.preventDefault(),h&&h(e))})),ie=id((e=>{d&&" "===e.key&&A.current&&U&&!e.defaultPrevented&&(re.current=!1,A.current.stop(e,(()=>{A.current.pulsate(e)}))),x&&x(e),h&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&h(e)}));let ae=s;"button"===ae&&(D.href||D.to)&&(ae=p);const se={};"button"===ae?(se.type=void 0===M?"button":M,se.disabled=l):(!D.href&&!D.to&&(se.role="button"),l&&(se["aria-disabled"]=l));const le=ad(t,F,j),ce=ts({},n,{centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:C,focusVisible:U}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Ed({root:["root",t&&"disabled",n&&"focusVisible"]},ry,o);return n&&r&&(i.root+=` ${r}`),i})(ce);return(0,cn.jsxs)(ay,ts({as:ae,className:Du(ue.root,a),ownerState:ce,onBlur:ee,onClick:h,onContextMenu:Y,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:W,onMouseLeave:J,onMouseUp:G,onDragLeave:q,onTouchEnd:Z,onTouchMove:Q,onTouchStart:X,ref:le,tabIndex:l?-1:C,type:M},se,D,{children:[i,V?(0,cn.jsx)(ny,ts({ref:N,center:o},O)):null]}))}));function ly(e){return Au("MuiIconButton",e)}const cy=Nu("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),uy=["edge","children","className","color","disabled","disableFocusRipple","size"],dy=Uf(sy,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Ec(n.color)}`],n.edge&&t[`edge${Ec(n.edge)}`],t[`size${Ec(n.size)}`]]}})((({theme:e,ownerState:t})=>ts({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:$d(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return ts({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&ts({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":ts({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$d(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${cy.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),py=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=vs(n,uy),d=ts({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),p=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e;return Ed({root:["root",n&&"disabled","default"!==r&&`color${Ec(r)}`,o&&`edge${Ec(o)}`,`size${Ec(i)}`]},ly,t)})(d);return(0,cn.jsx)(dy,ts({className:Du(p.root,i),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},u,{ownerState:d,children:o}))}));function fy(e){return Au("MuiTypography",e)}Nu("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const hy=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],my=Uf("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${Ec(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>ts({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),gy={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},vy={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},by=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiTypography"}),r=(e=>vy[e]||e)(n.color),o=Tu(ts({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=gy}=o,f=vs(o,hy),h=ts({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=s||(u?"p":p[d]||gy[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Ed({root:["root",i,"inherit"!==e.align&&`align${Ec(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},fy,a)})(h);return(0,cn.jsx)(my,ts({as:m,ref:t,ownerState:h,className:Du(g.root,a)},f))}));var yy={};Object.defineProperty(yy,"__esModule",{value:!0});var xy=yy.default=void 0,wy=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_y(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(B),Sy=hf;function _y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_y=function(e){return e?n:t})(e)}xy=yy.default=function(e=null){const t=wy.useContext(Sy.ThemeContext);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t};var Ey="top",ky="bottom",Ty="right",Cy="left",Oy="auto",Iy=[Ey,ky,Ty,Cy],My="start",Dy="end",jy="viewport",Ay="popper",Ny=Iy.reduce((function(e,t){return e.concat([t+"-"+My,t+"-"+Dy])}),[]),Py=[].concat(Iy,[Oy]).reduce((function(e,t){return e.concat([t,t+"-"+My,t+"-"+Dy])}),[]),Ry=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ly(e){return e?(e.nodeName||"").toLowerCase():null}function Fy(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Uy(e){return e instanceof Fy(e).Element||e instanceof Element}function By(e){return e instanceof Fy(e).HTMLElement||e instanceof HTMLElement}function zy(e){return!(typeof ShadowRoot>"u")&&(e instanceof Fy(e).ShadowRoot||e instanceof ShadowRoot)}const Ky={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!By(o)||!Ly(o)||(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});!By(r)||!Ly(r)||(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function $y(e){return e.split("-")[0]}var Vy=Math.max,Hy=Math.min,Wy=Math.round;function Yy(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function qy(){return!/^((?!chrome|android).)*safari/i.test(Yy())}function Gy(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&By(e)&&(o=e.offsetWidth>0&&Wy(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Wy(r.height)/e.offsetHeight||1);var a=(Uy(e)?Fy(e):window).visualViewport,s=!qy()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function Jy(e){var t=Gy(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Xy(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zy(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Zy(e){return Fy(e).getComputedStyle(e)}function Qy(e){return["table","td","th"].indexOf(Ly(e))>=0}function ex(e){return((Uy(e)?e.ownerDocument:e.document)||window.document).documentElement}function tx(e){return"html"===Ly(e)?e:e.assignedSlot||e.parentNode||(zy(e)?e.host:null)||ex(e)}function nx(e){return By(e)&&"fixed"!==Zy(e).position?e.offsetParent:null}function rx(e){for(var t=Fy(e),n=nx(e);n&&Qy(n)&&"static"===Zy(n).position;)n=nx(n);return n&&("html"===Ly(n)||"body"===Ly(n)&&"static"===Zy(n).position)?t:n||function(e){var t=/firefox/i.test(Yy());if(/Trident/i.test(Yy())&&By(e)&&"fixed"===Zy(e).position)return null;var n=tx(e);for(zy(n)&&(n=n.host);By(n)&&["html","body"].indexOf(Ly(n))<0;){var r=Zy(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function ox(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ix(e,t,n){return Vy(e,Hy(t,n))}function ax(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function sx(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const lx={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=$y(n.placement),l=ox(s),c=[Cy,Ty].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return ax("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:sx(e,Iy))}(o.padding,n),d=Jy(i),p="y"===l?Ey:Cy,f="y"===l?ky:Ty,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=rx(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=h/2-m/2,y=u[p],x=v-d[c]-u[f],w=v/2-d[c]/2+b,S=ix(y,w,x),_=l;n.modifiersData[r]=((t={})[_]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||Xy(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function cx(e){return e.split("-")[1]}var ux={top:"auto",right:"auto",bottom:"auto",left:"auto"};function dx(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,g="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=Cy,x=Ey,w=window;if(c){var S=rx(n),_="clientHeight",E="clientWidth";if(S===Fy(n)&&("static"!==Zy(S=ex(n)).position&&"absolute"===s&&(_="scrollHeight",E="scrollWidth")),o===Ey||(o===Cy||o===Ty)&&i===Dy)x=ky,m-=(d&&S===w&&w.visualViewport?w.visualViewport.height:S[_])-r.height,m*=l?1:-1;if(o===Cy||(o===Ey||o===ky)&&i===Dy)y=Ty,f-=(d&&S===w&&w.visualViewport?w.visualViewport.width:S[E])-r.width,f*=l?1:-1}var k,T=Object.assign({position:s},c&&ux),C=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Wy(n*o)/o||0,y:Wy(r*o)/o||0}}({x:f,y:m},Fy(n)):{x:f,y:m};return f=C.x,m=C.y,l?Object.assign({},T,((k={})[x]=b?"0":"",k[y]=v?"0":"",k.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",k)):Object.assign({},T,((t={})[x]=b?m+"px":"",t[y]=v?f+"px":"",t.transform="",t))}const px={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:$y(t.placement),variation:cx(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,dx(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,dx(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var fx={passive:!0};const hx={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=Fy(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,fx)})),s&&l.addEventListener("resize",n.update,fx),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,fx)})),s&&l.removeEventListener("resize",n.update,fx)}},data:{}};var mx={left:"right",right:"left",bottom:"top",top:"bottom"};function gx(e){return e.replace(/left|right|bottom|top/g,(function(e){return mx[e]}))}var vx={start:"end",end:"start"};function bx(e){return e.replace(/start|end/g,(function(e){return vx[e]}))}function yx(e){var t=Fy(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function xx(e){return Gy(ex(e)).left+yx(e).scrollLeft}function wx(e){var t=Zy(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Sx(e){return["html","body","#document"].indexOf(Ly(e))>=0?e.ownerDocument.body:By(e)&&wx(e)?e:Sx(tx(e))}function _x(e,t){var n;void 0===t&&(t=[]);var r=Sx(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Fy(r),a=o?[i].concat(i.visualViewport||[],wx(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(_x(tx(a)))}function Ex(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function kx(e,t,n){return t===jy?Ex(function(e,t){var n=Fy(e),r=ex(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=qy();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+xx(e),y:l}}(e,n)):Uy(t)?function(e,t){var n=Gy(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Ex(function(e){var t,n=ex(e),r=yx(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Vy(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Vy(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+xx(e),l=-r.scrollTop;return"rtl"===Zy(o||n).direction&&(s+=Vy(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(ex(e)))}function Tx(e,t,n,r){var o="clippingParents"===t?function(e){var t=_x(tx(e)),n=["absolute","fixed"].indexOf(Zy(e).position)>=0&&By(e)?rx(e):e;return Uy(n)?t.filter((function(e){return Uy(e)&&Xy(e,n)&&"body"!==Ly(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=kx(e,n,r);return t.top=Vy(o.top,t.top),t.right=Hy(o.right,t.right),t.bottom=Hy(o.bottom,t.bottom),t.left=Vy(o.left,t.left),t}),kx(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Cx(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?$y(o):null,a=o?cx(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Ey:t={x:s,y:n.y-r.height};break;case ky:t={x:s,y:n.y+n.height};break;case Ty:t={x:n.x+n.width,y:l};break;case Cy:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?ox(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case My:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Dy:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function Ox(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?jy:c,d=n.elementContext,p=void 0===d?Ay:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,v=ax("number"!=typeof g?g:sx(g,Iy)),b=p===Ay?"reference":Ay,y=e.rects.popper,x=e.elements[h?b:p],w=Tx(Uy(x)?x:x.contextElement||ex(e.elements.popper),l,u,a),S=Gy(e.elements.reference),_=Cx({reference:S,element:y,placement:o}),E=Ex(Object.assign({},y,_)),k=p===Ay?E:S,T={top:w.top-k.top+v.top,bottom:k.bottom-w.bottom+v.bottom,left:w.left-k.left+v.left,right:k.right-w.right+v.right},C=e.modifiersData.offset;if(p===Ay&&C){var O=C[o];Object.keys(T).forEach((function(e){var t=[Ty,ky].indexOf(e)>=0?1:-1,n=[Ey,ky].indexOf(e)>=0?"y":"x";T[e]+=O[n]*t}))}return T}const Ix={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=$y(g),b=l||(v===g||!h?[gx(g)]:function(e){if($y(e)===Oy)return[];var t=gx(e);return[bx(e),t,bx(t)]}(g)),y=[g].concat(b).reduce((function(e,n){return e.concat($y(n)===Oy?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Py:l,u=cx(r),d=u?s?Ny:Ny.filter((function(e){return cx(e)===u})):Iy,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=Ox(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[$y(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,S=new Map,_=!0,E=y[0],k=0;k<y.length;k++){var T=y[k],C=$y(T),O=cx(T)===My,I=[Ey,ky].indexOf(C)>=0,M=I?"width":"height",D=Ox(t,{placement:T,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),j=I?O?Ty:Cy:O?ky:Ey;x[M]>w[M]&&(j=gx(j));var A=gx(j),N=[];if(i&&N.push(D[C]<=0),s&&N.push(D[j]<=0,D[A]<=0),N.every((function(e){return e}))){E=T,_=!1;break}S.set(T,N)}if(_)for(var P=function(e){var t=y.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},R=h?3:1;R>0;R--){if("break"===P(R))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Mx(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Dx(e){return[Ey,Ty,ky,Cy].some((function(t){return e[t]>=0}))}const jx={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Ox(t,{elementContext:"reference"}),s=Ox(t,{altBoundary:!0}),l=Mx(a,r),c=Mx(s,o,i),u=Dx(l),d=Dx(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const Ax={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=Py.reduce((function(e,n){return e[n]=function(e,t,n){var r=$y(e),o=[Cy,Ey].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Cy,Ty].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};const Nx={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Cx({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}};const Px={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,g=Ox(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=$y(t.placement),b=cx(t.placement),y=!b,x=ox(v),w=function(e){return"x"===e?"y":"x"}(x),S=t.modifiersData.popperOffsets,_=t.rects.reference,E=t.rects.popper,k="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(i){var I,M="y"===x?Ey:Cy,D="y"===x?ky:Ty,j="y"===x?"height":"width",A=S[x],N=A+g[M],P=A-g[D],R=f?-E[j]/2:0,L=b===My?_[j]:E[j],F=b===My?-E[j]:-_[j],U=t.elements.arrow,B=f&&U?Jy(U):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=z[M],$=z[D],V=ix(0,_[j],B[j]),H=y?_[j]/2-R-V-K-T.mainAxis:L-V-K-T.mainAxis,W=y?-_[j]/2+R+V+$+T.mainAxis:F+V+$+T.mainAxis,Y=t.elements.arrow&&rx(t.elements.arrow),q=Y?"y"===x?Y.clientTop||0:Y.clientLeft||0:0,G=null!=(I=null==C?void 0:C[x])?I:0,J=A+W-G,X=ix(f?Hy(N,A+H-G-q):N,A,f?Vy(P,J):P);S[x]=X,O[x]=X-A}if(s){var Z,Q="x"===x?Ey:Cy,ee="x"===x?ky:Ty,te=S[w],ne="y"===w?"height":"width",re=te+g[Q],oe=te-g[ee],ie=-1!==[Ey,Cy].indexOf(v),ae=null!=(Z=null==C?void 0:C[w])?Z:0,se=ie?re:te-_[ne]-E[ne]-ae+T.altAxis,le=ie?te+_[ne]+E[ne]-ae-T.altAxis:oe,ce=f&&ie?function(e,t,n){var r=ix(e,t,n);return r>n?n:r}(se,te,le):ix(f?se:re,te,f?le:oe);S[w]=ce,O[w]=ce-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};function Rx(e,t,n){void 0===n&&(n=!1);var r=By(t),o=By(t)&&function(e){var t=e.getBoundingClientRect(),n=Wy(t.width)/e.offsetWidth||1,r=Wy(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=ex(t),a=Gy(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Ly(t)||wx(i))&&(s=function(e){return e!==Fy(e)&&By(e)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):yx(e)}(t)),By(t)?((l=Gy(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=xx(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Lx(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function Fx(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Ux={placement:"bottom",modifiers:[],strategy:"absolute"};function Bx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function zx(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Ux:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ux,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:Uy(e)?_x(e):e.contextElement?_x(e.contextElement):[],popper:_x(t)};var u=function(e){var t=Lx(e);return Ry.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=u.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(Bx(t,n)){o.rects={reference:Rx(t,rx(n),"fixed"===o.options.strategy),popper:Jy(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:Fx((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!Bx(e,t))return l;function c(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var Kx=zx({defaultModifiers:[hx,Nx,px,Ky,Ax,Ix,Px,lx,jx]});const $x=B.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=B.useState(null),s=ad(B.isValidElement(n)?Id(n):null,t);if(Wu((()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,o]),Wu((()=>{if(i&&!o)return td(t,i),()=>{td(t,null)}}),[t,i,o]),o){if(B.isValidElement(n)){const e={ref:s};return B.cloneElement(n,e)}return(0,cn.jsx)(B.Fragment,{children:n})}return(0,cn.jsx)(B.Fragment,{children:i&&ca.createPortal(n,i)})}));function Vx(e){return Au("MuiPopper",e)}Nu("MuiPopper",["root"]);const Hx=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Wx=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Yx(e){return"function"==typeof e?e():e}function qx(e){return void 0!==e.nodeType}const Gx={},Jx=B.forwardRef((function(e,t){var n;const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:p={},slots:f={},TransitionProps:h}=e,m=vs(e,Hx),g=B.useRef(null),v=ad(g,t),b=B.useRef(null),y=ad(b,d),x=B.useRef(y);Wu((()=>{x.current=y}),[y]),B.useImperativeHandle(d,(()=>b.current),[]);const w=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,i),[S,_]=B.useState(w),[E,k]=B.useState(Yx(r));B.useEffect((()=>{b.current&&b.current.forceUpdate()})),B.useEffect((()=>{r&&k(Yx(r))}),[r]),Wu((()=>{if(!E||!l)return;let e=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{(e=>{_(e.placement)})(e)}}];null!=s&&(e=e.concat(s)),u&&null!=u.modifiers&&(e=e.concat(u.modifiers));const t=Kx(E,g.current,ts({placement:w},u,{modifiers:e}));return x.current(t),()=>{t.destroy(),x.current(null)}}),[E,a,s,l,u,w]);const T={placement:S};null!==h&&(T.TransitionProps=h);const C=(e=>{const{classes:t}=e;return Ed({root:["root"]},Vx,t)})(e),O=null!=(n=f.root)?n:"div",I=Od({elementType:O,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:v},ownerState:e,className:C.root});return(0,cn.jsx)(O,ts({},I,{children:"function"==typeof o?o(T):o}))})),Xx=B.forwardRef((function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:l,open:c,placement:u="bottom",popperOptions:d=Gx,popperRef:p,style:f,transition:h=!1,slotProps:m={},slots:g={}}=e,v=vs(e,Wx),[b,y]=B.useState(!0);if(!s&&!c&&(!h||b))return null;let x;if(o)x=o;else if(n){const e=Yx(n);x=e&&qx(e)?Qu(e).body:Qu(null).body}const w=c||!s||h&&!b?void 0:"none",S=h?{in:c,onEnter:()=>{y(!1)},onExited:()=>{y(!0)}}:void 0;return(0,cn.jsx)($x,{disablePortal:a,container:x,children:(0,cn.jsx)(Jx,ts({anchorEl:n,direction:i,disablePortal:a,modifiers:l,ref:t,open:h?!b:c,placement:u,popperOptions:d,popperRef:p,slotProps:m,slots:g},v,{style:ts({position:"fixed",top:0,left:0,display:w},f),TransitionProps:S,children:r}))})})),Zx=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Qx=Uf(Xx,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ew=B.forwardRef((function(e,t){var n;const r=xy(),o=ub({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:p,open:f,placement:h,popperOptions:m,popperRef:g,transition:v,slots:b,slotProps:y}=o,x=vs(o,Zx),w=null!=(n=null==b?void 0:b.root)?n:null==s?void 0:s.Root,S=ts({anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:p,open:f,placement:h,popperOptions:m,popperRef:g,transition:v},x);return(0,cn.jsx)(Qx,ts({as:a,direction:null==r?void 0:r.direction,slots:{root:w},slotProps:y??l},S,{ref:t}))}));const tw=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],nw={entering:{opacity:1},entered:{opacity:1}},rw=B.forwardRef((function(e,t){const n=lf(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:p,onExited:f,onExiting:h,style:m,timeout:g=r,TransitionComponent:v=Cb}=e,b=vs(e,tw),y=B.useRef(null),x=ad(y,Id(a),t),w=e=>t=>{if(e){const n=y.current;void 0===t?e(n):e(n,t)}},S=w(d),_=w(((e,t)=>{Fb(e);const r=Ub({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)})),E=w(u),k=w(h),T=w((e=>{const t=Ub({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),C=w(f);return(0,cn.jsx)(v,ts({appear:i,in:l,nodeRef:y,onEnter:_,onEntered:E,onEntering:S,onExit:T,onExited:C,onExiting:k,addEndListener:e=>{o&&o(y.current,e)},timeout:g},b,{children:(e,t)=>B.cloneElement(a,ts({style:ts({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},nw[e],m,a.props.style),ref:x},t))}))}));function ow(e){return Au("MuiBackdrop",e)}Nu("MuiBackdrop",["root","invisible"]);const iw=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],aw=Uf("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>ts({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),sw=B.forwardRef((function(e,t){var n,r,o;const i=ub({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=rw,transitionDuration:g}=i,v=vs(i,iw),b=ts({},i,{component:l,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return Ed({root:["root",n&&"invisible"]},ow,t)})(b),x=null!=(n=f.root)?n:u.root;return(0,cn.jsx)(m,ts({in:p,timeout:g},v,{children:(0,cn.jsx)(aw,ts({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:l,className:Du(y.root,s,null==x?void 0:x.className),ownerState:ts({},b,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}));function lw(e){return Au("MuiButton",e)}const cw=Nu("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),uw=B.createContext({}),dw=B.createContext(void 0),pw=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],fw=e=>ts({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),hw=Uf(sy,{shouldForwardProp:e=>Ff(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ec(n.color)}`],t[`size${Ec(n.size)}`],t[`${n.variant}Size${Ec(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return ts({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":ts({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:$d(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$d(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$d(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":ts({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${cw.focusVisible}`]:ts({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${cw.disabled}`]:ts({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${$d(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${cw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${cw.disabled}`]:{boxShadow:"none"}})),mw=Uf("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ec(n.size)}`]]}})((({ownerState:e})=>ts({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},fw(e)))),gw=Uf("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ec(n.size)}`]]}})((({ownerState:e})=>ts({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},fw(e)))),vw=B.forwardRef((function(e,t){const n=B.useContext(uw),r=B.useContext(dw),o=ub({props:Vu(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:p,focusVisibleClassName:f,fullWidth:h=!1,size:m="medium",startIcon:g,type:v,variant:b="text"}=o,y=vs(o,pw),x=ts({},o,{color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:h,size:m,type:v,variant:b}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return ts({},a,Ed({root:["root",i,`${i}${Ec(t)}`,`size${Ec(o)}`,`${i}Size${Ec(o)}`,`color${Ec(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Ec(o)}`],endIcon:["icon","endIcon",`iconSize${Ec(o)}`]},lw,a))})(x),S=g&&(0,cn.jsx)(mw,{className:w.startIcon,ownerState:x,children:g}),_=p&&(0,cn.jsx)(gw,{className:w.endIcon,ownerState:x,children:p}),E=r||"";return(0,cn.jsxs)(hw,ts({ownerState:x,className:Du(n.className,w.root,l,E),component:s,disabled:c,focusRipple:!d,focusVisibleClassName:Du(w.focusVisible,f),ref:t,type:v},y,{classes:w,children:[S,i,_]}))}));function bw(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function yw(e){return parseInt(ed(e).getComputedStyle(e).paddingRight,10)||0}function xw(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&bw(e,o)}))}function ww(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function Sw(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Qu(e);return t.body===e?ed(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(Qu(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${yw(r)+e}px`;const t=Qu(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${yw(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=Qu(r).body;else{const t=r.parentElement,n=ed(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const _w=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Ew(e){const t=[],n=[];return Array.from(e.querySelectorAll(_w)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1===o||!function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type||!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)||(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function kw(){return!0}function Tw(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Ew,isEnabled:a=kw,open:s}=e,l=B.useRef(!1),c=B.useRef(null),u=B.useRef(null),d=B.useRef(null),p=B.useRef(null),f=B.useRef(!1),h=B.useRef(null),m=ad(Id(t),h),g=B.useRef(null);B.useEffect((()=>{!s||!h.current||(f.current=!n)}),[n,s]),B.useEffect((()=>{if(!s||!h.current)return;const e=Qu(h.current);return h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}}),[s]),B.useEffect((()=>{if(!s||!h.current)return;const e=Qu(h.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===h.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=h.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement)||r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if((e.activeElement===c.current||e.activeElement===u.current)&&(n=i(h.current)),n.length>0){var o,s;const e=!(null==(o=g.current)||!o.shiftKey||"Tab"!==(null==(s=g.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,a,s,i]);const v=e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0};return(0,cn.jsxs)(B.Fragment,{children:[(0,cn.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:c,"data-testid":"sentinelStart"}),B.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,cn.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":"sentinelEnd"})]})}const Cw=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&bw(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);xw(t,e.mount,e.modalRef,r,!0);const o=ww(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=ww(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=Sw(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=ww(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&bw(e.modalRef,t),xw(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&bw(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Ow(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=Cw,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,p=B.useRef({}),f=B.useRef(null),h=B.useRef(null),m=ad(h,d),[g,v]=B.useState(!u),b=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let y=!0;("false"===e["aria-hidden"]||!1===e["aria-hidden"])&&(y=!1);const x=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),w=()=>{o.mount(x(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},S=id((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Qu(f.current).body;o.add(x(),e),h.current&&w()})),_=B.useCallback((()=>o.isTopModal(x())),[o]),E=id((e=>{f.current=e,e&&(u&&_()?w():h.current&&bw(h.current,y))})),k=B.useCallback((()=>{o.remove(x(),y)}),[y,o]);B.useEffect((()=>()=>{k()}),[k]),B.useEffect((()=>{u?S():(!b||!i)&&k()}),[u,k,b,i,S]);const T=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&_()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},C=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const n=kd(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=ts({},n,t);return ts({role:"presentation"},r,{onKeyDown:T(r),ref:m})},getBackdropProps:(e={})=>ts({"aria-hidden":!0},e,{onClick:C(e),open:u}),getTransitionProps:()=>({onEnter:Xu((()=>{v(!1),a&&a()}),null==l?void 0:l.props.onEnter),onExited:Xu((()=>{v(!0),s&&s(),i&&k()}),null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:E,isTopModal:_,exited:g,hasTransition:b}}function Iw(e){return Au("MuiModal",e)}Nu("MuiModal",["root","hidden","backdrop"]);const Mw=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Dw=Uf("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>ts({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),jw=Uf(sw,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Aw=B.forwardRef((function(e,t){var n,r,o,i,a,s;const l=ub({name:"MuiModal",props:e}),{BackdropComponent:c=jw,BackdropProps:u,className:d,closeAfterTransition:p=!1,children:f,container:h,component:m,components:g={},componentsProps:v={},disableAutoFocus:b=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:S=!1,disableScrollLock:_=!1,hideBackdrop:E=!1,keepMounted:k=!1,onBackdropClick:T,open:C,slotProps:O,slots:I}=l,M=vs(l,Mw),D=ts({},l,{closeAfterTransition:p,disableAutoFocus:b,disableEnforceFocus:y,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:S,disableScrollLock:_,hideBackdrop:E,keepMounted:k}),{getRootProps:j,getBackdropProps:A,getTransitionProps:N,portalRef:P,isTopModal:R,exited:L,hasTransition:F}=Ow(ts({},D,{rootRef:t})),U=ts({},D,{exited:L}),z=(e=>{const{open:t,exited:n,classes:r}=e;return Ed({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Iw,r)})(U),K={};if(void 0===f.props.tabIndex&&(K.tabIndex="-1"),F){const{onEnter:e,onExited:t}=N();K.onEnter=e,K.onExited=t}const $=null!=(n=null!=(r=null==I?void 0:I.root)?r:g.Root)?n:Dw,V=null!=(o=null!=(i=null==I?void 0:I.backdrop)?i:g.Backdrop)?o:c,H=null!=(a=null==O?void 0:O.root)?a:v.root,W=null!=(s=null==O?void 0:O.backdrop)?s:v.backdrop,Y=Od({elementType:$,externalSlotProps:H,externalForwardedProps:M,getSlotProps:j,additionalProps:{ref:t,as:m},ownerState:U,className:Du(d,null==H?void 0:H.className,null==z?void 0:z.root,!U.open&&U.exited&&(null==z?void 0:z.hidden))}),q=Od({elementType:V,externalSlotProps:W,additionalProps:u,getSlotProps:e=>A(ts({},e,{onClick:t=>{T&&T(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Du(null==W?void 0:W.className,null==u?void 0:u.className,null==z?void 0:z.backdrop),ownerState:U});return k||C||F&&!L?(0,cn.jsx)($x,{ref:P,container:h,disablePortal:w,children:(0,cn.jsxs)($,ts({},Y,{children:[!E&&c?(0,cn.jsx)(V,ts({},q)):null,(0,cn.jsx)(Tw,{disableEnforceFocus:y,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:R,open:C,children:B.cloneElement(f,K)})]}))}):null}));function Nw(e){return Au("MuiDialog",e)}const Pw=Nu("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Rw=B.createContext({}),Lw=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Fw=Uf(sw,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Uw=Uf(Aw,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Bw=Uf("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ec(n.scroll)}`]]}})((({ownerState:e})=>ts({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),zw=Uf($b,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ec(n.scroll)}`],t[`paperWidth${Ec(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((({theme:e,ownerState:t})=>ts({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Pw.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${Pw.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Pw.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}))),Kw=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiDialog"}),r=lf(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":a,BackdropComponent:s,BackdropProps:l,children:c,className:u,disableEscapeKeyDown:d=!1,fullScreen:p=!1,fullWidth:f=!1,maxWidth:h="sm",onBackdropClick:m,onClick:g,onClose:v,open:b,PaperComponent:y=$b,PaperProps:x={},scroll:w="paper",TransitionComponent:S=rw,transitionDuration:_=o,TransitionProps:E}=n,k=vs(n,Lw),T=ts({},n,{disableEscapeKeyDown:d,fullScreen:p,fullWidth:f,maxWidth:h,scroll:w}),C=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e;return Ed({root:["root"],container:["container",`scroll${Ec(n)}`],paper:["paper",`paperScroll${Ec(n)}`,`paperWidth${Ec(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]},Nw,t)})(T),O=B.useRef(),I=od(a),M=B.useMemo((()=>({titleId:I})),[I]);return(0,cn.jsx)(Uw,ts({className:Du(C.root,u),closeAfterTransition:!0,components:{Backdrop:Fw},componentsProps:{backdrop:ts({transitionDuration:_,as:s},l)},disableEscapeKeyDown:d,onClose:v,open:b,ref:t,onClick:e=>{g&&g(e),O.current&&(O.current=null,m&&m(e),v&&v(e,"backdropClick"))},ownerState:T},k,{children:(0,cn.jsx)(S,ts({appear:!0,in:b,timeout:_,role:"presentation"},E,{children:(0,cn.jsx)(Bw,{className:Du(C.container),onMouseDown:e=>{O.current=e.target===e.currentTarget},ownerState:T,children:(0,cn.jsx)(zw,ts({as:y,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":I},x,{className:Du(C.paper,x.className),ownerState:T,children:(0,cn.jsx)(Rw.Provider,{value:M,children:c})}))})}))}))}));Nu("MuiDialogActions",["root","spacing"]);Uf("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((({ownerState:e})=>ts({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})));function $w(e){return Au("MuiDialogContent",e)}Nu("MuiDialogContent",["root","dividers"]);const Vw=Nu("MuiDialogTitle",["root"]),Hw=["className","dividers"],Ww=Uf("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>ts({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${Vw.root} + &`]:{paddingTop:0}}))),Yw=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1}=n,i=vs(n,Hw),a=ts({},n,{dividers:o}),s=(e=>{const{classes:t,dividers:n}=e;return Ed({root:["root",n&&"dividers"]},$w,t)})(a);return(0,cn.jsx)(Ww,ts({className:Du(s.root,r),ownerState:a,ref:t},i))})),qw=B.createContext();function Gw(e){return Au("MuiGrid",e)}const Jw=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Xw=Nu("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...Jw.map((e=>`grid-xs-${e}`)),...Jw.map((e=>`grid-sm-${e}`)),...Jw.map((e=>`grid-md-${e}`)),...Jw.map((e=>`grid-lg-${e}`)),...Jw.map((e=>`grid-xl-${e}`))]),Zw=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Qw(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function eS({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const tS=Uf("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>ts({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){return Sc({theme:e},_c({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${Xw.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=_c({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=eS({breakpoints:e.breakpoints.values,values:t})),o=Sc({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{marginTop:`-${Qw(i)}`,[`& > .${Xw.item}`]:{paddingTop:Qw(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${Xw.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=_c({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=eS({breakpoints:e.breakpoints.values,values:t})),o=Sc({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${Qw(i)})`,marginLeft:`-${Qw(i)}`,[`& > .${Xw.item}`]:{paddingLeft:Qw(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${Xw.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=_c({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[o]:a;if(null==s)return r;const l=Math.round(n/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${l} + ${Qw(n)})`;c={flexBasis:e,maxWidth:e}}}i=ts({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===e.breakpoints.values[o]?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r}),{})}));const nS=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Ed({root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]},Gw,t)},rS=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiGrid"}),{breakpoints:r}=lf(),o=Tu(n),{className:i,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:p,spacing:f=0,wrap:h="wrap",zeroMinWidth:m=!1}=o,g=vs(o,Zw),v=p||f,b=s||f,y=B.useContext(qw),x=c?a||12:y,w={},S=ts({},g);r.keys.forEach((e=>{null!=g[e]&&(w[e]=g[e],delete S[e])}));const _=ts({},o,{columns:x,container:c,direction:u,item:d,rowSpacing:v,columnSpacing:b,wrap:h,zeroMinWidth:m,spacing:f},w,{breakpoints:r.keys}),E=nS(_);return(0,cn.jsx)(qw.Provider,{value:x,children:(0,cn.jsx)(tS,ts({ownerState:_,className:Du(E.root,i),as:l,ref:t},S))})}));const oS=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function iS(e){return`scale(${e}, ${e**2})`}const aS={entering:{opacity:1,transform:iS(1)},entered:{opacity:1,transform:"none"}},sS=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),lS=B.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:p,style:f,timeout:h="auto",TransitionComponent:m=Cb}=e,g=vs(e,oS),v=ud(),b=B.useRef(),y=lf(),x=B.useRef(null),w=ad(x,Id(o),t),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},_=S(c),E=S(((e,t)=>{Fb(e);const{duration:n,delay:r,easing:o}=Ub({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[y.transitions.create("opacity",{duration:a,delay:r}),y.transitions.create("transform",{duration:sS?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)})),k=S(l),T=S(p),C=S((e=>{const{duration:t,delay:n,easing:r}=Ub({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[y.transitions.create("opacity",{duration:o,delay:n}),y.transitions.create("transform",{duration:sS?o:.666*o,delay:sS?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=iS(.75),u&&u(e)})),O=S(d);return(0,cn.jsx)(m,ts({appear:r,in:a,nodeRef:x,onEnter:E,onEntered:k,onEntering:_,onExit:C,onExited:O,onExiting:T,addEndListener:e=>{"auto"===h&&v.start(b.current||0,e),n&&n(x.current,e)},timeout:"auto"===h?null:h},g,{children:(e,t)=>B.cloneElement(o,ts({style:ts({opacity:0,transform:iS(.75),visibility:"exited"!==e||a?void 0:"hidden"},aS[e],f,o.props.style),ref:w},t))}))}));lS.muiSupportAuto=!0;const cS=Nu("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);Uf("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ec(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>ts({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${cS.positionStart}&:not(.${cS.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})));const uS=Nu("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),dS=(Uf(sy,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Ec(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${uS.iconWrapper}`]:t.iconWrapper}]}})((({theme:e,ownerState:t})=>ts({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${uS.iconWrapper}`]:ts({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${uS.selected}`]:{opacity:1},[`&.${uS.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${uS.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${uS.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${uS.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${uS.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}))),mb((0,cn.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")),pS=mb((0,cn.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function fS(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const hS=["onChange"],mS={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function gS(e){return Au("MuiTabScrollButton",e)}const vS=Nu("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),bS=["className","slots","slotProps","direction","orientation","disabled"],yS=Uf(sy,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((({ownerState:e})=>ts({width:40,flexShrink:0,opacity:.8,[`&.${vS.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}))),xS=B.forwardRef((function(e,t){var n,r;const o=ub({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:s={},direction:l}=o,c=vs(o,bS),u=ts({isRtl:Dd()},o),d=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Ed({root:["root",n,r&&"disabled"]},gS,t)})(u),p=null!=(n=a.StartScrollButtonIcon)?n:dS,f=null!=(r=a.EndScrollButtonIcon)?r:pS,h=Od({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),m=Od({elementType:f,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return(0,cn.jsx)(yS,ts({component:"div",className:Du(d.root,i),ref:t,role:null,ownerState:u,tabIndex:null},c,{children:"left"===l?(0,cn.jsx)(p,ts({},h)):(0,cn.jsx)(f,ts({},m))}))}));function wS(e){return Au("MuiTabs",e)}const SS=Nu("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),_S=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ES=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,kS=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,TS=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},CS=Uf("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${SS.scrollButtons}`]:t.scrollButtons},{[`& .${SS.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((({ownerState:e,theme:t})=>ts({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${SS.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}))),OS=Uf("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((({ownerState:e})=>ts({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"}))),IS=Uf("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((({ownerState:e})=>ts({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"}))),MS=Uf("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((({ownerState:e,theme:t})=>ts({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0}))),DS=Uf((function(e){const{onChange:t}=e,n=vs(e,hS),r=B.useRef(),o=B.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Wu((()=>{const e=Zu((()=>{const e=r.current;i(),e!==r.current&&t(r.current)})),n=ed(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),B.useEffect((()=>{i(),t(r.current)}),[t]),(0,cn.jsx)("div",ts({style:mS},n,{ref:o}))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),jS={};const AS=B.forwardRef((function(e,t){const n=ub({props:e,name:"MuiTabs"}),r=lf(),o=Dd(),{"aria-label":i,"aria-labelledby":a,action:s,centered:l=!1,children:c,className:u,component:d="div",allowScrollButtonsMobile:p=!1,indicatorColor:f="primary",onChange:h,orientation:m="horizontal",ScrollButtonComponent:g=xS,scrollButtons:v="auto",selectionFollowsFocus:b,slots:y={},slotProps:x={},TabIndicatorProps:w={},TabScrollButtonProps:S={},textColor:_="primary",value:E,variant:k="standard",visibleScrollbar:T=!1}=n,C=vs(n,_S),O="scrollable"===k,I="vertical"===m,M=I?"scrollTop":"scrollLeft",D=I?"top":"left",j=I?"bottom":"right",A=I?"clientHeight":"clientWidth",N=I?"height":"width",P=ts({},n,{component:d,allowScrollButtonsMobile:p,indicatorColor:f,orientation:m,vertical:I,scrollButtons:v,textColor:_,variant:k,visibleScrollbar:T,fixed:!O,hideScrollbar:O&&!T,scrollableX:O&&!I,scrollableY:O&&I,centered:l&&!O,scrollButtonsHideMobile:!p}),R=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Ed({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},wS,l)})(P),L=Od({elementType:y.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:P}),F=Od({elementType:y.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:P}),[U,z]=B.useState(!1),[K,$]=B.useState(jS),[V,H]=B.useState(!1),[W,Y]=B.useState(!1),[q,G]=B.useState(!1),[J,X]=B.useState({overflow:"hidden",scrollbarWidth:0}),Z=new Map,Q=B.useRef(null),ee=B.useRef(null),te=()=>{const e=Q.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Sd(e,o?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==E){const e=ee.current.children;if(e.length>0){const t=e[Z.get(E)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ne=id((()=>{const{tabsMeta:e,tabMeta:t}=te();let n,r=0;if(I)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[N]:t?t[N]:0};if(isNaN(K[n])||isNaN(K[N]))$(i);else{const e=Math.abs(K[n]-i[n]),t=Math.abs(K[N]-i[N]);(e>=1||t>=1)&&$(i)}})),re=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=fS,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=i(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(M,Q.current,e,{duration:r.transitions.duration.standard}):Q.current[M]=e},oe=e=>{let t=Q.current[M];I?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===wd()?-1:1),re(t)},ie=()=>{const e=Q.current[A];let t=0;const n=Array.from(ee.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[A]>e){0===r&&(t=e);break}t+=o[A]}return t},ae=()=>{oe(-1*ie())},se=()=>{oe(ie())},le=B.useCallback((e=>{X({overflow:null,scrollbarWidth:e})}),[]),ce=id((e=>{const{tabsMeta:t,tabMeta:n}=te();if(n&&t)if(n[D]<t[D]){const r=t[M]+(n[D]-t[D]);re(r,{animation:e})}else if(n[j]>t[j]){const r=t[M]+(n[j]-t[j]);re(r,{animation:e})}})),ue=id((()=>{O&&!1!==v&&G(!q)}));B.useEffect((()=>{const e=Zu((()=>{Q.current&&ne()}));let t;const n=ed(Q.current);let r;return n.addEventListener("resize",e),typeof ResizeObserver<"u"&&(t=new ResizeObserver(e),Array.from(ee.current.children).forEach((e=>{t.observe(e)}))),typeof MutationObserver<"u"&&(r=new MutationObserver((n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{var n;null==(n=t)||n.unobserve(e)})),e.addedNodes.forEach((e=>{var n;null==(n=t)||n.observe(e)}))})),e(),ue()})),r.observe(ee.current,{childList:!0})),()=>{var o,i;e.clear(),n.removeEventListener("resize",e),null==(o=r)||o.disconnect(),null==(i=t)||i.disconnect()}}),[ne,ue]),B.useEffect((()=>{const e=Array.from(ee.current.children),t=e.length;if(typeof IntersectionObserver<"u"&&t>0&&O&&!1!==v){const n=e[0],r=e[t-1],o={root:Q.current,threshold:.99},i=e=>{H(!e[0].isIntersecting)},a=new IntersectionObserver(i,o);a.observe(n);const s=e=>{Y(!e[0].isIntersecting)},l=new IntersectionObserver(s,o);return l.observe(r),()=>{a.disconnect(),l.disconnect()}}}),[O,v,q,null==c?void 0:c.length]),B.useEffect((()=>{z(!0)}),[]),B.useEffect((()=>{ne()})),B.useEffect((()=>{ce(jS!==K)}),[ce,K]),B.useImperativeHandle(s,(()=>({updateIndicator:ne,updateScrollButtons:ue})),[ne,ue]);const de=(0,cn.jsx)(MS,ts({},w,{className:Du(R.indicator,w.className),ownerState:P,style:ts({},K,w.style)}));let pe=0;const fe=B.Children.map(c,(e=>{if(!B.isValidElement(e))return null;const t=void 0===e.props.value?pe:e.props.value;Z.set(t,pe);const n=t===E;return pe+=1,B.cloneElement(e,ts({fullWidth:"fullWidth"===k,indicator:n&&!U&&de,selected:n,selectionFollowsFocus:b,onChange:h,textColor:_,value:t},1!==pe||!1!==E||e.props.tabIndex?{}:{tabIndex:0}))})),he=(()=>{const e={};e.scrollbarSizeListener=O?(0,cn.jsx)(DS,{onChange:le,className:Du(R.scrollableX,R.hideScrollbar)}):null;const t=O&&("auto"===v&&(V||W)||!0===v);return e.scrollButtonStart=t?(0,cn.jsx)(g,ts({slots:{StartScrollButtonIcon:y.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:L},orientation:m,direction:o?"right":"left",onClick:ae,disabled:!V},S,{className:Du(R.scrollButtons,S.className)})):null,e.scrollButtonEnd=t?(0,cn.jsx)(g,ts({slots:{EndScrollButtonIcon:y.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:F},orientation:m,direction:o?"left":"right",onClick:se,disabled:!W},S,{className:Du(R.scrollButtons,S.className)})):null,e})();return(0,cn.jsxs)(CS,ts({className:Du(R.root,u),ownerState:P,ref:t,as:d},C,{children:[he.scrollButtonStart,he.scrollbarSizeListener,(0,cn.jsxs)(OS,{className:R.scroller,ownerState:P,style:{overflow:J.overflow,[I?"margin"+(o?"Left":"Right"):"marginBottom"]:T?void 0:-J.scrollbarWidth},ref:Q,children:[(0,cn.jsx)(IS,{"aria-label":i,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,className:R.flexContainer,ownerState:P,onKeyDown:e=>{const t=ee.current,n=Qu(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),TS(t,n,kS);break;case i:e.preventDefault(),TS(t,n,ES);break;case"Home":e.preventDefault(),TS(t,null,ES);break;case"End":e.preventDefault(),TS(t,null,kS)}},ref:ee,role:"tablist",children:fe}),U&&de]}),he.scrollButtonEnd]}))}));const NS=Nu("PrivatePickersMonth",["root","selected"]),PS=(Uf(by,{name:"PrivatePickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${NS.selected}`]:t.selected}]})((({theme:e})=>ts({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:Ju(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:e.palette.text.secondary},[`&.${NS.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}}))),()=>{const e=B.useContext(Kf);if(null===e)throw new Error("MUI: Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.");return e}),RS=()=>PS().localeText;Nu("MuiMonthPicker",["root"]);Uf("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"});const LS=e=>Au("MuiPickersFadeTransitionGroup",e);Nu("MuiPickersFadeTransitionGroup",["root"]);const FS=Uf(Lb,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function US(e){const t=cf({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=(e=>{const{classes:t}=e;return Ed({root:["root"]},LS,t)})(t);return o?n:(0,cn.jsx)(FS,{className:cb(a.root,r),children:(0,cn.jsx)(rw,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:500,enter:250,exit:0},children:n},i)})}const BS=Nu("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),zS=({theme:e,ownerState:t})=>ts({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:e.palette.background.paper,color:e.palette.text.primary,"&:hover":{backgroundColor:Ju(e.palette.action.active,e.palette.action.hoverOpacity)},"&:focus":{backgroundColor:Ju(e.palette.action.active,e.palette.action.hoverOpacity),[`&.${BS.selected}`]:{willChange:"background-color",backgroundColor:e.palette.primary.dark}},[`&.${BS.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:e.palette.primary.dark}},[`&.${BS.disabled}`]:{color:e.palette.text.disabled}},!t.disableMargin&&{margin:"0 2px"},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:e.palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${BS.selected})`]:{border:`1px solid ${e.palette.text.secondary}`}}),KS=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},$S=(Uf(sy,{name:"MuiPickersDay",slot:"Root",overridesResolver:KS})(zS),Uf("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:KS})((({theme:e,ownerState:t})=>ts({},zS({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"}))),e=>Au("PrivatePickersSlideTransition",e)),VS=Nu("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),HS=["children","className","reduceAnimations","slideDirection","transKey"],WS=Uf(Lb,{name:"PrivatePickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${VS["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${VS["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${VS.slideEnterActive}`]:t.slideEnterActive},{[`.${VS.slideExit}`]:t.slideExit},{[`.${VS["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${VS["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((({theme:e})=>{const t=e.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${VS["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${VS["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${VS.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${VS.slideExit}`]:{transform:"translate(0%)"},[`& .${VS["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${VS["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}));Nu("MuiDayPicker",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer"]);Uf("div",{name:"MuiDayPicker",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Uf(by,{name:"MuiDayPicker",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.secondary}))),Uf("div",{name:"MuiDayPicker",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Uf((e=>{const{children:t,className:n,reduceAnimations:r,slideDirection:o,transKey:i}=e,a=vs(e,HS),s=(e=>{const{classes:t}=e;return Ed({root:["root"]},$S,t)})(e);if(r)return(0,cn.jsx)("div",{className:cb(s.root,n),children:t});const l={exit:VS.slideExit,enterActive:VS.slideEnterActive,enter:VS[`slideEnter-${o}`],exitActive:VS[`slideExitActiveLeft-${o}`]};return(0,cn.jsx)(WS,{className:cb(s.root,n),childFactory:e=>B.cloneElement(e,{classNames:l}),role:"presentation",children:(0,cn.jsx)(Mb,ts({mountOnEnter:!0,unmountOnExit:!0,timeout:350,classNames:l},a,{children:t}),i)})}),{name:"MuiDayPicker",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Uf("div",{name:"MuiDayPicker",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Uf("div",{name:"MuiDayPicker",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});const YS=mb((0,cn.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),qS=mb((0,cn.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),GS=mb((0,cn.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),JS=mb((0,cn.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),XS=mb((0,cn.jsxs)(B.Fragment,{children:[(0,cn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,cn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),ZS=(mb((0,cn.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),mb((0,cn.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"));mb((0,cn.jsxs)(B.Fragment,{children:[(0,cn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,cn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");function QS(e){return Au("MuiPickersArrowSwitcher",e)}Nu("MuiPickersArrowSwitcher",["root","spacer","button"]);const e_=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],t_=Uf("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),n_=Uf("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((({theme:e})=>({width:e.spacing(3)}))),r_=Uf(py,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((({ownerState:e})=>ts({},e.hidden&&{visibility:"hidden"}))),o_=B.forwardRef((function(e,t){const n=cf({props:e,name:"MuiPickersArrowSwitcher"}),{children:r,className:o,components:i,componentsProps:a,isLeftDisabled:s,isLeftHidden:l,isRightDisabled:c,isRightHidden:u,leftArrowButtonText:d,onLeftClick:p,onRightClick:f,rightArrowButtonText:h}=n,m=vs(n,e_),g="rtl"===lf().direction,v=(null==a?void 0:a.leftArrowButton)||{},b=(null==i?void 0:i.LeftArrowIcon)||qS,y=(null==a?void 0:a.rightArrowButton)||{},x=(null==i?void 0:i.RightArrowIcon)||GS,w=n,S=(e=>{const{classes:t}=e;return Ed({root:["root"],spacer:["spacer"],button:["button"]},QS,t)})(w);return(0,cn.jsxs)(t_,ts({ref:t,className:cb(S.root,o),ownerState:w},m,{children:[(0,cn.jsx)(r_,ts({as:null==i?void 0:i.LeftArrowButton,size:"small","aria-label":d,title:d,disabled:s,edge:"end",onClick:p},v,{className:cb(S.button,v.className),ownerState:ts({},w,v,{hidden:l}),children:g?(0,cn.jsx)(x,{}):(0,cn.jsx)(b,{})})),r?(0,cn.jsx)(by,{variant:"subtitle1",component:"span",children:r}):(0,cn.jsx)(n_,{className:S.spacer,ownerState:w}),(0,cn.jsx)(r_,ts({as:null==i?void 0:i.RightArrowButton,size:"small","aria-label":h,title:h,edge:"start",disabled:c,onClick:f},y,{className:cb(S.button,y.className),ownerState:ts({},w,y,{hidden:u}),children:g?(0,cn.jsx)(b,{}):(0,cn.jsx)(x,{})}))]}))}));Nu("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);Uf("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),Uf("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((({theme:e})=>ts({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium}))),Uf("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Uf(py,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto"}),Uf(YS,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((({theme:e,ownerState:t})=>ts({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"},"year"===t.openView&&{transform:"rotate(180deg)"})));const i_=Nu("PrivatePickersYear",["root","modeDesktop","modeMobile","yearButton","selected","disabled"]);Uf("div",{name:"PrivatePickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${i_.modeDesktop}`]:t.modeDesktop},{[`&.${i_.modeMobile}`]:t.modeMobile}]})((({ownerState:e})=>ts({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==e?void 0:e.wrapperVariant)&&{flexBasis:"25%"}))),Uf("button",{name:"PrivatePickersYear",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${i_.disabled}`]:t.disabled},{[`&.${i_.selected}`]:t.selected}]})((({theme:e})=>ts({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:Ju(e.palette.action.active,e.palette.action.hoverOpacity)},[`&.${i_.disabled}`]:{color:e.palette.text.secondary},[`&.${i_.selected}`]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}})));Nu("MuiYearPicker",["root"]);Uf("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",maxHeight:"304px"});const a_=Uf("div")({overflowX:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"});typeof navigator<"u"&&/(android)/i.test(navigator.userAgent);Nu("MuiCalendarPicker",["root","viewTransitionContainer"]);Uf(a_,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),Uf(US,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({});const s_=36;Nu("MuiClockPointer",["root","thumb"]);Uf("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>ts({width:2,backgroundColor:e.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},t.shouldAnimate&&{transition:e.transitions.create(["transform","height"])}))),Uf("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e,ownerState:t})=>ts({width:4,height:4,backgroundColor:e.palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${e.palette.primary.main}`,boxSizing:"content-box"},t.hasSelected&&{backgroundColor:e.palette.primary.main})));Nu("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);Uf("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)}))),Uf("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),Uf("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),Uf("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})((({ownerState:e})=>ts({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},e.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}))),Uf("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:e.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}))),Uf(py,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((({theme:e,ownerState:t})=>ts({zIndex:1,position:"absolute",bottom:t.ampmInClock?64:8,left:8},"am"===t.meridiemMode&&{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.light}}))),Uf(py,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((({theme:e,ownerState:t})=>ts({zIndex:1,position:"absolute",bottom:t.ampmInClock?64:8,right:8},"pm"===t.meridiemMode&&{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.light}})));const l_=Nu("MuiClockNumber",["root","selected","disabled"]);Uf("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${l_.disabled}`]:t.disabled},{[`&.${l_.selected}`]:t.selected}]})((({theme:e,ownerState:t})=>ts({height:s_,width:s_,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:e.palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:e.palette.background.paper},[`&.${l_.selected}`]:{color:e.palette.primary.contrastText},[`&.${l_.disabled}`]:{pointerEvents:"none",color:e.palette.text.disabled}},t.inner&&ts({},e.typography.body2,{color:e.palette.text.secondary}))));Nu("MuiClockPicker",["root","arrowSwitcher"]);Uf(a_,{name:"MuiClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),Uf(o_,{name:"MuiClockPicker",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15});function c_(e){return Au("MuiPickersToolbar",e)}const u_=Nu("MuiPickersToolbar",["root","content","penIconButton","penIconButtonLandscape"]),d_=Uf("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>ts({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}))),p_=Uf(rS,{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((({ownerState:e})=>ts({flex:1},!e.isLandscape&&{alignItems:"center"}))),f_=Uf(py,{name:"MuiPickersToolbar",slot:"PenIconButton",overridesResolver:(e,t)=>[{[`&.${u_.penIconButtonLandscape}`]:t.penIconButtonLandscape},t.penIconButton]})({}),h_=e=>"clock"===e?(0,cn.jsx)(XS,{color:"inherit"}):(0,cn.jsx)(JS,{color:"inherit"}),m_=B.forwardRef((function(e,t){const n=cf({props:e,name:"MuiPickersToolbar"}),{children:r,className:o,getMobileKeyboardInputViewButtonText:i,isLandscape:a,isMobileKeyboardViewOpen:s,landscapeDirection:l="column",toggleMobileKeyboardView:c,toolbarTitle:u,viewType:d="calendar"}=n,p=n,f=RS(),h=(e=>{const{classes:t,isLandscape:n}=e;return Ed({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},c_,t)})(p);return(0,cn.jsxs)(d_,{ref:t,className:cb(h.root,o),ownerState:p,children:[(0,cn.jsx)(by,{color:"text.secondary",variant:"overline",children:u}),(0,cn.jsxs)(p_,{container:!0,justifyContent:"space-between",className:h.content,ownerState:p,direction:a?l:"row",alignItems:a?"flex-start":"flex-end",children:[r,(0,cn.jsx)(f_,{onClick:c,className:h.penIconButton,ownerState:p,color:"inherit","aria-label":i?i(s,d):f.inputModeToggleButtonAriaLabel(s,d),children:s?h_(d):(0,cn.jsx)(ZS,{color:"inherit"})})]})]})}));Nu("MuiDatePickerToolbar",["root","title"]);Uf(m_,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Uf(by,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})((({ownerState:e})=>ts({},e.isLandscape&&{margin:"auto 16px auto auto"})));Nu("MuiPickersPopper",["root","paper"]);Uf(ew,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({zIndex:e.zIndex.modal}))),Uf($b,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({ownerState:e})=>ts({transformOrigin:"top center",outline:0},"top"===e.placement&&{transformOrigin:"bottom center"})));Nu("MuiCalendarOrClockPicker",["root","mobileKeyboardInputView"]);Uf("div",{name:"MuiCalendarOrClockPicker",slot:"MobileKeyboardInputView",overridesResolver:(e,t)=>t.mobileKeyboardInputView})({padding:"16px 24px"}),Uf("div",{name:"MuiCalendarOrClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})((({ownerState:e})=>ts({display:"flex",flexDirection:"column"},e.isLandscape&&{flexDirection:"row"})));Uf(Kw)({[`& .${Pw.container}`]:{outline:0},[`& .${Pw.paper}`]:{outline:0,minWidth:320}}),Uf(Yw)({"&:first-of-type":{padding:0}});function g_(e){return Au("PrivatePickersToolbarText",e)}const v_=Nu("PrivatePickersToolbarText",["root","selected"]),b_=["className","selected","value"],y_=Uf(by,{name:"PrivatePickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${v_.selected}`]:t.selected}]})((({theme:e})=>({transition:e.transitions.create("color"),color:e.palette.text.secondary,[`&.${v_.selected}`]:{color:e.palette.text.primary}}))),x_=B.forwardRef((function(e,t){const{className:n,value:r}=e,o=vs(e,b_),i=(e=>{const{classes:t,selected:n}=e;return Ed({root:["root",n&&"selected"]},g_,t)})(e);return(0,cn.jsx)(y_,ts({ref:t,className:cb(n,i.root),component:"span"},o,{children:r}))}));Uf(vw,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"});Nu("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","separator"]);Uf(m_,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",[`& .${u_.penIconButton}`]:ts({position:"absolute",top:8},"rtl"===e.direction?{left:8}:{right:8})}))),Uf("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),Uf("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex"}),Uf(x_,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default"});Nu("MuiDateTimePickerTabs",["root"]);Uf(AS,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})((({ownerState:e,theme:t})=>ts({boxShadow:`0 -1px 0 0 inset ${t.palette.divider}`},"desktop"===e.wrapperVariant&&{order:1,boxShadow:`0 1px 0 0 inset ${t.palette.divider}`,[`& .${SS.indicator}`]:{bottom:"auto",top:0}})));const w_=Nu("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]);Uf(m_,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({[`& .${u_.penIconButtonLandscape}`]:{marginTop:"auto"}}),Uf(x_,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),Uf("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${w_.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${w_.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})((({theme:e,ownerState:t})=>ts({display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},t.isLandscape&&{marginTop:"auto"},"rtl"===e.direction&&{flexDirection:"row-reverse"}))),Uf("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${w_.ampmLabel}`]:t.ampmLabel},{[`&.${w_.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})((({ownerState:e})=>ts({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},e.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},{[`& .${w_.ampmLabel}`]:{fontSize:17}})));function S_(e,t,n){return(t=Pd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function __(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 E_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?__(Object(n),!0).forEach((function(t){S_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):__(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T_(e,t){if(e){if("string"==typeof e)return k_(e,t);var n={}.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)?k_(e,t):void 0}}function C_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||T_(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.")}()}function O_(e,t){if(null==e)return{};var n,r,o=vs(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var I_=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function M_(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,f=e.value,h=O_(e,I_),m=C_((0,B.useState)(void 0!==s?s:n),2),g=m[0],v=m[1],b=C_((0,B.useState)(void 0!==l?l:o),2),y=b[0],x=b[1],w=C_((0,B.useState)(void 0!==f?f:a),2),S=w[0],_=w[1],E=(0,B.useCallback)((function(e,t){"function"==typeof c&&c(e,t),_(e)}),[c]),k=(0,B.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),v(void 0!==n?n:e)}),[u]),T=(0,B.useCallback)((function(){"function"==typeof p&&p(),x(!0)}),[p]),C=(0,B.useCallback)((function(){"function"==typeof d&&d(),x(!1)}),[d]),O=void 0!==s?s:g,I=void 0!==l?l:y,M=void 0!==f?f:S;return E_(E_({},h),{},{inputValue:O,menuIsOpen:I,onChange:E,onInputChange:k,onMenuClose:C,onMenuOpen:T,value:M})}function D_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pd(r.key),r)}}function j_(e){return(j_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(A_=function(){return!!e})()}function N_(e){var t=A_();return function(){var n,r=j_(e);if(t){var o=j_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==Nd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Db(e)}(this,n)}}function P_(e){return function(e){if(Array.isArray(e))return k_(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var R_=B.useLayoutEffect,L_=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],F_=function(){};function U_(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function B_(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(U_(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var z_=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===Nd(e)&&null!==e?[e]:[]},K_=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,E_({},O_(e,L_))},$_=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(n??{},i(t,e),a)}};function V_(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function H_(e){return V_(e)?window.pageYOffset:e.scrollTop}function W_(e,t){V_(e)?window.scrollTo(0,t):e.scrollTop=t}function Y_(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:F_,o=H_(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);W_(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function q_(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?W_(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&W_(e,Math.max(t.offsetTop-o,0))}function G_(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}var J_=!1,X_={get passive(){return J_=!0}},Z_=typeof window<"u"?window:{};Z_.addEventListener&&Z_.removeEventListener&&(Z_.addEventListener("p",F_,X_),Z_.removeEventListener("p",F_,!1));var Q_=J_;function eE(e){return null!=e}function tE(e,t,n){return e?t:n}var nE=["children","innerProps"],rE=["children","innerProps"];function oE(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),p=d.bottom,f=d.height,h=d.top,m=n.offsetParent.getBoundingClientRect().top,g=a?window.innerHeight:function(e){return V_(e)?window.innerHeight:e.clientHeight}(l),v=H_(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),x=m-y,w=g-h,S=x+v,_=u-v-h,E=p-g+v+b,k=v+h-y,T=160;switch(o){case"auto":case"bottom":if(w>=f)return{placement:"bottom",maxHeight:t};if(_>=f&&!a)return i&&Y_(l,E,T),{placement:"bottom",maxHeight:t};if(!a&&_>=r||a&&w>=r)return i&&Y_(l,E,T),{placement:"bottom",maxHeight:a?w-b:_-b};if("auto"===o||a){var C=t,O=a?x:S;return O>=r&&(C=Math.min(O-b-s,t)),{placement:"top",maxHeight:C}}if("bottom"===o)return i&&W_(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(x>=f)return{placement:"top",maxHeight:t};if(S>=f&&!a)return i&&Y_(l,k,T),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&x>=r){var I=t;return(!a&&S>=r||a&&x>=r)&&(I=a?x-y:S-y),i&&Y_(l,k,T),{placement:"top",maxHeight:I}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var iE,aE=function(e){return"auto"===e?"bottom":e},sE=(0,B.createContext)(null),lE=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=((0,B.useContext)(sE)||{}).setPortalPlacement,c=(0,B.useRef)(null),u=C_((0,B.useState)(r),2),d=u[0],p=u[1],f=C_((0,B.useState)(null),2),h=f[0],m=f[1],g=s.spacing.controlHeight;return R_((function(){var e=c.current;if(e){var t="fixed"===i,s=oE({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});p(s.maxHeight),m(s.placement),null==l||l(s.placement)}}),[r,o,i,a,n,l,g]),t({ref:c,placerProps:E_(E_({},e),{},{placement:h||aE(o),maxHeight:d})})},cE=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Zl("div",ts({},$_(e,"menu",{menu:!0}),{ref:n},r),t)},uE=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return E_({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},dE=uE,pE=uE,fE=["size"],hE=["innerProps","isRtl","size"];var mE={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},gE=function(e){var t=e.size,n=O_(e,fE);return Zl("svg",ts({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:mE},n))},vE=function(e){return Zl(gE,ts({size:20},e),Zl("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},bE=function(e){return Zl(gE,ts({size:20},e),Zl("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},yE=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return E_({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},xE=yE,wE=yE,SE=tc(iE||(iE=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),_E=function(e){var t=e.delay,n=e.offset;return Zl("span",{css:ec({animation:"".concat(SE," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},EE=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Zl("div",ts({ref:o},$_(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},kE=["data"],TE=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return Zl("div",ts({},$_(e,"group",{group:!0}),s),Zl(i,ts({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),Zl("div",null,t))},CE=["innerRef","isDisabled","isHidden","inputClassName"],OE={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},IE={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":E_({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},OE)},ME=function(e){return E_({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},OE)},DE=function(e){var t=e.cx,n=e.value,r=K_(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=O_(r,CE);return Zl("div",ts({},$_(e,"input",{"input-container":!0}),{"data-value":n||""}),Zl("input",ts({className:t({input:!0},s),ref:o,style:ME(a),disabled:i},l)))},jE=function(e){var t=e.children,n=e.innerProps;return Zl("div",n,t)};var AE=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return Zl(l,{data:r,innerProps:E_(E_({},$_(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},Zl(c,{data:r,innerProps:E_({},$_(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Zl(u,{data:r,innerProps:E_(E_({},$_(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},NE=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Zl("div",ts({},$_(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},PE=function(e){var t=e.children,n=e.innerProps;return Zl("div",ts({},$_(e,"placeholder",{placeholder:!0}),n),t)},RE=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Zl("div",ts({},$_(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},LE={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Zl("div",ts({},$_(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Zl(vE,null))},Control:EE,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Zl("div",ts({},$_(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Zl(bE,null))},DownChevron:bE,CrossIcon:vE,Group:TE,GroupHeading:function(e){var t=K_(e);t.data;var n=O_(t,kE);return Zl("div",ts({},$_(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Zl("div",ts({},$_(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Zl("span",ts({},t,$_(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:DE,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=O_(e,hE);return Zl("div",ts({},$_(E_(E_({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Zl(_E,{delay:0,offset:n}),Zl(_E,{delay:160,offset:!0}),Zl(_E,{delay:320,offset:!n}))},Menu:cE,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Zl("div",ts({},$_(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,B.useRef)(null),l=(0,B.useRef)(null),c=C_((0,B.useState)(aE(i)),2),u=c[0],d=c[1],p=(0,B.useMemo)((function(){return{setPortalPlacement:d}}),[]),f=C_((0,B.useState)(null),2),h=f[0],m=f[1],g=(0,B.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[u]+t;(n!==(null==h?void 0:h.offset)||e.left!==(null==h?void 0:h.rect.left)||e.width!==(null==h?void 0:h.rect.width))&&m({offset:n,rect:e})}}),[r,a,u,null==h?void 0:h.offset,null==h?void 0:h.rect.left,null==h?void 0:h.rect.width]);R_((function(){g()}),[g]);var v=(0,B.useCallback)((function(){"function"==typeof l.current&&(l.current(),l.current=null),r&&s.current&&(l.current=tg(r,s.current,g,{elementResize:"ResizeObserver"in window}))}),[r,g]);R_((function(){v()}),[v]);var b=(0,B.useCallback)((function(e){s.current=e,v()}),[v]);if(!t&&"fixed"!==a||!h)return null;var y=Zl("div",ts({ref:b},$_(E_(E_({},e),{},{offset:h.offset,position:a,rect:h.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Zl(sE.Provider,{value:p},t?(0,ca.createPortal)(y,t):y)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=O_(e,rE);return Zl("div",ts({},$_(E_(E_({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=O_(e,nE);return Zl("div",ts({},$_(E_(E_({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:AE,MultiValueContainer:jE,MultiValueLabel:jE,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Zl("div",ts({role:"button"},n),t||Zl(vE,{size:14}))},Option:NE,Placeholder:PE,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Zl("div",ts({},$_(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:RE,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Zl("div",ts({},$_(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},FE=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function UE(e,t){return!!(e===t||FE(e)&&FE(t))}function BE(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!UE(e[n],t[n]))return!1;return!0}for(var zE={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},KE=function(e){return Zl("span",ts({css:zE},e))},$E={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},VE=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,f=s.isMulti,h=s.isOptionDisabled,m=s.isSearchable,g=s.menuIsOpen,v=s.options,b=s.screenReaderStatus,y=s.tabSelectsValue,x=s.isLoading,w=s["aria-label"],S=s["aria-live"],_=(0,B.useMemo)((function(){return E_(E_({},$E),u||{})}),[u]),E=(0,B.useMemo)((function(){var e,n="";if(t&&_.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?d(c):"",p=o||s||void 0,f=p?p.map(d):[],m=E_({isDisabled:c&&h(c,a),label:u,labels:f},t);n=_.onChange(m)}return n}),[t,_,h,a,d]),k=(0,B.useMemo)((function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&_.onFocus){var s={focused:t,label:d(t),isDisabled:h(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=_.onFocus(s)}return e}),[n,r,d,h,_,o,a,c]),T=(0,B.useMemo)((function(){var e="";if(g&&v.length&&!x&&_.onFilter){var t=b({count:o.length});e=_.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,g,_,v,b,x]),C="initial-input-focus"===(null==t?void 0:t.action),O=(0,B.useMemo)((function(){var e="";if(_.guidance){var t=r?"value":g?"menu":"input";e=_.guidance({"aria-label":w,context:t,isDisabled:n&&h(n,a),isMulti:f,isSearchable:m,tabSelectsValue:y,isInitialFocus:C})}return e}),[w,n,r,f,h,m,g,_,a,y,C]),I=Zl(B.Fragment,null,Zl("span",{id:"aria-selection"},E),Zl("span",{id:"aria-focused"},k),Zl("span",{id:"aria-results"},T),Zl("span",{id:"aria-guidance"},O));return Zl(B.Fragment,null,Zl(KE,{id:l},C&&I),Zl(KE,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!C&&I))},HE=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],WE=new RegExp("["+HE.map((function(e){return e.letters})).join("")+"]","g"),YE={},qE=0;qE<HE.length;qE++)for(var GE=HE[qE],JE=0;JE<GE.letters.length;JE++)YE[GE.letters[JE]]=GE.base;var XE=function(e){return e.replace(WE,(function(e){return YE[e]}))},ZE=function(e,t){void 0===t&&(t=BE);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(XE),QE=function(e){return e.replace(/^\s+|\s+$/g,"")},ek=function(e){return"".concat(e.label," ").concat(e.value)},tk=["innerRef"];function nk(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.entries(e).filter((function(e){var t=C_(e,1)[0];return!n.includes(t)})).reduce((function(e,t){var n=C_(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(O_(e,tk),"onExited","in","enter","exit","appear");return Zl("input",ts({ref:t},n,{css:ec({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var rk=["boxSizing","height","overflow","paddingRight","position"],ok={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ik(e){e.cancelable&&e.preventDefault()}function ak(e){e.stopPropagation()}function sk(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function lk(){return"ontouchstart"in window||navigator.maxTouchPoints}var ck=!!(typeof window<"u"&&window.document&&window.document.createElement),uk=0,dk={capture:!1,passive:!1};var pk=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},fk={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function hk(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=(0,B.useRef)(!1),s=(0,B.useRef)(!1),l=(0,B.useRef)(0),c=(0,B.useRef)(null),u=(0,B.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,p=l.clientHeight,f=c.current,h=t>0,m=d-p-u,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>m?(n&&!a.current&&n(e),f.scrollTop=d,g=!0,a.current=!0):!h&&-t>u&&(o&&!s.current&&o(e),f.scrollTop=0,g=!0,s.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),d=(0,B.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,B.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=(0,B.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),h=(0,B.useCallback)((function(e){if(e){var t=!!Q_&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}}),[f,p,d]),m=(0,B.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))}),[f,p,d]);return(0,B.useEffect)((function(){if(t){var e=c.current;return h(e),function(){m(e)}}}),[t,h,m]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,B.useRef)({}),i=(0,B.useRef)(null),a=(0,B.useCallback)((function(e){if(ck){var t=document.body,n=t&&t.style;if(r&&rk.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&uk<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(ok).forEach((function(e){var t=ok[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&lk()&&(t.addEventListener("touchmove",ik,dk),e&&(e.addEventListener("touchstart",sk,dk),e.addEventListener("touchmove",ak,dk))),uk+=1}}),[r]),s=(0,B.useCallback)((function(e){if(ck){var t=document.body,n=t&&t.style;uk=Math.max(uk-1,0),r&&uk<1&&rk.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&lk()&&(t.removeEventListener("touchmove",ik,dk),e&&(e.removeEventListener("touchstart",sk,dk),e.removeEventListener("touchmove",ak,dk)))}}),[r]);return(0,B.useEffect)((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}({isEnabled:n});return Zl(B.Fragment,null,n&&Zl("div",{onClick:pk,css:fk}),t((function(e){o(e),i(e)})))}var mk={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},gk=function(e){var t=e.name,n=e.onFocus;return Zl("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:mk,value:"",onChange:function(){}})};function vk(e){var t;return typeof window<"u"&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function bk(){return vk(/^Mac/i)}function yk(){return vk(/^iPhone/i)||vk(/^iPad/i)||bk()&&navigator.maxTouchPoints>1}var xk,wk={clearIndicator:wE,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return E_({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:xE,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return E_({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return E_({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return E_(E_({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},IE),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return E_({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:pE,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return E_((S_(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),S_(n,"position","absolute"),S_(n,"width","100%"),S_(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return E_({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return E_({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return E_({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return E_({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:dE,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return E_({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return E_({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return E_({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return E_({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Sk={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},_k={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:G_(),captureMenuScroll:!G_(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=E_({ignoreCase:!0,ignoreAccents:!0,stringify:ek,trim:!0,matchFrom:"any"},xk),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?QE(t):t,c=a?QE(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=ZE(l),c=XE(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Ek(e,t,n,r){return{type:"option",data:t,isDisabled:jk(e,t,n),isSelected:Ak(e,t,n),label:Mk(e,t),value:Dk(e,t),index:r}}function kk(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Ek(e,n,t,r)})).filter((function(t){return Ok(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Ek(e,n,t,r);return Ok(e,i)?i:void 0})).filter(eE)}function Tk(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,P_(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Ck(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,P_(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function Ok(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!Pk(e)||!i)&&Nk(e,{label:a,value:s,data:o},r)}var Ik=function(e,t){var n,r=null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id;return r||null},Mk=function(e,t){return e.getOptionLabel(t)},Dk=function(e,t){return e.getOptionValue(t)};function jk(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Ak(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Dk(e,t);return n.some((function(t){return Dk(e,t)===r}))}function Nk(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Pk=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Rk=1,Lk=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gb(e,t)}(n,e);var t=N_(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=bk()||yk(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(P_(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=tE(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(tE(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=tE(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Ik(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return Ck(kk(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return B_.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Mk(r.props,e)},r.getOptionValue=function(e){return Dk(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=wk[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return function(e){return E_(E_({},LE),e.components)}(r.props)},r.buildCategorizedOptions=function(){return kk(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Tk(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:E_({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&V_(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return Pk(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,h=f.focusedOption,m=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing||e.shiftKey||!c||!d||!h||p&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h||r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++Rk),r.state.selectValue=z_(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=Ik(o,i[a])}return r}return function(e,t,n){t&&D_(e.prototype,t),n&&D_(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&q_(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!o&&!n&&e.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(q_(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Sk):E_(E_({},Sk),this.props.theme):Sk}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return jk(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Ak(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Nk(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,f=this.commonProps,h=r||this.getElementId("input"),m=E_(E_(E_({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?B.createElement(c,ts({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},m)):B.createElement(nk,ts({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:F_,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,f=c.inputValue,h=c.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue,b=m.isFocused;if(!this.hasValue()||!u)return f?null:B.createElement(s,ts({},l,{key:"placeholder",isDisabled:d,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),h);if(p)return g.map((function(t,a){var s=t===v,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return B.createElement(n,ts({},l,{components:{Container:r,Label:o,Remove:i},isFocused:s,isDisabled:d,key:c,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var y=g[0];return B.createElement(a,ts({},l,{data:y,isDisabled:d}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return B.createElement(e,ts({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return B.createElement(e,ts({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return B.createElement(n,ts({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return B.createElement(e,ts({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,h=p.inputValue,m=p.isLoading,g=p.loadingMessage,v=p.minMenuHeight,b=p.maxMenuHeight,y=p.menuIsOpen,x=p.menuPlacement,w=p.menuPosition,S=p.menuPortalTarget,_=p.menuShouldBlockScroll,E=p.menuShouldScrollIntoView,k=p.noOptionsMessage,T=p.onMenuScrollToTop,C=p.onMenuScrollToBottom;if(!y)return null;var O,I=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,p=d===o,f=i?void 0:function(){return e.onOptionHover(o)},h=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:h,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return B.createElement(c,ts({},u,{innerProps:g,data:o,isDisabled:i,isSelected:a,key:m,label:s,type:r,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())O=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return B.createElement(n,ts({},u,{key:s,data:o,options:i,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return I(t,"".concat(t.index))}));else if(m){var M=g({inputValue:h});if(null===M)return null;O=B.createElement(s,u,M)}else{var D=k({inputValue:h});if(null===D)return null;O=B.createElement(l,u,D)}var j={minMenuHeight:v,maxMenuHeight:b,menuPlacement:x,menuPosition:w,menuShouldScrollIntoView:E},A=B.createElement(lE,ts({},u,j),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return B.createElement(o,ts({},u,j,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:a}),B.createElement(hk,{captureEnabled:f,onTopArrive:T,onBottomArrive:C,lockEnabled:_},(function(t){return B.createElement(i,ts({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:s,focusedOption:d}),O)})))}));return S||"fixed"===w?B.createElement(a,ts({},u,{appendTo:S,controlElement:this.controlRef,menuPlacement:x,menuPosition:w}),A):A}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!r)return B.createElement(gk,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return B.createElement("input",{name:i,type:"hidden",value:l})}var c=s.length>0?s.map((function(t,n){return B.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):B.createElement("input",{name:i,type:"hidden",value:""});return B.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return B.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return B.createElement(VE,ts({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,c=i.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return B.createElement(r,ts({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),B.createElement(t,ts({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),B.createElement(o,ts({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),B.createElement(n,ts({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,h=z_(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var g=d?function(e,t){return Tk(kk(e,t))}(e,h):[],v=d?Ck(kk(e,h),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:y,focusedOptionId:Ik(v,y),focusableOptionsWithIds:v,focusedValue:b,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,S=a&&s;return a&&!S&&(w={value:tE(f,h,h[0]||null),options:h,action:"initial-input-focus"},S=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),E_(E_(E_({},m),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:S})}}]),n}(B.Component);Lk.defaultProps=_k;var Fk=(0,B.forwardRef)((function(e,t){var n=M_(e);return B.createElement(Lk,ts({ref:t},n))})),Uk=Fk,Bk=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];var zk=(0,B.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,r=e.cacheOptions,o=void 0!==r&&r,i=e.loadOptions;e.options;var a=e.isLoading,s=void 0!==a&&a,l=e.onInputChange,c=e.filterOption,u=void 0===c?null:c,d=O_(e,Bk),p=d.inputValue,f=(0,B.useRef)(void 0),h=(0,B.useRef)(!1),m=C_((0,B.useState)(Array.isArray(n)?n:void 0),2),g=m[0],v=m[1],b=C_((0,B.useState)(typeof p<"u"?p:""),2),y=b[0],x=b[1],w=C_((0,B.useState)(!0===n),2),S=w[0],_=w[1],E=C_((0,B.useState)(void 0),2),k=E[0],T=E[1],C=C_((0,B.useState)([]),2),O=C[0],I=C[1],M=C_((0,B.useState)(!1),2),D=M[0],j=M[1],A=C_((0,B.useState)({}),2),N=A[0],P=A[1],R=C_((0,B.useState)(void 0),2),L=R[0],F=R[1],U=C_((0,B.useState)(void 0),2),z=U[0],K=U[1];o!==z&&(P({}),K(o)),n!==L&&(v(Array.isArray(n)?n:void 0),F(n)),(0,B.useEffect)((function(){return h.current=!0,function(){h.current=!1}}),[]);var $=(0,B.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,B.useEffect)((function(){!0===n&&$(y,(function(e){h.current&&(v(e||[]),_(!!f.current))}))}),[]);var V=(0,B.useCallback)((function(e,t){var n=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,l);if(!n)return f.current=void 0,x(""),T(""),I([]),_(!1),void j(!1);if(o&&N[n])x(n),T(n),I(N[n]),_(!1),j(!1);else{var r=f.current={};x(n),_(!0),j(!k),$(n,(function(e){h&&r===f.current&&(f.current=void 0,_(!1),T(n),I(e||[]),j(!1),P(e?E_(E_({},N),{},S_({},n,e)):N))}))}}),[o,$,k,N,l]),H=D?[]:y&&k?O:g||[];return E_(E_({},d),{},{options:H,isLoading:S||s,onInputChange:V,filterOption:u})}(e),r=M_(n);return B.createElement(Lk,ts({ref:t},r))})),Kk=zk;const $k="check-48c1869b",Vk="check--disabled-3f793e27",Hk="check__input-92dff7a9",Wk="check__indicator-0ac86462",Yk="check__indicator--hover-c4064110",qk="check__indicator--indeterminate-33c0c00a",Gk="check__icon-e76c1b87",Jk="check__icon--check-e0ab9856",Xk="check__icon--indeterminate-dc93d769",Zk="check__tooltip-icon-e8045891",Qk="check__extra-content-7ade4e97",eT=e=>{const{id:t,label:n,value:r,className:o,disabled:i=!1,onChange:a,hideLabel:s=!1,extraContent:l,checked:c,defaultChecked:u,indeterminate:d,hover:p,name:f,tooltip:h,...m}=e,[g,v]=B.useState(u||!1),b=B.useRef(null),y=B.useMemo((()=>d?"mixed":a&&typeof c<"u"?c:g),[d,a,c,g]),x=ua($k,{[Vk]:i});return(0,cn.jsxs)("div",{"data-name":"check",className:o,...m,children:[(0,cn.jsxs)(PY,{gutter:0,children:[(0,cn.jsxs)(RY,{width:"auto",children:[(0,cn.jsx)("input",{id:t,value:r,name:f,type:"checkbox",disabled:i,checked:"mixed"!==y&&y,"aria-checked":y,onChange:e=>{typeof c>"u"&&v(null==e?void 0:e.target.checked),null==a||a(r,null==e?void 0:e.target.checked)},className:Hk}),(0,cn.jsxs)("div",{"aria-hidden":"true",onClick:()=>{var e;return null==(e=b.current)?void 0:e.click()},className:ua(Wk,{[Yk]:p,[qk]:d}),children:[(0,cn.jsx)(KY,{size:16,name:"remove",className:ua(Gk,Xk)}),(0,cn.jsx)(KY,{size:16,name:"check",className:ua(Gk,Jk)})]})]}),(0,cn.jsx)(RY,{children:(0,cn.jsxs)("label",{ref:b,className:x,htmlFor:t,children:[(0,cn.jsx)("span",{className:ua({"visually-hidden":s}),children:n}),h&&(0,cn.jsxs)(Fv,{children:[(0,cn.jsx)(Bv,{children:(0,cn.jsx)(KY,{name:"info",color:"brand",size:16,display:"inline",className:Zk})}),(0,cn.jsx)(Uv,{children:h})]})]})})]}),l&&(0,cn.jsx)("div",{className:Qk,children:l})]})},tT={select__control:"select__control-c52fb518","select--invalid":"select--invalid-a28d479c","select__control--focused":"select__control--focused-666f5665",select__arrow:"select__arrow-f088db27","select__menu-portal":"select__menu-portal-83a0138d",select__menu:"select__menu-36546a54","select__menu-list":"select__menu-list-1db27a34","select__menu-list-inner":"select__menu-list-inner-65d1bbd0","select__menu-list-footer":"select__menu-list-footer-8ebb4c1b",select__option:"select__option-a57e0e71","select__option--focused":"select__option--focused-421543c0","select__option--selected":"select__option--selected-3d192b35","select__option--disabled":"select__option--disabled-ffe87ec9","select--small":"select--small-9131190c",select__input:"select__input-ff08a918","select__multi-value-item":"select__multi-value-item-0ca3b242",select__checkbox:"select__checkbox-2412f21a",select:"select-40793e72",select__group:"select__group-4bbb5fe8","select__group-heading":"select__group-heading-e20b5f3f","select__multi-value-clear":"select__multi-value-clear-3603e9b1","select--tags-row":"select--tags-row-8b3eeef0","select--searchable":"select--searchable-c0c07c33","select--tags-stack":"select--tags-stack-8ee56ad9"},nT=e=>{const t=ua(tT.select__control,e.className,{[tT["select__control--focused"]]:e.isFocused});return(0,cn.jsx)(LE.Control,{...e,className:t})},rT=e=>(0,cn.jsx)(LE.Input,{...e,className:ua(e.className,tT.select__input),isHidden:void 0!==e.selectProps.inputIsHidden?e.selectProps.inputIsHidden:e.isHidden}),oT=e=>(0,cn.jsx)(LE.Menu,{...e,className:ua(e.className,tT.select__menu)}),iT=e=>(0,cn.jsx)(LE.MenuPortal,{...e,className:ua(e.className,tT["select__menu-portal"])}),aT=(0,B.forwardRef)(((e,t)=>{const{options:n,defaultOptions:r,id:o,name:i,iconName:a="arrow_drop_down",label:s,required:l,value:c,defaultValue:u,tagsDirection:d="row",onChange:p,onInputChange:f,inputValue:h,loadOptions:m,isLoading:g,isTagRemovable:v=!1,openMenuOnFocus:b=!1,openMenuOnClick:y=!0,tabSelectsValue:x=!1,disabled:w=!1,className:S,hideLabel:_=!1,helper:E,placeholder:k,invalid:T,size:C,async:O=!1,renderOption:I,renderMessageListFooter:M,noOptionsMessage:D,loadingMessage:j,multiple:A=!1,closeMenuOnSelect:N=!A,blurInputOnSelect:P=!1,autoFocus:R=!1,isClearable:L=!0,isClearIndicatorVisible:F=!1,isSearchable:U=!0,menuIsOpen:z,onMenuClose:K,onMenuOpen:$,onBlur:V,inputIsHidden:H,optionGroupHeadingText:W={modifiers:"small",color:"subtle"},optionGroupBackgroundColor:Y,cacheOptions:q=!0,...G}=e,J=E?(null==E?void 0:E.id)??`${o}-helper`:void 0,X=B.useRef(null),{getLabel:Z}=IY();B.useImperativeHandle(t,(()=>X.current));const Q=e=>{var t;null==p||p(e),!P&&X.current&&(null==(t=X.current.inputRef)||t.focus())},ee=()=>(0,cn.jsx)(Vf,{name:a,size:24,className:tT.select__arrow}),te=e=>(0,cn.jsx)(LE.Placeholder,{...e,className:ua(e.className,"inline-block")}),ne=B.useCallback((e=>(0,cn.jsxs)("div",{className:tT["select__menu-list-wrapper"],children:[(0,cn.jsx)(LE.MenuList,{...e,className:ua(e.className,tT["select__menu-list"]),children:e.children}),M&&(0,cn.jsx)("div",{className:tT["select__menu-list-footer"],children:M(e)})]})),[M]),re=e=>A?(e=>{const t=ua(tT.select__option,{[tT["select__option--disabled"]]:e.isDisabled},{[tT["select__option--focused"]]:e.isFocused}),{tabIndex:n,...r}=e.innerProps;return(0,cn.jsx)(LE.Option,{...e,innerProps:{...r,role:"option","aria-selected":e.isSelected},className:t,children:I?I(e):(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)("span",{className:"sr-only",children:e.label}),(0,cn.jsx)(eT,{id:e.data.value,label:e.label,"aria-hidden":!0,className:tT.select__checkbox,value:e.data.value,name:e.data.value,checked:e.isSelected,onChange:(e,t)=>null,disabled:e.isDisabled,hover:e.isFocused})]})})})(e):(e=>{const t=ua(tT.select__option,{[tT["select__option--disabled"]]:e.isDisabled},{[tT["select__option--selected"]]:e.isSelected},{[tT["select__option--focused"]]:e.isFocused}),{tabIndex:n,...r}=e.innerProps;return(0,cn.jsx)(LE.Option,{...e,innerProps:{...r,role:"option","aria-selected":e.isSelected},className:t,children:I?I(e):e.children})})(e),oe=({children:e,components:{Remove:t},data:n,selectProps:r,removeProps:o,...i})=>(0,cn.jsxs)(eb,{color:"default",type:"secondary",className:ua(tT["select__multi-value-item"],{[tT["select__multi-value-item--big"]]:"small"!==C}),children:[e,v&&(0,cn.jsx)(t,{data:n,selectProps:r,innerProps:o})]}),ie=({data:e,innerProps:t})=>(0,cn.jsx)(Gf,{icon:{name:"clear",color:"muted"},className:tT["select__multi-value-clear"],visualType:"link",tabIndex:-1,...t,children:`${Z("remove")} ${e.label}`}),ae=({innerProps:{ref:e,...t}})=>F?(0,cn.jsx)(Gf,{icon:{name:"clear",color:"muted"},visualType:"link",tabIndex:-1,ref:e,...t,children:Z("clear")}):null,se=e=>{const t=ua(tT.select__group);return(0,cn.jsx)(LE.Group,{...e,className:t,children:e.children})},le=e=>{const t=ua(tT["select__group-heading"],Za(e.data.backgroundColor||Y||"transparent")),n=e.data.text||W;return(0,cn.jsx)(LE.GroupHeading,{...e,className:t,children:(0,cn.jsx)(Qa,{...n,children:e.data.label})})},ce=ua(tT.select,S,{[tT["select--invalid"]]:T||"error"===(null==E?void 0:E.type)},{[tT[`select--${C}`]]:C},{[tT[`select--tags-${d}`]]:d},{[tT["select--searchable"]]:U});return(0,cn.jsxs)("div",{"data-name":"select",...G,className:ce,children:[(0,cn.jsxs)("div",{className:tT.select__inner,children:[(0,cn.jsx)(Dq,{id:`${o}-input`,label:s,required:l,hideLabel:_,size:C}),(()=>{const e={ClearIndicator:ae,DropdownIndicator:ee,IndicatorSeparator:()=>null,MenuPortal:iT,Menu:oT,MenuList:ne,Option:re,Control:nT,Input:rT,MultiValue:oe,MultiValueRemove:ie,Placeholder:te,Group:se,GroupHeading:le},t=O?Kk:Uk;return(0,cn.jsx)(t,{id:o,"aria-describedby":J,autoFocus:R,ref:X,instanceId:o,className:"select__wrapper",name:i,options:n,defaultOptions:r,value:c,defaultValue:u,cacheOptions:q,onChange:Q,onInputChange:f,onBlur:V,inputValue:h,inputId:`${o}-input`,loadOptions:m,isLoading:g,noOptionsMessage:D||(()=>Z("select.no-options")),loadingMessage:j||(()=>Z("select.loading")),classNamePrefix:"select",components:e,isDisabled:w,isSearchable:U,menuIsOpen:z,openMenuOnFocus:b,openMenuOnClick:y,tabSelectsValue:x,onMenuClose:K,onMenuOpen:$,placeholder:k||"",isClearable:L,backspaceRemovesValue:!0,menuShouldScrollIntoView:!0,isMulti:A,hideSelectedOptions:!1,closeMenuOnSelect:N,blurInputOnSelect:P,menuPosition:"fixed",menuPlacement:"auto",inputIsHidden:H,required:l,theme:e=>({...e,colors:{...e.colors,primary:"#005aa3",danger:"#b50000",dangerLight:"#fceeee"}}),styles:{input:e=>({...e,gridTemplateColumns:"0fr"})}})})()]}),E&&(0,cn.jsx)(sq,{...E,id:J})]})}));aT.displayName="Select";B.createContext({name:"",inputType:"radio",onChange:()=>null,currentValue:[]});const sT="radio-4b3e1d44",lT="radio--disabled-8a5be211",cT="radio__input-c3c0efa1",uT="radio__indicator-cb82800d",dT="radio__indicator--hover-a273c5aa",pT="radio__tooltip-icon-dc07bb33",fT="radio__extra-content-465c7a50",hT=e=>{const{id:t,label:n,value:r,className:o,disabled:i,onChange:a,hideLabel:s,extraContent:l,checked:c,defaultChecked:u,hover:d,name:p,tooltip:f,...h}=e,[m,g]=B.useState(u||!1),v=B.useRef(null),b=B.useMemo((()=>a&&typeof c<"u"?c:m),[a,m,c]),y=ua(sT,{[lT]:i});return(0,cn.jsxs)("div",{"data-name":"radio",className:o,...h,children:[(0,cn.jsxs)(PY,{gutter:0,children:[(0,cn.jsxs)(RY,{width:"auto",children:[(0,cn.jsx)("input",{id:t,value:r,name:p,type:"radio",disabled:i,checked:b,onChange:e=>{typeof c>"u"&&g(null==e?void 0:e.target.checked),null==a||a(r,null==e?void 0:e.target.checked)},className:cT}),(0,cn.jsx)("div",{"aria-hidden":"true",onClick:()=>{var e;return null==(e=v.current)?void 0:e.click()},className:ua(uT,{[dT]:d})})]}),(0,cn.jsx)(RY,{children:(0,cn.jsxs)("label",{ref:v,className:y,htmlFor:t,children:[(0,cn.jsx)("span",{className:ua({"visually-hidden":s}),children:n}),f&&(0,cn.jsxs)(Fv,{children:[(0,cn.jsx)(Bv,{children:(0,cn.jsx)(KY,{name:"info",color:"brand",size:16,display:"inline",className:pT})}),(0,cn.jsx)(Uv,{children:f})]})]})})]}),l&&(0,cn.jsx)("div",{className:fT,children:l})]})};var mT={exports:{}};!function(e){e.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:Y(e)}function r(e){return s(e)?e:q(e)}function o(e){return l(e)?e:G(e)}function i(e){return a(e)&&!c(e)?e:J(e)}function a(e){return!(!e||!e[d])}function s(e){return!(!e||!e[p])}function l(e){return!(!e||!e[f])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[h])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=o,n.Set=i;var d="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",f="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",m="delete",g=5,v=1<<g,b=v-1,y={},x={value:!1},w={value:!1};function S(e){return e.value=!1,e}function _(e){e&&(e.value=!0)}function E(){}function k(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function T(e){return void 0===e.size&&(e.size=e.__iterate(O)),e.size}function C(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?T(e)+t:t}function O(){return!0}function I(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function M(e,t){return j(e,t,0)}function D(e,t){return j(e,t,t)}function j(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var A=0,N=1,P=2,R="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",F=R||L;function U(e){this.next=e}function B(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function z(){return{value:void 0,done:!0}}function K(e){return!!H(e)}function $(e){return e&&"function"==typeof e.next}function V(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(R&&e[R]||e[L]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function Y(e){return null==e?ae():a(e)?e.toSeq():ce(e)}function q(e){return null==e?ae().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function G(e){return null==e?ae():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function J(e){return(null==e?ae():a(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=A,U.VALUES=N,U.ENTRIES=P,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[F]=function(){return this},t(Y,n),Y.of=function(){return Y(arguments)},Y.prototype.toSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq {","}")},Y.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Y.prototype.__iterate=function(e,t){return de(this,e,t,!0)},Y.prototype.__iterator=function(e,t){return pe(this,e,t,!0)},t(q,Y),q.prototype.toKeyedSeq=function(){return this},t(G,Y),G.of=function(){return G(arguments)},G.prototype.toIndexedSeq=function(){return this},G.prototype.toString=function(){return this.__toString("Seq [","]")},G.prototype.__iterate=function(e,t){return de(this,e,t,!1)},G.prototype.__iterator=function(e,t){return pe(this,e,t,!1)},t(J,Y),J.of=function(){return J(arguments)},J.prototype.toSetSeq=function(){return this},Y.isSeq=ie,Y.Keyed=q,Y.Set=J,Y.Indexed=G;var X,Z,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ie(e){return!(!e||!e[ee])}function ae(){return X||(X=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():$(e)?new oe(e).fromEntrySeq():K(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return W(e)?new te(e):$(e)?new oe(e):K(e)?new re(e):void 0}function de(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function pe(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new U((function(){var e=o[n?i-a:a];return a++>i?z():B(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function fe(e,t){return t?he(t,e,"",{"":e}):me(e)}function he(e,t,n,r){return Array.isArray(t)?e.call(r,n,G(t).map((function(n,r){return he(e,n,r,t)}))):ge(t)?e.call(r,n,q(t).map((function(n,r){return he(e,n,r,t)}))):t}function me(e){return Array.isArray(e)?G(e).map(me).toList():ge(e)?q(e).map(me).toMap():e}function ge(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ve(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function be(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ve(o[1],e)&&(n||ve(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var d=!0,p=t.__iterate((function(t,r){if(n?!e.has(t):o?!ve(t,e.get(r,y)):!ve(e.get(r,y),t))return d=!1,!1}));return d&&e.size===p}function ye(e,t){if(!(this instanceof ye))return new ye(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Z)return Z;Z=this}}function xe(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(xe(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(Q)return Q;Q=this}}function Se(){throw TypeError("Abstract")}function _e(){}function Ee(){}function ke(){}Y.prototype[ee]=!0,t(te,G),te.prototype.get=function(e,t){return this.has(e)?this._array[C(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new U((function(){return o>r?z():B(e,o,n[t?r-o++:o++])}))},t(ne,q),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new U((function(){var a=r[t?o-i:i];return i++>o?z():B(e,a,n[a])}))},ne.prototype[h]=!0,t(re,G),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=V(this._iterable),r=0;if($(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=V(this._iterable);if(!$(n))return new U(z);var r=0;return new U((function(){var t=n.next();return t.done?t:B(e,r++,t.value)}))},t(oe,G),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,o=0;o<r.length;)if(!1===e(r[o],o++,this))return o;for(var i;!(i=n.next()).done;){var a=i.value;if(r[o]=a,!1===e(a,o++,this))break}return o},oe.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new U((function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return B(e,o,r[o++])}))},t(ye,G),ye.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ye.prototype.get=function(e,t){return this.has(e)?this._value:t},ye.prototype.includes=function(e){return ve(this._value,e)},ye.prototype.slice=function(e,t){var n=this.size;return I(e,t,n)?this:new ye(this._value,D(t,n)-M(e,n))},ye.prototype.reverse=function(){return this},ye.prototype.indexOf=function(e){return ve(this._value,e)?0:-1},ye.prototype.lastIndexOf=function(e){return ve(this._value,e)?this.size:-1},ye.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ye.prototype.__iterator=function(e,t){var n=this,r=0;return new U((function(){return r<n.size?B(e,r++,n._value):z()}))},ye.prototype.equals=function(e){return e instanceof ye?ve(this._value,e._value):be(e)},t(we,G),we.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},we.prototype.get=function(e,t){return this.has(e)?this._start+C(this,e)*this._step:t},we.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},we.prototype.slice=function(e,t){return I(e,t,this.size)?this:(e=M(e,this.size),(t=D(t,this.size))<=e?new we(0,0):new we(this.get(e,this._end),this.get(t,this._end),this._step))},we.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},we.prototype.lastIndexOf=function(e){return this.indexOf(e)},we.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===e(o,i,this))return i+1;o+=t?-r:r}return i},we.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;return new U((function(){var a=o;return o+=t?-r:r,i>n?z():B(e,i++,a)}))},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:be(this,e)},t(Se,n),t(_e,Se),t(Ee,Se),t(ke,Se),Se.Keyed=_e,Se.Indexed=Ee,Se.Set=ke;var Te="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Ce(e){return e>>>1&1073741824|3221225471&e}function Oe(e){if(!1===e||null==e||"function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Ce(n)}if("string"===t)return e.length>Ue?Ie(e):Me(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return De(e);if("function"==typeof e.toString)return Me(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Ie(e){var t=Ke[e];return void 0===t&&(t=Me(e),ze===Be&&(ze=0,Ke={}),ze++,Ke[e]=t),t}function Me(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Ce(t)}function De(e){var t;if(Re&&void 0!==(t=Pe.get(e))||void 0!==(t=e[Fe])||!Ae&&(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Fe])||void 0!==(t=Ne(e))))return t;if(t=++Le,1073741824&Le&&(Le=0),Re)Pe.set(e,t);else{if(void 0!==je&&!1===je(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Ae)Object.defineProperty(e,Fe,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Fe]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Fe]=t}}return t}var je=Object.isExtensible,Ae=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function Ne(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Pe,Re="function"==typeof WeakMap;Re&&(Pe=new WeakMap);var Le=0,Fe="__immutablehash__";"function"==typeof Symbol&&(Fe=Symbol(Fe));var Ue=16,Be=255,ze=0,Ke={};function $e(e){xe(e!==1/0,"Cannot perform this action with an infinite size.")}function Ve(e){return null==e?ot():He(e)&&!u(e)?e:ot().withMutations((function(t){var n=r(e);$e(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function He(e){return!(!e||!e[Ye])}t(Ve,_e),Ve.prototype.toString=function(){return this.__toString("Map {","}")},Ve.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ve.prototype.set=function(e,t){return it(this,e,t)},Ve.prototype.setIn=function(e,t){return this.updateIn(e,y,(function(){return t}))},Ve.prototype.remove=function(e){return it(this,e,y)},Ve.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return y}))},Ve.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ve.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=gt(this,Sn(e),t,n);return r===y?void 0:r},Ve.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},Ve.prototype.merge=function(){return pt(this,void 0,arguments)},Ve.prototype.mergeWith=function(t){return pt(this,t,e.call(arguments,1))},Ve.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Ve.prototype.mergeDeep=function(){return pt(this,ft,arguments)},Ve.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return pt(this,ht(t),n)},Ve.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Ve.prototype.sort=function(e){return Kt(dn(this,e))},Ve.prototype.sortBy=function(e,t){return Kt(dn(this,t,e))},Ve.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ve.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new E)},Ve.prototype.asImmutable=function(){return this.__ensureOwner()},Ve.prototype.wasAltered=function(){return this.__altered},Ve.prototype.__iterator=function(e,t){return new et(this,e,t)},Ve.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Ve.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ve.isMap=He;var We,Ye="@@__IMMUTABLE_MAP__@@",qe=Ve.prototype;function Ge(e,t){this.ownerID=e,this.entries=t}function Je(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return B(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(qe);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return We||(We=rt(0))}function it(e,t,n){var r,o;if(e._root){var i=S(x),a=S(w);if(r=at(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===y?-1:1:0)}else{if(n===y)return e;o=1,r=new Ge(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function at(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===y?e:(_(s),_(a),new Qe(t,r,[o,i]))}function st(e){return e.constructor===Qe||e.constructor===Ze}function lt(e,t,n,r,o){if(e.keyHash===r)return new Ze(t,r,[e.entry,o]);var i,a=(0===n?e.keyHash:e.keyHash>>>n)&b,s=(0===n?r:r>>>n)&b;return new Je(t,1<<a|1<<s,a===s?[lt(e,t,n+g,r,o)]:(i=new Qe(t,r,o),a<s?[e,i]:[i,e]))}function ct(e,t,n,r){e||(e=new E);for(var o=new Qe(e,Oe(n),[n,r]),i=0;i<t.length;i++){var a=t[i];o=o.update(e,0,void 0,a[0],a[1])}return o}function ut(e,t,n,r){for(var o=0,i=0,a=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(o|=l,a[i++]=u)}return new Je(e,o,a)}function dt(e,t,n,r,o){for(var i=0,a=new Array(v),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[i++]:void 0;return a[r]=o,new Xe(e,i+1,a)}function pt(e,t,n){for(var o=[],i=0;i<n.length;i++){var s=n[i],l=r(s);a(s)||(l=l.map((function(e){return fe(e)}))),o.push(l)}return mt(e,t,o)}function ft(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ve(e,t)?e:t}function ht(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return ve(t,o)?t:o}}function mt(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,y,(function(e){return e===y?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)})):e.constructor(n[0])}function gt(e,t,n,r){var o=e===y,i=t.next();if(i.done){var a=o?n:e,s=r(a);return s===a?e:s}xe(o||e&&e.set,"invalid keyPath");var l=i.value,c=o?y:e.get(l,y),u=gt(c,t,n,r);return u===c?e:u===y?e.remove(l):(o?ot():e).set(l,u)}function vt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function bt(e,t,n,r){var o=r?e:k(e);return o[t]=n,o}function yt(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i}function xt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)a===t&&(i=1),o[a]=e[a+i];return o}qe[Ye]=!0,qe[m]=qe.remove,qe.removeIn=qe.deleteIn,Ge.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ve(n,o[i][0]))return o[i][1];return r},Ge.prototype.update=function(e,t,n,r,o,i,a){for(var s=o===y,l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(_(a),(s||!d)&&_(i),!s||1!==l.length){if(!d&&!s&&l.length>=wt)return ct(e,l,r,o);var p=e&&e===this.ownerID,f=p?l:k(l);return d?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,o]:f.push([r,o]),p?(this.entries=f,this):new Ge(e,f)}},Je.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=1<<((0===e?t:t>>>e)&b),i=this.bitmap;return i&o?this.nodes[vt(i&o-1)].get(e+g,t,n,r):r},Je.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&b,l=1<<s,c=this.bitmap,u=!!(c&l);if(!u&&o===y)return this;var d=vt(c&l-1),p=this.nodes,f=u?p[d]:void 0,h=at(f,e,t+g,n,r,o,i,a);if(h===f)return this;if(!u&&h&&p.length>=St)return dt(e,p,c,s,h);if(u&&!h&&2===p.length&&st(p[1^d]))return p[1^d];if(u&&h&&1===p.length&&st(h))return h;var m=e&&e===this.ownerID,v=u?h?c:c^l:c|l,x=u?h?bt(p,d,h,m):xt(p,d,m):yt(p,d,h,m);return m?(this.bitmap=v,this.nodes=x,this):new Je(e,v,x)},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=(0===e?t:t>>>e)&b,i=this.nodes[o];return i?i.get(e+g,t,n,r):r},Xe.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&b,l=o===y,c=this.nodes,u=c[s];if(l&&!u)return this;var d=at(u,e,t+g,n,r,o,i,a);if(d===u)return this;var p=this.count;if(u){if(!d&&--p<_t)return ut(e,c,p,s)}else p++;var f=e&&e===this.ownerID,h=bt(c,s,d,f);return f?(this.count=p,this.nodes=h,this):new Xe(e,p,h)},Ze.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ve(n,o[i][0]))return o[i][1];return r},Ze.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Oe(r));var s=o===y;if(n!==this.keyHash)return s?this:(_(a),_(i),lt(this,e,t,n,[r,o]));for(var l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(_(a),(s||!d)&&_(i),s&&2===u)return new Qe(e,this.keyHash,l[1^c]);var p=e&&e===this.ownerID,f=p?l:k(l);return d?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,o]:f.push([r,o]),p?(this.entries=f,this):new Ze(e,this.keyHash,f)},Qe.prototype.get=function(e,t,n,r){return ve(n,this.entry[0])?this.entry[1]:r},Qe.prototype.update=function(e,t,n,r,o,i,a){var s=o===y,l=ve(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(_(a),s?void _(i):l?e&&e===this.ownerID?(this.entry[1]=o,this):new Qe(e,this.keyHash,[r,o]):(_(i),lt(this,e,t,Oe(r),[r,o])))},Ge.prototype.iterate=Ze.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Je.prototype.iterate=Xe.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},Qe.prototype.iterate=function(e,t){return e(this.entry)},t(et,U),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return tt(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){var i=r.nodes[this._reverse?n-o:o];if(i){if(i.entry)return tt(e,i.entry);t=this._stack=nt(i,t)}continue}t=this._stack=this._stack.__prev}return z()};var wt=v/4,St=v/2,_t=v/4;function Et(e){var t=Nt();if(null==e)return t;if(kt(e))return e;var n=o(e),r=n.size;return 0===r?t:($e(r),r>0&&r<v?At(0,r,g,null,new Ot(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function kt(e){return!(!e||!e[Tt])}t(Et,Ee),Et.of=function(){return this(arguments)},Et.prototype.toString=function(){return this.__toString("List [","]")},Et.prototype.get=function(e,t){if((e=C(this,e))>=0&&e<this.size){var n=Ft(this,e+=this._origin);return n&&n.array[e&b]}return t},Et.prototype.set=function(e,t){return Pt(this,e,t)},Et.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},Et.prototype.insert=function(e,t){return this.splice(e,0,t)},Et.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=g,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Nt()},Et.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Ut(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},Et.prototype.pop=function(){return Ut(this,0,-1)},Et.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){Ut(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},Et.prototype.shift=function(){return Ut(this,1)},Et.prototype.merge=function(){return Bt(this,void 0,arguments)},Et.prototype.mergeWith=function(t){return Bt(this,t,e.call(arguments,1))},Et.prototype.mergeDeep=function(){return Bt(this,ft,arguments)},Et.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Bt(this,ht(t),n)},Et.prototype.setSize=function(e){return Ut(this,0,e)},Et.prototype.slice=function(e,t){var n=this.size;return I(e,t,n)?this:Ut(this,M(e,n),D(t,n))},Et.prototype.__iterator=function(e,t){var n=0,r=jt(this,t);return new U((function(){var t=r();return t===Dt?z():B(e,n++,t)}))},Et.prototype.__iterate=function(e,t){for(var n,r=0,o=jt(this,t);(n=o())!==Dt&&!1!==e(n,r++,this););return r},Et.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?At(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},Et.isList=kt;var Tt="@@__IMMUTABLE_LIST__@@",Ct=Et.prototype;function Ot(e,t){this.array=e,this.ownerID=t}Ct[Tt]=!0,Ct[m]=Ct.remove,Ct.setIn=qe.setIn,Ct.deleteIn=Ct.removeIn=qe.removeIn,Ct.update=qe.update,Ct.updateIn=qe.updateIn,Ct.mergeIn=qe.mergeIn,Ct.mergeDeepIn=qe.mergeDeepIn,Ct.withMutations=qe.withMutations,Ct.asMutable=qe.asMutable,Ct.asImmutable=qe.asImmutable,Ct.wasAltered=qe.wasAltered,Ot.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&b;if(r>=this.array.length)return new Ot([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-g,n))===a&&i)return this}if(i&&!o)return this;var s=Lt(this,e);if(!i)for(var l=0;l<r;l++)s.array[l]=void 0;return o&&(s.array[r]=o),s},Ot.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&b;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-g,n))===i&&o===this.array.length-1)return this}var a=Lt(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var It,Mt,Dt={};function jt(e,t){var n=e._origin,r=e._capacity,o=zt(r),i=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,a){var s=a===o?i&&i.array:e&&e.array,l=a>n?0:n-a,c=r-a;return c>v&&(c=v),function(){if(l===c)return Dt;var e=t?--c:l++;return s&&s[e]}}function l(e,o,i){var s,l=e&&e.array,c=i>n?0:n-i>>o,u=1+(r-i>>o);return u>v&&(u=v),function(){for(;;){if(s){var e=s();if(e!==Dt)return e;s=null}if(c===u)return Dt;var n=t?--u:c++;s=a(l&&l[n],o-g,i+(n<<o))}}}}function At(e,t,n,r,o,i,a){var s=Object.create(Ct);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function Nt(){return It||(It=At(0,0,g))}function Pt(e,t,n){if((t=C(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?Ut(e,t).set(0,n):Ut(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,i=S(w);return t>=zt(e._capacity)?r=Rt(r,e.__ownerID,0,t,n,i):o=Rt(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):At(e._origin,e._capacity,e._level,o,r):e}function Rt(e,t,n,r,o,i){var a,s=r>>>n&b,l=e&&s<e.array.length;if(!l&&void 0===o)return e;if(n>0){var c=e&&e.array[s],u=Rt(c,t,n-g,r,o,i);return u===c?e:((a=Lt(e,t)).array[s]=u,a)}return l&&e.array[s]===o?e:(_(i),a=Lt(e,t),void 0===o&&s===a.array.length-1?a.array.pop():a.array[s]=o,a)}function Lt(e,t){return t&&e&&t===e.ownerID?e:new Ot(e?e.array.slice():[],t)}function Ft(e,t){if(t>=zt(e._capacity))return e._tail;if(t<1<<e._level+g){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&b],r-=g;return n}}function Ut(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new E,o=e._origin,i=e._capacity,a=o+t,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return e;if(a>=s)return e.clear();for(var l=e._level,c=e._root,u=0;a+u<0;)c=new Ot(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=g);u&&(a+=u,o+=u,s+=u,i+=u);for(var d=zt(i),p=zt(s);p>=1<<l+g;)c=new Ot(c&&c.array.length?[c]:[],r),l+=g;var f=e._tail,h=p<d?Ft(e,s-1):p>d?new Ot([],r):f;if(f&&p>d&&a<i&&f.array.length){for(var m=c=Lt(c,r),v=l;v>g;v-=g){var y=d>>>v&b;m=m.array[y]=Lt(m.array[y],r)}m.array[d>>>g&b]=f}if(s<i&&(h=h&&h.removeAfter(r,0,s)),a>=p)a-=p,s-=p,l=g,c=null,h=h&&h.removeBefore(r,0,a);else if(a>o||p<d){for(u=0;c;){var x=a>>>l&b;if(x!==p>>>l&b)break;x&&(u+=(1<<l)*x),l-=g,c=c.array[x]}c&&a>o&&(c=c.removeBefore(r,l,a-u)),c&&p<d&&(c=c.removeAfter(r,l,p-u)),u&&(a-=u,s-=u)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=l,e._root=c,e._tail=h,e.__hash=void 0,e.__altered=!0,e):At(a,s,l,c,h)}function Bt(e,t,n){for(var r=[],i=0,s=0;s<n.length;s++){var l=n[s],c=o(l);c.size>i&&(i=c.size),a(l)||(c=c.map((function(e){return fe(e)}))),r.push(c)}return i>e.size&&(e=e.setSize(i)),mt(e,t,r)}function zt(e){return e<v?0:e-1>>>g<<g}function Kt(e){return null==e?Ht():$t(e)?e:Ht().withMutations((function(t){var n=r(e);$e(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function $t(e){return He(e)&&u(e)}function Vt(e,t,n,r){var o=Object.create(Kt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Ht(){return Mt||(Mt=Vt(ot(),Nt()))}function Wt(e,t,n){var r,o,i=e._map,a=e._list,s=i.get(t),l=void 0!==s;if(n===y){if(!l)return e;a.size>=v&&a.size>=2*i.size?(o=a.filter((function(e,t){return void 0!==e&&s!==t})),r=o.toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Vt(r,o)}function Yt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function qt(e){this._iter=e,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Jt(e){this._iter=e,this.size=e.size}function Xt(e){var t=yn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=xn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===P){var r=e.__iterator(t,n);return new U((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===N?A:N,n)},t}function Zt(e,t,n){var r=yn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,y);return i===y?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate((function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(P,o);return new U((function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return B(r,s,t.call(n,a[1],s,e),o)}))},r}function Qt(e,t){var n=yn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Xt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=xn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=yn(e);return r&&(o.has=function(r){var o=e.get(r,y);return o!==y&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,y);return i!==y&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return e.__iterate((function(e,i,l){if(t.call(n,e,i,l))return s++,o(e,r?i:s-1,a)}),i),s},o.__iteratorUncached=function(o,i){var a=e.__iterator(P,i),s=0;return new U((function(){for(;;){var i=a.next();if(i.done)return i;var l=i.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return B(o,r?c:s++,u,i)}}))},o}function tn(e,t,n){var r=Ve().asMutable();return e.__iterate((function(o,i){r.update(t.call(n,o,i,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(u(e)?Kt():Ve()).asMutable();e.__iterate((function(i,a){o.update(t.call(n,i,a,e),(function(e){return(e=e||[]).push(r?[a,i]:i),e}))}));var i=bn(e);return o.map((function(t){return mn(e,i(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),I(t,n,o))return e;var i=M(t,o),a=D(n,o);if(i!=i||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=a-i;l==l&&(s=l<0?0:l);var c=yn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ie(e)&&s>=0&&(c.get=function(t,n){return(t=C(this,t))>=0&&t<s?e.get(t+i,n):n}),c.__iterateUncached=function(t,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=a++<i))return c++,!1!==t(e,r?n:c-1,o)&&c!==s})),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var o=0!==s&&e.__iterator(t,n),a=0,l=0;return new U((function(){for(;a++<i;)o.next();if(++l>s)return z();var e=o.next();return r||t===N?e:B(t,l-1,t===A?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++a&&r(e,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(P,o),s=!0;return new U((function(){if(!s)return z();var e=a.next();if(e.done)return e;var o=e.value,l=o[0],c=o[1];return t.call(n,c,l,i)?r===P?e:B(r,l,c,e):(s=!1,z())}))},r}function an(e,t,n,r){var o=yn(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,l=0;return e.__iterate((function(e,i,c){if(!s||!(s=t.call(n,e,i,c)))return l++,o(e,r?i:l-1,a)})),l},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=e.__iterator(P,i),l=!0,c=0;return new U((function(){var e,i,u;do{if((e=s.next()).done)return r||o===N?e:B(o,c++,o===A?void 0:e.value[1],e);var d=e.value;i=d[0],u=d[1],l&&(l=t.call(n,u,i,a))}while(l);return o===P?e:B(o,i,u,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&s(i)||l(e)&&l(i))return i}var c=new te(o);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function ln(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,o){var i=0,s=!1;function l(e,c){var u=this;e.__iterate((function(e,o){return(!t||c<t)&&a(e)?l(e,c+1):!1===r(e,n?o:i++,u)&&(s=!0),!s}),o)}return l(e,0),i},r.__iteratorUncached=function(r,o){var i=e.__iterator(r,o),s=[],l=0;return new U((function(){for(;i;){var e=i.next();if(!1===e.done){var c=e.value;if(r===P&&(c=c[1]),t&&!(s.length<t)||!a(c))return n?e:B(r,l++,c,e);s.push(i),i=c.__iterator(r,o)}else i=s.pop()}return z()}))},r}function cn(e,t,n){var r=bn(e);return e.toSeq().map((function(o,i){return r(t.call(n,o,i,e))})).flatten(!0)}function un(e,t){var n=yn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var o=this,i=0;return e.__iterate((function(e,r){return(!i||!1!==n(t,i++,o))&&!1!==n(e,i++,o)}),r),i},n.__iteratorUncached=function(n,r){var o,i=e.__iterator(N,r),a=0;return new U((function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?B(n,a++,t):B(n,a++,o.value,o)}))},n}function dn(e,t,n){t||(t=wn);var r=s(e),o=0,i=e.toSeq().map((function(t,r){return[r,t,o++,n?n(t,r,e):t]})).toArray();return i.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),r?q(i):l(e)?G(i):J(i)}function pn(e,t,n){if(t||(t=wn),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return fn(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return fn(t,e,n)?n:e}))}function fn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function hn(e,t,r){var o=yn(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(N,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map((function(e){return e=n(e),V(o?e.reverse():e)})),a=0,s=!1;return new U((function(){var n;return s||(n=i.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?z():B(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function mn(e,t){return ie(e)?t:e.constructor(t)}function gn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function vn(e){return $e(e.size),T(e)}function bn(e){return s(e)?r:l(e)?o:i}function yn(e){return Object.create((s(e)?q:l(e)?G:J).prototype)}function xn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Y.prototype.cacheResult.call(this)}function wn(e,t){return e>t?1:e<t?-1:0}function Sn(e){var t=V(e);if(!t){if(!W(e))throw new TypeError("Expected iterable or array-like: "+e);t=V(n(e))}return t}function _n(e,t){var n,r=function(i){if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var a=Object.keys(e);Cn(o,a),o.size=a.length,o._name=t,o._keys=a,o._defaultValues=e}this._map=Ve(i)},o=r.prototype=Object.create(En);return o.constructor=r,r}t(Kt,Ve),Kt.of=function(){return this(arguments)},Kt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Kt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Kt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ht()},Kt.prototype.set=function(e,t){return Wt(this,e,t)},Kt.prototype.remove=function(e){return Wt(this,e,y)},Kt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Kt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Kt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Kt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Vt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Kt.isOrderedMap=$t,Kt.prototype[h]=!0,Kt.prototype[m]=Kt.prototype.remove,t(Yt,q),Yt.prototype.get=function(e,t){return this._iter.get(e,t)},Yt.prototype.has=function(e){return this._iter.has(e)},Yt.prototype.valueSeq=function(){return this._iter.valueSeq()},Yt.prototype.reverse=function(){var e=this,t=Qt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Yt.prototype.map=function(e,t){var n=this,r=Zt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Yt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?vn(this):0,function(o){return e(o,t?--n:n++,r)}),t)},Yt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(N,t),r=t?vn(this):0;return new U((function(){var o=n.next();return o.done?o:B(e,t?--r:r++,o.value,o)}))},Yt.prototype[h]=!0,t(qt,G),qt.prototype.includes=function(e){return this._iter.includes(e)},qt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},qt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t),r=0;return new U((function(){var t=n.next();return t.done?t:B(e,r++,t.value,t)}))},t(Gt,J),Gt.prototype.has=function(e){return this._iter.includes(e)},Gt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Gt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t);return new U((function(){var t=n.next();return t.done?t:B(e,t.value,t.value,t)}))},t(Jt,q),Jt.prototype.entrySeq=function(){return this._iter.toSeq()},Jt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){gn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Jt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t);return new U((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){gn(r);var o=a(r);return B(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}}))},qt.prototype.cacheResult=Yt.prototype.cacheResult=Gt.prototype.cacheResult=Jt.prototype.cacheResult=xn,t(_n,_e),_n.prototype.toString=function(){return this.__toString(Tn(this)+" {","}")},_n.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},_n.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},_n.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=kn(this,ot()))},_n.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Tn(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:kn(this,n)},_n.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:kn(this,t)},_n.prototype.wasAltered=function(){return this._map.wasAltered()},_n.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},_n.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},_n.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?kn(this,t,e):(this.__ownerID=e,this._map=t,this)};var En=_n.prototype;function kn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Tn(e){return e._name||e.constructor.name||"Record"}function Cn(e,t){try{t.forEach(On.bind(void 0,e))}catch{}}function On(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){xe(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function In(e){return null==e?Rn():Mn(e)&&!u(e)?e:Rn().withMutations((function(t){var n=i(e);$e(n.size),n.forEach((function(e){return t.add(e)}))}))}function Mn(e){return!(!e||!e[jn])}En[m]=En.remove,En.deleteIn=En.removeIn=qe.removeIn,En.merge=qe.merge,En.mergeWith=qe.mergeWith,En.mergeIn=qe.mergeIn,En.mergeDeep=qe.mergeDeep,En.mergeDeepWith=qe.mergeDeepWith,En.mergeDeepIn=qe.mergeDeepIn,En.setIn=qe.setIn,En.update=qe.update,En.updateIn=qe.updateIn,En.withMutations=qe.withMutations,En.asMutable=qe.asMutable,En.asImmutable=qe.asImmutable,t(In,ke),In.of=function(){return this(arguments)},In.fromKeys=function(e){return this(r(e).keySeq())},In.prototype.toString=function(){return this.__toString("Set {","}")},In.prototype.has=function(e){return this._map.has(e)},In.prototype.add=function(e){return Nn(this,this._map.set(e,!0))},In.prototype.remove=function(e){return Nn(this,this._map.remove(e))},In.prototype.clear=function(){return Nn(this,this._map.clear())},In.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)i(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},In.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},In.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},In.prototype.merge=function(){return this.union.apply(this,arguments)},In.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},In.prototype.sort=function(e){return Ln(dn(this,e))},In.prototype.sortBy=function(e,t){return Ln(dn(this,t,e))},In.prototype.wasAltered=function(){return this._map.wasAltered()},In.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},In.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},In.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},In.isSet=Mn;var Dn,jn="@@__IMMUTABLE_SET__@@",An=In.prototype;function Nn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Pn(e,t){var n=Object.create(An);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Rn(){return Dn||(Dn=Pn(ot()))}function Ln(e){return null==e?Kn():Fn(e)?e:Kn().withMutations((function(t){var n=i(e);$e(n.size),n.forEach((function(e){return t.add(e)}))}))}function Fn(e){return Mn(e)&&u(e)}An[jn]=!0,An[m]=An.remove,An.mergeDeep=An.merge,An.mergeDeepWith=An.mergeWith,An.withMutations=qe.withMutations,An.asMutable=qe.asMutable,An.asImmutable=qe.asImmutable,An.__empty=Rn,An.__make=Pn,t(Ln,In),Ln.of=function(){return this(arguments)},Ln.fromKeys=function(e){return this(r(e).keySeq())},Ln.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Ln.isOrderedSet=Fn;var Un,Bn=Ln.prototype;function zn(e,t){var n=Object.create(Bn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Kn(){return Un||(Un=zn(Ht()))}function $n(e){return null==e?Gn():Vn(e)?e:Gn().unshiftAll(e)}function Vn(e){return!(!e||!e[Wn])}Bn[h]=!0,Bn.__empty=Kn,Bn.__make=zn,t($n,Ee),$n.of=function(){return this(arguments)},$n.prototype.toString=function(){return this.__toString("Stack [","]")},$n.prototype.get=function(e,t){var n=this._head;for(e=C(this,e);n&&e--;)n=n.next;return n?n.value:t},$n.prototype.peek=function(){return this._head&&this._head.value},$n.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):qn(e,t)},$n.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;$e(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):qn(t,n)},$n.prototype.pop=function(){return this.slice(1)},$n.prototype.unshift=function(){return this.push.apply(this,arguments)},$n.prototype.unshiftAll=function(e){return this.pushAll(e)},$n.prototype.shift=function(){return this.pop.apply(this,arguments)},$n.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Gn()},$n.prototype.slice=function(e,t){if(I(e,t,this.size))return this;var n=M(e,this.size);if(D(t,this.size)!==this.size)return Ee.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):qn(r,o)},$n.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?qn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},$n.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},$n.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new U((function(){if(r){var t=r.value;return r=r.next,B(e,n++,t)}return z()}))},$n.isStack=Vn;var Hn,Wn="@@__IMMUTABLE_STACK__@@",Yn=$n.prototype;function qn(e,t,n,r){var o=Object.create(Yn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Gn(){return Hn||(Hn=qn(0))}function Jn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Yn[Wn]=!0,Yn.withMutations=qe.withMutations,Yn.asMutable=qe.asMutable,Yn.asImmutable=qe.asImmutable,Yn.wasAltered=qe.wasAltered,n.Iterator=U,Jn(n,{toArray:function(){$e(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new qt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Yt(this,!0)},toMap:function(){return Ve(this.toKeyedSeq())},toObject:function(){$e(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Kt(this.toKeyedSeq())},toOrderedSet:function(){return Ln(s(this)?this.valueSeq():this)},toSet:function(){return In(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Gt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return $n(s(this)?this.valueSeq():this)},toList:function(){return Et(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ve(t,e)}))},entries:function(){return this.__iterator(P)},every:function(e,t){$e(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1})),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,o,i){if(e.call(t,r,o,i))return n=[o,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return $e(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){$e(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(A)},map:function(e,t){return mn(this,Zt(this,e,t))},reduce:function(e,t,n){var r,o;return $e(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Qt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return mn(this,dn(this,e))},values:function(){return this.__iterator(N)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return T(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return be(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(O)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Jt(this)},get:function(e,t){return this.find((function(t,n){return ve(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=Sn(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,y):y)===y)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return pn(this,e)},maxBy:function(e,t){return pn(this,t,e)},min:function(e){return pn(this,e?nr(e):ir)},minBy:function(e,t){return pn(this,t?nr(t):ir,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return mn(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ar(this))}});var Xn=n.prototype;Xn[d]=!0,Xn[F]=Xn.values,Xn.__toJS=Xn.toArray,Xn.__toStringMapper=rr,Xn.inspect=Xn.toSource=function(){return this.toString()},Xn.chain=Xn.flatMap,Xn.contains=Xn.includes,function(){try{Object.defineProperty(Xn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch{}}(),Jn(r,{flip:function(){return mn(this,Xt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ve(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ve(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map((function(o,i){return e.call(t,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Zn=r.prototype;function Qn(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function or(){return k(arguments)}function ir(e,t){return e<t?1:e>t?-1:0}function ar(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0,o=e.__iterate(n?t?function(e,t){r=31*r+lr(Oe(e),Oe(t))|0}:function(e,t){r=r+lr(Oe(e),Oe(t))|0}:t?function(e){r=31*r+Oe(e)|0}:function(e){r=r+Oe(e)|0});return sr(o,r)}function sr(e,t){return t=Te(t,3432918353),t=Te(t<<15|t>>>-15,461845907),t=Te(t<<13|t>>>-13,5),t=Te((t=t+3864292196^e)^t>>>16,2246822507),t=Ce((t=Te(t^t>>>13,3266489909))^t>>>16)}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)}Zn[p]=!0,Zn[F]=Xn.entries,Zn.__toJS=Xn.toObject,Zn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Jn(o,{toKeyedSeq:function(){return new Yt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Qt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=M(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(k(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return mn(this,ln(this,e,!1))},get:function(e,t){return(e=C(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=C(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return mn(this,un(this,e))},interleave:function(){var e=[this].concat(k(arguments)),t=hn(this.toSeq(),G.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),mn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return mn(this,an(this,e,t,!1))},zip:function(){return mn(this,hn(this,or,[this].concat(k(arguments))))},zipWith:function(e){var t=k(arguments);return t[0]=this,mn(this,hn(this,e,t))}}),o.prototype[f]=!0,o.prototype[h]=!0,Jn(i,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=Xn.includes,Jn(q,r.prototype),Jn(G,o.prototype),Jn(J,i.prototype),Jn(_e,r.prototype),Jn(Ee,o.prototype),Jn(ke,i.prototype);var cr={Iterable:n,Seq:Y,Collection:Se,Map:Ve,OrderedMap:Kt,List:Et,Stack:$n,Set:In,OrderedSet:Ln,Record:_n,Range:we,Repeat:ye,is:ve,fromJS:fe};return cr}()}(mT);var gT=mT.exports,vT=gT.OrderedMap,bT={createFromArray:function(e){return vT(e.map((function(e){return[e.getKey(),e]})))}},yT=bT;var xT=gT,wT=xT.Map,ST=xT.OrderedSet,_T=xT.Record,ET=ST(),kT={style:ET,entity:null},TT=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getStyle=function(){return this.get("style")},n.getEntity=function(){return this.get("entity")},n.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)},t.create=function(e){if(!e)return CT;var n=wT({style:ET,entity:null}).merge(e),r=OT.get(n);if(r)return r;var o=new t(n);return OT=OT.set(n,o),o},t.fromJS=function(e){var n=e.style,r=e.entity;return new t({style:Array.isArray(n)?ST(n):n,entity:Array.isArray(r)?ST(r):r})},t}(_T(kT)),CT=new TT,OT=wT([[wT(kT),CT]]);TT.EMPTY=CT;var IT=TT;var MT=function(e,t,n,r){if(e.size){var o=0;e.reduce((function(e,i,a){return t(e,i)||(n(e)&&r(o,a),o=a),i})),n(e.last())&&r(o,e.count())}};var DT=IT,jT=MT,AT=gT,NT=AT.List,PT=AT.Map,RT=AT.OrderedSet,LT=AT.Record,FT=AT.Repeat,UT=RT(),BT=LT({key:"",type:"unstyled",text:"",characterList:NT(),depth:0,data:PT()}),zT=function(e){function t(t){return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=NT(FT(DT.EMPTY,n.length))),e}(t))||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():UT},n.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},n.findStyleRanges=function(e,t){jT(this.getCharacterList(),KT,e,t)},n.findEntityRanges=function(e,t){jT(this.getCharacterList(),$T,e,t)},t}(BT);function KT(e,t){return e.getStyle()===t.getStyle()}function $T(e,t){return e.getEntity()===t.getEntity()}var VT=zT;var HT=IT,WT=MT,YT=gT,qT=YT.List,GT=YT.Map,JT=YT.OrderedSet,XT=YT.Record,ZT=YT.Repeat,QT=JT(),eC={parent:null,characterList:qT(),data:GT(),depth:0,key:"",text:"",type:"unstyled",children:qT(),prevSibling:null,nextSibling:null},tC=function(e,t){return e.getStyle()===t.getStyle()},nC=function(e,t){return e.getEntity()===t.getEntity()},rC=function(e){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eC;return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=qT(ZT(HT.EMPTY,n.length))),e}(t))||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():QT},n.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},n.getChildKeys=function(){return this.get("children")},n.getParentKey=function(){return this.get("parent")},n.getPrevSiblingKey=function(){return this.get("prevSibling")},n.getNextSiblingKey=function(){return this.get("nextSibling")},n.findStyleRanges=function(e,t){WT(this.getCharacterList(),tC,e,t)},n.findEntityRanges=function(e,t){WT(this.getCharacterList(),nC,e,t)},t}(XT(eC)),oC=rC,iC=IT,aC=gT.Map,sC={add:function(e,t,n){return lC(e,t,n,!0)},remove:function(e,t,n){return lC(e,t,n,!1)}};function lC(e,t,n,r){var o=e.getBlockMap(),i=t.getStartKey(),a=t.getStartOffset(),s=t.getEndKey(),l=t.getEndOffset(),c=o.skipUntil((function(e,t){return t===i})).takeUntil((function(e,t){return t===s})).concat(aC([[s,o.get(s)]])).map((function(e,t){var o,c;i===s?(o=a,c=l):(o=t===i?a:0,c=t===s?l:e.getLength());for(var u,d=e.getCharacterList();o<c;)u=d.get(o),d=d.set(o,r?iC.applyStyle(u,n):iC.removeStyle(u,n)),o++;return e.set("characterList",d)}));return e.merge({blockMap:o.merge(c),selectionBefore:t,selectionAfter:t})}var cC=sC,uC=IT;var dC=function(e,t,n,r){for(var o=t,i=e.getCharacterList();o<n;)i=i.set(o,uC.applyEntity(i.get(o),r)),o++;return e.set("characterList",i)},pC=dC,fC=gT;var hC=function(e,t,n){var r=e.getBlockMap(),o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),l=r.skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===a})).toOrderedMap().merge(fC.OrderedMap([[a,r.get(a)]])).map((function(e,t){var r=t===o?i:0,l=t===a?s:e.getLength();return pC(e,r,l,n)}));return e.merge({blockMap:r.merge(l),selectionBefore:t,selectionAfter:t})},mC={getRemovalRange:function(e,t,n,r,o){var i=n.split(" ");i=i.map((function(e,t){if("forward"===o){if(t>0)return" "+e}else if(t<i.length-1)return e+" ";return e}));for(var a,s=r,l=null,c=null,u=0;u<i.length;u++){if(e<(a=s+i[u].length)&&s<t)null!==l||(l=s),c=a;else if(null!==l)break;s=a}var d=r+n.length,p=l===r,f=c===d;return(!p&&f||p&&!f)&&("forward"===o?c!==d&&c++:l!==r&&l--),{start:l,end:c}}},gC=function(e){};var vC=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(gC(t),!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(i=new Error(t.replace(/%s/g,(function(){return String(r[a++])})))).name="Invariant Violation"}throw i.framesToPop=1,i}},bC=vC;var yC=function(e,t){var n=[];return e.findEntityRanges((function(e){return e.getEntity()===t}),(function(e,t){n.push({start:e,end:t})})),n.length||bC(!1),n},xC=mC,wC=yC,SC=vC;function _C(e,t,n,r,o,i,a){var s=n.getStartOffset(),l=n.getEndOffset(),c=e.__get(o).getMutability(),u=a?s:l;if("MUTABLE"===c)return n;var d=wC(t,o).filter((function(e){return u<=e.end&&u>=e.start}));1!=d.length&&SC(!1);var p=d[0];if("IMMUTABLE"===c)return n.merge({anchorOffset:p.start,focusOffset:p.end,isBackward:!1});i||(a?l=p.end:s=p.start);var f=xC.getRemovalRange(s,l,t.getText().slice(p.start,p.end),p.start,r);return n.merge({anchorOffset:f.start,focusOffset:f.end,isBackward:!1})}var EC=function(e,t,n,r,o){var i=r.getStartOffset(),a=r.getEndOffset(),s=t.getEntityAt(i),l=n.getEntityAt(a-1);if(!s&&!l)return r;var c=r;if(s&&s===l)c=_C(e,t,c,o,s,!0,!0);else if(s&&l){var u=_C(e,t,c,o,s,!1,!0),d=_C(e,n,c,o,l,!1,!1);c=c.merge({anchorOffset:u.getAnchorOffset(),focusOffset:d.getFocusOffset(),isBackward:!1})}else if(s){var p=_C(e,t,c,o,s,!1,!0);c=c.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(l){var f=_C(e,n,c,o,l,!1,!1);c=c.merge({focusOffset:f.getEndOffset(),isBackward:!1})}return c},kC={},TC=Math.pow(2,24);var CC=function(){for(var e;void 0===e||kC.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*TC).toString(32);return kC[e]=!0,e},OC=oC,IC=CC,MC=gT.OrderedMap,DC=function(e){return e.first()instanceof OC?function(e){var t,n={};return MC(e.withMutations((function(e){e.forEach((function(r,o){var i=r.getKey(),a=r.getNextSiblingKey(),s=r.getPrevSiblingKey(),l=r.getChildKeys(),c=r.getParentKey(),u=IC();if(n[i]=u,a&&(e.get(a)?e.setIn([a,"prevSibling"],u):e.setIn([i,"nextSibling"],null)),s&&(e.get(s)?e.setIn([s,"nextSibling"],u):e.setIn([i,"prevSibling"],null)),c&&e.get(c)){var d=e.get(c).getChildKeys();e.setIn([c,"children"],d.set(d.indexOf(r.getKey()),u))}else e.setIn([i,"parent"],null),t&&(e.setIn([t.getKey(),"nextSibling"],u),e.setIn([i,"prevSibling"],n[t.getKey()])),t=e.get(i);l.forEach((function(t){e.get(t)?e.setIn([t,"parent"],u):e.setIn([i,"children"],r.getChildKeys().filter((function(e){return e!==t})))}))}))})).toArray().map((function(e){return[n[e.getKey()],e.set("key",n[e.getKey()])]})))}(e):function(e){return MC(e.toArray().map((function(e){var t=IC();return[t,e.set("key",t)]})))}(e)},jC=IT,AC=MT,NC=vC;function PC(e,t,n){var r=t.getCharacterList(),o=n>0?r.get(n-1):void 0,i=n<r.count()?r.get(n):void 0,a=o?o.getEntity():void 0,s=i?i.getEntity():void 0;if(s&&s===a&&"MUTABLE"!==e.__get(s).getMutability()){for(var l,c=function(e,t,n){var r;return AC(e,(function(e,t){return e.getEntity()===t.getEntity()}),(function(e){return e.getEntity()===t}),(function(e,t){e<=n&&t>=n&&(r={start:e,end:t})})),"object"!=typeof r&&NC(!1),r}(r,s,n),u=c.start,d=c.end;u<d;)l=r.get(u),r=r.set(u,jC.applyEntity(l,null)),u++;return t.set("characterList",r)}return t}var RC=function(e,t){var n=e.getBlockMap(),r=e.getEntityMap(),o={},i=t.getStartKey(),a=t.getStartOffset(),s=n.get(i),l=PC(r,s,a);l!==s&&(o[i]=l);var c=t.getEndKey(),u=t.getEndOffset(),d=n.get(c);i===c&&(d=l);var p=PC(r,d,u);return p!==d&&(o[c]=p),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)},LC=DC,FC=RC,UC=function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=t.getEndKey(),i=t.getEndOffset(),a=FC(e,t).getBlockMap(),s=a.keySeq(),l=s.indexOf(n),c=s.indexOf(o)+1;return LC(a.slice(l,c).map((function(e,t){var a=e.getText(),s=e.getCharacterList();return n===o?e.merge({text:a.slice(r,i),characterList:s.slice(r,i)}):t===n?e.merge({text:a.slice(r),characterList:s.slice(r)}):t===o?e.merge({text:a.slice(0,i),characterList:s.slice(0,i)}):e})))};var BC=function(e,t,n){var r=e;if(n===r.count())t.forEach((function(e){r=r.push(e)}));else if(0===n)t.reverse().forEach((function(e){r=r.unshift(e)}));else{var o=r.slice(0,n),i=r.slice(n);r=o.concat(t,i).toList()}return r},zC=yT,KC=oC,$C=BC,VC=vC,HC=DC,WC=gT.List,YC=function(e,t,n,r,o,i){var a=n.first()instanceof KC,s=[],l=r.size,c=n.get(o),u=r.first(),d=r.last(),p=d.getLength(),f=d.getKey(),h=a&&(!c.getChildKeys().isEmpty()||!u.getChildKeys().isEmpty());n.forEach((function(e,t){t===o?(h?s.push(e):s.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),i=r.slice(0,t),a=o.slice(0,t),s=n.first();return e.merge({text:i+s.getText(),characterList:a.concat(s.getCharacterList()),type:i?e.getType():s.getType(),data:s.getData()})}(e,i,r)),r.slice(h?0:1,l-1).forEach((function(e){return s.push(e)})),s.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),i=r.length,a=r.slice(t,i),s=o.slice(t,i),l=n.last();return l.merge({text:l.getText()+a,characterList:l.getCharacterList().concat(s),data:l.getData()})}(e,i,r))):s.push(e)}));var m=zC.createFromArray(s);return a&&(m=function(e,t,n,r){return e.withMutations((function(t){var o=n.getKey(),i=r.getKey(),a=n.getNextSiblingKey(),s=n.getParentKey(),l=function(e,t){var n=e.getKey(),r=e,o=[];for(t.get(n)&&o.push(n);r&&r.getNextSiblingKey();){var i=r.getNextSiblingKey();if(!i)break;o.push(i),r=t.get(i)}return o}(r,e),c=l[l.length-1];if(t.get(i)?(t.setIn([o,"nextSibling"],i),t.setIn([i,"prevSibling"],o)):(t.setIn([o,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],o)),t.setIn([c,"nextSibling"],a),a&&t.setIn([a,"prevSibling"],c),l.forEach((function(e){return t.setIn([e,"parent"],s)})),s){var u=e.get(s).getChildKeys(),d=u.indexOf(o)+1,p=u.toArray();p.splice.apply(p,[d,0].concat(l)),t.setIn([s,"children"],WC(p))}}))}(m,0,c,u)),e.merge({blockMap:m,selectionBefore:t,selectionAfter:t.merge({anchorKey:f,anchorOffset:p,focusKey:f,focusOffset:p,isBackward:!1})})},qC=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";t.isCollapsed()||VC(!1);var o=e.getBlockMap(),i=HC(n),a=t.getStartKey(),s=t.getStartOffset(),l=o.get(a);return l instanceof KC&&(l.getChildKeys().isEmpty()||VC(!1)),1===i.size?function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",s=n.get(o),l=s.getText(),c=s.getCharacterList(),u=o,d=i+r.getText().length,p=null;switch(a){case"MERGE_OLD_DATA_TO_NEW_DATA":p=r.getData().merge(s.getData());break;case"REPLACE_WITH_NEW_DATA":p=r.getData()}var f=s.getType();l&&"unstyled"===f&&(f=r.getType());var h=s.merge({text:l.slice(0,i)+r.getText()+l.slice(i),characterList:$C(c,r.getCharacterList(),i),type:f,data:p});return e.merge({blockMap:n.set(o,h),selectionBefore:t,selectionAfter:t.merge({anchorKey:u,anchorOffset:d,focusKey:u,focusOffset:d,isBackward:!1})})}(e,t,o,i.first(),a,s,r):YC(e,t,o,i,a,s)},GC=BC,JC=vC,XC=gT.Repeat;var ZC=function(e,t,n,r){t.isCollapsed()||JC(!1);var o=null;if(null!=n&&(o=n.length),null==o||0===o)return e;var i=e.getBlockMap(),a=t.getStartKey(),s=t.getStartOffset(),l=i.get(a),c=l.getText(),u=l.merge({text:c.slice(0,s)+n+c.slice(s,l.getLength()),characterList:GC(l.getCharacterList(),XC(r,o).toList(),s)}),d=s+o;return e.merge({blockMap:i.set(a,u),selectionAfter:t.merge({anchorOffset:d,focusOffset:d})})},QC=gT.Map;var eO=function(e,t,n){var r=t.getStartKey(),o=t.getEndKey(),i=e.getBlockMap(),a=i.toSeq().skipUntil((function(e,t){return t===r})).takeUntil((function(e,t){return t===o})).concat(QC([[o,i.get(o)]])).map(n);return e.merge({blockMap:i.merge(a),selectionBefore:t,selectionAfter:t})},tO=oC,nO=function(e,t){if(!(e instanceof tO))return null;var n=e.getNextSiblingKey();if(n)return n;var r=e.getParentKey();if(!r)return null;for(var o=t.get(r);o&&!o.getNextSiblingKey();){var i=o.getParentKey();o=i?t.get(i):null}return o?o.getNextSiblingKey():null},rO=oC,oO=nO,iO=gT;iO.List;var aO=iO.Map,sO=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},lO=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var o=r.getParentKey();o&&n.push(o),r=o?t.get(o):null}return n},cO=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},uO=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},dO=function(e,t,n,r){return e.withMutations((function(o){if(sO(t.getKey(),o,(function(e){return e.merge({nextSibling:cO(e,o,r),prevSibling:uO(e,o,r)})})),sO(n.getKey(),o,(function(e){return e.merge({nextSibling:cO(e,o,r),prevSibling:uO(e,o,r)})})),lO(t.getKey(),r).forEach((function(e){return sO(e,o,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return o.get(e)})),nextSibling:cO(e,o,r),prevSibling:uO(e,o,r)})}))})),sO(t.getNextSiblingKey(),o,(function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})})),sO(t.getPrevSiblingKey(),o,(function(e){return e.merge({nextSibling:cO(e,o,r)})})),sO(n.getNextSiblingKey(),o,(function(e){return e.merge({prevSibling:uO(e,o,r)})})),sO(n.getPrevSiblingKey(),o,(function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})),lO(n.getKey(),r).forEach((function(e){sO(e,o,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return o.get(e)})),nextSibling:cO(e,o,r),prevSibling:uO(e,o,r)})}))})),function(e,t){var n=[];if(!e)return n;for(var r=oO(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?oO(o,t):null}return n}(n,r).forEach((function(e){return sO(e,o,(function(e){return e.merge({nextSibling:cO(e,o,r),prevSibling:uO(e,o,r)})}))})),null==e.get(t.getKey())&&null!=e.get(n.getKey())&&n.getParentKey()===t.getKey()&&null==n.getPrevSiblingKey()){var i=t.getPrevSiblingKey();sO(n.getKey(),o,(function(e){return e.merge({prevSibling:i})})),sO(i,o,(function(e){return e.merge({nextSibling:n.getKey()})}));var a=i?e.get(i):null,s=a?a.getParentKey():null;if(t.getChildKeys().forEach((function(e){sO(e,o,(function(e){return e.merge({parent:s})}))})),null!=s){var l=e.get(s);sO(s,o,(function(e){return e.merge({children:l.getChildKeys().concat(t.getChildKeys())})}))}sO(t.getChildKeys().find((function(t){return null===e.get(t).getNextSiblingKey()})),o,(function(e){return e.merge({nextSibling:t.getNextSiblingKey()})}))}}))},pO=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),o=e.slice(n);e=r.concat(o).toList()}return e},fO=function(e,t){if(t.isCollapsed())return e;var n,r=e.getBlockMap(),o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),l=r.get(o),c=r.get(a),u=l instanceof rO,d=[];if(u){var p=c.getChildKeys(),f=lO(a,r);c.getNextSiblingKey()&&(d=d.concat(f)),p.isEmpty()||(d=d.concat(f.concat([a]))),d=d.concat(lO(oO(c,r),r))}n=l===c?pO(l.getCharacterList(),i,s):l.getCharacterList().slice(0,i).concat(c.getCharacterList().slice(s));var h=l.merge({text:l.getText().slice(0,i)+c.getText().slice(s),characterList:n}),m=u&&0===i&&0===s&&c.getParentKey()===o&&null==c.getPrevSiblingKey()?aO([[o,null]]):r.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===a})).filter((function(e,t){return-1===d.indexOf(t)})).concat(aO([[a,null]])).map((function(e,t){return t===o?h:null})),g=r.merge(m).filter((function(e){return!!e}));return u&&l!==c&&(g=dO(g,l,c,r)),e.merge({blockMap:g,selectionBefore:t,selectionAfter:t.merge({anchorKey:o,anchorOffset:i,focusKey:o,focusOffset:i,isBackward:!1})})},hO=oC,mO=CC,gO=gT,vO=vC,bO=eO,yO=gO.List,xO=gO.Map,wO=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},SO=function(e,t){t.isCollapsed()||vO(!1);var n=t.getAnchorKey(),r=e.getBlockMap(),o=r.get(n),i=o.getText();if(!i){var a=o.getType();if("unordered-list-item"===a||"ordered-list-item"===a)return bO(e,t,(function(e){return e.merge({type:"unstyled",depth:0})}))}var s=t.getAnchorOffset(),l=o.getCharacterList(),c=mO(),u=o instanceof hO,d=o.merge({text:i.slice(0,s),characterList:l.slice(0,s)}),p=d.merge({key:c,text:i.slice(s),characterList:l.slice(s),data:xO()}),f=r.toSeq().takeUntil((function(e){return e===o})),h=r.toSeq().skipUntil((function(e){return e===o})).rest(),m=f.concat([[n,d],[c,p]],h).toOrderedMap();return u&&(o.getChildKeys().isEmpty()||vO(!1),m=function(e,t,n){return e.withMutations((function(e){var r=t.getKey(),o=n.getKey();wO(t.getParentKey(),e,(function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,i=t.toArray();return i.splice(n,0,o),e.merge({children:yO(i)})})),wO(t.getNextSiblingKey(),e,(function(e){return e.merge({prevSibling:o})})),wO(r,e,(function(e){return e.merge({nextSibling:o})})),wO(o,e,(function(e){return e.merge({prevSibling:r})}))}))}(m,d,p)),e.merge({blockMap:m,selectionBefore:t,selectionAfter:t.merge({anchorKey:c,anchorOffset:0,focusKey:c,focusOffset:0,isBackward:!1})})},_O=IT,EO=cC,kO=hC,TO=EC,CO=UC,OO=qC,IO=ZC,MO=vC,DO=eO,jO=RC,AO=fO,NO=SO,PO=gT.OrderedSet,RO={replaceText:function(e,t,n,r,o){var i=jO(e,t),a=AO(i,t),s=_O.create({style:r||PO(),entity:o||null});return IO(a,a.getSelectionAfter(),n,s)},insertText:function(e,t,n,r,o){return t.isCollapsed()||MO(!1),RO.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=CO(e,t),o=RO.removeRange(e,t,"backward");return RO.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",o=jO(e,t),i=AO(o,t);return OO(i,i.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var r,o,i,a;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),o=t.getFocusKey(),i=e.getBlockForKey(r),a=e.getBlockForKey(o);var s=t.getStartOffset(),l=t.getEndOffset(),c=i.getEntityAt(s),u=a.getEntityAt(l-1);if(r===o&&c&&c===u){var d=TO(e.getEntityMap(),i,a,t,n);return AO(e,d)}var p=jO(e,t);return AO(p,t)},splitBlock:function(e,t){var n=jO(e,t),r=AO(n,t);return NO(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return EO.add(e,t,n)},removeInlineStyle:function(e,t,n){return EO.remove(e,t,n)},setBlockType:function(e,t,n){return DO(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return DO(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return DO(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=jO(e,t);return kO(r,t,n)}},LO=RO;var FO=function(e){return Object.keys(e).map((function(t){return e[t]}))};function UO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var BO=MT,zO=FO,KO=gT,$O=KO.List,VO=KO.Repeat,HO=KO.Record,WO=function(){return!0},YO=HO({start:null,end:null}),qO=HO({start:null,end:null,decoratorKey:null,leaves:null}),GO={generate:function(e,t,n){var r=t.getLength();if(!r)return $O.of(new qO({start:0,end:0,decoratorKey:null,leaves:$O.of(new YO({start:0,end:0}))}));var o=[],i=n?n.getDecorations(t,e):$O(VO(null,r)),a=t.getCharacterList();return BO(i,XO,WO,(function(e,t){o.push(new qO({start:e,end:t,decoratorKey:i.get(e),leaves:JO(a.slice(e,t).toList(),e)}))})),$O(o)},fromJS:function(e){var t=e.leaves,n=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,["leaves"]);return new qO(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){UO(e,t,n[t])}))}return e}({},n,{leaves:null!=t?$O(Array.isArray(t)?t:zO(t)).map((function(e){return YO(e)})):null}))}};function JO(e,t){var n=[],r=e.map((function(e){return e.getStyle()})).toList();return BO(r,XO,WO,(function(e,r){n.push(new YO({start:e+t,end:r+t}))})),$O(n)}function XO(e,t){return e===t}var ZO=GO;var QO=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getType=function(){return this.get("type")},n.getMutability=function(){return this.get("mutability")},n.getData=function(){return this.get("data")},t}((0,gT.Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object})),eI=QO;var tI=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};function nI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rI=eI,oI=vC,iI=tI,aI=(0,gT.Map)(),sI=iI();function lI(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var cI={getLastCreatedEntityKey:function(){return lI("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),cI.__getLastCreatedEntityKey()},create:function(e,t,n){return lI("DraftEntity.create","contentState.createEntity"),cI.__create(e,t,n)},add:function(e){return lI("DraftEntity.add","contentState.addEntity"),cI.__add(e)},get:function(e){return lI("DraftEntity.get","contentState.getEntity"),cI.__get(e)},__getAll:function(){return aI},__loadWithEntities:function(e){aI=e,sI=iI()},mergeData:function(e,t){return lI("DraftEntity.mergeData","contentState.mergeEntityData"),cI.__mergeData(e,t)},replaceData:function(e,t){return lI("DraftEntity.replaceData","contentState.replaceEntityData"),cI.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return sI},__create:function(e,t,n){return cI.__add(new rI({type:e,mutability:t,data:n||{}}))},__add:function(e){return sI=iI(),aI=aI.set(sI,e),sI},__get:function(e){var t=aI.get(e);return t||oI(!1),t},__mergeData:function(e,t){var n=cI.__get(e),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nI(e,t,n[t])}))}return e}({},n.getData(),t),o=n.set("data",r);return aI=aI.set(e,o),o},__replaceData:function(e,t){var n=cI.__get(e).set("data",t);return aI=aI.set(e,n),n}},uI=cI;var dI=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},n.getAnchorKey=function(){return this.get("anchorKey")},n.getAnchorOffset=function(){return this.get("anchorOffset")},n.getFocusKey=function(){return this.get("focusKey")},n.getFocusOffset=function(){return this.get("focusOffset")},n.getIsBackward=function(){return this.get("isBackward")},n.getHasFocus=function(){return this.get("hasFocus")},n.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),o=this.getFocusKey();if(r===o&&r===e){var i=this.getStartOffset(),a=this.getEndOffset();return t<=i&&i<=n||t<=a&&a<=n}if(e!==r&&e!==o)return!1;var s=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=s&&n>=s},n.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},n.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},n.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},n.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},n.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}((0,gT.Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1})),pI=dI,fI=function(e){return!!(typeof window<"u"&&window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]},hI=new RegExp("\r","g");var mI=function(e){return e.replace(hI,"")};function gI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){vI(e,t,n[t])}))}return e}function vI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bI=yT,yI=IT,xI=VT,wI=oC,SI=uI,_I=pI,EI=CC,kI=FO,TI=fI,CI=gT,OI=mI,II=CI.List,MI=CI.Record,DI=CI.Repeat,jI=CI.Map,AI=CI.OrderedMap,NI=MI({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),PI=TI("draft_tree_data_support")?wI:xI,RI=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getEntityMap=function(){return SI},n.getBlockMap=function(){return this.get("blockMap")},n.getSelectionBefore=function(){return this.get("selectionBefore")},n.getSelectionAfter=function(){return this.get("selectionAfter")},n.getBlockForKey=function(e){return this.getBlockMap().get(e)},n.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},n.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},n.getBlockAfter=function(e){return this.getBlockMap().skipUntil((function(t,n){return n===e})).skip(1).first()},n.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil((function(t,n){return n===e})).skip(1).first()},n.getBlocksAsArray=function(){return this.getBlockMap().toArray()},n.getFirstBlock=function(){return this.getBlockMap().first()},n.getLastBlock=function(){return this.getBlockMap().last()},n.getPlainText=function(e){return this.getBlockMap().map((function(e){return e?e.getText():""})).join(e||"\n")},n.getLastCreatedEntityKey=function(){return SI.__getLastCreatedEntityKey()},n.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},n.createEntity=function(e,t,n){return SI.__create(e,t,n),this},n.mergeEntityData=function(e,t){return SI.__mergeData(e,t),this},n.replaceEntityData=function(e,t){return SI.__replaceData(e,t),this},n.addEntity=function(e){return SI.__add(e),this},n.getEntity=function(e){return SI.__get(e)},n.getAllEntities=function(){return SI.__getAll()},n.loadWithEntities=function(e){return SI.__loadWithEntities(e)},t.createFromBlockArray=function(e,n){var r=Array.isArray(e)?e:e.contentBlocks,o=bI.createFromArray(r),i=o.isEmpty()?new _I:_I.createEmpty(o.first().getKey());return new t({blockMap:o,entityMap:n||SI,selectionBefore:i,selectionAfter:i})},t.createFromText=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,r=e.split(n).map((function(e){return e=OI(e),new PI({key:EI(),text:e,type:"unstyled",characterList:II(DI(yI.EMPTY,e.length))})}));return t.createFromBlockArray(r)},t.fromJS=function(e){return new t(gI({},e,{blockMap:AI(e.blockMap).map(t.createContentBlockFromJS),selectionBefore:new _I(e.selectionBefore),selectionAfter:new _I(e.selectionAfter)}))},t.createContentBlockFromJS=function(e){var t=e.characterList;return new PI(gI({},e,{data:jI(e.data),characterList:null!=t?II((Array.isArray(t)?t:kI(t)).map((function(e){return yI.fromJS(e)}))):void 0}))},t}(NI),LI=RI,FI=vC,UI="LTR",BI=null;function zI(e){return e===UI||"RTL"===e}function KI(e){return zI(e)||FI(!1),e===UI?"ltr":"rtl"}function $I(e){BI=e}var VI={NEUTRAL:"NEUTRAL",LTR:UI,RTL:"RTL",isStrong:zI,getHTMLDir:KI,getHTMLDirIfDifferent:function(e,t){return zI(e)||FI(!1),zI(t)||FI(!1),e===t?null:KI(e)},setGlobalDir:$I,initGlobalDir:function(){$I(UI)},getGlobalDir:function(){return BI||this.initGlobalDir(),BI||FI(!1),BI}},HI=VI,WI=HI,YI=vC,qI="־׀׃׆-א-ת-ׯװ-ײ׳-״-߀-߉ߊ-ߪߴ-ߵߺ-߿ࠀ-ࠕࠚࠤࠨ-࠰-࠾ࡀ-ࡘ-࡞-࢟יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏ",GI="؈؋؍؛؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍ܐܒ-ܯ-ݍ-ޥޱ-ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-ﯓ-ﴽ﵀-﵏ﵐ-ﶏ-ﶒ-ﷇ-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴﹶ-ﻼ-",JI=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+qI+GI+"]"),XI=new RegExp("["+qI+GI+"]");function ZI(e){var t=JI.exec(e);return null==t?null:t[0]}function QI(e){var t=ZI(e);return null==t?WI.NEUTRAL:XI.exec(t)?WI.RTL:WI.LTR}function eM(e,t){if(t=t||WI.NEUTRAL,!e.length)return t;var n=QI(e);return n===WI.NEUTRAL?t:n}function tM(e,t){return t||(t=WI.getGlobalDir()),WI.isStrong(t)||YI(!1),eM(e,t)}var nM={firstStrongChar:ZI,firstStrongCharDir:QI,resolveBlockDir:eM,getDirection:tM,isDirectionLTR:function(e,t){return tM(e,t)===WI.LTR},isDirectionRTL:function(e,t){return tM(e,t)===WI.RTL}},rM=nM;function oM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iM,aM=rM,sM=HI,lM=vC,cM=function(){function e(e){oM(this,"_defaultDir",void 0),oM(this,"_lastDir",void 0),e?sM.isStrong(e)||lM(!1):e=sM.getGlobalDir(),this._defaultDir=e,this.reset()}var t=e.prototype;return t.reset=function(){this._lastDir=this._defaultDir},t.getDirection=function(e){return this._lastDir=aM.getDirection(e,this._lastDir),this._lastDir},e}(),uM=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")},dM=cM,pM=gT,fM=uM,hM=pM.OrderedMap,mM={getDirectionMap:function(e,t){iM?iM.reset():iM=new dM;var n=e.getBlockMap(),r=n.valueSeq().map((function(e){return fM(iM).getDirection(e.getText())})),o=hM(n.keySeq().zip(r));return null!=t&&pM.is(t,o)?t:o}};function gM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){vM(e,t,n[t])}))}return e}function vM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bM=ZO,yM=LI,xM=mM,wM=pI,SM=gT,_M=SM.OrderedSet,EM=SM.Record,kM=SM.Stack,TM=SM.OrderedMap,CM=SM.List,OM=EM({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:kM(),selection:null,treeMap:null,undoStack:kM()}),IM=function(){t.createEmpty=function(e){return this.createWithText("",e)},t.createWithText=function(e,n){return t.createWithContent(yM.createFromText(e),n)},t.createWithContent=function(e,n){if(0===e.getBlockMap().count())return t.createEmpty(n);var r=e.getBlockMap().first().getKey();return t.create({currentContent:e,undoStack:kM(),redoStack:kM(),decorator:n||null,selection:wM.createEmpty(r)})},t.create=function(e){var n=e.currentContent,r=gM({},e,{treeMap:DM(n,e.decorator),directionMap:xM.getDirectionMap(n)});return new t(new OM(r))},t.fromJS=function(e){return new t(new OM(gM({},e,{directionMap:null!=e.directionMap?TM(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?_M(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?yM.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?kM(e.redoStack.map((function(e){return yM.fromJS(e)}))):e.redoStack,selection:null!=e.selection?new wM(e.selection):e.selection,treeMap:null!=e.treeMap?TM(e.treeMap).map((function(e){return CM(e).map((function(e){return bM.fromJS(e)}))})):e.treeMap,undoStack:null!=e.undoStack?kM(e.undoStack.map((function(e){return yM.fromJS(e)}))):e.undoStack,currentContent:yM.fromJS(e.currentContent)})))},t.set=function(e,n){var r=e.getImmutable().withMutations((function(t){var r=t.get("decorator"),o=r;null===n.decorator?o=null:n.decorator&&(o=n.decorator);var i=n.currentContent||e.getCurrentContent();if(o!==r){var a,s=t.get("treeMap");return a=o&&r?function(e,t,n,r,o){return n.merge(t.toSeq().filter((function(t){return r.getDecorations(t,e)!==o.getDecorations(t,e)})).map((function(t){return bM.generate(e,t,r)})))}(i,i.getBlockMap(),s,o,r):DM(i,o),void t.merge({decorator:o,treeMap:a,nativelyRenderedContent:null})}i!==e.getCurrentContent()&&t.set("treeMap",function(e,t,n,r){var o=e.getCurrentContent().set("entityMap",n),i=o.getBlockMap(),a=e.getImmutable().get("treeMap");return a.merge(t.toSeq().filter((function(e,t){return e!==i.get(t)})).map((function(e){return bM.generate(o,e,r)})))}(e,i.getBlockMap(),i.getEntityMap(),o)),t.merge(n)}));return new t(r)};var e=t.prototype;function t(e){vM(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},t.setInlineStyleOverride=function(e,n){return t.set(e,{inlineStyleOverride:n})},e.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r>0?o.getInlineStyleAt(r-1):o.getLength()?o.getInlineStyleAt(0):jM(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r<o.getLength()?o.getInlineStyleAt(r):r>0?o.getInlineStyleAt(r-1):jM(e,n)}(t,n)},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(e,t){return MM(e,t,!1)},t.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),MM(e,t,!0)},t.moveSelectionToEnd=function(e){var n=e.getCurrentContent().getLastBlock(),r=n.getKey(),o=n.getLength();return t.acceptSelection(e,new wM({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}))},t.moveFocusToEnd=function(e){var n=t.moveSelectionToEnd(e);return t.forceSelection(n,n.getSelection())},t.push=function(e,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===n)return e;var i=xM.getDirectionMap(n,e.getDirectionMap());if(!e.getAllowUndo())return t.set(e,{currentContent:n,directionMap:i,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var a=e.getSelection(),s=e.getCurrentContent(),l=e.getUndoStack(),c=n;a!==s.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,r)?(l=l.push(s),c=c.set("selectionBefore",a)):("insert-characters"===r||"backspace-character"===r||"delete-character"===r)&&(c=c.set("selectionBefore",s.getSelectionBefore()));var u=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(r)&&(u=null);var d={currentContent:c,directionMap:i,undoStack:l,redoStack:kM(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:u};return t.set(e,d)},t.undo=function(e){if(!e.getAllowUndo())return e;var n=e.getUndoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=xM.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:n.shift(),redoStack:e.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},t.redo=function(e){if(!e.getAllowUndo())return e;var n=e.getRedoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=xM.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:e.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},t}();function MM(e,t,n){return IM.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function DM(e,t){return e.getBlockMap().map((function(n){return bM.generate(e,n,t)})).toOrderedMap()}function jM(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):_M()}var AM=IM,NM=gT;NM.OrderedMap,NM.List;var PM=gT;fI("draft_tree_data_support"),PM.List,PM.Repeat;gT.List;function RM(e){return e.replace(/\//g,"-")}var LM=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(RM).join(" "):Array.prototype.map.call(arguments,RM).join(" ")},FM=B,UM=LM,BM=(0,gT.Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:FM.createElement("ul",{className:UM("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:FM.createElement("ol",{className:UM("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:FM.createElement("pre",{className:UM("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}}),zM={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}},KM={exports:{}};!function(e,t){!function(n,r){var o="function",i="undefined",a="object",s="string",l="major",c="model",u="name",d="type",p="vendor",f="version",h="architecture",m="console",g="mobile",v="tablet",b="smarttv",y="wearable",x="embedded",w="Amazon",S="Apple",_="ASUS",E="BlackBerry",k="Browser",T="Chrome",C="Firefox",O="Google",I="Huawei",M="LG",D="Microsoft",j="Motorola",A="Opera",N="Samsung",P="Sharp",R="Sony",L="Xiaomi",F="Zebra",U="Facebook",B="Chromium OS",z="Mac OS",K=" Browser",$=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},V=function(e,t){return typeof e===s&&-1!==H(t).indexOf(H(e))},H=function(e){return e.toLowerCase()},W=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},Y=function(e,t){for(var n,i,s,l,c,u,d=0;d<t.length&&!c;){var p=t[d],f=t[d+1];for(n=i=0;n<p.length&&!c&&p[n];)if(c=p[n++].exec(e))for(s=0;s<f.length;s++)u=c[++i],typeof(l=f[s])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,u):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=u?u.replace(l[1],l[2]):r:this[l[0]]=u?l[1].call(this,u,l[2]):r:4===l.length&&(this[l[0]]=u?l[3].call(this,u.replace(l[1],l[2])):r):this[l]=u||r;d+=2}},q=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(V(t[n][o],e))return"?"===n?r:n}else if(V(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},G={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,f],[/opios[\/ ]+([\w\.]+)/i],[f,[u,A+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[u,A+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[u,A]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[u,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[u,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[u,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[u,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[u,"Smart Lenovo "+k]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+k],f],[/\bfocus\/([\w\.]+)/i],[f,[u,C+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[u,A+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[u,A+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[u,"MIUI"+K]],[/fxios\/([\w\.-]+)/i],[f,[u,C]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[u,"360"]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+K],f],[/samsungbrowser\/([\w\.]+)/i],[f,[u,N+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[u,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,U],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[u,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,T+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[u,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[f,q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[u,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[u,C+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[u,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,H]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",H]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,H]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[p,N],[d,v]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[p,N],[d,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[p,S],[d,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[p,S],[d,v]],[/(macintosh);/i],[c,[p,S]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[p,P],[d,g]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[p,"Honor"],[d,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[p,I],[d,v]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[p,I],[d,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[p,L],[d,g]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[p,L],[d,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[p,"OPPO"],[d,g]],[/\b(opd2\d{3}a?) bui/i],[c,[p,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[p,"Vivo"],[d,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[p,"Realme"],[d,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[p,j],[d,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[p,j],[d,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[p,M],[d,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[p,M],[d,g]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[p,"Lenovo"],[d,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[p,"Nokia"],[d,g]],[/(pixel c)\b/i],[c,[p,O],[d,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[p,O],[d,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[p,R],[d,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[p,R],[d,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[p,"OnePlus"],[d,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[p,w],[d,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[p,w],[d,g]],[/(playbook);[-\w\),; ]+(rim)/i],[c,p,[d,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[p,E],[d,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[p,_],[d,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[p,_],[d,g]],[/(nexus 9)/i],[c,[p,"HTC"],[d,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[c,/_/g," "],[d,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[p,"TCL"],[d,v]],[/(itel) ((\w+))/i],[[p,H],c,[d,q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[p,"Acer"],[d,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[p,"Meizu"],[d,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[p,"Ulefone"],[d,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[p,"Energizer"],[d,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[p,"Cat"],[d,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[p,"Smartfren"],[d,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[p,"Nothing"],[d,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,c,[d,g]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,c,[d,v]],[/(surface duo)/i],[c,[p,D],[d,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[p,"Fairphone"],[d,g]],[/(u304aa)/i],[c,[p,"AT&T"],[d,g]],[/\bsie-(\w*)/i],[c,[p,"Siemens"],[d,g]],[/\b(rct\w+) b/i],[c,[p,"RCA"],[d,v]],[/\b(venue[\d ]{2,7}) b/i],[c,[p,"Dell"],[d,v]],[/\b(q(?:mv|ta)\w+) b/i],[c,[p,"Verizon"],[d,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[p,"Barnes & Noble"],[d,v]],[/\b(tm\d{3}\w+) b/i],[c,[p,"NuVision"],[d,v]],[/\b(k88) b/i],[c,[p,"ZTE"],[d,v]],[/\b(nx\d{3}j) b/i],[c,[p,"ZTE"],[d,g]],[/\b(gen\d{3}) b.+49h/i],[c,[p,"Swiss"],[d,g]],[/\b(zur\d{3}) b/i],[c,[p,"Swiss"],[d,v]],[/\b((zeki)?tb.*\b) b/i],[c,[p,"Zeki"],[d,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],c,[d,v]],[/\b(ns-?\w{0,9}) b/i],[c,[p,"Insignia"],[d,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[p,"NextBook"],[d,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],c,[d,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],c,[d,g]],[/\b(ph-1) /i],[c,[p,"Essential"],[d,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[p,"Envizen"],[d,v]],[/\b(trio[-\w\. ]+) b/i],[c,[p,"MachSpeed"],[d,v]],[/\btu_(1491) b/i],[c,[p,"Rotor"],[d,v]],[/(shield[\w ]+) b/i],[c,[p,"Nvidia"],[d,v]],[/(sprint) (\w+)/i],[p,c,[d,g]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[p,D],[d,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[p,F],[d,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[p,F],[d,g]],[/smart-tv.+(samsung)/i],[p,[d,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[p,N],[d,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,M],[d,b]],[/(apple) ?tv/i],[p,[c,S+" TV"],[d,b]],[/crkey/i],[[c,T+"cast"],[p,O],[d,b]],[/droid.+aft(\w+)( bui|\))/i],[c,[p,w],[d,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[p,P],[d,b]],[/(bravia[\w ]+)( bui|\))/i],[c,[p,R],[d,b]],[/(mitv-\w{5}) bui/i],[c,[p,L],[d,b]],[/Hbbtv.*(technisat) (.*);/i],[p,c,[d,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,W],[c,W],[d,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,c,[d,m]],[/droid.+; (shield) bui/i],[c,[p,"Nvidia"],[d,m]],[/(playstation [345portablevi]+)/i],[c,[p,R],[d,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[p,D],[d,m]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[p,N],[d,y]],[/((pebble))app/i],[p,c,[d,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[p,S],[d,y]],[/droid.+; (glass) \d/i],[c,[p,O],[d,y]],[/droid.+; (wt63?0{2,3})\)/i],[c,[p,F],[d,y]],[/droid.+; (glass) \d/i],[c,[p,O],[d,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[p,c,[d,y]],[/; (quest( \d| pro)?)/i],[c,[p,U],[d,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[d,x]],[/(aeobc)\b/i],[c,[p,w],[d,x]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,g]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[u,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[u,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[u,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[u,[f,q,G]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,q,G],[u,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,z],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[u,f],[/\(bb(10);/i],[f,[u,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[u,C+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[u,T+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,B],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,f],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,f]]},X=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof X))return new X(e,t).getResult();var m=typeof n!==i&&n.navigator?n.navigator:r,b=e||(m&&m.userAgent?m.userAgent:""),y=m&&m.userAgentData?m.userAgentData:r,x=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(J,t):J,w=m&&m.userAgent==b;return this.getBrowser=function(){var e={};return e[u]=r,e[f]=r,Y.call(e,b,x.browser),e[l]=function(e){return typeof e===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e[f]),w&&m&&m.brave&&typeof m.brave.isBrave==o&&(e[u]="Brave"),e},this.getCPU=function(){var e={};return e[h]=r,Y.call(e,b,x.cpu),e},this.getDevice=function(){var e={};return e[p]=r,e[c]=r,e[d]=r,Y.call(e,b,x.device),w&&!e[d]&&y&&y.mobile&&(e[d]=g),w&&"Macintosh"==e[c]&&m&&typeof m.standalone!==i&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[c]="iPad",e[d]=v),e},this.getEngine=function(){var e={};return e[u]=r,e[f]=r,Y.call(e,b,x.engine),e},this.getOS=function(){var e={};return e[u]=r,e[f]=r,Y.call(e,b,x.os),w&&!e[u]&&y&&y.platform&&"Unknown"!=y.platform&&(e[u]=y.platform.replace(/chrome os/i,B).replace(/macos/i,z)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===s&&e.length>500?W(e,500):e,this},this.setUA(b),this};X.VERSION="0.7.40",X.BROWSER=$([u,f,l]),X.CPU=$([h]),X.DEVICE=$([c,p,d,m,g,b,v,y,x]),X.ENGINE=X.OS=$([u,f]),e.exports&&(t=e.exports=X),t.UAParser=X;var Z=typeof n!==i&&(n.jQuery||n.Zepto);if(Z&&!Z.ua){var Q=new X;Z.ua=Q.getResult(),Z.ua.get=function(){return Q.getUA()},Z.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)Z.ua[n]=t[n]}}}("object"==typeof window?window:pa)}(KM,KM.exports);var $M="Unknown",VM={"Mac OS":"Mac OS X"};var HM=(new(0,KM.exports)).getResult(),WM=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(HM.browser.version),YM={browserArchitecture:HM.cpu.architecture||$M,browserFullVersion:HM.browser.version||$M,browserMinorVersion:WM.minor||$M,browserName:HM.browser.name||$M,browserVersion:HM.browser.major||$M,deviceName:HM.device.model||$M,engineName:HM.engine.name||$M,engineVersion:HM.engine.version||$M,platformArchitecture:HM.cpu.architecture||$M,platformName:function(e){return VM[e]||e}(HM.os.name)||$M,platformVersion:HM.os.version||$M,platformFullVersion:HM.os.version||$M},qM=YM,GM=vC,JM=/\./,XM=/\|\|/,ZM=/\s+\-\s+/,QM=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,eD=/^(\d*)(.*)/;function tD(e,t){var n=e.split(XM);return n.length>1?n.some((function(e){return pD.contains(e,t)})):function(e,t){var n=e.split(ZM);if(n.length>0&&n.length<=2||GM(!1),1===n.length)return nD(n[0],t);var r=n[0],o=n[1];return sD(r)&&sD(o)||GM(!1),nD(">="+r,t)&&nD("<="+o,t)}(e=n[0].trim(),t)}function nD(e,t){if(""===(e=e.trim()))return!0;var n=t.split(JM),r=iD(e),o=r.modifier,i=r.rangeComponents;switch(o){case"<":return rD(n,i);case"<=":return function(e,t){var n=dD(e,t);return-1===n||0===n}(n,i);case">=":return oD(n,i);case">":return function(e,t){return 1===dD(e,t)}(n,i);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var o=r.length-1,i=parseInt(r[o],10);return aD(i)&&(r[o]=i+1+""),oD(e,n)&&rD(e,r)}(n,i);default:return function(e,t){return 0===dD(e,t)}(n,i)}}function rD(e,t){return-1===dD(e,t)}function oD(e,t){var n=dD(e,t);return 1===n||0===n}function iD(e){var t=e.split(JM),n=t[0].match(QM);return n||GM(!1),{modifier:n[1],rangeComponents:[n[2]].concat(t.slice(1))}}function aD(e){return!isNaN(e)&&isFinite(e)}function sD(e){return!iD(e).modifier}function lD(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function cD(e,t){var n=e.match(eD)[1],r=t.match(eD)[1],o=parseInt(n,10),i=parseInt(r,10);return aD(o)&&aD(i)&&o!==i?uD(o,i):uD(e,t)}function uD(e,t){return typeof e!=typeof t&&GM(!1),e>t?1:e<t?-1:0}function dD(e,t){for(var n=function(e,t){lD(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var o=n;o<e.length;o++)e[o]="0"}return lD(t,e.length),[e,t]}(e,t),r=n[0],o=n[1],i=0;i<o.length;i++){var a=cD(r[i],o[i]);if(a)return a}return 0}var pD={contains:function(e,t){return tD(e.trim(),t.trim())}},fD=pD,hD=Object.prototype.hasOwnProperty;var mD=function(e,t,n){if(!e)return null;var r={};for(var o in e)hD.call(e,o)&&(r[o]=t.call(n,e[o],o,e));return r};var gD=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}},vD=qM,bD=fD;function yD(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var o=n.slice(e.length);return!!t&&(o=r?r(o):o,bD.contains(o,t))}function xD(e){return"Windows"===vD.platformName?e.replace(/^\s*NT/,""):e}var wD={isBrowser:function(e){return yD(vD.browserName,vD.browserFullVersion,e)},isBrowserArchitecture:function(e){return yD(vD.browserArchitecture,null,e)},isDevice:function(e){return yD(vD.deviceName,null,e)},isEngine:function(e){return yD(vD.engineName,vD.engineVersion,e)},isPlatform:function(e){return yD(vD.platformName,vD.platformFullVersion,e,xD)},isPlatformArchitecture:function(e){return yD(vD.platformArchitecture,null,e)}},SD=mD(wD,gD);var _D=function(e){return e&&e.ownerDocument?e.ownerDocument:document};var ED=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE},kD=ED;var TD=function e(t){if(kD(t)){var n=t,r=n.getAttribute("data-offset-key");if(r)return r;for(var o=0;o<n.childNodes.length;o++){var i=e(n.childNodes[o]);if(i)return i}}return null},CD=_D,OD=TD;var ID=function(e){for(var t=e;t&&t!==CD(e).documentElement;){var n=OD(t);if(null!=n)return n;t=t.parentNode}return null};var MD=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window};function DD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jD=SD,AD=ID,ND=MD,PD=vC,RD=uM,LD=gT.Map,FD={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},UD=jD.isBrowser("IE <= 11"),BD=function(){function e(e){var t=this;DD(this,"observer",void 0),DD(this,"container",void 0),DD(this,"mutations",void 0),DD(this,"onCharData",void 0),this.container=e,this.mutations=LD();var n=ND(e);n.MutationObserver&&!UD?this.observer=new n.MutationObserver((function(e){return t.registerMutations(e)})):this.onCharData=function(e){e.target instanceof Node||PD(!1),t.registerMutation({type:"characterData",target:e.target})}}var t=e.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,FD):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=LD(),t},t.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},t.getMutationTextContent=function(e){var t=e.type,n=e.target,r=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return UD?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(r&&r.length)return"";if(""!==n.textContent)return n.textContent}return null},t.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var n=RD(AD(e.target));this.mutations=this.mutations.set(n,t)}},e}(),zD="-",KD={encode:function(e,t,n){return e+zD+t+zD+n},decode:function(e){var t=e.split(zD).reverse(),n=t[0],r=t[1];return{blockKey:t.slice(2).reverse().join(zD),decoratorKey:parseInt(r,10),leafKey:parseInt(n,10)}}},$D=KD,VD={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},HD={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}};var WD=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)},YD=vC,qD=WD;var GD=function(e){var t=e.editorContainer;return t||YD(!1),qD(t.firstChild)||YD(!1),t.firstChild},JD=$D,XD=uM;var ZD=function(e,t,n,r,o){var i=XD(e.getSelection());if(!t||!r)return i;var a=JD.decode(t),s=a.blockKey,l=e.getBlockTree(s),c=l&&l.getIn([a.decoratorKey,"leaves",a.leafKey]),u=JD.decode(r),d=u.blockKey,p=e.getBlockTree(d),f=p&&p.getIn([u.decoratorKey,"leaves",u.leafKey]);if(!c||!f)return i;var h=c.get("start"),m=f.get("start"),g=c?h+n:null,v=f?m+o:null;if(i.getAnchorKey()===s&&i.getAnchorOffset()===g&&i.getFocusKey()===d&&i.getFocusOffset()===v)return i;var b=!1;if(s===d){var y=c.get("end"),x=f.get("end");b=m===h&&x===y?o<n:m<h}else{b=e.getCurrentContent().getBlockMap().keySeq().skipUntil((function(e){return e===s||e===d})).first()===d}return i.merge({anchorKey:s,anchorOffset:g,focusKey:d,focusOffset:v,isBackward:b})},QD=ID,ej=TD,tj=ZD,nj=vC,rj=ED,oj=uM;function ij(e,t,n){var r=t,o=QD(r);(null!=o||e&&(e===r||e.firstChild===r)||nj(!1),e===r)&&(r=r.firstChild,rj(r)||nj(!1),"true"!==(r=r).getAttribute("data-contents")&&nj(!1),n>0&&(n=r.childNodes.length));if(0===n){var i=null;if(null!=o)i=o;else{var a=function(e){for(;e.firstChild&&(rj(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||ej(e.firstChild));)e=e.firstChild;return e}(r);i=oj(ej(a))}return{key:i,offset:0}}var s=r.childNodes[n-1],l=null,c=null;if(ej(s)){var u=function(e){for(;e.lastChild&&(rj(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||ej(e.lastChild));)e=e.lastChild;return e}(s);l=oj(ej(u)),c=aj(u)}else l=oj(o),c=aj(s);return{key:l,offset:c}}function aj(e){var t=e.textContent;return"\n"===t?0:t.length}var sj=function(e,t,n,r,o,i){var a=n.nodeType===Node.TEXT_NODE,s=o.nodeType===Node.TEXT_NODE;if(a&&s)return{selectionState:tj(e,oj(QD(n)),r,oj(QD(o)),i),needsRecovery:!1};var l=null,c=null,u=!0;return a?(l={key:oj(QD(n)),offset:r},c=ij(t,o,i)):s?(c={key:oj(QD(o)),offset:i},l=ij(t,n,r)):(l=ij(t,n,r),c=ij(t,o,i),n===o&&r===i&&(u=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:tj(e,l.key,l.offset,c.key,c.offset),needsRecovery:u}},lj=sj;var cj=function(e,t){var n=t.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.anchorOffset,i=n.focusNode,a=n.focusOffset;return 0===n.rangeCount||null==r||null==i?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:lj(e,t,r,o,i,a)},uj=HD,dj=AM,pj=GD,fj=cj;var hj=function(e){if(e._blockSelectEvents||e._latestEditorState!==e.props.editorState){if(e._blockSelectEvents){var t=e.props.editorState.getSelection();uj.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(t.toJS())})}}else{var n=e.props.editorState,r=fj(n,pj(e)),o=r.selectionState;o!==n.getSelection()&&(n=r.needsRecovery?dj.forceSelection(n,o):dj.acceptSelection(n,o),e.update(n))}};var mj={notEmptyKey:function(e){return null!=e&&""!=e}},gj=mj.notEmptyKey;function vj(e,t){return gj(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}var bj=function(e,t){var n;if(t.isCollapsed()){var r=t.getAnchorKey(),o=t.getAnchorOffset();return o>0?(n=e.getBlockForKey(r).getEntityAt(o-1))!==e.getBlockForKey(r).getEntityAt(o)?null:vj(e.getEntityMap(),n):null}var i=t.getStartKey(),a=t.getStartOffset(),s=e.getBlockForKey(i);return n=a===s.getLength()?null:s.getEntityAt(a),vj(e.getEntityMap(),n)},yj=BD,xj=LO,wj=$D,Sj=AM,_j=VD,Ej=hj,kj=GD,Tj=cj,Cj=bj,Oj=uM,Ij=SD.isBrowser("IE"),Mj=!1,Dj=!1,jj=null;var Aj,Nj,Pj={onCompositionStart:function(e){Dj=!0,function(e){jj||(jj=new yj(kj(e))).start()}(e)},onCompositionEnd:function(e){Mj=!1,Dj=!1,setTimeout((function(){Mj||Pj.resolveComposition(e)}),20)},onSelect:Ej,onKeyDown:function(e,t){if(!Dj)return Pj.resolveComposition(e),void e._onKeyDown(t);(t.which===_j.RIGHT||t.which===_j.LEFT)&&t.preventDefault()},onKeyPress:function(e,t){t.which===_j.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!Dj){var t=Oj(jj).stopAndFlushMutations();jj=null,Mj=!0;var n=Sj.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),!t.size)return void e.update(n);var r=n.getCurrentContent();t.forEach((function(e,t){var o=wj.decode(t),i=o.blockKey,a=o.decoratorKey,s=o.leafKey,l=n.getBlockTree(i).getIn([a,"leaves",s]),c=l.start,u=l.end,d=n.getSelection().merge({anchorKey:i,focusKey:i,anchorOffset:c,focusOffset:u,isBackward:!1}),p=Cj(r,d),f=r.getBlockForKey(i).getInlineStyleAt(c);r=xj.replaceText(r,d,e,f,p),n=Sj.set(n,{currentContent:r})}));var o=Tj(n,kj(e)).selectionState;e.restoreEditorDOM();var i=Ij?Sj.forceSelection(n,o):Sj.acceptSelection(n,o);e.update(Sj.push(i,r,"insert-characters"))}}},Rj=Pj;function Lj(){if(Nj)return Aj;Nj=1;var e=ds;function t(){return t=e||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},t.apply(this,arguments)}var n=$D,r=B,o=rM,i=HI,a=function(e){function a(){return e.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,e),a.prototype.render=function(){var e=this.props,a=e.block,s=e.children,l=e.contentState,c=e.decorator,u=e.decoratorKey,d=e.direction,p=e.leafSet,f=e.text,h=a.getKey(),m=p.get("leaves"),g=c.getComponentForKey(u),v=c.getPropsForKey(u),b=n.encode(h,parseInt(u,10),0),y=f.slice(m.first().get("start"),m.last().get("end")),x=i.getHTMLDirIfDifferent(o.getDirection(y),d);return r.createElement(g,t({},v,{contentState:l,decoratedText:y,dir:x,key:b,entityKey:a.getEntityAt(p.get("start")),offsetKey:b}),s)},a}(r.Component);return Aj=a}function Fj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bj=B,zj=vC,Kj=ED,$j=SD.isBrowser("IE <= 11");var Vj=function(e){function t(t){var n;return Uj(Fj(n=e.call(this,t)||this),"_forceFlag",void 0),Uj(Fj(n),"_node",void 0),n._forceFlag=!1,n}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;Kj(t)||zj(!1);var r=t;return n?!function(e){return $j?"\n"===e.textContent:"BR"===e.tagName}(r):r.textContent!==e.children},n.componentDidMount=function(){this._forceFlag=!this._forceFlag},n.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},n.render=function(){var e=this;return""===this.props.children?this._forceFlag?function(e){return $j?Bj.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):Bj.createElement("br",{key:"A","data-text":"true",ref:e})}((function(t){return e._node=t})):function(e){return $j?Bj.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):Bj.createElement("br",{key:"B","data-text":"true",ref:e})}((function(t){return e._node=t})):Bj.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(t){return e._node=t}},this.props.children)},t}(Bj.Component),Hj=Vj,Wj=ED;var Yj=function(e){return!(!e||!e.ownerDocument)&&(Wj(e)&&"BR"===e.nodeName)},qj={initODS:function(){},handleExtensionCausedError:function(){}};var Gj=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))},Jj=Gj;var Xj=function(e){return Jj(e)&&3==e.nodeType},Zj=Xj;var Qj=function e(t,n){return!(!t||!n)&&(t===n||!Zj(t)&&(Zj(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))};var eA=function(e){if(typeof(e=e||(typeof document<"u"?document:void 0))>"u")return null;try{return e.activeElement||e.body}catch{return e.body}},tA=qj,nA=HD,rA=Qj,oA=eA,iA=_D,aA=vC,sA=ED,lA=SD.isBrowser("IE");function cA(e,t){if(!e)return"[empty]";var n=uA(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(sA(n)||aA(!1),n.outerHTML)}function uA(e,t){var n=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var r=e.textContent.length;return iA(e).createTextNode("[text "+r+(n.length?" | "+n.join(", "):"")+"]")}var o=e.cloneNode();1===o.nodeType&&n.length&&o.setAttribute("data-labels",n.join(", "));for(var i=e.childNodes,a=0;a<i.length;a++)o.appendChild(uA(i[a],t));return o}function dA(e,t){for(var n=e,r=n;n;){if(sA(n)&&r.hasAttribute("contenteditable"))return cA(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function pA(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function fA(e,t,n,r){var o=oA();if(e.extend&&null!=t&&rA(o,t)){n>pA(t)&&nA.logSelectionStateFailure({anonymizedDom:dA(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())});var i=t===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(t,n)}catch(a){throw nA.logSelectionStateFailure({anonymizedDom:dA(t,(function(t){var n=[];return t===o&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n})),extraParams:JSON.stringify({activeElementName:o?o.nodeName:null,nodeIsFocus:t===e.focusNode,nodeWasFocus:i,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:a?""+a:null,offset:n},null,2),selectionState:JSON.stringify(r.toJS(),null,2)}),a}}else if(t&&e.rangeCount>0){var a=e.getRangeAt(0);a.setEnd(t,n),e.addRange(a.cloneRange())}}function hA(e,t,n,r){var o=iA(t).createRange();if(n>pA(t)&&(nA.logSelectionStateFailure({anonymizedDom:dA(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())}),tA.handleExtensionCausedError()),o.setStart(t,n),lA)try{e.addRange(o)}catch(e){}else e.addRange(o)}var mA=function(e,t,n,r,o){var i=iA(t);if(rA(i.documentElement,t)){var a=i.defaultView.getSelection(),s=e.getAnchorKey(),l=e.getAnchorOffset(),c=e.getFocusKey(),u=e.getFocusOffset(),d=e.getIsBackward();if(!a.extend&&d){var p=s,f=l;s=c,l=u,c=p,u=f,d=!1}var h=s===n&&r<=l&&o>=l,m=c===n&&r<=u&&o>=u;if(h&&m)return a.removeAllRanges(),hA(a,t,l-r,e),void fA(a,t,u-r,e);if(d){if(m&&(a.removeAllRanges(),hA(a,t,u-r,e)),h){var g=a.focusNode,v=a.focusOffset;a.removeAllRanges(),hA(a,t,l-r,e),fA(a,g,v,e)}}else h&&(a.removeAllRanges(),hA(a,t,l-r,e)),m&&fA(a,t,u-r,e)}},gA=ds;var vA,bA,yA=Hj,xA=B,wA=vC,SA=Yj,_A=mA,EA=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"leaf",void 0),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,r=t.start,o=t.text,i=n.getKey(),a=r+o.length;if(e.hasEdgeWithin(i,r,a)){var s=this.leaf;s||wA(!1);var l,c=s.firstChild;c||wA(!1),c.nodeType===Node.TEXT_NODE?l=c:SA(c)?l=s:(l=c.firstChild)||wA(!1),_A(e,l,i,r,a)}}},n.shouldComponentUpdate=function(e){var t=this.leaf;return t||wA(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},n.componentDidUpdate=function(){this._setSelection()},n.componentDidMount=function(){this._setSelection()},n.render=function(){var e=this,t=this.props.block,n=this.props.text;n.endsWith("\n")&&this.props.isLast&&(n+="\n");var r=this.props,o=r.customStyleMap,i=r.customStyleFn,a=r.offsetKey,s=r.styleSet,l=s.reduce((function(e,t){var n={},r=o[t];return void 0!==r&&e.textDecoration!==r.textDecoration&&(n.textDecoration=[e.textDecoration,r.textDecoration].join(" ").trim()),gA(e,r,n)}),{});if(i){var c=i(s,t);l=gA(l,c)}return xA.createElement("span",{"data-offset-key":a,ref:function(t){return e.leaf=t},style:l},xA.createElement(yA,null,n))},t}(xA.Component),kA=EA;function TA(){if(bA)return vA;bA=1;var e=Lj(),t=kA,n=$D,r=B,o=LM;gT.List;var i=function(i){function a(){return i.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,i),a.prototype.render=function(){var i=this.props,a=i.block,s=i.contentState,l=i.customStyleFn,c=i.customStyleMap,u=i.decorator,d=i.direction,p=i.forceSelection,f=i.hasSelection,h=i.selection,m=i.tree,g=a.getKey(),v=a.getText(),b=m.size-1,y=this.props.children||m.map((function(o,i){var m=o.get("decoratorKey"),y=o.get("leaves"),x=y.size-1,w=y.map((function(e,o){var s=n.encode(g,i,o),u=e.get("start"),d=e.get("end");return r.createElement(t,{key:s,offsetKey:s,block:a,start:u,selection:f?h:null,forceSelection:p,text:v.slice(u,d),styleSet:a.getInlineStyleAt(u),customStyleMap:c,customStyleFn:l,isLast:m===b&&o===x})})).toArray();return m&&u?r.createElement(e,{block:a,children:w,contentState:s,decorator:u,decoratorKey:m,direction:d,leafSet:o,text:v,key:i}):w})).toArray();return r.createElement("div",{"data-offset-key":n.encode(g,0,0),className:o({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===d,"public/DraftStyleDefault/rtl":"RTL"===d})},y)},a}(r.Component);return vA=i}function CA(e,t){return!!t&&(e===t.documentElement||e===t.body)}var OA={getTop:function(e){var t=e.ownerDocument;return CA(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;CA(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return CA(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;CA(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}},IA=OA,MA=/-(.)/g;var DA=function(e){return e.replace(MA,(function(e,t){return t.toUpperCase()}))},jA=/([A-Z])/g;var AA=function(e){return e.replace(jA,"-$1").toLowerCase()},NA=DA,PA=AA;function RA(e){return null==e?e:String(e)}var LA=function(e,t){var n;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return RA(n.getPropertyValue(PA(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return RA(n.getPropertyValue(PA(t)));if("display"===t)return"none"}return e.currentStyle?RA("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[NA(t)]):RA(e.style&&e.style[NA(t)])};function FA(e,t){var n=UA.get(e,t);return"auto"===n||"scroll"===n}var UA={get:LA,getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(FA(e,"overflow")||FA(e,"overflowY")||FA(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}},BA=UA,zA=Qj;var KA=function(e){var t=e.ownerDocument.documentElement;if(!("getBoundingClientRect"in e)||!zA(t,e))return{left:0,right:0,top:0,bottom:0};var n=e.getBoundingClientRect();return{left:Math.round(n.left)-t.clientLeft,right:Math.round(n.right)-t.clientLeft,top:Math.round(n.top)-t.clientTop,bottom:Math.round(n.bottom)-t.clientTop}},$A=KA;var VA=function(e){var t=$A(e);return{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}},HA=typeof navigator<"u"&&navigator.userAgent.indexOf("AppleWebKit")>-1;var WA=function(e){return(e=e||document).scrollingElement?e.scrollingElement:HA||"CSS1Compat"!==e.compatMode?e.body:e.documentElement};var YA=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}},qA=WA,GA=YA;var JA=function(e){var t=qA(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var n=GA(e),r=e===t?e.ownerDocument.documentElement:e,o=e.scrollWidth-r.clientWidth,i=e.scrollHeight-r.clientHeight;return n.x=Math.max(0,Math.min(n.x,o)),n.y=Math.max(0,Math.min(n.y,i)),n};function XA(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function ZA(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function QA(){return{width:window.innerWidth||XA(),height:window.innerHeight||ZA()}}QA.withoutScrollbars=function(){return{width:XA(),height:ZA()}};var eN,tN,nN,rN,oN=QA;function iN(){if(tN)return eN;tN=1;var e=ds;function t(){return t=e||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},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}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}var o=TA(),i=$D,a=B,s=IA,l=BA,c=VA,u=JA,d=oN,p=vC,f=WD;gT.List;var h=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},m=function(e,t){var n=t.get(e.getType())||t.get("unstyled"),r=n.wrapper;return{Element:n.element||t.get("unstyled").element,wrapperTemplate:r}},g=function(e,t){var n=t(e);return n?{CustomComponent:n.component,customProps:n.props,customEditable:n.editable}:{}},v=function(e,t,r,o,i,a){var s={"data-block":!0,"data-editor":t,"data-offset-key":r,key:e.getKey(),ref:a},l=o(e);return l&&(s.className=l),void 0!==i.customEditable&&(s=n({},s,{contentEditable:i.customEditable,suppressContentEditableWarning:!0})),s},b=function(e){function b(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(o))||this),"wrapperRef",a.createRef()),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(b,e);var y=b.prototype;return y.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,o=t.tree,i=!n.getChildKeys().isEmpty(),a=n!==e.block||o!==e.tree||r!==e.direction||h(e.selection,e.block.getKey())&&e.forceSelection;return i||a},y.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this.wrapperRef.current;if(n){var r,o=l.getScrollParent(n),i=u(o);if(o===window){var a=c(n);(r=a.y+a.height-d().height)>0&&window.scrollTo(i.x,i.y+r+10)}else{f(n)||p(!1);var h=n;(r=h.offsetHeight+h.offsetTop-(o.offsetHeight+i.y))>0&&s.setTop(o,s.getTop(o)+r+10)}}}},y.render=function(){var e=this,r=this.props,s=r.block,l=r.blockRenderMap,c=r.blockRendererFn,u=r.blockStyleFn,d=r.contentState,p=r.decorator,f=r.editorKey,y=r.editorState,x=r.customStyleFn,w=r.customStyleMap,S=r.direction,_=r.forceSelection,E=r.selection,k=r.tree,T=null;s.children.size&&(T=s.children.reduce((function(t,r){var o=i.encode(r,0,0),s=d.getBlockForKey(r),p=g(s,c),h=p.CustomComponent||b,x=m(s,l),w=x.Element,S=x.wrapperTemplate,_=v(s,f,o,u,p,null),E=n({},e.props,{tree:y.getBlockTree(r),blockProps:p.customProps,offsetKey:o,block:s});return t.push(a.createElement(w,_,a.createElement(h,E))),!S||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(s,d)||function(e,t,n){var r=[],o=!0,s=!1,l=void 0;try{for(var c,u=n.reverse()[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var d=c.value;if(d.type!==t)break;r.push(d)}}catch(e){s=!0,l=e}finally{try{!o&&null!=u.return&&u.return()}finally{if(s)throw l}}n.splice(n.indexOf(r[0]),r.length+1);var p=r.reverse(),f=p[0].key;n.push(a.cloneElement(e,{key:"".concat(f,"-wrap"),"data-offset-key":i.encode(f,0,0)},p))}(S,w,t),t}),[]));var C=s.getKey(),O=i.encode(C,0,0),I=g(s,c),M=I.CustomComponent,D=null!=M?a.createElement(M,t({},this.props,{tree:y.getBlockTree(C),blockProps:I.customProps,offsetKey:O,block:s})):a.createElement(o,{block:s,children:T,contentState:d,customStyleFn:x,customStyleMap:w,decorator:p,direction:S,forceSelection:_,hasSelection:h(E,C),selection:E,tree:k});if(s.getParentKey())return D;var j=m(s,l).Element,A=v(s,f,O,u,I,this.wrapperRef);return a.createElement(j,A,D)},b}(a.Component);return eN=b}var aN=ds;function sN(){return sN=aN||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},sN.apply(this,arguments)}var lN,cN,uN,dN,pN=kA,fN=$D,hN=B,mN=IA,gN=BA,vN=rM,bN=HI,yN=LM,xN=VA,wN=JA,SN=oN,_N=vC,EN=WD,kN=uM,TN=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},CN=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"_node",void 0),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||TN(e.selection,e.block.getKey())&&e.forceSelection},n.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this._node;if(null!=n){var r,o=gN.getScrollParent(n),i=wN(o);if(o===window){var a=xN(n);(r=a.y+a.height-SN().height)>0&&window.scrollTo(i.x,i.y+r+10)}else{EN(n)||_N(!1),(r=n.offsetHeight+n.offsetTop-(o.offsetTop+o.offsetHeight+i.y))>0&&mN.setTop(o,mN.getTop(o)+r+10)}}}}},n._renderChildren=function(){var e=this,t=this.props.block,n=t.getKey(),r=t.getText(),o=this.props.tree.size-1,i=TN(this.props.selection,n);return this.props.tree.map((function(a,s){var l=a.get("leaves");if(0===l.size)return null;var c=l.size-1,u=l.map((function(a,l){var u=fN.encode(n,s,l),d=a.get("start"),p=a.get("end");return hN.createElement(pN,{key:u,offsetKey:u,block:t,start:d,selection:i?e.props.selection:null,forceSelection:e.props.forceSelection,text:r.slice(d,p),styleSet:t.getInlineStyleAt(d),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:s===o&&l===c})})).toArray(),d=a.get("decoratorKey");if(null==d||!e.props.decorator)return u;var p=kN(e.props.decorator),f=p.getComponentForKey(d);if(!f)return u;var h=p.getPropsForKey(d),m=fN.encode(n,s,0),g=l.first().get("start"),v=l.last().get("end"),b=r.slice(g,v),y=t.getEntityAt(a.get("start")),x=bN.getHTMLDirIfDifferent(vN.getDirection(b),e.props.direction),w={contentState:e.props.contentState,decoratedText:b,dir:x,start:g,end:v,blockKey:n,entityKey:y,offsetKey:m};return hN.createElement(f,sN({},h,w,{key:m}),u)})).toArray()},n.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,o=yN({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return hN.createElement("div",{"data-offset-key":r,className:o,ref:function(t){return e._node=t}},this._renderChildren())},t}(hN.Component),ON=CN;var IN=fI("draft_tree_data_support")?function(){if(rN)return nN;rN=1;var e=ds;function t(){return t=e||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},t.apply(this,arguments)}var n=iN(),r=$D,o=B,i=uM,a=function(e){function a(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(a,e);var s=a.prototype;return s.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),i=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&i)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),l=t.getDecorator(),c=n.getDecorator();return o!==i||a!==s||l!==c||n.mustForceSelection()},s.render=function(){for(var e=this.props,a=e.blockRenderMap,s=e.blockRendererFn,l=e.blockStyleFn,c=e.customStyleMap,u=e.customStyleFn,d=e.editorState,p=e.editorKey,f=e.textDirectionality,h=d.getCurrentContent(),m=d.getSelection(),g=d.mustForceSelection(),v=d.getDecorator(),b=i(d.getDirectionMap()),y=[],x=h.getBlocksAsArray()[0];x;){var w=x.getKey(),S={blockRenderMap:a,blockRendererFn:s,blockStyleFn:l,contentState:h,customStyleFn:u,customStyleMap:c,decorator:v,editorKey:p,editorState:d,forceSelection:g,selection:m,block:x,direction:f||b.get(w),tree:d.getBlockTree(w)},_=(a.get(x.getType())||a.get("unstyled")).wrapper;y.push({block:o.createElement(n,t({key:w},S)),wrapperTemplate:_,key:w,offsetKey:r.encode(w,0,0)});var E=x.getNextSiblingKey();x=E?h.getBlockForKey(E):null}for(var k=[],T=0;T<y.length;){var C=y[T];if(C.wrapperTemplate){var O=[];do{O.push(y[T].block),T++}while(T<y.length&&y[T].wrapperTemplate===C.wrapperTemplate);var I=o.cloneElement(C.wrapperTemplate,{key:C.key+"-wrap","data-offset-key":C.offsetKey},O);k.push(I)}else k.push(C.block),T++}return o.createElement("div",{"data-contents":"true"},k)},a}(o.Component);return nN=a}():function(){if(dN)return uN;dN=1;var e=ds;function t(){return t=e||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},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}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}var o=ON,i=$D,a=B,s=LM,l=(cN||(cN=1,lN=function(e){var t=e||"",n=arguments.length;if(n>1)for(var r=1;r<n;r++){var o=arguments[r];o&&(t=(t?t+" ":"")+o)}return t}),lN),c=uM,u=function(e,t,n,r){return s({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},d=function(e){function r(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(r,e);var s=r.prototype;return s.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),i=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&i)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),l=t.getDecorator(),c=n.getDecorator();return o!==i||a!==s||l!==c||n.mustForceSelection()},s.render=function(){for(var e=this.props,r=e.blockRenderMap,s=e.blockRendererFn,d=e.blockStyleFn,p=e.customStyleMap,f=e.customStyleFn,h=e.editorState,m=e.editorKey,g=e.preventScroll,v=e.textDirectionality,b=h.getCurrentContent(),y=h.getSelection(),x=h.mustForceSelection(),w=h.getDecorator(),S=c(h.getDirectionMap()),_=b.getBlocksAsArray(),E=[],k=null,T=null,C=0;C<_.length;C++){var O=_[C],I=O.getKey(),M=O.getType(),D=s(O),j=void 0,A=void 0,N=void 0;D&&(j=D.component,A=D.props,N=D.editable);var P=v||S.get(I),R=i.encode(I,0,0),L={contentState:b,block:O,blockProps:A,blockStyleFn:d,customStyleMap:p,customStyleFn:f,decorator:w,direction:P,forceSelection:x,offsetKey:R,preventScroll:g,selection:y,tree:h.getBlockTree(I)},F=r.get(M)||r.get("unstyled"),U=F.wrapper,B=F.element||r.get("unstyled").element,z=O.getDepth(),K="";if(d&&(K=d(O)),"li"===B)K=l(K,u(M,z,T!==U||null===k||z>k,P));var $=j||o,V={className:K,"data-block":!0,"data-editor":m,"data-offset-key":R,key:I};void 0!==N&&(V=n({},V,{contentEditable:N,suppressContentEditableWarning:!0}));var H=a.createElement(B,V,a.createElement($,t({},L,{key:I})));E.push({block:H,wrapperTemplate:U,key:I,offsetKey:R}),k=U?O.getDepth():null,T=U}for(var W=[],Y=0;Y<E.length;){var q=E[Y];if(q.wrapperTemplate){var G=[];do{G.push(E[Y].block),Y++}while(Y<E.length&&E[Y].wrapperTemplate===q.wrapperTemplate);var J=a.cloneElement(q.wrapperTemplate,{key:q.key+"-wrap","data-offset-key":q.offsetKey},G);W.push(J)}else W.push(q.block),Y++}return a.createElement("div",{"data-contents":"true"},W)},r}(a.Component);return uN=d}(),MN={isImage:function(e){return"image"===DN(e)[0]},isJpeg:function(e){var t=DN(e);return MN.isImage(e)&&("jpeg"===t[1]||"pjpeg"===t[1])}};function DN(e){return e.split("/")}var jN=MN,AN=vC;var NN=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)||AN(!1),"number"!=typeof t&&AN(!1),0===t||t-1 in e||AN(!1),"function"==typeof e.callee&&AN(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch{}for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}(e):[e]};function PN(e){return function(){return e}}var RN=function(){};RN.thatReturns=PN,RN.thatReturnsFalse=PN(!1),RN.thatReturnsTrue=PN(!0),RN.thatReturnsNull=PN(null),RN.thatReturnsThis=function(){return this},RN.thatReturnsArgument=function(e){return e};var LN=RN,FN=jN,UN=NN,BN=LN,zN=new RegExp("\r\n","g"),KN={"text/rtf":1,"text/html":1};function $N(e){if("file"==e.kind)return e.getAsFile()}var VN=function(){function e(e){this.data=e,this.types=e.types?UN(e.types):[]}var t=e.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some((function(e){return KN[e]}))},t.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(zN,"\n"):null},t.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},t.isLink=function(){return this.types.some((function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")}))},t.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},t.isImage=function(){if(this.types.some((function(e){return-1!=e.indexOf("application/x-moz-file")})))return!0;for(var e=this.getFiles(),t=0;t<e.length;t++){var n=e[t].type;if(!FN.isImage(n))return!1}return!0},t.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},t.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map($N).filter(BN.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},t.hasFiles=function(){return this.getFiles().length>0},e}(),HN=VN,WN=vC,YN=/\.textClipping$/,qN={"text/plain":!0,"text/html":!0,"text/rtf":!0};var GN=function(e,t){var n=0,r=[];e.forEach((function(o){!function(e,t){if(!pa.FileReader||e.type&&!(e.type in qN))return void t("");if(""===e.type){var n="";return YN.test(e.name)&&(n=e.name.replace(YN,"")),void t(n)}var r=new FileReader;r.onload=function(){var e=r.result;"string"!=typeof e&&WN(!1),t(e)},r.onerror=function(){t("")},r.readAsText(e)}(o,(function(o){n++,o&&r.push(o.slice(0,5e3)),n==e.length&&t(r.join("\r"))}))}))};var JN=function(e){return"handled"===e||!0===e},XN=HN,ZN=LO,QN=AM,eP=ID,tP=_D,nP=GN,rP=ZD,oP=MD,iP=JN,aP=uM;var sP={onDragEnd:function(e){e.exitCurrentMode(),lP(e)},onDrop:function(e,t){var n=new XN(t.nativeEvent.dataTransfer),r=e._latestEditorState,o=function(e,t){var n=null,r=null,o=tP(e.currentTarget);if("function"==typeof o.caretRangeFromPoint){var i=o.caretRangeFromPoint(e.x,e.y);n=i.startContainer,r=i.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,r=e.rangeOffset}n=aP(n),r=aP(r);var a=aP(eP(n));return rP(t,a,r,a,r)}(t.nativeEvent,r);if(t.preventDefault(),e._dragCount=0,e.exitCurrentMode(),null!=o){var i=n.getFiles();if(i.length>0){if(e.props.handleDroppedFiles&&iP(e.props.handleDroppedFiles(o,i)))return;return void nP(i,(function(t){t&&e.update(cP(r,o,t))}))}var a=e._internalDrag?"internal":"external";e.props.handleDrop&&iP(e.props.handleDrop(o,n,a))||(e._internalDrag?e.update(function(e,t){var n=ZN.moveText(e.getCurrentContent(),e.getSelection(),t);return QN.push(e,n,"insert-fragment")}(r,o)):e.update(cP(r,o,n.getText()))),lP(e)}}};function lP(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:oP(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function cP(e,t,n){var r=ZN.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return QN.push(e,r,"insert-fragment")}var uP=sP;var dP=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),o=t.getStartOffset(),i=!1;return r.some((function(e){return o===e.get("start")?(i=!0,!0):o<e.get("end")&&e.get("leaves").some((function(e){var t=e.get("start");return o===t&&(i=!0,!0)}))})),i};!function(e){if(!e.setImmediate){var t,n,r=1,o={},i=!1,a=e.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(e);s=s&&s.setTimeout?s:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick((function(){c(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var n="setImmediate$"+Math.random()+"$",r=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&c(+t.data.slice(n.length))};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),t=function(t){e.postMessage(n+t,"*")}}():e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){c(e.data)},t=function(e){n.port2.postMessage(e)}):a&&"onreadystatechange"in a.createElement("script")?function(){var e=a.documentElement;t=function(t){var n=a.createElement("script");n.onreadystatechange=function(){c(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():t=function(e){setTimeout(c,0,e)},s.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),i=0;i<n.length;i++)n[i]=arguments[i+1];var a={callback:e,args:n};return o[r]=a,t(r),r++},s.clearImmediate=l}function l(e){delete o[e]}function c(e){if(i)setTimeout(c,0,e);else{var t=o[e];if(t){i=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{l(e),i=!1}}}}}(typeof self>"u"?pa:self);var pP=pa.setImmediate,fP=LO,hP=AM,mP=bj,gP=JN,vP=dP,bP=uM,yP=pP,xP=SD.isBrowser("Firefox");function wP(e,t,n,r,o){var i=fP.replaceText(e.getCurrentContent(),e.getSelection(),t,n,r);return hP.push(e,i,"insert-characters",o)}var SP=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e._latestEditorState,r=t.data;if(r){if(e.props.handleBeforeInput&&gP(e.props.handleBeforeInput(r,n,t.timeStamp)))return void t.preventDefault();var o=n.getSelection(),i=o.getStartOffset(),a=o.getAnchorKey();if(!o.isCollapsed())return t.preventDefault(),void e.update(wP(n,r,n.getCurrentInlineStyle(),mP(n.getCurrentContent(),n.getSelection()),!0));var s=wP(n,r,n.getCurrentInlineStyle(),mP(n.getCurrentContent(),n.getSelection()),!1),l=!1;if(l||(l=vP(e._latestCommittedEditorState)),!l){var c=n.getBlockTree(a),u=s.getBlockTree(a);l=c.size!==u.size||c.zip(u).some((function(e){var t=e[0],n=e[1],o=t.get("start"),a=o+(o>=i?r.length:0),s=t.get("end"),l=s+(s>=i?r.length:0),c=n.get("start"),u=n.get("end"),d=n.get("decoratorKey");return t.get("decoratorKey")!==d||t.get("leaves").size!==n.get("leaves").size||a!==c||l!==u||null!=d&&u-c!=s-o}))}if(l||(l=function(e){return xP&&("'"==e||"/"==e)}(r)),l||(l=bP(s.getDirectionMap()).get(a)!==bP(n.getDirectionMap()).get(a)),l)return t.preventDefault(),s=hP.set(s,{forceSelection:!0}),void e.update(s);s=hP.set(s,{nativelyRenderedContent:s.getCurrentContent()}),e._pendingStateFromBeforeInput=s,yP((function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))}},_P=AM,EP=Qj,kP=eA;var TP=function(e,t){var n=t.currentTarget.ownerDocument;if(!e.props.preserveSelectionOnBlur&&kP(n)===n.body){var r=n.defaultView.getSelection(),o=e.editor;1===r.rangeCount&&EP(o,r.anchorNode)&&EP(o,r.focusNode)&&r.removeAllRanges()}var i=e._latestEditorState,a=i.getSelection();if(a.getHasFocus()){var s=a.set("hasFocus",!1);e.props.onBlur&&e.props.onBlur(t),e.update(_P.acceptSelection(i,s))}},CP=AM;var OP=function(e,t){e.setMode("composite"),e.update(CP.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)},IP=UC;var MP=function(e){var t=e.getSelection();return t.isCollapsed()?null:IP(e.getCurrentContent(),t)},DP=MP;var jP=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(DP(e._latestEditorState))};var AP=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1},NP=LO,PP=AM,RP=BA,LP=MP,FP=JA,UP=AP;var BP=function(e,t){var n,r=e._latestEditorState,o=r.getSelection(),i=t.target;if(o.isCollapsed())t.preventDefault();else{if(UP(i)){var a=i;n=FP(RP.getScrollParent(a))}var s=LP(r);e.setClipboard(s),e.setMode("cut"),setTimeout((function(){e.restoreEditorDOM(n),e.exitCurrentMode(),e.update(function(e){var t=NP.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return PP.push(e,t,"remove-range")}(r))}),0)}};var zP=function(e,t){e.setMode("drag"),t.preventDefault()};var KP=function(e){e._internalDrag=!0,e.setMode("drag")},$P=AM,VP=SD;var HP=function(e,t){var n=e._latestEditorState,r=n.getSelection();if(!r.getHasFocus()){var o=r.set("hasFocus",!0);e.props.onFocus&&e.props.onFocus(t),VP.isBrowser("Chrome < 60.0.3081.0")?e.update($P.forceSelection(n,o)):e.update($P.acceptSelection(n,o))}},WP=vC,YP=/[\uD800-\uDFFF]/;function qP(e){return 55296<=e&&e<=57343}function GP(e){return YP.test(e)}function JP(e,t){return 1+qP(e.charCodeAt(t))}function XP(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!GP(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var o=0;if(t>0){for(;t>0&&o<r;t--)o+=JP(e,o);if(o>=r)return""}else if(t<0){for(o=r;t<0&&0<o;t++)o-=JP(e,o-1);o<0&&(o=0)}var i=r;if(n<r)for(i=o;n>0&&i<r;n--)i+=JP(e,i);return e.substring(o,i)}var ZP={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=JP(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:JP,hasSurrogateUnit:GP,isCodeUnitInSurrogateRange:qP,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||WP(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),r=e.charCodeAt(t+1);return 55296<=n&&n<=56319&&56320<=r&&r<=57343},strlen:function(e){if(!GP(e))return e.length;for(var t=0,n=0;n<e.length;n+=JP(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return XP(e,t=t<n?t:n,r)},substr:XP},QP=ZP;var eR=function(e,t){var n=e.getSelection(),r=e.getCurrentContent(),o=n.getStartKey(),i=n.getStartOffset(),a=o,s=0;if(t>i){var l=r.getKeyBefore(o);if(null==l)a=o;else a=l,s=r.getBlockForKey(l).getText().length}else s=i-t;return n.merge({focusKey:a,focusOffset:s,isBackward:!0})},tR=LO,nR=fI("draft_tree_data_support");var rR=function(e,t,n){var r=e.getSelection(),o=e.getCurrentContent(),i=r,a=r.getAnchorKey(),s=r.getFocusKey(),l=o.getBlockForKey(a);if(nR&&"forward"===n&&a!==s)return o;if(r.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return o;if(nR)if(r.getAnchorOffset()===o.getBlockForKey(a).getLength()){var c=o.getBlockForKey(l.nextSibling);if(!c||0===c.getLength())return o}}else if(e.isSelectionAtStartOfContent())return o;if((i=t(e))===r)return o}return tR.removeRange(o,i,n)},oR=AM,iR=QP,aR=eR,sR=rR;var lR=function(e){var t=sR(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),o=t.getAnchorOffset(),i=n.getBlockForKey(r).getText()[o-1];return aR(e,i?iR.getUTF16Length(i,0):1)}),"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return oR.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")},cR=LO,uR=$D,dR=AM,pR=mj.notEmptyKey,fR=ID,hR=lR,mR=uM,gR=SD.isEngine("Gecko");var vR=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e.editor.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.isCollapsed,i=(null==r?void 0:r.nodeType)!==Node.TEXT_NODE&&(null==r?void 0:r.nodeType)!==Node.ELEMENT_NODE;if(null!=r&&!i){if(r.nodeType===Node.TEXT_NODE&&(null!==r.previousSibling||null!==r.nextSibling)){var a=r.parentNode;if(null==a)return;r.nodeValue=a.textContent;for(var s=a.firstChild;null!=s;s=s.nextSibling)s!==r&&a.removeChild(s)}var l=r.textContent,c=e._latestEditorState,u=mR(fR(r)),d=uR.decode(u),p=d.blockKey,f=d.decoratorKey,h=d.leafKey,m=c.getBlockTree(p).getIn([f,"leaves",h]),g=m.start,v=m.end,b=c.getCurrentContent(),y=b.getBlockForKey(p),x=y.getText().slice(g,v);if(l.endsWith("\n\n")&&(l=l.slice(0,-1)),l===x){var w=t.nativeEvent.inputType;if(w){var S=function(e,t){return"deleteContentBackward"===e?hR(t):t}(w,c);if(S!==c)return e.restoreEditorDOM(),void e.update(S)}return}var _,E,k,T,C=c.getSelection(),O=C.merge({anchorOffset:g,focusOffset:v,isBackward:!1}),I=y.getEntityAt(g),M=pR(I)?b.getEntity(I):null,D="MUTABLE"===(null!=M?M.getMutability():null),j=D?"spellcheck-change":"apply-entity",A=cR.replaceText(b,O,l,y.getInlineStyleAt(g),D?y.getEntityAt(g):null);if(gR)_=n.anchorOffset,E=n.focusOffset,T=(k=g+Math.min(_,E))+Math.abs(_-E),_=k,E=T;else{var N=l.length-x.length;k=C.getStartOffset(),T=C.getEndOffset(),_=o?T+N:k,E=T+N}var P=A.merge({selectionBefore:b.getSelectionAfter(),selectionAfter:C.merge({anchorOffset:_,focusOffset:E})});e.update(dR.push(c,P,j))}},bR=VD;var yR=function(e){return e.which===bR.RETURN&&(e.getModifierState("Shift")||e.getModifierState("Alt")||e.getModifierState("Control"))},xR=yR,wR=SD.isPlatform("Mac OS X"),SR={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return wR&&e.altKey},usesMacOSHeuristics:function(){return wR},hasCommandModifier:function(e){return wR?!!e.metaKey&&!e.altKey:SR.isCtrlKeyCommand(e)},isSoftNewlineEvent:xR},_R=SR,ER=LO,kR=AM,TR=UC,CR=uM,OR=null,IR={cut:function(e){var t=e.getCurrentContent(),n=e.getSelection(),r=null;if(n.isCollapsed()){var o=n.getAnchorKey(),i=t.getBlockForKey(o).getLength();if(i===n.getAnchorOffset()){var a=t.getKeyAfter(o);if(null==a)return e;r=n.set("focusKey",a).set("focusOffset",0)}else r=n.set("focusOffset",i)}else r=n;r=CR(r),OR=TR(t,r);var s=ER.removeRange(t,r,"forward");return s===t?e:kR.push(e,s,"remove-range")},paste:function(e){if(!OR)return e;var t=ER.replaceWithFragment(e.getCurrentContent(),e.getSelection(),OR);return kR.push(e,t,"insert-fragment")}},MR=IR,DR=vC;var jR=SD.isBrowser("Chrome")?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var o=r===e.commonAncestorContainer;o?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0);var i,a=Array.from(t.getClientRects());if(n.push(a),o)return n.reverse(),(i=[]).concat.apply(i,n);t.setEndBefore(r)}DR(!1)}:function(e){return Array.from(e.getClientRects())},AR=jR,NR=QP,PR=_D,RR=AR,LR=vC;function FR(e,t){for(var n=1/0,r=1/0,o=-1/0,i=-1/0,a=0;a<e.length;a++){var s=e[a];0===s.width||1===s.width||(n=Math.min(n,s.top),r=Math.min(r,s.bottom),o=Math.max(o,s.top),i=Math.max(i,s.bottom))}return o<=r&&o-n<t&&i-r<t}function UR(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}var BR=function(e){e.collapsed||LR(!1);var t=(e=e.cloneRange()).startContainer;1!==t.nodeType&&(t=t.parentNode);var n=function(e){var t=getComputedStyle(e),n=PR(e),r=n.createElement("div");r.style.fontFamily=t.fontFamily,r.style.fontSize=t.fontSize,r.style.fontStyle=t.fontStyle,r.style.fontWeight=t.fontWeight,r.style.lineHeight=t.lineHeight,r.style.position="absolute",r.textContent="M";var o=n.body;o||LR(!1),o.appendChild(r);var i=r.getBoundingClientRect();return o.removeChild(r),i.height}(t),r=e.endContainer,o=e.endOffset;for(e.setStart(e.startContainer,0);FR(RR(e),n)&&(r=e.startContainer,o=e.startOffset,r.parentNode||LR(!1),e.setStartBefore(r),1!==r.nodeType||"inline"===getComputedStyle(r).display););for(var i=r,a=o-1;;){for(var s=i.nodeValue,l=a;l>=0;l--)if(!(null!=s&&l>0&&NR.isSurrogatePair(s,l-1))){if(e.setStart(i,l),!FR(RR(e),n))break;r=i,o=l}if(-1===l||0===i.childNodes.length)break;a=UR(i=i.childNodes[l])}return e.setStart(r,o),e},zR=AM,KR=BR,$R=sj,VR=eR,HR=rR;var WR=function(e,t){var n=HR(e,(function(e){var n=e.getSelection();if(n.isCollapsed()&&0===n.getAnchorOffset())return VR(e,1);var r=t.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return r=KR(r),$R(e,null,r.endContainer,r.endOffset,r.startContainer,r.startOffset).selectionState}),"backward");return n===e.getCurrentContent()?e:zR.push(e,n,"remove-range")},YR="['‘’]",qR="\\s|(?![_])"+{getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}.getPunctuation(),GR=new RegExp("^(?:"+qR+")*(?:"+YR+"|(?!"+qR+").)*(?:(?!"+qR+").)"),JR=new RegExp("(?:(?!"+qR+").)(?:"+YR+"|(?!"+qR+").)*(?:"+qR+")*$");function XR(e,t){var n=t?JR.exec(e):GR.exec(e);return n?n[0]:e}var ZR={getBackward:function(e){return XR(e,!0)},getForward:function(e){return XR(e,!1)}},QR=ZR,eL=AM,tL=eR,nL=rR;var rL=function(e){var t=nL(e,(function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return tL(e,1);var r=t.getStartKey(),o=e.getCurrentContent().getBlockForKey(r).getText().slice(0,n),i=QR.getBackward(o);return tL(e,i.length||1)}),"backward");return t===e.getCurrentContent()?e:eL.push(e,t,"remove-range")};var oL=function(e,t){var n,r=e.getSelection(),o=r.getStartKey(),i=r.getStartOffset(),a=e.getCurrentContent(),s=o;return t>a.getBlockForKey(o).getText().length-i?(s=a.getKeyAfter(o),n=0):n=i+t,r.merge({focusKey:s,focusOffset:n})},iL=ZR,aL=AM,sL=oL,lL=rR;var cL=function(e){var t=lL(e,(function(e){var t=e.getSelection(),n=t.getStartOffset(),r=t.getStartKey(),o=e.getCurrentContent().getBlockForKey(r).getText().slice(n),i=iL.getForward(o);return sL(e,i.length||1)}),"forward");return t===e.getCurrentContent()?e:aL.push(e,t,"remove-range")},uL=LO,dL=AM;var pL=function(e){var t=uL.splitBlock(e.getCurrentContent(),e.getSelection());return dL.push(e,t,"split-block")},fL=AM;var hL=function(e){var t=e.getSelection(),n=t.getEndKey(),r=e.getCurrentContent().getBlockForKey(n).getLength();return fL.set(e,{selection:t.merge({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}),forceSelection:!0})},mL=AM;var gL=function(e){var t=e.getSelection(),n=t.getStartKey();return mL.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})},vL=AM,bL=QP,yL=oL,xL=rR;var wL=function(e){var t=xL(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),o=t.getAnchorOffset(),i=n.getBlockForKey(r).getText()[o];return yL(e,i?bL.getUTF16Length(i,0):1)}),"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return vL.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")},SL=LO,_L=AM,EL=UC;var kL=function(e){var t=e.getSelection();if(!t.isCollapsed())return e;var n=t.getAnchorOffset();if(0===n)return e;var r,o,i=t.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i).getLength();if(s<=1)return e;n===s?(r=t.set("anchorOffset",n-1),o=t):o=(r=t.set("focusOffset",n+1)).set("anchorOffset",n+1);var l=EL(a,r),c=SL.removeRange(a,r,"backward"),u=c.getSelectionAfter(),d=u.getAnchorOffset()-1,p=u.merge({anchorOffset:d,focusOffset:d}),f=SL.replaceWithFragment(c,p,l),h=_L.push(e,f,"insert-fragment");return _L.acceptSelection(h,o)},TL=AM;var CL=function(e,t,n){var r=TL.undo(t);if("spellcheck-change"!==t.getLastChangeType())e.preventDefault(),t.getNativelyRenderedContent()?(n(TL.set(t,{nativelyRenderedContent:null})),setTimeout((function(){n(r)}),0)):n(r);else{var o=r.getCurrentContent();n(TL.set(r,{nativelyRenderedContent:o}))}},OL=LO,IL=AM,ML=VD,DL=MR,jL=SD,AL=JN,NL=WR,PL=rL,RL=cL,LL=pL,FL=hL,UL=gL,BL=lR,zL=wL,KL=kL,$L=CL,VL=_R.isOptionKeyCommand,HL=jL.isBrowser("Chrome");var WL=function(e,t){var n=t.which,r=e._latestEditorState;function o(n){var r=e.props[n];return!!r&&(r(t),!0)}switch(n){case ML.RETURN:if(t.preventDefault(),e.props.handleReturn&&AL(e.props.handleReturn(t,r)))return;break;case ML.ESC:if(t.preventDefault(),o("onEscape"))return;break;case ML.TAB:if(o("onTab"))return;break;case ML.UP:if(o("onUpArrow"))return;break;case ML.RIGHT:if(o("onRightArrow"))return;break;case ML.DOWN:if(o("onDownArrow"))return;break;case ML.LEFT:if(o("onLeftArrow"))return;break;case ML.SPACE:HL&&VL(t)&&t.preventDefault()}var i=e.props.keyBindingFn(t);if(null!=i&&""!==i)if("undo"!==i){if(t.preventDefault(),!e.props.handleKeyCommand||!AL(e.props.handleKeyCommand(i,r,t.timeStamp))){var a=function(e,t,n){switch(e){case"redo":return IL.redo(t);case"delete":return zL(t);case"delete-word":return RL(t);case"backspace":return BL(t);case"backspace-word":return PL(t);case"backspace-to-start-of-line":return NL(t,n);case"split-block":return LL(t);case"transpose-characters":return KL(t);case"move-selection-to-start-of-block":return UL(t);case"move-selection-to-end-of-block":return FL(t);case"secondary-cut":return DL.cut(t);case"secondary-paste":return DL.paste(t);default:return t}}(i,r,t);a!==r&&e.update(a)}}else $L(t,r,e.update);else if(n===ML.SPACE&&HL&&VL(t)){var s=OL.replaceText(r.getCurrentContent(),r.getSelection()," ");e.update(IL.push(r,s,"insert-characters"))}};var YL=function(){function e(e){(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(this,"_uri",void 0),this._uri=e}return e.prototype.toString=function(){return this._uri},e}(),qL=YL,GL=vC,JL=SD.isBrowser("IE <= 9");var XL=function(e){var t,n=null;return!JL&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||GL(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n},ZL=ED;var QL=function(e){return!(!e||!e.ownerDocument)&&(ZL(e)&&"A"===e.nodeName)},eF=ED;var tF,nF=function(e){return!(!e||!e.ownerDocument)&&(eF(e)&&"IMG"===e.nodeName)};function rF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){oF(e,t,n[t])}))}return e}function oF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iF=IT,aF=VT,sF=oC,lF=BM,cF=uI,uF=qL,dF=LM,pF=CC,fF=XL,hF=fI,mF=gT,gF=mF.List,vF=mF.Map,bF=mF.OrderedSet,yF=QL,xF=Yj,wF=WD,SF=nF,_F=hF("draft_tree_data_support"),EF=new RegExp("\r","g"),kF=new RegExp("\n","g"),TF=new RegExp("^\n","g"),CF=new RegExp(" ","g"),OF=new RegExp(" ?","g"),IF=new RegExp("​?","g"),MF=["bold","bolder","500","600","700","800","900"],DF=["light","lighter","normal","100","200","300","400"],jF=["className","href","rel","target","title"],AF=["alt","className","height","src","width"],NF=(oF(tF={},dF("public/DraftStyleDefault/depth0"),0),oF(tF,dF("public/DraftStyleDefault/depth1"),1),oF(tF,dF("public/DraftStyleDefault/depth2"),2),oF(tF,dF("public/DraftStyleDefault/depth3"),3),oF(tF,dF("public/DraftStyleDefault/depth4"),4),tF),PF=vF({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),RF=function(e){if(wF(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null},LF=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(NF).some((function(n){e.classList.contains(n)&&(t=NF[n])})),t},FF=function(e){if(!yF(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new uF(t.href);return!0}catch{return!1}},UF=function(e){if(!SF(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},BF=function(e,t){if(!wF(e))return t;var n=e,r=n.style.fontWeight,o=n.style.fontStyle,i=n.style.textDecoration;return t.withMutations((function(e){MF.indexOf(r)>=0?e.add("BOLD"):DF.indexOf(r)>=0&&e.remove("BOLD"),"italic"===o?e.add("ITALIC"):"normal"===o&&e.remove("ITALIC"),"underline"===i&&e.add("UNDERLINE"),"line-through"===i&&e.add("STRIKETHROUGH"),"none"===i&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))}))},zF=function(e){return"ul"===e||"ol"===e},KF=function(){function e(e,t){oF(this,"characterList",gF()),oF(this,"currentBlockType","unstyled"),oF(this,"currentDepth",0),oF(this,"currentEntity",null),oF(this,"currentText",""),oF(this,"wrapper",null),oF(this,"blockConfigs",[]),oF(this,"contentBlocks",[]),oF(this,"entityMap",cF),oF(this,"blockTypeMap",void 0),oF(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=gF(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=cF,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],bF())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(_F?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=rF({key:e.key||pF(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:gF(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=gF(),this.currentBlockType="unstyled",this.currentText="",t},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=o.nodeName.toLowerCase();if("body"===i||zF(i)){this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var a=this.currentDepth,s=this.wrapper;zF(i)&&(this.wrapper=i,zF(s)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(o.childNodes),t)),this.currentDepth=a,this.wrapper=s}else{var l=this.blockTypeMap.get(i);if(void 0===l)if("#text"!==i)if("br"!==i)if(UF(o))this._addImgNode(o,t);else if(FF(o))this._addAnchorNode(o,n,t);else{var c=t;PF.has(i)&&(c=c.add(PF.get(i))),c=BF(o,c);var u=RF(o);null!=u&&(c=c.add(u)),n.push.apply(n,this._toBlockConfigs(Array.from(o.childNodes),c))}else this._addBreakNode(o,t);else this._addTextNode(o,t);else{this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var d=this.currentDepth,p=this.wrapper;if(this.wrapper="pre"===i?"pre":this.wrapper,"string"!=typeof l&&(l=this.disambiguate(i,this.wrapper)||l[0]||"unstyled"),!_F&&wF(o)&&("unordered-list-item"===l||"ordered-list-item"===l)){var f=o;this.currentDepth=LF(f,this.currentDepth)}var h=pF(),m=this._toBlockConfigs(Array.from(o.childNodes),t);this._trimCurrentText(),n.push(this._makeBlockConfig({key:h,childConfigs:m,type:l})),this.currentDepth=d,this.wrapper=p}}}return n},t._appendText=function(e,t){var n;this.currentText+=e;var r=iF.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(r))},t._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry((function(e){return null!==e.getEntity()}));(t=void 0!==r?Math.min(t,r[0]):t)>(n=void 0!==(r=this.characterList.reverse().findEntry((function(e){return null!==e.getEntity()})))?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=gF()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(TF,"")).replace(kF," ")),this._appendText(n,t)},t._addBreakNode=function(e,t){xF(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){if(SF(e)){var n=e,r={};AF.forEach((function(e){var t=n.getAttribute(e);t&&(r[e]=t)})),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),hF("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},t._addAnchorNode=function(e,t,n){if(yF(e)){var r=e,o={};jF.forEach((function(e){var t=r.getAttribute(e);t&&(o[e]=t)})),o.url=new uF(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",o||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},t._toContentBlocks=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var o=e[r];o.parent=t,o.prevSibling=r>0?e[r-1].key:null,o.nextSibling=r<n?e[r+1].key:null,o.children=gF(o.childConfigs.map((function(e){return e.key}))),this.contentBlocks.push(new sF(rF({},o))),this._toContentBlocks(o.childConfigs,o.key)}},t._hoistContainersInBlockConfigs=function(e){var t=this;return gF(e).flatMap((function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)}))},t._toFlatContentBlocks=function(e){var t=this;this._hoistContainersInBlockConfigs(e).forEach((function(e){var n=t._extractTextFromBlockConfigs(e.childConfigs),r=n.text,o=n.characterList;t.contentBlocks.push(new aF(rF({},e,{text:e.text+r,characterList:e.characterList.concat(o)})))}))},t._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=gF(),o=0;o<=t;o++){var i=e[o];n+=i.text,r=r.concat(i.characterList),""!==n&&"unstyled"!==i.type&&(n+="\n",r=r.push(r.last()));var a=this._extractTextFromBlockConfigs(i.childConfigs);n+=a.text,r=r.concat(a.characterList)}return{text:n,characterList:r}},e}(),$F=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:lF,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:fF)(e=e.trim().replace(EF,"").replace(CF," ").replace(OF,"").replace(IF,""));if(!n)return null;var r=function(e){var t={};return e.mapKeys((function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach((function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)}))})),vF(t)}(t);return new KF(r,(function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null})).addDOMNode(n).getContentBlocks()};function VF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HF=VT,WF=oC,YF=$F,qF=CC,GF=XL,JF=fI,XF=gT,ZF=mI,QF=XF.List,eU=XF.Repeat,tU=JF("draft_tree_data_support"),nU=tU?WF:HF,rU={processHTML:function(e,t){return YF(e,GF,t)},processText:function(e,t,n){return e.reduce((function(e,r,o){r=ZF(r);var i=qF(),a={key:i,type:n,text:r,characterList:QF(eU(t,r.length))};if(tU&&0!==o){var s=o-1;a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){VF(e,t,n[t])}))}return e}({},a,{prevSibling:(e[s]=e[s].merge({nextSibling:i})).getKey()})}return e.push(new nU(a)),e}),[])}};var oU=function(e,t,n,r){var o=t.getStartKey(),i=t.getEndKey(),a=e.getBlockMap(),s=a.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===i})).concat([[i,a.get(i)]]).map((function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)}));return a=a.merge(s),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})},iU=LO,aU=AM,sU=oU,lU=uM,cU={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some((function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()}))},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return cU.toggleInlineStyle(e,"BOLD");case"italic":return cU.toggleInlineStyle(e,"ITALIC");case"underline":return cU.toggleInlineStyle(e,"UNDERLINE");case"code":return cU.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return cU.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return cU.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=iU.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=aU.push(e,t,"insert-characters");return aU.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockBefore(r);if(o&&"atomic"===o.getType()){var i=n.getBlockMap().delete(o.getKey()),a=n.merge({blockMap:i,selectionAfter:t});if(a!==n)return aU.push(e,a,"remove-range")}var s=cU.tryToRemoveBlockStyle(e);return s?aU.push(e,s,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockForKey(r).getLength();if(t.getStartOffset()<o)return null;var i=n.getBlockAfter(r);if(!i||"atomic"!==i.getType())return null;var a=t.merge({focusKey:i.getKey(),focusOffset:i.getLength()}),s=iU.removeRange(n,a,"forward");return s!==n?aU.push(e,s,"remove-range"):null},onTab:function(e,t,n){var r=t.getSelection(),o=r.getAnchorKey();if(o!==r.getFocusKey())return t;var i=t.getCurrentContent(),a=i.getBlockForKey(o),s=a.getType();if("unordered-list-item"!==s&&"ordered-list-item"!==s)return t;e.preventDefault();var l=a.getDepth();if(!e.shiftKey&&l===n)return t;var c=sU(i,r,e.shiftKey?-1:1,n);return aU.push(t,c,"adjust-depth")},toggleBlockType:function(e,t){var n=e.getSelection(),r=n.getStartKey(),o=n.getEndKey(),i=e.getCurrentContent(),a=n;if(r!==o&&0===n.getEndOffset()){var s=lU(i.getBlockBefore(o));o=s.getKey(),a=a.merge({anchorKey:r,anchorOffset:n.getStartOffset(),focusKey:o,focusOffset:s.getLength(),isBackward:!1})}if(i.getBlockMap().skipWhile((function(e,t){return t!==r})).reverse().skipWhile((function(e,t){return t!==o})).some((function(e){return"atomic"===e.getType()})))return e;var l=i.getBlockForKey(r).getType()===t?"unstyled":t;return aU.push(e,iU.setBlockType(i,a,l),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?cU.toggleBlockType(e,"code-block"):cU.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(e,t){var n=e.getSelection(),r=e.getCurrentInlineStyle();if(n.isCollapsed())return aU.setInlineStyleOverride(e,r.has(t)?r.remove(t):r.add(t));var o,i=e.getCurrentContent();return o=r.has(t)?iU.removeInlineStyle(i,n,t):iU.applyInlineStyle(i,n,t),aU.push(e,o,"change-inline-style")},toggleLink:function(e,t,n){var r=iU.applyEntity(e.getCurrentContent(),t,n);return aU.push(e,r,"apply-entity")},tryToRemoveBlockStyle:function(e){var t=e.getSelection(),n=t.getAnchorOffset();if(t.isCollapsed()&&0===n){var r=t.getAnchorKey(),o=e.getCurrentContent(),i=o.getBlockForKey(r).getType(),a=o.getBlockBefore(r);if("code-block"===i&&a&&"code-block"===a.getType()&&0!==a.getLength())return null;if("unstyled"!==i)return iU.setBlockType(o,t,"unstyled")}return null}},uU=cU,dU=/\r\n?|\n/g;var pU=function(e){return e.split(dU)},fU=yT,hU=IT,mU=HN,gU=LO,vU=rU,bU=AM,yU=uU,xU=bj,wU=GN,SU=JN,_U=pU;function EU(e,t,n){var r=gU.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return bU.push(e,r.set("entityMap",n),"insert-fragment")}var kU=function(e,t){t.preventDefault();var n=new mU(t.clipboardData);if(!n.isRichText()){var r=n.getFiles(),o=n.getText();if(r.length>0){if(e.props.handlePastedFiles&&SU(e.props.handlePastedFiles(r)))return;return void wU(r,(function(t){if(t=t||o){var n=e._latestEditorState,r=_U(t),i=hU.create({style:n.getCurrentInlineStyle(),entity:xU(n.getCurrentContent(),n.getSelection())}),a=yU.getCurrentBlockType(n),s=vU.processText(r,i,a),l=fU.createFromArray(s),c=gU.replaceWithFragment(n.getCurrentContent(),n.getSelection(),l);e.update(bU.push(n,c,"insert-fragment"))}}))}}var i=[],a=n.getText(),s=n.getHTML(),l=e._latestEditorState;if(e.props.formatPastedText){var c=e.props.formatPastedText(a,s);a=c.text,s=c.html}if(!e.props.handlePastedText||!SU(e.props.handlePastedText(a,s,l))){if(a&&(i=_U(a)),!e.props.stripPastedStyles){var u,d=e.getClipboard();if(!e.props.formatPastedText&&n.isRichText()&&d){if(-1!==(null===(u=s)||void 0===u?void 0:u.indexOf(e.getEditorKey()))||1===i.length&&1===d.size&&d.first().getText()===a)return void e.update(EU(e._latestEditorState,d))}else if(d&&n.types.includes("com.apple.webarchive")&&!n.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every((function(t,n){return t.getText()===e[n]}))}(i,d))return void e.update(EU(e._latestEditorState,d));if(s){var p=vU.processHTML(s,e.props.blockRenderMap);if(p){var f=p.contentBlocks,h=p.entityMap;if(f){var m=fU.createFromArray(f);return void e.update(EU(e._latestEditorState,m,h))}}}e.setClipboard(null)}if(i.length){var g=hU.create({style:l.getCurrentInlineStyle(),entity:xU(l.getCurrentContent(),l.getSelection())}),v=yU.getCurrentBlockType(l),b=vU.processText(i,g,v),y=fU.createFromArray(b);e.update(EU(e._latestEditorState,y))}}},TU=SD,CU=SP,OU=TP,IU=OP,MU=jP,DU=BP,jU=zP,AU=KP,NU=HP,PU=vR,RU=WL,LU=kU,FU=hj,UU=TU.isBrowser("Chrome"),BU=TU.isBrowser("Firefox"),zU=UU||BU?FU:function(e){},KU={onBeforeInput:CU,onBlur:OU,onCompositionStart:IU,onCopy:MU,onCut:DU,onDragOver:jU,onDragStart:AU,onFocus:NU,onInput:PU,onKeyDown:RU,onPaste:LU,onSelect:FU,onMouseUp:zU,onKeyUp:zU},$U=ca.unstable_flushControlled;var VU=B,HU=LM,WU=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},n.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),t=HU({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e});return VU.createElement("div",{className:t},VU.createElement("div",{className:HU("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},t}(VU.Component),YU=WU,qU=_R,GU=VD,JU=SD,XU=JU.isPlatform("Mac OS X"),ZU=XU&&JU.isBrowser("Firefox < 29"),QU=qU.hasCommandModifier,eB=qU.isCtrlKeyCommand;function tB(e){return XU&&e.altKey||eB(e)}var nB=function(e){switch(e.keyCode){case 66:return QU(e)?"bold":null;case 68:return eB(e)?"delete":null;case 72:return eB(e)?"backspace":null;case 73:return QU(e)?"italic":null;case 74:return QU(e)?"code":null;case 75:return XU&&eB(e)?"secondary-cut":null;case 77:case 79:return eB(e)?"split-block":null;case 84:return XU&&eB(e)?"transpose-characters":null;case 85:return QU(e)?"underline":null;case 87:return XU&&eB(e)?"backspace-word":null;case 89:return eB(e)?XU?"secondary-paste":"redo":null;case 90:return function(e){return QU(e)?e.shiftKey?"redo":"undo":null}(e)||null;case GU.RETURN:return"split-block";case GU.DELETE:return function(e){return!XU&&e.shiftKey?null:tB(e)?"delete-word":"delete"}(e);case GU.BACKSPACE:return function(e){return QU(e)&&XU?"backspace-to-start-of-line":tB(e)?"backspace-word":"backspace"}(e);case GU.LEFT:return ZU&&QU(e)?"move-selection-to-start-of-block":null;case GU.RIGHT:return ZU&&QU(e)?"move-selection-to-end-of-block":null;default:return null}},rB=ds;function oB(){return oB=rB||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},oB.apply(this,arguments)}function iB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sB(e,t,n[t])}))}return e}function aB(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var cB=BM,uB=zM,dB=Rj,pB=IN,fB=uP,hB=KU,mB=$U,gB=YU,vB=qj,bB=AM,yB=B,xB=IA,wB=BA,SB=LM,_B=CC,EB=nB,kB=JA,TB=fI,CB=vC,OB=WD,IB=uM,MB=SD.isBrowser("IE"),DB=!MB,jB={edit:hB,composite:dB,drag:fB,cut:null,render:null},AB=!1,NB=function(e){function t(){return e.apply(this,arguments)||this}lB(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(yB.Component),PB=function(e){function t(t){var n;return sB(aB(n=e.call(this,t)||this),"_blockSelectEvents",void 0),sB(aB(n),"_clipboard",void 0),sB(aB(n),"_handler",void 0),sB(aB(n),"_dragCount",void 0),sB(aB(n),"_internalDrag",void 0),sB(aB(n),"_editorKey",void 0),sB(aB(n),"_placeholderAccessibilityID",void 0),sB(aB(n),"_latestEditorState",void 0),sB(aB(n),"_latestCommittedEditorState",void 0),sB(aB(n),"_pendingStateFromBeforeInput",void 0),sB(aB(n),"_onBeforeInput",void 0),sB(aB(n),"_onBlur",void 0),sB(aB(n),"_onCharacterData",void 0),sB(aB(n),"_onCompositionEnd",void 0),sB(aB(n),"_onCompositionStart",void 0),sB(aB(n),"_onCopy",void 0),sB(aB(n),"_onCut",void 0),sB(aB(n),"_onDragEnd",void 0),sB(aB(n),"_onDragOver",void 0),sB(aB(n),"_onDragStart",void 0),sB(aB(n),"_onDrop",void 0),sB(aB(n),"_onInput",void 0),sB(aB(n),"_onFocus",void 0),sB(aB(n),"_onKeyDown",void 0),sB(aB(n),"_onKeyPress",void 0),sB(aB(n),"_onKeyUp",void 0),sB(aB(n),"_onMouseDown",void 0),sB(aB(n),"_onMouseUp",void 0),sB(aB(n),"_onPaste",void 0),sB(aB(n),"_onSelect",void 0),sB(aB(n),"editor",void 0),sB(aB(n),"editorContainer",void 0),sB(aB(n),"focus",void 0),sB(aB(n),"blur",void 0),sB(aB(n),"setMode",void 0),sB(aB(n),"exitCurrentMode",void 0),sB(aB(n),"restoreEditorDOM",void 0),sB(aB(n),"setClipboard",void 0),sB(aB(n),"getClipboard",void 0),sB(aB(n),"getEditorKey",void 0),sB(aB(n),"update",void 0),sB(aB(n),"onDragEnter",void 0),sB(aB(n),"onDragLeave",void 0),sB(aB(n),"_handleEditorContainerRef",(function(e){n.editorContainer=e,n.editor=null!==e?e.firstChild:null})),sB(aB(n),"focus",(function(e){var t=n.props.editorState,r=t.getSelection().getHasFocus(),o=n.editor;if(o){var i=wB.getScrollParent(o),a=e||kB(i),s=a.x,l=a.y;OB(o)||CB(!1),o.focus(),i===window?window.scrollTo(s,l):xB.setTop(i,l),r||n.update(bB.forceSelection(t,t.getSelection()))}})),sB(aB(n),"blur",(function(){var e=n.editor;e&&(OB(e)||CB(!1),e.blur())})),sB(aB(n),"setMode",(function(e){var t=n.props,r=t.onPaste,o=t.onCut,i=t.onCopy,a=iB({},jB.edit);r&&(a.onPaste=r),o&&(a.onCut=o),i&&(a.onCopy=i);var s=iB({},jB,{edit:a});n._handler=s[e]})),sB(aB(n),"exitCurrentMode",(function(){n.setMode("edit")})),sB(aB(n),"restoreEditorDOM",(function(e){n.setState({contentsKey:n.state.contentsKey+1},(function(){n.focus(e)}))})),sB(aB(n),"setClipboard",(function(e){n._clipboard=e})),sB(aB(n),"getClipboard",(function(){return n._clipboard})),sB(aB(n),"update",(function(e){n._latestEditorState=e,n.props.onChange(e)})),sB(aB(n),"onDragEnter",(function(){n._dragCount++})),sB(aB(n),"onDragLeave",(function(){n._dragCount--,0===n._dragCount&&n.exitCurrentMode()})),n._blockSelectEvents=!1,n._clipboard=null,n._handler=null,n._dragCount=0,n._editorKey=t.editorKey||_B(),n._placeholderAccessibilityID="placeholder-"+n._editorKey,n._latestEditorState=t.editorState,n._latestCommittedEditorState=t.editorState,n._onBeforeInput=n._buildHandler("onBeforeInput"),n._onBlur=n._buildHandler("onBlur"),n._onCharacterData=n._buildHandler("onCharacterData"),n._onCompositionEnd=n._buildHandler("onCompositionEnd"),n._onCompositionStart=n._buildHandler("onCompositionStart"),n._onCopy=n._buildHandler("onCopy"),n._onCut=n._buildHandler("onCut"),n._onDragEnd=n._buildHandler("onDragEnd"),n._onDragOver=n._buildHandler("onDragOver"),n._onDragStart=n._buildHandler("onDragStart"),n._onDrop=n._buildHandler("onDrop"),n._onInput=n._buildHandler("onInput"),n._onFocus=n._buildHandler("onFocus"),n._onKeyDown=n._buildHandler("onKeyDown"),n._onKeyPress=n._buildHandler("onKeyPress"),n._onKeyUp=n._buildHandler("onKeyUp"),n._onMouseDown=n._buildHandler("onMouseDown"),n._onMouseUp=n._buildHandler("onMouseUp"),n._onPaste=n._buildHandler("onPaste"),n._onSelect=n._buildHandler("onSelect"),n.getEditorKey=function(){return n._editorKey},n.state={contentsKey:0},n}lB(t,e);var n=t.prototype;return n._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&(mB?mB((function(){return r(t,n)})):r(t,n))}}},n._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},n._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:IB(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return yB.createElement(gB,e)}return null},n._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},n.render=function(){var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,o=e.customStyleFn,i=e.customStyleMap,a=e.editorState,s=e.preventScroll,l=e.readOnly,c=e.textAlignment,u=e.textDirectionality,d=SB({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===c,"DraftEditor/alignRight":"right"===c,"DraftEditor/alignCenter":"center"===c}),p=this.props.role||"textbox",f="combobox"===p?!!this.props.ariaExpanded:null,h={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,customStyleMap:iB({},uB,i),customStyleFn:o,editorKey:this._editorKey,editorState:a,preventScroll:s,textDirectionality:u};return yB.createElement("div",{className:d},this._renderPlaceholder(),yB.createElement("div",{className:SB("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},yB.createElement("div",{"aria-activedescendant":l?null:this.props.ariaActiveDescendantID,"aria-autocomplete":l?null:this.props.ariaAutoComplete,"aria-controls":l?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":l?null:f,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":l?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:SB({notranslate:!l,"public/DraftEditor/content":!0}),contentEditable:!l,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:l?null:p,spellCheck:DB&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},yB.createElement(NB,{editor:this,editorState:a}),yB.createElement(pB,oB({},h,{key:"contents"+this.state.contentsKey})))))},n.componentDidMount=function(){this._blockSelectEvents=!1,!AB&&TB("draft_ods_enabled")&&(AB=!0,vB.initODS()),this.setMode("edit"),MB&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):pa.execCommand("AutoUrlDetect",!1,!1))},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},t}(yB.Component);sB(PB,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:cB,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:EB,readOnly:!1,spellCheck:!1,stripPastedStyles:!1});gT.List;var RB=gT.OrderedSet;RB();var LB=gT;fI("draft_tree_data_support"),LB.List,LB.Map,LB.OrderedMap;var FB=Object.create,UB=Object.defineProperty,BB=Object.getPrototypeOf,zB=Object.prototype.hasOwnProperty,KB=Object.getOwnPropertyNames,$B=Object.getOwnPropertyDescriptor,VB=Object.assign,HB=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),WB=(e,t,n)=>{if((e=>{UB(e,"__esModule",{value:!0})})(e),t&&"object"==typeof t||"function"==typeof t)for(let r of KB(t))!zB.call(e,r)&&"default"!==r&&UB(e,r,{get:()=>t[r],enumerable:!(n=$B(t,r))||n.enumerable});return e},YB=e=>e&&e.__esModule?e:WB(UB(null!=e?FB(BB(e)):{},"default",{value:e,enumerable:!0}),e),qB=HB(((e,t)=>{var n={BOLD:"__",ITALIC:"*"},r={"unordered-list-item":"- ","header-one":"# ","header-two":"## ","header-three":"### ","header-four":"#### ","header-five":"##### ","header-six":"###### ",blockquote:"> "},o={"code-block":"```"};function i(e,t){let{symbol:n}=t,r=e.slice(0,t.range.start),o=e.slice(t.range.start,t.range.end),i=o.trim(),a=e.slice(t.range.end),s=t.range.start+o.indexOf(i),l=e.slice(t.range.start,s),c=e.slice(s+i.length,t.range.end);return`${r}${i}${a}`.replace(`${n}${i}${n}`,`${l}${n}${i}${n}${c}`)}t.exports=function(e,t){let a=VB(VB({},n),t),s=[];return e.blocks.map((t=>{let n=0,l="";l+=((e,t)=>"ordered-list-item"===e?`${t.reduce(((e,t)=>"ordered-list-item"===t?e+1:e),1)}. `:r[e]||"")(t.type,s),s.push(t.type);let c=[];return l+=Array.from(t.text).reduce(((r,o,s)=>{let l=r;for(function(e){return[...e].sort(((e,t)=>t.length-e.length))}(t.inlineStyleRanges).filter((e=>e.offset===s)).filter((e=>a[e.style])).forEach((e=>{let t=a[e.style].length;l+=a[e.style],n+=t,c.push({symbol:a[e.style],range:{start:e.offset+n,end:e.offset+e.length+n},end:e.offset+(e.length-1)})})),t.entityRanges.filter((e=>e.offset===s)).forEach((t=>{l+=(e=>"LINK"===e.type?"[":"")(e.entityMap[t.key])})),l+=o,t.entityRanges.filter((e=>e.offset+e.length-1===s)).forEach((t=>{l+=(e=>"LINK"===e.type?`](${e.data.url})`:"")(e.entityMap[t.key])}));0!==c.length&&c[c.length-1].end===s;){let e=c.pop();l+=e.symbol,l=i(l,e),n+=e.symbol.length}return l}),""),l=((e,t)=>{if(e in o){let n=o[e];return`${n}\n${t}\n${n}`}return t})(t.type,l),l=((e,t,n)=>{if("atomic"!==e.type)return n;let r=n.substring(0,n.length-e.text.length),o=e.entityRanges[0].key,i=t[o].type,a=t[o].data;return"draft-js-video-plugin-video"===i?`${r}[[ embed url=${a.url||a.src} ]]`:`${r}`})(t,e.entityMap,l),l})).join("\n")}})),GB=HB((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ASTNodeTypes=void 0,function(e){e.Document="Document",e.DocumentExit="Document:exit",e.Paragraph="Paragraph",e.ParagraphExit="Paragraph:exit",e.BlockQuote="BlockQuote",e.BlockQuoteExit="BlockQuote:exit",e.ListItem="ListItem",e.ListItemExit="ListItem:exit",e.List="List",e.ListExit="List:exit",e.Header="Header",e.HeaderExit="Header:exit",e.CodeBlock="CodeBlock",e.CodeBlockExit="CodeBlock:exit",e.HtmlBlock="HtmlBlock",e.HtmlBlockExit="HtmlBlock:exit",e.HorizontalRule="HorizontalRule",e.HorizontalRuleExit="HorizontalRule:exit",e.Comment="Comment",e.CommentExit="Comment:exit",e.ReferenceDef="ReferenceDef",e.ReferenceDefExit="ReferenceDef:exit",e.Str="Str",e.StrExit="Str:exit",e.Break="Break",e.BreakExit="Break:exit",e.Emphasis="Emphasis",e.EmphasisExit="Emphasis:exit",e.Strong="Strong",e.StrongExit="Strong:exit",e.Html="Html",e.HtmlExit="Html:exit",e.Link="Link",e.LinkExit="Link:exit",e.Image="Image",e.ImageExit="Image:exit",e.Code="Code",e.CodeExit="Code:exit",e.Delete="Delete",e.DeleteExit="Delete:exit"}(e.ASTNodeTypes||(e.ASTNodeTypes={}))})),JB=HB((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SyntaxMap=void 0;var t=GB();e.SyntaxMap={root:t.ASTNodeTypes.Document,paragraph:t.ASTNodeTypes.Paragraph,blockquote:t.ASTNodeTypes.BlockQuote,listItem:t.ASTNodeTypes.ListItem,list:t.ASTNodeTypes.List,Bullet:"Bullet",heading:t.ASTNodeTypes.Header,code:t.ASTNodeTypes.CodeBlock,HtmlBlock:t.ASTNodeTypes.HtmlBlock,thematicBreak:t.ASTNodeTypes.HorizontalRule,text:t.ASTNodeTypes.Str,break:t.ASTNodeTypes.Break,emphasis:t.ASTNodeTypes.Emphasis,strong:t.ASTNodeTypes.Strong,html:t.ASTNodeTypes.Html,link:t.ASTNodeTypes.Link,image:t.ASTNodeTypes.Image,inlineCode:t.ASTNodeTypes.Code,delete:t.ASTNodeTypes.Delete,yaml:"Yaml",table:"Table",tableRow:"TableRow",tableCell:"TableCell",linkReference:"LinkReference",imageReference:"ImageReference",footnoteReference:"FootnoteReference",definition:"Definition",ReferenceDef:t.ASTNodeTypes.ReferenceDef}})),XB=HB(((e,t)=>{var n=t.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],s=!0;return function e(d){var p=n?i(d):d,f={},h=!0,m={node:p,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(h=!1)},delete:function(e){delete m.parent.node[m.key],e&&(h=!1)},remove:function(e){l(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(h=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){s=!1},block:function(){h=!1}};if(!s)return m;function g(){if("object"==typeof m.node&&null!==m.node){(!m.keys||m.node_!==m.node)&&(m.keys=a(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}g();var v=t.call(m,m.node);return void 0!==v&&m.update&&m.update(v),f.before&&f.before.call(m,m.node),h&&("object"==typeof m.node&&null!==m.node&&!m.circular&&(o.push(m),g(),c(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var i=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=i.node),i.isLast=o==m.keys.length-1,i.isFirst=0==o,f.post&&f.post.call(m,i),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node)),m}(e).node}function i(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if(function(e){return"[object Date]"===s(e)}(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===s(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===s(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===s(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===s(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===s(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return c(a(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){(!this.isRoot||!n)&&(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var s=i(r);return e.push(r),t.push(s),c(a(r),(function(e){s[e]=n(r[e])})),e.pop(),t.pop(),s}return r}(this.value)};var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function s(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},c=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};c(a(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}})),ZB=HB(((e,t)=>{var n=1e3,r=60*n,o=60*r,i=24*o,a=7*i,s=365.25*i;function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}t.exports=function(e,t){t=t||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var l=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*a;case"days":case"day":case"d":return l*i;case"hours":case"hour":case"hrs":case"hr":case"h":return l*o;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=i?l(e,t,i,"day"):t>=o?l(e,t,o,"hour"):t>=r?l(e,t,r,"minute"):t>=n?l(e,t,n,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=i?Math.round(e/i)+"d":t>=o?Math.round(e/o)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}})),QB=HB(((e,t)=>{t.exports=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;let n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;let i=t.formatters[o];if("function"==typeof i){let t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){let r=t(this.namespace+(typeof n>"u"?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];let n,r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)!r[n]||("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=ZB(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}})),ez=HB(((e,t)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!(!(typeof window<"u"&&window.process)||"renderer"!==window.process.type&&!window.process.__nwjs)||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch{}}(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=QB()(e);var{formatters:n}=t.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),tz=HB(((e,t)=>{t.exports=function(e){if(e)throw e}})),nz=HB(((e,t)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}})),rz=HB(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,o=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return typeof t>"u"||n.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};t.exports=function e(){var t,n,r,o,i,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(o=c(t,n))&&(h&&o&&(s(o)||(i=a(o)))?(i?(i=!1,u=r&&a(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,u,o)})):typeof o<"u"&&l(d,{name:n,newValue:o}));return d}})),oz=HB(((e,t)=>{t.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}})),iz=HB(((e,t)=>{var n=[].slice;t.exports=function(e,t){var r;return function(){var t,a=n.call(arguments,0),s=e.length>a.length;s&&a.push(o);try{t=e.apply(null,a)}catch(e){if(s&&r)throw e;return o(e)}s||(t&&"function"==typeof t.then?t.then(i,o):t instanceof Error?o(t):i(t))};function o(){r||(r=!0,t.apply(null,arguments))}function i(e){o(null,e)}}})),az=HB(((e,t)=>{var n=iz();t.exports=o,o.wrap=n;var r=[].slice;function o(){var e=[],t={run:function(){var t=-1,o=r.call(arguments,0,-1),i=arguments[arguments.length-1];if("function"!=typeof i)throw new Error("Expected function as last argument, not "+i);(function a(s){var l=e[++t],c=r.call(arguments,0).slice(1),u=o.length,d=-1;if(s)i(s);else{for(;++d<u;)(null===c[d]||void 0===c[d])&&(c[d]=o[d]);o=c,l?n(l,a).apply(null,o):i.apply(null,[null].concat(o))}}).apply(null,[null].concat(o))},use:function(n){if("function"!=typeof n)throw new Error("Expected `fn` to be a function, not "+n);return e.push(n),t}};return t}})),sz=HB(((e,t)=>{var n={}.hasOwnProperty;function r(e){return(!e||"object"!=typeof e)&&(e={}),i(e.line)+":"+i(e.column)}function o(e){return(!e||"object"!=typeof e)&&(e={}),r(e.start)+"-"+r(e.end)}function i(e){return e&&"number"==typeof e?e:1}t.exports=function(e){return e&&"object"==typeof e?n.call(e,"position")||n.call(e,"type")?o(e.position):n.call(e,"start")||n.call(e,"end")?o(e):n.call(e,"line")||n.call(e,"column")?r(e):"":""}})),lz=HB(((e,t)=>{var n=sz();function r(){}t.exports=i,r.prototype=Error.prototype,i.prototype=new r;var o=i.prototype;function i(e,t,r){var o,i,a;"string"==typeof t&&(r=t,t=null),o=function(e){var t,n=[null,null];return"string"==typeof e&&(t=e.indexOf(":"),-1===t?n[1]=e:(n[0]=e.slice(0,t),n[1]=e.slice(t+1))),n}(r),i=n(t)||"1:1",a={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(a=t,t=t.start):a.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=i,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=a,this.source=o[0],this.ruleId=o[1]}o.file="",o.name="",o.reason="",o.message="",o.stack="",o.fatal=null,o.column=null,o.line=null})),cz=HB((e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}e.basename=function(e,n){var r,o,i,a,s=0,l=-1;if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');if(t(e),r=e.length,void 0===n||!n.length||n.length>e.length){for(;r--;)if(47===e.charCodeAt(r)){if(i){s=r+1;break}}else l<0&&(i=!0,l=r+1);return l<0?"":e.slice(s,l)}if(n===e)return"";for(o=-1,a=n.length-1;r--;)if(47===e.charCodeAt(r)){if(i){s=r+1;break}}else o<0&&(i=!0,o=r+1),a>-1&&(e.charCodeAt(r)===n.charCodeAt(a--)?a<0&&(l=r):(a=-1,l=o));return s===l?l=o:l<0&&(l=e.length),e.slice(s,l)},e.dirname=function(e){var n,r,o;if(t(e),!e.length)return".";for(n=-1,o=e.length;--o;)if(47===e.charCodeAt(o)){if(r){n=o;break}}else r||(r=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},e.extname=function(e){var n,r,o,i=-1,a=0,s=-1,l=0;for(t(e),o=e.length;o--;)if(47!==(r=e.charCodeAt(o)))s<0&&(n=!0,s=o+1),46===r?i<0?i=o:1!==l&&(l=1):i>-1&&(l=-1);else if(n){a=o+1;break}return i<0||s<0||0===l||1===l&&i===s-1&&i===a+1?"":e.slice(i,s)},e.join=function(){for(var e,n=-1;++n<arguments.length;)t(arguments[n]),arguments[n]&&(e=void 0===e?arguments[n]:e+"/"+arguments[n]);return void 0===e?".":function(e){var n,r;return t(e),n=47===e.charCodeAt(0),r=function(e,t){for(var n,r,o="",i=0,a=-1,s=0,l=-1;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(a!==l-1&&1!==s)if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){if((r=o.lastIndexOf("/"))!==o.length-1){r<0?(o="",i=0):i=(o=o.slice(0,r)).length-1-o.lastIndexOf("/"),a=l,s=0;continue}}else if(o.length){o="",i=0,a=l,s=0;continue}t&&(o=o.length?o+"/..":"..",i=2)}else o.length?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!n),!r.length&&!n&&(r="."),r.length&&47===e.charCodeAt(e.length-1)&&(r+="/"),n?"/"+r:r}(e)},e.sep="/"})),uz=HB((e=>{e.cwd=function(){return"/"}})),dz=HB(((e,t)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}})),pz=HB(((e,t)=>{var n=cz(),r=uz(),o=dz();t.exports=s;var i={}.hasOwnProperty,a=["history","path","basename","stem","extname","dirname"];function s(e){var t,n;if(e){if("string"==typeof e||o(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof s))return new s(e);for(this.data={},this.messages=[],this.history=[],this.cwd=r.cwd(),n=-1;++n<a.length;)t=a[n],i.call(e,t)&&(this[t]=e[t]);for(t in e)a.indexOf(t)<0&&(this[t]=e[t])}function l(e,t){if(e&&e.indexOf(n.sep)>-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+n.sep+"`")}function c(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}s.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(s.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){c(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(s.prototype,"dirname",{get:function(){return"string"==typeof this.path?n.dirname(this.path):void 0},set:function(e){u(this.path,"dirname"),this.path=n.join(e||"",this.basename)}}),Object.defineProperty(s.prototype,"basename",{get:function(){return"string"==typeof this.path?n.basename(this.path):void 0},set:function(e){c(e,"basename"),l(e,"basename"),this.path=n.join(this.dirname||"",e)}}),Object.defineProperty(s.prototype,"extname",{get:function(){return"string"==typeof this.path?n.extname(this.path):void 0},set:function(e){if(l(e,"extname"),u(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=n.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(s.prototype,"stem",{get:function(){return"string"==typeof this.path?n.basename(this.path,this.extname):void 0},set:function(e){c(e,"stem"),l(e,"stem"),this.path=n.join(this.dirname||"",e+(this.extname||""))}})})),fz=HB(((e,t)=>{var n=lz(),r=pz();t.exports=r,r.prototype.message=function(e,t,r){var o=new n(e,t,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o},r.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},r.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}})),hz=HB(((e,t)=>{t.exports=fz()})),mz=HB(((e,t)=>{var n=tz(),r=nz(),o=rz(),i=oz(),a=az(),s=hz();t.exports=function e(){var t,r=[],v=a(),b={},y=-1;return x.data=function(e,n){return"string"==typeof e?2===arguments.length?(h("data",t),b[e]=n,x):c.call(b,e)&&b[e]||null:e?(h("data",t),b=e,x):b},x.freeze=w,x.attachers=r,x.use=function(e){var n;if(h("use",t),null!=e)if("function"==typeof e)u.apply(null,arguments);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?c(e):a(e)}return n&&(b.settings=o(b.settings||{},n)),x;function a(e){c(e.plugins),e.settings&&(n=o(n||{},e.settings))}function s(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u.apply(null,e):a(e)}}function c(e){var t=-1;if(null!=e){if("object"!=typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)s(e[t])}}function u(e,t){var n=function(e){for(var t=-1;++t<r.length;)if(r[t][0]===e)return r[t]}(e);n?(i(n[1])&&i(t)&&(t=o(!0,n[1],t)),n[1]=t):r.push(l.call(arguments))}},x.parse=function(e){var t,n=s(e);return w(),p("parse",t=x.Parser),d(t,"parse")?new t(String(n),n).parse():t(String(n),n)},x.stringify=function(e,t){var n,r=s(t);return w(),f("stringify",n=x.Compiler),m(e),d(n,"compile")?new n(e,r).compile():n(e,r)},x.run=S,x.runSync=function(e,t){var r,o;return S(e,t,i),g("runSync","run",o),r;function i(e,t){o=!0,r=t,n(e)}},x.process=_,x.processSync=function(e){var t,r;return w(),p("processSync",x.Parser),f("processSync",x.Compiler),_(t=s(e),o),g("processSync","process",r),t;function o(e){r=!0,n(e)}},x;function x(){for(var t=e(),n=-1;++n<r.length;)t.use.apply(null,r[n]);return t.data(o(!0,{},b)),t}function w(){var e,n;if(t)return x;for(;++y<r.length;)!1!==(e=r[y])[1]&&(!0===e[1]&&(e[1]=void 0),"function"==typeof(n=e[0].apply(x,e.slice(1)))&&v.use(n));return t=!0,y=1/0,x}function S(e,t,n){if(m(e),w(),!n&&"function"==typeof t&&(n=t,t=null),!n)return new Promise(r);function r(r,o){v.run(e,s(t),(function(t,i,a){i=i||e,t?o(t):r?r(i):n(null,i,a)}))}r(null,n)}function _(e,t){if(w(),p("process",x.Parser),f("process",x.Compiler),!t)return new Promise(n);function n(n,r){var o=s(e);u.run(x,{file:o},(function(e){e?r(e):n?n(o):t(null,o)}))}n(null,t)}}().freeze();var l=[].slice,c={}.hasOwnProperty,u=a().use((function(e,t){t.tree=e.parse(t.file)})).use((function(e,t,n){e.run(t.tree,t.file,(function(e,r,o){e?n(e):(t.tree=r,t.file=o,n())}))})).use((function(e,t){var n=e.stringify(t.tree,t.file);null==n||("string"==typeof n||r(n)?("value"in t.file&&(t.file.value=n),t.file.contents=n):t.file.result=n)}));function d(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)return!0;return!1}(e.prototype)||t in e.prototype)}function p(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Parser`")}function f(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Compiler`")}function h(e,t){if(t)throw new Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function m(e){if(!e||"string"!=typeof e.type)throw new Error("Expected node, got `"+e+"`")}function g(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}})),gz=HB(((e,t)=>{t.exports=function(e,t){var n,r=String(e),o=0;if("string"!=typeof t)throw new Error("Expected character");for(n=r.indexOf(t);-1!==n;)o++,n=r.indexOf(t,n+t.length);return o}})),vz=HB(((e,t)=>{function n(e){if(null==e)return r;if("string"==typeof e)return function(e){return t;function t(t){return!(!t||t.type!==e)}}(e);if("object"==typeof e)return"length"in e?function(e){for(var t=[],r=-1;++r<e.length;)t[r]=n(e[r]);return o;function o(){for(var e=-1;++e<t.length;)if(t[e].apply(this,arguments))return!0;return!1}}(e):function(e){return t;function t(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function r(){return!0}t.exports=n})),bz=HB(((e,t)=>{t.exports=function(e){return e}})),yz=HB(((e,t)=>{t.exports=s;var n=vz(),r=bz(),o=!0,i="skip",a=!1;function s(e,t,s,l){var c,u;"function"==typeof t&&"function"!=typeof s&&(l=s,s=t,t=null),u=n(t),c=l?-1:1,function e(n,d,p){var f,h="object"==typeof n&&null!==n?n:{};return"string"==typeof h.type&&(f="string"==typeof h.tagName?h.tagName:"string"==typeof h.name?h.name:void 0,m.displayName="node ("+r(h.type+(f?"<"+f+">":""))+")"),m;function m(){var r,f,h=p.concat(n),m=[];if((!t||u(n,d,p[p.length-1]||null))&&(m=function(e){return null!==e&&"object"==typeof e&&"length"in e?e:"number"==typeof e?[o,e]:[e]}(s(n,p)),m[0]===a))return m;if(n.children&&m[0]!==i)for(f=(l?n.children.length:-1)+c;f>-1&&f<n.children.length;){if((r=e(n.children[f],f,h)())[0]===a)return r;f="number"==typeof r[1]?r[1]:f+c}return m}}(e,null,[])()}s.CONTINUE=o,s.SKIP=i,s.EXIT=a})),xz=HB(((e,t)=>{t.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}})),wz=HB(((e,t)=>{t.exports=function(e,t,n,r){var o,c;return"string"==typeof t||t&&"function"==typeof t.exec?c=[[t,n]]:(c=t,r=n),a(e,o=r||{},function e(t){var n=t[0];return r;function r(r,s){var l,c,u,d,p=n[0],f=n[1],h=[],m=0,g=s.children.indexOf(r);for(p.lastIndex=0,c=p.exec(r.value);c&&(l=c.index,!1!==(d=f.apply(null,[].concat(c,{index:c.index,input:c.input})))&&(m!==l&&h.push({type:"text",value:r.value.slice(m,l)}),"string"==typeof d&&d.length>0&&(d={type:"text",value:d}),d&&(h=[].concat(h,d)),m=l+c[0].length),p.global);)c=p.exec(r.value);if(void 0===l?(h=[r],g--):(m<r.value.length&&h.push({type:"text",value:r.value.slice(m)}),h.unshift(g,1),i.apply(s.children,h)),t.length>1)for(u=e(t.slice(1)),l=-1;++l<h.length;)"text"===(r=h[l]).type?u(r,s):a(r,o,u);return g+h.length+1}}(function(e){var t,n,r=[];if("object"!=typeof e)throw new Error("Expected array or object as schema");if("length"in e)for(n=-1;++n<e.length;)r.push([s(e[n][0]),l(e[n][1])]);else for(t in e)r.push([s(t),l(e[t])]);return r}(c))),e};var n=yz(),r=vz(),o=xz(),i=[].splice;function a(e,t,o){var i=r(t.ignore||[]);return n(e,"text",(function(e,t){for(var n,r,a=-1;++a<t.length;){if(n=t[a],i(n,r?r.children.indexOf(n):void 0,r))return;r=n}return o(e,r)})),[]}function s(e){return"string"==typeof e?new RegExp(o(e),"g"):e}function l(e){return"function"==typeof e?e:function(){return e}}})),Sz=HB(((e,t)=>{t.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/})),_z=HB(((e,t)=>{var n=String.fromCharCode;t.exports=n})),Ez=HB(((e,t)=>{var n=_z();t.exports=function(e){return function(t){return e.test(n(t))}}})),kz=HB(((e,t)=>{var n=Sz(),r=Ez()(n);t.exports=r})),Tz=HB(((e,t)=>{var n=Ez()(/\s/);t.exports=n})),Cz=HB((e=>{var t=gz(),n=wz(),r=kz(),o=Tz();function i(e){this.config.enter.autolinkProtocol.call(this,e)}function a(e,n,r,o,i){var a,s,c="";return!!(l(i)&&(/^w/i.test(n)&&(r=n+r,n="",c="http://"),function(e){var t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(r))&&(a=function(e){var n,r,o,i=/[!"&'),.:;<>?\]}]+$/.exec(e);if(i)for(e=e.slice(0,i.index),i=i[0],n=i.indexOf(")"),r=t(e,"("),o=t(e,")");-1!==n&&r>o;)e+=i.slice(0,n+1),i=i.slice(n+1),n=i.indexOf(")"),o++;return[e,i]}(r+o),a[0]))&&(s={type:"link",title:null,url:c+n+a[0],children:[{type:"text",value:n+a[0]}]},a[1]&&(s=[s,{type:"text",value:a[1]}]),s)}function s(e,t,n,r){return!(!l(r,!0)||/[_-]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function l(e,t){var n=e.input.charCodeAt(e.index-1);return(n!=n||o(n)||r(n))&&(!t||47!==n)}e.transforms=[function(e){n(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/i,a],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/,s]],{ignore:["link","linkReference"]})}],e.enter={literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:i,literalAutolinkHttp:i,literalAutolinkWww:i},e.exit={literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e),this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}})),Oz=HB(((e,t)=>{var n={}.hasOwnProperty;t.exports=n})),Iz=HB(((e,t)=>{var n=[].splice;t.exports=n})),Mz=HB(((e,t)=>{var n=Iz();t.exports=function(e,t,r,o){var i,a=e.length,s=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,r=r>0?r:0,o.length<1e4)(i=Array.from(o)).unshift(t,r),n.apply(e,i);else for(r&&n.apply(e,[t,r]);s<o.length;)(i=o.slice(s,s+1e4)).unshift(t,0),n.apply(e,i),s+=1e4,t+=1e4}})),Dz=HB(((e,t)=>{t.exports=function(e){return null==e?[]:"length"in e?e:[e]}})),jz=HB(((e,t)=>{var n=Oz(),r=Mz(),o=Dz();function i(e,t){var r,i,s,l;for(r in t)for(l in i=n.call(e,r)?e[r]:e[r]={},s=t[r])i[l]=a(o(s[l]),n.call(i,l)?i[l]:[])}function a(e,t){for(var n=-1,o=[];++n<e.length;)("after"===e[n].add?t:o).push(e[n]);return r(t,0,0,o),t}t.exports=function(e){for(var t={},n=-1;++n<e.length;)i(t,e[n]);return t}})),Az=HB(((e,t)=>{var n=Ez()(/[A-Za-z]/);t.exports=n})),Nz=HB(((e,t)=>{var n=Ez()(/[\dA-Za-z]/);t.exports=n})),Pz=HB(((e,t)=>{t.exports=function(e){return e<32||127===e}})),Rz=HB(((e,t)=>{t.exports=function(e){return e<-2}})),Lz=HB((e=>{var t=Az(),n=Nz(),r=Pz(),o=Rz(),i=kz(),a=Tz(),s={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(t){return 87===t||t-32==87?(e.consume(t),i):n(t)}function i(t){return 87===t||t-32==87?(e.consume(t),a):n(t)}function a(t){return 46===t?(e.consume(t),s):n(t)}function s(e){return null===e||o(e)?n(e):t(e)}},partial:!0},l={tokenize:function(e,t,n){var o,s;return l;function l(t){return 38===t?e.check(d,p,c)(t):46===t||95===t?e.check(u,p,c)(t):r(t)||a(t)||45!==t&&i(t)?p(t):(e.consume(t),l)}function c(t){return 46===t?(s=o,o=void 0,e.consume(t),l):(95===t&&(o=!0),e.consume(t),l)}function p(e){return s||o?n(e):t(e)}},partial:!0},c={tokenize:function(e,t){var n=0;return r;function r(a){return 38===a?e.check(d,t,o)(a):(40===a&&n++,41===a?e.check(u,i,o)(a):b(a)?t(a):v(a)?e.check(u,t,o)(a):(e.consume(a),r))}function o(t){return e.consume(t),r}function i(e){return--n<0?t(e):o(e)}},partial:!0},u={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(o){return v(o)?(e.consume(o),r):b(o)?t(o):n(o)}},partial:!0},d={tokenize:function(e,n,r){return function(t){return e.consume(t),o};function o(n){return t(n)?(e.consume(n),o):59===n?(e.consume(n),i):r(n)}function i(e){return b(e)?n(e):r(e)}},partial:!0},p={tokenize:function(e,t,n){var r=this;return function(t){return 87!==t&&t-32!=87||!x(r.previous)||_(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(s,e.attempt(l,e.attempt(c,o),n),n)(t))};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:x},f={tokenize:function(e,t,n){var o=this;return function(t){return 72!==t&&t-32!=72||!w(o.previous)||_(o.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),s)};function s(t){return 84===t||t-32==84?(e.consume(t),u):n(t)}function u(t){return 84===t||t-32==84?(e.consume(t),d):n(t)}function d(t){return 80===t||t-32==80?(e.consume(t),p):n(t)}function p(t){return 83===t||t-32==83?(e.consume(t),f):f(t)}function f(t){return 58===t?(e.consume(t),h):n(t)}function h(t){return 47===t?(e.consume(t),m):n(t)}function m(t){return 47===t?(e.consume(t),g):n(t)}function g(t){return r(t)||a(t)||i(t)?n(t):e.attempt(l,e.attempt(c,v),n)(t)}function v(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:w},h={tokenize:function(e,t,r){var o,i=this;return function(t){return y(t)&&S(i.previous)&&!_(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)):r(t)};function a(t){return y(t)?(e.consume(t),a):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(u,p,l)(t):45===t||95===t?e.check(u,r,c)(t):n(t)?(e.consume(t),s):p(t)}function l(t){return e.consume(t),o=!0,s}function c(t){return e.consume(t),d}function d(t){return 46===t?e.check(u,r,l)(t):s(t)}function p(n){return o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:S},m={};e.text=m;for(var g=48;g<123;)m[g]=h,58===++g?g=65:91===g&&(g=97);function v(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function b(e){return null===e||e<0||32===e||60===e}function y(e){return 43===e||45===e||46===e||95===e||n(e)}function x(e){return null===e||e<0||32===e||40===e||42===e||95===e||126===e}function w(e){return null===e||!t(e)}function S(e){return 47!==e&&w(e)}function _(e){for(var t=e.length;t--;)if(("labelLink"===e[t][1].type||"labelImage"===e[t][1].type)&&!e[t][1]._balanced)return!0}m[43]=h,m[45]=h,m[46]=h,m[95]=h,m[72]=[h,f],m[104]=[h,f],m[87]=[h,p],m[119]=[h,p]})),Fz=HB(((e,t)=>{t.exports=Lz()})),Uz=HB(((e,t)=>{t.exports=function(e){return e<0||32===e}})),Bz=HB(((e,t)=>{var n=Uz(),r=kz(),o=Tz();t.exports=function(e){return null===e||n(e)||o(e)?1:r(e)?2:void 0}})),zz=HB(((e,t)=>{t.exports=function(e,t,n){for(var r,o=[],i=-1;++i<e.length;)(r=e[i].resolveAll)&&o.indexOf(r)<0&&(t=r(t,n),o.push(r));return t}})),Kz=HB(((e,t)=>{var n=Object.assign;t.exports=n})),$z=HB(((e,t)=>{var n=Kz();t.exports=function(e){return n({},e)}})),Vz=HB(((e,t)=>{t.exports=function(e){var t=(e||{}).singleTilde,a={tokenize:function(e,r,o){var i=this.previous,a=this.events,s=0;return l;function l(t){return 126!==t||126===i&&"characterEscape"!==a[a.length-1][1].type?o(t):(e.enter("strikethroughSequenceTemporary"),c(t))}function c(a){var l,u,d=n(i);return 126===a?s>1?o(a):(e.consume(a),s++,c):s<2&&!t?o(a):(l=e.exit("strikethroughSequenceTemporary"),u=n(a),l._open=!u||2===u&&d,l._close=!d||2===d&&u,r(a))}},resolveAll:function(e,t){for(var n,a,s,l,c=-1;++c<e.length;)if("enter"===e[c][0]&&"strikethroughSequenceTemporary"===e[c][1].type&&e[c][1]._close)for(s=c;s--;)if("exit"===e[s][0]&&"strikethroughSequenceTemporary"===e[s][1].type&&e[s][1]._open&&e[c][1].end.offset-e[c][1].start.offset==e[s][1].end.offset-e[s][1].start.offset){e[c][1].type="strikethroughSequence",e[s][1].type="strikethroughSequence",n={type:"strikethrough",start:i(e[s][1].start),end:i(e[c][1].end)},a={type:"strikethroughText",start:i(e[s][1].end),end:i(e[c][1].start)},l=[["enter",n,t],["enter",e[s][1],t],["exit",e[s][1],t],["enter",a,t]],r(l,l.length,0,o(t.parser.constructs.insideSpan.null,e.slice(s+1,c),t)),r(l,l.length,0,[["exit",a,t],["enter",e[c][1],t],["exit",e[c][1],t],["exit",n,t]]),r(e,s-1,c-s+3,l),c=s+l.length-2;break}return function(e){for(var t=-1,n=e.length;++t<n;)"strikethroughSequenceTemporary"===e[t][1].type&&(e[t][1].type="data");return e}(e)}};return null==t&&(t=!0),{text:{126:a},insideSpan:{null:a}}};var n=Bz(),r=Mz(),o=zz(),i=$z()})),Hz=HB(((e,t)=>{t.exports=function(e){return-2===e||-1===e||32===e}})),Wz=HB(((e,t)=>{var n=Hz();t.exports=function(e,t,r,o){var i=o?o-1:1/0,a=0;return function(o){return n(o)?(e.enter(r),s(o)):t(o)};function s(o){return n(o)&&a++<i?(e.consume(o),s):(e.exit(r),t(o))}}})),Yz=HB((e=>{e.flow={null:{tokenize:function(e,o,i){var a,s,l=[],c=0;return function(t){return null===t||-5===t||-4===t||-3===t?i(t):(e.enter("table")._align=l,e.enter("tableHead"),e.enter("tableRow"),124===t?u(t):(c++,e.enter("temporaryTableCellContent"),f(t)))};function u(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,d}function d(r){return null===r||-5===r||-4===r||-3===r?function(r){return null===r?i(r):(e.exit("tableRow"),e.exit("tableHead"),e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.check(n,i,t(e,m,"linePrefix",4)))}(r):-2===r||-1===r||32===r?(e.enter("whitespace"),e.consume(r),p):(a&&(a=void 0,c++),124===r?u(r):(e.enter("temporaryTableCellContent"),f(r)))}function p(t){return-2===t||-1===t||32===t?(e.consume(t),p):(e.exit("whitespace"),d(t))}function f(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),d(t)):(e.consume(t),92===t?h:f)}function h(t){return 92===t||124===t?(e.consume(t),f):f(t)}function m(t){return null===t||t<0||32===t?i(t):(e.enter("tableDelimiterRow"),g(t))}function g(t){return null===t||-5===t||-4===t||-3===t?w(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),v):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,l.push(null),b):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l.push("left"),y):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),g):i(t)}function v(t){return-2===t||-1===t||32===t?(e.consume(t),v):(e.exit("whitespace"),g(t))}function b(t){return 45===t?(e.consume(t),b):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l[l.length-1]="left"===l[l.length-1]?"center":"right",x):g(t))}function y(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,b):i(t)}function x(t){return null===t||-5===t||-4===t||-3===t?w(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),v):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),g):i(t)}function w(t){return e.exit("tableDelimiterRow"),s&&c===l.length?null===t?S(t):e.check(r,S,_)(t):i(t)}function S(t){return e.exit("table"),o(t)}function _(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t(e,E,"linePrefix",4)}function E(t){return e.enter("tableBody"),k(t)}function k(t){return e.enter("tableRow"),124===t?T(t):(e.enter("temporaryTableCellContent"),I(t))}function T(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),C}function C(t){return null===t||-5===t||-4===t||-3===t?function(t){return e.exit("tableRow"),null===t?D(t):e.check(r,D,j)(t)}(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),O):124===t?T(t):(e.enter("temporaryTableCellContent"),I(t))}function O(t){return-2===t||-1===t||32===t?(e.consume(t),O):(e.exit("whitespace"),C(t))}function I(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),C(t)):(e.consume(t),92===t?M:I)}function M(t){return 92===t||124===t?(e.consume(t),I):I(t)}function D(t){return e.exit("tableBody"),S(t)}function j(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t(e,k,"linePrefix",4)}},resolve:function(e,t){for(var n,r,o,i,a,s,l,c,u,d,p=e.length,f=-1;++f<p;)n=e[f][1],i&&("temporaryTableCellContent"===n.type&&(c=c||f,u=f),("tableCellDivider"===n.type||"tableRow"===n.type)&&u&&(s={type:"tableContent",start:e[c][1].start,end:e[u][1].end},l={type:"chunkText",start:s.start,end:s.end,contentType:"text"},e.splice(c,u-c+1,["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]),f-=u-c-3,p=e.length,c=void 0,u=void 0)),"exit"===e[f][0]&&d&&d+1<f&&("tableCellDivider"===n.type||"tableRow"===n.type&&(d+3<f||"whitespace"!==e[d][1].type))&&(a={type:o?"tableDelimiter":r?"tableHeader":"tableData",start:e[d][1].start,end:e[f][1].end},e.splice(f+("tableCellDivider"===n.type?1:0),0,["exit",a,t]),e.splice(d,0,["enter",a,t]),f+=2,p=e.length,d=f+1),"tableRow"===n.type&&(i="enter"===e[f][0])&&(d=f+1),"tableDelimiterRow"===n.type&&(o="enter"===e[f][0])&&(d=f+1),"tableHead"===n.type&&(r="enter"===e[f][0]);return e},interruptible:!0}};var t=Wz(),n={tokenize:function(e,t,n){return function(t){return 45!==t?n(t):(e.enter("setextUnderline"),r(t))};function r(t){return 45===t?(e.consume(t),r):o(t)}function o(r){return-2===r||-1===r||32===r?(e.consume(r),o):null===r||-5===r||-4===r||-3===r?t(r):n(r)}},partial:!0},r={tokenize:function(e,t,n){var r=0;return function(t){return e.enter("check"),e.consume(t),o};function o(i){return-1===i||32===i?(e.consume(i),4===++r?t:o):null===i||i<0?t(i):n(i)}},partial:!0}})),qz=HB(((e,t)=>{t.exports=Yz()})),Gz=HB(((e,t)=>{t.exports=function(e){for(var t=-1,n=0;++t<e.length;)n+="string"==typeof e[t]?e[t].length:1;return n}})),Jz=HB(((e,t)=>{var n=Gz();t.exports=function(e,t){var r=e[e.length-1];return r&&r[1].type===t?n(r[2].sliceStream(r[1])):0}})),Xz=HB((e=>{var t=Uz(),n=Wz(),r=Jz(),o={tokenize:function(e,t,n){var r=this;return function(t){return 91===t&&null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o):n(t)};function o(t){return-2===t||32===t?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(r){return 93===r?(e.enter("taskListCheckMarker"),e.consume(r),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:i},t,n)):n(r)}}};function i(e,o,i){var a=this;return n(e,(function(e){return r(a.events,"whitespace")&&null!==e&&!t(e)?o(e):i(e)}),"whitespace")}e.text={91:o}})),Zz=HB(((e,t)=>{t.exports=Xz()})),Qz=HB(((e,t)=>{var n=jz(),r=Fz(),o=Vz(),i=qz(),a=Zz();t.exports=function(e){return n([r,o(e),i,a])}})),eK=HB(((e,t)=>{t.exports=Qz()})),tK=HB((e=>{e.canContainEols=["delete"],e.enter={strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},e.exit={strikethrough:function(e){this.exit(e)}}})),nK=HB((e=>{function t(e){this.exit(e)}function n(e){this.enter({type:"tableCell",children:[]},e)}function r(e,t){return"|"===t?t:e}e.enter={table:function(e){this.enter({type:"table",align:e._align,children:[]},e),this.setData("inTable",!0)},tableData:n,tableHeader:n,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},e.exit={codeText:function(e){var t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,r)),this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:t,tableHeader:t,tableRow:t}})),rK=HB((e=>{function t(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}e.exit={taskListCheckValueChecked:t,taskListCheckValueUnchecked:t,paragraph:function(e){var t,n=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],o=n.children,i=r.children[0],a=-1;if(n&&"listItem"===n.type&&"boolean"==typeof n.checked&&i&&"text"===i.type){for(;++a<o.length;)if("paragraph"===o[a].type){t=o[a];break}t===r&&(i.value=i.value.slice(1),0===i.value.length?r.children.shift():(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}this.exit(e)}}})),oK=HB(((e,t)=>{var n=Cz(),r=tK(),o=nK(),i=rK(),a={}.hasOwnProperty;function s(e,t){var n,r,o;for(n in t)r=a.call(e,n)?e[n]:e[n]={},o=t[n],"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,o):Object.assign(r,o)}t.exports=function(e){for(var t={transforms:[],canContainEols:[]},n=e.length,r=-1;++r<n;)s(t,e[r]);return t}([n,r,o,i])})),iK=HB((e=>{var t="phrasing",n=["autolink","link","image","label"];e.unsafe=[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:t,notInConstruct:n},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:t,notInConstruct:n},{character:":",before:"[ps]",after:"\\/",inConstruct:t,notInConstruct:n}]})),aK=HB(((e,t)=>{t.exports=function(e,t,n){for(var r,o,i,a=e.children||[],s=[],l=-1,c=n.before;++l<a.length;)i=a[l],l+1<a.length?((o=t.handle.handlers[a[l+1].type])&&o.peek&&(o=o.peek),r=o?o(a[l+1],e,t,{before:"",after:""}).charAt(0):""):r=n.after,s.length>0&&("\r"===c||"\n"===c)&&"html"===i.type&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),c=" "),s.push(t.handle(i,e,t,{before:c,after:r})),c=s[s.length-1].slice(-1);return s.join("")}})),sK=HB((e=>{var t=aK();function n(e,n,r){var o=r.enter("emphasis"),i=t(e,r,{before:"~",after:"~"});return o(),"~~"+i+"~~"}e.unsafe=[{character:"~",inConstruct:"phrasing"}],e.handlers={delete:n},n.peek=function(){return"~"}})),lK=HB(((e,t)=>{t.exports=function(e){var t,n;return e._compiled||(t=e.before?"(?:"+e.before+")":"",n=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(n||""),"g")),e._compiled}})),cK=HB(((e,t)=>{t.exports=r,r.peek=function(){return"`"};var n=lK();function r(e,t,r){for(var o,i,a,s,l=e.value||"",c="`",u=-1;new RegExp("(^|[^`])"+c+"([^`]|$)").test(l);)c+="`";for(/[^ \r\n]/.test(l)&&(/[ \r\n`]/.test(l.charAt(0))||/[ \r\n`]/.test(l.charAt(l.length-1)))&&(l=" "+l+" ");++u<r.unsafe.length;)if((o=r.unsafe[u]).atBreak)for(i=n(o);a=i.exec(l);)s=a.index,10===l.charCodeAt(s)&&13===l.charCodeAt(s-1)&&s--,l=l.slice(0,s)+" "+l.slice(a.index+1);return c+l+c}})),uK=HB(((e,t)=>{var n,r="";t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var o=e.length*t;if(n!==e||typeof n>"u")n=e,r="";else if(r.length>=o)return r.substr(0,o);for(;o>r.length&&t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+=e,r=r.substr(0,o)}})),dK=HB(((e,t)=>{var n=uK();t.exports=function(e,t){for(var c,u,d,p,y,x,w,S,_,E,k,T=t||{},C=!1!==T.padding,O=!1!==T.delimiterStart,I=!1!==T.delimiterEnd,M=(T.align||[]).concat(),D=!1!==T.alignDelimiters,j=[],A=T.stringLength||v,N=-1,P=e.length,R=[],L=[],F=[],U=[],B=[],z=0;++N<P;){for(u=-1,F=[],U=[],(d=(c=e[N]).length)>z&&(z=d);++u<d;)x=g(c[u]),!0===D&&(y=A(x),U[u]=y,(void 0===(p=B[u])||y>p)&&(B[u]=y)),F.push(x);R[N]=F,L[N]=U}if(u=-1,d=z,"object"==typeof M&&"length"in M)for(;++u<d;)j[u]=b(M[u]);else for(k=b(M);++u<d;)j[u]=k;for(u=-1,d=z,F=[],U=[];++u<d;)k=j[u],_="",E="",k===h?_=s:k===m?E=s:k===f&&(_=s,E=s),y=D?Math.max(1,B[u]-_.length-E.length):1,x=_+n(a,y)+E,!0===D&&((y=_.length+y+E.length)>B[u]&&(B[u]=y),U[u]=y),F[u]=x;for(R.splice(1,0,F),L.splice(1,0,U),N=-1,P=R.length,w=[];++N<P;){for(F=R[N],U=L[N],u=-1,d=z,S=[];++u<d;)x=F[u]||"",_="",E="",!0===D&&(y=B[u]-(U[u]||0),(k=j[u])===m?_=n(o,y):k===f?y%2==0?E=_=n(o,y/2):(_=n(o,y/2+.5),E=n(o,y/2-.5)):E=n(o,y)),!0===O&&0===u&&S.push(l),!0===C&&!(!1===D&&""===x)&&(!0===O||0!==u)&&S.push(o),!0===D&&S.push(_),S.push(x),!0===D&&S.push(E),!0===C&&S.push(o),(!0===I||u!==d-1)&&S.push(l);S=S.join(""),!1===I&&(S=S.replace(r,"")),w.push(S)}return w.join(i)};var r=/ +$/,o=" ",i="\n",a="-",s=":",l="|",c=0,u=67,d=76,p=82,f=99,h=108,m=114;function g(e){return null==e?"":String(e)}function v(e){return e.length}function b(e){var t="string"==typeof e?e.charCodeAt(0):c;return t===d||t===h?h:t===p||t===m?m:t===u||t===f?f:c}})),pK=HB(((e,t)=>{var n=aK(),r=cK(),o=dK();t.exports=function(e){var t=e||{},i=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,n){return u(function(e,t){for(var n=e.children,r=-1,o=n.length,i=[],a=t.enter("table");++r<o;)i[r]=d(n[r],t);return a(),i}(e,n),e.align)},tableRow:function(e,t,n){var r=d(e,n),o=u([r]);return o.slice(0,o.indexOf("\n"))},tableCell:c,inlineCode:function(e,t,n){var o=r(e,t,n);return-1!==n.stack.indexOf("tableCell")&&(o=o.replace(/\|/g,"\\$&")),o}}};function c(e,t,r){var o=r.enter("tableCell"),i=n(e,r,{before:l,after:l});return o(),i}function u(e,t){return o(e,{align:t,alignDelimiters:a,padding:i,stringLength:s})}function d(e,t){for(var n=e.children,r=-1,o=n.length,i=[],a=t.enter("tableRow");++r<o;)i[r]=c(n[r],0,t);return a(),i}}})),fK=HB(((e,t)=>{t.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}})),hK=HB(((e,t)=>{t.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}})),mK=HB(((e,t)=>{t.exports=function(e,t){for(var r,o=e.children||[],i=[],a=-1;++a<o.length;)r=o[a],i.push(t.handle(r,e,t,{before:"\n",after:"\n"})),a+1<o.length&&i.push(s(r,o[a+1]));return i.join("");function s(r,o){for(var i,a=-1;++a<t.join.length&&(!0!==(i=t.join[a](r,o,e,t))&&1!==i);){if("number"==typeof i)return n("\n",1+Number(i));if(!1===i)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}};var n=uK()})),gK=HB(((e,t)=>{t.exports=function(e,t){for(var r,o=[],i=0,a=0;r=n.exec(e);)s(e.slice(i,r.index)),o.push(r[0]),i=r.index+r[0].length,a++;return s(e.slice(i)),o.join("");function s(e){o.push(t(e,a,!e))}};var n=/\r?\n|\r/g})),vK=HB(((e,t)=>{t.exports=function(e,t,s){var l,c,u,d=r(s),p=o(s);return t&&t.ordered&&(d=(t.start>-1?t.start:1)+(!1===s.options.incrementListMarker?0:t.children.indexOf(e))+"."),l=d.length+1,("tab"===p||"mixed"===p&&(t&&t.spread||e.spread))&&(l=4*Math.ceil(l/4)),u=s.enter("listItem"),c=a(i(e,s),(function(e,t,r){return t?(r?"":n(" ",l))+e:(r?d:d+n(" ",l-d.length))+e})),u(),c};var n=uK(),r=fK(),o=hK(),i=mK(),a=gK()})),bK=HB((e=>{var t=vK();e.unsafe=[{atBreak:!0,character:"-",after:"[:|-]"}],e.handlers={listItem:function(e,n,r){var o=t(e,n,r),i=e.children[0];return"boolean"==typeof e.checked&&i&&"paragraph"===i.type&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(t){return t+"["+(e.checked?"x":" ")+"] "}))),o}}})),yK=HB(((e,t)=>{t.exports=function e(t,n){var r,o=-1;if(n.extensions)for(;++o<n.extensions.length;)e(t,n.extensions[o]);for(r in n)"extensions"===r||("unsafe"===r||"join"===r?t[r]=t[r].concat(n[r]||[]):"handlers"===r?t[r]=Object.assign(t[r],n[r]||{}):t.options[r]=n[r]);return t}})),xK=HB(((e,t)=>{var n=iK(),r=sK(),o=pK(),i=bK(),a=yK();t.exports=function(e){var t=a({handlers:{},join:[],unsafe:[],options:{}},{extensions:[n,r,o(e),i]});return Object.assign(t.options,{handlers:t.handlers,join:t.join,unsafe:t.unsafe})}})),wK=HB(((e,t)=>{var n,r=eK(),o=oK(),i=xK();t.exports=function(e){var t=this.data();function a(e,n){t[e]?t[e].push(n):t[e]=[n]}!n&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(n=!0,console.warn("[remark-gfm] Warning: please upgrade to remark 13 to use this plugin")),a("micromarkExtensions",r(e)),a("fromMarkdownExtensions",o),a("toMarkdownExtensions",i(e))}})),SK=HB(((e,t)=>{function n(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var t=[],r=-1;++r<e.length;)t[r]=n(e[r]);return t.join("")}t.exports=n})),_K=HB(((e,t)=>{t.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}})),EK=HB(((e,t)=>{var n=_z();t.exports=function(e,t){var r=parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||!(65535&~r)||65534==(65535&r)||r>1114111?"�":n(r)}})),kK=HB((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Rz(),n=Wz(),r=function(e){var r,o=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n(e,o,"linePrefix")}),(function(t){return e.enter("paragraph"),i(t)}));return o;function i(t){var n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,a(t)}function a(n){return null===n?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(n)):t(n)?(e.consume(n),e.exit("chunkText"),i):(e.consume(n),a)}};e.tokenize=r})),TK=HB(((e,t)=>{var n=Rz(),r=Wz(),o={tokenize:function(e,t,o){return r(e,(function(e){return null===e||n(e)?t(e):o(e)}),"linePrefix")},partial:!0};t.exports=o})),CK=HB((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Rz(),n=Wz(),r=TK(),o=function(e){var n,o,s,l=this,c=[],u=0,d={tokenize:function(e,t){var s=0;return n={},u;function u(t){return s<c.length?(l.containerState=c[s][1],e.attempt(c[s][0].continuation,d,p)(t)):o.currentConstruct&&o.currentConstruct.concrete?(n.flowContinue=!0,m(t)):(l.interrupt=o.currentConstruct&&o.currentConstruct.interruptible,l.containerState={},e.attempt(i,h,m)(t))}function d(e){return s++,l.containerState._closeFlow?h(e):u(e)}function p(t){return o.currentConstruct&&o.currentConstruct.lazy?(l.containerState={},e.attempt(i,h,e.attempt(a,h,e.check(r,h,f)))(t)):h(t)}function f(e){return s=c.length,n.lazy=!0,n.flowContinue=!0,m(e)}function h(e){return n.flowEnd=!0,m(e)}function m(e){return n.continued=s,l.interrupt=l.containerState=void 0,t(e)}},partial:!0};return p;function p(t){return u<c.length?(l.containerState=c[u][1],e.attempt(c[u][0].continuation,f,h)(t)):h(t)}function f(e){return u++,p(e)}function h(t){return n&&n.flowContinue?g(t):(l.interrupt=o&&o.currentConstruct&&o.currentConstruct.interruptible,l.containerState={},e.attempt(i,m,g)(t))}function m(e){return c.push([l.currentConstruct,l.containerState]),l.containerState=void 0,h(e)}function g(t){return null===t?(x(0,!0),void e.consume(t)):(o=o||l.parser.flow(l.now()),e.enter("chunkFlow",{contentType:"flow",previous:s,_tokenizer:o}),v(t))}function v(n){return null===n?(y(e.exit("chunkFlow")),g(n)):t(n)?(e.consume(n),y(e.exit("chunkFlow")),e.check(d,b)):(e.consume(n),v)}function b(e){return x(n.continued,n&&n.flowEnd),u=0,p(e)}function y(e){s&&(s.next=e),s=e,o.lazy=n&&n.lazy,o.defineSkip(e.start),o.write(l.sliceStream(e))}function x(t,n){var r=c.length;for(o&&n&&(o.write([null]),s=o=void 0);r-- >t;)l.containerState=c[r][1],c[r][0].exit.call(l,e);c.length=t}},i={tokenize:function(e,t,r){return n(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},a={tokenize:function(e,t,r){return n(e,e.lazy(this.parser.constructs.flow,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};e.tokenize=o})),OK=HB(((e,t)=>{var n=Kz(),r=Mz(),o=$z();function i(e,t){for(var n,o,i,a,s,l,c=e[t][1],u=e[t][2],d=t-1,p=[],f=c._tokenizer||u.parser[c.contentType](c.start),h=f.events,m=[],g={};c;){for(;e[++d][1]!==c;);p.push(d),c._tokenizer||(n=u.sliceStream(c),c.next||n.push(null),o&&f.defineSkip(c.start),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(n),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),o=c,c=c.next}for(c=o,i=h.length;i--;)"enter"===h[i][0]?a=!0:a&&h[i][1].type===h[i-1][1].type&&h[i][1].start.line!==h[i][1].end.line&&(v(h.slice(i+1,s)),c._tokenizer=c.next=void 0,c=c.previous,s=i+1);for(f.events=c._tokenizer=c.next=void 0,v(h.slice(0,s)),i=-1,l=0;++i<m.length;)g[l+m[i][0]]=l+m[i][1],l+=m[i][1]-m[i][0]-1;return g;function v(t){var n=p.pop();m.unshift([n,n+t.length-1]),r(e,n,2,t)}}t.exports=function(e){for(var t,a,s,l,c,u,d,p={},f=-1;++f<e.length;){for(;f in p;)f=p[f];if(t=e[f],f&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[f-1][1].type&&((s=0)<(u=t[1]._tokenizer.events).length&&"lineEndingBlank"===u[s][1].type&&(s+=2),s<u.length&&"content"===u[s][1].type))for(;++s<u.length&&"content"!==u[s][1].type;)"chunkText"===u[s][1].type&&(u[s][1].isInFirstContentOfListItem=!0,s++);if("enter"===t[0])t[1].contentType&&(n(p,i(e,f)),f=p[f],d=!0);else if(t[1]._container||t[1]._movePreviousLineEndings){for(s=f,a=void 0;s--&&("lineEnding"===(l=e[s])[1].type||"lineEndingBlank"===l[1].type);)"enter"===l[0]&&(a&&(e[a][1].type="lineEndingBlank"),l[1].type="lineEnding",a=s);a&&(t[1].end=o(e[a][1].start),(c=e.slice(a,f)).unshift(t),r(e,a,f-a+1,c))}}return!d}})),IK=HB(((e,t)=>{var n=Rz(),r=Jz(),o=OK(),i=Wz(),a={tokenize:function(e,t){var r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(t)};function o(t){return null===t?i(t):n(t)?e.check(s,a,i)(t):(e.consume(t),o)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),r=r.next=e.enter("chunkContent",{contentType:"content",previous:r}),o}},resolve:function(e){return o(e),e},interruptible:!0,lazy:!0},s={tokenize:function(e,t,o){var a=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,s,"linePrefix")};function s(i){return null===i||n(i)?o(i):a.parser.constructs.disable.null.indexOf("codeIndented")>-1||r(a.events,"linePrefix")<4?e.interrupt(a.parser.constructs.flow,o,t)(i):t(i)}},partial:!0};t.exports=a})),MK=HB((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=IK(),n=Wz(),r=TK(),o=function(e){var o=this,i=e.attempt(r,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEndingBlank"),e.consume(t),e.exit("lineEndingBlank"),o.currentConstruct=void 0,i}),e.attempt(this.parser.constructs.flowInitial,a,n(e,e.attempt(this.parser.constructs.flow,a,e.attempt(t,a)),"linePrefix")));return i;function a(t){if(null!==t)return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o.currentConstruct=void 0,i;e.consume(t)}};e.tokenize=o})),DK=HB((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Kz(),n=$z(),r=a("text"),o=a("string"),i={resolveAll:s()};function a(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){var t=r[e],o=-1;if(null===e)return!0;if(t)for(;++o<t.length;)if(!t[o].previous||t[o].previous.call(n,n.previous))return!0}},resolveAll:s("text"===e?l:void 0)}}function s(e){return function(t,n){for(var r,o=-1;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):(!t[o]||"data"!==t[o][1].type)&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function l(e,r){for(var o,i,a,s,l,c,u,d,p=-1;++p<=e.length;)if((p===e.length||"lineEnding"===e[p][1].type)&&"data"===e[p-1][1].type){for(i=e[p-1][1],s=(o=r.sliceStream(i)).length,l=-1,c=0,u=void 0;s--;)if("string"==typeof(a=o[s])){for(l=a.length;32===a.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===a)u=!0,c++;else if(-1!==a){s++;break}c&&(d={type:p===e.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{line:i.end.line,column:i.end.column-c,offset:i.end.offset-c,_index:i.start._index+s,_bufferIndex:s?l:i.start._bufferIndex+l},end:n(i.end)},i.end=n(d.start),i.start.offset===i.end.offset?t(i,d):(e.splice(p,0,["enter",d,r],["exit",d,r]),p+=2)),p++}return e}e.resolver=i,e.string=o,e.text=r})),jK=HB(((e,t)=>{var n=Mz();t.exports=function(e,t){return e.length?(n(e,e.length,0,t),e):t}})),AK=HB(((e,t)=>{var n=_z();t.exports=function(e){for(var t,r,o,i=-1,a=[];++i<e.length;){if("string"==typeof(t=e[i]))r=t;else if(-5===t)r="\r";else if(-4===t)r="\n";else if(-3===t)r="\r\n";else if(-2===t)r="\t";else if(-1===t){if(o)continue;r=" "}else r=n(t);o=-2===t,a.push(r)}return a.join("")}})),NK=HB(((e,t)=>{t.exports=function(e,t){var n,r=t.start._index,o=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;return r===i?n=[e[r].slice(o,a)]:(n=e.slice(r,i),o>-1&&(n[0]=n[0].slice(o)),a>0&&n.push(e[i].slice(0,a))),n}})),PK=HB(((e,t)=>{var n=Kz(),r=Rz(),o=jK(),i=Mz(),a=Dz(),s=zz(),l=AK(),c=$z(),u=NK();t.exports=function(e,t,d){var p=d?c(d):{line:1,column:1,offset:0},f={},h=[],m=[],g=[],v={consume:function(e){r(e)?(p.line++,p.column=1,p.offset+=-3===e?2:1,T()):-1!==e&&(p.column++,p.offset++),p._bufferIndex<0?p._index++:(p._bufferIndex++,p._bufferIndex===m[p._index].length&&(p._bufferIndex=-1,p._index++)),b.previous=e},enter:function(e,t){var n=t||{};return n.type=e,n.start=w(),b.events.push(["enter",n,b]),g.push(n),n},exit:function(e){var t=g.pop();return t.end=w(),b.events.push(["exit",t,b]),t},attempt:E((function(e,t){k(e,t.from)})),check:E(_),interrupt:E(_,{interrupt:!0}),lazy:E(_,{lazy:!0})},b={previous:null,events:[],parser:e,sliceStream:x,sliceSerialize:function(e){return l(x(e))},now:w,defineSkip:function(e){f[e.line]=e.column,T()},write:function(e){return m=o(m,e),function(){for(var e,t;p._index<m.length;)if("string"==typeof(t=m[p._index]))for(e=p._index,p._bufferIndex<0&&(p._bufferIndex=0);p._index===e&&p._bufferIndex<t.length;)S(t.charCodeAt(p._bufferIndex));else S(t)}(),null!==m[m.length-1]?[]:(k(t,0),b.events=s(h,b.events,b),b.events)}},y=t.tokenize.call(b,v);return t.resolveAll&&h.push(t),p._index=0,p._bufferIndex=-1,b;function x(e){return u(m,e)}function w(){return c(p)}function S(e){y=y(e)}function _(e,t){t.restore()}function E(e,t){return function(r,o,i){var s,l,c,u;return r.tokenize||"length"in r?d(a(r)):function(e){return e in r||null in r?d(r.null?a(r[e]).concat(a(r.null)):r[e])(e):i(e)};function d(e){return s=e,f(e[l=0])}function f(e){return function(r){return u=function(){var e=w(),t=b.previous,n=b.currentConstruct,r=b.events.length,o=Array.from(g);return{restore:i,from:r};function i(){p=e,b.previous=t,b.currentConstruct=n,b.events.length=r,g=o,T()}}(),c=e,e.partial||(b.currentConstruct=e),e.name&&b.parser.constructs.disable.null.indexOf(e.name)>-1?m():e.tokenize.call(t?n({},b,t):b,v,h,m)(r)}}function h(t){return e(c,u),o}function m(e){return u.restore(),++l<s.length?f(s[l]):i}}}function k(e,t){e.resolveAll&&h.indexOf(e)<0&&h.push(e),e.resolve&&i(b.events,t,b.events.length-t,e.resolve(b.events.slice(t),b)),e.resolveTo&&(b.events=e.resolveTo(b.events,b))}function T(){p.line in f&&p.column<2&&(p.column=f[p.line],p.offset+=f[p.line]-1)}}})),RK=HB(((e,t)=>{t.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}})),LK=HB(((e,t)=>{var n=jK(),r=Mz(),o=Bz(),i=RK(),a=zz(),s=$z(),l={name:"attention",tokenize:function(e,t){var n,r=o(this.previous);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(a){var s,l,c,u;return a===n?(e.consume(a),i):(s=e.exit("attentionSequence"),c=!(l=o(a))||2===l&&r,u=!r||2===r&&l,s._open=42===n?c:c&&(r||!u),s._close=42===n?u:u&&(l||!c),t(a))}},resolveAll:function(e,t){for(var o,l,c,u,d,p,f,h,m=-1;++m<e.length;)if("enter"===e[m][0]&&"attentionSequence"===e[m][1].type&&e[m][1]._close)for(o=m;o--;)if("exit"===e[o][0]&&"attentionSequence"===e[o][1].type&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[m][1]).charCodeAt(0)){if((e[o][1]._close||e[m][1]._open)&&(e[m][1].end.offset-e[m][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[m][1].end.offset-e[m][1].start.offset)%3))continue;u={type:(p=e[o][1].end.offset-e[o][1].start.offset>1&&e[m][1].end.offset-e[m][1].start.offset>1?2:1)>1?"strongSequence":"emphasisSequence",start:i(s(e[o][1].end),-p),end:s(e[o][1].end)},d={type:p>1?"strongSequence":"emphasisSequence",start:s(e[m][1].start),end:i(s(e[m][1].start),p)},c={type:p>1?"strongText":"emphasisText",start:s(e[o][1].end),end:s(e[m][1].start)},l={type:p>1?"strong":"emphasis",start:s(u.start),end:s(d.end)},e[o][1].end=s(u.start),e[m][1].start=s(d.end),f=[],e[o][1].end.offset-e[o][1].start.offset&&(f=n(f,[["enter",e[o][1],t],["exit",e[o][1],t]])),f=n(f,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",c,t]]),f=n(f,a(t.parser.constructs.insideSpan.null,e.slice(o+1,m),t)),f=n(f,[["exit",c,t],["enter",d,t],["exit",d,t],["exit",l,t]]),e[m][1].end.offset-e[m][1].start.offset?(h=2,f=n(f,[["enter",e[m][1],t],["exit",e[m][1],t]])):h=0,r(e,o-1,m-o+3,f),m=o+f.length-h-2;break}for(m=-1;++m<e.length;)"attentionSequence"===e[m][1].type&&(e[m][1].type="data");return e}};t.exports=l})),FK=HB(((e,t)=>{var n=Ez()(/[#-'*+\--9=?A-Z^-~]/);t.exports=n})),UK=HB(((e,t)=>{var n=Az(),r=Nz(),o=FK(),i=Pz(),a={name:"autolink",tokenize:function(e,t,a){var s=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return n(t)?(e.consume(t),c):o(t)?p(t):a(t)}function c(e){return 43===e||45===e||46===e||r(e)?u(e):p(e)}function u(t){return 58===t?(e.consume(t),d):(43===t||45===t||46===t||r(t))&&s++<32?(e.consume(t),u):p(t)}function d(t){return 62===t?(e.exit("autolinkProtocol"),g(t)):32===t||60===t||i(t)?a(t):(e.consume(t),d)}function p(t){return 64===t?(e.consume(t),s=0,f):o(t)?(e.consume(t),p):a(t)}function f(e){return r(e)?h(e):a(e)}function h(t){return 46===t?(e.consume(t),s=0,f):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",g(t)):m(t)}function m(t){return(45===t||r(t))&&s++<63?(e.consume(t),45===t?m:h):a(t)}function g(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}};t.exports=a})),BK=HB(((e,t)=>{var n=Hz(),r=Wz(),o={name:"blockQuote",tokenize:function(e,t,r){var o=this;return function(t){return 62===t?(o.containerState.open||(e.enter("blockQuote",{_container:!0}),o.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i):r(t)};function i(r){return n(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,n){return r(e,e.attempt(o,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};t.exports=o})),zK=HB(((e,t)=>{var n=Ez()(/[!-/:-@[-`{-~]/);t.exports=n})),KK=HB(((e,t)=>{var n=zK(),r={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),o};function o(o){return n(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}};t.exports=r})),$K=HB(((e,t)=>{var n;t.exports=function(e){var t,r="&"+e+";";return(n=n||document.createElement("i")).innerHTML=r,(59!==(t=n.textContent).charCodeAt(t.length-1)||"semi"===e)&&t!==r&&t}})),VK=HB(((e,t)=>{var n=Ez()(/\d/);t.exports=n})),HK=HB(((e,t)=>{var n=Ez()(/[\dA-Fa-f]/);t.exports=n})),WK=HB(((e,t)=>{var n=$K(),r=Nz(),o=VK(),i=HK();var a,s=(a=n)&&"object"==typeof a&&"default"in a?a:{default:a},l={name:"characterReference",tokenize:function(e,t,n){var a,l,c=this,u=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),d};function d(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,l=r,f(t))}function p(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=i,f):(e.enter("characterReferenceValue"),a=7,l=o,f(t))}function f(o){var i;return 59===o&&u?(i=e.exit("characterReferenceValue"),l!==r||s.default(c.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)):l(o)&&u++<a?(e.consume(o),f):n(o)}}};t.exports=l})),YK=HB(((e,t)=>{var n=Rz(),r=Uz(),o=Jz(),i=Wz(),a={name:"codeFenced",tokenize:function(e,t,a){var s,l=this,c={tokenize:function(e,t,r){var o=0;return i(e,a,"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function a(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}function l(t){return t===s?(e.consume(t),o++,l):o<d?r(t):(e.exit("codeFencedFenceSequence"),i(e,c,"whitespace")(t))}function c(o){return null===o||n(o)?(e.exit("codeFencedFence"),t(o)):r(o)}},partial:!0},u=o(this.events,"linePrefix"),d=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s=t,p(t)};function p(t){return t===s?(e.consume(t),d++,p):(e.exit("codeFencedFenceSequence"),d<3?a(t):i(e,f,"whitespace")(t))}function f(t){return null===t||n(t)?v(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||r(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),i(e,m,"whitespace")(t)):96===t&&t===s?a(t):(e.consume(t),h)}function m(t){return null===t||n(t)?v(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(t))}function g(t){return null===t||n(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(t)):96===t&&t===s?a(t):(e.consume(t),g)}function v(n){return e.exit("codeFencedFence"),l.interrupt?t(n):b(n)}function b(t){return null===t?x(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e.attempt(c,x,u?i(e,b,"linePrefix",u+1):b)):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||n(t)?(e.exit("codeFlowValue"),b(t)):(e.consume(t),y)}function x(n){return e.exit("codeFenced"),t(n)}},concrete:!0};t.exports=a})),qK=HB(((e,t)=>{var n=Rz(),r=Mz(),o=Jz(),i=Wz(),a={name:"codeIndented",tokenize:function(e,t,r){return e.attempt(s,o,r);function o(r){return null===r?t(r):n(r)?e.attempt(s,o,t)(r):(e.enter("codeFlowValue"),i(r))}function i(t){return null===t||n(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}},resolve:function(e,t){var n={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return r(e,0,0,[["enter",n,t]]),r(e,e.length,0,[["exit",n,t]]),e}},s={tokenize:function(e,t,r){var a=this;return i(e,(function s(l){return n(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i(e,s,"linePrefix",5)):o(a.events,"linePrefix")<4?r(l):t(l)}),"linePrefix",5)},partial:!0};t.exports=a})),GK=HB(((e,t)=>{var n=Rz(),r={name:"codeText",tokenize:function(e,t,r){var o,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),a++,s):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?r(t):96===t?(i=e.enter("codeTextSequence"),o=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||n(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),c)}function u(n){return 96===n?(e.consume(n),o++,u):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",c(n))}},resolve:function(e){var t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[r][1].type=e[o][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};t.exports=r})),JK=HB(((e,t)=>{var n=Pz(),r=Uz(),o=Rz();t.exports=function(e,t,i,a,s,l,c,u,d){var p=d||1/0,f=0;return function(t){return 60===t?(e.enter(a),e.enter(s),e.enter(l),e.consume(t),e.exit(l),h):n(t)||41===t?i(t):(e.enter(a),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(t))};function h(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(n))}function m(t){return 62===t?(e.exit("chunkString"),e.exit(u),h(t)):null===t||60===t||o(t)?i(t):(e.consume(t),92===t?g:m)}function g(t){return 60===t||62===t||92===t?(e.consume(t),m):m(t)}function v(o){return 40===o?++f>p?i(o):(e.consume(o),v):41===o?f--?(e.consume(o),v):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):null===o||r(o)?f?i(o):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):n(o)?i(o):(e.consume(o),92===o?b:v)}function b(t){return 40===t||41===t||92===t?(e.consume(t),v):v(t)}}})),XK=HB(((e,t)=>{var n=Rz(),r=Hz();t.exports=function(e,t,o,i,a,s){var l,c=this,u=0;return function(t){return e.enter(i),e.enter(a),e.consume(t),e.exit(a),e.enter(s),d};function d(r){return null===r||91===r||93===r&&!l||94===r&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs||u>999?o(r):93===r?(e.exit(s),e.enter(a),e.consume(r),e.exit(a),e.exit(i),t):n(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(r))}function p(t){return null===t||91===t||93===t||n(t)||u++>999?(e.exit("chunkString"),d(t)):(e.consume(t),l=l||!r(t),92===t?f:p)}function f(t){return 91===t||92===t||93===t?(e.consume(t),u++,p):p(t)}}})),ZK=HB(((e,t)=>{var n=Rz(),r=Hz(),o=Wz();t.exports=function(e,t){var i;return function a(s){return n(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i=!0,a):r(s)?o(e,a,i?"linePrefix":"lineSuffix")(s):t(s)}}})),QK=HB(((e,t)=>{var n=Rz(),r=Wz();t.exports=function(e,t,o,i,a,s){var l;return function(t){return e.enter(i),e.enter(a),e.consume(t),e.exit(a),l=40===t?41:t,c};function c(n){return n===l?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),t):(e.enter(s),u(n))}function u(t){return t===l?(e.exit(s),c(l)):null===t?o(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return t===l||null===t||n(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?p:d)}function p(t){return t===l||92===t?(e.consume(t),d):d(t)}}})),e$=HB(((e,t)=>{var n=Rz(),r=Uz(),o=_K(),i=JK(),a=XK(),s=Wz(),l=ZK(),c=QK(),u={name:"definition",tokenize:function(e,t,r){var c,u=this;return function(t){return e.enter("definition"),a.call(u,e,p,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function p(t){return c=o(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l(e,i(e,e.attempt(d,s(e,f,"whitespace"),s(e,f,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function f(o){return null===o||n(o)?(e.exit("definition"),u.parser.defined.indexOf(c)<0&&u.parser.defined.push(c),t(o)):r(o)}}},d={tokenize:function(e,t,o){return function(t){return r(t)?l(e,i)(t):o(t)};function i(t){return 34===t||39===t||40===t?c(e,s(e,a,"whitespace"),o,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):o(t)}function a(e){return null===e||n(e)?t(e):o(e)}},partial:!0};t.exports=u})),t$=HB(((e,t)=>{var n=Rz(),r={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),o};function o(o){return n(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):r(o)}}};t.exports=r})),n$=HB(((e,t)=>{var n=Rz(),r=Uz(),o=Hz(),i=Mz(),a=Wz(),s={name:"headingAtx",tokenize:function(e,t,i){var s=this,l=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),c(t)};function c(n){return 35===n&&l++<6?(e.consume(n),c):null===n||r(n)?(e.exit("atxHeadingSequence"),s.interrupt?t(n):u(n)):i(n)}function u(r){return 35===r?(e.enter("atxHeadingSequence"),d(r)):null===r||n(r)?(e.exit("atxHeading"),t(r)):o(r)?a(e,u,"whitespace")(r):(e.enter("atxHeadingText"),p(r))}function d(t){return 35===t?(e.consume(t),d):(e.exit("atxHeadingSequence"),u(t))}function p(t){return null===t||35===t||r(t)?(e.exit("atxHeadingText"),u(t)):(e.consume(t),p)}},resolve:function(e,t){var n,r,o=e.length-2,a=3;return"whitespace"===e[a][1].type&&(a+=2),o-2>a&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4),o>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},i(e,a,o-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}};t.exports=s})),r$=HB(((e,t)=>{t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]})),o$=HB(((e,t)=>{t.exports=["pre","script","style","textarea"]})),i$=HB(((e,t)=>{var n=Az(),r=Nz(),o=Rz(),i=Uz(),a=Hz(),s=_z(),l=r$(),c=o$(),u=TK(),d={name:"htmlFlow",tokenize:function(e,t,u){var d,f,h,m,g,v=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),b};function b(r){return 33===r?(e.consume(r),y):47===r?(e.consume(r),S):63===r?(e.consume(r),d=3,v.interrupt?t:K):n(r)?(e.consume(r),h=s(r),f=!0,_):u(r)}function y(r){return 45===r?(e.consume(r),d=2,x):91===r?(e.consume(r),d=5,h="CDATA[",m=0,w):n(r)?(e.consume(r),d=4,v.interrupt?t:K):u(r)}function x(n){return 45===n?(e.consume(n),v.interrupt?t:K):u(n)}function w(n){return n===h.charCodeAt(m++)?(e.consume(n),m===h.length?v.interrupt?t:P:w):u(n)}function S(t){return n(t)?(e.consume(t),h=s(t),_):u(t)}function _(n){return null===n||47===n||62===n||i(n)?47!==n&&f&&c.indexOf(h.toLowerCase())>-1?(d=1,v.interrupt?t(n):P(n)):l.indexOf(h.toLowerCase())>-1?(d=6,47===n?(e.consume(n),E):v.interrupt?t(n):P(n)):(d=7,v.interrupt?u(n):f?T(n):k(n)):45===n||r(n)?(e.consume(n),h+=s(n),_):u(n)}function E(n){return 62===n?(e.consume(n),v.interrupt?t:P):u(n)}function k(t){return a(t)?(e.consume(t),k):A(t)}function T(t){return 47===t?(e.consume(t),A):58===t||95===t||n(t)?(e.consume(t),C):a(t)?(e.consume(t),T):A(t)}function C(t){return 45===t||46===t||58===t||95===t||r(t)?(e.consume(t),C):O(t)}function O(t){return 61===t?(e.consume(t),I):a(t)?(e.consume(t),O):T(t)}function I(t){return null===t||60===t||61===t||62===t||96===t?u(t):34===t||39===t?(e.consume(t),g=t,M):a(t)?(e.consume(t),I):(g=void 0,D(t))}function M(t){return t===g?(e.consume(t),j):null===t||o(t)?u(t):(e.consume(t),M)}function D(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||i(t)?O(t):(e.consume(t),D)}function j(e){return 47===e||62===e||a(e)?T(e):u(e)}function A(t){return 62===t?(e.consume(t),N):u(t)}function N(t){return a(t)?(e.consume(t),N):null===t||o(t)?P(t):u(t)}function P(t){return 45===t&&2===d?(e.consume(t),F):60===t&&1===d?(e.consume(t),U):62===t&&4===d?(e.consume(t),$):63===t&&3===d?(e.consume(t),K):93===t&&5===d?(e.consume(t),z):!o(t)||6!==d&&7!==d?null===t||o(t)?R(t):(e.consume(t),P):e.check(p,$,R)(t)}function R(t){return e.exit("htmlFlowData"),L(t)}function L(t){return null===t?V(t):o(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L):(e.enter("htmlFlowData"),P(t))}function F(t){return 45===t?(e.consume(t),K):P(t)}function U(t){return 47===t?(e.consume(t),h="",B):P(t)}function B(t){return 62===t&&c.indexOf(h.toLowerCase())>-1?(e.consume(t),$):n(t)&&h.length<8?(e.consume(t),h+=s(t),B):P(t)}function z(t){return 93===t?(e.consume(t),K):P(t)}function K(t){return 62===t?(e.consume(t),$):P(t)}function $(t){return null===t||o(t)?(e.exit("htmlFlowData"),V(t)):(e.consume(t),$)}function V(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){for(var t=e.length;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},p={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(u,t,n)}},partial:!0};t.exports=d})),a$=HB(((e,t)=>{var n=Az(),r=Nz(),o=Rz(),i=Uz(),a=Hz(),s=Wz(),l={name:"htmlText",tokenize:function(e,t,l){var c,u,d,p,f=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),h};function h(t){return 33===t?(e.consume(t),m):47===t?(e.consume(t),O):63===t?(e.consume(t),T):n(t)?(e.consume(t),D):l(t)}function m(t){return 45===t?(e.consume(t),g):91===t?(e.consume(t),u="CDATA[",d=0,w):n(t)?(e.consume(t),k):l(t)}function g(t){return 45===t?(e.consume(t),v):l(t)}function v(t){return null===t||62===t?l(t):45===t?(e.consume(t),b):y(t)}function b(e){return null===e||62===e?l(e):y(e)}function y(t){return null===t?l(t):45===t?(e.consume(t),x):o(t)?(p=y,U(t)):(e.consume(t),y)}function x(t){return 45===t?(e.consume(t),z):y(t)}function w(t){return t===u.charCodeAt(d++)?(e.consume(t),d===u.length?S:w):l(t)}function S(t){return null===t?l(t):93===t?(e.consume(t),_):o(t)?(p=S,U(t)):(e.consume(t),S)}function _(t){return 93===t?(e.consume(t),E):S(t)}function E(t){return 62===t?z(t):93===t?(e.consume(t),E):S(t)}function k(t){return null===t||62===t?z(t):o(t)?(p=k,U(t)):(e.consume(t),k)}function T(t){return null===t?l(t):63===t?(e.consume(t),C):o(t)?(p=T,U(t)):(e.consume(t),T)}function C(e){return 62===e?z(e):T(e)}function O(t){return n(t)?(e.consume(t),I):l(t)}function I(t){return 45===t||r(t)?(e.consume(t),I):M(t)}function M(t){return o(t)?(p=M,U(t)):a(t)?(e.consume(t),M):z(t)}function D(t){return 45===t||r(t)?(e.consume(t),D):47===t||62===t||i(t)?j(t):l(t)}function j(t){return 47===t?(e.consume(t),z):58===t||95===t||n(t)?(e.consume(t),A):o(t)?(p=j,U(t)):a(t)?(e.consume(t),j):z(t)}function A(t){return 45===t||46===t||58===t||95===t||r(t)?(e.consume(t),A):N(t)}function N(t){return 61===t?(e.consume(t),P):o(t)?(p=N,U(t)):a(t)?(e.consume(t),N):j(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?l(t):34===t||39===t?(e.consume(t),c=t,R):o(t)?(p=P,U(t)):a(t)?(e.consume(t),P):(e.consume(t),c=void 0,F)}function R(t){return t===c?(e.consume(t),L):null===t?l(t):o(t)?(p=R,U(t)):(e.consume(t),R)}function L(e){return 62===e||47===e||i(e)?j(e):l(e)}function F(t){return null===t||34===t||39===t||60===t||61===t||96===t?l(t):62===t||i(t)?j(t):(e.consume(t),F)}function U(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s(e,B,"linePrefix",f.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function B(t){return e.enter("htmlTextData"),p(t)}function z(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):l(n)}}};t.exports=l})),s$=HB(((e,t)=>{var n=Uz(),r=jK(),o=Mz(),i=_K(),a=zz(),s=$z(),l=JK(),c=XK(),u=QK(),d=ZK(),p={name:"labelEnd",tokenize:function(e,t,n){for(var r,o,a=this,s=a.events.length;s--;)if(("labelImage"===a.events[s][1].type||"labelLink"===a.events[s][1].type)&&!a.events[s][1]._balanced){r=a.events[s][1];break}return function(t){return r?r._inactive?c(t):(o=a.parser.defined.indexOf(i(a.sliceSerialize({start:r.end,end:a.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(n){return 40===n?e.attempt(f,t,o?t:c)(n):91===n?e.attempt(h,t,o?e.attempt(m,t,c):c)(n):o?t(n):c(n)}function c(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){for(var n,i,l,c,u,d,p,f=e.length,h=0;f--;)if(c=e[f][1],u){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[f][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(d){if("enter"===e[f][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(u=f,"labelLink"!==c.type)){h=2;break}}else"labelEnd"===c.type&&(d=f);return n={type:"labelLink"===e[u][1].type?"link":"image",start:s(e[u][1].start),end:s(e[e.length-1][1].end)},i={type:"label",start:s(e[u][1].start),end:s(e[d][1].end)},l={type:"labelText",start:s(e[u+h+2][1].end),end:s(e[d-2][1].start)},p=r(p=[["enter",n,t],["enter",i,t]],e.slice(u+1,u+h+3)),p=r(p,[["enter",l,t]]),p=r(p,a(t.parser.constructs.insideSpan.null,e.slice(u+h+4,d-3),t)),p=r(p,[["exit",l,t],e[d-2],e[d-1],["exit",i,t]]),p=r(p,e.slice(d+1)),p=r(p,[["exit",n,t]]),o(e,u,e.length,p),e},resolveAll:function(e){for(var t,n=-1;++n<e.length;)!(t=e[n][1])._used&&("labelImage"===t.type||"labelLink"===t.type||"labelEnd"===t.type)&&(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},f={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),d(e,o)};function o(t){return 41===t?s(t):l(e,i,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function i(t){return n(t)?d(e,a)(t):s(t)}function a(t){return 34===t||39===t||40===t?u(e,d(e,s),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function s(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},h={tokenize:function(e,t,n){var r=this;return function(t){return c.call(r,e,o,n,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.indexOf(i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))<0?n(e):t(e)}}},m={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};t.exports=p})),l$=HB(((e,t)=>{var n={name:"labelStartImage",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:s$().resolveAll};t.exports=n})),c$=HB(((e,t)=>{var n={name:"labelStartLink",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:s$().resolveAll};t.exports=n})),u$=HB(((e,t)=>{var n=Wz(),r={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n(e,t,"linePrefix")}}};t.exports=r})),d$=HB(((e,t)=>{var n=Rz(),r=Hz(),o=Wz(),i={name:"thematicBreak",tokenize:function(e,t,i){var a,s=0;return function(t){return e.enter("thematicBreak"),a=t,l(t)};function l(u){return u===a?(e.enter("thematicBreakSequence"),c(u)):r(u)?o(e,l,"whitespace")(u):s<3||null!==u&&!n(u)?i(u):(e.exit("thematicBreak"),t(u))}function c(t){return t===a?(e.consume(t),s++,c):(e.exit("thematicBreakSequence"),l(t))}}};t.exports=i})),p$=HB(((e,t)=>{var n=VK(),r=Hz(),o=Jz(),i=Gz(),a=Wz(),s=TK(),l=d$(),c={name:"list",tokenize:function(e,t,a){var c=this,d=o(c.events,"linePrefix"),p=0;return function(t){var r=c.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===r?!c.containerState.marker||t===c.containerState.marker:n(t)){if(c.containerState.type||(c.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===t||45===t?e.check(l,a,h)(t):h(t);if(!c.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(t)}return a(t)};function f(t){return n(t)&&++p<10?(e.consume(t),f):(!c.interrupt||p<2)&&(c.containerState.marker?t===c.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),h(t)):a(t)}function h(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),c.containerState.marker=c.containerState.marker||t,e.check(s,c.interrupt?a:m,e.attempt(u,v,g))}function m(e){return c.containerState.initialBlankLine=!0,d++,v(e)}function g(t){return r(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),v):a(t)}function v(n){return c.containerState.size=d+i(c.sliceStream(e.exit("listItemPrefix"))),t(n)}},continuation:{tokenize:function(e,t,n){var o=this;return o.containerState._closeFlow=void 0,e.check(s,(function(n){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,a(e,t,"listItemIndent",o.containerState.size+1)(n)}),(function(n){return o.containerState.furtherBlankLines||!r(n)?(o.containerState.furtherBlankLines=o.containerState.initialBlankLine=void 0,i(n)):(o.containerState.furtherBlankLines=o.containerState.initialBlankLine=void 0,e.attempt(d,t,i)(n))}));function i(r){return o.containerState._closeFlow=!0,o.interrupt=void 0,a(e,e.attempt(c,t,n),"linePrefix",o.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)}},u={tokenize:function(e,t,n){var i=this;return a(e,(function(e){return r(e)||!o(i.events,"listItemPrefixWhitespace")?n(e):t(e)}),"listItemPrefixWhitespace",i.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},d={tokenize:function(e,t,n){var r=this;return a(e,(function(e){return o(r.events,"listItemIndent")===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};t.exports=c})),f$=HB(((e,t)=>{var n=Rz(),r=$z(),o=Wz(),i={name:"setextUnderline",tokenize:function(e,t,r){for(var i,a,s=this,l=s.events.length;l--;)if("lineEnding"!==s.events[l][1].type&&"linePrefix"!==s.events[l][1].type&&"content"!==s.events[l][1].type){a="paragraph"===s.events[l][1].type;break}return function(t){return s.lazy||!s.interrupt&&!a?r(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,c(t))};function c(t){return t===i?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),o(e,u,"lineSuffix")(t))}function u(o){return null===o||n(o)?(e.exit("setextHeadingLine"),t(o)):r(o)}},resolveTo:function(e,t){for(var n,o,i,a,s=e.length;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){n=s;break}"paragraph"===e[s][1].type&&(o=s)}else"content"===e[s][1].type&&e.splice(s,1),!i&&"definition"===e[s][1].type&&(i=s);return a={type:"setextHeading",start:r(e[o][1].start),end:r(e[e.length-1][1].end)},e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=r(e[i][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}};t.exports=i})),h$=HB((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=DK(),n=LK(),r=UK(),o=BK(),i=KK(),a=WK(),s=YK(),l=qK(),c=GK(),u=e$(),d=t$(),p=n$(),f=i$(),h=a$(),m=s$(),g=l$(),v=c$(),b=u$(),y=p$(),x=f$(),w=d$(),S={42:y,43:y,45:y,48:y,49:y,50:y,51:y,52:y,53:y,54:y,55:y,56:y,57:y,62:o},_={91:u},E={"-2":l,"-1":l,32:l},k={35:p,42:w,45:[x,w],60:f,61:x,95:w,96:s,126:s},T={38:a,92:i},C={"-5":b,"-4":b,"-3":b,33:g,38:a,42:n,60:[r,h],91:v,92:[d,i],93:m,95:n,96:c},O={null:[n,t.resolver]};e.contentInitial=_,e.disable={null:[]},e.document=S,e.flow=k,e.flowInitial=E,e.insideSpan=O,e.string=T,e.text=C})),m$=HB(((e,t)=>{var n=kK(),r=CK(),o=MK(),i=DK(),a=jz(),s=PK(),l=Dz(),c=h$();t.exports=function(e){var t={defined:[],constructs:a([c].concat(l((e||{}).extensions))),content:u(n),document:u(r),flow:u(o),string:u(i.string),text:u(i.text)};return t;function u(e){return function(n){return s(t,e,n)}}}})),g$=HB(((e,t)=>{var n=/[\0\t\n\r]/g;t.exports=function(){var e,t=!0,r=1,o="";return function(i,a,s){var l,c,u,d,p,f=[];for(i=o+i.toString(a),u=0,o="",t&&(65279===i.charCodeAt(0)&&u++,t=void 0);u<i.length;){if(n.lastIndex=u,d=(l=n.exec(i))?l.index:i.length,p=i.charCodeAt(d),!l){o=i.slice(u);break}if(10===p&&u===d&&e)f.push(-3),e=void 0;else if(e&&(f.push(-5),e=void 0),u<d&&(f.push(i.slice(u,d)),r+=d-u),0===p)f.push(65533),r++;else if(9===p)for(c=4*Math.ceil(r/4),f.push(-2);r++<c;)f.push(-1);else 10===p?(f.push(-4),r=1):(e=!0,r=1);u=d+1}return s&&(e&&f.push(-5),o&&f.push(o),f.push(null)),f}}})),v$=HB(((e,t)=>{var n=OK();t.exports=function(e){for(;!n(e););return e}})),b$=HB(((e,t)=>{t.exports=function(e,t,f){return"string"!=typeof t&&(f=t,t=void 0),function(e){var t=e||{},s=function(e,t){for(var n=-1;++n<t.length;)p(e,t[n]);return e}({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:v(pe),autolinkProtocol:L,autolinkEmail:L,atxHeading:v(le),blockQuote:v(re),characterEscape:L,characterReference:L,codeFenced:v(oe),codeFencedFenceInfo:b,codeFencedFenceMeta:b,codeIndented:v(oe,b),codeText:v(ie,b),codeTextData:L,data:L,codeFlowValue:L,definition:v(ae),definitionDestinationString:b,definitionLabelString:b,definitionTitleString:b,emphasis:v(se),hardBreakEscape:v(ce),hardBreakTrailing:v(ce),htmlFlow:v(ue,b),htmlFlowData:L,htmlText:v(ue,b),htmlTextData:L,image:v(de),label:b,link:v(pe),listItem:v(he),listItemValue:E,listOrdered:v(fe,_),listUnordered:v(fe),paragraph:v(me),reference:X,referenceString:b,resourceDestinationString:b,resourceTitleString:b,setextHeading:v(le),strong:v(ge),thematicBreak:v(be)},exit:{atxHeading:x(),atxHeadingSequence:A,autolink:x(),autolinkEmail:ne,autolinkProtocol:te,blockQuote:x(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:ee,codeFenced:x(O),codeFencedFence:C,codeFencedFenceInfo:k,codeFencedFenceMeta:T,codeFlowValue:F,codeIndented:x(I),codeText:x($),codeTextData:F,data:F,definition:x(),definitionDestinationString:j,definitionLabelString:M,definitionTitleString:D,emphasis:x(),hardBreakEscape:x(B),hardBreakTrailing:x(B),htmlFlow:x(z),htmlFlowData:F,htmlText:x(K),htmlTextData:F,image:x(H),label:Y,labelText:W,lineEnding:U,link:x(V),listItem:x(),listOrdered:x(),listUnordered:x(),paragraph:x(),referenceString:Z,resourceDestinationString:q,resourceTitleString:G,resource:J,setextHeading:x(R),setextHeadingLineSequence:P,setextHeadingText:N,strong:x(),thematicBreak:x()}},t.mdastExtensions||[]),l={};return c;function c(e){for(var t,n={type:"root",children:[]},i=[],a=[],l=-1,c={stack:[n],tokenStack:i,config:s,enter:y,exit:w,buffer:b,resume:S,setData:h,getData:m};++l<e.length;)("listOrdered"===e[l][1].type||"listUnordered"===e[l][1].type)&&("enter"===e[l][0]?a.push(l):l=f(e,a.pop(l),l));for(l=-1;++l<e.length;)t=s[e[l][0]],o.call(t,e[l][1].type)&&t[e[l][1].type].call(r({sliceSerialize:e[l][2].sliceSerialize},c),e[l][1]);if(i.length)throw new Error("Cannot close document, a token (`"+i[i.length-1].type+"`, "+d({start:i[i.length-1].start,end:i[i.length-1].end})+") is still open");for(n.position={start:g(e.length?e[0][1].start:{line:1,column:1,offset:0}),end:g(e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<s.transforms.length;)n=s.transforms[l](n)||n;return n}function f(e,t,n){for(var r,o,i,a,s,l,c,u=t-1,d=-1,p=!1;++u<=n;)if("listUnordered"===(s=e[u])[1].type||"listOrdered"===s[1].type||"blockQuote"===s[1].type?("enter"===s[0]?d++:d--,c=void 0):"lineEndingBlank"===s[1].type?"enter"===s[0]&&(r&&!c&&!d&&!l&&(l=u),c=void 0):"linePrefix"===s[1].type||"listItemValue"===s[1].type||"listItemMarker"===s[1].type||"listItemPrefix"===s[1].type||"listItemPrefixWhitespace"===s[1].type||(c=void 0),!d&&"enter"===s[0]&&"listItemPrefix"===s[1].type||-1===d&&"exit"===s[0]&&("listUnordered"===s[1].type||"listOrdered"===s[1].type)){if(r){for(o=u,i=void 0;o--;)if("lineEnding"===(a=e[o])[1].type||"lineEndingBlank"===a[1].type){if("exit"===a[0])continue;i&&(e[i][1].type="lineEndingBlank",p=!0),a[1].type="lineEnding",i=o}else if("linePrefix"!==a[1].type&&"blockQuotePrefix"!==a[1].type&&"blockQuotePrefixWhitespace"!==a[1].type&&"blockQuoteMarker"!==a[1].type&&"listItemIndent"!==a[1].type)break;l&&(!i||l<i)&&(r._spread=!0),r.end=g(i?e[i][1].start:s[1].end),e.splice(i||u,0,["exit",r,s[2]]),u++,n++}"listItemPrefix"===s[1].type&&(r={type:"listItem",_spread:!1,start:g(s[1].start)},e.splice(u,0,["enter",r,s[2]]),u++,n++,l=void 0,c=!0)}return e[t][1]._spread=p,n}function h(e,t){l[e]=t}function m(e){return l[e]}function g(e){return{line:e.line,column:e.column,offset:e.offset}}function v(e,t){return n;function n(n){y.call(this,e(n),n),t&&t.call(this,n)}}function b(){this.stack.push({type:"fragment",children:[]})}function y(e,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push(t),e.position={start:g(t.start)},e}function x(e){return t;function t(t){e&&e.call(this,t),w.call(this,t)}}function w(e){var t=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): it’s not open");if(n.type!==e.type)throw new Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+d({start:n.start,end:n.end})+") is open");return t.position.end=g(e.end),t}function S(){return n(this.stack.pop())}function _(){h("expectingFirstListItemValue",!0)}function E(e){m("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=parseInt(this.sliceSerialize(e),10),h("expectingFirstListItemValue"))}function k(){var e=this.resume();this.stack[this.stack.length-1].lang=e}function T(){var e=this.resume();this.stack[this.stack.length-1].meta=e}function C(){m("flowCodeInside")||(this.buffer(),h("flowCodeInside",!0))}function O(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h("flowCodeInside")}function I(){var e=this.resume();this.stack[this.stack.length-1].value=e}function M(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase()}function D(){var e=this.resume();this.stack[this.stack.length-1].title=e}function j(){var e=this.resume();this.stack[this.stack.length-1].url=e}function A(e){this.stack[this.stack.length-1].depth||(this.stack[this.stack.length-1].depth=this.sliceSerialize(e).length)}function N(){h("setextHeadingSlurpLineEnding",!0)}function P(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function R(){h("setextHeadingSlurpLineEnding")}function L(e){var t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||"text"!==n.type)&&((n=ve()).position={start:g(e.start)},this.stack[this.stack.length-1].children.push(n)),this.stack.push(n)}function F(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=g(e.end)}function U(e){var t=this.stack[this.stack.length-1];if(m("atHardBreak"))return t.children[t.children.length-1].position.end=g(e.end),void h("atHardBreak");!m("setextHeadingSlurpLineEnding")&&s.canContainEols.indexOf(t.type)>-1&&(L.call(this,e),F.call(this,e))}function B(){h("atHardBreak",!0)}function z(){var e=this.resume();this.stack[this.stack.length-1].value=e}function K(){var e=this.resume();this.stack[this.stack.length-1].value=e}function $(){var e=this.resume();this.stack[this.stack.length-1].value=e}function V(){var e=this.stack[this.stack.length-1];m("inReference")?(e.type+="Reference",e.referenceType=m("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),h("referenceType")}function H(){var e=this.stack[this.stack.length-1];m("inReference")?(e.type+="Reference",e.referenceType=m("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),h("referenceType")}function W(e){this.stack[this.stack.length-2].identifier=i(this.sliceSerialize(e)).toLowerCase()}function Y(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,h("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function q(){var e=this.resume();this.stack[this.stack.length-1].url=e}function G(){var e=this.resume();this.stack[this.stack.length-1].title=e}function J(){h("inReference")}function X(){h("referenceType","collapsed")}function Z(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase(),h("referenceType","full")}function Q(e){h("characterReferenceType",e.type)}function ee(e){var t,n,r=this.sliceSerialize(e),o=m("characterReferenceType");o?(t=a(r,"characterReferenceMarkerNumeric"===o?10:16),h("characterReferenceType")):t=u(r),(n=this.stack.pop()).value+=t,n.position.end=g(e.end)}function te(e){F.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function ne(e){F.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function re(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function ie(){return{type:"inlineCode",value:""}}function ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:void 0,children:[]}}function ce(){return{type:"break"}}function ue(){return{type:"html",value:""}}function de(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function fe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function he(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function me(){return{type:"paragraph",children:[]}}function ge(){return{type:"strong",children:[]}}function ve(){return{type:"text",value:""}}function be(){return{type:"thematicBreak"}}}(f)(c(s(f).document().write(l()(e,t,!0))))};var n=SK(),r=Kz(),o=Oz(),i=_K(),a=EK(),s=m$(),l=g$(),c=v$(),u=$K(),d=sz();function p(e,t){var n,r;for(n in t)r=o.call(e,n)?e[n]:e[n]={},"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,t[n]):Object.assign(r,t[n])}})),y$=HB(((e,t)=>{t.exports=b$()})),x$=HB(((e,t)=>{t.exports=function(e){var t=this;this.Parser=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var n=y$()})),w$=HB(((e,t)=>{!function(){var e;function n(e){for(var t,n,r,o,i=1,a=[].slice.call(arguments),s=0,l=e.length,c="",u=!1,d=!1,p=function(){return a[i++]},f=function(){for(var n="";/\d/.test(e[s]);)n+=e[s++],t=e[s];return n.length>0?parseInt(n):null};s<l;++s)if(t=e[s],u)switch(u=!1,"."==t?(d=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(d=!0,s+=2,t=e[s]):d=!0,o=f(),t){case"b":c+=parseInt(p(),10).toString(2);break;case"c":c+="string"==typeof(n=p())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(p(),10);break;case"f":r=String(parseFloat(p()).toFixed(o||6)),c+=d?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(p());break;case"o":c+="0"+parseInt(p(),10).toString(8);break;case"s":c+=p();break;case"x":c+="0x"+parseInt(p(),10).toString(16);break;case"X":c+="0x"+parseInt(p(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(e=typeof t<"u"?t.exports=n:function(){return this||(0,eval)("this")}()).format=n,e.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},typeof console<"u"&&"function"==typeof console.log&&(e.printf=function(){console.log(n.apply(null,arguments))})}()})),S$=HB(((e,t)=>{var n=w$(),r=o(Error);function o(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=n.apply(null,arguments)),new e(t)}}t.exports=r,r.eval=o(EvalError),r.range=o(RangeError),r.reference=o(ReferenceError),r.syntax=o(SyntaxError),r.type=o(TypeError),r.uri=o(URIError),r.create=o})),_$=HB(((e,t)=>{t.exports=function(e){var t,n=e||"yaml",r=[],o=-1;for((("string"==typeof n||!("length"in n))&&(n=[n]),t=n.length);++o<t;)r[o]=i(n[o]);return r};var n=S$(),r={}.hasOwnProperty,o={yaml:"-",toml:"+"};function i(e){var t=e;if("string"==typeof t){if(!r.call(o,t))throw n("Missing matter definition for `%s`",t);t={type:t,marker:o[t]}}else if("object"!=typeof t)throw n("Expected matter to be an object, not `%j`",t);if(!r.call(t,"type"))throw n("Missing `type` in matter `%j`",t);if(!r.call(t,"fence")&&!r.call(t,"marker"))throw n("Missing `marker` or `fence` in matter `%j`",t);return t}})),E$=HB(((e,t)=>{t.exports=function(e){for(var t,i,a=n(e),s=a.length,l=-1,c={};++l<s;)t=a[l],(i=o(t,"open").charCodeAt(0))in c?c[i].push(r(t)):c[i]=[r(t)];return{flow:c}};var n=_$();function r(e){var t,n=e.type,r=e.anywhere,i=n+"Value",a=n+"Fence",s=a+"Sequence",l={tokenize:function(e,n,r){var o=0;return function(n){return n===t.charCodeAt(o)?(e.enter(a),e.enter(s),i(n)):r(n)};function i(n){return o===t.length?(e.exit(s),-2===n||-1===n||32===n?(e.enter("whitespace"),l(n)):c(n)):n===t.charCodeAt(o)?(e.consume(n),o++,i):r(n)}function l(t){return-2===t||-1===t||32===t?(e.consume(t),l):(e.exit("whitespace"),c(t))}function c(t){return-5===t||-4===t||-3===t||null===t?(e.exit(a),n(t)):r(t)}},partial:!0};return{tokenize:function(a,s,c){var u=this;return function(i){var s=u.now();return 1!==s.column||!r&&1!==s.line?c(i):(a.enter(n),t=o(e,"open"),a.attempt(l,d,c)(i))};function d(n){return t=o(e,"close"),h(n)}function p(e){return-5===e||-4===e||-3===e||null===e?h(e):(a.enter(i),f(e))}function f(e){return-5===e||-4===e||-3===e||null===e?(a.exit(i),h(e)):(a.consume(e),f)}function h(e){return null===e?c(e):(a.enter("lineEnding"),a.consume(e),a.exit("lineEnding"),a.attempt(l,m,p))}function m(e){return a.exit(n),s(e)}},concrete:!0}}function o(e,t){var n;return e.marker?(n=i(e.marker,t))+n+n:i(e.fence,t)}function i(e,t){return"string"==typeof e?e:e[t]}})),k$=HB(((e,t)=>{t.exports=E$()})),T$=HB(((e,t)=>{t.exports=function(e){for(var t,a=n(e),s=a.length,l=-1,c={},u={};++l<s;)t=a[l],c[t.type]=r(t),u[t.type]=o,u[t.type+"Value"]=i;return{enter:c,exit:u}};var n=_$();function r(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function o(e){var t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function i(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}})),C$=HB(((e,t)=>{t.exports=function(e){for(var t,i=[],a={},s=n(e),l=s.length,c=-1;++c<l;)t=s[c],a[t.type]=r(t),i.push({atBreak:!0,character:o(t,"open").charAt(0)});return{unsafe:i,handlers:a}};var n=_$();function r(e){var t=o(e,"open"),n=o(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+n}}function o(e,t){var n;return e.marker?(n=i(e.marker,t))+n+n:i(e.fence,t)}function i(e,t){return"string"==typeof e?e:e[t]}})),O$=HB(((e,t)=>{var n=k$(),r=T$(),o=C$();t.exports=function(e){var t=this.data();function i(e,n){t[e]?t[e].push(n):t[e]=[n]}i("micromarkExtensions",n(e)),i("fromMarkdownExtensions",r(e)),i("toMarkdownExtensions",o(e))}})),I$=HB(((e,t)=>{t.exports=function(e){var t={tokenize:f,resolveAll:u},n={add:"after",tokenize:h,resolveAll:u,resolveTo:d},r={tokenize:m,continuation:{tokenize:g},exit:v},o={91:{tokenize:p}};return(e||{}).inlineNotes&&(o[93]=n,o[94]=t),{_hiddenFootnoteSupport:{},document:{91:r},text:o}};var n=_K(),r=TK(),o=Wz(),i=Mz(),a=Jz(),s=$z(),l=zz(),c={tokenize:function(e,t,n){var r=this;return o(e,(function(e){return 4===a(r.events,"footnoteDefinitionIndent")?t(e):n(e)}),"footnoteDefinitionIndent",5)},partial:!0};function u(e){for(var t,n=e.length,r=-1;++r<n;)t=e[r][1],"enter"===e[r][0]&&"inlineNoteStart"===t.type&&(t.type="data",e.splice(r+1,4),n-=4);return e}function d(e,t){for(var n,r,o,a,c,u=e.length-4;u--;)if(o=e[u][1],"enter"===e[u][0]&&"inlineNoteStart"===o.type){c=u,a="inlineNote";break}n={type:a,start:s(e[c][1].start),end:s(e[e.length-1][1].end)},r={type:"inlineNoteText",start:s(e[c+4][1].end),end:s(e[e.length-3][1].start)};var d=[["enter",n,t],e[c+1],e[c+2],e[c+3],e[c+4],["enter",r,t]];return i(d,d.length,0,l(t.parser.constructs.insideSpan.null,e.slice(c+6,-4),t)),d.push(["exit",r,t],e[e.length-2],e[e.length-3],["exit",n,t]),i(e,u,e.length-u,d),e}function p(e,t,r){var o,i=this,a=i.parser.footnotes||(i.parser.footnotes=[]),s=0;return function(t){return 91!==t?r(t):(e.enter("footnoteCall"),e.enter("footnoteCallLabelMarker"),e.consume(t),e.exit("footnoteCallLabelMarker"),l)};function l(t){return 94!==t?r(t):(e.enter("footnoteCallMarker"),e.consume(t),e.exit("footnoteCallMarker"),e.enter("footnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(l){var d;return null===l||91===l||s++>999?r(l):93===l?o?(e.exit("chunkString"),d=e.exit("footnoteCallString"),a.indexOf(n(i.sliceSerialize(d)))<0?r(l):function(n){return e.enter("footnoteCallLabelMarker"),e.consume(n),e.exit("footnoteCallLabelMarker"),e.exit("footnoteCall"),t}(l)):r(l):(e.consume(l),l<0||32===l||(o=!0),92===l?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function f(e,t,n){return function(t){return 94!==t?n(t):(e.enter("inlineNoteStart"),e.enter("inlineNoteMarker"),e.consume(t),e.exit("inlineNoteMarker"),r)};function r(r){return 91!==r?n(r):(e.enter("inlineNoteStartMarker"),e.consume(r),e.exit("inlineNoteStartMarker"),e.exit("inlineNoteStart"),t)}}function h(e,t,n){var r=this;return function(o){for(var i,a=r.events.length;a--;)if("inlineNoteStart"===r.events[a][1].type){i=!0;break}return 93===o&&i?(e.enter("inlineNoteEnd"),e.enter("inlineNoteEndMarker"),e.consume(o),e.exit("inlineNoteEndMarker"),e.exit("inlineNoteEnd"),t):n(o)}}function m(e,t,o){var i,a,s=this,l=s.parser.footnotes||(s.parser.footnotes=[]),c=0;return function(t){return 91!==t?o(t):(e.enter("footnoteDefinition")._container=!0,e.enter("footnoteDefinitionLabel"),e.enter("footnoteDefinitionLabelMarker"),e.consume(t),e.exit("footnoteDefinitionLabelMarker"),u)};function u(t){return 94!==t?o(t):(e.enter("footnoteDefinitionMarker"),e.consume(t),e.exit("footnoteDefinitionMarker"),e.enter("footnoteDefinitionLabelString"),d)}function d(t){var r;return null===t||91===t||c>999?o(t):93===t?a?(r=e.exit("footnoteDefinitionLabelString"),i=n(s.sliceSerialize(r)),e.enter("footnoteDefinitionLabelMarker"),e.consume(t),e.exit("footnoteDefinitionLabelMarker"),e.exit("footnoteDefinitionLabel"),h):o(t):-5===t||-4===t||-3===t?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c++,d):(e.enter("chunkString").contentType="string",p(t))}function p(t){return null===t||-5===t||-4===t||-3===t||91===t||93===t||c>999?(e.exit("chunkString"),d(t)):(t<0||32===t||(a=!0),c++,e.consume(t),92===t?f:p)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,p):p(t)}function h(t){return 58!==t?o(t):(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),e.check(r,m,g))}function m(e){return s.containerState.initialBlankLine=!0,v(e)}function g(t){return(-2===t||-1===t||32===t)&&(e.enter("footnoteDefinitionWhitespace"),e.consume(t),e.exit("footnoteDefinitionWhitespace")),v(t)}function v(e){return l.indexOf(i)<0&&l.push(i),t(e)}}function g(e,t,n){var o=this;return e.check(r,(function(e){return o.containerState.initialBlankLine&&(o.containerState.furtherBlankLines=!0),t(e)}),(function(r){return o.containerState.furtherBlankLines||-2!==r&&-1!==r&&32!==r?n(r):(o.containerState.initialBlankLine=void 0,o.containerState.furtherBlankLines=void 0,e.attempt(c,t,n)(r))}))}function v(e){e.exit("footnoteDefinition")}})),M$=HB((e=>{var t=_K();e.canContainEols=["footnote"],e.enter={footnoteDefinition:function(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)},footnoteDefinitionLabelString:function(){this.buffer()},footnoteCall:function(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)},footnoteCallString:function(){this.buffer()},inlineNote:function(e){this.enter({type:"footnote",children:[]},e)}},e.exit={footnoteDefinition:function(e){this.exit(e)},footnoteDefinitionLabelString:function(e){var n=this.resume();this.stack[this.stack.length-1].label=n,this.stack[this.stack.length-1].identifier=t(this.sliceSerialize(e)).toLowerCase()},footnoteCall:function(e){this.exit(e)},footnoteCallString:function(e){var n=this.resume();this.stack[this.stack.length-1].label=n,this.stack[this.stack.length-1].identifier=t(this.sliceSerialize(e)).toLowerCase()},inlineNote:function(e){this.exit(e)}}})),D$=HB(((e,t)=>{t.exports=function(e){return e.label||!e.identifier?e.label||"":e.identifier.replace(r,"$1").replace(o,i)};var n=$K(),r=/\\([!-/:-@[-`{-~])/g,o=/&(#(\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i(e,t){return n(t)||e}})),j$=HB(((e,t)=>{function n(e,t,n){var r;if(!t)return n;for("string"==typeof t&&(t=[t]),r=-1;++r<t.length;)if(-1!==e.indexOf(t[r]))return!0;return!1}t.exports=function(e,t){return n(e,t.inConstruct,!0)&&!n(e,t.notInConstruct)}})),A$=HB(((e,t)=>{t.exports=function(e,t,a){for(var s,l,c,u,d,p,f,h,m=(a.before||"")+(t||"")+(a.after||""),g=[],v=[],b={},y=-1;++y<e.unsafe.length;)if(u=e.unsafe[y],r(e.stack,u))for(d=n(u);p=d.exec(m);)s="before"in u||u.atBreak,l="after"in u,c=p.index+(s?p[1].length:0),-1===g.indexOf(c)?(g.push(c),b[c]={before:s,after:l}):(b[c].before&&!s&&(b[c].before=!1),b[c].after&&!l&&(b[c].after=!1));for(g.sort(o),f=a.before?a.before.length:0,h=m.length-(a.after?a.after.length:0),y=-1;++y<g.length;)!((c=g[y])<f||c>=h)&&(c+1<h&&g[y+1]===c+1&&b[c].after&&!b[c+1].before&&!b[c+1].after||(f!==c&&v.push(i(m.slice(f,c),"\\")),f=c,!/[!-/:-@[-`{-~]/.test(m.charAt(c))||a.encode&&-1!==a.encode.indexOf(m.charAt(c))?(v.push("&#x"+m.charCodeAt(c).toString(16).toUpperCase()+";"),f++):v.push("\\")));return v.push(i(m.slice(f,h),a.after)),v.join("")};var n=lK(),r=j$();function o(e,t){return e-t}function i(e,t){for(var n,r=/\\(?=[!-/:-@[-`{-~])/g,o=[],i=[],a=-1,s=0,l=e+t;n=r.exec(l);)o.push(n.index);for(;++a<o.length;)s!==o[a]&&i.push(e.slice(s,o[a])),i.push("\\"),s=o[a];return i.push(e.slice(s)),i.join("")}})),N$=HB((e=>{e.unsafe=[{character:"[",inConstruct:["phrasing","label","reference"]}],e.handlers={footnote:s,footnoteDefinition:function(e,n,a){var s,l=a.enter("footnoteDefinition"),c=a.enter("label"),u="[^"+i(a,t(e),{before:"^",after:"]"})+"]:";return c(),s=o(r(e,a),(function(e,t,n){return t?(n?"":" ")+e:(n?u:u+" ")+e})),l(),s},footnoteReference:a};var t=D$(),n=aK(),r=mK(),o=gK(),i=A$();function a(e,n,r){var o=r.enter("footnoteReference"),a=r.enter("reference"),s=i(r,t(e),{before:"^",after:"]"});return a(),o(),"[^"+s+"]"}function s(e,t,r){var o=r.enter("footnote"),i=r.enter("label"),a="^["+n(e,r,{before:"[",after:"]"})+"]";return i(),o(),a}a.peek=function(){return"["},s.peek=function(){return"^"}})),P$=HB(((e,t)=>{var n,r=I$(),o=M$(),i=N$();t.exports=function(e){var t=this.data();function a(e,n){t[e]?t[e].push(n):t[e]=[n]}!n&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(n=!0,console.warn("[remark-footnotes] Warning: please upgrade to remark 13 to use this plugin")),a("micromarkExtensions",r(e)),a("fromMarkdownExtensions",o),a("toMarkdownExtensions",i)}})),R$=HB((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseMarkdown=void 0;var n=t(mz());t(Cz()).default.transforms=[];var r=t(wK()),o=t(x$()),i=t(O$()),a=t(P$()),s=n.default().use(o.default).use(i.default,["yaml"]).use(r.default).use(a.default,{inlineNotes:!0});e.parseMarkdown=e=>s.parse(e)})),L$=HB((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parse=e.Syntax=void 0;var n=JB(),r=GB();Object.defineProperty(e,"Syntax",{enumerable:!0,get:function(){return r.ASTNodeTypes}});var o=t(XB()),i=t(ez()),a=R$(),s=i.default("@textlint/markdown-to-ast");e.parse=function(e){let t=65279===e.charCodeAt(0)?e.slice(1):e,r=a.parseMarkdown(t);return o.default(r).forEach((function(e){if(this.notLeaf){if(e.type){let t=n.SyntaxMap[e.type];t?e.type=t:s(`replacedType : ${t} , node.type: ${e.type}`)}if(e.position){let n=e.position,r={start:{line:n.start.line,column:Math.max(n.start.column-1,0)},end:{line:n.end.line,column:Math.max(n.end.column-1,0)}},o=[n.start.offset,n.end.offset];e.loc=r,e.range=o,e.raw=t.slice(o[0],o[1]),Object.defineProperty(e,"position",{enumerable:!1,configurable:!1,writable:!1,value:n})}}})),r}})),F$=HB(((e,t)=>{var n=L$().parse,r={Strong:{type:"BOLD",symbol:"__"},Emphasis:{type:"ITALIC",symbol:"*"}},o={List:"unordered-list-item",Header1:"header-one",Header2:"header-two",Header3:"header-three",Header4:"header-four",Header5:"header-five",Header6:"header-six",CodeBlock:"code-block",BlockQuote:"blockquote"},i=e=>{let t=e.indexOf("```"),n=e.indexOf("```",t+1);if(t>=0&&n>=0){let r=e.slice(t,n+1).join("\n"),o=[...e.slice(0,t),r,...e.slice(n+1)];return i(o)}return e},a=(e,t,i={})=>{let a=VB(VB({},r),i.inlineStyles),s=VB(VB({},o),i.blockStyles),l=n(e),c="",u=[],d=[],p=t,f=(e,t,n)=>{u.push({offset:e,length:t,style:n})},h=e=>e.reduce(((e,t)=>t.value?e+t.value.length:t.children&&t.children.length?e+h(t.children):e),0),m=(e,t)=>{let n=/^\[\[\s(?:embed)\s(?:url=(\S+))\s\]\]/;switch(e.type){case"Link":(e=>{let t=Object.keys(p).length;p[t]={type:"LINK",mutability:"MUTABLE",data:{url:e.url}},d.push({key:t,length:h(e.children),offset:c.length})})(e);break;case"Image":(e=>{let t=Object.keys(p).length;p[t]={type:"IMAGE",mutability:"IMMUTABLE",data:{url:e.url,src:e.url,fileName:e.alt||""}},d.push({key:t,length:1,offset:c.length})})(e);break;case"Paragraph":n.test(e.raw)&&(e=>{let t=e.raw.match(/^\[\[\s(?:embed)\s(?:url=(\S+))\s\]\]/)[1],n=Object.keys(p).length;p[n]={type:"draft-js-video-plugin-video",mutability:"IMMUTABLE",data:{src:t}},d.push({key:n,length:1,offset:c.length})})(e)}if(!n.test(e.raw)&&e.children&&t){let n=h(e.children);f(c.length,n,t.type);let r=a[e.type];e.children.forEach((e=>{m(e,r)}))}else if(!n.test(e.raw)&&e.children){let t=a[e.type];e.children.forEach((e=>{m(e,t)}))}else t&&f(c.length,e.value.length,t.type),a[e.type]&&f(c.length,e.value.length,a[e.type].type),c=`${c}${"Image"===e.type||n.test(e.raw)?" ":e.value}`};l.children.forEach((e=>{let t=a[e.type];m(e,t)}));let g="unstyled";if(l.children[0]){let e=((e,t)=>{let n=e.type,r=e.ordered,o=e.depth;return"List"===n&&r?"ordered-list-item":"Header"===n?t[`${n}${o}`]:"Paragraph"===e.type&&e.children&&e.children[0]&&"Image"===e.children[0].type||"Paragraph"===e.type&&e.raw&&e.raw.match(/^\[\[\s\S+\s.*\S+\s\]\]/)?"atomic":t[n]})(l.children[0],s);e&&(g=e)}return{text:c,inlineStyleRanges:u,entityRanges:d,blockStyle:g,entityMap:p}};t.exports=function(e,t){let n=(e=>{let t=e.split("\n");return i(t)})(e),r=[],o={};return n.forEach((e=>{let n=a(e,o,t);r.push({text:n.text,type:n.blockStyle,depth:0,inlineStyleRanges:n.inlineStyleRanges,entityRanges:n.entityRanges}),o=n.entityMap})),0===Object.keys(o).length&&(o={data:"",mutability:"",type:""}),{blocks:r,entityMap:o}}})),U$=YB(qB()),B$=YB(F$());U$.default,B$.default;const z$={"toggle-wrapper":"toggle-wrapper-35cb3798",toggle:"toggle-b7a0206b","toggle--disabled":"toggle--disabled-086a40c0","toggle--active":"toggle--active-f8d436cc","toggle--ghost":"toggle--ghost-b8136f68",toggle__dot:"toggle__dot-6c85a2a2",toggle__icon:"toggle__icon-4a0f4e6c",toggle__spinner:"toggle__spinner-d4f2ba79","toggle--medium":"toggle--medium-ce9bfb2e","toggle--large":"toggle--large-acae3dd1","toggle--alternative":"toggle--alternative-07ba3fde",toggle__label:"toggle__label-cdb29c78","toggle__extra-content":"toggle__extra-content-4f8dda6c"},K$=(0,B.forwardRef)(((e,t)=>{const{ariaLabel:n,className:r,checked:o,defaultChecked:i,onChange:a,size:s=(e.icon?"large":"medium"),color:l="default",type:c,icon:u,disabled:d=!1,isLoading:p=!1,extraContent:f,label:h,...m}=e,[g,v]=B.useState(i||!1),b=B.useMemo((()=>a&&typeof o<"u"?o:g),[a,g,o]),y=ua(z$.toggle,z$[`toggle--${s}`],z$[`toggle--${l}`],{[z$["toggle--active"]]:b,[z$["toggle--disabled"]]:d,[z$[`toggle--${c}`]]:c},r),x=()=>{if(p)return;const e=!b;typeof o>"u"&&v(e),null==a||a(e)},w={noStyle:!0,type:"button","aria-label":n,"aria-pressed":b,disabled:d,"aria-disabled":p,...m,onClick:x};return(0,cn.jsxs)("div",{className:z$["toggle-wrapper"],children:[(0,cn.jsx)(Gf,{...w,onClick:e=>{var t;null==(t=null==m?void 0:m.onClick)||t.call(m,e),x()},ref:t,"data-name":"toggle",className:y,children:(0,cn.jsx)("span",{className:z$.toggle__dot,children:p?(0,cn.jsx)(DY,{size:"large"===s?16:10,className:ua(z$.toggle__icon,z$.toggle__spinner)}):u?(0,cn.jsx)(Vf,{className:z$.toggle__icon,name:b?"lock_open_right":"lock",size:16}):null})}),h&&(0,cn.jsx)(Gf,{...w,className:z$.toggle__label,"aria-hidden":!0,tabIndex:-1,children:h}),f&&(0,cn.jsx)("div",{className:z$["toggle__extra-content"],children:f})]})}));K$.displayName="Toggle";const $$=(e,t,n)=>{var r,o;const i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return!(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())||!o.includes(i))};$$.autoRemove=e=>Z$(e);const V$=(e,t,n)=>{var r;return!(null==(r=e.getValue(t))||null==(r=r.toString())||!r.includes(n))};V$.autoRemove=e=>Z$(e);const H$=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};H$.autoRemove=e=>Z$(e);const W$=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};W$.autoRemove=e=>Z$(e);const Y$=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));Y$.autoRemove=e=>Z$(e)||!(null!=e&&e.length);const q$=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));q$.autoRemove=e=>Z$(e)||!(null!=e&&e.length);const G$=(e,t,n)=>e.getValue(t)===n;G$.autoRemove=e=>Z$(e);const J$=(e,t,n)=>e.getValue(t)==n;J$.autoRemove=e=>Z$(e);const X$=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};X$.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(o)?1/0:o;if(i>a){const e=i;i=a,a=e}return[i,a]},X$.autoRemove=e=>Z$(e)||Z$(e[0])&&Z$(e[1]);function Z$(e){return null==e||""===e}Number.MAX_SAFE_INTEGER;B.createContext({isLoading:!1,isError:!1,table:null,id:"",hideRowBorder:!1});var Q$=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===eV}(e)}(e)};var eV="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function tV(e,t){return!1!==t.clone&&t.isMergeableObject(e)?rV(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function nV(e,t,n){return e.concat(t).map((function(e){return tV(e,n)}))}function rV(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||nV,n.isMergeableObject=n.isMergeableObject||Q$;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=tV(e[t],n)})),Object.keys(t).forEach((function(o){n.isMergeableObject(t[o])&&e[o]?r[o]=rV(e[o],t[o],n):r[o]=tV(t[o],n)})),r}(e,t,n):tV(t,n)}rV.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return rV(e,n,t)}),{})};function oV(e,t){return function(n){return e(t(n))}}oV(Object.getPrototypeOf,Object);var iV=Function.prototype,aV=Object.prototype,sV=iV.toString;aV.hasOwnProperty,sV.call(Object);function lV(e,t){return e===t||e!=e&&t!=t}function cV(e,t){for(var n=e.length;n--;)if(lV(e[n][0],t))return n;return-1}var uV=Array.prototype.splice;function dV(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}dV.prototype.clear=function(){this.__data__=[],this.size=0},dV.prototype.delete=function(e){var t=this.__data__,n=cV(t,e);return!(n<0)&&(n==t.length-1?t.pop():uV.call(t,n,1),--this.size,!0)},dV.prototype.get=function(e){var t=this.__data__,n=cV(t,e);return n<0?void 0:t[n][1]},dV.prototype.has=function(e){return cV(this.__data__,e)>-1},dV.prototype.set=function(e,t){var n=this.__data__,r=cV(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function pV(e){if(!va(e))return!1;var t=ja(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var fV=xa["__core-js_shared__"],hV=function(){var e=/[^.]+$/.exec(fV&&fV.keys&&fV.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var mV=Function.prototype.toString;function gV(e){if(null!=e){try{return mV.call(e)}catch{}try{return e+""}catch{}}return""}var vV=/^\[object .+?Constructor\]$/,bV=Function.prototype,yV=Object.prototype,xV=bV.toString,wV=yV.hasOwnProperty,SV=RegExp("^"+xV.call(wV).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _V(e){return!(!va(e)||function(e){return!!hV&&hV in e}(e))&&(pV(e)?SV:vV).test(gV(e))}function EV(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return _V(n)?n:void 0}var kV=EV(xa,"Map"),TV=EV(Object,"create");var CV=Object.prototype.hasOwnProperty;var OV=Object.prototype.hasOwnProperty;function IV(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function MV(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function DV(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}IV.prototype.clear=function(){this.__data__=TV?TV(null):{},this.size=0},IV.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},IV.prototype.get=function(e){var t=this.__data__;if(TV){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return CV.call(t,e)?t[e]:void 0},IV.prototype.has=function(e){var t=this.__data__;return TV?void 0!==t[e]:OV.call(t,e)},IV.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=TV&&void 0===t?"__lodash_hash_undefined__":t,this},DV.prototype.clear=function(){this.size=0,this.__data__={hash:new IV,map:new(kV||dV),string:new IV}},DV.prototype.delete=function(e){var t=MV(this,e).delete(e);return this.size-=t?1:0,t},DV.prototype.get=function(e){return MV(this,e).get(e)},DV.prototype.has=function(e){return MV(this,e).has(e)},DV.prototype.set=function(e,t){var n=MV(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function jV(e){var t=this.__data__=new dV(e);this.size=t.size}jV.prototype.clear=function(){this.__data__=new dV,this.size=0},jV.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},jV.prototype.get=function(e){return this.__data__.get(e)},jV.prototype.has=function(e){return this.__data__.has(e)},jV.prototype.set=function(e,t){var n=this.__data__;if(n instanceof dV){var r=n.__data__;if(!kV||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new DV(r)}return n.set(e,t),this.size=n.size,this};!function(){try{var e=EV(Object,"defineProperty");return e({},"",{}),e}catch{}}();Object.prototype.hasOwnProperty;function AV(e){return Aa(e)&&"[object Arguments]"==ja(e)}var NV=Object.prototype,PV=NV.hasOwnProperty,RV=NV.propertyIsEnumerable;AV(function(){return arguments}()),Array.isArray;var LV="object"==typeof exports&&exports&&!exports.nodeType&&exports,FV=LV&&"object"==typeof module&&module&&!module.nodeType&&module,UV=FV&&FV.exports===LV?xa.Buffer:void 0;UV&&UV.isBuffer;function BV(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var zV={};function KV(e){return function(t){return e(t)}}zV["[object Float32Array]"]=zV["[object Float64Array]"]=zV["[object Int8Array]"]=zV["[object Int16Array]"]=zV["[object Int32Array]"]=zV["[object Uint8Array]"]=zV["[object Uint8ClampedArray]"]=zV["[object Uint16Array]"]=zV["[object Uint32Array]"]=!0,zV["[object Arguments]"]=zV["[object Array]"]=zV["[object ArrayBuffer]"]=zV["[object Boolean]"]=zV["[object DataView]"]=zV["[object Date]"]=zV["[object Error]"]=zV["[object Function]"]=zV["[object Map]"]=zV["[object Number]"]=zV["[object Object]"]=zV["[object RegExp]"]=zV["[object Set]"]=zV["[object String]"]=zV["[object WeakMap]"]=!1;var $V="object"==typeof exports&&exports&&!exports.nodeType&&exports,VV=$V&&"object"==typeof module&&module&&!module.nodeType&&module,HV=VV&&VV.exports===$V&&ba.process,WV=function(){try{return VV&&VV.require&&VV.require("util").types||HV&&HV.binding&&HV.binding("util")}catch{}}(),YV=WV&&WV.isTypedArray;YV&&KV(YV),Object.prototype.hasOwnProperty;Object.prototype;oV(Object.keys,Object),Object.prototype.hasOwnProperty;Object.prototype.hasOwnProperty;var qV="object"==typeof exports&&exports&&!exports.nodeType&&exports,GV=qV&&"object"==typeof module&&module&&!module.nodeType&&module,JV=GV&&GV.exports===qV?xa.Buffer:void 0;JV&&JV.allocUnsafe;Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols;Object.getOwnPropertySymbols;var XV=EV(xa,"DataView"),ZV=EV(xa,"Promise"),QV=EV(xa,"Set"),eH=EV(xa,"WeakMap"),tH="[object Map]",nH="[object Promise]",rH="[object Set]",oH="[object WeakMap]",iH="[object DataView]",aH=gV(XV),sH=gV(kV),lH=gV(ZV),cH=gV(QV),uH=gV(eH),dH=ja;(XV&&dH(new XV(new ArrayBuffer(1)))!=iH||kV&&dH(new kV)!=tH||ZV&&dH(ZV.resolve())!=nH||QV&&dH(new QV)!=rH||eH&&dH(new eH)!=oH)&&(dH=function(e){var t=ja(e),n="[object Object]"==t?e.constructor:void 0,r=n?gV(n):"";if(r)switch(r){case aH:return iH;case sH:return tH;case lH:return nH;case cH:return rH;case uH:return oH}return t});Object.prototype.hasOwnProperty;xa.Uint8Array;var pH=ka?ka.prototype:void 0;pH&&pH.valueOf;Object.create;var fH=WV&&WV.isMap;fH&&KV(fH);var hH=WV&&WV.isSet,mH=(hH&&KV(hH),"[object Arguments]"),gH="[object Function]",vH="[object Object]",bH={};bH[mH]=bH["[object Array]"]=bH["[object ArrayBuffer]"]=bH["[object DataView]"]=bH["[object Boolean]"]=bH["[object Date]"]=bH["[object Float32Array]"]=bH["[object Float64Array]"]=bH["[object Int8Array]"]=bH["[object Int16Array]"]=bH["[object Int32Array]"]=bH["[object Map]"]=bH["[object Number]"]=bH[vH]=bH["[object RegExp]"]=bH["[object Set]"]=bH["[object String]"]=bH["[object Symbol]"]=bH["[object Uint8Array]"]=bH["[object Uint8ClampedArray]"]=bH["[object Uint16Array]"]=bH["[object Uint32Array]"]=!0,bH["[object Error]"]=bH[gH]=bH["[object WeakMap]"]=!1;Array.isArray,Object.keys,Object.prototype.hasOwnProperty;function yH(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(yH.Cache||DV),n}yH.Cache=DV;var xH=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wH=/\\(\\)?/g;!function(e){var t=yH(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(xH,(function(e,n,r,o){t.push(r?o.replace(wH,"$1"):n||e)})),t}));var SH=ka?ka.prototype:void 0;SH&&SH.toString;function _H(){return _H=Object.assign||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},_H.apply(this,arguments)}function EH(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}var kH=(0,B.createContext)(void 0);kH.displayName="FormikContext",kH.Provider,kH.Consumer;typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?B.useLayoutEffect:B.useEffect;var TH=(0,B.forwardRef)((function(e,t){var n=e.action,r=EH(e,["action"]),o=n??"#",i=function(){var e=(0,B.useContext)(kH);return e}(),a=i.handleReset,s=i.handleSubmit;return(0,B.createElement)("form",_H({onSubmit:s,ref:t,onReset:a,action:o},r))}));function CH(e){this._maxSize=e,this.clear()}TH.displayName="Form",CH.prototype.clear=function(){this._size=0,this._values=Object.create(null)},CH.prototype.get=function(e){return this._values[e]},CH.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var OH=/[^.^\]^[]+|(?=\[\]|\.\.)/g,IH=/^\d+$/,MH=/^\d/,DH=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,jH=/^\s*(['"]?)(.*?)(\1)\s*$/,AH=new CH(512),NH=new CH(512),PH=new CH(512),RH={Cache:CH,split:FH,normalizePath:LH,setter:function(e){var t=LH(e);return NH.get(e)||NH.set(e,(function(e,n){for(var r=0,o=t.length,i=e;r<o-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;i=i[t[r++]]}i[t[r]]=n}))},getter:function(e,t){var n=LH(e);return PH.get(e)||PH.set(e,(function(e){for(var r=0,o=n.length;r<o;){if(null==e&&t)return;e=e[n[r++]]}return e}))},join:function(e){return e.reduce((function(e,t){return e+(UH(t)||IH.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){!function(e,t,n){var r,o,i,a,s=e.length;for(o=0;o<s;o++)(r=e[o])&&(BH(r)&&(r='"'+r+'"'),a=UH(r),i=!a&&/^\d+$/.test(r),t.call(n,r,a,i,o,e))}(Array.isArray(e)?e:FH(e),t,n)}};function LH(e){return AH.get(e)||AH.set(e,FH(e).map((function(e){return e.replace(jH,"$2")})))}function FH(e){return e.match(OH)||[""]}function UH(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function BH(e){return!UH(e)&&(function(e){return e.match(MH)&&!e.match(IH)}(e)||function(e){return DH.test(e)}(e))}const zH=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,KH=e=>e.match(zH)||[],$H=(e,t)=>KH(e).join(t).toLowerCase(),VH=e=>KH(e).reduce(((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`),"");var HH=VH,WH=e=>$H(e,"_"),YH={exports:{}};function qH(e,t){var n=e.length,r=new Array(n),o={},i=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));i--;)o[i]||l(e[i],i,new Set);return r;function l(e,t,i){if(i.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch{c=""}throw new Error("Cyclic dependency"+c)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!o[t]){o[t]=!0;var u=a.get(e)||new Set;if(t=(u=Array.from(u)).length){i.add(e);do{var d=u[--t];l(d,s.get(d),i)}while(t);i.delete(e)}r[--n]=e}}}YH.exports=function(e){return qH(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}(e),e)},YH.exports.array=qH;const GH=fa(YH.exports),JH=Object.prototype.toString,XH=Error.prototype.toString,ZH=RegExp.prototype.toString,QH=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",eW=/^Symbol\((.*)\)(.*)$/;function tW(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return QH.call(e).replace(eW,"Symbol($1)");const r=JH.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+XH.call(e)+"]":"RegExp"===r?ZH.call(e):null}function nW(e,t){let n=tW(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=tW(this[e],t);return null!==r?r:n}),2)}function rW(e){return null==e?[]:[].concat(e)}let oW,iW,aW,sW=/\$\{\s*(\w+)\s*\}/g;oW=Symbol.toStringTag;class lW{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[oW]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],rW(e).forEach((e=>{if(cW.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}iW=Symbol.hasInstance,aW=Symbol.toStringTag;class cW extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(sW,((e,n)=>nW(t[n]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,o){const i=new lW(e,t,n,r);if(o)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[aW]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,cW)}static[iW](e){return lW[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let uW={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=null!=r&&r!==n?` (cast from the value \`${nW(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${nW(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${nW(n,!0)}\``+o}},dW={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},pW={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},fW={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},hW={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${nW(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${nW(n,!0)}\``}return cW.formatError(uW.notType,e)}};Object.assign(Object.create(null),{mixed:uW,string:dW,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:pW,object:fW,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"},tuple:hW});const mW=e=>e&&e.__isYupSchema__;class gW{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:o}=t,i="function"==typeof n?n:(...e)=>e.every((e=>e===n));return new gW(e,((e,t)=>{var n;let a=i(...e)?r:o;return null!=(n=null==a?void 0:a(t))?n:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!mW(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const vW="$",bW=".";class yW{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===vW,this.isValue=this.key[0]===bW,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?vW:this.isValue?bW:"";this.path=this.key.slice(n.length),this.getter=this.path&&RH.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}yW.prototype.__isYupRef=!0;const xW=e=>null==e;function wW(e){function t({value:t,path:n="",options:r,originalValue:o,schema:i},a,s){const{name:l,test:c,params:u,message:d,skipAbsent:p}=e;let{parent:f,context:h,abortEarly:m=i.spec.abortEarly,disableStackTrace:g=i.spec.disableStackTrace}=r;function v(e){return yW.isRef(e)?e.getValue(t,f,h):e}function b(e={}){const r=Object.assign({value:t,originalValue:o,label:i.spec.label,path:e.path||n,spec:i.spec,disableStackTrace:e.disableStackTrace||g},u,e.params);for(const e of Object.keys(r))r[e]=v(r[e]);const a=new cW(cW.formatError(e.message||d,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const y=m?a:s;let x={path:n,parent:f,type:l,from:r.from,createError:b,resolve:v,options:r,originalValue:o,schema:i};const w=e=>{cW.isError(e)?y(e):e?s(null):y(b())},S=e=>{cW.isError(e)?y(e):a(e)};if(p&&xW(t))return w(!0);let _;try{var E;if(_=c.call(x,t,x),"function"==typeof(null==(E=_)?void 0:E.then)){if(r.sync)throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(_).then(w,S)}}catch(e){return void S(e)}w(_)}return t.OPTIONS=e,t}function SW(e,t,n,r=n){let o,i,a;return t?(RH.forEach(t,((s,l,c)=>{let u=l?s.slice(1,s.length-1):s,d="tuple"===(e=e.resolve({context:r,parent:o,value:n})).type,p=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&p>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[p],e=d?e.spec.types[p]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s})),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class _W extends Set{describe(){const e=[];for(const t of this.values())e.push(yW.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new _W(this.values())}merge(e,t){const n=this.clone();return e.forEach((e=>n.add(e))),t.forEach((e=>n.delete(e))),n}}function EW(e,t=new Map){if(mW(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=EW(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,EW(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(EW(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=EW(o,t)}return n}class kW{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new _W,this._blacklist=new _W,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(uW.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=EW(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!!(this.spec.nullable&&null===e||this.spec.optional&&void 0===e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce(((t,n)=>n.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,o;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(o=e.disableStackTrace)?o:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,o=n._cast(e,t);if(!1!==t.assert&&!n.isType(o)){if(r&&xW(o))return o;let i=nW(e),a=nW(o);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return o}_cast(e,t){let n=void 0===e?e:this.transforms.reduce(((t,n)=>n.call(this,t,e,this)),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:o,originalValue:i=e,strict:a=this.spec.strict}=t,s=e;a||(s=this._cast(s,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:o,value:s,originalValue:i,options:t,tests:l},n,(e=>{if(e.length)return r(e,s);this.runTests({path:o,value:s,originalValue:i,options:t,tests:this.tests},n,r)}))}runTests(e,t,n){let r=!1,{tests:o,value:i,originalValue:a,path:s,options:l}=e,c=e=>{r||(r=!0,t(e,i))},u=e=>{r||(r=!0,n(e,i))},d=o.length,p=[];if(!d)return u([]);let f={value:i,originalValue:a,path:s,options:l,schema:this};for(let e=0;e<o.length;e++){(0,o[e])(f,c,(function(e){e&&(Array.isArray(e)?p.push(...e):p.push(e)),--d<=0&&u(p)}))}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:o,options:i}){const a=e??t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const s="number"==typeof a;let l=n[a];const c=Object.assign({},i,{strict:!0,parent:n,value:l,originalValue:o[a],key:void 0,[s?"index":"key"]:a,path:s||a.includes(".")?`${r||""}[${s?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(c)._validate(l,c,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),o=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise(((n,i)=>r._validate(e,t,((e,t)=>{cW.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new cW(e,t,void 0,void 0,o)):n(t)}))))}validateSync(e,t){var n;let r,o=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:o.spec.disableStackTrace;return o._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw cW.isError(e)&&(e.value=t),e}),((t,n)=>{if(t.length)throw new cW(t,e,void 0,void 0,i);r=n})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(cW.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(cW.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):EW(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=wW({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=wW({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=uW.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=uW.notNull){return this.nullability(!1,e)}required(e=uW.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=uW.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=wW(t),o=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter((e=>!(e.OPTIONS.name===t.name&&(o||e.OPTIONS.test===r.OPTIONS.test)))),n.tests.push(r),n}when(e,t){!Array.isArray(e)&&"string"!=typeof e&&(t=e,e=".");let n=this.clone(),r=rW(e).map((e=>new yW(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push("function"==typeof t?new gW(r,t):gW.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=wW({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=uW.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n.internalTests.whiteList=wW({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=uW.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n.internalTests.blacklist=wW({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:o,nullable:i}=t.spec;return{meta:r,label:n,optional:o,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t))}}}kW.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])kW.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=SW(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])kW.prototype[e]=kW.prototype.oneOf;for(const e of["not","nope"])kW.prototype[e]=kW.prototype.notOneOf;const TW=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function CW(e){var t,n;const r=TW.exec(e);return r?{year:OW(r[1]),month:OW(r[2],1)-1,day:OW(r[3],1),hour:OW(r[4]),minute:OW(r[5]),second:OW(r[6]),millisecond:r[7]?OW(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:OW(r[10]),minuteOffset:OW(r[11])}:null}function OW(e,t=0){return Number(e)||t}let IW=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,MW=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,DW=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,jW=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),AW=e=>xW(e)||e===e.trim(),NW={}.toString();function PW(){return new RW}class RW extends kW{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,n)=>{if(!n.spec.coerce||n.isType(e)||Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===NW?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||uW.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=dW.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=dW.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=dW.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,o=!1;return t&&("object"==typeof t?({excludeEmptyString:o=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||dW.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&o||-1!==t.search(e)})}email(e=dW.email){return this.matches(IW,{name:"email",message:e,excludeEmptyString:!0})}url(e=dW.url){return this.matches(MW,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=dW.uuid){return this.matches(DW,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(jW,{name:"datetime",message:r||dW.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||dW.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=CW(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||dW.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=CW(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=dW.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:AW})}lowercase(e=dW.lowercase){return this.transform((e=>xW(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>xW(e)||e===e.toLowerCase()})}uppercase(e=dW.uppercase){return this.transform((e=>xW(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>xW(e)||e===e.toUpperCase()})}}PW.prototype=RW.prototype;let LW=new Date("");class FW extends kW{constructor(){super({type:"date",check:e=>(e=>"[object Date]"===Object.prototype.toString.call(e))(e)&&!isNaN(e.getTime())}),this.withMutation((()=>{this.transform(((e,t,n)=>!n.spec.coerce||n.isType(e)||null===e?e:(e=function(e){const t=CW(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?FW.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let n;if(yW.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=pW.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=pW.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function UW(e,t){let n=1/0;return e.some(((e,r)=>{var o;if(null!=(o=t.path)&&o.includes(e))return n=r,!0})),n}function BW(e){return(t,n)=>UW(e,t)-UW(e,n)}FW.INVALID_DATE=LW;const zW=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function KW(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=KW(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=KW(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(KW)}):"optional"in e?e.optional():e}let $W=e=>"[object Object]"===Object.prototype.toString.call(e);function VW(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===n.indexOf(e)))}const HW=BW([]);function WW(e){return new YW(e)}class YW extends kW{constructor(e){super({type:"object",check:e=>$W(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=HW,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let o=this.fields,i=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),s={},l=Object.assign({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const e of a){let n=o[e],a=e in r;if(n){let o,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:i,context:t.context,parent:s});let a=n instanceof kW?n.spec:void 0,u=null==a?void 0:a.strict;if(null!=a&&a.strip){c=c||e in r;continue}o=t.__validating&&u?r[e]:n.cast(r[e],l),void 0!==o&&(s[e]=o)}else a&&!i&&(s[e]=r[e]);(a!==e in s||s[e]!==r[e])&&(c=!0)}return c?s:r}_validate(e,t={},n,r){let{from:o=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...o],t.__validating=!0,t.originalValue=i,super._validate(e,t,n,((e,o)=>{if(!a||!$W(o))return void r(e,o);i=i||o;let s=[];for(let e of this._nodes){let n=this.fields[e];!n||yW.isRef(n)||s.push(n.asNestedTest({options:t,key:e,parent:o,parentPath:t.path,originalParent:i}))}this.runTests({tests:s,value:o,originalValue:i,options:t},n,(t=>{r(t.sort(this._sortErrors).concat(e),o)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((n=>{var r;const o=this.fields[n];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[n]})),t[n]=o&&"getDefault"in o?o.getDefault(i):void 0})),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,o=new Set(t.map((([e,t])=>`${e}-${t}`)));function i(e,t){let i=RH.split(e)[0];r.add(i),o.has(`${t}-${i}`)||n.push([t,i])}for(const t of Object.keys(e)){let n=e[t];r.add(t),yW.isRef(n)&&n.isSibling?i(n.path,t):mW(n)&&"deps"in n&&n.deps.forEach((e=>i(e,t)))}return GH.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=BW(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation((n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)}))}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return KW(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter((([t,n])=>e.includes(t)&&e.includes(n))))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=RH.getter(e,!0);return this.transform((o=>{if(!o)return o;let i=o;return((e,t)=>{const n=[...RH.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),o=RH.getter(RH.join(n),!0)(e);return!(!o||!(r in o))})(o,e)&&(i=Object.assign({},o),n||delete i[e],i[t]=r(o)),i}))}json(){return this.transform(zW)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||fW.exact,test(e){if(null==e)return!0;const t=VW(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=fW.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=VW(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=fW.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n}))}camelCase(){return this.transformKeys(HH)}snakeCase(){return this.transformKeys(WH)}constantCase(){return this.transformKeys((e=>WH(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[o,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[o]})),n.fields[o]=i.describe(t)}return n}}WW.prototype=YW.prototype;B.createContext({column:null,rows:null,values:null,open:!1,setOpen:null});B.createContext({openItems:void 0,showIcons:void 0}),B.createContext({currentTab:"",setCurrentTab:()=>null}),B.createContext({onItemOpen:()=>null}),B.createContext({index:0,title:null});const qW={"accordion__item-wrapping-heading":"accordion__item-wrapping-heading-45345260","accordion__item-header":"accordion__item-header-26962561","accordion__item--open":"accordion__item--open-52bf4ec2",accordion__item:"accordion__item-c7a360bc","accordion__item--disabled":"accordion__item--disabled-ca60e759","accordion__item-content":"accordion__item-content-4c915498"},GW=B.createContext({isOpen:()=>!0,onToggle:()=>null}),JW=e=>{const{children:t,className:n,openItem:r,gutter:o=.5,onToggleItem:i,defaultOpenItem:a=[],...s}=e,l=r||a,[c,u]=B.useState(l);return(0,cn.jsx)(GW.Provider,{value:{isOpen:e=>(i&&typeof r<"u"?r:c).includes(e),onToggle:t=>{if(i)return i(t);((t=e.openItem)=>!!i&&typeof t<"u")(r)||u((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]))}},children:(0,cn.jsx)("div",{"data-name":"accordion",...s,className:ua(qW.accordion,n),children:(0,cn.jsx)(BY,{size:o,children:t})})})},XW=B.createContext({id:"",disabled:!1}),ZW=e=>{const{children:t,className:n,id:r,disabled:o=!1,borderType:i,selected:a=!1,border:s="border-default",...l}=e,{onToggle:c,isOpen:u}=B.useContext(GW),d=ua(qW.accordion__item,n,{[qW["accordion__item--disabled"]]:o,[qW["accordion__item--open"]]:u(r)}),p=a||"primary"===i?"primary-main":s;return(0,cn.jsx)(XW.Provider,{value:{id:r,disabled:o},children:(0,cn.jsx)(Nq,{id:r,onMatch:e=>{o||c(e)},children:(0,cn.jsx)(uh,{"data-name":"accordion-item",border:p,className:d,...l,children:t})})})},QW=e=>{const{children:t,className:n,...r}=e,{isOpen:o}=B.useContext(GW),{id:i,disabled:a}=B.useContext(XW),s=uY(),l=ua(qW["accordion__item-content"],n),c=(0,cn.jsx)(ph,{"data-name":"accordion-item-content",...r,className:l,children:t});return s&&!a?c:(0,cn.jsx)(th,{duration:300,height:o(i)?"auto":0,role:"region","aria-labelledby":i,id:`${i}-content`,children:c})},eY="toggle--open-31d6b84d",tY="toggle--close-8f1101e9",nY=({openText:e,closeText:t,isOpen:n,iconRight:r,...o})=>{const i=ua({[eY]:n},{[tY]:!n},null==r?void 0:r.className);return(0,cn.jsx)(Gf,{"data-name":"button",iconRight:{...r,className:i,name:"expand_more"},...o,children:n?t:e})},rY=e=>{var t;const{children:n,className:r,background:o="white",openText:i,closeText:a,...s}=e,[l,c]=B.useState(!1),{onToggle:u,isOpen:d}=B.useContext(GW),{id:p,disabled:f}=B.useContext(XW),h=()=>{f||u(p)},m=e=>{("Enter"===e.code||"Space"===e.code)&&!e.repeat&&(e.preventDefault(),h())},g=e=>{f||c(e)},v=ua(qW["accordion__item-header"],r),b=1===(null==(t=B.Children.toArray(n))?void 0:t.length)?B.Children.toArray(n).find((e=>B.isValidElement(e)&&(e.type===es||e.type===Qa&&["h1","h2","h3","h4","h5","h6"].includes(e.props.element)))):void 0,y=B.useMemo((()=>{switch(o){case"primary":return d(p)?"primary-active":"primary-main";case"white/primary":return d(p)?"primary-active":"white";case"muted/primary":return d(p)?"primary-active":"bg-muted";default:return o}}),[o,p,d]),x="white"===y||"bg-muted"===y?void 0:"inverted",w=e=>(0,cn.jsx)(dh,{"data-name":"accordion-item-header",role:"button",tabIndex:f?-1:0,"aria-disabled":f,className:v,onClick:h,onKeyDown:m,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-expanded":d(p),"aria-controls":`${p}-content`,background:y,...s,children:i&&a&&!f?(0,cn.jsxs)(PY,{justifyContent:"between",alignItems:"center",children:[(0,cn.jsx)(RY,{children:e}),(0,cn.jsx)(RY,{width:"auto",children:(0,cn.jsx)(nY,{openText:i,closeText:a,isActive:l,isOpen:d(p),color:x,visualType:"link","aria-hidden":!0,tabIndex:-1})})]}):e});return b?(()=>{const{element:e,children:t,...n}=(null==b?void 0:b.props)??{};return(0,cn.jsx)(es,{element:e,modifiers:"normal",className:qW["accordion__item-wrapping-heading"],children:w((0,cn.jsx)(Qa,{element:"span",...n,children:t}))})})():w(n)},oY=(0,B.forwardRef)(((e,t)=>{const{children:n,visibility:r,breakBefore:o,breakInside:i,breakAfter:a}=e,s=(e,t)=>{var n;const s=ua(null==(n=null==e?void 0:e.props)?void 0:n.className,{"no-print":"hide"===r,"show-print":"show"===r,[`break-before-${o}`]:o,[`break-after-${a}`]:a,[`break-inside-${i}`]:i});return e?B.cloneElement(e,{...e.props,className:s,key:t}):null};return Array.isArray(n)?(0,cn.jsx)(cn.Fragment,{children:null==n?void 0:n.map(((e,t)=>e?s(e,t):null))}):s(n)}));oY.displayName="Print";const iY=()=>{const[e,t]=B.useState(!1);return B.useEffect((()=>(t(!0),()=>{t(!1)})),[]),e},aY=["xs","sm","md","lg","xl","xxl"],sY=()=>{const[e,t]=(0,B.useState)(lY());return(0,B.useEffect)((()=>{const e=Wn((()=>{t(lY())}),20);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),e},lY=()=>{let e=null;return typeof window<"u"&&(e=window.matchMedia("(min-width: 1400px)").matches?"xxl":window.matchMedia("(min-width: 1200px)").matches?"xl":window.matchMedia("(min-width: 992px)").matches?"lg":window.matchMedia("(min-width: 768px)").matches?"md":window.matchMedia("(min-width: 576px)").matches?"sm":"xs"),e},cY=()=>{const e=sY(),t=B.useMemo((()=>e?aY.slice(0,aY.indexOf(e)+1):[]),[e]);return{getCurrentBreakpointProps:B.useCallback(((e,n={})=>{const{sm:r,md:o,lg:i,xl:a,xxl:s,...l}=e,c=[...t.map((t=>la("xs"===t?l:e[t],(e=>void 0!==e))))].filter(Boolean);return Object.assign(n,...c)}),[t])}},uY=()=>{const[e,t]=B.useState(window.matchMedia("print").matches),n=()=>{ca.flushSync((()=>{t(!0)}))},r=()=>{t(!1)};return B.useEffect((()=>(window.addEventListener("beforeprint",n),window.addEventListener("afterprint",r),()=>{window.removeEventListener("beforeprint",n),window.removeEventListener("afterprint",r)})),[]),e};const dY=()=>{let e=!1;const[t,n]=(0,B.useState)("");return(0,B.useEffect)((()=>(ga.registerOnChange(n,"intent"),()=>{ga.unRegisterOnChange(n)})),[]),window.PointerEvent&&"maxTouchPoints"in navigator?navigator.maxTouchPoints>0&&(e=!0):(window.matchMedia&&window.matchMedia("(any-pointer:coarse)").matches||"ontouchstart"in window)&&(e=!0),e&&"keyboard"!==t};var pY={exports:{}};!function(e){e.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},s=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||"Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=a.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},p={A:[i,function(e){this.afternoon=d(e,!1)}],a:[i,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,l("seconds")],ss:[o,l("seconds")],m:[o,l("minutes")],mm:[o,l("minutes")],H:[o,l("hours")],h:[o,l("hours")],HH:[o,l("hours")],hh:[o,l("hours")],D:[o,l("day")],DD:[r,l("day")],Do:[i,function(e){var t=a.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[o,l("week")],ww:[r,l("week")],M:[o,l("month")],MM:[r,l("month")],MMM:[i,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function f(n){var r,o;r=n,o=a&&a.formats;for(var i=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=i.length,l=0;l<s;l+=1){var c=i[l],u=p[c],d=u&&u[0],f=u&&u[1];i[l]=f?{regex:d,parser:f}:c.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var o=i[n];if("string"==typeof o)r+=o.length;else{var a=o.regex,l=o.parser,c=e.slice(r),u=a.exec(c)[0];l.call(t,u),e=e.replace(u,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,o=r.parse;r.parse=function(e){var t=e.date,r=e.utc,i=e.args;this.$u=r;var s=i[1];if("string"==typeof s){var l=!0===i[2],c=!0===i[3],u=l||c,d=i[2];c&&(d=i[2]),a=this.$locale(),!l&&d&&(a=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var o=f(t)(e),i=o.year,a=o.month,s=o.day,l=o.hours,c=o.minutes,u=o.seconds,d=o.milliseconds,p=o.zone,h=o.week,m=new Date,g=s||(i||a?1:m.getDate()),v=i||m.getFullYear(),b=0;i&&!a||(b=a>0?a-1:m.getMonth());var y,x=l||0,w=c||0,S=u||0,_=d||0;return p?new Date(Date.UTC(v,b,g,x,w,S,_+60*p.offset*1e3)):n?new Date(Date.UTC(v,b,g,x,w,S,_)):(y=new Date(v,b,g,x,w,S,_),h&&(y=r(y).week(h).toDate()),y)}catch{return new Date("")}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date("")),a={}}else if(s instanceof Array)for(var p=s.length,h=1;h<=p;h+=1){i[1]=s[h-1];var m=n.apply(this,i);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}h===p&&(this.$d=new Date(""))}else o.call(this,e)}}}()}(pY);const fY=fa(pY.exports);var hY={exports:{}};!function(e){var t;e.exports=(t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},function(e,n,r){var o=n.prototype,i=o.format;r.en.formats=t,o.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,r,o){var i=o&&o.toUpperCase();return r||n[o]||t[o]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(e,void 0===n?{}:n);return i.call(this,r)}})}(hY);const mY=fa(hY.exports);var gY={exports:{}};!function(e){e.exports=function(e,t,n){t.prototype.isBetween=function(e,t,r,o){var i=n(e),a=n(t),s="("===(o=o||"()")[0],l=")"===o[1];return(s?this.isAfter(i,r):!this.isBefore(i,r))&&(l?this.isBefore(a,r):!this.isAfter(a,r))||(s?this.isBefore(i,r):!this.isAfter(i,r))&&(l?this.isAfter(a,r):!this.isBefore(a,r))}}}(gY);const vY=fa(gY.exports);da.extend(fY),da.extend(mY),da.extend(vY);var bY={exports:{}};!function(e){e.exports=function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}(bY);const yY=fa(bY.exports);var xY={exports:{}};!function(e){e.exports=function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}}}(xY);const wY=fa(xY.exports);var SY={exports:{}};!function(e){e.exports=function(e,t,n){n.updateLocale=function(e,t){var r=n.Ls[e];if(r)return(t?Object.keys(t):[]).forEach((function(e){r[e]=t[e]})),r}}}(SY);const _Y=fa(SY.exports),EY="https://github.com/mui/mui-x/blob/HEAD/packages/x-date-pickers/src/locales/utils/pickersLocaleTextApi.ts",kY={close:{description:"Used for closing",components:["CloseButton","Collapse","Notification","FileUpload","Dropdown","Tooltip"],et:"Sulge",en:"Close",ru:"Закрыть"},open:{description:"Used for opening",components:["Collapse"],et:"Ava",en:"Open",ru:"Открыть"},remove:{description:"Used for removing",components:["FileUpload"],et:"Eemalda",en:"Remove",ru:"Удалить"},cancel:{description:"For canceling an action",components:["TableFilter"],et:"Tühista",en:"Cancel",ru:"Отмена"},clear:{description:"For clearing a value",components:["TableFilter","TextField"],et:"Tühjenda",en:"Clear",ru:"Очистить"},search:{description:"For searching",components:["TableFilter"],et:"Otsi",en:"Search",ru:"Поиск"},required:{description:"Required field",components:["TableFilter"],et:"Kohustuslik väli",en:"Required field",ru:"Обязательное поле"},breadcrumbs:{description:"Breadcrumbs navigation label",components:["Breadcrumbs"],et:"Jäljerida",en:"Breadcrumbs",ru:"Навигационная цепочка"},"anchor.new-tab":{description:"Label for when anchor opens in new tab",components:["Anchor"],et:"Avaneb uuel vahelehel",en:"Opens in new tab",ru:"Открывается в новой вкладке"},"header.toggle":{description:"Label for header toggle on mobile",components:["Header"],et:e=>e?"Sulge menüü":"Ava menüü",en:e=>e?"Close menu":"Open menu",ru:e=>e?"Закрыть меню":"Открыть меню"},"header.settings":{description:"Label for HeaderSettings Button",components:["HeaderSettings"],et:"Seaded",en:"Settings",ru:"Настройки"},"header.select-lang":{description:"Label for HeaderLanguage label and Modal Heading",components:["HeaderLanguage"],et:"Keel:",en:"Language:",ru:"Язык:"},"header.role-label":{description:"Label for Role selection",components:["HeaderRole"],et:"Mina esindan:",en:"I represent:",ru:"я представляю:"},"header.login":{description:"Label for login button",components:["Header"],et:"Sisene portaali",en:"Log in",ru:"авторизоваться"},"header.logout":{description:"Label for logout button",components:["Header"],et:"Logi välja",en:"Log out",ru:"Выйти"},"header.logo":{description:"Alt Label for logo",components:["Header"],et:"Logo",en:"Logo",ru:"Логотип"},"file-upload.add":{description:"Label for add file button",components:["FileUpload"],et:"Lisa manus",en:"Add attachment",ru:"Загрузить файл"},"file-upload.accept":{description:"Default label for file extensions",components:["FileUpload"],et:"Lubatud faililaiendid:",en:"Allowed file extensions:",ru:"Разрешенные расширения файлов:"},"file-upload.max-size":{description:"Default label for file size restriction",components:["FileUpload"],et:"Maksimaalne suurus:",en:"Maximum size:",ru:"Максимальный размер:"},"file-upload.size-rejected":{description:"Error label for rejected size",components:["FileUpload"],et:e=>`Fail(id) ${e} on liiga suured`,en:e=>`File(s) ${e} are too large`,ru:e=>`Файл(ы) ${e} слишком велики`},"file-upload.extension-rejected":{description:"Error label for rejected extension",components:["FileUpload"],et:e=>`Fail(id) ${e} on vale laiendiga`,en:e=>`File(s) ${e} have the wrong extension`,ru:e=>`Файл(ы) ${e} имеют неправильное расширение`},"file-dropzone.label":{description:"Default label for dropzone",components:["FileDropzone"],et:"Lohista failid siia või klõpsa, et sirvida",en:"Drop files here, or click to browse",ru:"Перетащите файлы сюда или нажмите, чтобы выбрать"},"modal.close":{description:"Label for modals close button",components:["Modal"],et:"Sulge modaal",en:"Close modal",ru:"Закрыть модальное окно"},"select.loading":{description:"Text when select options are loading",components:["select"],et:"Laadimine...",en:"Loading...",ru:"Загрузка..."},"select.no-options":{description:"Text when select has no options",components:["select"],et:"Valikud puuduvad",en:"No options",ru:"Нет вариантов"},"stepper.completed":{description:"Label for screen-reader that this step is completed (visually hidden)",components:["StepperNav"],et:"Lõpetatud",en:"Completed",ru:"Завершено"},"stepper.not-completed":{description:"Label for screen-reader that this step is not completed (visually hidden)",components:["StepperNav"],et:"Lõpetamata",en:"Not completed",ru:"Не завершено"},"skeleton.loading":{description:"Announced by screen-readers when skeleton is loading",components:["Skeleton"],et:"Laadimine",en:"Loading",ru:"Загрузка"},"skeleton.loading-completed":{description:"Announced by screen-readers when skeleton has completed loading",components:["Skeleton"],et:"Laadimine lõpetatud",en:"Loading completed",ru:"Загрузка завершена"},"spinner.loading":{description:"Announced by screen-readers when spinner is loading",components:["Spinner"],et:"Laadimine",en:"Loading",ru:"Загрузка"},"table.loading":{description:"Shown when table is loading",components:["Table"],et:"Tabel laeb",en:"Table is loading",ru:"Таблица загружается"},"table.empty":{description:"Shown when table is empty",components:["Table"],et:"Tulemused puuduvad",en:"No results",ru:"Нет результатов"},"table.error":{description:"Shown when table is in error state",components:["Table"],et:"Tabeli andmete pärimisel tekkis viga",en:"An error occurred while retrieving table data",ru:"Произошла ошибка при получении данных таблицы"},"table.filter":{description:"Label for filter toggle",components:["Table","TableFilter"],et:"Filtreeri",en:"Filter",ru:"Фильтровать"},"table.filter.select-all":{description:"Label for selecting all",components:["Table","TableFilter"],et:"Vali kõik",en:"Select all",ru:"Выбрать все"},"table.filter.remove-all":{description:"Label for removing all",components:["Table","TableFilter"],et:"Eemalda kõik",en:"Remove all",ru:"Удалить все"},"table.filter.no-options":{description:"When select filter has no options",components:["Table","TableFilter"],et:"Valikud puuduvad",en:"No options",ru:"Нет вариантов"},"table.filter.validation.no-spaces":{description:"Filter validation error - Text can not start with spaces",components:["Table","TableFilter"],et:"Tekst ei tohi alata tühikutega",en:"Filter text cant start with spaces",ru:"Текст фильтра не может начинаться с пробелов"},"table.filter.validation.min-length":{description:"Filter validation error - Text is too short",components:["Table","TableFilter"],et:e=>1===e?`Sisesta vähemalt ${e} tähemärk`:`Sisesta vähemalt ${e} tähemärki`,en:e=>1===e?`Min length is ${e} char`:`Min length is ${e} chars`,ru:e=>1===e?`Минимальная длина ${e} знак`:`Минимальная длина ${e} знаков`},"table.filter.validation.to-before-from":{description:"Filter validation error - End date is before start date",components:["Table","TableFilter"],et:"Lõppkuupäev on enne alguskuupäeva",en:"End date must be after start date",ru:"Дата окончания предшествует дате начала"},"table.filter.from":{description:"Label for date filter from",components:["Table","TableFilter"],et:"Kuupäev alates",en:"Date from",ru:"Дата с"},"table.filter.to":{description:"Label for date filter until",components:["Table","TableFilter"],et:"Kuupäev kuni",en:"Date until",ru:"Дата до"},"table.toggle-sub-row":{description:"Toggle sub row button (Visually hidden)",components:["Table"],et:e=>e?"Sulge alamrida":"Ava alamrida",en:e=>e?"Close subrow":"Open subrow",ru:e=>e?"Закрыть подстроку":"Открыть подстроку"},"table.select-all":{description:"Row selection - Label for check in table header",components:["Table"],et:e=>e?"Eemalda kõik":"Vali kõik",en:e=>e?"Deselect all":"Select all",ru:e=>e?"Убрать выделение со всего":"Выбрать все"},"table.select-row":{description:"Row selection - Label for check in table row",components:["Table"],et:e=>e?"Eemalda rida":"Vali rida",en:e=>e?"Deselect row":"Select row",ru:e=>e?"Отменить выбор строки":"Выбрать ряд"},"table.sort":{description:"Label for sort button",components:["Table"],et:e=>"asc"===e?"Sorteeri kahanevalt":"desc"===e?"Eemalda sorteerimine":"Sorteeri kasvavalt",en:e=>"asc"===e?"Sort decending":"desc"===e?"Remove sorting":"Sort ascending",ru:e=>"asc"===e?"Сортировать по убыванию":"desc"===e?"Отменить сортировку":"Сортировать по возрастанию"},"tooltip.icon-trigger":{description:"Label we use for icons that are tooltip triggers",components:["TooltipTrigger"],et:"Kuva tööriistavihje",en:"Show tooltip",ru:"Показать подсказку"},"pagination.title":{description:"Label of the pagination",components:["Table","Pagination"],et:"Pagineerimine",en:"Pagination",ru:"Страницы"},"pagination.page":{description:"Label of individual page numbers",components:["Table","Pagination"],et:(e,t)=>t?`Aktiivne leht, leht ${e}`:`Mine lehele ${e}`,en:(e,t)=>t?`Current page, page ${e}`:`Go to page ${e}`,ru:(e,t)=>t?`Текущая страница, страница ${e}`:`Перейти на страницу ${e}`},"pagination.prev-page":{description:"Previous page button label",components:["Table","Pagination"],et:"Eelmine leht",en:"Previous page",ru:"Предыдущая страница"},"pagination.next-page":{description:"Next page button label",components:["Table","Pagination"],et:"Järgmine leht",en:"Next page",ru:"Следущая страница"},"pagination.results":{description:"Total results text",components:["Table","Pagination"],et:e=>1===e?"tulemus":"tulemust",en:e=>1===e?"result":"results",ru:e=>1===e?"результат":"результа"},"pagination.page-size":{description:"Label of page size select",components:["Table","Pagination"],et:"Lehe suurus",en:"Page size",ru:"Размер страницы"},"table-of-contents.title":{description:"Title of the table of contents",components:["TableOfContents"],et:"Sisukord",en:"Table of contents",ru:"Содержание"},"table-of-contents.valid":{description:"Number of valid steps",components:["TableOfContents"],et:e=>`${e} valiidsed`,en:e=>`${e} valid`,ru:e=>`${e} действительны`},"table-of-contents.invalid":{description:"Number of invalid steps",components:["TableOfContents"],et:e=>`${e} mitte valiidne`,en:e=>`${e} invalid`,ru:e=>`${e} неверный`},"truncate.see-more":{description:"See more button label",components:["Truncate"],et:"Näita rohkem",en:"Show more",ru:"Показать больше"},"truncate.see-less":{description:"See less button label",components:["Truncate"],et:"Näita vähem",en:"Show less",ru:"Скрыть"},"vertical-progress.edit":{description:"Edit button label",components:["VerticalProgressItem"],et:"Muuda",en:"Edit",ru:"редактировать"},"pickers.previousMonth":{description:`Translation for ${EY}`,components:["Pickers"],et:"Eelmine kuu",en:"Previous month",ru:"Прошлый месяц"},"pickers.nextMonth":{description:`Translation for ${EY}`,components:["Pickers"],et:"Järgmine kuu",en:"Next month",ru:"Следующий месяц"},"pickers.openPreviousView":{description:`Translation for ${EY}`,components:["Pickers"],et:"Ava eelmine vaade",en:"Open previous view",ru:"Открыть предыдущий вид"},"pickers.openNextView":{description:`Translation for ${EY}`,components:["Pickers"],et:"Ava järgmine vaade",en:"Open next view",ru:"Открыть следующий вид"},"pickers.cancelButtonLabel":{description:`Translation for ${EY}`,components:["Pickers"],et:"Tühista",en:"Cancel",ru:"Отмена"},"pickers.clearButtonLabel":{description:`Translation for ${EY}`,components:["Pickers"],et:"Tühjenda",en:"Clear",ru:"Очистить"},"pickers.okButtonLabel":{description:`Translation for ${EY}`,components:["Pickers"],et:"Kinnita",en:"Confirm",ru:"Подтвердить"},"pickers.todayButtonLabel":{description:`Translation for ${EY}`,components:["Pickers"],et:"Täna",en:"Today",ru:" Сегодня"},"pickers.start":{description:`Translation for ${EY}`,components:["Pickers"],et:"Algus",en:"Start",ru:"Начало"},"pickers.end":{description:`Translation for ${EY}`,components:["Pickers"],et:"Lõpp",en:"End",ru:"Конец"},"pickers.calendarViewSwitchingButtonAriaLabel":{description:`Translation for ${EY}`,components:["Pickers"],et:e=>"day"===e?"Kalendri vaade on lahti, lülitu aasta vaatesse":"month"===e?"Kuu vaade on lahti, lülitu aasta vaatesse":"Aasta vaade on lahti, lülitu kalendri vaatesse",en:e=>"day"===e?"Calendar view is open, switch to year view":"month"===e?"Month view is open, switch to year view":"Year view is open, switch to calendar view",ru:e=>"day"===e?"Открыт календарный вид, переключиться на годовой вид":"month"===e?"Открыт месячный вид, переключиться на месячный вид":"Открыт годовой вид, переключиться на календарный вид"},"pickers.inputModeToggleButtonAriaLabel":{description:`Translation for ${EY}`,components:["Pickers"],et:(e,t)=>e?`Teksti välja vaade on lahti, mine ${"calendar"===t?"kalendri":"kella"} vaatesse`:("calendar"===t?"Kalendri":"Kella")+" vaade on lahti, mine teksti välja vaatesse",en:(e,t)=>e?`Text input view is open, go to ${"calendar"===t?"calendar":"clock"} view`:("calendar"===t?"Calendar":"Clock")+" view is open, go to text input view",ru:(e,t)=>e?"Вид ввода текста открыт, перейти к виду "+("calendar"===t?"календаря":"времени"):`Вид ${"calendar"===t?"календаря":"времени"} открыт, перейти к виду ввода текста`},"pickers.clockLabelText":{description:`Translation for ${EY}`,components:["Pickers"],et:(e,t,n)=>`Vali ${"hours"===e?"tunnid":"minutes"===e?"minutid":"sekundid"}. ${null===t?"Aega pole valitud":`Valitud aeg on ${n.format(t,"fullTime")}`}`,en:(e,t,n)=>`Select ${"hours"===e?"hours":"minutes"===e?"minutes":"seconds"}. ${null===t?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,ru:(e,t,n)=>`Выбрать ${"hours"===e?"часы":"minutes"===e?"минуты":"секунды"}. ${null===t?"Время не выбрано":`Выбранное время ${n.format(t,"fullTime")}`}`},"pickers.hoursClockNumberText":{description:`Translation for ${EY}`,components:["Pickers"],et:e=>`${e} tundi`,en:e=>`${e} hours`,ru:e=>`${e} часов`},"pickers.minutesClockNumberText":{description:`Translation for ${EY}`,components:["Pickers"],et:e=>`${e} minutit`,en:e=>`${e} minutes`,ru:e=>`${e} минут`},"pickers.secondsClockNumberText":{description:`Translation for ${EY}`,components:["Pickers"],et:e=>`${e} sekundit`,en:e=>`${e} seconds`,ru:e=>`${e} секунд`},"pickers.openDatePickerDialogue":{description:`Translation for ${EY}`,components:["Pickers"],et:(e,t)=>null!==e&&t.isValid(e)?`Vali kuupäev, valitud kuupäev on ${t.format(e,"fullDate")}`:"Vali kuupäev",en:(e,t)=>null!==e&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",ru:(e,t)=>null!==e&&t.isValid(e)?`Выберите дату, выбранная дата ${t.format(e,"fullDate")}`:"Выберите дату"},"pickers.openTimePickerDialogue":{description:`Translation for ${EY}`,components:["Pickers"],et:(e,t)=>null!==e&&t.isValid(e)?`Vali kellaaeg, valitud kellaaeg on ${t.format(e,"fullTime")}`:"Vali kellaaeg",en:(e,t)=>null!==e&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",ru:(e,t)=>null!==e&&t.isValid(e)?`Выберите время, выбранное время ${t.format(e,"fullTime")}`:"Выберите время"},"pickers.timeTableLabel":{description:`Translation for ${EY}`,components:["Pickers"],et:"Vali kellaaeg",en:"Pick time",ru:"Выберите время"},"pickers.dateTableLabel":{description:`Translation for ${EY}`,components:["Pickers"],et:"Vali kuupäev",en:"Pick date",ru:"Выберите дату"},"pickers.datePickerDefaultToolbarTitle":{description:`Translation for ${EY}`,components:["Pickers"],et:"Vali kuupäev",en:"Pick date",ru:"Выберите дату"},"pickers.dateTimePickerDefaultToolbarTitle":{description:`Translation for ${EY}`,components:["Pickers"],et:"Vali kuupäev ja kellaaeg",en:"Pick date and time",ru:"Выберите время и дату"},"pickers.timePickerDefaultToolbarTitle":{description:`Translation for ${EY}`,components:["Pickers"],et:"Vali kellaaeg",en:"Pick time",ru:"Выберите время"},"pickers.dateRangePickerDefaultToolbarTitle":{description:`Translation for ${EY}`,components:["Pickers"],et:"Vali kuupäeva vahemik",en:"Pick date range",ru:"Выберите даты"},"footer.title":{description:"Label for screen-reader for footer navigation title",components:["Footer"],et:"Jalus",en:"Footer",ru:"Нижний колонтитул"},"numberField.decrement":{description:"Label for screen-reader for number field decrease button",components:["NumberField"],et:e=>`Vähenda ${e} võrra`,en:e=>`Decrease by ${e}`,ru:e=>`Уменьшить на ${e}`},"numberField.increment":{description:"Label for screen-reader for number field increase button",components:["NumberField"],et:e=>`Suurenda ${e} võrra`,en:e=>`Increase by ${e}`,ru:e=>`Увеличить на ${e}`},"numberField.quantityUpdated":{description:"Label for screen-reader when quantity get updated by button click",components:["NumberField"],et:e=>`Uuendatud. Uus väärtus ${e}`,en:e=>`Updated. New value ${e}`,ru:e=>`Ууэндатуд. Уус вяэртус ${e}`}},TY=(e,t)=>Object.keys(e).reduce(((e,n)=>({...e,[n]:kY[n][t]})),{});TY(kY,"et"),TY(kY,"en"),TY(kY,"ru");!function(e){e.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e,t,n,r){var o={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:["%d minuti","%d minutit"],h:["ühe tunni","tund aega","üks tund"],hh:["%d tunni","%d tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:["%d kuu","%d kuud"],y:["ühe aasta","aasta","üks aasta"],yy:["%d aasta","%d aastat"]};return t?(o[n][2]?o[n][2]:o[n][1]).replace("%d",e):(r?o[n][0]:o[n][1]).replace("%d",e)}var o={name:"et",weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s pärast",past:"%s tagasi",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:"%d päeva",M:r,MM:r,y:r,yy:r},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};return n.default.locale(o,null,!0),o}(da)}({exports:{}});!function(e){e.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),o="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),i="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),a="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),s=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function l(e,t,n){var r,o;return"m"===n?t?"минута":"минуту":e+" "+(r=+e,o={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?o[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?o[1]:o[2])}var c=function(e,t){return s.test(t)?r[e.month()]:o[e.month()]};c.s=o,c.f=r;var u=function(e,t){return s.test(t)?i[e.month()]:a[e.month()]};u.s=a,u.f=i;var d={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:c,monthsShort:u,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:l,mm:l,h:"час",hh:l,d:"день",dd:l,M:"месяц",MM:l,y:"год",yy:l},ordinal:function(e){return e},meridiem:function(e){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"}};return n.default.locale(d,null,!0),d}(da)}({exports:{}}),da.extend(_Y),da.extend(wY),da.extend(yY),da.updateLocale("en",{weekStart:1});const CY={getLabel:e=>(console.error("LabelProvider missing! Application must be wrapped with <LabelProvider>"),e)},OY=B.createContext(CY),IY=()=>B.useContext(OY),MY={"tedi-spinner":"tedi-spinner-4fd8c58c","tedi-spinner-outer":"tedi-spinner-outer-e5dad833","tedi-spinner--absolute":"tedi-spinner--absolute-98f6ad99","tedi-spinner__inner":"tedi-spinner__inner-b3080194","tedi-spinner-inner":"tedi-spinner-inner-2d3cfd67","tedi-spinner--color-primary":"tedi-spinner--color-primary-3e813ccf","tedi-spinner--color-secondary":"tedi-spinner--color-secondary-3ff23ee6","tedi-spinner--size-10":"tedi-spinner--size-10-bfee969b","tedi-spinner--size-16":"tedi-spinner--size-16-8254b435","tedi-spinner--size-18":"tedi-spinner--size-18-de951cff","tedi-spinner--size-48":"tedi-spinner--size-48-b12c4db2"},DY=e=>{const{getLabel:t}=IY(),{getCurrentBreakpointProps:n}=cY(),{className:r,size:o=16,color:i="primary",label:a=t("spinner.loading"),position:s}=n(e),l=ua(MY["tedi-spinner"],r,s&&MY[`tedi-spinner--${s}`],o&&MY[`tedi-spinner--size-${o}`],i&&MY[`tedi-spinner--color-${i}`]);return(0,cn.jsx)("span",{className:l,role:"status","aria-live":"polite","aria-label":a,"aria-hidden":!a,children:(0,cn.jsx)("svg",{viewBox:"22 22 44 44","aria-hidden":"true",children:(0,cn.jsx)("circle",{className:MY["tedi-spinner__inner"],cx:"44",cy:"44",r:"20",fill:"none"})})})},jY=["xxl","xl","lg","md","sm","xs"],AY={"flex-fill":"flex-fill-f0a4e09e","flex-row":"flex-row-26096713","flex-column":"flex-column-a9f0f6d4","flex-row-reverse":"flex-row-reverse-8398d71c","flex-column-reverse":"flex-column-reverse-9ed6dc20","flex-grow-0":"flex-grow-0-ce0b303f","flex-grow-1":"flex-grow-1-21153569","flex-shrink-0":"flex-shrink-0-258b0756","flex-shrink-1":"flex-shrink-1-b89d9b34","flex-wrap":"flex-wrap-45f5dca8","flex-nowrap":"flex-nowrap-b1591392","flex-wrap-reverse":"flex-wrap-reverse-16dd4c58","justify-content-start":"justify-content-start-0339f1dd","justify-content-end":"justify-content-end-d749ddf0","justify-content-center":"justify-content-center-39b0e409","justify-content-between":"justify-content-between-d957f4a9","justify-content-around":"justify-content-around-98cd5019","justify-content-evenly":"justify-content-evenly-38031f5a","align-items-start":"align-items-start-4896e0d2","align-items-end":"align-items-end-ef05ce71","align-items-center":"align-items-center-cd792311","align-items-baseline":"align-items-baseline-4cb8569f","align-items-stretch":"align-items-stretch-75ba9838","align-self-auto":"align-self-auto-2cae1b08","align-self-start":"align-self-start-e1c25402","align-self-end":"align-self-end-b2b98fc0","align-self-center":"align-self-center-b3cf9251","align-self-baseline":"align-self-baseline-dead0ae5","align-self-stretch":"align-self-stretch-3f802ff4","order-first":"order-first-39c659eb","order-0":"order-0-d41bb402","order-1":"order-1-e51f098c","order-2":"order-2-7f5f5e8f","order-3":"order-3-0134d3f5","order-4":"order-4-6bca85dd","order-5":"order-5-c0520a86","order-last":"order-last-1b85541b","gap-0":"gap-0-30db936e","gap-1":"gap-1-e03194d6","gap-2":"gap-2-b10dd371","gap-3":"gap-3-05cb2974","gap-4":"gap-4-45ccdfb6","gap-5":"gap-5-2a77678b","flex-sm-fill":"flex-sm-fill-d6d8a85a","flex-sm-row":"flex-sm-row-361c1759","flex-sm-column":"flex-sm-column-f3efd297","flex-sm-row-reverse":"flex-sm-row-reverse-050806d2","flex-sm-column-reverse":"flex-sm-column-reverse-92bd16ce","flex-sm-grow-0":"flex-sm-grow-0-b7108f2f","flex-sm-grow-1":"flex-sm-grow-1-7fe5c51d","flex-sm-shrink-0":"flex-sm-shrink-0-16650667","flex-sm-shrink-1":"flex-sm-shrink-1-6e696eab","flex-sm-wrap":"flex-sm-wrap-11d9e93e","flex-sm-nowrap":"flex-sm-nowrap-3a607379","flex-sm-wrap-reverse":"flex-sm-wrap-reverse-12c799c8","justify-content-sm-start":"justify-content-sm-start-a268ef70","justify-content-sm-end":"justify-content-sm-end-0b6c4a73","justify-content-sm-center":"justify-content-sm-center-5465d112","justify-content-sm-between":"justify-content-sm-between-79d82dd9","justify-content-sm-around":"justify-content-sm-around-f5183f0f","justify-content-sm-evenly":"justify-content-sm-evenly-030443e6","align-items-sm-start":"align-items-sm-start-e4cb9579","align-items-sm-end":"align-items-sm-end-d5d3e793","align-items-sm-center":"align-items-sm-center-7879a276","align-items-sm-baseline":"align-items-sm-baseline-edef8661","align-items-sm-stretch":"align-items-sm-stretch-580ad54f","align-self-sm-auto":"align-self-sm-auto-e9095c68","align-self-sm-start":"align-self-sm-start-98e1d86e","align-self-sm-end":"align-self-sm-end-cc1a3a02","align-self-sm-center":"align-self-sm-center-07608d10","align-self-sm-baseline":"align-self-sm-baseline-3e431a45","align-self-sm-stretch":"align-self-sm-stretch-ee9f785e","order-sm-first":"order-sm-first-3fb363df","order-sm-0":"order-sm-0-6444e87f","order-sm-1":"order-sm-1-8cb49a98","order-sm-2":"order-sm-2-c3bb0327","order-sm-3":"order-sm-3-a52bfecf","order-sm-4":"order-sm-4-ff8f4c5f","order-sm-5":"order-sm-5-0f475b2e","order-sm-last":"order-sm-last-2f126355","gap-sm-0":"gap-sm-0-7d51e0ab","gap-sm-1":"gap-sm-1-9337175f","gap-sm-2":"gap-sm-2-349ccd10","gap-sm-3":"gap-sm-3-5dbd126d","gap-sm-4":"gap-sm-4-5d08e709","gap-sm-5":"gap-sm-5-f45d6e03","flex-md-fill":"flex-md-fill-18d6fee3","flex-md-row":"flex-md-row-a3b483c9","flex-md-column":"flex-md-column-ba20e276","flex-md-row-reverse":"flex-md-row-reverse-6b751832","flex-md-column-reverse":"flex-md-column-reverse-0ea2d1b4","flex-md-grow-0":"flex-md-grow-0-c1299600","flex-md-grow-1":"flex-md-grow-1-5e9bd718","flex-md-shrink-0":"flex-md-shrink-0-4a2fff75","flex-md-shrink-1":"flex-md-shrink-1-b26023f8","flex-md-wrap":"flex-md-wrap-8c8cfb1c","flex-md-nowrap":"flex-md-nowrap-c8e670a3","flex-md-wrap-reverse":"flex-md-wrap-reverse-d10e726d","justify-content-md-start":"justify-content-md-start-facf652d","justify-content-md-end":"justify-content-md-end-83a16ebb","justify-content-md-center":"justify-content-md-center-49c2fad2","justify-content-md-between":"justify-content-md-between-640ca791","justify-content-md-around":"justify-content-md-around-900c3b50","justify-content-md-evenly":"justify-content-md-evenly-cdfff488","align-items-md-start":"align-items-md-start-f024829e","align-items-md-end":"align-items-md-end-a406841d","align-items-md-center":"align-items-md-center-c78852ba","align-items-md-baseline":"align-items-md-baseline-dca996b1","align-items-md-stretch":"align-items-md-stretch-a37174d9","align-self-md-auto":"align-self-md-auto-964133ad","align-self-md-start":"align-self-md-start-7c888cab","align-self-md-end":"align-self-md-end-fbf7a09e","align-self-md-center":"align-self-md-center-e8ae44bf","align-self-md-baseline":"align-self-md-baseline-c070c652","align-self-md-stretch":"align-self-md-stretch-da5ea074","order-md-first":"order-md-first-068ded58","order-md-0":"order-md-0-81c12242","order-md-1":"order-md-1-da5e4073","order-md-2":"order-md-2-491e3c7a","order-md-3":"order-md-3-c76fbd2e","order-md-4":"order-md-4-c09771ae","order-md-5":"order-md-5-71a5fa1c","order-md-last":"order-md-last-5e51b2c5","gap-md-0":"gap-md-0-364ee176","gap-md-1":"gap-md-1-2fa22f04","gap-md-2":"gap-md-2-73f0220c","gap-md-3":"gap-md-3-796c75b0","gap-md-4":"gap-md-4-2d25bb50","gap-md-5":"gap-md-5-e692bd63","flex-lg-fill":"flex-lg-fill-66292019","flex-lg-row":"flex-lg-row-a294abc3","flex-lg-column":"flex-lg-column-7137709c","flex-lg-row-reverse":"flex-lg-row-reverse-c71e38b6","flex-lg-column-reverse":"flex-lg-column-reverse-d69d94bd","flex-lg-grow-0":"flex-lg-grow-0-7e771515","flex-lg-grow-1":"flex-lg-grow-1-ea33e81e","flex-lg-shrink-0":"flex-lg-shrink-0-9c7c306e","flex-lg-shrink-1":"flex-lg-shrink-1-95ac9367","flex-lg-wrap":"flex-lg-wrap-2eb6c362","flex-lg-nowrap":"flex-lg-nowrap-1cb911a5","flex-lg-wrap-reverse":"flex-lg-wrap-reverse-b8397441","justify-content-lg-start":"justify-content-lg-start-6f19bc58","justify-content-lg-end":"justify-content-lg-end-14d20226","justify-content-lg-center":"justify-content-lg-center-3db156a0","justify-content-lg-between":"justify-content-lg-between-a13dca01","justify-content-lg-around":"justify-content-lg-around-572cc6ce","justify-content-lg-evenly":"justify-content-lg-evenly-6e54b3e6","align-items-lg-start":"align-items-lg-start-467afb36","align-items-lg-end":"align-items-lg-end-f4b85cf1","align-items-lg-center":"align-items-lg-center-678fe517","align-items-lg-baseline":"align-items-lg-baseline-71e4dc96","align-items-lg-stretch":"align-items-lg-stretch-162371e2","align-self-lg-auto":"align-self-lg-auto-38dce45d","align-self-lg-start":"align-self-lg-start-7de154e0","align-self-lg-end":"align-self-lg-end-4a3df4f5","align-self-lg-center":"align-self-lg-center-ce06ac0c","align-self-lg-baseline":"align-self-lg-baseline-0123c501","align-self-lg-stretch":"align-self-lg-stretch-11e96cfa","order-lg-first":"order-lg-first-c1e7fa4d","order-lg-0":"order-lg-0-cb862aa9","order-lg-1":"order-lg-1-a4f7d6ac","order-lg-2":"order-lg-2-5194d329","order-lg-3":"order-lg-3-1ee44749","order-lg-4":"order-lg-4-23fbc040","order-lg-5":"order-lg-5-d0335149","order-lg-last":"order-lg-last-ccc3617a","gap-lg-0":"gap-lg-0-3fe8a8d2","gap-lg-1":"gap-lg-1-75b0fd55","gap-lg-2":"gap-lg-2-93fc9418","gap-lg-3":"gap-lg-3-0f1e7ec5","gap-lg-4":"gap-lg-4-05983905","gap-lg-5":"gap-lg-5-c335ac2c","flex-xl-fill":"flex-xl-fill-e9281908","flex-xl-row":"flex-xl-row-5898f825","flex-xl-column":"flex-xl-column-0ce9e7c4","flex-xl-row-reverse":"flex-xl-row-reverse-62e75173","flex-xl-column-reverse":"flex-xl-column-reverse-3b0f9ac1","flex-xl-grow-0":"flex-xl-grow-0-9e1725af","flex-xl-grow-1":"flex-xl-grow-1-f9ff0a9c","flex-xl-shrink-0":"flex-xl-shrink-0-b995cc0d","flex-xl-shrink-1":"flex-xl-shrink-1-d847ad96","flex-xl-wrap":"flex-xl-wrap-21f7b895","flex-xl-nowrap":"flex-xl-nowrap-c9fd6f68","flex-xl-wrap-reverse":"flex-xl-wrap-reverse-7fd9e214","justify-content-xl-start":"justify-content-xl-start-60f68802","justify-content-xl-end":"justify-content-xl-end-85fa7e7f","justify-content-xl-center":"justify-content-xl-center-06b58de0","justify-content-xl-between":"justify-content-xl-between-9ef84619","justify-content-xl-around":"justify-content-xl-around-8814f9ce","justify-content-xl-evenly":"justify-content-xl-evenly-103855e7","align-items-xl-start":"align-items-xl-start-748a854f","align-items-xl-end":"align-items-xl-end-b9f5eb6e","align-items-xl-center":"align-items-xl-center-01ed5d02","align-items-xl-baseline":"align-items-xl-baseline-b4d2098a","align-items-xl-stretch":"align-items-xl-stretch-3480aada","align-self-xl-auto":"align-self-xl-auto-a134e357","align-self-xl-start":"align-self-xl-start-321eea94","align-self-xl-end":"align-self-xl-end-6ce66cde","align-self-xl-center":"align-self-xl-center-c69e983a","align-self-xl-baseline":"align-self-xl-baseline-40c6bca1","align-self-xl-stretch":"align-self-xl-stretch-f82a1ec0","order-xl-first":"order-xl-first-dfb9a5c9","order-xl-0":"order-xl-0-6a7769ed","order-xl-1":"order-xl-1-cc11b133","order-xl-2":"order-xl-2-17d45a21","order-xl-3":"order-xl-3-a859a6a4","order-xl-4":"order-xl-4-ec5534df","order-xl-5":"order-xl-5-70740e82","order-xl-last":"order-xl-last-c425bed8","gap-xl-0":"gap-xl-0-ae67dc03","gap-xl-1":"gap-xl-1-7bdc36d5","gap-xl-2":"gap-xl-2-7b43f925","gap-xl-3":"gap-xl-3-4d5227b7","gap-xl-4":"gap-xl-4-2881ba3c","gap-xl-5":"gap-xl-5-3bddd034","flex-xxl-fill":"flex-xxl-fill-b2f43735","flex-xxl-row":"flex-xxl-row-68878205","flex-xxl-column":"flex-xxl-column-268b5a8e","flex-xxl-row-reverse":"flex-xxl-row-reverse-07025cf7","flex-xxl-column-reverse":"flex-xxl-column-reverse-621480bb","flex-xxl-grow-0":"flex-xxl-grow-0-fdbcdabd","flex-xxl-grow-1":"flex-xxl-grow-1-0d5483ca","flex-xxl-shrink-0":"flex-xxl-shrink-0-35dd23f0","flex-xxl-shrink-1":"flex-xxl-shrink-1-62ed146f","flex-xxl-wrap":"flex-xxl-wrap-6a7289e4","flex-xxl-nowrap":"flex-xxl-nowrap-363e7be5","flex-xxl-wrap-reverse":"flex-xxl-wrap-reverse-52b485f5","justify-content-xxl-start":"justify-content-xxl-start-d2006ab9","justify-content-xxl-end":"justify-content-xxl-end-eacaf093","justify-content-xxl-center":"justify-content-xxl-center-a6595d43","justify-content-xxl-between":"justify-content-xxl-between-b05409d9","justify-content-xxl-around":"justify-content-xxl-around-a79f93e6","justify-content-xxl-evenly":"justify-content-xxl-evenly-99bad7f8","align-items-xxl-start":"align-items-xxl-start-24105050","align-items-xxl-end":"align-items-xxl-end-007f43b3","align-items-xxl-center":"align-items-xxl-center-a259983e","align-items-xxl-baseline":"align-items-xxl-baseline-0b06097b","align-items-xxl-stretch":"align-items-xxl-stretch-91c5c410","align-self-xxl-auto":"align-self-xxl-auto-6df58c1e","align-self-xxl-start":"align-self-xxl-start-ae20758a","align-self-xxl-end":"align-self-xxl-end-ad3e4923","align-self-xxl-center":"align-self-xxl-center-3d02d238","align-self-xxl-baseline":"align-self-xxl-baseline-8ce40c18","align-self-xxl-stretch":"align-self-xxl-stretch-b946394c","order-xxl-first":"order-xxl-first-d9b2e682","order-xxl-0":"order-xxl-0-f50c9d97","order-xxl-1":"order-xxl-1-6a9badd3","order-xxl-2":"order-xxl-2-782a86b1","order-xxl-3":"order-xxl-3-3ec373ce","order-xxl-4":"order-xxl-4-791f88f5","order-xxl-5":"order-xxl-5-6aad3d0d","order-xxl-last":"order-xxl-last-9d8edeb4","gap-xxl-0":"gap-xxl-0-01fd882b","gap-xxl-1":"gap-xxl-1-ffc2fae5","gap-xxl-2":"gap-xxl-2-898bf78a","gap-xxl-3":"gap-xxl-3-0025baba","gap-xxl-4":"gap-xxl-4-949490f2","gap-xxl-5":"gap-xxl-5-058340cd",row:"row-c7922371",col:"col-cd6e1f84","row-cols-auto":"row-cols-auto-10031c9d","row-cols-1":"row-cols-1-7d80c687","row-cols-2":"row-cols-2-27408087","row-cols-3":"row-cols-3-bf01a3a7","row-cols-4":"row-cols-4-75107351","row-cols-5":"row-cols-5-3d1f27c1","row-cols-6":"row-cols-6-32314838","row-cols-7":"row-cols-7-db9d304b","row-cols-8":"row-cols-8-ca66b63a","row-cols-9":"row-cols-9-b2e86bb1","row-cols-10":"row-cols-10-0646afc6","row-cols-11":"row-cols-11-fd885c49","row-cols-12":"row-cols-12-6847f3c2","col-auto":"col-auto-bf286759","col-1":"col-1-baf27b12","col-2":"col-2-b8b9ac26","col-3":"col-3-ea8dfc45","col-4":"col-4-17be9e7a","col-5":"col-5-ce698fb8","col-6":"col-6-51cc8fd9","col-7":"col-7-e3e964f7","col-8":"col-8-eee3aeff","col-9":"col-9-301c1dba","col-10":"col-10-9831b79d","col-11":"col-11-9f606e30","col-12":"col-12-e1a26209","offset-1":"offset-1-a250fa50","offset-2":"offset-2-8a04c612","offset-3":"offset-3-d23a27e8","offset-4":"offset-4-48a65e09","offset-5":"offset-5-df442604","offset-6":"offset-6-871ed68a","offset-7":"offset-7-cb046049","offset-8":"offset-8-2bf18608","offset-9":"offset-9-d6db2076","offset-10":"offset-10-de802fe1","offset-11":"offset-11-4aaaca0a","g-0":"g-0-8734f1bf","gx-0":"gx-0-1a2c81ed","gy-0":"gy-0-2a822e68","g-1":"g-1-e88f5697","gx-1":"gx-1-39dbe62d","gy-1":"gy-1-12a1a1c2","g-2":"g-2-fc3a1913","gx-2":"gx-2-11bb23d4","gy-2":"gy-2-6f63d068","g-3":"g-3-c8a66e8e","gx-3":"gx-3-fc226364","gy-3":"gy-3-aaced222","g-4":"g-4-6e080ffd","gx-4":"gx-4-2355197b","gy-4":"gy-4-f3936c8e","g-5":"g-5-25447af1","gx-5":"gx-5-b5498442","gy-5":"gy-5-649de936","col-sm":"col-sm-c3d9c572","row-cols-sm-auto":"row-cols-sm-auto-3f407846","row-cols-sm-1":"row-cols-sm-1-c3430c90","row-cols-sm-2":"row-cols-sm-2-44d61b56","row-cols-sm-3":"row-cols-sm-3-19d8dea5","row-cols-sm-4":"row-cols-sm-4-6e0ec75e","row-cols-sm-5":"row-cols-sm-5-d119ef9e","row-cols-sm-6":"row-cols-sm-6-9f43275f","row-cols-sm-7":"row-cols-sm-7-e8677a1f","row-cols-sm-8":"row-cols-sm-8-b94475d6","row-cols-sm-9":"row-cols-sm-9-d303a99e","row-cols-sm-10":"row-cols-sm-10-ad9d5d79","row-cols-sm-11":"row-cols-sm-11-9ccd3933","row-cols-sm-12":"row-cols-sm-12-27c2602a","col-sm-auto":"col-sm-auto-4f221d67","col-sm-1":"col-sm-1-974807cd","col-sm-2":"col-sm-2-f4d53a6d","col-sm-3":"col-sm-3-46463ff4","col-sm-4":"col-sm-4-24cb546b","col-sm-5":"col-sm-5-7b4bb5c0","col-sm-6":"col-sm-6-bc620538","col-sm-7":"col-sm-7-95958ac0","col-sm-8":"col-sm-8-cea2f4e8","col-sm-9":"col-sm-9-bc69d70a","col-sm-10":"col-sm-10-43bd90ca","col-sm-11":"col-sm-11-c6cc2ce9","col-sm-12":"col-sm-12-d7c1aee5","offset-sm-0":"offset-sm-0-4eceb2a7","offset-sm-1":"offset-sm-1-ba79c818","offset-sm-2":"offset-sm-2-82d2aed8","offset-sm-3":"offset-sm-3-2d1082b9","offset-sm-4":"offset-sm-4-5c496d78","offset-sm-5":"offset-sm-5-705157b4","offset-sm-6":"offset-sm-6-09581f4c","offset-sm-7":"offset-sm-7-a99ef8c9","offset-sm-8":"offset-sm-8-799355f5","offset-sm-9":"offset-sm-9-74f59a82","offset-sm-10":"offset-sm-10-3dc47136","offset-sm-11":"offset-sm-11-24d7b007","g-sm-0":"g-sm-0-920d9e5f","gx-sm-0":"gx-sm-0-d03c8584","gy-sm-0":"gy-sm-0-c4317d84","g-sm-1":"g-sm-1-1e05cb5b","gx-sm-1":"gx-sm-1-a0d68d96","gy-sm-1":"gy-sm-1-826404fe","g-sm-2":"g-sm-2-2078609e","gx-sm-2":"gx-sm-2-93561452","gy-sm-2":"gy-sm-2-7d57f244","g-sm-3":"g-sm-3-2111b7a5","gx-sm-3":"gx-sm-3-16db0d99","gy-sm-3":"gy-sm-3-d7837519","g-sm-4":"g-sm-4-406a7e96","gx-sm-4":"gx-sm-4-7eec2ef3","gy-sm-4":"gy-sm-4-2a29a7e2","g-sm-5":"g-sm-5-5f8c47c1","gx-sm-5":"gx-sm-5-3e001cd5","gy-sm-5":"gy-sm-5-00130111","col-md":"col-md-fea187a3","row-cols-md-auto":"row-cols-md-auto-5e84fefe","row-cols-md-1":"row-cols-md-1-226936cb","row-cols-md-2":"row-cols-md-2-d88a8c2c","row-cols-md-3":"row-cols-md-3-97822e0e","row-cols-md-4":"row-cols-md-4-377a4111","row-cols-md-5":"row-cols-md-5-d22b6d27","row-cols-md-6":"row-cols-md-6-f6640b4c","row-cols-md-7":"row-cols-md-7-44ad69b8","row-cols-md-8":"row-cols-md-8-90d7f7d9","row-cols-md-9":"row-cols-md-9-ccca2512","row-cols-md-10":"row-cols-md-10-71f130f6","row-cols-md-11":"row-cols-md-11-c6f11a07","row-cols-md-12":"row-cols-md-12-f78bc497","col-md-auto":"col-md-auto-8519c212","col-md-1":"col-md-1-0c24264b","col-md-2":"col-md-2-51fdc90c","col-md-3":"col-md-3-77de11d8","col-md-4":"col-md-4-f09ba1a5","col-md-5":"col-md-5-ad616589","col-md-6":"col-md-6-97888366","col-md-7":"col-md-7-939d55e1","col-md-8":"col-md-8-7b976029","col-md-9":"col-md-9-e2f677f5","col-md-10":"col-md-10-f6aad573","col-md-11":"col-md-11-fda132f9","col-md-12":"col-md-12-57729e8f","offset-md-0":"offset-md-0-1fd5226d","offset-md-1":"offset-md-1-2c6b9ad1","offset-md-2":"offset-md-2-6a2c7885","offset-md-3":"offset-md-3-68dd996f","offset-md-4":"offset-md-4-1e21f359","offset-md-5":"offset-md-5-5aa616bf","offset-md-6":"offset-md-6-56614d1c","offset-md-7":"offset-md-7-21783319","offset-md-8":"offset-md-8-1687ac8c","offset-md-9":"offset-md-9-156f947d","offset-md-10":"offset-md-10-7c3eb782","offset-md-11":"offset-md-11-41248eea","g-md-0":"g-md-0-47199f5f","gx-md-0":"gx-md-0-6a848d7a","gy-md-0":"gy-md-0-1b3e6678","g-md-1":"g-md-1-4704c9ad","gx-md-1":"gx-md-1-afdae302","gy-md-1":"gy-md-1-56c38d0d","g-md-2":"g-md-2-6c179160","gx-md-2":"gx-md-2-980e4354","gy-md-2":"gy-md-2-ec6c7cfb","g-md-3":"g-md-3-0f64036e","gx-md-3":"gx-md-3-829daccb","gy-md-3":"gy-md-3-c679bbeb","g-md-4":"g-md-4-0221ba4c","gx-md-4":"gx-md-4-d67e8e91","gy-md-4":"gy-md-4-93539811","g-md-5":"g-md-5-b5d6696f","gx-md-5":"gx-md-5-751d52ca","gy-md-5":"gy-md-5-fc1d9ef2","col-lg":"col-lg-c09f26de","row-cols-lg-auto":"row-cols-lg-auto-b2c1c5e0","row-cols-lg-1":"row-cols-lg-1-5ecdc811","row-cols-lg-2":"row-cols-lg-2-c2734713","row-cols-lg-3":"row-cols-lg-3-23f298f3","row-cols-lg-4":"row-cols-lg-4-8bb91a29","row-cols-lg-5":"row-cols-lg-5-9b9b130d","row-cols-lg-6":"row-cols-lg-6-b7c17d22","row-cols-lg-7":"row-cols-lg-7-a1f3cdb2","row-cols-lg-8":"row-cols-lg-8-3db4bd1f","row-cols-lg-9":"row-cols-lg-9-fb9c7d34","row-cols-lg-10":"row-cols-lg-10-b63afbd3","row-cols-lg-11":"row-cols-lg-11-34401193","row-cols-lg-12":"row-cols-lg-12-5c19da21","col-lg-auto":"col-lg-auto-2da6534a","col-lg-1":"col-lg-1-7558449c","col-lg-2":"col-lg-2-5691f3d4","col-lg-3":"col-lg-3-d8179897","col-lg-4":"col-lg-4-fa1d73b6","col-lg-5":"col-lg-5-89cb48f8","col-lg-6":"col-lg-6-c9943234","col-lg-7":"col-lg-7-05ecf3d7","col-lg-8":"col-lg-8-fa794cb3","col-lg-9":"col-lg-9-a04223a0","col-lg-10":"col-lg-10-598125df","col-lg-11":"col-lg-11-3c8004e7","col-lg-12":"col-lg-12-f1ee69af","offset-lg-0":"offset-lg-0-b360aa0d","offset-lg-1":"offset-lg-1-cdd3aefa","offset-lg-2":"offset-lg-2-2bf6798a","offset-lg-3":"offset-lg-3-2dac7fec","offset-lg-4":"offset-lg-4-bc74fccc","offset-lg-5":"offset-lg-5-d5474488","offset-lg-6":"offset-lg-6-1ae5cc2b","offset-lg-7":"offset-lg-7-1009d6ac","offset-lg-8":"offset-lg-8-1b06392a","offset-lg-9":"offset-lg-9-bcefa843","offset-lg-10":"offset-lg-10-ac580daa","offset-lg-11":"offset-lg-11-0076cfdc","g-lg-0":"g-lg-0-faa5be91","gx-lg-0":"gx-lg-0-20b5a7dd","gy-lg-0":"gy-lg-0-1683a0f3","g-lg-1":"g-lg-1-70baa1ca","gx-lg-1":"gx-lg-1-12cb9c13","gy-lg-1":"gy-lg-1-8711b35a","g-lg-2":"g-lg-2-559df62f","gx-lg-2":"gx-lg-2-7a17c849","gy-lg-2":"gy-lg-2-b8f4a225","g-lg-3":"g-lg-3-6162425d","gx-lg-3":"gx-lg-3-80f94947","gy-lg-3":"gy-lg-3-0eefd6c7","g-lg-4":"g-lg-4-43bc39c7","gx-lg-4":"gx-lg-4-252e1927","gy-lg-4":"gy-lg-4-568bb6f4","g-lg-5":"g-lg-5-6bbf0779","gx-lg-5":"gx-lg-5-97f89eb1","gy-lg-5":"gy-lg-5-e33a7166","col-xl":"col-xl-63c1779f","row-cols-xl-auto":"row-cols-xl-auto-a3e7ecbe","row-cols-xl-1":"row-cols-xl-1-043e1b34","row-cols-xl-2":"row-cols-xl-2-b52a3005","row-cols-xl-3":"row-cols-xl-3-dcdc0809","row-cols-xl-4":"row-cols-xl-4-229bbe05","row-cols-xl-5":"row-cols-xl-5-5dd21795","row-cols-xl-6":"row-cols-xl-6-648aa84f","row-cols-xl-7":"row-cols-xl-7-deb3b93b","row-cols-xl-8":"row-cols-xl-8-57e1ebee","row-cols-xl-9":"row-cols-xl-9-95f4d086","row-cols-xl-10":"row-cols-xl-10-2bd6dbfb","row-cols-xl-11":"row-cols-xl-11-6053c0d7","row-cols-xl-12":"row-cols-xl-12-514a43ec","col-xl-auto":"col-xl-auto-752ecda8","col-xl-1":"col-xl-1-3e4b0edf","col-xl-2":"col-xl-2-db43c6dd","col-xl-3":"col-xl-3-b00c63db","col-xl-4":"col-xl-4-ea7bd3c4","col-xl-5":"col-xl-5-c162dae0","col-xl-6":"col-xl-6-007a55b7","col-xl-7":"col-xl-7-0ad2b119","col-xl-8":"col-xl-8-5667fc23","col-xl-9":"col-xl-9-aed66094","col-xl-10":"col-xl-10-dc750708","col-xl-11":"col-xl-11-76282d04","col-xl-12":"col-xl-12-22aceaa7","offset-xl-0":"offset-xl-0-d9322cf6","offset-xl-1":"offset-xl-1-30a9f4f2","offset-xl-2":"offset-xl-2-414dae8c","offset-xl-3":"offset-xl-3-5dcb3fce","offset-xl-4":"offset-xl-4-8ad4ef00","offset-xl-5":"offset-xl-5-42dc40d7","offset-xl-6":"offset-xl-6-3ac0d6ab","offset-xl-7":"offset-xl-7-5c9d2080","offset-xl-8":"offset-xl-8-e07fdd88","offset-xl-9":"offset-xl-9-1e8b9e1b","offset-xl-10":"offset-xl-10-bdb00fc1","offset-xl-11":"offset-xl-11-5ee7899e","g-xl-0":"g-xl-0-86ad25cb","gx-xl-0":"gx-xl-0-b0afdfd6","gy-xl-0":"gy-xl-0-4ac246f0","g-xl-1":"g-xl-1-ddb0f97c","gx-xl-1":"gx-xl-1-fbf09646","gy-xl-1":"gy-xl-1-3a224966","g-xl-2":"g-xl-2-0a954d71","gx-xl-2":"gx-xl-2-21473261","gy-xl-2":"gy-xl-2-0b76c8d2","g-xl-3":"g-xl-3-814a94fc","gx-xl-3":"gx-xl-3-186bfdb0","gy-xl-3":"gy-xl-3-a583066b","g-xl-4":"g-xl-4-2ef930f2","gx-xl-4":"gx-xl-4-f343db67","gy-xl-4":"gy-xl-4-6a8df78c","g-xl-5":"g-xl-5-eda9825c","gx-xl-5":"gx-xl-5-7522742b","gy-xl-5":"gy-xl-5-b49c8dad","col-xxl":"col-xxl-c4b208ba","row-cols-xxl-auto":"row-cols-xxl-auto-76e441ac","row-cols-xxl-1":"row-cols-xxl-1-479ae3fb","row-cols-xxl-2":"row-cols-xxl-2-2d46e446","row-cols-xxl-3":"row-cols-xxl-3-a80fc170","row-cols-xxl-4":"row-cols-xxl-4-c5a631d5","row-cols-xxl-5":"row-cols-xxl-5-eba44039","row-cols-xxl-6":"row-cols-xxl-6-ddca1c6c","row-cols-xxl-7":"row-cols-xxl-7-c76dc001","row-cols-xxl-8":"row-cols-xxl-8-bde0c178","row-cols-xxl-9":"row-cols-xxl-9-775bea5c","row-cols-xxl-10":"row-cols-xxl-10-8bac3178","row-cols-xxl-11":"row-cols-xxl-11-9f7a01bd","row-cols-xxl-12":"row-cols-xxl-12-9a32626e","col-xxl-auto":"col-xxl-auto-98dcf6ab","col-xxl-1":"col-xxl-1-5f2d3ea0","col-xxl-2":"col-xxl-2-61b8e6f0","col-xxl-3":"col-xxl-3-f3e88d73","col-xxl-4":"col-xxl-4-ad508d83","col-xxl-5":"col-xxl-5-9483aca2","col-xxl-6":"col-xxl-6-630b7d63","col-xxl-7":"col-xxl-7-5ac47555","col-xxl-8":"col-xxl-8-8b96dcd2","col-xxl-9":"col-xxl-9-dd7121cb","col-xxl-10":"col-xxl-10-457f84c1","col-xxl-11":"col-xxl-11-26f414ce","col-xxl-12":"col-xxl-12-9ff49610","offset-xxl-0":"offset-xxl-0-5524acff","offset-xxl-1":"offset-xxl-1-b4c28b3a","offset-xxl-2":"offset-xxl-2-207b226e","offset-xxl-3":"offset-xxl-3-ece30e17","offset-xxl-4":"offset-xxl-4-375dbe2b","offset-xxl-5":"offset-xxl-5-52862a88","offset-xxl-6":"offset-xxl-6-7e79bac2","offset-xxl-7":"offset-xxl-7-f01dee63","offset-xxl-8":"offset-xxl-8-d387538b","offset-xxl-9":"offset-xxl-9-8fb71acb","offset-xxl-10":"offset-xxl-10-41356743","offset-xxl-11":"offset-xxl-11-9041337f","g-xxl-0":"g-xxl-0-1294d122","gx-xxl-0":"gx-xxl-0-83ee0f3a","gy-xxl-0":"gy-xxl-0-da0669cc","g-xxl-1":"g-xxl-1-0e1c0eeb","gx-xxl-1":"gx-xxl-1-7e7017ce","gy-xxl-1":"gy-xxl-1-1e385b8f","g-xxl-2":"g-xxl-2-d4c659fb","gx-xxl-2":"gx-xxl-2-9955e7ab","gy-xxl-2":"gy-xxl-2-8b566487","g-xxl-3":"g-xxl-3-59cf8596","gx-xxl-3":"gx-xxl-3-29861cc6","gy-xxl-3":"gy-xxl-3-ba57586b","g-xxl-4":"g-xxl-4-b87b5bfa","gx-xxl-4":"gx-xxl-4-088b4769","gy-xxl-4":"gy-xxl-4-4ab3d74f","g-xxl-5":"g-xxl-5-39c36d0d","gx-xxl-5":"gx-xxl-5-fc758c99","gy-xxl-5":"gy-xxl-5-d2577bd5"},NY=B.createContext({element:"div"}),PY=e=>{const{children:t,className:n,element:r="div",cols:o,alignItems:i,justifyContent:a,gap:s,gutter:l,gutterY:c,gutterX:u,wrap:d,direction:p,xs:f,sm:h,md:m,lg:g,xl:v,xxl:b,...y}=e,x=(e,t="")=>{const{cols:n,justifyContent:r,alignItems:o,gap:i,direction:a,wrap:s,gutter:l,gutterX:c,gutterY:u}=e;return ua(AY.row,{[AY[`row-cols${t}-${n}`]]:n},{[AY[`justify-content${t}-${r}`]]:r},{[AY[`align-items${t}-${o}`]]:o},{[AY[`gap${t}-${i}`]]:i||0===i},{[AY[`g${t}-${l}`]]:l||0===l},{[AY[`gx${t}-${c}`]]:c||0===c},{[AY[`gy${t}-${u}`]]:u||0===u},{[`flex${t}-${a}`]:a},{[AY[`flex${t}-${s}`]]:s})};return(0,cn.jsx)(NY.Provider,{value:{element:r},children:(0,cn.jsx)(r,{"data-name":"row",...y,className:(()=>{const e={xs:f,sm:h,md:m,lg:g,xl:v,xxl:b},t=jY.map((t=>{const n=e[t],r="xs"!==t?`-${t}`:"";return n?x("object"==typeof n?{...n}:{cols:n},r):void 0}));return ua(...t,n,x({cols:o,justifyContent:a,alignItems:i,gap:s,direction:p,wrap:d,gutter:l,gutterX:u,gutterY:c}))})(),children:t})})},RY=e=>{const{className:t,children:n,element:r,width:o,offset:i,order:a,align:s,grow:l,shrink:c,onClick:u,xs:d,sm:p,md:f,lg:h,xl:m,xxl:g,...v}=e,{element:b}=B.useContext(NY);let y;if(r)y=r;else switch(b){case"ol":case"ul":y="li";break;case"span":y="span";break;default:y="div"}const x=(e,t="")=>{const{align:n,offset:r,order:o,width:i,grow:a,shrink:s}=e;return ua(AY.col,{[AY[`align-self${t}-${n}`]]:n},{[AY[`offset${t}-${r}`]]:r},{[AY[`order${t}-${o}`]]:o},{[AY[`col${t}-${i}`]]:i},{[AY[`flex${t}-grow-${a}`]]:a},{[AY[`flex${t}-shrink-${s}`]]:s})};return(0,cn.jsx)(y,{"data-name":"col",...v,className:(()=>{const e={xs:d,sm:p,md:f,lg:h,xl:m,xxl:g},n=jY.map((t=>{const n=e[t],r="xs"!==t?`-${t}`:"";return n?x("object"==typeof n?{...n}:{width:n},r):void 0}));return ua(...n,t,x({width:o,offset:i,order:a,align:s,grow:l,shrink:c}))})(),onClick:u,children:n})},LY="tedi-vertical-spacing-d50ee3bb",FY="tedi-vertical-spacing__item-659eac37",UY=e=>{const{getCurrentBreakpointProps:t}=cY(),{children:n,className:r,element:o="div",size:i=1,...a}=t(e),s=ua(FY,r);return(0,cn.jsx)(o,{"data-name":"vertical-spacing-item",...a,style:{"--vertical-spacing-internal":`${i}${0!==i?"em":""}`},className:s,children:n})},BY=e=>{const{getCurrentBreakpointProps:t}=cY(),{children:n,className:r,element:o="div",size:i=1,...a}=t(e),s=ua(LY,r);return(0,cn.jsx)(o,{"data-name":"vertical-spacing",role:"presentation",...a,className:s,style:{"--vertical-spacing-internal":0!==i?`${i}em`:"0"},children:n})};BY.Item=UY;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")||CSS.supports("position","-webkit-sticky"));try{const e=Object.defineProperty({},"passive",{get(){0}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}const zY={"tedi-icon__wrapper--block":"tedi-icon__wrapper--block-84b65dac","tedi-icon__wrapper--bg":"tedi-icon__wrapper--bg-15a5c517","tedi-icon__wrapper--inline":"tedi-icon__wrapper--inline-b913d0b7","tedi-icon__wrapper":"tedi-icon__wrapper-badb5ee8","tedi-icon__wrapper--bg-primary":"tedi-icon__wrapper--bg-primary-3e92e033","tedi-icon__wrapper--bg-secondary":"tedi-icon__wrapper--bg-secondary-65546969","tedi-icon__wrapper--bg-brand-primary":"tedi-icon__wrapper--bg-brand-primary-2b6c7e80","tedi-icon__wrapper--bg-brand-secondary":"tedi-icon__wrapper--bg-brand-secondary-625694f1","tedi-icon__wrapper--size-8":"tedi-icon__wrapper--size-8-f790ed19","tedi-icon__wrapper--size-12":"tedi-icon__wrapper--size-12-dbac5998","tedi-icon__wrapper--size-16":"tedi-icon__wrapper--size-16-4c8f1b90","tedi-icon__wrapper--size-18":"tedi-icon__wrapper--size-18-4040c03c","tedi-icon__wrapper--size-24":"tedi-icon__wrapper--size-24-e0d21fd2","tedi-icon__wrapper--size-36":"tedi-icon__wrapper--size-36-61c39567","tedi-icon__wrapper--size-48":"tedi-icon__wrapper--size-48-ef5a1039","tedi-icon":"tedi-icon-5e43a482","tedi-icon--block":"tedi-icon--block-4fffe6c4","tedi-icon--inline":"tedi-icon--inline-8a029a16","tedi-icon--color-primary":"tedi-icon--color-primary-a910b220","tedi-icon--color-secondary":"tedi-icon--color-secondary-ced065cc","tedi-icon--color-tertiary":"tedi-icon--color-tertiary-1cc87e4e","tedi-icon--color-brand":"tedi-icon--color-brand-12b2b987","tedi-icon--color-brand-dark":"tedi-icon--color-brand-dark-b243b144","tedi-icon--color-success":"tedi-icon--color-success-f93b4c73","tedi-icon--color-warning":"tedi-icon--color-warning-8cac499e","tedi-icon--color-warning-dark":"tedi-icon--color-warning-dark-658fd336","tedi-icon--color-danger":"tedi-icon--color-danger-be4e496d","tedi-icon--color-white":"tedi-icon--color-white-31ecb833","tedi-icon--size-8":"tedi-icon--size-8-8a607b2b","tedi-icon--size-12":"tedi-icon--size-12-50b97abb","tedi-icon--size-16":"tedi-icon--size-16-b8891263","tedi-icon--size-18":"tedi-icon--size-18-d63ed928","tedi-icon--size-24":"tedi-icon--size-24-a0a23d76","tedi-icon--size-36":"tedi-icon--size-36-bd05029b","tedi-icon--size-48":"tedi-icon--size-48-c12365d4","tedi-icon--filled":"tedi-icon--filled-bdf1bfde"},KY=(0,B.forwardRef)(((e,t)=>{const{className:n,name:r,type:o="outlined",size:i=24,filled:a,display:s="block",color:l="primary",background:c,label:u,...d}=e,p=ua(zY["tedi-icon__wrapper"],{[zY["tedi-icon__wrapper--bg"]]:c,[zY[`tedi-icon__wrapper--bg-${c}`]]:c,[zY[`tedi-icon__wrapper--size-${i}`]]:i,[zY["tedi-icon__wrapper--block"]]:c},c&&n),f=ua("notranslate","material-symbols",o&&[`material-symbols--${o}`],zY["tedi-icon"],l&&zY[`tedi-icon--color-${l}`],i&&zY[`tedi-icon--size-${i}`],s&&zY[`tedi-icon--${s}`],a&&zY["tedi-icon--filled"],!c&&n),h=(0,cn.jsx)("span",{ref:c?null:t,className:f,"data-name":"icon",role:"img","aria-label":u,"aria-hidden":!u,...d,children:r});return c?(0,cn.jsx)("div",{className:p,ref:t,children:h}):h}));KY.displayName="Icon";const $Y={"tedi-closing-button":"tedi-closing-button-358111e2","tedi-closing-button--medium":"tedi-closing-button--medium-b18535a5","tedi-closing-button--large":"tedi-closing-button--large-52d00b8a"},VY=e=>{const{getLabel:t}=IY(),{title:n=t("close"),onClick:r,size:o="medium",className:i,...a}=e,s=ua($Y["tedi-closing-button"],{[$Y[`tedi-closing-button--${o}`]]:o},i);return(0,cn.jsx)("button",{"data-name":"closing-button",type:"button",...a,className:s,onClick:r,title:n,"aria-label":n,children:(0,cn.jsx)(KY,{name:"close",size:"large"===o?24:18})})},HY=e=>{const{getCurrentBreakpointProps:t}=cY(),{children:n,className:r,tabIndex:o=(e.id?-1:void 0),element:i="p",modifiers:a,color:s,...l}=t(e),c="string"==typeof a?[a]:a,u=ua(r,null==c?void 0:c.map((e=>(e=>/^h[1-6]$/.test(e))(e)?`tedi-text--${e}`:`text-${e}`)),{[`tedi-text--${s}`]:s});return(0,cn.jsx)(i,{className:u,...l,tabIndex:o,children:n})},WY=e=>{const{children:t,element:n="h1",...r}=e;return(0,cn.jsx)(HY,{element:n,...r,children:t})},YY={"tedi-alert":"tedi-alert-8ca3e7b9","tedi-alert__content":"tedi-alert__content-d480ed20","tedi-alert--info":"tedi-alert--info-bcd40044","tedi-alert--success":"tedi-alert--success-e6d21f49","tedi-alert--warning":"tedi-alert--warning-88456526","tedi-alert--danger":"tedi-alert--danger-b9a2aa60","tedi-alert--global":"tedi-alert--global-14ff86d0","tedi-alert--no-side-borders":"tedi-alert--no-side-borders-a15a1df0"},qY=e=>{const{getCurrentBreakpointProps:t}=cY(),{children:n,role:r="alert",title:o,className:i,type:a="info",icon:s,onClose:l,isGlobal:c=!1,noSideBorders:u=!1,...d}=t(e),p=ua(YY["tedi-alert"],YY[`tedi-alert--${a}`],{[YY["tedi-alert--global"]]:c,[YY["tedi-alert--no-side-borders"]]:u},i);return iY()?(0,cn.jsx)("div",{role:r,"data-name":"alert","aria-live":"alert"===r?"assertive":"status"===r?"polite":"off","aria-label":o?`${a} alert: ${o}`:`${a} alert`,...d,className:p,children:(0,cn.jsxs)(BY,{size:.25,children:[(0,cn.jsxs)(PY,{gutterX:2,alignItems:o?"center":"start",children:[(0,cn.jsxs)(RY,{grow:1,className:YY["tedi-alert__content"],children:[s&&(e=>{const t={size:18},n="string"==typeof e?{...t,name:e}:{...t,...e};return(0,cn.jsx)(KY,{...n})})(s),(0,cn.jsx)("div",{className:"tedi-alert__content-wrapper",children:o?(0,cn.jsx)(WY,{element:"h5",children:o}):n})]}),l&&(0,cn.jsx)(RY,{width:"auto",children:(0,cn.jsx)(VY,{onClick:l,"aria-label":"Close alert"})})]}),o&&n&&(0,cn.jsx)("div",{className:"tedi-alert__content-wrapper",children:n})]})}):null},GY={"tedi-list":"tedi-list-8b8734e5","tedi-list__item":"tedi-list__item-690b6177","tedi-list--unordered":"tedi-list--unordered-4814ca56","tedi-list--ordered":"tedi-list--ordered-42823516","tedi-list--style-none":"tedi-list--style-none-ea0ea747"},JY=e=>{const{getCurrentBreakpointProps:t}=cY(),{children:n,verticalSpacingItem:r,className:o}=t(e),i=ua(GY["tedi-list__item"],null==r?void 0:r.className,o);return e.verticalSpacingItem?(0,cn.jsx)(UY,{...r,element:"li",className:i,children:n}):(0,cn.jsx)("li",{className:i,children:n})},XY=e=>{const{getCurrentBreakpointProps:t}=cY(),{children:n,element:r="ul",style:o="none",verticalSpacing:i,className:a}=t(e),s=ua(GY["tedi-list"],GY["tedi-list--"+("ul"===r?"unordered":"ordered")],GY[`tedi-list--style-${o}`],null==i?void 0:i.className,a),l=r;return i?(0,cn.jsx)(BY,{...i,element:r,className:s,children:n}):(0,cn.jsx)(l,{className:s,role:"list",children:n})};XY.Item=JY;const ZY={"tedi-scroll-fade":"tedi-scroll-fade-b191bb5d","tedi-scroll-fade__inner":"tedi-scroll-fade__inner-471f0c95","tedi-scroll-fade__inner--custom-scroll":"tedi-scroll-fade__inner--custom-scroll-21de74f1","tedi-scroll-fade--top-0":"tedi-scroll-fade--top-0-d1f51de2","tedi-scroll-fade--bottom-0":"tedi-scroll-fade--bottom-0-ddf77ba5","tedi-scroll-fade--top-10":"tedi-scroll-fade--top-10-f29d73e5","tedi-scroll-fade--bottom-10":"tedi-scroll-fade--bottom-10-106a0fa8","tedi-scroll-fade--top-20":"tedi-scroll-fade--top-20-1452e05f","tedi-scroll-fade--bottom-20":"tedi-scroll-fade--bottom-20-d0f98988"},QY=(0,B.forwardRef)(((e,t)=>{const{children:n,className:r,scrollBar:o="custom",onScrollToBottom:i,onScrollToTop:a,fadeSize:s=20,fadePosition:l="both"}=e,[c,u]=(0,B.useState)({top:!1,bottom:!1}),d=(0,B.useCallback)(((e,t,n)=>{const r=0===e,o=Math.abs(t-e-n)<=1;let s=!0,l=!0;r&&(s=!1,null==a||a()),o&&(l=!1,null==i||i()),u({top:s,bottom:l})}),[a,i]),p=(0,B.useCallback)((e=>{const{scrollTop:t,scrollHeight:n,clientHeight:r}=e.target;d(t,n,r)}),[d]),f=(0,B.useCallback)((e=>{"function"==typeof t?t(e):t&&(t.current=e),e&&d(e.scrollTop,e.scrollHeight,e.clientHeight)}),[d,t]),h=ua(ZY["tedi-scroll-fade"],{[ZY[`tedi-scroll-fade--top-${s}`]]:c.top&&("both"===l||"top"===l)},{[ZY[`tedi-scroll-fade--bottom-${s}`]]:c.bottom&&("both"===l||"bottom"===l)},r),m=ua(ZY["tedi-scroll-fade__inner"],{[ZY["tedi-scroll-fade__inner--custom-scroll"]]:"custom"===o});return(0,cn.jsx)("div",{"data-name":"scroll-fade",className:h,children:(0,cn.jsx)("div",{ref:f,onScroll:p,className:m,tabIndex:0,children:n})})}));QY.displayName="ScrollFade";const eq=B.createContext(null),tq="tedi-skeleton-179067bd",nq={"tedi-skeleton-block":"tedi-skeleton-block-f43ac201","wave-lines":"wave-lines-f21ce98d","tedi-skeleton-block--h1":"tedi-skeleton-block--h1-ab1b9890","tedi-skeleton-block--h2":"tedi-skeleton-block--h2-0a2b6b1d","tedi-skeleton-block--h3":"tedi-skeleton-block--h3-e123fc56","tedi-skeleton-block--h4":"tedi-skeleton-block--h4-c3582b5f","tedi-skeleton-block--h5":"tedi-skeleton-block--h5-7cb69f4e","tedi-skeleton-block--h6":"tedi-skeleton-block--h6-8bc441b3","tedi-skeleton-block--p":"tedi-skeleton-block--p-856df5b5"},rq=e=>{const{getCurrentBreakpointProps:t}=cY(),{width:n="auto",height:r="p",className:o,style:i}=t(e);let a;a="number"==typeof n?`${n}%`:"string"==typeof n&&n.endsWith("px")?n:"auto"===n?"auto":`${n}%`;const s={width:a,..."number"==typeof r?{height:`${r}px`}:{}},l="string"==typeof r?nq[`tedi-skeleton-block--${r}`]:null;return(0,cn.jsx)("span",{className:ua(nq["tedi-skeleton-block"],l,o),style:{...s,...i}})};(e=>{const{getLabel:t}=IY(),{children:n,className:r,label:o=t("skeleton.loading"),completedLabel:i=t("skeleton.loading-completed"),labelDelay:a=1e3,...s}=e,l=ua(tq,r);return((e,t,n)=>{const r=B.useContext(eq),o=B.useRef(),i=B.useRef(),a=B.useId();r||console.error("AccessibilityContext does not exist"),B.useEffect((()=>{o.current=null==r?void 0:r.addLoader,i.current=null==r?void 0:r.removeLoader}),[null==r?void 0:r.addLoader,null==r?void 0:r.removeLoader]),B.useEffect((()=>{if(r&&e&&t){const r=setTimeout((()=>{var n;null==(n=o.current)||n.call(o,{id:a,mountLabel:e,unmountLabel:t})}),n);return()=>{var e;clearTimeout(r),null==(e=i.current)||e.call(i,a)}}}),[])})(o,i,a),(0,cn.jsxs)("div",{"data-name":"skeleton",...s,className:l,children:[(0,cn.jsx)("span",{className:"sr-only","aria-live":"polite",children:o}),n]})}).Block=rq;const oq={"tedi-separator":"tedi-separator-a5979a71","tedi-separator--vertical":"tedi-separator--vertical-0853c43d","tedi-separator--secondary":"tedi-separator--secondary-91c3c312","tedi-separator--accent":"tedi-separator--accent-5fd4897d","tedi-separator--block":"tedi-separator--block-95719832","tedi-separator--inline":"tedi-separator--inline-6b61325d","tedi-separator--dotted":"tedi-separator--dotted-2a7f590d","tedi-separator--dotted-small":"tedi-separator--dotted-small-60cb5232","tedi-separator--is-stretched":"tedi-separator--is-stretched-0e279ba9","tedi-separator--horizontal":"tedi-separator--horizontal-7b44d746","tedi-separator--top-0":"tedi-separator--top-0-ea0da118","tedi-separator--bottom-0":"tedi-separator--bottom-0-9dd11446","tedi-separator--spacing-0":"tedi-separator--spacing-0-835407b1","tedi-separator--dot-only":"tedi-separator--dot-only-00101210","tedi-separator--top-0-25":"tedi-separator--top-0-25-180c4662","tedi-separator--bottom-0-25":"tedi-separator--bottom-0-25-f8604a94","tedi-separator--spacing-0-25":"tedi-separator--spacing-0-25-928e169c","tedi-separator--top-0-5":"tedi-separator--top-0-5-4644b4b5","tedi-separator--bottom-0-5":"tedi-separator--bottom-0-5-4b3b19f3","tedi-separator--spacing-0-5":"tedi-separator--spacing-0-5-f97152a3","tedi-separator--top-0-75":"tedi-separator--top-0-75-101f64aa","tedi-separator--bottom-0-75":"tedi-separator--bottom-0-75-c79a9c1a","tedi-separator--spacing-0-75":"tedi-separator--spacing-0-75-57965d40","tedi-separator--top-1":"tedi-separator--top-1-d63fee78","tedi-separator--bottom-1":"tedi-separator--bottom-1-8d9508b7","tedi-separator--spacing-1":"tedi-separator--spacing-1-514eab31","tedi-separator--top-1-25":"tedi-separator--top-1-25-c0c9ffa2","tedi-separator--bottom-1-25":"tedi-separator--bottom-1-25-4b5dd8e4","tedi-separator--spacing-1-25":"tedi-separator--spacing-1-25-ccced91a","tedi-separator--top-1-5":"tedi-separator--top-1-5-aecdfccd","tedi-separator--bottom-1-5":"tedi-separator--bottom-1-5-21cf570f","tedi-separator--spacing-1-5":"tedi-separator--spacing-1-5-0b3b687b","tedi-separator--top-1-75":"tedi-separator--top-1-75-e0ddaba4","tedi-separator--bottom-1-75":"tedi-separator--bottom-1-75-31265ec5","tedi-separator--spacing-1-75":"tedi-separator--spacing-1-75-68e10789","tedi-separator--top-2":"tedi-separator--top-2-88e6a47a","tedi-separator--bottom-2":"tedi-separator--bottom-2-030312fe","tedi-separator--spacing-2":"tedi-separator--spacing-2-0bce81df","tedi-separator--top-2-5":"tedi-separator--top-2-5-3e558a6d","tedi-separator--bottom-2-5":"tedi-separator--bottom-2-5-d60bac34","tedi-separator--spacing-2-5":"tedi-separator--spacing-2-5-2a7f10de","tedi-separator--top-5":"tedi-separator--top-5-b8b5f754","tedi-separator--bottom-5":"tedi-separator--bottom-5-47674f1a","tedi-separator--spacing-5":"tedi-separator--spacing-5-c044fc71","tedi-separator--thickness-1":"tedi-separator--thickness-1-5df0008a","tedi-separator--thickness-2":"tedi-separator--thickness-2-ec7cde4b","tedi-separator--dot-only-extra-small":"tedi-separator--dot-only-extra-small-c11b684f","tedi-separator--dot-only-small":"tedi-separator--dot-only-small-4acafc07","tedi-separator--dot-only-medium":"tedi-separator--dot-only-medium-e9eed3d2","tedi-separator--dot-only-large":"tedi-separator--dot-only-large-eb331bcf","tedi-separator--primary":"tedi-separator--primary-8e6f2eed"},iq=e=>{const{getCurrentBreakpointProps:t}=cY(),{className:n,element:r="div",isStretched:o,spacing:i,topSpacing:a,bottomSpacing:s,axis:l="horizontal",color:c="default",variant:u,thickness:d=1,height:p,dotSize:f,display:h="block",...m}=t(e),g=ua(oq["tedi-separator"],n,{[oq[`tedi-separator--${c}`]]:c},{[oq[`tedi-separator--${l}`]]:l},{[oq[`tedi-separator--${u}`]]:u},{[oq[`tedi-separator--${h}`]]:h},{[oq[`tedi-separator--${u}-${f}`]]:u&&f},{[oq[`tedi-separator--thickness-${d}`]]:d&&!u},{[oq["tedi-separator--is-stretched"]]:o},{[oq[`tedi-separator--spacing-${i}`.replace(".","-")]]:i},{[oq[`tedi-separator--top-${a}`.replace(".","-")]]:!i&&a},{[oq[`tedi-separator--bottom-${s}`.replace(".","-")]]:!i&&s});return(0,cn.jsx)(r,{"data-name":"separator",...m,style:(()=>{const e={};return p&&(e["--vertical-separator-height"]=`${p}rem`),e})(),className:g})},aq={"tedi-feedback-text":"tedi-feedback-text-832e790c","tedi-feedback-text--valid":"tedi-feedback-text--valid-406b61a2","tedi-feedback-text--error":"tedi-feedback-text--error-06f6742d","tedi-feedback-text--left":"tedi-feedback-text--left-7591cb38","tedi-feedback-text--right":"tedi-feedback-text--right-df4a0ff5"},sq=e=>{const{text:t,id:n,className:r,type:o="hint",position:i="left",...a}=e,s="valid"===o||"error"===o?"alert":void 0,l="error"===o||"valid"===o?"assertive":"polite";return(0,cn.jsx)("div",{"data-name":"feedback-text",...a,id:n,className:ua(aq["tedi-feedback-text"],aq[`tedi-feedback-text--${o}`],aq[`tedi-feedback-text--${i}`],r),role:s,"aria-live":l,children:t})},lq={"tedi-btn":"tedi-btn-f8b478d7","tedi-btn--small":"tedi-btn--small-e94b9068","tedi-btn--icon-only":"tedi-btn--icon-only-ca6a5cf1","tedi-btn--large":"tedi-btn--large-7e783e1a","tedi-btn--neutral":"tedi-btn--neutral-c8726f60","tedi-btn--default":"tedi-btn--default-9fd10888","tedi-btn--danger":"tedi-btn--danger-9c01f2b8","tedi-btn__text":"tedi-btn__text-a9860fef","tedi-btn--primary":"tedi-btn--primary-8ae5fe2e","tedi-btn--is-active":"tedi-btn--is-active-a575ad1a","tedi-btn--is-hovered":"tedi-btn--is-hovered-5b87ccb5","tedi-btn--secondary":"tedi-btn--secondary-770ac807","tedi-btn--success":"tedi-btn--success-92db7606","tedi-btn--inverted":"tedi-btn--inverted-fd168601","tedi-btn--link":"tedi-btn--link-33d9c4c6","tedi-btn--text-color":"tedi-btn--text-color-f85da3c7","tedi-btn__icon--left":"tedi-btn__icon--left-63fdbc12","tedi-btn__icon--right":"tedi-btn__icon--right-67cbf204","tedi-btn--is-loading":"tedi-btn--is-loading-4ead0e89","tedi-btn--icon":"tedi-btn--icon-dbc3eb30","tedi-btn__icon":"tedi-btn__icon-cffac719","tedi-btn__inner":"tedi-btn__inner-ee6403e9","tedi-btn__spinner":"tedi-btn__spinner-abd3f027","tedi-btn--underline":"tedi-btn--underline-bf1600fb","tedi-btn--no-style":"tedi-btn--no-style-f6dfaa4d","tedi-btn--full-width":"tedi-btn--full-width-f1e5f1b3"},cq=(0,B.forwardRef)((({children:e,as:t,text:n,className:r,visualType:o="primary",color:i="default",size:a,icon:s,iconLeft:l,iconRight:c,underline:u=!1,isHovered:d,isActive:p,isLoading:f=!1,noStyle:h,renderWrapperElement:m,fullWidth:g,onClick:v,...b},y)=>{const x=t||"button",w=s||l||c,S=h?ua(lq["tedi-btn--no-style"],{[lq["tedi-btn--full-width"]]:g},r):ua(lq["tedi-btn"],lq[`tedi-btn--${o}`],lq[`tedi-btn--${i}`],{[lq[`tedi-btn--${a}`]]:a},{[lq["tedi-btn--underline"]]:u},{[lq["tedi-btn--is-hovered"]]:d},{[lq["tedi-btn--is-active"]]:p},{[lq["tedi-btn--is-loading"]]:f},{[lq["tedi-btn--icon-only"]]:s},{[lq["tedi-btn--icon"]]:w},{[lq["tedi-btn--full-width"]]:g},r),_=(e,t)=>{const n=ua(lq["tedi-btn__icon"],lq[`tedi-btn__icon--${e}`],{[lq["tedi-btn__spinner"]]:f}),r={size:"large"===a?24:18,className:n,..."link"===o?{display:"inline"}:{}},i="string"==typeof t?{...r,name:t}:{...r,...t,className:ua(r.className,null==t?void 0:t.className)};return f?(0,cn.jsx)(DY,{className:i.className,size:18}):(0,cn.jsx)(KY,{...i})};return(0,cn.jsx)(oY,{visibility:"hide",children:(0,cn.jsx)(x,{"data-name":"button-content",...b,"aria-disabled":f||b["aria-disabled"],onClick:e=>{v&&!f&&v(e)},ref:y,className:S,children:h?e:(0,cn.jsxs)("span",{className:lq["tedi-btn__inner"],children:[s&&_("center",s),l&&_("left",l),(0,cn.jsx)("span",{className:lq["tedi-btn__text"],children:e}),f&&!w&&(0,cn.jsx)(DY,{position:"absolute",className:lq["tedi-btn__spinner"],size:18}),c&&_("right",c)]})})})}));cq.displayName="ButtonContent";const uq=cq,dq=(0,B.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=cY(),{children:r,as:o,type:i="button",formNoValidate:a="submit"===i||void 0,...s}=n(e);return(0,cn.jsx)(uq,{"data-name":"button",...s,type:i,formNoValidate:a,ref:t,as:o||"button",children:r})}));dq.displayName="Button";const pq=dq,fq="tedi-info-button-c2972ecd",hq=B.forwardRef((({isSmall:e,...t},n)=>(0,cn.jsx)(pq,{className:ua(fq),"data-name":"info-button",...t,type:"button",icon:{name:"info",size:e?16:18},visualType:"neutral",ref:n,children:t.children})));hq.displayName="InfoButton";const mq=e=>{const{children:t,classNames:n}=e,{open:r,x:o,y:i,strategy:a,focusManager:s,floating:l,arrowRef:c,getFloatingProps:u,placement:d,context:p,arrow:f,scrollLock:h}=(0,B.useContext)(wq);return(0,B.useEffect)((()=>{h&&(r?(document.documentElement.style.overflow="hidden",document.documentElement.scrollHeight>window.innerHeight&&(document.body.style.overflow="scroll")):(document.documentElement.style.overflow="",document.body.style.overflow=""))}),[r,h]),r?(0,cn.jsx)(iv,{children:(0,cn.jsx)(fv,{...s,context:p,children:(0,cn.jsxs)("div",{...u({ref:l,style:{position:a,left:o,top:i},className:null==n?void 0:n.content}),"data-placement":d,"data-testid":"overlay-content",children:[(0,cn.jsx)(Cg,{ref:e=>c.current=e,context:p,className:null==n?void 0:n.arrow,height:null==f?void 0:f.height,width:null==f?void 0:f.width,"data-testid":"overlay-arrow"}),t]})})}):null},gq="tedi-overlay__trigger-1fcb1224",vq="tedi-overlay__trigger--text-92900890",bq="tedi-overlay__trigger--click-37ceac44",yq=e=>{const{children:t,className:n}=e,{getLabel:r}=IY(),{getReferenceProps:o,reference:i,openWith:a}=(0,B.useContext)(wq),s=vg([i,t.ref]);return(0,B.isValidElement)(t)?(0,B.cloneElement)(t,o({ref:s,tabIndex:0,label:t.type===KY?r("tooltip.icon-trigger"):void 0,...t.props})):(0,cn.jsx)("div",{...o({ref:s,tabIndex:0,className:ua(gq,vq,{[bq]:"click"===a},n)}),children:t})},xq=3,wq=(0,B.createContext)({open:!1,onOpenChange:()=>{},isMounted:!1,openWith:"hover",reference:()=>{},floating:()=>{},focusManager:{},arrowRef:{current:null},x:0,y:0,strategy:"absolute",getReferenceProps:()=>({}),getFloatingProps:()=>({}),arrow:{width:0,height:0,x:0,y:0,centerOffset:0},placement:"top",context:{},scrollLock:void 0});function Sq(e){const t=dY(),{children:n,placement:r="top",openWith:o=(t?"click":"hover"),defaultOpen:i=!1,open:a,onToggle:s,role:l="tooltip",arrowDimensions:c,offset:u=xq+((null==c?void 0:c.height)??0),focusManager:d,dismissible:p,scrollLock:f}=e,{order:h=["reference","content"],initialFocus:m=-1,...g}=d??{},[v,b]=(0,B.useState)(i),y=(0,B.useRef)(null),x=iY(),w=(0,B.useMemo)((()=>s&&typeof a<"u"?a:v),[s,a,v]),S=(0,B.useCallback)((e=>{typeof a>"u"&&b(e),null==s||s(e)}),[a,b,s]),{x:_,y:E,refs:k,strategy:T,context:C,middlewareData:O,placement:I}=kv({placement:r,open:w,onOpenChange:S,middleware:[fg(u),mg(),hg({padding:8}),gg({element:y,padding:4})],whileElementsMounted:tg}),{getReferenceProps:M,getFloatingProps:D}=Mv([Rg(C,{enabled:"hover"===o,handleClose:Nv()}),yv(C,{toggle:p}),Tv(C,{enabled:"hover"===o}),jv(C,{role:l}),_v(C,{enabled:p,outsidePressEvent:"click"===o?"mousedown":"pointerdown"})]);return(0,cn.jsx)(wq.Provider,{value:{open:w,onOpenChange:S,isMounted:x,openWith:o,reference:k.setReference,floating:k.setFloating,arrowRef:y,focusManager:{order:h,initialFocus:m,...g},x:_,y:E,strategy:T,getReferenceProps:M,getFloatingProps:D,arrow:{width:null==c?void 0:c.width,height:null==c?void 0:c.height,...O.arrow},context:C,placement:I,scrollLock:f},children:n})}Sq.Trigger=yq,Sq.Content=mq;const _q={"tedi-tooltip":"tedi-tooltip-c3aca6ef","tedi-tooltip--none":"tedi-tooltip--none-f5172416","tedi-tooltip--small":"tedi-tooltip--small-e4ccdd35","tedi-tooltip--medium":"tedi-tooltip--medium-79a55f41","tedi-tooltip--large":"tedi-tooltip--large-13afd484","tedi-tooltip__arrow":"tedi-tooltip__arrow-c162ba04"};function Eq(e){const{openWith:t="hover",...n}=e;return(0,cn.jsx)(Sq,{arrowDimensions:{width:14,height:7},openWith:t,...n})}Eq.Trigger=function(e){return(0,cn.jsx)(yq,{...e})},Eq.Content=e=>{const{children:t,maxWidth:n="medium",className:r}=e;return(0,cn.jsx)(mq,{classNames:{content:ua(_q["tedi-tooltip"],{[_q[`tedi-tooltip--${n}`]]:n},r),arrow:_q["tedi-tooltip__arrow"]},children:t})};const kq="tedi-label-e7fc0d29",Tq="tedi-label--small-7d7d7576",Cq="tedi-label--bold-5aab7b54",Oq="tedi-label__required-8c7810bf",Iq=(0,B.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=cY(),{as:r="label",children:o,className:i,isBold:a,isSmall:s,required:l,tooltip:c,...u}=n(e),d=ua(kq,a&&Cq,s&&Tq,i);return(0,cn.jsxs)(r,{ref:t,className:d,...u,children:[o,l&&(0,cn.jsx)("span",{className:Oq,"aria-hidden":"true",children:"*"}),c&&(0,cn.jsxs)(Eq,{children:[(0,cn.jsx)(Eq.Trigger,{children:(0,cn.jsx)(hq,{isSmall:s,children:c})}),(0,cn.jsx)(Eq.Content,{children:c})]})]})}));Iq.displayName="Label";const Mq={"tedi-form-label--hidden":"tedi-form-label--hidden-eb9f0de0","tedi-form-label--hidden-keep-space":"tedi-form-label--hidden-keep-space-b054bd93"},Dq=(0,B.forwardRef)((({label:e,hideLabel:t,required:n,id:r,renderWithoutLabel:o,size:i="default",className:a,tooltip:s,...l},c)=>{const u=ua(Mq["tedi-form-label"],Mq[`tedi-form-label--${i}`],{[Mq["tedi-form-label--hidden"+("keep-space"===t?"-keep-space":"")]]:t},a);return(0,cn.jsx)(Iq,{as:o?"span":"label",ref:c,className:u,htmlFor:r,required:n,isSmall:"small"===i,tooltip:s,...l,children:e})}));Dq.displayName="FormLabel";const jq={"tedi-textfield":"tedi-textfield-376bbeed","tedi-textfield__inner":"tedi-textfield__inner-98791cdd","tedi-textfield__input":"tedi-textfield__input-ade0f9a6","tedi-textfield--invalid":"tedi-textfield--invalid-290ce18d","tedi-textfield--valid":"tedi-textfield--valid-273af8c0","tedi-textfield--clearable":"tedi-textfield--clearable-f47f0508","tedi-textfield--with-icon":"tedi-textfield--with-icon-db2c6f01","textfield--with-icon":"textfield--with-icon-d23a33f0","tedi-textfield__input--hidden-arrows":"tedi-textfield__input--hidden-arrows-609217f7","tedi-textfield__right-area":"tedi-textfield__right-area-6ac81c6b","tedi-textfield--small":"tedi-textfield--small-4ffcc517","tedi-textfield--large":"tedi-textfield--large-0e4d788c","tedi-textfield__separator":"tedi-textfield__separator-63d1ba14","tedi-textfield__icon-wrapper":"tedi-textfield__icon-wrapper-4935814e","tedi-textfield--inline":"tedi-textfield--inline-7ed55c4e","tedi-textfield__icon":"tedi-textfield__icon-05d4adc8","tedi-textfield__feedback-wrapper":"tedi-textfield__feedback-wrapper-9d47f9c6"},Aq=(0,B.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=cY(),{id:r,label:o,className:i,inputClassName:a,disabled:s,required:l,hideLabel:c,invalid:u,readOnly:d,icon:p,onIconClick:f,size:h,placeholder:m,isArrowsHidden:g=!0,isClearable:v,onClear:b,onChange:y,onChangeEvent:x,onKeyUp:w,onKeyDown:S,onKeyPress:_,defaultValue:E,value:k,onFocus:T,onBlur:C,onClick:O,helper:I,input:M,name:D,isTextArea:j,...A}=n(e)||{},{getLabel:N}=IY(),P=B.useRef(null),R=B.useRef(null),[L,F]=B.useState(k??E??""),U=B.useMemo((()=>{var e;if(I)return Array.isArray(I)?(null==(e=I[0])?void 0:e.id)??`${r}-helper`:I.id??`${r}-helper`}),[I,r]),z=B.useMemo((()=>k??L),[k,L]),K=v&&z;B.useImperativeHandle(t,(()=>({get input(){return P.current},get inner(){return R.current}})));const $=B.useMemo((()=>Array.isArray(I)?u||I.some((e=>"error"===e.type)):u||"error"===(null==I?void 0:I.type)),[u,I]),V=B.useMemo((()=>!(!I||Array.isArray(I)&&0===I.length)&&(Array.isArray(I)?!u&&I.every((e=>"valid"===e.type)):!u&&"valid"===I.type)),[u,I]),H="large"===h?"default":h,W=B.useCallback((e=>{const t={size:"large"===h?24:"small"===h?16:18,className:ua(jq["tedi-textfield__icon"])},n="string"==typeof e?{...t,name:e}:{...t,...e,className:ua(t.className,null==e?void 0:e.className)},r=(0,cn.jsx)(KY,{...n});return(0,cn.jsx)(f?"button":"div",{className:jq["tedi-textfield__icon-wrapper"],type:f?"button":void 0,onClick:f,disabled:s,children:r})}),[s,f,h]),Y=B.useCallback((e=>{const t=e.currentTarget.value;F(t),null==y||y(t),null==x||x(e)}),[y,x]),q=B.useCallback((()=>{F(""),null==y||y(""),null==b||b()}),[y,b]),G=B.useCallback(((e,t)=>!!j),[j]),J=B.useCallback(((e,t)=>!j),[j]),X=B.useMemo((()=>{const t={"aria-describedby":U,...M,id:r,className:ua(jq["tedi-textfield__input"],a,{[jq["tedi-textfield__input--hidden-arrows"]]:g}),disabled:s,required:l,"aria-invalid":$,placeholder:m,readOnly:d,onChange:Y,value:z,onBlur:C,onFocus:T,name:D};return G(e,P)?(0,cn.jsx)("textarea",{...t,ref:P}):J(e,P)?(0,cn.jsx)("input",{...t,ref:P}):null}),[s,U,r,M,a,g,J,$,G,D,C,Y,T,m,e,d,l,z]),Z=B.useMemo((()=>{const e={size:"large"===h?"large":"medium",onClick:q,title:`${N("clear")} ${o}`,className:ua(jq["tedi-textfield__clear-button"])};return(0,cn.jsx)(VY,{...e})}),[q,N,o,h]),Q=B.useMemo((()=>(0,cn.jsxs)("div",{className:jq["tedi-textfield__right-area"],children:[K&&Z,K&&p?(0,cn.jsx)(iq,{color:"primary",axis:"vertical",className:jq["tedi-textfield__separator"]}):null,p&&W(p)]})),[W,p,Z,K]),ee=ua(jq["tedi-textfield"],{[jq[`tedi-textfield--${h}`]]:h},{[jq["tedi-textfield--with-icon"]]:p},{[jq["tedi-textfield--invalid"]]:$},{[jq["tedi-textfield--valid"]]:V},{[jq["tedi-textfield--clearable"]]:K},i);return(0,cn.jsxs)("div",{"data-name":"textfield",...A,className:ee,children:[(0,cn.jsx)(Dq,{id:r,label:o,required:l,hideLabel:c,size:H}),(0,cn.jsxs)("div",{className:jq["tedi-textfield__inner"],onKeyDown:S,onKeyUp:w,onKeyPress:_,onClick:O,ref:R,children:[X,v||p?Q:null]}),!I||Array.isArray(I)&&0===I.length?null:(0,cn.jsx)("div",{className:jq["tedi-textfield__feedback-wrapper"],children:Array.isArray(I)?I.map(((e,t)=>(0,cn.jsx)(sq,{...e,id:`${U}-${t}`},t))):(0,cn.jsx)(sq,{...I,id:U})})]})}));Aq.displayName="TextField";const Nq=e=>{const{scrollOnMatch:t=!0,onMatch:n,id:r,children:o}=e,i=(0,B.useRef)(!0);return(0,B.useEffect)((()=>{const e=()=>{if(-1!==window.location.hash.split("/").filter((e=>0!==e.indexOf("?")&&1!==e.length&&0!==e.length)).map((e=>"#"===e.charAt(0)?e.substring(1):e)).indexOf(r)){n&&n(r);const e=document.getElementById(r);t&&e&&!function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e)&&e.scrollIntoView(i.current?{behavior:"instant"}:{behavior:"smooth",block:"center"})}};return i.current&&(e(),i.current=!1),window.addEventListener("hashchange",e),()=>{window.removeEventListener("hashchange",e)}}),[r,n,t]),(0,B.isValidElement)(o)?(0,B.cloneElement)(o,{id:r}):(0,cn.jsx)("div",{id:r,children:o})},Pq={"tedi-textarea__input":"tedi-textarea__input-8c740e37","tedi-textarea__character-count":"tedi-textarea__character-count-c5b62b38"},Rq=(0,B.forwardRef)(((e,t)=>{const{className:n,helper:r=[],characterLimit:o,onChange:i,onChangeEvent:a,value:s,defaultValue:l,...c}=e,[u,d]=B.useState(l??""),p=B.useCallback((e=>{!s&&!(i||a)&&d(e),null==i||i(e)}),[s,i,a]),f=B.useMemo((()=>s??u),[s,u]),h=f.length,m=o?`${h}/${o}`:"",g=[...Array.isArray(r)?r:[r],...o?[{type:h>o?"error":"hint",text:m,position:"right",className:ua(Pq["tedi-textarea__character-count"])}]:[]];return(0,cn.jsx)(Aq,{...c,ref:t,"data-name":"textarea",inputClassName:Pq["tedi-textarea__input"],isTextArea:!0,className:ua(Pq["tedi-textarea"],n),value:f,onChange:p,onChangeEvent:a,helper:g})}));Rq.displayName="TextArea";const Lq={"tedi-number-field":"tedi-number-field-dd7196c9","tedi-number-field--disabled":"tedi-number-field--disabled-f19e7ff7","tedi-number-field__button":"tedi-number-field__button-e276fac1","tedi-number-field__input-wrapper":"tedi-number-field__input-wrapper-400bdcf6","tedi-number-field__button__disabled":"tedi-number-field__button__disabled-c7b3b631","tedi-number-field__button--decrement":"tedi-number-field__button--decrement-152a6e1b","tedi-number-field__button--increment":"tedi-number-field__button--increment-8bd8e08f","tedi-number-field--invalid":"tedi-number-field--invalid-0c9ed153","tedi-number-field__input":"tedi-number-field__input-1b10ec1e","tedi-number-field--small":"tedi-number-field--small-e0a3a881","tedi-number-field__input-wrapper--full-width":"tedi-number-field__input-wrapper--full-width-1847e7b8","tedi-number-field__input-wrapper--with-suffix":"tedi-number-field__input-wrapper--with-suffix-81f89bd3","tedi-number-field__suffix":"tedi-number-field__suffix-eb5be3bc"};(e=>{const{getCurrentBreakpointProps:t}=cY(),{id:n,label:r,hideLabel:o,required:i,className:a,size:s,inputMode:l="numeric",decimalPlaces:c,min:u,max:d,step:p=1,defaultValue:f,value:h,onChange:m,suffix:g,fullWidth:v=!1,disabled:b=!1,invalid:y=!1,helper:x,input:w}=t(e),{getLabel:S}=IY(),_=(0,B.useRef)(null),[E,k]=(0,B.useState)(""),[T,C]=(0,B.useState)(f??0),O=(0,B.useMemo)((()=>m&&typeof h<"u"?h:T),[m,h,T]),I=x?(null==x?void 0:x.id)??`${n}-helper`:void 0,M=(0,B.useCallback)((e=>y||void 0!==u&&e<u||void 0!==d&&e>d||"error"===(null==x?void 0:x.type)),[y,x,d,u]),D=e=>Math.min(d??1/0,Math.max(u??-1/0,e)),j=e=>{let t=O;"increment"===e&&(t+=p),"decrement"===e&&(t-=p),t=D(t),t=(e=>void 0!==c?parseFloat(e.toFixed(c)):e)(t),(e=>{const t=S("numberField.quantityUpdated"),n="string"==typeof t?t:t(e);k(n),setTimeout((()=>{k("")}),5e3)})(t),null==m||m(t),C(t)},A=({currentTarget:{value:e}})=>{null==m||m(D(+e)),C(D(+e))},N=e=>{const t="increment"===e?void 0!==d&&O>=d:void 0!==u&&O<=u,n=ua(Lq["tedi-number-field__button"],Lq[`tedi-number-field__button--${e}`],{[Lq["tedi-number-field__button--disabled"]]:t||b}),r=S(`numberField.${e}`),o="string"==typeof r?r:r(p);return(0,cn.jsx)(pq,{"aria-label":o,onClick:()=>j(e),disabled:t||b,visualType:"secondary",className:n,icon:{name:"increment"===e?"add":"remove"},children:"increment"===e?"+":"-"})},P=ua(Lq["tedi-number-field"],{[Lq["tedi-number-field--invalid"]]:M(O)},{[Lq["tedi-number-field--disabled"]]:b},{[Lq["tedi-number-field--small"]]:"small"===s},a);return(0,cn.jsxs)("div",{"data-name":"number-field",className:a,children:[(0,cn.jsx)(Dq,{id:n,label:r,required:i,hideLabel:o,size:s}),(0,cn.jsxs)("div",{className:P,children:[N("decrement"),(()=>{const e=ua(Lq["tedi-number-field__input-wrapper"],{[Lq["tedi-number-field__input-wrapper--with-suffix"]]:g,[Lq["tedi-number-field__input-wrapper--full-width"]]:v}),t=ua(Lq["tedi-number-field__input"],null==w?void 0:w.className);return(0,cn.jsxs)("div",{className:e,onClick:()=>{var e;return null==(e=null==_?void 0:_.current)?void 0:e.focus()},children:[(0,cn.jsx)("input",{ref:_,id:n,"aria-describedby":I,"aria-invalid":y,type:"number",inputMode:l,value:O,min:u,max:d,required:i,step:p,disabled:b,onChange:A,className:t,...w}),g&&(0,cn.jsx)(HY,{element:"span",modifiers:"small",color:"tertiary",className:Lq["tedi-number-field__suffix"],children:g})]})})(),N("increment")]}),x&&(0,cn.jsx)(sq,{...x,id:I}),(0,cn.jsx)("div",{"aria-live":"polite",className:"visually-hidden",children:E})]})}).displayName="NumberField";const Fq="tedi-search__wrapper-92d6f11f",Uq="tedi-search__input-94d53b76",Bq="tedi-search__input--has-button-d8e073e7",zq="tedi-search__button-cbb4df17",Kq=(0,B.forwardRef)((({placeholder:e,isClearable:t=!0,searchIcon:n="search",onSearch:r,onChange:o,button:i,...a},s)=>{const l={...a,ref:s,inputClassName:ua(Uq,i&&Bq),placeholder:e,isClearable:t,onKeyPress:e=>{"Enter"===e.key&&(null==r||r(a.value))},onChange:o,...i?{}:{icon:n}};return(0,cn.jsxs)("div",{className:ua(Fq,a.className),children:[(0,cn.jsx)(Aq,{...l}),i&&(0,cn.jsx)(pq,{...i,onClick:()=>{null==r||r(a.value)},className:ua(zq,i.className),children:i.children})]})}));Kq.displayName="Search";B.createContext({name:"",inputType:"radio",onChange:()=>null,currentValue:[]});function $q(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))}const Vq=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Hq(e,t,n){const r=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const n=t.split(".").pop().toLowerCase(),r=Vq.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:o}=e,i="string"==typeof t?t:"string"==typeof o&&o.length>0?o:`./${e.name}`;return"string"!=typeof r.path&&Wq(r,"path",i),Wq(r,"relativePath",i),r}function Wq(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Yq=[".DS_Store","Thumbs.db"];function qq(e){return"object"==typeof e&&null!==e}function Gq(e){return e.filter((e=>-1===Yq.indexOf(e.name)))}function Jq(e){if(null===e)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Xq(e){if("function"!=typeof e.webkitGetAsEntry)return Qq(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?tG(t):Qq(e,t)}function Zq(e){return e.reduce(((e,t)=>[...e,...Array.isArray(t)?Zq(t):[t]]),[])}function Qq(e,t){return $q(this,void 0,void 0,(function*(){var n;if(globalThis.isSecureContext&&"function"==typeof e.getAsFileSystemHandle){const t=yield e.getAsFileSystemHandle();if(null===t)throw new Error(`${e} is not a File`);if(void 0!==t){const e=yield t.getFile();return e.handle=t,Hq(e)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Hq(r,null!==(n=null==t?void 0:t.fullPath)&&void 0!==n?n:void 0)}))}function eG(e){return $q(this,void 0,void 0,(function*(){return e.isDirectory?tG(e):function(e){return $q(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{e.file((n=>{const r=Hq(n,e.fullPath);t(r)}),(e=>{n(e)}))}))}))}(e)}))}function tG(e){const t=e.createReader();return new Promise(((e,n)=>{const r=[];!function o(){t.readEntries((t=>$q(this,void 0,void 0,(function*(){if(t.length){const e=Promise.all(t.map(eG));r.push(e),o()}else try{const t=yield Promise.all(r);e(t)}catch(e){n(e)}}))),(e=>{n(e)}))}()}))}var nG=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(0===n.length)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0};function rG(e){return function(e){if(Array.isArray(e))return cG(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lG(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oG(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 iG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oG(Object(n),!0).forEach((function(t){aG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw o}}return i}}(e,t)||lG(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.")}()}function lG(e,t){if(e){if("string"==typeof e)return cG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cG(e,t)}}function cG(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}var uG=nG,dG=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:"file-invalid-type",message:"File type must be ".concat(t)}},pG=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},fG=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},hG={code:"too-many-files",message:"Too many files"};function mG(e,t){var n="application/x-moz-file"===e.type||uG(e,t);return[n,n?null:dG(t)]}function gG(e,t,n){if(vG(e.size))if(vG(t)&&vG(n)){if(e.size>n)return[!1,pG(n)];if(e.size<t)return[!1,fG(t)]}else{if(vG(t)&&e.size<t)return[!1,fG(t)];if(vG(n)&&e.size>n)return[!1,pG(n)]}return[!0,null]}function vG(e){return null!=e}function bG(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():typeof e.cancelBubble<"u"&&e.cancelBubble}function yG(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function xG(e){e.preventDefault()}function wG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!bG(e)&&t&&t.apply(void 0,[e].concat(r)),bG(e)}))}}function SG(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function _G(e){return/^.*\.[\w]+$/.test(e)}var EG=["children"],kG=["open"],TG=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],CG=["refKey","onChange","onClick"];function OG(e){return function(e){if(Array.isArray(e))return DG(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||MG(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw o}}return i}}(e,t)||MG(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.")}()}function MG(e,t){if(e){if("string"==typeof e)return DG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DG(e,t)}}function DG(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}function jG(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 AG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jG(Object(n),!0).forEach((function(t){NG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function NG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PG(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}var RG=(0,B.forwardRef)((function(e,t){var n=e.children,r=UG(PG(e,EG)),o=r.open,i=PG(r,kG);return(0,B.useImperativeHandle)(t,(function(){return{open:o}}),[o]),B.createElement(B.Fragment,null,n(AG(AG({},i),{},{open:o})))}));RG.displayName="Dropzone";var LG={disabled:!1,getFilesFromEvent:function(e){return $q(this,void 0,void 0,(function*(){return qq(e)&&function(e){return qq(e)}(e.dataTransfer)?function(e,t){return $q(this,void 0,void 0,(function*(){if(e.items){const n=Jq(e.items).filter((e=>"file"===e.kind));if("drop"!==t)return n;return Gq(Zq(yield Promise.all(n.map(Xq))))}return Gq(Jq(e.files).map((e=>Hq(e))))}))}(e.dataTransfer,e.type):function(e){return qq(e)&&qq(e.target)}(e)?function(e){return Jq(e.target.files).map((e=>Hq(e)))}(e):Array.isArray(e)&&e.every((e=>"getFile"in e&&"function"==typeof e.getFile))?function(e){return $q(this,void 0,void 0,(function*(){return(yield Promise.all(e.map((e=>e.getFile())))).map((e=>Hq(e)))}))}(e):[]}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};RG.defaultProps=LG,RG.propTypes={children:fs.func,accept:fs.objectOf(fs.arrayOf(fs.string)),multiple:fs.bool,preventDropOnDocument:fs.bool,noClick:fs.bool,noKeyboard:fs.bool,noDrag:fs.bool,noDragEventsBubbling:fs.bool,minSize:fs.number,maxSize:fs.number,maxFiles:fs.number,disabled:fs.bool,getFilesFromEvent:fs.func,onFileDialogCancel:fs.func,onFileDialogOpen:fs.func,useFsAccessApi:fs.bool,autoFocus:fs.bool,onDragEnter:fs.func,onDragLeave:fs.func,onDragOver:fs.func,onDrop:fs.func,onDropAccepted:fs.func,onDropRejected:fs.func,onError:fs.func,validator:fs.func};var FG={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function UG(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=AG(AG({},LG),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,y=t.preventDropOnDocument,x=t.noClick,w=t.noKeyboard,S=t.noDrag,_=t.noDragEventsBubbling,E=t.onError,k=t.validator,T=(0,B.useMemo)((function(){return function(e){if(vG(e))return Object.entries(e).reduce((function(e,t){var n=sG(t,2),r=n[0],o=n[1];return[].concat(rG(e),[r],rG(o))}),[]).filter((function(e){return SG(e)||_G(e)})).join(",")}(n)}),[n]),C=(0,B.useMemo)((function(){return function(e){if(vG(e)){var t=Object.entries(e).filter((function(e){var t=sG(e,2),n=t[0],r=t[1],o=!0;return SG(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(r)||!r.every(_G))&&(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=sG(t,2),r=n[0],o=n[1];return iG(iG({},e),{},aG({},r,o))}),{});return[{description:"Files",accept:t}]}return e}(n)}),[n]),O=(0,B.useMemo)((function(){return"function"==typeof g?g:zG}),[g]),I=(0,B.useMemo)((function(){return"function"==typeof m?m:zG}),[m]),M=(0,B.useRef)(null),D=(0,B.useRef)(null),j=IG((0,B.useReducer)(BG,FG),2),A=j[0],N=j[1],P=A.isFocused,R=A.isFileDialogActive,L=(0,B.useRef)(typeof window<"u"&&window.isSecureContext&&v&&"showOpenFilePicker"in window),F=function(){!L.current&&R&&setTimeout((function(){D.current&&(D.current.files.length||(N({type:"closeDialog"}),I()))}),300)};(0,B.useEffect)((function(){return window.addEventListener("focus",F,!1),function(){window.removeEventListener("focus",F,!1)}}),[D,R,I,L]);var U=(0,B.useRef)([]),z=function(e){M.current&&M.current.contains(e.target)||(e.preventDefault(),U.current=[])};(0,B.useEffect)((function(){return y&&(document.addEventListener("dragover",xG,!1),document.addEventListener("drop",z,!1)),function(){y&&(document.removeEventListener("dragover",xG),document.removeEventListener("drop",z))}}),[M,y]),(0,B.useEffect)((function(){return!r&&b&&M.current&&M.current.focus(),function(){}}),[M,b,r]);var K=(0,B.useCallback)((function(e){E?E(e):console.error(e)}),[E]),$=(0,B.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),U.current=[].concat(OG(U.current),[e.target]),yG(e)&&Promise.resolve(o(e)).then((function(t){if(!bG(e)||_){var n=t.length,r=n>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=sG(mG(e,n),1)[0],i=sG(gG(e,r,o),1)[0],a=s?s(e):null;return t&&i&&!a}))}({files:t,accept:T,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:k});N({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),c&&c(e)}})).catch((function(e){return K(e)}))}),[o,c,K,_,T,a,i,s,l,k]),V=(0,B.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=yG(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch{}return t&&d&&d(e),!1}),[d,_]),H=(0,B.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=U.current.filter((function(e){return M.current&&M.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),U.current=t,!(t.length>0)&&(N({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),yG(e)&&u&&u(e))}),[M,u,_]),W=(0,B.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=IG(mG(e,T),2),o=t[0],s=t[1],l=IG(gG(e,a,i),2),c=l[0],u=l[1],d=k?k(e):null;if(o&&c&&!d)n.push(e);else{var p=[s,u];d&&(p=p.concat(d)),r.push({file:e,errors:p.filter((function(e){return e}))})}})),(!s&&n.length>1||s&&l>=1&&n.length>l)&&(n.forEach((function(e){r.push({file:e,errors:[hG]})})),n.splice(0)),N({acceptedFiles:n,fileRejections:r,isDragReject:r.length>0,type:"setFiles"}),p&&p(n,r,t),r.length>0&&h&&h(r,t),n.length>0&&f&&f(n,t)}),[N,s,T,a,i,l,p,f,h,k]),Y=(0,B.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),U.current=[],yG(e)&&Promise.resolve(o(e)).then((function(t){bG(e)&&!_||W(t,e)})).catch((function(e){return K(e)})),N({type:"reset"})}),[o,W,K,_]),q=(0,B.useCallback)((function(){if(L.current){N({type:"openDialog"}),O();var e={multiple:s,types:C};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){W(e,null),N({type:"closeDialog"})})).catch((function(e){!function(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}(e)?function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?(L.current=!1,D.current?(D.current.value=null,D.current.click()):K(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):K(e):(I(e),N({type:"closeDialog"}))}))}else D.current&&(N({type:"openDialog"}),O(),D.current.value=null,D.current.click())}),[N,O,I,v,W,K,C,s]),G=(0,B.useCallback)((function(e){!M.current||!M.current.isEqualNode(e.target)||(" "===e.key||"Enter"===e.key||32===e.keyCode||13===e.keyCode)&&(e.preventDefault(),q())}),[M,q]),J=(0,B.useCallback)((function(){N({type:"focus"})}),[]),X=(0,B.useCallback)((function(){N({type:"blur"})}),[]),Z=(0,B.useCallback)((function(){x||(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?setTimeout(q,0):q())}),[x,q]),Q=function(e){return r?null:e},ee=function(e){return w?null:Q(e)},te=function(e){return S?null:Q(e)},ne=function(e){_&&e.stopPropagation()},re=(0,B.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,p=e.onDrop,f=PG(e,TG);return AG(AG(NG({onKeyDown:ee(wG(i,G)),onFocus:ee(wG(a,J)),onBlur:ee(wG(s,X)),onClick:Q(wG(l,Z)),onDragEnter:te(wG(c,$)),onDragOver:te(wG(u,V)),onDragLeave:te(wG(d,H)),onDrop:te(wG(p,Y)),role:"string"==typeof o&&""!==o?o:"presentation"},n,M),r||w?{}:{tabIndex:0}),f)}}),[M,G,J,X,Z,$,V,H,Y,w,S,r]),oe=(0,B.useCallback)((function(e){e.stopPropagation()}),[]),ie=(0,B.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=PG(e,CG);return AG(AG({},NG({accept:T,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Q(wG(r,Y)),onClick:Q(wG(o,oe)),tabIndex:-1},n,D)),i)}}),[D,n,s,Y,r]);return AG(AG({},A),{},{isFocused:P&&!r,getRootProps:re,getInputProps:ie,rootRef:M,inputRef:D,open:Q(q)})}function BG(e,t){switch(t.type){case"focus":return AG(AG({},e),{},{isFocused:!0});case"blur":return AG(AG({},e),{},{isFocused:!1});case"openDialog":return AG(AG({},FG),{},{isFileDialogActive:!0});case"closeDialog":return AG(AG({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return AG(AG({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return AG(AG({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return AG({},FG);default:return e}}function zG(){}const KG={"tedi-card":"tedi-card-6773201e","tedi-card--background--accent":"tedi-card--background--accent-a0ccccbf","tedi-card--border--accent":"tedi-card--border--accent-16076fd7","tedi-card--background--brand-primary":"tedi-card--background--brand-primary-2e729236","tedi-card--border--brand-primary":"tedi-card--border--brand-primary-0ebff366","tedi-card--background--brand-secondary":"tedi-card--background--brand-secondary-e0935065","tedi-card--border--brand-secondary":"tedi-card--border--brand-secondary-c8f172e4","tedi-card--background--brand-tertiary":"tedi-card--background--brand-tertiary-8d2f79f4","tedi-card--border--brand-tertiary":"tedi-card--border--brand-tertiary-cc06323c","tedi-card--background--brand-quaternary":"tedi-card--background--brand-quaternary-e35ff683","tedi-card--border--brand-quaternary":"tedi-card--border--brand-quaternary-fdf175e9","tedi-card--background--primary":"tedi-card--background--primary-6f518b6a","tedi-card--border--primary":"tedi-card--border--primary-3ee7b649","tedi-card--background--secondary":"tedi-card--background--secondary-402019fb","tedi-card--border--secondary":"tedi-card--border--secondary-b0de1d8c","tedi-card--background--tertiary":"tedi-card--background--tertiary-d57f4e16","tedi-card--border--tertiary":"tedi-card--border--tertiary-1846869a","tedi-card--background--info-primary":"tedi-card--background--info-primary-981c7808","tedi-card--border--info-primary":"tedi-card--border--info-primary-d73b0349","tedi-card--background--info-secondary":"tedi-card--background--info-secondary-118ce8d4","tedi-card--border--info-secondary":"tedi-card--border--info-secondary-25075005","tedi-card--background--neutral-primary":"tedi-card--background--neutral-primary-8b4fa913","tedi-card--border--neutral-primary":"tedi-card--border--neutral-primary-3c442023","tedi-card--background--neutral-secondary":"tedi-card--background--neutral-secondary-77a1899a","tedi-card--border--neutral-secondary":"tedi-card--border--neutral-secondary-2dd2db0a","tedi-card--background--success-primary":"tedi-card--background--success-primary-2e50333d","tedi-card--border--success-primary":"tedi-card--border--success-primary-167796e5","tedi-card--background--success-secondary":"tedi-card--background--success-secondary-5ef8094d","tedi-card--border--success-secondary":"tedi-card--border--success-secondary-5d3c8168","tedi-card--background--danger-primary":"tedi-card--background--danger-primary-a701ed87","tedi-card--border--danger-primary":"tedi-card--border--danger-primary-f0b990dd","tedi-card--background--danger-secondary":"tedi-card--background--danger-secondary-cbde6da8","tedi-card--border--danger-secondary":"tedi-card--border--danger-secondary-29b9cdf0","tedi-card--background--warning-primary":"tedi-card--background--warning-primary-92facd8b","tedi-card--border--warning-primary":"tedi-card--border--warning-primary-60cabe9b","tedi-card--background--warning-secondary":"tedi-card--background--warning-secondary-01e1cafe","tedi-card--border--warning-secondary":"tedi-card--border--warning-secondary-e4339e73","tedi-card--border-left":"tedi-card--border-left-d2bbe0cd","tedi-card--border-top":"tedi-card--border-top-4199f286","tedi-card--borderless":"tedi-card--borderless-8f44bb3f","tedi-card--no-border-radius-top":"tedi-card--no-border-radius-top-d8b0071d","tedi-card__content":"tedi-card__content-a40bc648","tedi-card--no-border-radius-right":"tedi-card--no-border-radius-right-52a78320","tedi-card--no-border-radius-bottom":"tedi-card--no-border-radius-bottom-59e75b25","tedi-card--no-border-radius-left":"tedi-card--no-border-radius-left-ff9938cb","tedi-card__content--separator":"tedi-card__content--separator-0019d413","tedi-card__header":"tedi-card__header-f7a4ed63"},$G=B.createContext({}),VG=e=>{if("number"==typeof e)return{"--card-content-padding-top":`${e}rem`,"--card-content-padding-right":`${e}rem`,"--card-content-padding-bottom":`${e}rem`,"--card-content-padding-left":`${e}rem`};if("object"==typeof(t=e)&&"vertical"in t&&"horizontal"in t){const{vertical:t,horizontal:n}=e;return{"--card-content-padding-top":`${t}rem`,"--card-content-padding-right":`${n}rem`,"--card-content-padding-bottom":`${t}rem`,"--card-content-padding-left":`${n}rem`}}var t;const{top:n=0,right:r=0,bottom:o=0,left:i=0}=e||{};return{"--card-content-padding-top":`${n}rem`,"--card-content-padding-right":`${r}rem`,"--card-content-padding-bottom":`${o}rem`,"--card-content-padding-left":`${i}rem`}},HG=e=>{const{padding:t,background:n}=B.useContext($G),{getCurrentBreakpointProps:r}=cY(),{children:o,className:i,padding:a,background:s,backgroundImage:l,backgroundPosition:c,backgroundSize:u,backgroundRepeat:d,hasSeparator:p,role:f,style:h,...m}=r(e,{padding:t,background:n}),g=s?KG[`tedi-card--background--${s}`]:"",v={backgroundImage:l?`url(${l})`:void 0,backgroundPosition:c,backgroundSize:u,backgroundRepeat:d};return(0,cn.jsx)("button"===f?"button":"div",{"data-name":"card-content","data-padding":"number"==typeof a?`${a}rem`:void 0,className:ua(KG["tedi-card__content"],g,i,{[KG["tedi-card__content--separator"]]:p}),style:{...VG(a),...v,...h},...m,children:o})},WG="tedi-card__notification-content-2a22e902",YG="tedi-card__notification-d5a264e6",qG=(0,B.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=cY(),{children:r,className:o,padding:i,background:a,borderRadius:s,borderless:l,border:c,...u}=n(e,{padding:1}),[d,p]=(e=>{const t=null==e?void 0:e.replace(/(top-)|(left-)/s,"");return[null==e?void 0:e.replace(new RegExp(`(${t})|-`,"g"),""),t]})(c),f=ua(KG["tedi-card"],{[KG[`tedi-card--border-${d}`]]:d,[KG[`tedi-card--border--${p}`]]:p,[KG["tedi-card--borderless"]]:l,[KG["tedi-card--no-border-radius-top"]]:!1===s||!1===(null==s?void 0:s.top),[KG["tedi-card--no-border-radius-right"]]:!1===s||!1===(null==s?void 0:s.right),[KG["tedi-card--no-border-radius-bottom"]]:!1===s||!1===(null==s?void 0:s.bottom),[KG["tedi-card--no-border-radius-left"]]:!1===s||!1===(null==s?void 0:s.left)},o);return(0,cn.jsx)($G.Provider,{value:{padding:i,background:a},children:(0,cn.jsx)("div",{"data-name":"card","data-testid":"tedi-card",...u,className:f,ref:t,children:r})})}));qG.displayName="Card";Object.assign(qG,{Content:HG,Header:e=>{const{className:t,...n}=e;return(0,cn.jsx)(HG,{className:ua(KG["tedi-card__header"],t),...n})},Notification:e=>{const{children:t,padding:n,className:r,...o}=e,i=ua(YG,r);return(0,cn.jsx)(HG,{"data-name":"card-notification",padding:n,className:WG,children:(0,cn.jsx)(qY,{className:i,noSideBorders:!0,...o,children:t})})}});function GG(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=GG(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function JG(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=GG(e))&&(r&&(r+=" "),r+=t);return r}const XG=e=>"number"==typeof e&&!isNaN(e),ZG=e=>"string"==typeof e,QG=e=>"function"==typeof e,eJ=e=>ZG(e)||QG(e)?e:null,tJ=e=>(0,B.isValidElement)(e)||ZG(e)||QG(e)||XG(e);function nJ(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(e){let{children:a,position:s,preventExitTransition:l,done:c,nodeRef:u,isIn:d}=e;const p=r?`${t}--${s}`:t,f=r?`${n}--${s}`:n,h=(0,B.useRef)(0);return(0,B.useLayoutEffect)((()=>{const e=u.current,t=p.split(" "),n=r=>{r.target===u.current&&(e.dispatchEvent(new Event("d")),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===h.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)}),[]),(0,B.useEffect)((()=>{const e=u.current,t=()=>{e.removeEventListener("animationend",t),o?function(e,t,n){void 0===n&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame((()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame((()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)}))}))}(e,c,i):c()};d||(l?t():(h.current=1,e.className+=` ${f}`,e.addEventListener("animationend",t)))}),[d]),B.createElement(B.Fragment,null,a)}}function rJ(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const oJ={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter((e=>e!==t));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach((t=>{const n=setTimeout((()=>{t(...[].slice.call(arguments,1))}),0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)}))}},iJ=e=>{let{theme:t,type:n,...r}=e;return B.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...r})},aJ={info:function(e){return B.createElement(iJ,{...e},B.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return B.createElement(iJ,{...e},B.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return B.createElement(iJ,{...e},B.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return B.createElement(iJ,{...e},B.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return B.createElement("div",{className:"Toastify__spinner"})}};function sJ(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function lJ(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function cJ(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return B.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":r},B.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},B.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function uJ(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:s,controlledProgress:l,progress:c,rtl:u,isIn:d,theme:p}=e;const f=i||l&&0===c,h={...s,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:f?0:1};l&&(h.transform=`scaleX(${c})`);const m=JG("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),g=QG(a)?a({rtl:u,type:o,defaultClassName:m}):JG(m,a);return B.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:g,style:h,[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{d&&r()}})}const dJ=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=function(e){const[t,n]=(0,B.useState)(!1),[r,o]=(0,B.useState)(!1),i=(0,B.useRef)(null),a=(0,B.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=(0,B.useRef)(e),{autoClose:l,pauseOnHover:c,closeToast:u,onClick:d,closeOnClick:p}=e;function f(t){if(e.draggable){"touchstart"===t.nativeEvent.type&&t.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",v),document.addEventListener("mouseup",b),document.addEventListener("touchmove",v),document.addEventListener("touchend",b);const n=i.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=n.getBoundingClientRect(),n.style.transition="",a.x=sJ(t.nativeEvent),a.y=lJ(t.nativeEvent),"x"===e.draggableDirection?(a.start=a.x,a.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(t){if(a.boundingRect){const{top:n,bottom:r,left:o,right:i}=a.boundingRect;"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&a.x>=o&&a.x<=i&&a.y>=n&&a.y<=r?g():m()}}function m(){n(!0)}function g(){n(!1)}function v(n){const r=i.current;a.canDrag&&r&&(a.didMove=!0,t&&g(),a.x=sJ(n),a.y=lJ(n),a.delta="x"===e.draggableDirection?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),r.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,r.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function b(){document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",b);const t=i.current;if(a.canDrag&&a.didMove&&t){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform=`translate${e.draggableDirection}(0)`,t.style.opacity="1"}}(0,B.useEffect)((()=>{s.current=e})),(0,B.useEffect)((()=>(i.current&&i.current.addEventListener("d",m,{once:!0}),QG(e.onOpen)&&e.onOpen((0,B.isValidElement)(e.children)&&e.children.props),()=>{const e=s.current;QG(e.onClose)&&e.onClose((0,B.isValidElement)(e.children)&&e.children.props)})),[]),(0,B.useEffect)((()=>(e.pauseOnFocusLoss&&(document.hasFocus()||g(),window.addEventListener("focus",m),window.addEventListener("blur",g)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",m),window.removeEventListener("blur",g))})),[e.pauseOnFocusLoss]);const y={onMouseDown:f,onTouchStart:f,onMouseUp:h,onTouchEnd:h};return l&&c&&(y.onMouseEnter=g,y.onMouseLeave=m),p&&(y.onClick=e=>{d&&d(e),a.canCloseOnClick&&u()}),{playToast:m,pauseToast:g,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:y}}(e),{closeButton:i,children:a,autoClose:s,onClick:l,type:c,hideProgressBar:u,closeToast:d,transition:p,position:f,className:h,style:m,bodyClassName:g,bodyStyle:v,progressClassName:b,progressStyle:y,updateId:x,role:w,progress:S,rtl:_,toastId:E,deleteToast:k,isIn:T,isLoading:C,iconOut:O,closeOnClick:I,theme:M}=e,D=JG("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":_},{"Toastify__toast--close-on-click":I}),j=QG(h)?h({rtl:_,position:f,type:c,defaultClassName:D}):JG(D,h),A=!!S||!s,N={closeToast:d,type:c,theme:M};let P=null;return!1===i||(P=QG(i)?i(N):(0,B.isValidElement)(i)?(0,B.cloneElement)(i,N):cJ(N)),B.createElement(p,{isIn:T,done:k,position:f,preventExitTransition:n,nodeRef:r},B.createElement("div",{id:E,onClick:l,className:j,...o,style:m,ref:r},B.createElement("div",{...T&&{role:w},className:QG(g)?g({type:c}):JG("Toastify__toast-body",g),style:v},null!=O&&B.createElement("div",{className:JG("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!C})},O),B.createElement("div",null,a)),P,B.createElement(uJ,{...x&&!A?{key:`pb-${x}`}:{},rtl:_,theme:M,delay:s,isRunning:t,isIn:T,closeToast:d,hide:u,type:c,style:y,className:b,controlledProgress:A,progress:S||0})))},pJ=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},fJ=nJ(pJ("bounce",!0));nJ(pJ("slide",!0));nJ(pJ("zoom")),nJ(pJ("flip"));const hJ=(0,B.forwardRef)(((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=function(e){const[,t]=(0,B.useReducer)((e=>e+1),0),[n,r]=(0,B.useState)([]),o=(0,B.useRef)(null),i=(0,B.useRef)(new Map).current,a=e=>-1!==n.indexOf(e),s=(0,B.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:e=>i.get(e)}).current;function l(e){let{containerId:t}=e;const{limit:n}=s.props;!n||t&&s.containerId!==t||(s.count-=s.queue.length,s.queue=[])}function c(e){r((t=>null==e?[]:t.filter((t=>t!==e))))}function u(){const{toastContent:e,toastProps:t,staleId:n}=s.queue.shift();p(e,t,n)}function d(e,n){let{delay:r,staleId:a,...l}=n;if(!tJ(e)||(d=l,!o.current||s.props.enableMultiContainer&&d.containerId!==s.props.containerId||i.has(d.toastId)&&null==d.updateId))return;var d;const{toastId:f,updateId:h,data:m}=l,{props:g}=s,v=()=>c(f),b=null==h;b&&s.count++;const y={...g,style:g.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(l).filter((e=>{let[t,n]=e;return null!=n}))),toastId:f,updateId:h,data:m,closeToast:v,isIn:!1,className:eJ(l.className||g.toastClassName),bodyClassName:eJ(l.bodyClassName||g.bodyClassName),progressClassName:eJ(l.progressClassName||g.progressClassName),autoClose:!l.isLoading&&(x=l.autoClose,w=g.autoClose,!1===x||XG(x)&&x>0?x:w),deleteToast(){const e=rJ(i.get(f),"removed");i.delete(f),oJ.emit(4,e);const n=s.queue.length;if(s.count=null==f?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),n>0){const e=null==f?s.props.limit:1;if(1===n||1===e)s.displayedToast++,u();else{const t=e>n?n:e;s.displayedToast=t;for(let e=0;e<t;e++)u()}}else t()}};var x,w;y.iconOut=function(e){let{theme:t,type:n,isLoading:r,icon:o}=e,i=null;const a={theme:t,type:n};return!1===o||(QG(o)?i=o(a):(0,B.isValidElement)(o)?i=(0,B.cloneElement)(o,a):ZG(o)||XG(o)?i=o:r?i=aJ.spinner():n in aJ&&(i=aJ[n](a))),i}(y),QG(l.onOpen)&&(y.onOpen=l.onOpen),QG(l.onClose)&&(y.onClose=l.onClose),y.closeButton=g.closeButton,!1===l.closeButton||tJ(l.closeButton)?y.closeButton=l.closeButton:!0===l.closeButton&&(y.closeButton=!tJ(g.closeButton)||g.closeButton);let S=e;(0,B.isValidElement)(e)&&!ZG(e.type)?S=(0,B.cloneElement)(e,{closeToast:v,toastProps:y,data:m}):QG(e)&&(S=e({closeToast:v,toastProps:y,data:m})),g.limit&&g.limit>0&&s.count>g.limit&&b?s.queue.push({toastContent:S,toastProps:y,staleId:a}):XG(r)?setTimeout((()=>{p(S,y,a)}),r):p(S,y,a)}function p(e,t,n){const{toastId:o}=t;n&&i.delete(n);const a={content:e,props:t};i.set(o,a),r((e=>[...e,o].filter((e=>e!==n)))),oJ.emit(4,rJ(a,null==a.props.updateId?"added":"updated"))}return(0,B.useEffect)((()=>(s.containerId=e.containerId,oJ.cancelEmit(3).on(0,d).on(1,(e=>o.current&&c(e))).on(5,l).emit(2,s),()=>{i.clear(),oJ.emit(3,s)})),[]),(0,B.useEffect)((()=>{s.props=e,s.isToastActive=a,s.displayedToast=n.length})),{getToastToRender:function(t){const n=new Map,r=Array.from(i.values());return e.newestOnTop&&r.reverse(),r.forEach((e=>{const{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(e=>t(e[0],e[1])))},containerRef:o,isToastActive:a}}(e),{className:i,style:a,rtl:s,containerId:l}=e;function c(e){const t=JG("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":s});return QG(i)?i({position:e,rtl:s,defaultClassName:t}):JG(t,eJ(i))}return(0,B.useEffect)((()=>{t&&(t.current=r.current)}),[]),B.createElement("div",{ref:r,className:"Toastify",id:l},n(((e,t)=>{const n=t.length?{...a}:{...a,pointerEvents:"none"};return B.createElement("div",{className:c(e),style:n,key:`container-${e}`},t.map(((e,n)=>{let{content:r,props:i}=e;return B.createElement(dJ,{...i,isIn:o(i.toastId),style:{...i.style,"--nth":n+1,"--len":t.length},key:`toast-${i.key}`},r)})))})))}));hJ.displayName="ToastContainer",hJ.defaultProps={position:"top-right",transition:fJ,autoClose:5e3,closeButton:cJ,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let mJ,gJ=new Map,vJ=[],bJ=1;function yJ(){return""+bJ++}function xJ(e){return e&&(ZG(e.toastId)||XG(e.toastId))?e.toastId:yJ()}function wJ(e,t){return gJ.size>0?oJ.emit(0,e,t):vJ.push({content:e,options:t}),t.toastId}function SJ(e,t){return{...t,type:t&&t.type||e,toastId:xJ(t)}}function _J(e){return(t,n)=>wJ(t,SJ(e,n))}function EJ(e,t){return wJ(e,SJ("default",t))}EJ.loading=(e,t)=>wJ(e,SJ("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),EJ.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=ZG(o)?EJ.loading(o,n):EJ.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(e,t,o)=>{if(null==t)return void EJ.dismiss(r);const i={type:e,...s,...n,data:o},a=ZG(t)?{render:t}:t;return r?EJ.update(r,{...i,...a}):EJ(a.render,{...i,...a}),o},c=QG(e)?e():e;return c.then((e=>l("success",a,e))).catch((e=>l("error",i,e))),c},EJ.success=_J("success"),EJ.info=_J("info"),EJ.error=_J("error"),EJ.warning=_J("warning"),EJ.warn=EJ.warning,EJ.dark=(e,t)=>wJ(e,SJ("default",{theme:"dark",...t})),EJ.dismiss=e=>{gJ.size>0?oJ.emit(1,e):vJ=vJ.filter((t=>null!=e&&t.options.toastId!==e))},EJ.clearWaitingQueue=function(e){return void 0===e&&(e={}),oJ.emit(5,e)},EJ.isActive=e=>{let t=!1;return gJ.forEach((n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},EJ.update=function(e,t){void 0===t&&(t={}),setTimeout((()=>{const n=function(e,t){let{containerId:n}=t;const r=gJ.get(n||mJ);return r&&r.getToast(e)}(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:yJ()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,wJ(a,i)}}),0)},EJ.done=e=>{EJ.update(e,{progress:1})},EJ.onChange=e=>(oJ.on(4,e),()=>{oJ.off(4,e)}),EJ.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},EJ.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},oJ.on(2,(e=>{mJ=e.containerId||e,gJ.set(mJ,e),vJ.forEach((e=>{oJ.emit(0,e.content,e.options)})),vJ=[]})).on(3,(e=>{gJ.delete(e.containerId||e),0===gJ.size&&oJ.off(0).off(1).off(5)}));const kJ=(0,B.forwardRef)(((e,t)=>{const{getCurrentBreakpointProps:n}=cY(),{getLabel:r}=IY(),{visualType:o="link",underline:i=!0,as:a,children:s,...l}=n(e);return(0,cn.jsxs)(uq,{"data-name":"link",...l,ref:t,as:a||"a",visualType:o,underline:i,children:[s,"_blank"===l.target&&(0,cn.jsxs)("span",{className:"sr-only",children:["(",r("anchor.new-tab"),")"]})]})}));kJ.displayName="Link";const TJ={"tedi-popover":"tedi-popover-1f3065e1","tedi-popover--small":"tedi-popover--small-e1c870e7","tedi-popover--medium":"tedi-popover--medium-f8579cdf","tedi-popover--large":"tedi-popover--large-ba19f0a7","tedi-popover__arrow":"tedi-popover__arrow-dd1c976c","tedi-popover__header":"tedi-popover__header-4a52d67c","tedi-popover__header--no-title":"tedi-popover__header--no-title-b3b0ab2c"};function CJ(e){const{openWith:t="click",...n}=e;return(0,cn.jsx)(Sq,{arrowDimensions:{width:34,height:17},openWith:t,...n})}CJ.Trigger=function(e){return(0,cn.jsx)(yq,{...e})},CJ.Content=function(e){const{children:t,width:n="small",className:r,title:o,titleProps:i={element:"h4"},close:a,closeProps:s={size:"large"}}=e,{onOpenChange:l}=(0,B.useContext)(wq);return(0,cn.jsxs)(mq,{classNames:{content:ua(TJ["tedi-popover"],{[TJ[`tedi-popover--${n}`]]:n},r),arrow:TJ["tedi-popover__arrow"]},children:[(o||a)&&(0,cn.jsxs)("div",{className:ua(TJ["tedi-popover__header"],{[TJ["tedi-popover__header--no-title"]]:!o}),children:[o&&(0,cn.jsx)(HY,{...i,className:ua("align-self-center",i.className),children:o}),a&&(0,cn.jsx)(VY,{...s,onClick:e=>{var t;l(!1),null==(t=s.onClick)||t.call(s,e)}})]}),t]})};const OJ=e=>{let{title:t}=e;const n=(0,$.useIntl)();return(0,cn.jsx)(HY,{color:"primary",element:"h1",children:n.formatMessage({id:`${t}`})})},IJ=e=>{let{value:t,selectItems:n,onChange:r}=e;return n.length?(0,cn.jsx)(JW,{defaultOpenItem:t?[t]:[],openItem:t?[t]:[],onToggleItem:e=>{r(e)},gutter:1,children:n.map((e=>{let{id:n,key:o,title:i,description:a,disabled:s}=e;return(0,cn.jsxs)(ZW,{id:o,selected:t===o,disabled:s,children:[(0,cn.jsx)(rY,{children:(0,cn.jsxs)(PY,{alignItems:"center",justifyContent:"between",children:[(0,cn.jsx)(RY,{children:(0,cn.jsx)(HY,{children:i})}),(0,cn.jsx)(RY,{width:"auto",children:(0,cn.jsx)(hT,{disabled:s,onChange:()=>r(o),checked:t===o,id:n,label:i,hideLabel:!0,name:i,value:o})})]})}),(0,cn.jsx)(QW,{children:(0,cn.jsx)(uh,{borderless:!0,children:(0,cn.jsx)(ph,{padding:{left:.75,right:.75,top:0,bottom:0},children:a})})})]},o)}))}):(0,cn.jsx)(cn.Fragment,{})},MJ=e=>{var t;let{visible:n,toggleVisible:r,title:o,size:i,primaryText:a,secondaryText:s,tertiaryText:l,onPrimary:c,onSecondary:u,onTertiary:d,children:p,primaryDisabled:f=!1,tertiaryDisabled:h=!1,tertiaryIconLeft:m,primaryColor:g,cardProps:v,withoutCardHeader:b=!1,tertiaryColor:y,tertiaryVisualType:x,notification:w,isLoading:S}=e;const _=(0,$.useIntl)();return(0,cn.jsx)(Wv,{open:n,onToggle:r,children:(0,cn.jsxs)(qv,{"aria-labelledby":"label",hideCloseButton:!0,size:null!=i?i:6,cardProps:v,children:[!b&&(0,cn.jsx)(dh,{background:"white",children:(0,cn.jsx)(es,{element:"h2",modifiers:"h3",color:"default",children:_.formatMessage({id:o})})}),w&&(0,cn.jsx)(mh,{title:w.title,type:w.type,children:null!==(t=null==w?void 0:w.children)&&void 0!==t?t:""}),(0,cn.jsx)(ph,{children:(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsxs)(BY,{size:.5,children:[b&&(0,cn.jsx)(es,{element:"h2",modifiers:"h3",color:"default",children:_.formatMessage({id:o})}),(0,cn.jsx)(BY.Item,{children:S?(0,cn.jsx)(DY,{color:"primary",label:"Loading...",size:16}):(0,cn.jsx)(cn.Fragment,{children:p})})]}),(0,cn.jsx)(iq,{spacing:1}),(0,cn.jsxs)(PY,{justifyContent:"between",gutter:0,children:[(0,cn.jsx)(RY,{xs:"auto",children:(0,cn.jsx)(PY,{gutter:0,children:!!s&&!!u&&(0,cn.jsx)(Gf,{visualType:"secondary",onClick:()=>u(),children:_.formatMessage({id:s})})})}),(0,cn.jsx)(RY,{grow:1,children:(0,cn.jsxs)(PY,{justifyContent:"end",gap:3,gutter:0,children:[!!l&&!!d&&(0,cn.jsx)(Gf,{iconLeft:m,visualType:null!=x?x:"primary",color:null!=y?y:"default",onClick:()=>d(),disabled:h,isLoading:S,children:_.formatMessage({id:l})}),!!a&&!!c&&(0,cn.jsx)(Gf,{disabled:f,visualType:"primary",color:null!=g?g:"positive",onClick:()=>c(),isLoading:S,children:_.formatMessage({id:a})})]})})]})]})})]})})},DJ=["11261"],jJ=e=>{let{linkGen:t}=e;const n=(0,$.useIntl)(),[r,o]=(0,B.useState)(!1),i=()=>{r&&s(DJ[0]),o((e=>!e))},[a,s]=(0,B.useState)(DJ[0]),[l]=(0,B.useState)(DJ.map((e=>({id:e,key:e,title:n.formatMessage({id:`plannings.type.${e}`}),description:(0,cn.jsx)(PY,{children:(0,cn.jsxs)(Qa,{children:[(0,cn.jsx)($.FormattedMessage,{id:`plannings.type.${e}.description`}),(0,cn.jsx)("br",{})]})})}))));return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(Gf,{id:"modal-new-plan",visualType:"primary",iconLeft:"add",onClick:i,children:n.formatMessage({id:"my_plannings.page.button.new_planning"})}),(0,cn.jsx)(MJ,{toggleVisible:i,primaryText:"button.begin",secondaryText:"button.cancel",onPrimary:()=>{var e;(e=a)&&t(!0,void 0,ue.Document,"",{doty:e})},onSecondary:i,size:6,visible:r,title:"my_plannings.modal.title.new_planning",cardProps:{border:"top-positive-main"},children:(0,cn.jsx)(IJ,{selectItems:l,value:a,onChange:s})})]})},AJ=()=>{const e=(0,$.useIntl)();return(0,cn.jsxs)(ZW,{id:de.PlanningsProceedings,children:[(0,cn.jsx)(rY,{background:"primary",closeText:" ",openText:" ",children:e.formatMessage({id:"my_plannings.page.section_title.proceedings"})}),(0,cn.jsx)(QW,{children:(0,cn.jsx)("p",{})})]})},NJ=()=>{const e=(0,$.useIntl)();return(0,cn.jsxs)(ZW,{id:de.PlanningsInstitution,children:[(0,cn.jsx)(rY,{background:"primary",closeText:" ",openText:" ",children:e.formatMessage({id:"my_plannings.page.section_title.institution_plannings"})}),(0,cn.jsx)(QW,{children:(0,cn.jsx)("p",{})})]})},PJ=()=>{const e=(0,$.useIntl)();return(0,cn.jsxs)(ZW,{id:de.PlanningsOngoing,children:[(0,cn.jsx)(rY,{background:"primary",closeText:" ",openText:" ",children:e.formatMessage({id:"my_plannings.page.section_title.ongoing_plannings"})}),(0,cn.jsx)(QW,{children:(0,cn.jsx)("p",{})})]})},RJ=()=>{const e=(0,$.useIntl)();return(0,cn.jsxs)(ZW,{id:de.PlanningsCompleted,children:[(0,cn.jsx)(rY,{background:"primary",closeText:" ",openText:" ",children:e.formatMessage({id:"my_plannings.page.section_title.completed_plannings"})}),(0,cn.jsx)(QW,{children:(0,cn.jsx)("p",{})})]})},LJ=[de.PlanningsProceedings,de.PlanningsInstitution,de.PlanningsOngoing,de.PlanningsCompleted],FJ=e=>{let{userInfo:t,linkGen:n}=e;return(0,cn.jsx)(PY,{id:"MyPlanningsPage",gutter:0,children:(0,cn.jsx)(RY,{children:(0,cn.jsxs)(BY,{size:1,children:[(0,cn.jsx)(OJ,{title:"my_plannings.page_title"}),(0,cn.jsx)(PY,{justifyContent:"end",gutter:0,children:(0,cn.jsx)(jJ,{linkGen:n})}),(0,cn.jsxs)(JW,{defaultOpenItem:LJ,gutter:1,children:[(0,cn.jsx)(AJ,{}),(0,cn.jsx)(NJ,{}),(0,cn.jsx)(PJ,{}),(0,cn.jsx)(RJ,{})]})]})})})},UJ=require("react-redux"),BJ=require("moment");var zJ=o.n(BJ);function KJ(e,t,n){const r=n(e).trim(),o=n(t).trim();return r.toLowerCase()===o.toLowerCase()?0:""===r?1:""===o?-1:r.toLowerCase()>o.toLowerCase()?1:-1}function $J(e,t,n){const r=n(e),o=n(t);return r===o?0:r>o?1:-1}function VJ(e){if("0"===e.done&&"0"===e.all)return 15;if(e.done===e.all)return 9;let t=parseInt(e.done)/parseInt(e.all);return 1===t&&(t+=parseInt(e.all)/1e4),t}function HJ(e,t,n){const r=n(e),o=n(t),i=VJ(r),a=VJ(o);return a===i?0:i>a?1:-1}function WJ(e,t,n){const r=n(e),o=n(t);return r===o?0:r>o?1:-1}function YJ(e,t,n){if(0===e.length)return e;const r={string:KJ,number:$J,object:HJ,date:WJ}[typeof t(e[0])];return[...e].sort(((e,o)=>r(e,o,t)*n))}const qJ=0,GJ=1,JJ=-1;function XJ(e,t){return{column:e,direction:e===t.column?function(e){switch(e){case qJ:return GJ;case GJ:return JJ;case JJ:return GJ}}(t.direction):GJ}}const ZJ=e=>-1===e.sortDirection?(0,cn.jsx)("svg",{width:"10",height:"8",viewBox:"0 8 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,cn.jsx)("path",{d:"M1.55 6.05L5 2.6L8.45 6.05L9.5 5L5 0.5L0.5 5L1.55 6.05ZM1.55 9.95L5 13.4L8.45 9.95L9.5 11L5 15.5L0.5 11L1.55 9.95Z",fill:"#5D6071"})}):1===e.sortDirection?(0,cn.jsx)("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,cn.jsx)("path",{d:"M1.55 6.05L5 2.6L8.45 6.05L9.5 5L5 0.5L0.5 5L1.55 6.05ZM1.55 9.95L5 13.4L8.45 9.95L9.5 11L5 15.5L0.5 11L1.55 9.95Z",fill:"#5D6071"})}):(0,cn.jsx)("svg",{width:"10",height:"16",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,cn.jsx)("path",{d:"M1.55 6.05L5 2.6L8.45 6.05L9.5 5L5 0.5L0.5 5L1.55 6.05ZM1.55 9.95L5 13.4L8.45 9.95L9.5 11L5 15.5L0.5 11L1.55 9.95Z",fill:"#5D6071"})}),QJ=e=>{const[t,n]=(0,B.useState)(!1);return(0,cn.jsx)(cn.Fragment,{children:e.fileId&&(0,cn.jsx)(V.ControlledPopover,{content:(0,cn.jsxs)("div",{style:{width:"250px"},children:[(0,cn.jsx)("h4",{children:(0,cn.jsx)($.FormattedMessage,{id:"download.file"})}),(0,cn.jsx)("br",{}),(0,cn.jsxs)("div",{className:"d-flex justify-content-between mt-2",children:[(0,cn.jsx)(V.Button,{colourScheme:"light",type:"reset",squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.cancel"})}),(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",onClick:()=>{e.fileId&&e.fileApi.downloadFile(e.fileId,{responseType:"blob"}).then((e=>{const r=e.headers["content-disposition"];let o="download";if(r){const e=r.match(/filename\*=UTF-8''(.+?)(;|$)/);e&&e.length>=2&&(o=decodeURIComponent(e[1].replace(/\+/g," ")))}const i=new Blob([e.data],{}),a=document.createElement("a");a.download=o,a.href=URL.createObjectURL(i),a.addEventListener("click",(()=>{setTimeout((()=>URL.revokeObjectURL(a.href)),3e4)})),a.click(),n(!t)})).catch((e=>console.log(e)))},squared:!0,type:"submit",children:(0,cn.jsx)($.FormattedMessage,{id:"button.download"})})]})]}),open:t,placement:"bottom-end",toggle:()=>n(!t),children:(0,cn.jsx)(V.Icon,{tooltipText:(0,cn.jsx)($.FormattedMessage,{id:"tooltip.download"}),type:"download"})})})};let eX=function(e){return e.DO_DOKUSEIS_ESITATUD="DO_DOKUSEIS_ESITATUD",e.DO_DOKUSEIS_KEHTETU="DO_DOKUSEIS_KEHTETU",e.DO_DOKUSEIS_KOOSTAMISEL="DO_DOKUSEIS_KOOSTAMISEL",e.DO_DOKUSEIS_EELNOU_AKTIIVNE="DO_DOKUSEIS_EELNOU_AKTIIVNE",e.DO_DOKUSEIS_ALLKIRJASTAMISEL="DO_DOKUSEIS_ALLKIRJASTAMISEL",e.DO_DOKUSEIS_MENETLUSES="DO_DOKUSEIS_MENETLUSES",e.DO_DOKUSEIS_MUUTMISEL="DO_DOKUSEIS_MUUTMISEL",e.DO_DOKUSEIS_TAIENDAMISEL="DO_DOKUSEIS_TAIENDAMISEL",e.DO_DOKUSEIS_TYHISTATUD="DO_DOKUSEIS_TYHISTATUD",e.DO_DOKUSEIS_VANA_VERSIOON="DO_DOKUSEIS_VANA_VERSIOON",e.DO_DOKUSEIS_LOOBUTUD="DO_DOKUSEIS_LOOBUTUD",e.DO_DOKUSEIS_ALLKIRJASTATUD="DO_DOKUSEIS_ALLKIRJASTATUD",e.DO_DOKUSEIS_MENETLETUD="DO_DOKUSEIS_MENETLETUD",e.DO_DOKUSEIS_LUBATUD="DO_DOKUSEIS_LUBATUD",e.DO_DOKUSEIS_LUB_TEAV="DO_DOKUSEIS_LUB_TEAV",e.DO_DOKUSEIS_KEELDUTUD="DO_DOKUSEIS_KEELDUTUD",e.DO_DOKUSEIS_TEAVITATUD="DO_DOKUSEIS_TEAVITATUD",e.DO_DOKUSEIS_REG_KANTUD="DO_DOKUSEIS_REG_KANTUD",e.DO_DOKUSEIS_ANTUD="DO_DOKUSEIS_ANTUD",e.DO_DOKUSEIS_KEHTIV="DO_DOKUSEIS_KEHTIV",e.DO_DOKUSEIS_TUNNIST_KEHTETUKS="DO_DOKUSEIS_TUNNIST_KEHTETUKS",e.DO_DOKUSEIS_KOOSK_RINGIL="DO_DOKUSEIS_KOOSK_RINGIL",e.DO_DOKUSEIS_EM_KINNITATUD_AKTUAL="DO_DOKUSEIS_EM_KINNITATUD_AKTUAL",e}({});const tX=[{code:eX.DO_DOKUSEIS_ESITATUD,value:"Esitatud"},{code:eX.DO_DOKUSEIS_KOOSTAMISEL,value:"Koostamisel"},{code:eX.DO_DOKUSEIS_MENETLUSES,value:"Menetluses"},{code:eX.DO_DOKUSEIS_MUUTMISEL,value:"Muutmisel"},{code:eX.DO_DOKUSEIS_TAIENDAMISEL,value:"Täiendamisel"}],nX=[{code:eX.DO_DOKUSEIS_KEHTETU,value:"Kehtetu"},{code:eX.DO_DOKUSEIS_REG_KANTUD,value:"Registrisse kantud"},{code:eX.DO_DOKUSEIS_TYHISTATUD,value:"Tühistatud"},{code:eX.DO_DOKUSEIS_LOOBUTUD,value:"Tagasi võetud"}];function rX(e,t){const n=(e,t,n)=>({name:e,oldType:t,newType:n});switch(eX[e]){case eX.DO_DOKUSEIS_ESITATUD:return n(t.formatMessage({id:"document.status.submitted"}),re.Info,oe.Info);case eX.DO_DOKUSEIS_KEHTETU:return n(t.formatMessage({id:"document.status.void"}),re.Default,oe.Default);case eX.DO_DOKUSEIS_KOOSTAMISEL:case eX.DO_DOKUSEIS_EELNOU_AKTIIVNE:return n(t.formatMessage({id:"document.status.being_created"}),re.Info,oe.Info);case eX.DO_DOKUSEIS_ALLKIRJASTAMISEL:return n(t.formatMessage({id:"document.status.waiting_signatures"}),re.Info,oe.Info);case eX.DO_DOKUSEIS_MENETLUSES:return n(t.formatMessage({id:"document.status.being_processed"}),re.Info,oe.Info);case eX.DO_DOKUSEIS_MUUTMISEL:return n(t.formatMessage({id:"document.status.being_edited"}),re.Info,oe.Info);case eX.DO_DOKUSEIS_TAIENDAMISEL:return n(t.formatMessage({id:"document.status.being_revised"}),re.Warning,oe.Warning);case eX.DO_DOKUSEIS_TYHISTATUD:return n(t.formatMessage({id:"document.status.canceled"}),re.Default,oe.Default);case eX.DO_DOKUSEIS_VANA_VERSIOON:return n(t.formatMessage({id:"document.status.old_version"}),re.Default,oe.Default);case eX.DO_DOKUSEIS_LOOBUTUD:return n(t.formatMessage({id:"document.status.withdrawn"}),re.Default,oe.Default);case eX.DO_DOKUSEIS_ALLKIRJASTATUD:return n(t.formatMessage({id:"document.status.signed"}),re.Info,oe.Info);case eX.DO_DOKUSEIS_MENETLETUD:return n(t.formatMessage({id:"document.status.processed"}),re.Success,oe.Success);case eX.DO_DOKUSEIS_LUBATUD:return n(t.formatMessage({id:"document.status.allowed"}),re.Success,oe.Success);case eX.DO_DOKUSEIS_LUB_TEAV:return n(t.formatMessage({id:"document.status.allowed"}),re.Warning,oe.Warning);case eX.DO_DOKUSEIS_KEELDUTUD:return n(t.formatMessage({id:"document.status.denied"}),re.Danger,oe.Danger);case eX.DO_DOKUSEIS_TEAVITATUD:return n(t.formatMessage({id:"document.status.notified"}),re.Success,oe.Success);case eX.DO_DOKUSEIS_REG_KANTUD:return n(t.formatMessage({id:"document.status.registered"}),re.Success,oe.Success);case eX.DO_DOKUSEIS_ANTUD:return n(t.formatMessage({id:"document.status.given"}),re.Success,oe.Success);case eX.DO_DOKUSEIS_EM_KINNITATUD_AKTUAL:case eX.DO_DOKUSEIS_KEHTIV:return n(t.formatMessage({id:"document.status.valid"}),re.Success,oe.Success);case eX.DO_DOKUSEIS_TUNNIST_KEHTETUKS:return n(t.formatMessage({id:"document.status.voided"}),re.Default,oe.Default);case eX.DO_DOKUSEIS_KOOSK_RINGIL:return n(t.formatMessage({id:"document.status.waiting_approval"}),re.Info,oe.Info);default:return n(e,re.Default,oe.Default)}}function oX(e){let t=[];e===W?t=tX:e===Y&&(t=nX);return function(e){return e.map((e=>({id:e.code+"",label:e.value,level:2,children:[],selectable:!0,value:!1})))}(t.sort(((e,t)=>e.value.localeCompare(t.value))))}function iX(e,t){if(t.documentTypes.length>0&&(e=e.filter((e=>void 0!==e.doty&&t.documentTypes.includes(e.doty)))),t.ehrCode.length>0&&(e=e.filter((e=>{var n;return null===(n=e.ehrCode)||void 0===n?void 0:n.some((e=>{var n;return null!==(n=e.startsWith(t.ehrCode.trim()))&&void 0!==n&&n}))}))),t.buildingName.length>0&&(e=e.filter((e=>{var n;return null===(n=e.buildingName)||void 0===n?void 0:n.some((e=>{var n,r;return null!==(n=null==e||null===(r=e.toLocaleLowerCase())||void 0===r?void 0:r.includes(t.buildingName.toLocaleLowerCase()))&&void 0!==n&&n}))}))),t.wordInAddress.length>0&&(e=e.filter((e=>{var n,r;return null!==(n=null===(r=e.buildingAddress)||void 0===r?void 0:r.some((e=>null==e?void 0:e.toLocaleLowerCase().includes(t.wordInAddress.trim().toLocaleLowerCase()))))&&void 0!==n&&n}))),t.documentNumber.length>0&&(e=e.filter((e=>{var n,r;return null!==(n=null===(r=e.docNr)||void 0===r?void 0:r.includes(t.documentNumber.trim()))&&void 0!==n&&n}))),t.documentStates.length>0&&(e=e.filter((e=>{return(n=e.stateCode)&&[eX.DO_DOKUSEIS_MENETLETUD,eX.DO_DOKUSEIS_LUBATUD,eX.DO_DOKUSEIS_LUB_TEAV,eX.DO_DOKUSEIS_KEELDUTUD,eX.DO_DOKUSEIS_TEAVITATUD,eX.DO_DOKUSEIS_REG_KANTUD,eX.DO_DOKUSEIS_ANTUD,eX.DO_DOKUSEIS_KEHTIV].includes(n)?t.documentStates.includes(eX.DO_DOKUSEIS_REG_KANTUD):e.stateCode&&t.documentStates.includes(e.stateCode);var n}))),t.institutionUsers.length>0&&(e=e.filter((e=>(void 0!==e.presenter||null!==e.presenter)&&t.institutionUsers.find((t=>{var n;return!0===(null===(n=e.connectedPersonId)||void 0===n?void 0:n.includes(t))}))))),t.proceedingNumber.length>0&&(e=e.filter((e=>{var n,r;return null!==(n=null===(r=e.proceedingNr)||void 0===r?void 0:r.includes(t.proceedingNumber.trim()))&&void 0!==n&&n}))),t.institutions.length>0&&(e=e.filter((e=>void 0!==e.institutionId&&t.institutions.includes(e.institutionId)))),!0===t.proceedingMissing&&(e=e.filter((e=>null===e.proceedingNr||void 0===e.proceedingNr))),t.documentDate.from.length>0&&0===t.documentDate.to.length){const n=new Date(t.documentDate.from).getTime();e=e.filter((e=>new Date(zJ()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n))}if(t.documentDate.to.length>0&&0===t.documentDate.from.length){const n=new Date(t.documentDate.to).getTime();e=e.filter((e=>new Date(zJ()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=n))}if(t.documentDate.from.length>0&&t.documentDate.to.length>0){const n=new Date(t.documentDate.from).getTime(),r=new Date(t.documentDate.to).getTime();e=e.filter((e=>new Date(zJ()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n&&new Date(zJ()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=r))}return e}function aX(e){return null!=e}function sX(e,t){return Object.keys(e).find((n=>e[n]===Object.values(e).find((e=>e.includes(t)))))}function lX(e){var t,n,r,o;const[i,a]=(0,B.useState)(!1);function s(){a(!i)}const l=(0,cn.jsxs)("div",{children:[(0,cn.jsx)("h4",{children:(0,cn.jsx)($.FormattedMessage,{defaultMessage:"Kas olete kindel, et soovite selle rea kustutada?",id:null!==(t=e.titleText)&&void 0!==t?t:"common.confirmation.modal.header"})}),(0,cn.jsx)("p",{children:(0,cn.jsx)($.FormattedMessage,{defaultMessage:"Kustutatud ridu ei ole võimalik hiljem taastada",id:null!==(n=e.messageText)&&void 0!==n?n:"common.confirmation.modal.description"})}),(0,cn.jsxs)("div",{children:[(0,cn.jsx)(V.Button,{colourScheme:"light",squared:!0,type:"reset",children:(0,cn.jsx)($.FormattedMessage,{defaultMessage:"Loobun",id:"common.confirmation.modal.no"})}),(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"danger",onClick:()=>(e.onConfirm(),void s()),squared:!0,type:"submit",children:(0,cn.jsx)($.FormattedMessage,{defaultMessage:"Kustutan",id:"common.confirmation.modal.yes"})})]})]});return(0,cn.jsx)(V.ControlledPopover,{delegateFocusOnOpen:null===(r=e.delegateFocusOnOpen)||void 0===r||r,className:"popover-confirm",content:e.content||l,open:i,placement:"top-end",theme:"danger",toggle:()=>s(),wrapperClassName:null!==(o=e.wrapperClassName)&&void 0!==o?o:"",children:e.children})}function cX(e){return(0,cn.jsx)(lX,{titleText:e.titleText,messageText:e.messageText,onConfirm:e.onConfirm,children:(0,cn.jsx)(V.Icon,{tooltipText:(0,cn.jsx)($.FormattedMessage,{id:"tooltip.delete"}),type:"delete"})})}const uX=e=>{let{linkName:t,functionCall:n,tooltipText:r}=e;return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(V.Link,{onClick:e=>null==n?void 0:n(e),text:(0,cn.jsx)(V.Text,{raw:t})}),(0,cn.jsx)(V.Info,{tooltipText:r})]})};var dX,pX=new Uint8Array(16);function fX(){if(!dX&&!(dX="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dX(pX)}const hX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const mX=function(e){return"string"==typeof e&&hX.test(e)};for(var gX=[],vX=0;vX<256;++vX)gX.push((vX+256).toString(16).substr(1));const bX=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(gX[e[t+0]]+gX[e[t+1]]+gX[e[t+2]]+gX[e[t+3]]+"-"+gX[e[t+4]]+gX[e[t+5]]+"-"+gX[e[t+6]]+gX[e[t+7]]+"-"+gX[e[t+8]]+gX[e[t+9]]+"-"+gX[e[t+10]]+gX[e[t+11]]+gX[e[t+12]]+gX[e[t+13]]+gX[e[t+14]]+gX[e[t+15]]).toLowerCase();if(!mX(n))throw TypeError("Stringified UUID is invalid");return n};const yX=function(e,t,n){var r=(e=e||{}).random||(e.rng||fX)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return bX(r)},xX=e=>{let{notificationStyle:t,header:n,link:r,body:o,onCloseNotification:i,isNotClosable:a,customBody:s}=e;const l=(0,$.useIntl)(),c=null!=s?s:(0,cn.jsxs)("div",{children:[(0,cn.jsx)("h3",{className:"alert-heading",children:n}),(0,cn.jsx)("p",{className:"alert-body mb-0",children:o}),r&&(0,cn.jsx)("div",{className:"mx-2",children:(0,cn.jsx)(V.Link,{onClick:r.onClick,text:l.formatMessage({id:r.text})})})]});return a?(0,cn.jsx)("div",{id:"danger-toast",className:`alert ${t}`,children:c}):(0,cn.jsxs)("div",{id:"danger-toast",className:`alert alert-toast-box ${t}`,children:[(0,cn.jsx)("a",{className:"toast-close icon-close",role:"button","data-toggle":"tooltip","data-tooltip-placement":"bottom","data-tooltip-class":"tooltip-icon","data-tooltip-trigger":"hover focus","data-tooltip-title":"Sulgen","aria-label":"Sulgen","data-animation":"false",onClick:i}),c]})};let wX=function(e){return e.Danger="danger",e.Warning="warning",e.Info="info",e.Success="success",e}({});const SX=()=>{const e=(0,$.useIntl)(),t=(0,UJ.useDispatch)(),n=(0,UJ.useSelector)(N),[r,o]=(0,B.useState)();(0,B.useEffect)((()=>{n&&o(n)}),[n]);const i=t=>{if(t)return"string"==typeof t?e.formatMessage({id:t}):t.values?e.formatMessage({id:t.id},{...t.values}):e.formatMessage({id:t.id})};return(0,cn.jsx)(cn.Fragment,{children:(0,cn.jsx)("div",{className:"notification-alert-box",children:(0,cn.jsx)("ul",{children:(null==r?void 0:r.length)>0&&r.map((e=>{var n;return(0,cn.jsx)("li",{children:e.theme&&(0,cn.jsx)(xX,{notificationStyle:"alert-"+e.theme+" show",header:i(null!==(n=e.messageCode)&&void 0!==n?n:e.header),body:e.messageCode?void 0:i(e.body),onCloseNotification:()=>(e=>{t(L(e))})(e.id),link:e.link})},e.id)}))})})})},_X=(0,e.createAsyncThunk)("globalUI/handleNotification",(async(e,t)=>{let{dispatch:n,getState:r}=t;const o=r().myViewsPage.notifications.notices,i=yX(),a={...e,id:i};n(R([...o,a])),e.theme!==wX.Danger&&setTimeout((()=>{n(L(i))}),7e3)})),EX=(0,e.createAsyncThunk)("document/createDocument",(async(e,t)=>{let{addEntityDto:n,successCallback:r}=e,{dispatch:o}=t;try{const e=await ln.documentApiService.createDocument(n.documentType,n);return r&&r(e.data),o(P()),e.data}catch(e){o(_X({header:"request.error.create_document.title",body:"request.error.create_document.message",theme:wX.Danger}))}})),kX=e=>{var t;let{doty:n,documentId:r,linkGen:o,userInfo:i}=e;const a=(0,UJ.useDispatch)(),[s,l]=(0,B.useState)(!1),c=(null==i||null===(t=i.activeRole)||void 0===t?void 0:t.businessType)===le.TJA,u=(e,t)=>{if(!t)return;a(EX({addEntityDto:{documentType:t,baseDocumentId:r},successCallback:t=>((e,t)=>{const n=`${e.documentTypeWithYear}/${e.documentNumber}`;e&&o(!0,t,se,n)})(t,e)}))};return(0,cn.jsx)(V.ControlledPopover,{content:(()=>{const e=n,t=we[e],r=Se[e];return(0,cn.jsxs)("div",{children:[(0,cn.jsxs)("ul",{children:[(0,cn.jsx)("li",{className:"d-flex justify-content-between",children:(0,cn.jsx)(uX,{linkName:"my_documents.document_table.more_actions.request_document_cancellation",tooltipText:`my_documents.document_table.more_actions.request_document_cancellation.tooltip.${e}`,functionCall:e=>{u(e,r),l(!s)}})}),c&&(0,cn.jsx)("li",{className:"d-flex justify-content-between",children:(0,cn.jsx)(uX,{linkName:"my_documents.document_table.more_actions.cancel_document",tooltipText:`my_documents.document_table.more_actions.cancel_document.tooltip.${e}`,functionCall:e=>{u(e,t),l(!s)}})})]}),(0,cn.jsx)(V.Button,{onClick:()=>{l(!1)},squared:!0,colourScheme:"light",children:(0,cn.jsx)($.FormattedMessage,{id:"button.cancel"})})]})})(),open:s,placement:"bottom-end",toggle:()=>l(!s),children:(0,cn.jsx)("div",{className:"pl-2",children:(0,cn.jsx)(V.Icon,{tooltipText:(0,cn.jsx)($.FormattedMessage,{id:"tooltip.more_actions"}),type:"more"})})})},TX=e=>{var t;let{linkGen:n,userInfo:r,documentType:o,onAllUsersChecked:i,isAllUsersChecked:a,filter:s,onDocumentDelete:l,fileApi:c,hidePresenter:u}=e;const d=(0,$.useIntl)(),[p,f]=(0,B.useState)({offset:0,limit:10}),[h,m]=(0,B.useState)([]),[g,v]=(0,B.useState)({column:0,direction:qJ}),[b,y]=(0,B.useState)(!1),[x,w]=(0,B.useState)(!1),[S,_]=(0,B.useState)(!1),E=(0,UJ.useSelector)((e=>e.myViewsPage.myDocuments.workingDocuments)),k=(0,UJ.useSelector)((e=>e.myViewsPage.myDocuments.signingDocuments)),T=(0,UJ.useSelector)((e=>e.myViewsPage.myDocuments.finishedDocuments)),C=(0,UJ.useSelector)((e=>e.myViewsPage.myProceedings.incomingDocuments)),O=(null===(t=r.activeRole)||void 0===t?void 0:t.businessType)!==le.A;(0,B.useEffect)((()=>{E&&o===W&&(Object.keys(s).length>0?(m(iX(E,s)),f({offset:0,limit:10})):m(E))}),[E,s]),(0,B.useEffect)((()=>{k&&o===H&&(Object.keys(s).length>0?(m(iX(k,s)),f({offset:0,limit:10})):m(k))}),[k,s]),(0,B.useEffect)((()=>{T&&o===Y&&(Object.keys(s).length>0?(m(iX(T,s)),f({offset:0,limit:10})):m(T))}),[T,s]),(0,B.useEffect)((()=>{C&&o===q&&(Object.keys(s).length>0?(m(iX(C,s)),f({offset:0,limit:10})):m(C))}),[C,s]);const I=["my_documents.doc_date","my_documents.reg_date","my_documents.doc_nr","my_documents.document_type","my_documents.building_name","my_documents.ehr_code","my_documents.building_address","my_documents.state","my_documents.proceeding_nr"];u||I.push("my_documents.presenter");const M=[e=>aX(e.docDate)?new Date(zJ()(e.docDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>o===q?aX(e.deadlineDate)?new Date(zJ()(e.deadlineDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER:aX(e.regDate)?new Date(zJ()(e.regDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.docNr)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""},e=>e.buildingName&&aX(e.buildingName[0])?e.buildingName[0]:"",e=>e.ehrCode&&aX(e.ehrCode[0])?e.ehrCode[0]:"",e=>e.buildingAddress&&aX(e.buildingAddress[0])?e.buildingAddress[0]:"",e=>{var t;return null!==(t=e.state)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},e=>e.presenter?e.presenter.join(","):""];const D=e=>{var t;const i=[(0,cn.jsx)(QJ,{fileApi:c,fileId:e.generatedFileId,docNr:null!==(t=e.docNr)&&void 0!==t?t:""},e.docId+"download")];return o===W&&e.stateCode===eX.DO_DOKUSEIS_KOOSTAMISEL?i.push((0,cn.jsx)(cX,{onConfirm:()=>{l(e.docNr)},titleText:"my_documents.delete_document_confirmation.modal.header",messageText:"my_documents.delete_document_confirmation.modal.message"},e.docNr)):o===Y&&e.doty&&xe.includes(e.doty)&&![eX.DO_DOKUSEIS_TYHISTATUD,eX.DO_DOKUSEIS_TUNNIST_KEHTETUKS].includes(e.stateCode)&&i.push((0,cn.jsx)(kX,{doty:e.doty,documentId:e.docId,linkGen:n,userInfo:r})),i};return(0,cn.jsxs)(V.Section,{form:!0,children:[h&&(0,cn.jsx)(V.CollapseTable,{content:h.slice(p.offset,p.offset+p.limit).map((e=>{var t,r,i,a,s,l,c;return(0,cn.jsx)(V.CollapseTableRow,{fields:[e.docDate,o===q?zJ()(e.deadlineDate,"DD.MM.YYYY").valueOf()<zJ()().valueOf()?(0,cn.jsx)("div",{className:"red-text",children:null===(t=e.deadlineDate)||void 0===t?void 0:t.toString()}):e.deadlineDate:e.regDate,(0,cn.jsx)(V.Tooltip,{content:(0,cn.jsx)(V.Text,{raw:"my_documents.tooltip.open_document"}),placement:"bottom",theme:"dark",children:(0,cn.jsx)(V.Link,{onClick:t=>{n(!0,t,se,e.docNr)},text:e.docNr,href:n(!1,void 0,se,e.docNr)})},e.docNr),e.documentType,e.buildingName?(0,cn.jsx)("div",{children:S?(0,cn.jsxs)("div",{children:[e.buildingName.map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[e,";",(0,cn.jsx)("br",{})]},t))),e.buildingName.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),_(!S)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.link.view_less_building_names"})})]}):1===e.buildingName.length?e.buildingName:(0,cn.jsxs)("div",{children:[null===(r=e.buildingName)||void 0===r?void 0:r.slice(0,4).map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[e,";",(0,cn.jsx)("br",{})]},t))),null===(i=e.buildingName)||void 0===i?void 0:i.slice(4,5),e.buildingName.length>5?" ...":"",e.buildingName.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),_(!S)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.link.view_all_building_names"})})})]})}):"",e.ehrCode?(0,cn.jsx)("div",{children:x?(0,cn.jsxs)("div",{children:[e.ehrCode.map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[(0,cn.jsx)(fn,{linkName:e,tooltipText:"my_documents.tooltip.open_building",functionCall:t=>{n(!0,t,ie,e)},href:n(!1,void 0,ie,e)}),(0,cn.jsx)("br",{})]},t))),e.ehrCode.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),w(!x)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.link.view_less_ehrCodes"})})]}):(0,cn.jsxs)("div",{children:[null===(a=e.ehrCode)||void 0===a?void 0:a.slice(0,4).map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[(0,cn.jsx)(fn,{linkName:e,tooltipText:"my_documents.tooltip.open_building",functionCall:t=>{n(!0,t,ie,e)},href:n(!1,void 0,ie,e)}),(0,cn.jsx)("br",{})]},t))),null===(s=e.ehrCode)||void 0===s?void 0:s.slice(4,5).map((e=>(0,cn.jsx)(fn,{linkName:e,tooltipText:"my_documents.tooltip.open_building",functionCall:t=>{n(!0,t,ie,e)},href:n(!1,void 0,ie,e)}))),e.ehrCode.length>5?" ...":"",e.ehrCode.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),w(!x)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.link.view_all_ehrCodes"})})})]})}):"",e.buildingAddress?(0,cn.jsx)("div",{children:b?(0,cn.jsxs)("div",{children:[e.buildingAddress.map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[e,";",(0,cn.jsx)("br",{})]},t))),e.buildingAddress.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),y(!b)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.link.view_less_addresses"})})]}):1===e.buildingAddress.length?e.buildingAddress:(0,cn.jsxs)("div",{children:[null===(l=e.buildingAddress)||void 0===l?void 0:l.slice(0,4).map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[e,";",(0,cn.jsx)("br",{})]},t))),null===(c=e.buildingAddress)||void 0===c?void 0:c.slice(4,5),e.buildingAddress.length>5?" ...":"",e.buildingAddress.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),y(!b)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.link.view_all_addresses"})})})]})}):"",e.stateCode?(0,cn.jsx)(V.Status,{type:rX(e.stateCode,d).oldType,children:rX(e.stateCode,d).name}):"",o===H?(0,cn.jsx)(V.Tooltip,{content:(0,cn.jsx)(V.Text,{raw:"my_documents.tooltip.open_proceeding"}),placement:"bottom",theme:"dark",children:(0,cn.jsx)(V.Link,{onClick:t=>{n(!0,t,ae,e.proceedingNr)},text:e.proceedingNr,href:n(!1,void 0,ae,e.proceedingNr)})},e.proceedingNr):e.proceedingNr,e.presenter?e.presenter.map(((t,n)=>(0,cn.jsxs)("div",{children:[t,n!==e.presenter.length-1?(0,cn.jsx)("span",{children:", "}):""]}))):""],tools:D(e),editable:!0},e.docId)})),headers:function(){const e=[...I];return e[1]="my_documents.deadline",(o===q?e:I).map(((e,t)=>(0,cn.jsxs)("div",{children:[(0,cn.jsx)("a",{className:"link-gray",style:{paddingRight:"2px"},onClick:()=>{const e=XJ(t,g);v(e),e.direction!==qJ&&m(YJ(h,M[t],e.direction))},children:g.column===t?(0,cn.jsx)(ZJ,{sortDirection:g.direction}):(0,cn.jsx)(ZJ,{sortDirection:qJ})}),d.formatMessage({id:e})]})))}(),paginationEnabled:!0,pager:{offset:p.offset,limit:p.limit,total:h.length},onPaginationReload:f,editable:!0}),(0,cn.jsx)(V.Row,{children:O&&o!==q?(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Checkbox,{name:"checkbox",onChange:e=>i(e),text:(0,cn.jsx)(V.Text,{raw:"my_documents.view_all_institution_documents"}),checked:a})}):(0,cn.jsx)(V.Col,{})})]})},CX=require("reactstrap");function OX(e,t,n,r,o){return r?(0,cn.jsx)(V.FieldWrapper,{labelCol:o,component:(0,cn.jsxs)(CX.Row,{className:"w-100 px-0 mx-0",children:[(0,cn.jsx)(CX.Col,{xs:"auto",md:1.5,className:"pl-0 px-0",children:(0,cn.jsx)(V.Checkbox,{"data-testid":"checkbox",info:{content:r,placement:"top-start"},name:"checkbox",text:"",checked:e})}),(0,cn.jsx)(CX.Col,{className:"px-0",children:(0,cn.jsx)(V.Text,{raw:(0,cn.jsx)($.FormattedMessage,{id:n})})})]}),label:(0,cn.jsx)($.FormattedMessage,{id:"label.empty"})}):(0,cn.jsx)(V.FieldWrapper,{labelCol:o,component:(0,cn.jsx)(V.Checkbox,{"data-testid":"checkbox",name:"checkbox",onChange:e=>t(e),text:(0,cn.jsx)(V.Text,{raw:(0,cn.jsx)($.FormattedMessage,{id:n})}),checked:e}),label:(0,cn.jsx)($.FormattedMessage,{id:"label.empty"})})}const IX=["110","11002","111","11119","11129","11139","11149","11158","11159","11191","11199","112","11201","11202","11203","11204","11205","11206","11211","11212","11213","11214","11219","11229","11231","11232","11233","11234","11239","11241","11249","11251","11271","11272","11273","11274","11275","11291","11299","113","11301","11302","11303","11304","11305","11306","11311","11312","11313","11314","11318","11319","11328","11329","11331","11332","11333","11334","11338","11339","11341","11348","11349","11351","11359","11371","11381","11391","11399","114","11411","11412","11413","11430","115","11511","11512","11513","11514","11515","11516","11518","11521","11522","11523","11524","11525","11526","11527","11531","11542","11551","11561","11563","11564","11565","11566","11567","11569","11571","11573","11574","11576","11577","11578","11581","11582","11584","11601","118","11802","11811","11821","11831","120","121","12119","12129","12139","12149","12158","12159","12199","122","12211","12212","12213","12214","12219","12229","12231","12232","12233","12234","12239","12241","12249","12251","12271","12291","12299","123","12311","12312","12313","12314","12318","12319","12328","12329","12331","12332","12333","12334","12338","12339","12341","12348","12349","12351","12359","12371","12381","12391","12399","127","12711","12731","12741","12742","12743","12744","12745","12899","129","12902","12911","12912","12921","12922","12931","12932","12942","12972","12973","12971","12974","12975","12976","12977","12978","12994","12999","130","13001","13002","13003","13009","131","13101","900","91511","91561","92731","92741","92743","92744","92745","11583"];function MX(e){return function(e){let t={id:"0",label:"00000",parentId:"0",level:1,value:!1,selectable:!1,children:[]};for(let n of e){let e=n.id.toString(),r=t;for(let t=1;t<=n.id;t++)if(r.children){let n=r.children.find((n=>n.id.toString()===e.slice(0,t)));n&&(r=n)}r.children&&r.children.push({id:e+"",parentId:r.id,label:n.name+(null!==n.validTo&&zJ()(n.validTo).isBefore(zJ()(new Date))?" (kuni "+zJ()(n.validTo).format("DD.MM.YYYY")+")":""),level:r.level+1,children:[],selectable:!0,value:!1})}return t.children?t.children:[]}(e.filter((e=>IX.includes(e.id.toString()))).sort(((e,t)=>e.id-t.id)))}function DX(e){return function(e){return e.map((e=>({id:e.id+"",label:e.firstName+" "+e.lastName+" ("+e.personalCode+")",level:2,children:[],selectable:!0,value:!1})))}(e.sort(((e,t)=>e.firstName.localeCompare(t.firstName))))}function jX(e){return function(e){return e.map((e=>({id:e.id+"",label:e.regName,level:2,children:[],selectable:!0,value:!1})))}(e.sort(((e,t)=>e.regName.localeCompare(t.regName))))}function AX(e){var t,n,r,o;return(0,cn.jsxs)("div",{className:"d-flex align-items-center",children:[(0,cn.jsx)("div",{className:"range--from",style:{flexGrow:1},children:(0,cn.jsx)(V.DatePicker,{disabled:null!==(t=e.disabled)&&void 0!==t&&t,maxLength:e.maxLength,onBlur:(t,n)=>e.onBlur?e.onBlur(t,n):null,onChange:(t,n)=>function(t,n){const r={...e.value};r.from=t,e.onChange(r,n)}(t,n),onFocus:(t,n)=>e.onFocus?e.onFocus(t,n):null,value:null===(n=e.value)||void 0===n?void 0:n.from})}),(0,cn.jsx)("span",{className:"px-1",children:"—"}),(0,cn.jsx)("div",{className:"range--to",style:{flexGrow:1},children:(0,cn.jsx)(V.DatePicker,{disabled:null!==(r=e.disabled)&&void 0!==r&&r,maxLength:e.maxLength,onBlur:(t,n)=>e.onBlur?e.onBlur(t,n):null,onChange:(t,n)=>function(t,n){const r={...e.value};r.to=t,e.onChange(r,n)}(t,n),onFocus:(t,n)=>e.onFocus?e.onFocus(t,n):null,value:null===(o=e.value)||void 0===o?void 0:o.to})})]})}const NX=e=>{const t=(0,$.useIntl)(),n=/^[\\s0-9]{0,9}$/,r=/^([\\s0-9]{5}:[\\s0-9]{3}:[\\s0-9]{1,4}|[\\s0-9]{5}:[\\s0-9]{1,3}|[\\s0-9]{1,5})$/,o={documentTypes:[],ehrCode:"",buildingName:"",wordInAddress:"",documentNumber:"",cadastralNumber:"",documentStates:[],institutionUsers:[],proceedingNumber:"",institutions:[],proceedingMissing:!1,documentDate:{from:"",to:""}},[i,a]=(0,B.useState)(o);(0,B.useEffect)((()=>{Object.keys(e.filterState).length>0&&a(e.filterState)}),[e.documentType]);const[s,l]=(0,B.useState)(!0),[c,u]=(0,B.useState)(!0),[d,p]=(0,B.useState)(""),[f,h]=(0,B.useState)([]),[m,g]=(0,B.useState)([]),[v,b]=(0,B.useState)([]),[y,x]=(0,B.useState)(oX(e.documentType)),[w,S]=(0,B.useState)([]),_=(0,UJ.useSelector)((e=>e.myViewsPage.filter.documentTypes)),E=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutionUsers)),k=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutions));function T(e){return n.test(e)}function C(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],i[t]=n,a((e=>({...e})))}function O(e,t){i[t]=e,"ehrCode"===t&&T(e)?l(!0):"cadastralNumber"===t&&function(e){return 0===e.length||r.test(e)}(e)&&u(!0),a((e=>({...e})))}(0,B.useEffect)((()=>{x(oX(e.documentType))}),[e.documentType]),(0,B.useEffect)((()=>{if(_){const e=MX(_);h(e)}if(E&&e.isKov){const e=DX(E?[...E]:[]);b(e)}if(k){const e=jX([...k]);g(e)}}),[_,E,k]);return(0,cn.jsxs)(V.Form,{onSubmit:()=>e.onSubmit(i),children:[(0,cn.jsxs)(V.Row,{className:"align-items-start",children:[(0,cn.jsxs)(V.Col,{sm:10,className:"mx-0 px-0",children:[(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:f,onSelect:e=>C(e,"documentTypes"),allSelection:!0,onRemoveItem:e=>C(e,"documentTypes"),value:i.documentTypes,selectedOptions:w}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.document_type"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.document_type",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>O(e,"buildingName"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.buildingName}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.building_name"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.building_name",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>O(e,"documentNumber"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.documentNumber}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.document_number"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.document_number",placement:"top-start"}}),e.documentType!==q&&e.documentType!==H&&(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:y,onSelect:e=>C(e,"documentStates"),allSelection:!0,onRemoveItem:e=>C(e,"documentStates"),value:i.documentStates,selectedOptions:w}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.document_state"}),labelCol:{sm:20,md:8,lg:8}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>O(e,"proceedingNumber"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.proceedingNumber}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.proceeding_number"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.proceeding_number",placement:"top-start"}}),OX(i.proceedingMissing,(function(e){a((t=>({...t,proceedingMissing:e})))}),"my_documents.filter.label.proceeding_missing","my_documents.filter.tooltip.proceeding_missing"),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(AX,{onChange:e=>(e=>{""!==e.from&&!zJ()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!zJ()(e.to,"YYYY-MM-DD",!0).isValid()?p(t.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?p(t.formatMessage({id:"filter.invalid_date_range"})):p(""),a((t=>({...t,documentDate:e})))})(e),value:i.documentDate}),errorMessage:d.length>0?d:null,label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.document_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.document_date",placement:"top-start"}})]}),(0,cn.jsxs)(V.Col,{sm:10,className:"mx-0 px-0",children:[(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>O(e,"ehrCode"),onBlur:e=>l(T(e.trim())),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.ehrCode}),errorMessage:!s&&(0,cn.jsx)(V.Text,{raw:"filter.invalid_building_code"}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.ehrCode"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.ehrCode",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>O(e,"wordInAddress"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.wordInAddress}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.word_in_address"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.word_in_address",placement:"top-start"}}),e.documentType!==q&&e.documentType!==H&&e.isKov&&(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:v,onSelect:e=>C(e,"institutionUsers"),allSelection:!0,onRemoveItem:e=>C(e,"institutionUsers"),value:i.institutionUsers,selectedOptions:w}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.institution_users"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.institution_users",placement:"top-start"}}),e.documentType!==q&&(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:m,onSelect:e=>C(e,"institutions"),allSelection:!0,onRemoveItem:e=>C(e,"institutions"),value:i.institutions,selectedOptions:w}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.institution"}),labelCol:{sm:20,md:8,lg:8}}),e.isKov&&e.documentType===H&&(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:v,onSelect:e=>C(e,"institutionUsers"),allSelection:!0,onRemoveItem:e=>C(e,"institutionUsers"),value:i.institutionUsers,selectedOptions:w}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.filter.label.institution_users"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_documents.filter.tooltip.institution_users",placement:"top-start"}})]})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{onClick:()=>(S([]),void a(o)),colourScheme:"light",squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.epmty_fields"})})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!(s&&c),squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.search"})})})]})]})},PX=["11566","11567","11569","11576","11577"],RX=[he,me,ge,ve],LX=e=>{const[t,n]=(0,B.useState)(!1),[r,o]=(0,B.useState)(""),[i,a]=(0,B.useState)(!1),[s,l]=(0,B.useState)([]),c=(0,UJ.useSelector)((e=>e.myViewsPage.myDocuments.allowedDocumentTypesToStart)),u=e=>null==e||Number.isNaN(e)||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length;(0,B.useEffect)((()=>{if(c){const e=c.filter((e=>!PX.includes(e.code)&&!RX.includes(e.code)));l(e.map((e=>({code:e.code,texts:e.value}))))}}),[c]);return(0,cn.jsx)(V.ControlledPopover,{maxWidth:900,open:t,content:(0,cn.jsx)("div",{style:{width:"600px"},children:(0,cn.jsxs)(V.Form,{onSubmit:()=>{a(!0)},children:[(0,cn.jsx)("h2",{children:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.popover.title.composing_new_document"})}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Select,{filterable:!0,placeholder:"placeholder.choose",name:"role",onChange:e=>o(e),options:s,value:r}),errorMessage:i&&u(r)&&(0,cn.jsx)(V.Text,{raw:"common.select.required"}),label:(0,cn.jsx)(V.Text,{raw:"my_documents.popover.label.new_document_type"}),name:"documentType",info:{content:"my_documents.popover.tooltip.document_type"}}),(0,cn.jsxs)("div",{className:"d-flex justify-content-between mt-2",children:[(0,cn.jsx)(V.Button,{colourScheme:"light",onClick:()=>{a(!1),o("")},children:(0,cn.jsx)($.FormattedMessage,{id:"button.cancel"})}),(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",onClick:t=>{u(r)||(e.linkGen(!0,t,"DOCUMENT","",{doty:r}),n(!1))},children:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.popover.button.compose_new_document"})})]})]})}),placement:"bottom-end",toggle:()=>{n(!t)},children:(0,cn.jsx)(V.Button,{withPlus:!0,colourScheme:"info",onClick:()=>{n(!t)},children:(0,cn.jsx)($.FormattedMessage,{id:"my_documents.button.start_new_document"})})})},FX=["11273","11272","11274","11275","11002","11051","11201","11271","11301","11371","11412","11413","11430","11522","11525","11527","11542","11566","11567","11569","11571","11576","11577","11581","11582","11584","11831","12731","12743","12744","12745","12899","12922","12932","12942","12973","12975","12976","12977","12978","12999","11526","11601","11583"],UX=["11273","11272","11274","11275","11002","11051","11201","11271","11301","11371","11412","11413","11430","11522","11525","11527","11542","11566","11567","11569","11571","11573","11574","11576","11577","11581","11582","11584","11831","12731","12743","12744","12745","12899","12922","12932","12942","12951","12952","12953","12973","12975","12976","12977","12978","12999","11526","11601","11583"],BX=["11273","11272","11582","11525","11271","11201","11301","11371","11002","11581","12271","12371","12921","12931","12995","12996","12902","11802","12999","12922","12932","12942","12899","11526","12972","12973"],zX=e=>{var t,n,o,i,l,c,u;let{linkGen:g,userInfo:v}=e;const b=(0,UJ.useDispatch)(),[y,x]=(0,B.useState)({signingDocs:!1,workingDocs:!1,finishedDocs:!1}),[w,S]=(0,B.useState)(!1),[_,E]=(0,B.useState)(!0),[k,T]=(0,B.useState)(!0),[C,O]=(0,B.useState)([]),[I,M]=(0,B.useState)([]),[D,j]=(0,B.useState)([]),[A,N]=(0,B.useState)({}),[P,R]=(0,B.useState)({}),[L,F]=(0,B.useState)({}),U="A"!==(null===(t=v.activeRole)||void 0===t?void 0:t.businessType);const z={userId:null===(n=v.activeRole)||void 0===n?void 0:n.userId,personId:null===(o=v.activeRole)||void 0===o?void 0:o.businessId,dotys:FX,states:[eX.DO_DOKUSEIS_ESITATUD,eX.DO_DOKUSEIS_KOOSTAMISEL,eX.DO_DOKUSEIS_EELNOU_AKTIIVNE,eX.DO_DOKUSEIS_ALLKIRJASTAMISEL,eX.DO_DOKUSEIS_MENETLUSES,eX.DO_DOKUSEIS_TAIENDAMISEL,eX.DO_DOKUSEIS_MUUTMISEL]},K={userId:null===(i=v.activeRole)||void 0===i?void 0:i.userId,personId:null===(l=v.activeRole)||void 0===l?void 0:l.businessId,dotys:UX,states:[eX.DO_DOKUSEIS_KEHTETU,eX.DO_DOKUSEIS_TUNNIST_KEHTETUKS,eX.DO_DOKUSEIS_REG_KANTUD,"DO_DOKUSEIS_TAGASTATUD",eX.DO_DOKUSEIS_KEELDUTUD,eX.DO_DOKUSEIS_TYHISTATUD,eX.DO_DOKUSEIS_LOOBUTUD,eX.DO_DOKUSEIS_ALLKIRJASTATUD,eX.DO_DOKUSEIS_MENETLETUD,eX.DO_DOKUSEIS_LUBATUD,eX.DO_DOKUSEIS_LUB_TEAV,eX.DO_DOKUSEIS_TEAVITATUD,eX.DO_DOKUSEIS_ANTUD,eX.DO_DOKUSEIS_KEHTIV]},$={userId:null===(c=v.activeRole)||void 0===c?void 0:c.userId,personId:null===(u=v.activeRole)||void 0===u?void 0:u.businessId,roles:["DO_DOKU_ISIK_ROLL_ALLAK"],dotys:BX,states:[eX.DO_DOKUSEIS_ALLKIRJASTAMISEL]};return(0,B.useEffect)((()=>{var e,t;ln.classifierApiService.getAllDocumentTypes().then((e=>{b(r(e.data))})).catch((e=>{console.log(e)})),ln.institutionKovEndpointApi.getJurKovPersons().then((e=>{b(s(e.data))})).catch((e=>{console.log(e)})),U&&ln.userApiService.getJurUsers(null!==(e=null===(t=v.activeRole)||void 0===t?void 0:t.businessId)&&void 0!==e?e:0).then((e=>{b(a(e.data))})).catch((e=>{console.log(e)})),ln.documentApiService.getDotysBasedOnUserRights().then((e=>{const t=e.data.filter((e=>"12922"!==e.code&&"11412"!==e.code&&"11413"!==e.code&&"12932"!==e.code&&"11430"!==e.code&&"12942"!==e.code));b(m(t))})).catch((e=>{console.log("Following error occured:",e)}))}),[v]),(0,B.useEffect)((()=>{(()=>{const e=z;y.workingDocs&&(e.userId=void 0),E(!0),ln.myDocumentBaseApiService.findWorkingDocuments1(e).then((e=>{b(d(e.data)),E(!1),M(e.data)})).catch((e=>{console.log("Following error occured:",e),E(!1)}))})()}),[y.workingDocs,v]),(0,B.useEffect)((()=>{!function(){const e=K;y.finishedDocs&&(e.userId=void 0),T(!0),ln.myDocumentBaseApiService.findWorkingDocuments1(e).then((e=>{b(f(e.data)),T(!1),j(e.data)})).catch((e=>{console.log("Following error occured:",e),T(!1)}))}()}),[y.finishedDocs,v]),(0,B.useEffect)((()=>{!function(){const e=$;y.signingDocs&&(e.userId=void 0),S(!0),ln.myDocumentBaseApiService.findWorkingDocuments1(e).then((e=>{b(p(e.data)),S(!1),O(e.data)})).catch((e=>{console.log("Following error occured:",e),S(!1)}))}()}),[y.signingDocs,v]),(0,cn.jsxs)("div",{children:[(0,cn.jsx)(SX,{}),(0,cn.jsx)("div",{className:"d-flex justify-content-end mt-2",children:(0,cn.jsx)(LX,{linkGen:g})}),U&&(0,cn.jsx)(V.Section,{collapsed:!1,title:"my_documents.my_documents_to_sign",showSettings:!0,filterContents:(0,cn.jsx)(NX,{documentType:H,filterState:A,onSubmit:e=>N(e),isKov:U}),children:w?(0,cn.jsx)(V.SectionLoader,{}):0===C.length?(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_documents.signing_documents.no_docs"})}):(0,cn.jsx)(TX,{linkGen:g,userInfo:v,documentType:H,onAllUsersChecked:e=>{x({signingDocs:e,workingDocs:y.workingDocs,finishedDocs:y.finishedDocs})},isAllUsersChecked:y.signingDocs,filter:A,fileApi:ln.fileApiService,hidePresenter:!0})}),(0,cn.jsx)(V.Section,{collapsed:!1,title:"my_documents.working_documents",showSettings:!0,filterContents:(0,cn.jsx)(NX,{documentType:W,filterState:P,onSubmit:e=>R(e),isKov:U}),children:_?(0,cn.jsx)(V.SectionLoader,{}):0===I.length?(0,cn.jsxs)("div",{children:[(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_documents.working_documents.no_docs"})}),U&&(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Link,{text:"my_documents.view_all_institution_documents",onClick:()=>{x({signingDocs:y.signingDocs,workingDocs:!0,finishedDocs:y.finishedDocs})}})}),(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(LX,{linkGen:g})})]}):(0,cn.jsx)(TX,{linkGen:g,userInfo:v,documentType:W,onAllUsersChecked:e=>{x({signingDocs:y.signingDocs,workingDocs:e,finishedDocs:y.finishedDocs})},isAllUsersChecked:y.workingDocs,filter:P,onDocumentDelete:e=>function(e){const t=e.slice(0,e.indexOf("/")),n=e.slice(e.indexOf("/")+1);ln.documentApiService.deleteApplicationByNumber(t,n),b(h(e))}(e),fileApi:ln.fileApiService})}),(0,cn.jsx)(V.Section,{collapsed:!1,title:"my_documents.finished_documents",showSettings:!0,filterContents:(0,cn.jsx)(NX,{documentType:Y,filterState:L,onSubmit:e=>F(e),isKov:U}),children:k?(0,cn.jsx)(V.SectionLoader,{}):0===D.length?(0,cn.jsxs)("div",{children:[(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_documents.finished_documents.no_docs"})}),U&&(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Link,{text:"my_documents.view_all_institution_documents",onClick:()=>{x({signingDocs:y.signingDocs,workingDocs:y.workingDocs,finishedDocs:!0})}})}),(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(LX,{linkGen:g})})]}):(0,cn.jsx)(TX,{linkGen:g,userInfo:v,documentType:Y,onAllUsersChecked:e=>{x({signingDocs:y.signingDocs,workingDocs:y.workingDocs,finishedDocs:e}),T(!0)},isAllUsersChecked:y.finishedDocs,filter:L,fileApi:ln.fileApiService})})]})},KX={MENSEIS_TAIENDAMISEL:["MENSEIS_TAIENDAMISEL","MENSEIS_ESITATUD_TAPSUST","MENSEIS_MEN_EHITUSL_TAOT_TAPS","MENSEIS_MEN_KASUTUSL_TAOT_TAPS","MENSEIS_MEN_EDASTATUD_MARK_LAHEND"],MENSEIS_ALGATATUD:["MENSEIS_ALGATATUD","MENSEIS_ESITATUD"],MENSEIS_KAIMASOLEV:["MENSEIS_KAIMASOLEV","MENSEIS_MEN","MENSEIS_MEN_KNT_TAOT","MENSEIS_EHITUSTEGEVUS_ALANUD","MENSEIS_EHITUSTEGEVUS_LOPPENUD","MENSEIS_EHITUSTEG_LOPP","MENSEIS_LAMMUTATUD","MENSEIS_MEN_EHITUSL_TAOT","MENSEIS_MEN_KASUTUSL_TAOT","MENSEIS_MEN_LAMMUTUSL_TAOT"],MENSEIS_LOPETATUD:["MENSEIS_LOPETATUD","MENSEIS_MEN_ALLKIRJASTATUD","MENSEIS_MEN_KNT_ANTUD","MENSEIS_MEN_KNT_KEELD","MENSEIS_EHITUSL_KEHTETU","MENSEIS_KASUTUSL_KEHTETU","MENSEIS_KNT_KEHTETU","MENSEIS_MEN_EHITUSL_ANTUD","MENSEIS_MEN_EHITUSL_KEELD","MENSEIS_MEN_KASUTUSL_ANTUD","MENSEIS_MEN_KASUTUSL_KEELD","MENSEIS_MEN_LAMMUTUSL_ANTUD","MENSEIS_MEN_LAMMUTUSL_KEELD","MENSEIS_MEN_PRO_TING_ANTUD","MENSEIS_MEN_TEAVITATUD"],MENSEIS_MUUTMISEL:["MENSEIS_MUUTMISEL","MENSEIS_MEN_TAIENDAB"],MENSEIS_PEATATUD:["MENSEIS_PEATATUD"],MENSEIS_ARHIIVIS:["MENSEIS_ARHIIVIS"]};function $X(e){return sX(KX,e)}function VX(e){const t=$X(e);return t?function(e){switch(e){case"MENSEIS_TAIENDAMISEL":return{name:"Algdokument täiendamisel",type:"warning"};case"MENSEIS_ALGATATUD":return{name:"Algatatud",type:"info"};case"MENSEIS_KAIMASOLEV":return{name:"Käimasolev",type:"info"};case"MENSEIS_LOPETATUD":return{name:"Lõpetatud",type:"success"};case"MENSEIS_MUUTMISEL":return{name:"Algdokument muutmisel",type:"info"};case"MENSEIS_PEATATUD":return{name:"Peatatud",type:"warning"};case"MENSEIS_ARHIIVIS":return{name:"Arhiivis",type:"default"};default:return{name:e,type:"default"}}}(t):{name:e,type:"default"}}const HX=[{code:"MENSEIS_TAIENDAMISEL",value:"Algdokument täiendamisel"},{code:"MENSEIS_ALGATATUD",value:"Algatatud"},{code:"MENSEIS_KAIMASOLEV",value:"Käimasolev"},{code:"MENSEIS_LOPETATUD",value:"Lõpetatud"},{code:"MENSEIS_MUUTMISEL",value:"Algdokument muutmisel"},{code:"MENSEIS_PEATATUD",value:"Peatatud"}];function WX(){return HX.map((e=>({id:e.code+"",label:e.value,level:2,children:[],selectable:!0,value:!1})))}function YX(e,t){if(console.log("filterService",t),t.documentTypes.length>0&&(e=e.filter((e=>void 0!==e.doty&&t.documentTypes.includes(e.doty)))),t.ehrCode.length>0&&(e=e.filter((e=>{var n;return null===(n=e.ehrCode)||void 0===n?void 0:n.some((e=>{var n;return null!==(n=e.startsWith(t.ehrCode.trim()))&&void 0!==n&&n}))}))),t.buildingName.length>0&&(e=e.filter((e=>{var n;return null===(n=e.buildingName)||void 0===n?void 0:n.some((e=>{var n,r;return null!==(n=null===(r=e.toLocaleLowerCase())||void 0===r?void 0:r.includes(t.buildingName.toLocaleLowerCase()))&&void 0!==n&&n}))}))),t.wordInAddress.length>0&&(e=e.filter((e=>{var n,r;return null!==(n=null===(r=e.address)||void 0===r?void 0:r.some((e=>e.toLocaleLowerCase().includes(t.wordInAddress.trim().toLocaleLowerCase()))))&&void 0!==n&&n}))),t.proceedingNumber.length>0&&(e=e.filter((e=>{var n,r;return null!==(n=null===(r=e.proceedingNr)||void 0===r?void 0:r.includes(t.proceedingNumber.trim()))&&void 0!==n&&n}))),t.proceedingStates.length>0&&(e=e.filter((e=>void 0!==e.stateCode&&t.proceedingStates.includes($X(e.stateCode))))),t.connectedPerson.length>0&&(e=e.filter((e=>{var n,r;return null!==(n=null===(r=e.supervisor)||void 0===r?void 0:r.startsWith(t.connectedPerson))&&void 0!==n&&n}))),!1===t.showProceedingInArchive&&(e=e.filter((e=>"Ei"===e.archived))),t.supervisors.length>0&&(e=e.filter((e=>void 0!==e.supervisorId&&t.supervisors.includes(e.supervisorId.toString())))),t.proceedingDate.from.length>0&&0===t.proceedingDate.to.length){const n=new Date(t.proceedingDate.from).getTime();e=e.filter((e=>new Date(zJ()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n))}if(t.proceedingDate.to.length>0&&0===t.proceedingDate.from.length){const n=new Date(t.proceedingDate.to).getTime();e=e.filter((e=>new Date(zJ()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=n))}if(t.proceedingDate.from.length>0&&t.proceedingDate.to.length>0){const n=new Date(t.proceedingDate.from).getTime(),r=new Date(t.proceedingDate.to).getTime();e=e.filter((e=>new Date(zJ()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n&&new Date(zJ()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=r))}if(t.lastEventDate.length>0){const n=new Date(t.lastEventDate).getTime();e=e.filter((e=>e.lastEventDate&&new Date(zJ()(e.lastEventDate).format("YYYY-MM-DD")).getTime()<=n))}return e}function qX(){return HX.filter((e=>"MENSEIS_TAIENDAMISEL"!==e.code&&"MENSEIS_MUUTMISEL"!==e.code&&"MENSEIS_LOPETATUD"!==e.code&&"MENSEIS_PEATATUD"!==e.code)).map((e=>({id:e.code})))}let GX=function(e){return e.Document="DOCUMENT",e.Proceeding="PROCEEDING",e.AdminProceeding="ADMIN_PROCEEDING",e.ProceedingDecision="PROCEEDING_DECISION",e.Operation="OPERATION",e.MyDocuments="MY_DOCUMENTS",e.MyProceedings="MY_PROCEEDINGS",e.MyAdministrativeProceedings="MY_ADMIN_PROCEEDINGS",e.Building="BUILDING",e.NewEnergy="NEW_ENERGY",e.ArchiveBuildingRegistryFile="ARCHIVE_BUILDINGREGISTRYFILE",e.ArchiveBuildingDatasOf2003="ARCHIVE_BUILDINGDATAASOF2003",e.ArchiveBuildingDatasOf2014="ARCHIVE_BUILDINGDATAASOF2014",e.Restriction="RESTRICTION",e.NotFound="404",e}({});const JX=e=>e?(e=>[...be,...ye].includes(e))(e)?GX.AdminProceeding:GX.Proceeding:GX.NotFound,XX=e=>{const t=(0,$.useIntl)(),[n,r]=(0,B.useState)({offset:0,limit:50}),[o,i]=(0,B.useState)([]),[a,s]=(0,B.useState)({column:5,direction:GJ}),[l,c]=(0,B.useState)(!1),[u,d]=(0,B.useState)(!1),[p,f]=(0,B.useState)(!1),h=(0,UJ.useSelector)((e=>e.myViewsPage.myProceedings.myProceedings)),m=[e=>aX(e.dateStart)?new Date(zJ()(e.dateStart,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>aX(e.deadline)?new Date(zJ()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.state)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.proceedingCircleNr)&&void 0!==t?t:""},e=>e.operationsCount?{done:e.operationsCount.split("/")[0],all:e.operationsCount.split("/")[1]}:"",e=>aX(e.innerCommentDeadline)?new Date(e.innerCommentDeadline).getTime():Number.MAX_SAFE_INTEGER,e=>aX(e.lastEventDate)?new Date(e.lastEventDate).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.document)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""},e=>e.buildingName&&e.buildingName[0]?e.buildingName[0]:"",e=>e.ehrCode&&e.ehrCode[0]?e.ehrCode[0]:"",e=>e.address&&e.address[0]?e.address[0]:"",e=>{var t;return null!==(t=e.proceedingName)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.supervisor)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.documentPresenter)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.archived)&&void 0!==t?t:""},e=>e.proceedingLength?e.proceedingLength:Number.MAX_SAFE_INTEGER];(0,B.useEffect)((()=>{if(h){const e=5,t=XJ(e,a);t.direction===qJ&&(t.direction=GJ),s(t),i(YJ(h,m[e],t.direction))}}),[h]),(0,B.useEffect)((()=>{h&&Object.keys(e.filter).length>0&&(a.direction===qJ?i(YX(h,e.filter)):i(YJ(YX(h,e.filter),m[a.column],a.direction)),r({offset:0,limit:50}))}),[e.filter,h]),(0,B.useEffect)((()=>{a&&a.direction!==qJ&&0!==o.length&&i(YJ(o,m[a.column],a.direction))}),[a]);const g=["my_proceedings.date_start","my_proceedings.deadline","my_proceedings.proceeding_nr","my_proceedings.state","my_proceedings.proceeding_circle_nr","my_proceedings.operations_count","my_proceedings.inner_comment_deadline","my_proceedings.last_event","my_proceedings.document","my_proceedings.document_type","my_proceedings.building_name","my_proceedings.ehr_code","my_proceedings.address","my_proceedings.proceeding_name","my_proceedings.supervisor","my_proceedings.document_presenter","my_proceedings.archived","my_proceedings.proceeding_length"];return(0,cn.jsxs)(V.Section,{form:!0,children:[o&&(0,cn.jsx)(V.CollapseTable,{content:(t=>{const r=t,{linkGen:o}=e;return r.slice(n.offset,n.offset+n.limit).map((t=>{var n,r,i,a,s,h;let m={addresses:[],ehrCodes:[],buildingNames:[]};t.address&&(null===(n=t.address)||void 0===n?void 0:n.length)>1&&(m=function(e,t,n){let r={addresses:[],ehrCodes:[],buildingNames:[]};if(e&&e.length>1){let o=[];for(let r=0;r<e.length;r++){let i=e[r].split(",");o.push({county:i[0],city:i[1]?i[1].trimStart():"",other:i[2]?i[2].trimStart()+","+i[3]:"",ehrCode:t?t[r]:"",buildingName:n?n[r]:""})}const i=o.reduce(((e,t)=>{var n;const{county:r}=t;return e[r]=null!==(n=e[r])&&void 0!==n?n:[],e[r].push(t),e}),{});let a=[];o.forEach((e=>{const t=e.county;a.includes(t)||a.push(t)}));let s=[];o.forEach((e=>{const t=e.city;s.includes(t)||s.push(t)})),a.forEach((e=>{const t=i[e].reduce(((e,t)=>{var n;const{city:r}=t;return e[r]=null!==(n=e[r])&&void 0!==n?n:[],e[r].push(t),e}),{});i[e]=t}));let l=[],c=[],u=[];a.forEach((e=>{s.forEach((t=>{let n="";if(i[e][t]){n+=e+", "+t;for(let r=0;r<i[e][t].length;r++){const o=i[e][t][r];n+=", "+o.other,0===r?l.push(n):l.push(o.other),c.push(o.ehrCode),u.push(o.buildingName)}}}))})),r={addresses:l,ehrCodes:c,buildingNames:u}}return r}(t.address,t.ehrCode,t.buildingName));const g=JX(t.doty);return(0,cn.jsx)(V.CollapseTableRow,{fields:[t.dateStart,zJ()(t.deadline,"DD.MM.YYYY").valueOf()<zJ()().valueOf()?(0,cn.jsx)("div",{className:"red-text",children:null===(r=t.deadline)||void 0===r?void 0:r.toString()}):t.deadline,(0,cn.jsx)(V.Tooltip,{content:(0,cn.jsx)(V.Text,{raw:"my_proceedings.tooltip.open_proceeding"}),placement:"bottom",theme:"dark",children:(0,cn.jsx)(V.Link,{onClick:e=>{o(!0,e,g,t.proceedingNr)},text:t.proceedingNr,href:o(!1,void 0,g,t.proceedingNr)})},t.proceedingNr),t.stateCode?(0,cn.jsx)(V.Status,{type:VX(t.stateCode).type,children:VX(t.stateCode).name}):"",t.proceedingCircleNr,t.operationsCount,t.innerCommentDeadline?zJ()(t.innerCommentDeadline).valueOf()<=zJ()().valueOf()?(0,cn.jsx)("div",{style:{color:"#00b649"},children:zJ()(t.innerCommentDeadline).format("DD.MM.YYYY")}):zJ()(t.innerCommentDeadline).format("DD.MM.YYYY"):"",t.lastEventDate?zJ()(t.lastEventDate).format("DD.MM.YYYY"):"",(0,cn.jsx)(fn,{linkName:t.document,tooltipText:"my_proceedings.tooltip.open_document",functionCall:n=>{e.linkGen(!0,n,"DOCUMENT",t.document)}}),t.documentType,t.buildingName&&(null===(i=t.buildingName)||void 0===i?void 0:i.length)>0?(0,cn.jsx)("div",{children:p?(0,cn.jsxs)("div",{children:[m.buildingNames.map((e=>(0,cn.jsxs)(cn.Fragment,{children:[e,";",(0,cn.jsx)("br",{})]}))),t.buildingName.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),f(!p)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.link.view_less_building_names"})})]}):1===t.buildingName.length?t.buildingName:(0,cn.jsxs)("div",{children:[null===(a=m.buildingNames)||void 0===a?void 0:a.slice(0,4).map((e=>(0,cn.jsxs)(cn.Fragment,{children:[e,";",(0,cn.jsx)("br",{})]}))),null===(s=m.buildingNames)||void 0===s?void 0:s.slice(4,5),t.buildingName.length>5?" ...":"",t.buildingName.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),f(!p)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.link.view_all_building_names"})})})]})}):"",t.ehrCode?(0,cn.jsx)("div",{children:u?(0,cn.jsxs)("div",{children:[m.ehrCodes.map((t=>(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(fn,{linkName:t,tooltipText:"my_proceedings.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}),(0,cn.jsx)("br",{})]}))),t.ehrCode.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),d(!u)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.link.view_less_ehrCodes"})})]}):1===t.ehrCode.length?(0,cn.jsx)(fn,{linkName:t.ehrCode[0],tooltipText:"my_proceedings.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t.ehrCode)},href:e.linkGen(!1,void 0,"BUILDING",t.ehrCode)}):(0,cn.jsxs)("div",{children:[m.ehrCodes.slice(0,4).map(((t,n)=>(0,cn.jsxs)(K().Fragment,{children:[(0,cn.jsx)(fn,{linkName:t,tooltipText:"my_proceedings.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}),(0,cn.jsx)("br",{})]},n))),m.ehrCodes.slice(4,5).map((t=>(0,cn.jsx)(fn,{linkName:t,tooltipText:"my_proceedings.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}))),t.ehrCode.length>5?" ...":"",t.ehrCode.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),d(!u)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.link.view_all_ehrCodes"})})})]})}):"",t.address?(0,cn.jsx)("div",{style:{width:125},children:l?(0,cn.jsxs)("div",{children:[m.addresses.map((e=>(0,cn.jsxs)(cn.Fragment,{children:[e,";",(0,cn.jsx)("br",{})]}))),t.address.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),c(!l)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.link.view_less_addresses"})})]}):1===t.address.length?t.address:(0,cn.jsxs)("div",{children:[m.addresses.slice(0,4).map((e=>(0,cn.jsxs)(cn.Fragment,{children:[e,";",(0,cn.jsx)("br",{})]}))),null===(h=m.addresses)||void 0===h?void 0:h.slice(4,5),t.address.length>5?" ...":"",t.address.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),c(!l)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.link.view_all_addresses"})})})]})}):"",t.proceedingName,t.supervisor,t.documentPresenter,t.archived,t.proceedingLength]},t.id)}))})(o),headers:g.map(((e,n)=>(0,cn.jsxs)("div",{children:[(0,cn.jsx)("a",{className:"link-gray",style:{paddingRight:"2px"},onClick:()=>{const e=XJ(n,a);s(e)},children:a.column===n?(0,cn.jsx)(ZJ,{sortDirection:a.direction}):(0,cn.jsx)(ZJ,{sortDirection:qJ})}),t.formatMessage({id:e})]}))),paginationEnabled:!0,pager:{offset:n.offset,limit:n.limit,total:o.length},onPaginationReload:r}),(0,cn.jsx)(cn.Fragment,{children:e.isKov?(0,cn.jsx)("div",{className:"d-flex justify-content-start",children:(0,cn.jsx)(V.Checkbox,{name:"checkbox",onChange:t=>e.onAllUsersChecked(t),text:(0,cn.jsx)(V.Text,{raw:"my_proceedings.view_all_institution_proceedings"}),checked:e.isAllUsersChecked})}):null})]})},ZX={documentTypes:[],ehrCode:"",buildingName:"",wordInAddress:"",proceedingNumber:"",cadastralNumber:"",proceedingStates:["MENSEIS_ALGATATUD","MENSEIS_KAIMASOLEV"],connectedPerson:"",showProceedingInArchive:!1,supervisors:[],proceedingDate:{from:"",to:""},lastEventDate:""},QX=e=>{let{onSubmit:t,isKov:n,filterState:r}=e;const o=(0,$.useIntl)(),i=/^[\\s0-9]{0,9}$/,a=/^([\\s0-9]{5}:[\\s0-9]{3}:[\\s0-9]{1,4}|[\\s0-9]{5}:[\\s0-9]{1,3}|[\\s0-9]{1,5})$/,[s,l]=(0,B.useState)(r),[c,u]=(0,B.useState)(!0),[d,p]=(0,B.useState)(!0),[f,h]=(0,B.useState)(""),[m,g]=(0,B.useState)(""),[v,b]=(0,B.useState)([]),[y,x]=(0,B.useState)([]),[w]=(0,B.useState)(WX()),[S,_]=(0,B.useState)([]),[E,k]=(0,B.useState)(qX()),T=(0,UJ.useSelector)((e=>e.myViewsPage.filter.documentTypes)),C=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutionUsers));function O(e){return i.test(e)}function I(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],k(n.map((e=>({id:e})))),l((e=>({...e,[t]:n})))}function M(e,t){"ehrCode"===t&&O(e)?u(!0):"cadastralNumber"===t&&function(e){return 0===e.length||a.test(e)}(e)&&p(!0),l((n=>({...n,[t]:e})))}(0,B.useEffect)((()=>{if(T){const e=MX(T);b(e)}if(C&&n){const e=DX([...C]);x(e)}}),[T,C]);return(0,cn.jsxs)(V.Form,{onSubmit:()=>t(s),children:[(0,cn.jsxs)(V.Row,{className:"align-items-start",children:[(0,cn.jsxs)(V.Col,{sm:10,className:"mx-0 px-0",children:[(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:v,onSelect:e=>I(e,"documentTypes"),allSelection:!0,onRemoveItem:e=>I(e,"documentTypes"),value:s.documentTypes,selectedOptions:S}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.document_type"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.document_type",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>M(e,"proceedingNumber"),placeholder:o.formatMessage({id:"placeholder.writing"}),value:s.proceedingNumber}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.proceeding_number"}),labelCol:{sm:20,md:8,lg:8}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:w,onSelect:e=>{I(e,"proceedingStates")},allSelection:!0,onRemoveItem:e=>I(e,"proceedingStates"),value:s.proceedingStates,selectedOptions:E}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.proceeding_state"}),labelCol:{sm:20,md:8,lg:8}}),OX(s.showProceedingInArchive,(function(e){l((t=>({...t,showProceedingInArchive:e})))}),"my_proceedings.filter.label.show_archived_proceedings"),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)("div",{className:"daterange_in_form",children:(0,cn.jsx)(V.DateRange,{name:"daterange",onChange:e=>(e=>{""!==e.from&&!zJ()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!zJ()(e.to,"YYYY-MM-DD",!0).isValid()?h(o.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?h(o.formatMessage({id:"filter.invalid_date_range"})):h(""),l((t=>({...t,proceedingDate:e})))})(e),value:s.proceedingDate})}),errorMessage:f.length>0?f:null,label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.proceeding_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.proceeding_date",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.DatePicker,{name:"datepicker-field",value:s.lastEventDate,onChange:e=>function(e){""===e||zJ()(e,"YYYY-MM-DD",!0).isValid()?g(""):g(o.formatMessage({id:"filter.invalid_date_format"})),l((t=>({...t,lastEventDate:e})))}(e)}),errorMessage:m.length>0?m:null,label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.last_event_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.last_event_date",placement:"top-start"}})]}),(0,cn.jsxs)(V.Col,{sm:10,className:"mx-0 px-0",children:[(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>M(e,"ehrCode"),onBlur:e=>u(O(e.trim())),placeholder:o.formatMessage({id:"placeholder.writing"}),value:s.ehrCode}),errorMessage:!c&&(0,cn.jsx)(V.Text,{raw:"filter.invalid_building_code"}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.ehrCode"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.ehrCode",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>M(e,"buildingName"),placeholder:o.formatMessage({id:"placeholder.writing"}),value:s.buildingName}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.building_name"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.building_name",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>M(e,"wordInAddress"),placeholder:o.formatMessage({id:"placeholder.writing"}),value:s.wordInAddress}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.word_in_address"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.word_in_address",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>M(e,"connectedPerson"),placeholder:o.formatMessage({id:"placeholder.writing"}),value:s.connectedPerson}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.connected_person"}),labelCol:{sm:20,md:8,lg:8},info:{content:"my_proceedings.filter.tooltip.connected_person",placement:"top-start"}}),n&&(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:y,onSelect:e=>I(e,"supervisors"),allSelection:!0,onRemoveItem:e=>I(e,"supervisors"),value:s.supervisors,selectedOptions:S}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_proceedings.filter.label.supervisor"}),labelCol:{sm:20,md:8,lg:8}})]})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{onClick:()=>(_([]),l(ZX),void k(qX())),colourScheme:"light",squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.epmty_fields"})})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!(c&&d),squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.search"})})})]})]})},eZ={MENTOIMSEIS_OOTEL:["MENTOIMSEIS_OOTEL","MENTOIMSEIS_JATKAMINE"],MENTOIMSEIS_TEOSTAMISEL:["MENTOIMSEIS_TEOSTAMISEL"],MENTOIMSEIS_TYHISTATUD:["MENTOIMSEIS_TYHISTATUD"],MENTOIMSEIS_TEOSTATUD:["MENTOIMSEIS_TEOSTATUD","MENTOIMSEIS_KOOSKOLA","MENTOIMSEIS_KOOSKOLA_MARK","MENTOIMSEIS_VALMIS","MENTOIMSEIS_VANA_VERSIOON","MENTOIMSEIS_ARHIIVIS","MENTOIMSEIS_EDASTATUD"],MENTOIMSEIS_LOOBUTUD:["MENTOIMSEIS_LOOBUTUD","MENTOIMSEIS_KEELDUTUD","MENTOIMSEIS_TAGASI_LYKATUD"],MENTOIMSEIS_TAHTAEG_MOODUNUD:["MENTOIMSEIS_TAHTAEG_MOODUNUD"]};let tZ=function(e){return e.MENTOIMSEIS_ARHIIVIS="MENTOIMSEIS_ARHIIVIS",e.MENTOIMSEIS_TYISTATUD="MENTOIMSEIS_TYISTATUD",e.MENTOIMSEIS_EDASTATUD="MENTOIMSEIS_EDASTATUD",e.MENTOIMSEIS_TEOSTAMISEL="MENTOIMSEIS_TEOSTAMISEL",e.MENTOIMSEIS_TYHISTATUD="MENTOIMSEIS_TYHISTATUD",e.MENTOIMSEIS_VALMIS="MENTOIMSEIS_VALMIS",e.MENTOIMSEIS_KEELDUTUD="MENTOIMSEIS_KEELDUTUD",e.MENTOIMSEIS_KOOSKOLA="MENTOIMSEIS_KOOSKOLA",e.MENTOIMSEIS_KOOSKOLA_MARK="MENTOIMSEIS_KOOSKOLA_MARK",e.MENTOIMSEIS_OOTEL="MENTOIMSEIS_OOTEL",e.MENTOIMSEIS_TAGASI_LYKATUD="MENTOIMSEIS_TAGASI_LYKATUD",e.MENTOIMSEIS_ADS="MENTOIMSEIS_ADS",e.MENTOIMSEIS_ADS_ESITAMATA="MENTOIMSEIS_ADS_ESITAMATA",e.MENTOIMSEIS_ADS_JOUSTUNUD="MENTOIMSEIS_ADS_JOUSTUNUD",e.MENTOIMSEIS_ADS_KONTROLL="MENTOIMSEIS_ADS_KONTROLL",e.MENTOIMSEIS_ADS_PROBLEEM="MENTOIMSEIS_ADS_PROBLEEM",e.MENTOIMSEIS_ADS_TYHISTATUD="MENTOIMSEIS_ADS_TYHISTATUD",e.MENTOIMSEIS_ADS_TYISTATUD="MENTOIMSEIS_ADS_TYISTATUD",e.MENTOIMSEIS_VANA_VERSIOON="MENTOIMSEIS_VANA_VERSIOON",e.MENTOIMSEIS_LOOBUTUD="MENTOIMSEIS_LOOBUTUD",e.MENTOIMSEIS_TEOSTATUD="MENTOIMSEIS_TEOSTATUD",e.MENTOIMSEIS_TAHTAEG_MOODUNUD="MENTOIMSEIS_TAHTAEG_MOODUNUD",e.MENTOIMSEIS_JATKAMINE="MENTOIMSEIS_JATKAMINE",e}({});function nZ(e){return sX(eZ,e)}const rZ={[tZ.MENTOIMSEIS_OOTEL]:"info",[tZ.MENTOIMSEIS_TEOSTAMISEL]:"info",[tZ.MENTOIMSEIS_TYHISTATUD]:"default",[tZ.MENTOIMSEIS_TEOSTATUD]:"success",[tZ.MENTOIMSEIS_LOOBUTUD]:"default",[tZ.MENTOIMSEIS_TAHTAEG_MOODUNUD]:"default"},oZ={[tZ.MENTOIMSEIS_OOTEL]:"my_operations.operation.state.idle",[tZ.MENTOIMSEIS_TEOSTAMISEL]:"my_operations.operation.state.in_process",[tZ.MENTOIMSEIS_TYHISTATUD]:"my_operations.operation.state.cancelled",[tZ.MENTOIMSEIS_TEOSTATUD]:"my_operations.operation.state.done",[tZ.MENTOIMSEIS_LOOBUTUD]:"my_operations.operation.state.abandoned",[tZ.MENTOIMSEIS_TAHTAEG_MOODUNUD]:"my_operations.operation.state.expired"};function iZ(e,t){return((e,t)=>({state:Object.keys(oZ).includes(e)?t.formatMessage({id:oZ[e]}):e,type:Object.keys(rZ).includes(e)?rZ[e]:"default"}))(nZ(e),t)}const aZ=(e,t)=>({code:e,value:t.formatMessage({id:oZ[e]})});function sZ(e,t){let n;return n=e===X?[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_TYHISTATUD,tZ.MENTOIMSEIS_TEOSTATUD,tZ.MENTOIMSEIS_LOOBUTUD,tZ.MENTOIMSEIS_TAHTAEG_MOODUNUD].map((e=>aZ(e,t))):e===ee?[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_TYHISTATUD,tZ.MENTOIMSEIS_LOOBUTUD,tZ.MENTOIMSEIS_TAHTAEG_MOODUNUD].map((e=>aZ(e,t))):e===te?[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_TEOSTATUD,tZ.MENTOIMSEIS_LOOBUTUD].map((e=>aZ(e,t))):[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_TEOSTATUD,tZ.MENTOIMSEIS_LOOBUTUD,tZ.MENTOIMSEIS_TAHTAEG_MOODUNUD].map((e=>aZ(e,t))),function(e){return e.map((e=>({id:e.code+"",label:e.value,level:2,children:[],selectable:!0,value:!1})))}(n)}function lZ(){return[{code:"11271",value:"Ehitusluba"},{code:"11201",value:"Ehitusteatis"},{code:"11371",value:"Kasutusluba"},{code:"11301",value:"Kasutusteatis"},{code:"11002",value:"Projekteerimistingimused"},{code:"11051",value:"5G pääsupunkti taotlus"}].map((e=>({id:`${e.code}`,label:e.value,level:2,children:[],selectable:!0,value:!1})))}function cZ(e,t){if(t.documentTypes.length>0&&(e=e.filter((e=>e.doty&&void 0!==e.doty&&t.documentTypes.includes(e.doty)))),t.ehrCode.length>0&&(e=e.filter((e=>{var n;return null===(n=e.ehrCode)||void 0===n?void 0:n.some((e=>{var n;return null!==(n=e.startsWith(t.ehrCode.trim()))&&void 0!==n&&n}))}))),t.institutions.length>0&&(e=e.filter((e=>{var n;return e.supervisorJurId&&void 0!==e.supervisorJurId&&t.institutions.includes(null===(n=e.supervisorJurId)||void 0===n?void 0:n.toString())}))),t.wordInAddress.length>0&&(e=e.filter((e=>{var n,r;return null!==(n=null===(r=e.address)||void 0===r?void 0:r.some((e=>null==e?void 0:e.toLocaleLowerCase().includes(t.wordInAddress.trim().toLocaleLowerCase()))))&&void 0!==n&&n}))),t.proceedingNumber.length>0&&(e=e.filter((e=>{var n,r;return null!==(n=null===(r=e.proceedingNr)||void 0===r?void 0:r.includes(t.proceedingNumber.trim()))&&void 0!==n&&n}))),t.operationStates.length>0&&(e=e.filter((e=>e.stateCode&&void 0!==e.stateCode&&t.operationStates.includes(nZ(e.stateCode))))),t.institutionUsers&&t.institutionUsers.length>0&&(e=e.filter((e=>e.operationExecutorId&&void 0!==e.operationExecutorId&&t.institutionUsers.includes(e.operationExecutorId.toString())))),t.operationDate.from.length>0&&0===t.operationDate.to.length){const n=new Date(t.operationDate.from).getTime();e=e.filter((e=>new Date(zJ()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n))}if(t.operationDate.to.length>0&&0===t.operationDate.from.length){const n=new Date(t.operationDate.to).getTime();e=e.filter((e=>new Date(zJ()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=n))}if(t.operationDeadline.from.length>0){const n=new Date(t.operationDeadline.from).getTime();e=e.filter((e=>!e.deadline||new Date(zJ()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n))}if(t.operationDeadline.to.length>0){const n=new Date(t.operationDeadline.to).getTime();e=e.filter((e=>!e.deadline||new Date(zJ()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=n))}if(t.operationDate.from.length>0&&t.operationDate.to.length>0){const n=new Date(t.operationDate.from).getTime(),r=new Date(t.operationDate.to).getTime();e=e.filter((e=>new Date(zJ()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()>=n&&new Date(zJ()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime()<=r))}return e}function uZ(e){return[{id:tZ.MENTOIMSEIS_OOTEL},{id:tZ.MENTOIMSEIS_TEOSTAMISEL},{id:tZ.MENTOIMSEIS_TEOSTATUD},{id:tZ.MENTOIMSEIS_LOOBUTUD}].filter((t=>e.includes(t.id)))}let dZ=function(e){return e.Document="DOCUMENT",e.Proceeding="PROCEEDING",e.AdminProceeding="ADMIN_PROCEEDING",e.AdminOperation="ADMIN_OPERATION",e.ProceedingDecision="PROCEEDING_DECISION",e.Operation="OPERATION",e.MyDocuments="MY_DOCUMENTS",e.MyProceedings="MY_PROCEEDINGS",e.MyAdministrativeProceedings="MY_ADMIN_PROCEEDINGS",e.Building="BUILDING",e.NewEnergy="NEW_ENERGY",e.ArchiveBuildingRegistryFile="ARCHIVE_BUILDINGREGISTRYFILE",e.ArchiveBuildingDatasOf2003="ARCHIVE_BUILDINGDATAASOF2003",e.ArchiveBuildingDatasOf2014="ARCHIVE_BUILDINGDATAASOF2014",e.Restriction="RESTRICTION",e.NotFound="404",e}({});const pZ=["11273","11272"],fZ=e=>{const t=(0,$.useIntl)(),[n,r]=(0,B.useState)({offset:0,limit:10}),[o,i]=(0,B.useState)([]),[a,s]=(0,B.useState)({column:1,direction:JJ}),[l,c]=(0,B.useState)(!1),[u,d]=(0,B.useState)(!1),[p,f]=(0,B.useState)(!1),h=(0,UJ.useSelector)((e=>e.myViewsPage.myOperations.myOperations)),m=(0,UJ.useSelector)((e=>e.myViewsPage.myOperations.toCommentOperations)),g=(0,UJ.useSelector)((e=>e.myViewsPage.myOperations.operationInvitations)),v=(0,UJ.useSelector)((e=>e.myViewsPage.myProceedings.proceedingsToComment)),b=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutions)),y=(0,UJ.useSelector)((e=>e.myViewsPage.filter.documentTypes)),x=[e=>aX(e.invitationDate)?new Date(zJ()(e.invitationDate,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>aX(e.deadline)?new Date(zJ()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.state)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.operationExecutor)&&void 0!==t?t:""},e=>{var t,n;return null!==(t=null===(n=y.find((t=>t.id.toString()===e.doty)))||void 0===n?void 0:n.name)&&void 0!==t?t:""},e=>void 0!==e.buildingName&&null!==e.buildingName&&aX(e.buildingName[0])?e.buildingName[0]:"",e=>void 0!==e.ehrCode&&null!==e.ehrCode&&aX(e.ehrCode[0])?e.ehrCode[0]:"",e=>void 0!==e.address&&null!==e.address&&aX(e.address[0])?e.address[0]:"",e=>{var t,n;return null!==(t=null===(n=b.find((t=>t.id===e.supervisorJurId)))||void 0===n?void 0:n.regName)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.supervisor)&&void 0!==t?t:""}];(0,B.useEffect)((()=>{!h||e.viewType!==J&&e.viewType!==G||(i(cZ(h,e.filter)),r({offset:0,limit:10}))}),[h,e.filter]),(0,B.useEffect)((()=>{h&&e.viewType===X&&(i(YJ(cZ(h,e.filter),x[0],JJ)),r({offset:0,limit:10}))}),[h,e.filter]),(0,B.useEffect)((()=>{m&&e.viewType===Q&&(a.direction===qJ?i(cZ(m,e.filter)):i(YJ(cZ(m,e.filter),x[a.column],a.direction)),r({offset:0,limit:10}))}),[m,e.filter]),(0,B.useEffect)((()=>{g&&e.viewType===ee&&(i(cZ(g,e.filter)),r({offset:0,limit:10}))}),[g,e.filter]),(0,B.useEffect)((()=>{v&&e.viewType===te&&(a.direction===qJ?i(cZ(v,e.filter)):i(YJ(cZ(v,e.filter),x[a.column],a.direction)))}),[v,e.filter]);const w=["my_operations.invitation_date","my_operations.deadline","my_operations.proceeding_nr","my_operations.state","my_operations.operation_executor","my_operations.connected_document_type","my_operations.building_name","my_operations.ehr_code","my_operations.building_address","my_operations.institution","my_operations.supervisor"],S=["my_operations.deadline","my_operations.proceeding_nr","my_operations.state","my_operations.supervisor","my_operations.connected_document_type","my_operations.building_address"],_=[e=>aX(e.deadline)?new Date(zJ()(e.deadline,"DD.MM.YYYY").format("YYYY-MM-DD")).getTime():Number.MAX_SAFE_INTEGER,e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.state)&&void 0!==t?t:""},e=>{var t;return null!==(t=e.supervisor)&&void 0!==t?t:""},e=>{var t,n;return null!==(t=null===(n=y.find((t=>t.id.toString()===e.doty)))||void 0===n?void 0:n.name)&&void 0!==t?t:""},e=>void 0!==e.address&&null!==e.address&&aX(e.address[0])?e.address[0]:""];const E=t=>{let n=dZ.Operation;return e.viewType===te?(n=t.doty&&pZ.includes(t.doty)?dZ.AdminProceeding:dZ.Proceeding,e.linkGen(!1,void 0,n,t.proceedingNr)):((t.doty&&pZ.includes(t.doty)||t.typeCode===ce.MENTOIMLIIK_KAAS_TAGASISIDE)&&(n=dZ.AdminOperation),e.linkGen(!1,void 0,n,t.id))};return(0,cn.jsxs)(V.Section,{form:!0,children:[o&&(0,cn.jsx)(V.CollapseTable,{content:(r=>r.slice(n.offset,n.offset+n.limit).map((n=>{var r,o,i,a,s,h,m,g;const v=[n.invitationDate,zJ()(n.deadline,"DD.MM.YYYY").valueOf()<zJ()().valueOf()?(0,cn.jsx)("div",{className:"red-text",children:n.deadline}):n.deadline,(0,cn.jsx)(V.Tooltip,{content:(0,cn.jsx)(V.Text,{raw:"my_operations.tooltip.open_proceeding"}),placement:"bottom",theme:"dark",children:(0,cn.jsx)(V.Link,{text:n.proceedingNr,href:E(n)})},n.proceedingNr),n.stateCode?(0,cn.jsx)(V.Status,{type:iZ(n.stateCode,t).type,children:iZ(n.stateCode,t).state}):"",n.operationExecutor,n.doty?null===(r=y.find((e=>e.id.toString()===n.doty)))||void 0===r?void 0:r.name:"",n.buildingName?(0,cn.jsx)("div",{children:p?(0,cn.jsxs)("div",{children:[n.buildingName.map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[e,";",(0,cn.jsx)("br",{})]},t))),n.buildingName.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),f(!p)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.link.view_less_building_names"})})]}):1===n.buildingName.length?n.buildingName:(0,cn.jsxs)("div",{children:[null===(o=n.buildingName)||void 0===o?void 0:o.slice(0,4).map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[e,";",(0,cn.jsx)("br",{})]},t))),null===(i=n.buildingName)||void 0===i?void 0:i.slice(4,5),n.buildingName.length>5?" ...":"",n.buildingName.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),f(!p)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.link.view_all_building_names"})})})]})}):"",n.ehrCode?(0,cn.jsx)("div",{children:u?(0,cn.jsxs)("div",{children:[n.ehrCode.map(((t,n)=>(0,cn.jsxs)(K().Fragment,{children:[(0,cn.jsx)(fn,{linkName:t,tooltipText:"my_operations.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}),(0,cn.jsx)("br",{})]},n))),n.ehrCode.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),d(!u)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.link.view_less_ehrCodes"})})]}):(0,cn.jsxs)("div",{children:[null===(a=n.ehrCode)||void 0===a?void 0:a.slice(0,4).map(((t,n)=>(0,cn.jsxs)(K().Fragment,{children:[(0,cn.jsx)(fn,{linkName:t,tooltipText:"my_operations.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}),(0,cn.jsx)("br",{})]},n))),null===(s=n.ehrCode)||void 0===s?void 0:s.slice(4,5).map((t=>(0,cn.jsx)(fn,{linkName:t,tooltipText:"my_operations.tooltip.open_building",functionCall:n=>{e.linkGen(!0,n,"BUILDING",t)},href:e.linkGen(!1,void 0,"BUILDING",t)}))),n.ehrCode.length>5?" ...":"",n.ehrCode.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),d(!u)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.link.view_all_ehrCodes"})})})]})}):"",n.address?(0,cn.jsx)("div",{children:l?(0,cn.jsxs)("div",{children:[n.address.map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[e,";",(0,cn.jsx)("br",{})]},t))),n.address.length>5&&(0,cn.jsx)(V.Link,{type:"hide",onClick:e=>{e.preventDefault(),c(!l)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.link.view_less_addresses"})})]}):1===n.address.length?n.address:(0,cn.jsxs)("div",{children:[null===(h=n.address)||void 0===h?void 0:h.slice(0,4).map(((e,t)=>(0,cn.jsxs)(K().Fragment,{children:[e,";",(0,cn.jsx)("br",{})]},t))),null===(m=n.address)||void 0===m?void 0:m.slice(4,5),n.address.length>5?" ...":"",n.address.length>5&&(0,cn.jsx)("div",{className:"pr-3",children:(0,cn.jsx)(V.Link,{type:"show",onClick:e=>{e.preventDefault(),c(!l)},text:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.link.view_all_addresses"})})})]})}):"",n.supervisorJurId?null===(g=b.find((e=>e.id===n.supervisorJurId)))||void 0===g?void 0:g.regName:"",n.supervisor],x=[...v];x.splice(4,1);const w=[...v].slice(1,4).concat(v[10]).concat(v[5]).concat(v[8]);return(0,cn.jsx)(V.CollapseTableRow,{fields:e.viewType===X?x:e.viewType===te?w:v},n.id)})))(o),headers:function(){const n=[...w];n.splice(4,1);const r=e.viewType===X?n:e.viewType===te?S:w,l=[...x];l.splice(4,1);const c=e.viewType===X?l:e.viewType===te?_:x;return r.map(((e,n)=>(0,cn.jsxs)("div",{children:[(0,cn.jsx)("a",{className:"link-gray",style:{paddingRight:"2px"},onClick:()=>{const e=XJ(n,a);s(e),e.direction!==qJ&&i(YJ(o,c[n],e.direction))},children:a.column===n?(0,cn.jsx)(ZJ,{sortDirection:a.direction}):(0,cn.jsx)(ZJ,{sortDirection:qJ})}),t.formatMessage({id:e})]})))}(),paginationEnabled:!0,pager:{offset:n.offset,limit:n.limit,total:o.length},onPaginationReload:r}),(e.viewType===G||e.viewType===J)&&(0,cn.jsx)("div",{className:"d-flex justify-content-start",children:(0,cn.jsx)(V.Checkbox,{name:"checkbox",onChange:t=>e.onAllUsersChecked(t),text:e.viewType===G?(0,cn.jsx)(V.Text,{raw:"my_approvals.view_all_institution_approvals"}):(0,cn.jsx)(V.Text,{raw:"my_opinions.view_all_institution_opinions"}),checked:e.isAllUsersChecked})})]})},hZ=e=>{var t;const n=(0,$.useIntl)(),r=/^[\\s0-9]{0,9}$/,o=/^([\\s0-9]{5}:[\\s0-9]{3}:[\\s0-9]{1,4}|[\\s0-9]{5}:[\\s0-9]{1,3}|[\\s0-9]{1,5})$/,i=null!==(t=e.initialFilter)&&void 0!==t?t:{documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[],institutionUsers:[],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},a={...i,operationStates:[tZ.MENTOIMSEIS_TEOSTAMISEL]},s={...i,operationStates:[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_JATKAMINE]},l={...i,operationStates:[tZ.MENTOIMSEIS_OOTEL]},[c,u]=(0,B.useState)(e.filterState),[d,p]=(0,B.useState)(uZ(c.operationStates)),[f,h]=(0,B.useState)(!0),[m,g]=(0,B.useState)(!0),[v,b]=(0,B.useState)(""),[y,x]=(0,B.useState)(""),w=(0,B.useMemo)((()=>lZ()),[]),[S,_]=(0,B.useState)([]),[E,k]=(0,B.useState)([]),T=(0,B.useMemo)((()=>sZ(e.viewType,n)),[e.viewType]),[C,O]=(0,B.useState)([]),I=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutionUsers)),M=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutions));function D(e){return r.test(e)}function j(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],c[t]=n,u((e=>({...e})))}function A(e,t){c[t]=e,"ehrCode"===t&&D(e)?h(!0):"cadastralNumber"===t&&function(e){return 0===e.length||o.test(e)}(e)&&g(!0),u((e=>({...e})))}(0,B.useEffect)((()=>{if(I){const e=DX(I?[...I]:[]);k(e)}if(M){const e=jX([...M]);_(e)}}),[I,M]);return(0,cn.jsxs)(V.Form,{onSubmit:()=>e.onSubmit(c),children:[(0,cn.jsx)(V.Row,{className:"align-items-start",children:(0,cn.jsx)(V.Col,{sm:10,className:"mx-0 px-0",children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:w,onSelect:e=>j(e,"documentTypes"),allSelection:!0,onRemoveItem:e=>j(e,"documentTypes"),value:c.documentTypes,selectedOptions:C}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.document_type"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})})}),(0,cn.jsx)(V.Row,{className:"align-items-start",children:(0,cn.jsx)(V.Col,{sm:10,className:"mx-0 px-0",children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>A(e,"ehrCode"),onBlur:e=>g(D(e.trim())),placeholder:n.formatMessage({id:"placeholder.writing"}),value:c.ehrCode}),errorMessage:!f&&(0,cn.jsx)(V.Text,{raw:"filter.invalid_building_code"}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.ehrCode"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})})}),(0,cn.jsxs)(V.Row,{className:"align-items-start",children:[(0,cn.jsxs)(V.Col,{sm:10,className:"mx-0 px-0",children:[(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:S,onSelect:e=>j(e,"institutions"),allSelection:!0,onRemoveItem:e=>j(e,"institutions"),value:c.institutions,selectedOptions:C}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.institution"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>A(e,"proceedingNumber"),placeholder:n.formatMessage({id:"placeholder.writing"}),value:c.proceedingNumber}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.proceeding_number"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:T,onSelect:e=>j(e,"operationStates"),allSelection:!0,onRemoveItem:e=>j(e,"operationStates"),value:c.operationStates,selectedOptions:d}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.operation_state"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(AX,{onChange:e=>(e=>{""!==e.from&&!zJ()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!zJ()(e.to,"YYYY-MM-DD",!0).isValid()?b(n.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?b(n.formatMessage({id:"filter.invalid_date_range"})):b(""),u((t=>({...t,operationDate:e})))})(e),value:c.operationDate}),errorMessage:v.length>0?v:null,label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.operation_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})]}),(0,cn.jsxs)(V.Col,{sm:10,className:"mx-0 px-0",children:[(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>A(e,"wordInAddress"),placeholder:n.formatMessage({id:"placeholder.writing"}),value:c.wordInAddress}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.word_in_address"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:E,onSelect:e=>j(e,"institutionUsers"),allSelection:!0,onRemoveItem:e=>j(e,"institutionUsers"),value:c.institutionUsers,selectedOptions:C}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.institution_users"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(AX,{onChange:e=>(e=>{""!==e.from&&!zJ()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!zJ()(e.to,"YYYY-MM-DD",!0).isValid()?x(n.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?x(n.formatMessage({id:"filter.invalid_date_range"})):x(""),u((t=>({...t,operationDeadline:e})))})(e),value:c.operationDeadline}),errorMessage:y.length>0?y:null,label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.operation_deadline"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})]})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{onClick:()=>function(){let t;switch(O([]),e.viewType){case Z:t=a;break;case Q:case te:t=s;break;case ee:t=l;break;default:t=i}u(t),p(uZ(t.operationStates))}(),colourScheme:"light",squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.epmty_fields"})})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!(f&&m),squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.search"})})})]})]})},mZ=e=>{var t,n,o,i;let{classifierApiEndpoint:s,fileUploadApiEndpoint:l,linkGen:c,myViewsApiEndpoint:u,userInfo:d,userApiEndpoint:p}=e;const f=(0,UJ.useDispatch)(),[h,m]=(0,B.useState)({proceedings:!1}),[g,v]=(0,B.useState)(!0),[w,S]=(0,B.useState)(!0),[_,E]=(0,B.useState)(!0),[k,T]=(0,B.useState)([]),[C,O]=(0,B.useState)([]),[I,M]=(0,B.useState)([]),D=new Ne(new yt({basePath:s})),j=new Qe(new yt({basePath:p})),A=new bt(new yt({basePath:u})),N=new pt(new yt({basePath:u})),P=new gt(new yt({basePath:u})),R=new Ht(new Wt({basePath:l})),L="A"!==(null===(t=d.activeRole)||void 0===t?void 0:t.businessType);let F=new Date;F.setDate(F.getDate()-7);const U={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:["MENTOIMSEIS_OOTEL","MENTOIMSEIS_TEOSTAMISEL"],institutionUsers:[(null===(n=d.activeRole)||void 0===n?void 0:n.userId)+""],operationDate:{from:"",to:""},operationDeadline:{from:F.toISOString().split("T")[0],to:""}},[z,K]=(0,B.useState)({documentTypes:[],ehrCode:"",buildingName:"",wordInAddress:"",proceedingNumber:"",cadastralNumber:"",proceedingStates:["MENSEIS_ALGATATUD","MENSEIS_KAIMASOLEV"],connectedPerson:"",showProceedingInArchive:!1,supervisors:[],proceedingDate:{from:"",to:""},lastEventDate:""}),[$,H]=(0,B.useState)(U),[W,Y]=(0,B.useState)({});const G={userId:null===(o=d.activeRole)||void 0===o?void 0:o.userId,personId:null===(i=d.activeRole)||void 0===i?void 0:i.businessId,dotys:["11525","11271","11201","11301","11271","11371","11002","11582","11581","12271","12371","11413","11412","11430","11583","11274","11275"],states:[eX.DO_DOKUSEIS_ESITATUD,eX.DO_DOKUSEIS_MENETLUSES]};return(0,B.useEffect)((()=>{!function(e){var t,n;const r={userId:e.institutionUsers?Number(e.institutionUsers[0]):null===(t=d.activeRole)||void 0===t?void 0:t.userId,personId:null===(n=d.activeRole)||void 0===n?void 0:n.businessId,states:e.operationStates,type:[ce.MENTOIMLIIK_MEN_MARKUS]};S(!0),P.findOperationsToComment(r).then((e=>{f(y(e.data)),O(e.data),S(!1)})).catch((e=>{console.log("Following error occured:",e),S(!1)}))}($)}),[d,$]),(0,B.useEffect)((()=>{(()=>{const e=G;h.proceedings&&(e.userId=void 0),v(!0),A.findProceedings(e).then((e=>{f(b(e.data)),T(e.data),v(!1)})).catch((e=>{console.log("Following error occured:",e),v(!1)}))})()}),[h.proceedings]),(0,B.useEffect)((()=>{!function(){const e=G;e.userId=void 0,E(!0),N.findIncomingDocuments(e).then((e=>{f(x(e.data)),E(!1),M(e.data)})).catch((e=>{console.log("Following error occured:",e),E(!1)}))}()}),[d]),(0,B.useEffect)((()=>{var e,t;D.getAllDocumentTypes().then((e=>{f(r(e.data))})).catch((e=>{console.log(e)})),L&&j.getJurUsers(null!==(e=null===(t=d.activeRole)||void 0===t?void 0:t.businessId)&&void 0!==e?e:0).then((e=>{f(a(e.data))})).catch((e=>{console.log(e)}))}),[d]),(0,cn.jsxs)("div",{children:[(0,cn.jsx)(V.Section,{collapsed:!1,title:"my_proceedings.my_proceedings",showSettings:!0,filterContents:(0,cn.jsx)(QX,{onSubmit:e=>{K(e)},isKov:L,filterState:z}),children:g?(0,cn.jsx)(V.SectionLoader,{}):0===k.length?(0,cn.jsxs)("div",{children:[(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_proceedings.no_proceedings"})}),L&&(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Link,{text:"my_proceedings.view_all_institution_proceedings",onClick:()=>{m({proceedings:!0})}})})]}):(0,cn.jsx)(XX,{linkGen:c,isKov:L,onAllUsersChecked:e=>{m({proceedings:e})},isAllUsersChecked:h.proceedings,filter:z})}),L&&(0,cn.jsx)(V.Section,{collapsed:!1,title:"my_proceedings.section_title.proceedings_to_comment",showSettings:!0,filterContents:(0,cn.jsx)(hZ,{viewType:te,initialFilter:U,filterState:$,onSubmit:e=>H(e)}),children:w?(0,cn.jsx)(V.SectionLoader,{}):0===C.length?(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_proceedings.proceedings_to_comment.no_proceedings"})}):(0,cn.jsx)(fZ,{linkGen:c,viewType:te,filter:$})}),L&&(0,cn.jsx)(V.Section,{collapsed:!1,title:"my_documents.incoming_documents",showSettings:!0,filterContents:(0,cn.jsx)(NX,{documentType:q,filterState:W,onSubmit:e=>Y(e),isKov:L}),children:_?(0,cn.jsx)(V.SectionLoader,{}):0===I.length?(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_documents.incoming_documents.no_docs"})}):(0,cn.jsx)(TX,{linkGen:c,userInfo:d,documentType:q,filter:W,fileApi:R})})]})},gZ=e=>{let{classifierApiEndpoint:t,linkGen:n,myViewsApiEndpoint:o,userApiEndpoint:i,userInfo:{activeRole:l}}=e;const c=(0,UJ.useDispatch)(),[u,d]=(0,B.useState)(!0),[p,f]=(0,B.useState)(!1),[h,m]=(0,B.useState)(!1),[g,v]=(0,B.useState)(null),[b,y]=(0,B.useState)(null),[x,w]=(0,B.useState)(null),S={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[],institutionUsers:[],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},T={...S,operationStates:[tZ.MENTOIMSEIS_TEOSTAMISEL]},C={...S,operationStates:[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_JATKAMINE]},O={...S,operationStates:[tZ.MENTOIMSEIS_OOTEL]},[I,M]=(0,B.useState)(T),[D,j]=(0,B.useState)(C),[A,N]=(0,B.useState)(O),[P,R]=(0,B.useState)(!1),L=new Ye(new yt({basePath:i})),F=new Qe(new yt({basePath:i})),U=new gt(new yt({basePath:o})),z=new Ne(new yt({basePath:t}));return(0,B.useEffect)((()=>{var e;L.getJurKovPersons().then((e=>{c(s(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)})),F.getJurUsers(null!==(e=null==l?void 0:l.businessId)&&void 0!==e?e:0).then((e=>{c(a(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)})),z.getAllDocumentTypes().then((e=>{c(r(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)}))}),[]),(0,B.useEffect)((()=>{!function(){const e={userId:null==l?void 0:l.userId,personId:null==l?void 0:l.businessId,type:[ce.MENTOIMLIIK_VALINE_KOOSK],states:eZ.MENTOIMSEIS_TEOSTAMISEL.concat(eZ.MENTOIMSEIS_TEOSTATUD,eZ.MENTOIMSEIS_LOOBUTUD,eZ.MENTOIMSEIS_TAHTAEG_MOODUNUD)};P&&(e.userId=void 0),d(!0),U.findOperations(e).then((e=>{c(_(e.data)),v(e.data),d(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),d(!1)}))}()}),[P]),(0,B.useEffect)((()=>{f(!0),U.findOperationsToComment({userId:null==l?void 0:l.userId,type:[ce.MENTOIMLIIK_VALINE_KOOSK],states:eZ.MENTOIMSEIS_TEOSTAMISEL.concat(eZ.MENTOIMSEIS_TEOSTATUD,eZ.MENTOIMSEIS_LOOBUTUD,eZ.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{c(E(e.data)),y(e.data),f(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),f(!1)})),m(!0),U.findOperationInvitations({userId:void 0,personId:null==l?void 0:l.businessId,type:[ce.MENTOIMLIIK_VALINE_KOOSK],states:eZ.MENTOIMSEIS_OOTEL.concat(eZ.MENTOIMSEIS_TEOSTAMISEL,eZ.MENTOIMSEIS_TYHISTATUD,eZ.MENTOIMSEIS_LOOBUTUD,eZ.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{c(k(e.data)),w(e.data),m(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),m(!1)}))}),[]),(0,cn.jsxs)("div",{children:[(0,cn.jsxs)(V.Section,{collapsed:!1,title:"my_approvals.my_approvals",showSettings:!0,filterContents:(0,cn.jsx)(hZ,{viewType:Z,filterState:I,onSubmit:e=>M(e)}),children:[u&&(0,cn.jsx)(V.SectionLoader,{}),u||g?(0,cn.jsx)(fZ,{linkGen:n,viewType:G,filter:I,isAllUsersChecked:P,onAllUsersChecked:e=>{R(e)}}):(0,cn.jsxs)("div",{children:[(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_approvals.no_approvals"})}),(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Link,{text:"my_approvals.view_all_institution_approvals",onClick:()=>{R(!0)}})})]})]}),(0,cn.jsxs)(V.Section,{collapsed:!1,title:"my_approvals.approvals_to_comment",showSettings:!0,filterContents:(0,cn.jsx)(hZ,{viewType:Q,filterState:D,onSubmit:e=>j(e)}),children:[p&&(0,cn.jsx)(V.SectionLoader,{}),p||b?(0,cn.jsx)(fZ,{linkGen:n,viewType:Q,filter:D}):(0,cn.jsx)("div",{children:(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_approvals.no_approvals_to_comment"})})})]}),(0,cn.jsxs)(V.Section,{collapsed:!1,title:"my_approvals.approval_invitations",showSettings:!0,filterContents:(0,cn.jsx)(hZ,{viewType:ee,filterState:A,onSubmit:e=>N(e)}),children:[h&&(0,cn.jsx)(V.SectionLoader,{}),h||x?(0,cn.jsx)(fZ,{linkGen:n,viewType:ee,filter:A}):(0,cn.jsx)("div",{children:(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_approvals.no_approval_invitations"})})})]})]})},vZ=e=>{let{classifierApiEndpoint:t,linkGen:n,myViewsApiEndpoint:o,userApiEndpoint:i,userInfo:{activeRole:l}}=e;const c=(0,UJ.useDispatch)(),[u,d]=(0,B.useState)(!1),[p,f]=(0,B.useState)(!1),[h,m]=(0,B.useState)(!1),[g,v]=(0,B.useState)(null),[b,y]=(0,B.useState)(null),[x,w]=(0,B.useState)(null),S={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[],institutionUsers:[],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},T={...S,operationStates:[tZ.MENTOIMSEIS_TEOSTAMISEL]},C={...S,operationStates:[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_JATKAMINE]},O={...S,operationStates:[tZ.MENTOIMSEIS_OOTEL]},[I,M]=(0,B.useState)(T),[D,j]=(0,B.useState)(C),[A,N]=(0,B.useState)(O),[P,R]=(0,B.useState)(!1),L=new Ye(new yt({basePath:i})),F=new Qe(new yt({basePath:i})),U=new gt(new yt({basePath:o})),z=new Ne(new yt({basePath:t}));return(0,B.useEffect)((()=>{var e;L.getJurKovPersons().then((e=>{c(s(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)})),F.getJurUsers(null!==(e=null==l?void 0:l.businessId)&&void 0!==e?e:0).then((e=>{c(a(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)})),z.getAllDocumentTypes().then((e=>{c(r(e.data))})).catch((e=>{console.error(`Following error occured: ${e}`)}))}),[]),(0,B.useEffect)((()=>{!function(){const e=P?null==l?void 0:l.businessId:null==l?void 0:l.userId;d(!0),U.findOperations({personId:P?e:void 0,userId:P?void 0:e,type:[ce.MENTOIMLIIK_ARVAMUS],states:eZ.MENTOIMSEIS_TEOSTAMISEL.concat(eZ.MENTOIMSEIS_TEOSTATUD,eZ.MENTOIMSEIS_LOOBUTUD,eZ.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{c(_(e.data)),v(e.data),d(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),d(!1)}))}()}),[P]),(0,B.useEffect)((()=>{f(!0),U.findOperationsToComment({userId:null==l?void 0:l.userId,type:[ce.MENTOIMLIIK_ARVAMUS],states:eZ.MENTOIMSEIS_TEOSTAMISEL.concat(eZ.MENTOIMSEIS_TEOSTATUD,eZ.MENTOIMSEIS_LOOBUTUD,eZ.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{c(E(e.data)),y(e.data),f(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),f(!1)})),m(!0),U.findOperationInvitations({userId:void 0,personId:null==l?void 0:l.businessId,type:[ce.MENTOIMLIIK_ARVAMUS],states:eZ.MENTOIMSEIS_OOTEL.concat(eZ.MENTOIMSEIS_TEOSTAMISEL,eZ.MENTOIMSEIS_TYHISTATUD,eZ.MENTOIMSEIS_LOOBUTUD,eZ.MENTOIMSEIS_TAHTAEG_MOODUNUD)}).then((e=>{c(k(e.data)),w(e.data),m(!1)})).catch((e=>{console.error(`Following error occured: ${e}`),m(!1)}))}),[]),(0,cn.jsxs)("div",{children:[(0,cn.jsxs)(V.Section,{collapsed:!1,title:"my_opinions.my_opinions",showSettings:!0,filterContents:(0,cn.jsx)(hZ,{viewType:Z,filterState:I,onSubmit:e=>M(e)}),children:[u&&(0,cn.jsx)(V.SectionLoader,{}),u||g?(0,cn.jsx)(fZ,{linkGen:n,viewType:J,filter:I,isAllUsersChecked:P,onAllUsersChecked:e=>{R(e)}}):(0,cn.jsxs)("div",{children:[(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_opinions.no_opinions"})}),(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Link,{text:"my_opinions.view_all_institution_opinions",onClick:()=>{R(!0)}})})]})]}),(0,cn.jsxs)(V.Section,{collapsed:!1,title:"my_opinions.opinions_to_comment",showSettings:!0,filterContents:(0,cn.jsx)(hZ,{viewType:Q,filterState:D,onSubmit:e=>j(e)}),children:[p&&(0,cn.jsx)(V.SectionLoader,{}),p||b?(0,cn.jsx)(fZ,{linkGen:n,viewType:Q,filter:D}):(0,cn.jsx)("div",{children:(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_opinions.no_opinions_to_comment"})})})]}),(0,cn.jsxs)(V.Section,{collapsed:!1,title:"my_opinions.opinion_invitations",showSettings:!0,filterContents:(0,cn.jsx)(hZ,{viewType:ee,filterState:A,onSubmit:e=>N(e)}),children:[h&&(0,cn.jsx)(V.SectionLoader,{}),h||x?(0,cn.jsx)(fZ,{linkGen:n,viewType:ee,filter:A}):(0,cn.jsx)("div",{children:(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_opinions.no_opinion_invitations"})})})]})]})},bZ=e=>{const t=(0,$.useIntl)(),n=/^[\\s0-9]{0,9}$/,r=/^([\\s0-9]{5}:[\\s0-9]{3}:[\\s0-9]{1,4}|[\\s0-9]{5}:[\\s0-9]{1,3}|[\\s0-9]{1,5})$/,o={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_TEOSTATUD,tZ.MENTOIMSEIS_LOOBUTUD],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},[i,a]=(0,B.useState)(e.filterState),[s,l]=(0,B.useState)(uZ(i.operationStates)),[c,u]=(0,B.useState)(!0),[d,p]=(0,B.useState)(!0),[f,h]=(0,B.useState)(""),m=(0,B.useMemo)((()=>lZ()),[]),[g,v]=(0,B.useState)([]),b=(0,B.useMemo)((()=>sZ(X,t)),[]),[y,x]=(0,B.useState)([]),w=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutions));function S(e){return n.test(e)}function _(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],i[t]=n,a((e=>({...e})))}function E(e,t){i[t]=e,"ehrCode"===t&&S(e)?u(!0):"cadastralNumber"===t&&function(e){return 0===e.length||r.test(e)}(e)&&p(!0),a((e=>({...e})))}(0,B.useEffect)((()=>{if(w){const e=jX([...w]);v(e)}}),[w]);return(0,cn.jsxs)(V.Form,{onSubmit:()=>e.onSubmit(i),children:[(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:m,onSelect:e=>_(e,"documentTypes"),allSelection:!0,onRemoveItem:e=>_(e,"documentTypes"),value:i.documentTypes,selectedOptions:y}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.document_type"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,cn.jsx)(V.Col,{})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>E(e,"ehrCode"),onBlur:e=>u(S(e.trim())),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.ehrCode}),errorMessage:!c&&(0,cn.jsx)(V.Text,{raw:"filter.invalid_building_code"}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.ehrCode"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>E(e,"wordInAddress"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.wordInAddress}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.word_in_address"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:g,onSelect:e=>_(e,"institutions"),allSelection:!0,onRemoveItem:e=>_(e,"institutions"),value:i.institutions,selectedOptions:y}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.institution"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,cn.jsx)(V.Col,{})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>E(e,"proceedingNumber"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.proceedingNumber}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_operations.filter.label.proceeding_number"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:b,onSelect:e=>_(e,"operationStates"),allSelection:!0,onRemoveItem:e=>_(e,"operationStates"),value:i.operationStates,selectedOptions:s}),label:(0,cn.jsx)($.FormattedMessage,{id:"my_involvements.filter.label.involvement_state"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.FieldWrapper,{component:(0,cn.jsx)(AX,{onChange:e=>(e=>{""!==e.from&&!zJ()(e.from,"YYYY-MM-DD",!0).isValid()||""!==e.to&&!zJ()(e.to,"YYYY-MM-DD",!0).isValid()?h(t.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&e.from>e.to?h(t.formatMessage({id:"filter.invalid_date_range"})):h(""),a((t=>({...t,operationDate:e})))})(e),value:i.operationDate}),errorMessage:f.length>0?f:null,label:(0,cn.jsx)($.FormattedMessage,{id:"my_involvements.filter.label.involvement_date"}),labelCol:{sm:20,md:8,lg:8},info:{content:"...",placement:"top-start"}})}),(0,cn.jsx)(V.Col,{})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{onClick:()=>(x([]),a(o),void l(uZ(o.operationStates))),colourScheme:"light",squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.epmty_fields"})})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!(c&&d),squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.search"})})})]})]})},yZ=e=>{var t;let{classifierApiEndpoint:n,linkGen:o,myViewsApiEndpoint:i,userInfo:a,userApiEndpoint:l}=e;const c=(0,UJ.useDispatch)(),[u,d]=(0,B.useState)(!1),[p,f]=(0,B.useState)([]),h=!(void 0===a||"A"===(null==a||null===(t=a.activeRole)||void 0===t?void 0:t.businessType)),m={documentTypes:[],ehrCode:"",institutions:[],wordInAddress:"",proceedingNumber:"",cadastralNumber:"",operationStates:[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_TEOSTATUD,tZ.MENTOIMSEIS_LOOBUTUD],operationDate:{from:"",to:""},operationDeadline:{from:"",to:""}},[g,v]=(0,B.useState)(m),b=new Ye(new yt({basePath:l})),y=new gt(new yt({basePath:i})),x=new Ne(new yt({basePath:n}));return(0,B.useEffect)((()=>{var e;b.getJurKovPersons().then((e=>{c(s(e.data))})).catch((e=>{console.log(e)})),x.getAllDocumentTypes().then((e=>{c(r(e.data))})).catch((e=>{console.log(e)})),d(!0),y.findOperations({userId:void 0,personId:h?null===(e=a.activeRole)||void 0===e?void 0:e.businessId:a.personId,type:[ce.MENTOIMLIIK_KAASAMINE,ce.MENTOIMLIIK_KAAS_TAGASISIDE],states:[tZ.MENTOIMSEIS_OOTEL,tZ.MENTOIMSEIS_TEOSTAMISEL,tZ.MENTOIMSEIS_TEOSTATUD,tZ.MENTOIMSEIS_VALMIS,tZ.MENTOIMSEIS_JATKAMINE,tZ.MENTOIMSEIS_TYHISTATUD,tZ.MENTOIMSEIS_LOOBUTUD,tZ.MENTOIMSEIS_KEELDUTUD,tZ.MENTOIMSEIS_TAGASI_LYKATUD,tZ.MENTOIMSEIS_TAHTAEG_MOODUNUD]}).then((e=>{c(_(e.data)),f(e.data),d(!1)})).catch((e=>{console.log("Following error occured:",e),d(!1)}))}),[a]),(0,cn.jsx)("div",{children:(0,cn.jsx)(V.Section,{collapsed:!1,title:"my_involvements.my_involvements",showSettings:!0,filterContents:(0,cn.jsx)(bZ,{filterState:g,onSubmit:e=>v(e)}),children:u?(0,cn.jsx)(V.SectionLoader,{}):0===p.length?(0,cn.jsx)("div",{className:"d-flex justify-content-center mb-1",children:(0,cn.jsx)(V.Text,{raw:"my_involvements.no_involvements"})}):(0,cn.jsx)(fZ,{linkGen:o,viewType:X,filter:g})})})};function xZ(e){return e.map((e=>({id:e.code+"",label:e.value,level:2,children:[],selectable:!0,value:!1})))}function wZ(e){let t=xZ([{code:"EHITIS_SEISUND_KAVAN",value:"Kavandatav"},{code:"EHITIS_SEISUND_PYSTI",value:"Püstitamisel"},{code:"EHITIS_SEISUND_OLEMA",value:"Olemas"},{code:"EHITIS_SEISUND_LAMEL",value:"Lammutamisel"},{code:"EHITIS_SEISUND_LAMUT",value:"Lammutatud"},{code:"EHITIS_SEISUND_REATA",value:"Realiseerimata"},{code:"EHITIS_SEISUND_KUSTU",value:"Kustutatud"}]);return e?t:t.slice(0,-1)}const SZ=[{code:"EHITIS_OMANDI_LIIK_KINNIS",value:"Kinnisasi"},{code:"EHITIS_OMANDI_LIIK_VALLAS",value:"Vallasasi"},{code:"EHITIS_OMANDI_LIIK_VALLASRO",value:"Reaalosa kui vallasasi"}];function _Z(){return xZ(SZ)}function EZ(e){let t=[];for(let n of e)t.push(n.id),t.push(...EZ(n.children?n.children:[]));return t}const kZ=e=>{const t=(0,$.useIntl)(),n={buildingLocation:"",buildingName:"",buildingStates:[],firstUseDate:{from:"",to:""},firstUseMissing:!1,buildingType:[],purposeOfUse:[],ownershipType:[],owner:void 0,isPrivatePerson:!1,searchType:ne},r=(0,UJ.useSelector)((e=>e.myViewsPage.filter.usageClassifierTypes)),o=(0,UJ.useSelector)((e=>e.myViewsPage.detailSearch.buildings)),[i,a]=(0,B.useState)(n),[s,l]=(0,B.useState)([]),[c,u]=(0,B.useState)(wZ(e.isAdminRole)),[d]=(0,B.useState)(xZ([{code:"H",value:"Hoone"},{code:"R",value:"Rajatis"}])),[p]=(0,B.useState)(_Z()),[f,h]=(0,B.useState)([]),[m,g]=(0,B.useState)({}),[v,b]=(0,B.useState)(""),[y,x]=(0,B.useState)({}),[w,S]=(0,B.useState)(""),[_,E]=(0,B.useState)(!1),[k,T]=(0,B.useState)({code:"",value:""}),C=(0,B.useRef)(),[O,I]=(0,B.useState)({});function M(e,t){let n;n=e.selectedData.length>0?void 0!==e.selectedData[0].data?e.selectedData[0].data.map((e=>e.id)):e.selectedData.map((e=>e.id)).flat():[],i[t]=n,a((e=>({...e})))}function D(e,t){let n;if(e.selectedData.length>0){n=EZ(void 0===e.selectedData[0].data?e.selectedData:e.selectedData[0].data)}else n=[];i[t]=n,a((e=>({...e})))}function j(e,t){i[t]=e,a((e=>({...e})))}(0,B.useEffect)((()=>{if(r.length>0){const e=function(e){let t={id:"00000",label:"00000",parentId:"0",level:1,value:!1,selectable:!1,children:[]};for(let n of e){const{code:e,name:r,validTo:o}=n;let i=e.replace(/0/g,""),a=i.slice(0,i.length-1),s=t;for(let e=2;e<=a.length;e++)if(s.children){let t=s.children.find((t=>t.id.replace(/0/g,"")===a.slice(0,e)));t&&(s=t)}if(s.children){const t=`${e} ${r}${null!=o&&o.trim()?` (kuni ${o})`:""}`;s.children.push({id:n.id+"",parentId:s.id,label:t,level:s.level+1,children:[],selectable:!0,value:!1})}}return t.children?t.children:[]}([...r].sort(((e,t)=>Number(e.code)-Number(t.code))));h(e)}}),[r]),(0,B.useEffect)((()=>{u(wZ(e.isAdminRole))}),[e.isAdminRole]);const A={sm:20,md:8,lg:8};return(0,cn.jsxs)(V.Form,{onSubmit:()=>function(){if(JSON.stringify(n)===JSON.stringify(i))x({header:"detailsearch.empty_filter_error.header",message:"detailsearch.empty_filter_error.message"});else if(i.firstUseMissing){let t={...i};t.firstUseDate={from:"",to:""},e.onSubmit(t)}else x({header:"",message:""}),e.onSubmit(i)}(),children:[y.header&&y.header.length>0&&y.message&&y.message.length>0&&(0,cn.jsx)(V.MessageBlock,{dismissible:!0,header:(0,cn.jsx)($.FormattedMessage,{id:y.header}),onDismiss:()=>x({header:"",message:""}),theme:"danger",messages:[(0,cn.jsx)($.FormattedMessage,{id:y.message})]}),o&&o.length>=500&&(0,cn.jsx)(V.MessageBlock,{dismissible:!0,header:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.empty_filter_error.header"}),theme:"warning",messages:[(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter_error_message.more_than_500_results"})]}),(0,cn.jsxs)(V.Row,{className:"align-items-start",children:[(0,cn.jsxs)(V.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>j(e,"buildingLocation"),placeholder:t.formatMessage({id:"detailssearch.filter.placeholder.address"}),value:i.buildingLocation}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.building_location"}),info:{content:"detailsearch.filter.tooltip.building_location",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>j(e,"buildingName"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:i.buildingName}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.building_name"}),info:{content:"detailsearch.filter.tooltip.building_name",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:c,onSelect:e=>M(e,"buildingStates"),allSelection:!0,onRemoveItem:e=>M(e,"buildingStates"),value:i.buildingStates,selectedOptions:s}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.building_state"}),info:{content:"detailsearch.filter.tooltip.building_state",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)("div",{className:"daterange_in_form",children:(0,cn.jsx)(V.NumberRangeExtended,{value:{from:i.firstUseDate.from,to:i.firstUseDate.to},onChange:e=>function(e){b(""),x({header:"",message:""});let t=null!==e.from?e.from:"",n=null!==e.to?e.to:"";a((e=>({...e,firstUseDate:{from:t,to:n}})))}(e),onBlur:e=>function(e){let n=Number(e.from),r=Number(e.to);n<0||n>2100||r<0||r>2100?b(t.formatMessage({id:"detailsearch.error_field.year-between"})):null!==e.from&&null!==e.to&&n>r?b(t.formatMessage({id:"detailsearch.error_field.beginning-bigger"})):(b(""),x({header:"",message:""}))}(e),onlyPositive:!0,disabled:i.firstUseMissing})}),errorMessage:v,label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.first_use"}),info:{content:"detailsearch.filter.tooltip.first_use",placement:"top-start"}}),(0,cn.jsx)(cn.Fragment,{children:OX(i.firstUseMissing,(function(e){a((t=>({...t,firstUseMissing:e})))}),"detailsearch.filter.label.checkbox.first_use_missing","detailsearch.filter.tooltip.checkbox.first_use_missing",A)})]}),(0,cn.jsxs)(V.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:d,onSelect:e=>M(e,"buildingType"),allSelection:!0,onRemoveItem:e=>M(e,"buildingType"),value:i.buildingType,selectedOptions:s}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.building_type"}),info:{content:"detailsearch.filter.tooltip.building_type",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:f,onSelect:e=>D(e,"purposeOfUse"),allSelection:!0,onRemoveItem:e=>D(e,"purposeOfUse"),value:i.purposeOfUse,selectedOptions:s,isSearchExactMatch:!0}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.purpose_of_use"}),info:{content:"detailsearch.filter.tooltip.purpose_of_use",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:p,onSelect:e=>M(e,"ownershipType"),allSelection:!0,onRemoveItem:e=>M(e,"ownershipType"),value:i.ownershipType,selectedOptions:s}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.ownershiptype"}),info:{content:"detailsearch.filter.tooltip.ownershiptype",placement:"top-start"}})]}),e.isAdminPlusRole&&(0,cn.jsx)(cn.Fragment,{children:(0,cn.jsxs)(V.Row,{className:"align-items-center w-100",children:[(0,cn.jsx)(V.Col,{xs:20,md:20,lg:10,className:"px-0",children:(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.PersonSearchPageExtended,{person:m,disabled:!1,labelKey:"code",valueKey:"value",onInputChange:e=>{!function(e){S(e)}(e)},updatedFromAR:()=>{},onPersonUpdate:e=>function(e){var t,n,r;if(g(e),e&&e.id&&e.id>0&&I(e),e&&(w===e.idCode||w===(null===(t=e.id)||void 0===t?void 0:t.toString())||w===e.regCode)||e&&k.code===e.regCode)i.owner=null===(r=e.id)||void 0===r?void 0:r.toString(),a((e=>({...e})));else if(e||w.substring(4)!==(null===(n=O.id)||void 0===n?void 0:n.toString()))e||(i.owner=void 0,a((e=>({...e}))));else{var o;i.owner=null===(o=O.id)||void 0===o?void 0:o.toString(),a((e=>({...e})))}}(e),searchPerson:e.callSearchPerson,handlePersonSelection:e=>T(e),isShowError:e=>{E(e),e||x({header:"",message:""})},searchOnBlur:!0,ref:C,isOptionalField:!0,isPrivateOwner:i.isPrivatePerson}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.owner"}),info:{content:"detailsearch.filter.tooltip.owner.extended",placement:"top-start"}})}),(0,cn.jsx)(V.Col,{xs:20,md:20,lg:10,children:OX(i.isPrivatePerson,(function(e){a((t=>({...t,isPrivatePerson:e})))}),"detailsearch.filter.label.checkbox.owner.private","",{xs:20,md:1})})]})})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{onClick:()=>(l([]),a(n),C.current.clearTypeahead(),void g({})),colourScheme:"light",squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.epmty_fields"})})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!!(v.length>0||_),squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.search"})})})]})]})},TZ=e=>{const t=(0,$.useIntl)(),n={buildingLocation:"",buildingName:"",institutions:[],documentDate:{from:"",to:""},documentType:[],documentNr:"",documentState:[],connectedPerson:void 0},[r,o]=(0,B.useState)(n),[i,a]=(0,B.useState)(""),[s,l]=(0,B.useState)([]),[c,u]=(0,B.useState)([]),[d,p]=(0,B.useState)([]),[f]=(0,B.useState)(xZ([{code:eX.DO_DOKUSEIS_ESITATUD,value:"Esitatud"},{code:eX.DO_DOKUSEIS_KOOSTAMISEL,value:"Koostamisel"},{code:eX.DO_DOKUSEIS_MENETLUSES,value:"Menetluses"},{code:eX.DO_DOKUSEIS_MUUTMISEL,value:"Muutmisel"},{code:eX.DO_DOKUSEIS_TAIENDAMISEL,value:"Täiendamisel"},{code:eX.DO_DOKUSEIS_KEHTETU,value:"Kehtetu"},{code:eX.DO_DOKUSEIS_REG_KANTUD,value:"Registrisse kantud"},{code:eX.DO_DOKUSEIS_TYHISTATUD,value:"Tühistatud"},{code:eX.DO_DOKUSEIS_LOOBUTUD,value:"Tagasi võetud"},{code:eX.DO_DOKUSEIS_ALLKIRJASTAMISEL,value:"Allkirjastamisel"},{code:eX.DO_DOKUSEIS_VANA_VERSIOON,value:"Vana versioon"}].sort(((e,t)=>e.value.localeCompare(t.value))))),[h,m]=(0,B.useState)({}),[g,v]=(0,B.useState)(""),[b,y]=(0,B.useState)(!1),[x,w]=(0,B.useState)({code:"",value:""}),[S,_]=(0,B.useState)({}),[E,k]=(0,B.useState)(!1),T=(0,B.useRef)(),C=(0,UJ.useSelector)((e=>e.myViewsPage.filter.documentTypes)),O=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutions)),I=(0,UJ.useSelector)((e=>e.myViewsPage.detailSearch.documents));function M(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],r[t]=n,o((e=>({...e})))}function D(e,t){r[t]=e.trim(),o((e=>({...e})))}function j(e){return!(!zJ()(e,"YYYY-MM-DD",!0).isValid()&&!zJ()(e,"D.M.YYYY",!0).isValid())}(0,B.useEffect)((()=>{if(C){const e=MX(C);u(e)}if(O){const e=jX([...O]);p(e)}}),[C,O]);const A={sm:20,md:8,lg:8};return(0,cn.jsxs)(V.Form,{onSubmit:()=>{i.length>0?k(!0):JSON.stringify(n)===JSON.stringify(r)?_({header:"detailsearch.empty_filter_error.header",message:"detailsearch.empty_filter_error.message"}):(e.onSubmit(r),_({header:"",message:""}))},children:[S.header&&S.header.length>0&&S.message&&S.message.length>0&&(0,cn.jsx)(V.MessageBlock,{dismissible:!0,header:(0,cn.jsx)($.FormattedMessage,{id:S.header}),onDismiss:()=>_({header:"",message:""}),theme:"danger",messages:[(0,cn.jsx)($.FormattedMessage,{id:S.message})]}),I&&I.length>500&&(0,cn.jsx)(V.MessageBlock,{dismissible:!0,header:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.empty_filter_error.header"}),theme:"warning",messages:[(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter_error_message.more_than_500_results"})]}),(0,cn.jsxs)(V.Row,{className:"align-items-start",children:[(0,cn.jsxs)(V.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>D(e,"buildingLocation"),placeholder:t.formatMessage({id:"detailsearch.filter.placeholder.address_catastralUnit_ehrCode"}),value:r.buildingLocation}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.building_location"}),info:{content:"detailsearch.filter.tooltip.address_catastralUnit_ehrCode.extended",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>D(e,"buildingName"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:r.buildingName}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.building_name"}),info:{content:"detailsearch.filter.tooltip.building_name",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:d,onSelect:e=>M(e,"institutions"),allSelection:!0,onRemoveItem:e=>M(e,"institutions"),value:r.institutions,selectedOptions:s}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.institution"})}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)("div",{className:"daterange_in_form",children:(0,cn.jsx)(V.DateRange,{onBlur:()=>{k(!0)},value:r.documentDate,onChange:e=>(e=>{""!==e.from&&!j(e.from)||""!==e.to&&!j(e.to)?a(t.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&zJ()(e.from)>zJ()(e.to)?a(t.formatMessage({id:"filter.invalid_date_range"})):""!==e.from&&(zJ()(e.from)<zJ()("01.01.1990")||zJ()(e.from)>zJ()())||""!==e.to&&(zJ()(e.to)<zJ()("01.01.1990")||zJ()(e.to)>zJ()())?a(t.formatMessage({id:"detailsearch.document.date_range_error.message"},{dateToday:zJ()().format("DD.MM.YYYY")})):zJ()(e.to).diff(zJ()(e.from),"days")>367?a(t.formatMessage({id:"detailsearch.filter_error_message.date_range_too_long"})):(a(""),k(!1)),o((t=>({...t,documentDate:e})))})(e)})}),errorMessage:E&&i.length>0?i:null,label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.document_date"}),info:{content:"detailsearch.filter.tooltip.document_date",placement:"top-start"}})]}),(0,cn.jsxs)(V.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:c,onSelect:e=>M(e,"documentType"),allSelection:!0,onRemoveItem:e=>M(e,"documentType"),value:r.documentType,selectedOptions:s}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.document_type"}),info:{content:"detailsearch.filter.tooltip.document_type",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>D(e,"documentNr"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:r.documentNr}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.document_nr"}),info:{content:"detailsearch.filter.tooltip.document_nr",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:f,onSelect:e=>M(e,"documentState"),allSelection:!0,onRemoveItem:e=>M(e,"documentState"),value:r.documentState,selectedOptions:s}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.document_state"})})]})]}),!e.isNonAuthenticatedUser&&(0,cn.jsx)(V.Row,{children:(0,cn.jsx)(V.Col,{xs:20,md:20,lg:10,className:"px-0",children:(0,cn.jsx)(V.FieldWrapper,{labelCol:A,component:(0,cn.jsx)(V.PersonSearchPageExtended,{person:h,disabled:!1,labelKey:"code",valueKey:"value",onInputChange:e=>{!function(e){v(e),x.code.length>0&&w({code:"",value:""})}(e)},updatedFromAR:()=>{},onPersonUpdate:e=>function(e){var t;m(e),e&&(g===e.idCode||g===(null===(t=e.id)||void 0===t?void 0:t.toString())||g===e.regCode)||e&&x.code===e.regCode?(r.connectedPerson=e.id,o((e=>({...e})))):e||(r.connectedPerson=void 0,o((e=>({...e}))))}(e),searchPerson:e.callSearchPerson,handlePersonSelection:e=>w(e),isShowError:e=>{y(e),e||_({header:"",message:""})},searchOnBlur:!0,ref:T,isOptionalField:!0}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.connected_person"}),info:{content:"detailsearch.filter.tooltip.connected_person.extended",placement:"top-start"}})})}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{onClick:()=>(l([]),o(n),T.current.clearTypeahead(),void m({})),colourScheme:"light",squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.epmty_fields"})})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!!(E&&i.length>0||b),squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.search"})})})]})]})},CZ=e=>{const t=(0,$.useIntl)(),n={documentType:[],documentNr:"",proceedingDate:{from:"",to:""},proceedingNr:"",institutions:[]},[r,o]=(0,B.useState)(n),[i,a]=(0,B.useState)([]),[s,l]=(0,B.useState)([]),[c,u]=(0,B.useState)([]),[d,p]=(0,B.useState)(""),[f,h]=(0,B.useState)({}),[m,g]=(0,B.useState)(!1),v=(0,UJ.useSelector)((e=>e.myViewsPage.filter.documentTypes)),b=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutions)),y=(0,UJ.useSelector)((e=>e.myViewsPage.detailSearch.proceedings));function x(e,t){let n;e.selectedData.length>0?(n=void 0!==e.selectedData[0].data?e.selectedData[0].data:e.selectedData,n=n.map((e=>e.id.length<5?e.children.map((e=>e.id)):e.id)).flat()):n=[],r[t]=n,o((e=>({...e})))}function w(e,t){r[t]=e,o((e=>({...e})))}function S(e){return!(!zJ()(e,"YYYY-MM-DD",!0).isValid()&&!zJ()(e,"D.M.YYYY",!0).isValid())}(0,B.useEffect)((()=>{if(v){const e=MX(v);l(e)}if(b){const e=jX([...b]);u(e)}}),[v,b]);const _={sm:20,md:8,lg:8};return(0,cn.jsxs)(V.Form,{onSubmit:()=>{d.length>0?g(!0):JSON.stringify(n)===JSON.stringify(r)?h({header:"detailsearch.empty_filter_error.header",message:"detailsearch.empty_filter_error.message"}):(e.onSubmit(r),h({header:"",message:""}))},children:[f.header&&f.header.length>0&&f.message&&f.message.length>0&&(0,cn.jsx)(V.MessageBlock,{dismissible:!0,header:(0,cn.jsx)($.FormattedMessage,{id:f.header}),onDismiss:()=>h({header:"",message:""}),theme:"danger",messages:[(0,cn.jsx)($.FormattedMessage,{id:f.message})]}),y&&y.length>500&&(0,cn.jsx)(V.MessageBlock,{dismissible:!0,header:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.empty_filter_error.header"}),theme:"warning",messages:[(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter_error_message.more_than_500_results"})]}),(0,cn.jsxs)(V.Row,{className:"align-items-start",children:[(0,cn.jsxs)(V.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,cn.jsx)(V.FieldWrapper,{labelCol:_,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:s,onSelect:e=>x(e,"documentType"),allSelection:!0,onRemoveItem:e=>x(e,"documentType"),value:r.documentType,selectedOptions:i}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.document_type"}),info:{content:"detailsearch.filter.tooltip.document_type",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:_,component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>w(e,"documentNr"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:r.documentNr}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.document_nr"}),info:{content:"detailsearch.filter.tooltip.document_nr",placement:"top-start"}}),(0,cn.jsx)(V.FieldWrapper,{labelCol:_,component:(0,cn.jsx)("div",{className:"daterange_in_form",children:(0,cn.jsx)(V.DateRange,{onChange:e=>(e=>{""!==e.from&&!S(e.from)||""!==e.to&&!S(e.to)?p(t.formatMessage({id:"filter.invalid_date_format"})):""!==e.from&&""!==e.to&&zJ()(e.from)>zJ()(e.to)?p(t.formatMessage({id:"filter.invalid_date_range"})):""!==e.from&&(zJ()(e.from)<zJ()("01.01.1990")||zJ()(e.from)>zJ()())||""!==e.to&&(zJ()(e.to)<zJ()("01.01.1990")||zJ()(e.to)>zJ()())?p(t.formatMessage({id:"detailsearch.proceeding.date_range_error.message"},{dateToday:zJ()().format("DD.MM.YYYY")})):zJ()(e.to).diff(zJ()(e.from),"days")>367?p(t.formatMessage({id:"detailsearch.filter_error_message.date_range_too_long"})):(p(""),g(!1)),o((t=>({...t,proceedingDate:e})))})(e),value:r.proceedingDate,onBlur:()=>{g(!0)}})}),errorMessage:m&&d.length>0?d:null,label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.proceeding_date"}),info:{content:"detailsearch.filter.tooltip.proceeding_date",placement:"top-start"}})]}),(0,cn.jsxs)(V.Col,{xs:20,md:20,lg:10,className:"px-0",children:[(0,cn.jsx)(V.FieldWrapper,{labelCol:_,component:(0,cn.jsx)(V.Input,{name:"input",onChange:e=>w(e,"proceedingNr"),placeholder:t.formatMessage({id:"placeholder.writing"}),value:r.proceedingNr}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.proceeding_nr"})}),(0,cn.jsx)(V.FieldWrapper,{labelCol:_,component:(0,cn.jsx)(V.Multiselect,{name:"multiselect",options:c,onSelect:e=>x(e,"institutions"),allSelection:!0,onRemoveItem:e=>x(e,"institutions"),value:r.institutions,selectedOptions:i}),label:(0,cn.jsx)($.FormattedMessage,{id:"detailsearch.filter.label.institution"})})]})]}),(0,cn.jsxs)(V.Row,{children:[(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{onClick:()=>(a([]),void o(n)),colourScheme:"light",squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.epmty_fields"})})}),(0,cn.jsx)(V.Col,{children:(0,cn.jsx)(V.Button,{className:"float-right",colourScheme:"success",type:"submit",disabled:!!(m&&d.length>0),squared:!0,children:(0,cn.jsx)($.FormattedMessage,{id:"button.search"})})})]})]})},OZ={EHITIS_SEISUND_KAVAN:["EHITIS_SEISUND_KAVAN","EHITIS_SEISUND_EHITAM_LUBA","EHITIS_SEISUND_MENETLUSES"],EHITIS_SEISUND_PYSTI:["EHITIS_SEISUND_PYSTI","EHITIS_SEISUND_EHITAMISEL"],EHITIS_SEISUND_OLEMA:["EHITIS_SEISUND_OLEMA","EHITIS_SEISUND_KASUTUSEL","EHITIS_SEISUND_KASUT_OSALINE","EHITIS_SEISUND_KASUT_LUBA_EIKEH","EHITIS_SEISUND_LAMMUT_LUBA","EHITIS_SEISUND_KASUT_MAAS","EHITIS_SEISUND_EBASEADUSLIK","EHITIS_SEISUND_MAARAMATA"],EHITIS_SEISUND_LAMEL:["EHITIS_SEISUND_LAMEL","EHITIS_SEISUND_LAMMUTAMISEL"],EHITIS_SEISUND_LAMUT:["EHITIS_SEISUND_LAMUT","EHITIS_SEISUND_LAMMUTATUD"],EHITIS_SEISUND_REATA:["EHITIS_SEISUND_REATA","EHITIS_SEISUND_EHITAM_LUBA_EIKEH"],EHITIS_SEISUND_KUSTU:["EHITIS_SEISUND_KUSTU","EHITIS_SEISUND_KUSTUTATUD","EHITIS_SEISUND_REG_OBJ_LOPP","EHITIS_SEISUND_ARHIIVIS"]};function IZ(e){const t=function(e){return sX(OZ,e)}(e);return t?function(e){switch(e){case"EHITIS_SEISUND_KAVAN":return{name:"Kavandatav",type:"info"};case"EHITIS_SEISUND_PYSTI":return{name:"EHITIS_SEISUND_PYSTI",type:"info"};case"EHITIS_SEISUND_OLEMA":return{name:"On",type:"success"};case"EHITIS_SEISUND_LAMEL":return{name:"Lammutamisel",type:"info"};case"EHITIS_SEISUND_LAMUT":return{name:"Lammutatud",type:"default"};case"EHITIS_SEISUND_REATA":return{name:"Realiseerimata",type:"default"};case"EHITIS_SEISUND_KUSTU":return{name:"Kustutatud",type:"default"};default:return{name:e,type:"default"}}}(t):{name:e,type:"default"}}const MZ=e=>{const t=(0,$.useIntl)(),[n,r]=(0,B.useState)([]),o=(0,UJ.useSelector)((e=>e.myViewsPage.detailSearch.buildings));(0,B.useEffect)((()=>{if(o&&o.length>0){const t=e.isAdminRole?o:o.filter((e=>"EHITIS_SEISUND_KUSTU"!==e.buildingState.code));r(t)}}),[o]);const i=[{id:"ehr_code",property:"ehrCode",size:130,isFrozen:!0,getValue:e=>e.ehrCode?e.ehrCode:"",getFormattedValue:t=>{const{generateLink:n}=e,r=t.ehrCode?n(ie,String(t.ehrCode),null,!1,!1,null):null;return t.ehrCode&&null!==t.ehrCode?(0,cn.jsx)(fn,{linkName:t.ehrCode,tooltipText:"detailsearch.tooltip.open_building",href:r||void 0}):""}},{id:"building_address",property:"buildingaddress",size:160,getValue:e=>{var t;return null!==(t=e.buildingaddress)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingaddress&&null!==e.buildingaddress?e.buildingaddress.map((e=>(0,cn.jsx)("div",{children:e}))):""},{id:"building_name",property:"buildingName",size:130,getValue:e=>{var t;return null!==(t=e.buildingName)&&void 0!==t?t:""}},{id:"building_state",property:"buildingState",size:130,getValue:e=>{var t;return null!==(t=e.buildingState)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingState&&null!==e.buildingState?(0,cn.jsx)(V.Status,{type:IZ(e.buildingState.code).type,children:e.buildingState.value}):""},{id:"purpose_of_use",property:"purposeOfUse",size:150,getValue:e=>{var t,n;return null!==(t=null===(n=e.purposeOfUse)||void 0===n?void 0:n.value)&&void 0!==t?t:""}},{id:"first_use_date",property:"firstUseDate",size:150,getValue:e=>{var t;return null!==(t=e.firstUseDate)&&void 0!==t?t:""}},{id:"under_area",property:"underArea",size:130,getValue:e=>e.underArea?e.underArea:""},{id:"floor_count",property:"floorCount",size:130,getValue:e=>e.floorCount?e.floorCount:""},{id:"ownership_type",property:"ownershipType",size:130,getValue:e=>{var t,n;return null!==(t=null===(n=e.ownershipType)||void 0===n?void 0:n.value)&&void 0!==t?t:""}},{id:"owner",property:"owner",size:130,getValue:e=>{var t;return null!==(t=e.owner)&&void 0!==t?t:""},getFormattedValue:e=>e.owner?e.owner.map((e=>function(e){var t;const n=e.eesnimi?e.eesnimi+" "+e.perenimi:void 0,r=e.isikukood?(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)("br",{}),"IK "+e.isikukood]}):void 0,o=null!==e.regKood,i=null!==(t=e.jiNimi)&&void 0!==t?t:"";return!0===o?(0,cn.jsx)("div",{children:i}):n?(0,cn.jsxs)("div",{children:[n,null!=r?r:""]}):""}(e))):""}];return(0,cn.jsx)("div",{children:(0,cn.jsx)(V.TableComponent,{config:{thead:{headers:(e.isAdminPlusRole?i:i.slice(0,-1)).map((e=>({id:e.id,size:e.size,className:"table-header-field text-align-left",label:t.formatMessage({id:"detailsearch.buildings.table.header."+e.id}),tooltip:{text:t.formatMessage({id:"detailsearch.buildings.table.tooltip."+e.id})},propertyName:e.property,sortable:!0,isShown:!0,isFrozen:e.isFrozen,type:"input",valueFormatter:t=>e.getFormattedValue?e.getFormattedValue(t):e.getValue(t)}))),icons:pn,expandableRow:!1,isFilter:!1}},data:function(e){return e.map((e=>({buildingaddress:e.buildingaddress,buildingId:e.buildingId,buildingName:e.buildingName,buildingType:e.buildingType,ehrCode:e.ehrCode,firstUseDate:e.firstUseDate,owner:e.owner,ownershipType:e.ownershipType,purposeOfUse:e.purposeOfUse,buildingState:e.buildingState,floorCount:e.floorCount,underArea:e.underArea})))}(n),handleEvent:()=>!0})})},DZ="DD.MM.YYYY",jZ="YYYY-MM-DD";class AZ{static dateToStr(e){return AZ.formatDate(DZ,e)}static dateToStrForDatepicker(e){return AZ.formatDate(jZ,e)}static dateWithTimeToStr(e){return AZ.formatDate("DD.MM.YYYY HH:mm",e)}static formatDate(e,t){return t?zJ()(t).format(e):""}static dateToMs(e,t){const n=zJ()(t,e);return t&&n.isValid()?n.valueOf():void 0}}const NZ=e=>{var t,n,r,o,i,a;const s=(0,$.useIntl)(),[l,c]=(0,B.useState)([]),u=(0,UJ.useSelector)((e=>e.myViewsPage.detailSearch.documents)),d=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutions)),p=null!==(t=null===(n=e.userInfo)||void 0===n||null===(r=n.activeRole)||void 0===r?void 0:r.businessType)&&void 0!==t?t:"",f=null!==(o=null===(i=e.userInfo)||void 0===i||null===(a=i.activeRole)||void 0===a?void 0:a.businessId)&&void 0!==o?o:0;(0,B.useEffect)((()=>{u&&u.length>0&&c(u)}),[u]);const h=e.filterStateDocumentsSearch.buildingLocation,m=e.filterStateDocumentsSearch.buildingName;const g=h?h.toString().toLowerCase().replace(/[&|=;~!$>*%_()?.+:'"\\]/g,"").replace(/\t/g," ").replace(/\s{2,}/g," ").replace(/\s?-\s?/g,"-"):"";function v(e,t){const n=(r=function(e){return e.replace(/\btn\b/g,"").replace(/\btänav\b/g,"").replace(/\btee\b/g,"").replace(/\bmaantee\b/g,"").replace(/\bmnt\b/g,"").replace(/\bküla\b/g,"").replace(/\blinnaosa\b/g,"").replace(/\blinn\b/g,"").replace(/\bpuiestee\b/g,"").replace(/\bpst\b/g,"").replace(/\bvald\b/g,"").replace(/\balevik\b/g,"").replace(/\balev\b/g,"").replace(/\bpõik\b/g,"").replace(/\blõik\b/g,"")}(e),r.replaceAll("//","").replaceAll(",","").split(/\s+/g).reduce(((e,t)=>{if(Number.isNaN(Number(t[0]))&&Number.isNaN(Number(t[1])))e.push(t);else{const n=` ${t}`;e[e.length-1]+=n}return e}),[]));var r;const o=t.replace(/\s+/g," ").split(/\/\/\s+(?=[a-z]+\b)/gi);return n.every((e=>{const t=e.trim().split(/\s+/);return o.some((e=>t.every((t=>new RegExp(`(?<![\\/\\-])\\b${t}\\b`,"i").test(e)))))}))}const b=["tn","tänav","tee","maantee","mnt","küla","linnaosa","linn","puiestee","pst","vald","alevik","alev","põik","lõik"];function y(e,t){var n;const r=null===(n=t.buildingAddress)||void 0===n?void 0:n.map((t=>function(e,t){return b.some((n=>{const r=new RegExp(`\\b(\\w+)\\s+${n}\\b`,"i"),o=e.match(r);if(o){const e=o[1];return new RegExp(`\\b${e}\\s+${n}\\b`,"i").test(t)}return!1}))}(e,t.toLowerCase())));return!!r&&r.indexOf(!0)>-1}function x(e){const t=e.filter((e=>function(e,t){var n;const r=null===(n=t.buildingAddress)||void 0===n?void 0:n.map((t=>v(e,t.toLowerCase())));return!!r&&r.indexOf(!0)>-1}(g,e)));return b.some((e=>function(e){return!new RegExp(`\\b${e}\\b`,"gi").test(e)}(e)))?t.filter((e=>y(g,e))):t}function w(){return!Number.isNaN(Number(g))}function S(){if(g&&g.indexOf(", ")>-1){return g.split(", ").reverse().join(", ")}return g}function _(e){const t=e.buildingName,n=e.buildingAddress;return t&&n&&(n.some((e=>e.toLowerCase().split(" ").some((e=>t.some((t=>t.toLowerCase().includes(e)))))))||t.some((e=>e.toLowerCase().split(" ").some((e=>n.some((t=>t.toLowerCase().includes(e))))))))}function E(e){let t=0;if(e.buildingAddress&&e.buildingAddress.length>0&&e.buildingAddress[0].length<200){const n=g.replace(",","").split(" ");let r=e.buildingAddress[0].toLowerCase().split(", ");const o=new Set;r.forEach((e=>{const t=e.split(" ")[0];return o.add(t)})),r=Array.from(o),r.forEach((e=>(n.includes(e)&&(t+=1),t)))}else t=-1;return t}const k=new RegExp(`\\b${g}\\b(?![\\/\\-])`,"i"),T=new RegExp(`\\b${S()}\\b(?![\\/\\-])`,"i"),C=g.replace(",","").split(/(?:\/|\s)+/g);function O(e){const t=e.buildingAddress;return t?t.findIndex((e=>e.toLowerCase()===g||e.toLowerCase()===S()))>-1?"exact":t.findIndex((e=>k.test(e.toLowerCase())||T.test(e.toLowerCase())))>-1?"partial":t.findIndex((e=>{const t=e.toLowerCase().replace(",","").replace(/\/\//g," ");return C.every((e=>t.includes(e)))}))>-1?"vague":"other":""}const I=["exact","partial","vague","other"];function M(e){return e.map((e=>{return t=e,{...t,title:t.docId,addressWithBuilding:_(t),addressMatch:O(t),addressRank:E(t)};var t})).sort(((e,t)=>{const n=I.indexOf(e.addressMatch),r=I.indexOf(t.addressMatch);return n!==r?n-r:e.addressWithBuilding!==t.addressWithBuilding?""===m?e.addressWithBuilding?1:-1:e.addressWithBuilding?-1:1:t.addressRank-e.addressRank}))}const D=[{id:"doc_date",property:"docDate",size:130,getValue:e=>AZ.dateToStr(e.docDate),isFrozen:!0},{id:"reg_date",property:"regDate",size:130,getValue:e=>AZ.dateToStr(e.regDate)},{id:"doc_nr",property:"docNr",size:160,getValue:e=>{var t;return null!==(t=e.docNr)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e,r=t.docNr?n(se,String(t.docNr),null,!1,!1,{docId:t.docId,ehrCode:t.ehrCode}):null;return t.docNr&&null!==t.docNr?(0,cn.jsx)(fn,{linkName:t.docNr,tooltipText:"detailsearch.tooltip.open_document",href:r||void 0}):""}},{id:"document_type",property:"documentType",size:160,getValue:e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""}},{id:"building_name",property:"buildingName",size:130,getValue:e=>{var t;return null!==(t=e.buildingName)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingName&&null!==e.buildingName?e.buildingName.map((e=>(0,cn.jsx)("div",{children:e}))):""},{id:"ehr_code",property:"ehrCode",size:130,getValue:e=>{var t;return null!==(t=e.ehrCode)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e;return t.ehrCode?t.ehrCode.map(((e,r)=>{const o=t.ehrCode?n(ie,String(e),null,!1,!1,null):null;return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(fn,{linkName:e,tooltipText:"detailsearch.tooltip.open_building",href:o||void 0}),r!==t.ehrCode.length-1?(0,cn.jsx)("span",{children:", "}):""]})})):""}},{id:"building_address",property:"buildingAddress",size:130,getValue:e=>{var t;return null!==(t=e.buildingAddress)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingAddress&&null!==e.buildingAddress?e.buildingAddress.map((e=>(0,cn.jsx)("div",{children:e}))):""},{id:"doc_state",property:"stateCode",size:180,getValue:e=>{var t;return null!==(t=e.stateCode)&&void 0!==t?t:""},getFormattedValue:e=>e.stateCode&&null!==e.stateCode?(0,cn.jsx)(V.Status,{type:rX(e.stateCode,s).oldType,children:rX(e.stateCode,s).name}):""},{id:"proceeding_nr",property:"proceedingNr",size:130,getValue:e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},getFormattedValue:t=>{var n;const{generateLink:r}=e,o=JX(null===(n=t.doty)||void 0===n?void 0:n.toString()),i=t.proceedingNr?r(o,String(t.proceedingNr),null,!1,!1,null):null;return t.proceedingNr?p===le.MKM||t.institutionId&&f===t.institutionId?(0,cn.jsx)(fn,{linkName:t.proceedingNr,tooltipText:"detailsearch.tooltip.open_proceeding",href:i||void 0}):t.proceedingNr:""}},{id:"presenter",property:"presenter",size:130,getValue:e=>{var t;return null!==(t=e.presenter)&&void 0!==t?t:""},getFormattedValue:e=>e.presenter?e.presenter.map(((t,n)=>(0,cn.jsxs)("div",{children:[t,n!==e.presenter.length-1?(0,cn.jsx)("span",{children:", "}):""]}))):""},{id:"institution",property:"institutionName",size:130,getValue:e=>{var t;return null!==(t=e.institutionName)&&void 0!==t?t:""}}];return(0,cn.jsx)(V.TableComponent,{config:{thead:{headers:D.map((e=>({id:e.id,size:e.size,className:"table-header-field text-align-left",label:s.formatMessage({id:"detailsearch.documents.table.header."+e.id}),tooltip:{text:s.formatMessage({id:"detailsearch.documents.table.tooltip."+e.id})},propertyName:e.property,sortable:!0,isShown:!0,isFrozen:e.isFrozen,type:"input",valueFormatter:t=>e.getFormattedValue?e.getFormattedValue(t):null==e?void 0:e.getValue(t)}))),icons:pn,expandableRow:!1,isFilter:!1}},data:function(e){let t;if(0===(null==h?void 0:h.indexOf('"'))&&(null==h?void 0:h.lastIndexOf('"'))===h.length-1){const n=x(e);t=w()||g.length<2?n:M(n)}else t=w()||g.length<2?e:M(e);const n=t.map((e=>{var t,n,r,o;return{docId:e.docId,docDate:null!==(t=AZ.dateToMs(DZ,e.docDate))&&void 0!==t?t:"",regDate:null!==(n=AZ.dateToMs(DZ,e.regDate))&&void 0!==n?n:"",deadlineDate:e.deadlineDate,docNr:e.docNr,documentType:e.documentType,doty:e.doty,buildingName:e.buildingName,ehrCode:e.ehrCode,buildingAddress:e.buildingAddress,state:e.state,stateCode:e.stateCode,proceedingNr:e.proceedingNr,presenter:e.presenter,institutionId:e.institutionId,institutionName:null!==(r=null===(o=d.find((t=>t.id===e.institutionId)))||void 0===o?void 0:o.regName)&&void 0!==r?r:""}}));return n}(l),handleEvent:()=>!0})},PZ=e=>{var t,n,r,o;const i=(0,$.useIntl)(),[a,s]=(0,B.useState)([]),l=(0,UJ.useSelector)((e=>e.myViewsPage.detailSearch.proceedings)),c=(0,UJ.useSelector)((e=>e.myViewsPage.filter.documentTypes)),u=(0,UJ.useSelector)((e=>e.myViewsPage.filter.institutions)),d=e.userInfo&&e.userInfo.activeRole&&null!==(t=e.userInfo.activeRole)&&void 0!==t&&t.businessType?null===(n=e.userInfo.activeRole)||void 0===n?void 0:n.businessType:"",p=e.userInfo&&e.userInfo.activeRole&&null!==(r=e.userInfo.activeRole)&&void 0!==r&&r.businessId?null===(o=e.userInfo.activeRole)||void 0===o?void 0:o.businessId:0;(0,B.useEffect)((()=>{l&&l.length>0&&s(l)}),[l]);const f=[{id:"date_start",property:"dateStart",size:130,getValue:e=>AZ.dateToStr(e.dateStart),isFrozen:!0},{id:"date_end",property:"dateEnd",size:130,getValue:e=>AZ.dateToStr(e.dateEnd)},{id:"proceeding_nr",property:"proceedingNr",size:130,getValue:e=>{var t;return null!==(t=e.proceedingNr)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e,r=JX(t.doty),o=t.proceedingNr?n(r,String(t.proceedingNr),null,!1,!1,null):null;return t.proceedingNr&&null!==t.proceedingNr?"MKM"===d||t.institutionId&&p===t.institutionId?(0,cn.jsx)(fn,{linkName:t.proceedingNr,tooltipText:"detailsearch.tooltip.open_proceeding",href:o||void 0}):t.proceedingNr:""}},{id:"proceeding_state",property:"proceedingState",size:200,getValue:e=>{var t;return null!==(t=e.proceedingStateCode)&&void 0!==t?t:""},getFormattedValue:e=>e.proceedingStateCode&&null!==e.proceedingStateCode?(0,cn.jsx)(V.Status,{type:VX(e.proceedingStateCode).type,children:VX(e.proceedingStateCode).name}):""},{id:"document",property:"docNr",size:160,getValue:e=>{var t;return null!==(t=e.docNr)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e,r=t.docNr?n(se,String(t.docNr),null,!1,!1,null):null;return t.docNr&&null!==t.docNr?(0,cn.jsx)(fn,{linkName:t.docNr,tooltipText:"detailsearch.tooltip.open_document",href:r||void 0}):""}},{id:"document_type",property:"documentType",size:180,getValue:e=>{var t;return null!==(t=e.documentType)&&void 0!==t?t:""}},{id:"building_name",property:"buildingName",size:130,getValue:e=>{var t;return null!==(t=e.buildingName)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingName&&null!==e.buildingName?e.buildingName.map((e=>(0,cn.jsx)("div",{children:e}))):""},{id:"ehr_code",property:"ehrCode",size:130,getValue:e=>{var t;return null!==(t=e.ehrCode)&&void 0!==t?t:""},getFormattedValue:t=>{const{generateLink:n}=e;return t.ehrCode&&null!==t.ehrCode?t.ehrCode.map(((e,r)=>{const o=t.ehrCode?n(ie,String(e),null,!1,!1,null):null;return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(fn,{linkName:e,tooltipText:"detailsearch.tooltip.open_building",href:o||void 0}),r!==t.ehrCode.length-1?(0,cn.jsx)("span",{children:", "}):""]})})):""}},{id:"building_address",property:"buildingAddress",size:160,getValue:e=>{var t;return null!==(t=e.buildingAddress)&&void 0!==t?t:""},getFormattedValue:e=>e.buildingAddress&&null!==e.buildingAddress?e.buildingAddress.map((e=>(0,cn.jsx)("div",{children:e}))):""},{id:"proceeding_name",property:"proceedingName",size:160,getValue:e=>{var t;return null!==(t=e.proceedingName)&&void 0!==t?t:""}},{id:"supervisor",property:"supervisorName",size:130,getValue:e=>{var t;return null!==(t=e.supervisorName)&&void 0!==t?t:""}},{id:"institution",property:"institutionName",size:130,getValue:e=>{var t;return null!==(t=e.institutionName)&&void 0!==t?t:""}},{id:"archived",property:"archived",size:130,getValue:e=>e.archived&&"2"===e.archived?"Jah":"Ei"}];return(0,cn.jsx)(V.TableComponent,{config:{thead:{headers:f.map((e=>({id:e.id,size:e.size,className:"table-header-field text-align-left",label:i.formatMessage({id:"detailsearch.proceedings.table.header."+e.id}),tooltip:{text:i.formatMessage({id:"detailsearch.proceedings.table.tooltip."+e.id})},propertyName:e.property,sortable:!0,isShown:!0,isFrozen:e.isFrozen,type:"input",valueFormatter:t=>e.getFormattedValue?e.getFormattedValue(t):e.getValue(t)}))),icons:pn,expandableRow:!1,isFilter:!1}},data:function(e){const t=e.map((e=>{var t,n,r,o,i,a;return{proceedingId:e.proceedingId,dateStart:null!==(t=AZ.dateToMs(DZ,e.dateStart))&&void 0!==t?t:"",dateEnd:null!==(n=AZ.dateToMs(DZ,e.dateEnd))&&void 0!==n?n:"",proceedingNr:e.proceedingNr,proceedingState:e.proceedingState,proceedingStateCode:e.proceedingStateCode,docNr:e.docNr,documentType:null!==(r=null===(o=c.find((t=>t.id.toString()===e.documentType)))||void 0===o?void 0:o.name)&&void 0!==r?r:"",doty:e.documentType,proceedingName:e.proceedingName,institutionId:e.institutionId,institutionName:null!==(i=null===(a=u.find((t=>t.id===e.institutionId)))||void 0===a?void 0:a.regName)&&void 0!==i?i:"",supervisorId:e.supervisorId,supervisorName:e.supervisorName,archived:e.archived,buildingName:e.buildingName,ehrCode:e.ehrCode,buildingAddress:e.buildingAddress}}));return t}(a),handleEvent:()=>!0})},RZ="https://devkluster.ehr.ee/api/building/v2".replace(/\/+$/,"");class LZ{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:RZ,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ee();this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class FZ extends Error{constructor(e,t){super(t),this.name="RequiredError",this.field=e}}const UZ="https://example.com",BZ=function(e,t,n){if(null==n)throw new FZ(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},zZ=function(e){const t=new URLSearchParams(e.search);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(const e of r)for(const n in e)if(Array.isArray(e[n])){t.delete(n);for(const r of e[n])t.append(n,r)}else t.set(n,e[n]);e.search=t.toString()},KZ=function(e,t,n){const r="string"!=typeof e;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(void 0!==e?e:{}):e||""},$Z=function(e){return e.pathname+e.search+e.hash},VZ=function(e,t,n,r){return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const a={...e.options,url:((null==r?void 0:r.basePath)||i)+e.url};return o.request(a)}},HZ=function(e){const t=function(e){return{buildingChangesGet:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};BZ("buildingChangesGet","ehrCode",t),BZ("buildingChangesGet","dokNr",n);const o=new URL("/buildingChanges",UZ);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...r},s={};void 0!==t&&(s.ehr_code=t),void 0!==n&&(s.dok_nr=n),zZ(o,s,r.query);let l=i&&i.headers?i.headers:{};return a.headers={...l,...r.headers},{url:$Z(o),options:a}},buildingCompareGet:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};BZ("buildingCompareGet","doEhitisId1",t),BZ("buildingCompareGet","doEhitisId2",n);const o=new URL("/buildingCompare",UZ);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...r},s={};void 0!==t&&(s.do_ehitis_id1=t),void 0!==n&&(s.do_ehitis_id2=n),zZ(o,s,r.query);let l=i&&i.headers?i.headers:{};return a.headers={...l,...r.headers},{url:$Z(o),options:a}},buildingDataGet:async function(t,n,r,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const a=new URL("/buildingData",UZ);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...i},c={};void 0!==t&&(c.ehr_code=t),void 0!==n&&(c.ehr_id=n),void 0!==r&&(c.version=r),void 0!==o&&(c.json=o),zZ(a,c,i.query);let u=s&&s.headers?s.headers:{};return l.headers={...u,...i.headers},{url:$Z(a),options:l}},buildingDeepCopyPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BZ("buildingDeepCopyPost","deepCopyPostRequest",t);const r=new URL("/buildingDeepCopy",UZ);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};zZ(r,{},n.query);let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=KZ(t,i,e),{url:$Z(r),options:i}},buildingOwnerSearchPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BZ("buildingOwnerSearchPost","bSearchOPostRequest",t);const r=new URL("/buildingOwnerSearch",UZ);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};zZ(r,{},n.query);let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=KZ(t,i,e),{url:$Z(r),options:i}},buildingSearchPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BZ("buildingSearchPost","bSearchPostRequest",t);const r=new URL("/buildingSearch",UZ);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};zZ(r,{},n.query);let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=KZ(t,i,e),{url:$Z(r),options:i}},buildingSecureDataArrayPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BZ("buildingSecureDataArrayPost","requestBody",t);const r=new URL("/buildingSecureDataArray",UZ);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};zZ(r,{},n.query);let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=KZ(t,i,e),{url:$Z(r),options:i}},buildingSecureDataGet:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=new URL("/buildingSecureData",UZ);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...r},s={};void 0!==t&&(s.ehr_code=t),void 0!==n&&(s.ehr_id=n),zZ(o,s,r.query);let l=i&&i.headers?i.headers:{};return a.headers={...l,...r.headers},{url:$Z(o),options:a}},buildingVersionsGet:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BZ("buildingVersionsGet","ehrCode",t);const r=new URL("/buildingVersions",UZ);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},a={};void 0!==t&&(a.ehr_code=t),zZ(r,a,n.query);let s=o&&o.headers?o.headers:{};return i.headers={...s,...n.headers},{url:$Z(r),options:i}},buildingsDataPost:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BZ("buildingsDataPost","ehrCodesPostRequest",t);const r=new URL("/buildingsData",UZ);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},a={"Content-Type":"application/json"};zZ(r,{},n.query);let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...n.headers},i.data=KZ(t,i,e),{url:$Z(r),options:i}},findEhrcodesDateafterGet:async function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};BZ("findEhrcodesDateafterGet","timestamp",t);const o=new URL("/find/ehrcodes/dateafter",UZ);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...r},s={};void 0!==t&&(s.timestamp=t instanceof Date?t.toISOString():t),void 0!==n&&(s.offset=n),zZ(o,s,r.query);let l=i&&i.headers?i.headers:{};return a.headers={...l,...r.headers},{url:$Z(o),options:a}},findEhrcodesDocIdGet:async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BZ("findEhrcodesDocIdGet","id",t);const r=new URL("/find/ehrcodes/docId",UZ);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},a={};void 0!==t&&(a.id=t),zZ(r,a,n.query);let s=o&&o.headers?o.headers:{};return i.headers={...s,...n.headers},{url:$Z(r),options:i}}}}(e);return{async buildingChangesGet(n,r,o){const i=await t.buildingChangesGet(n,r,o);return VZ(i,Ee(),RZ,e)},async buildingCompareGet(n,r,o){const i=await t.buildingCompareGet(n,r,o);return VZ(i,Ee(),RZ,e)},async buildingDataGet(n,r,o,i,a){const s=await t.buildingDataGet(n,r,o,i,a);return VZ(s,Ee(),RZ,e)},async buildingDeepCopyPost(n,r){const o=await t.buildingDeepCopyPost(n,r);return VZ(o,Ee(),RZ,e)},async buildingOwnerSearchPost(n,r){const o=await t.buildingOwnerSearchPost(n,r);return VZ(o,Ee(),RZ,e)},async buildingSearchPost(n,r){const o=await t.buildingSearchPost(n,r);return VZ(o,Ee(),RZ,e)},async buildingSecureDataArrayPost(n,r){const o=await t.buildingSecureDataArrayPost(n,r);return VZ(o,Ee(),RZ,e)},async buildingSecureDataGet(n,r,o){const i=await t.buildingSecureDataGet(n,r,o);return VZ(i,Ee(),RZ,e)},async buildingVersionsGet(n,r){const o=await t.buildingVersionsGet(n,r);return VZ(o,Ee(),RZ,e)},async buildingsDataPost(n,r){const o=await t.buildingsDataPost(n,r);return VZ(o,Ee(),RZ,e)},async findEhrcodesDateafterGet(n,r,o){const i=await t.findEhrcodesDateafterGet(n,r,o);return VZ(i,Ee(),RZ,e)},async findEhrcodesDocIdGet(n,r){const o=await t.findEhrcodesDocIdGet(n,r);return VZ(o,Ee(),RZ,e)}}};class WZ extends LZ{buildingChangesGet(e,t,n){return HZ(this.configuration).buildingChangesGet(e,t,n).then((e=>e(this.axios,this.basePath)))}buildingCompareGet(e,t,n){return HZ(this.configuration).buildingCompareGet(e,t,n).then((e=>e(this.axios,this.basePath)))}buildingDataGet(e,t,n,r,o){return HZ(this.configuration).buildingDataGet(e,t,n,r,o).then((e=>e(this.axios,this.basePath)))}buildingDeepCopyPost(e,t){return HZ(this.configuration).buildingDeepCopyPost(e,t).then((e=>e(this.axios,this.basePath)))}buildingOwnerSearchPost(e,t){return HZ(this.configuration).buildingOwnerSearchPost(e,t).then((e=>e(this.axios,this.basePath)))}buildingSearchPost(e,t){return HZ(this.configuration).buildingSearchPost(e,t).then((e=>e(this.axios,this.basePath)))}buildingSecureDataArrayPost(e,t){return HZ(this.configuration).buildingSecureDataArrayPost(e,t).then((e=>e(this.axios,this.basePath)))}buildingSecureDataGet(e,t,n){return HZ(this.configuration).buildingSecureDataGet(e,t,n).then((e=>e(this.axios,this.basePath)))}buildingVersionsGet(e,t){return HZ(this.configuration).buildingVersionsGet(e,t).then((e=>e(this.axios,this.basePath)))}buildingsDataPost(e,t){return HZ(this.configuration).buildingsDataPost(e,t).then((e=>e(this.axios,this.basePath)))}findEhrcodesDateafterGet(e,t,n){return HZ(this.configuration).findEhrcodesDateafterGet(e,t,n).then((e=>e(this.axios,this.basePath)))}findEhrcodesDocIdGet(e,t){return HZ(this.configuration).findEhrcodesDocIdGet(e,t).then((e=>e(this.axios,this.basePath)))}}const YZ=e=>{var t,n,o,i;let{buildingsActualDataApiEndpoint:a,classifierApiEndpoint:c,linkGen:u,generateLink:d,myViewsApiEndpoint:p,searchType:f,userApiEndpoint:h,userInfo:m}=e;const g=(0,UJ.useDispatch)(),v=["MKM","KOV","TJA"].includes(m&&m.activeRole&&null!==(t=m.activeRole)&&void 0!==t&&t.businessType?null===(n=m.activeRole)||void 0===n?void 0:n.businessType:""),b=["MKM","KOV","TJA","N","KT"].includes(m&&m.activeRole&&null!==(o=m.activeRole)&&void 0!==o&&o.businessType?null===(i=m.activeRole)||void 0===i?void 0:i.businessType:""),y=!m,[x,w]=(0,B.useState)({}),[S,_]=(0,B.useState)({}),[E,k]=(0,B.useState)({}),[T,C]=(0,B.useState)([]),[D,j]=(0,B.useState)([]),[A,N]=(0,B.useState)([]),[P,R]=(0,B.useState)(!1),[L,F]=(0,B.useState)(!1),[U,z]=(0,B.useState)(!1),K=new Ne(new yt({basePath:c})),$=new Ye(new et({basePath:h})),H=new ht(new yt({basePath:p})),W=new Xe(new et({basePath:h})),Y=new WZ(new yt({basePath:a})),q=async(e,t,n)=>{try{const r=await W.searchPerson(e,t,n);return r.data}catch(e){console.log("= = = callSearchPerson error occured:",e)}};return(0,B.useEffect)((()=>{K.getAllDocumentTypes().then((e=>{g(r(e.data))})).catch((e=>{console.log(e)})),$.getJurKovPersons().then((e=>{g(s(e.data))})).catch((e=>{console.log(e)})),K.getUsageClassifierTypes().then((e=>{g(l(e.data))})).catch((e=>{console.log(e)}))}),[]),(0,B.useEffect)((()=>{if(Object.keys(E).length>0){z(!0);H.searchDetailProceedings(E).then((e=>{g(M(e.data)),N(e.data),z(!1)})).catch((e=>{console.log(e),z(!1)}))}}),[E]),(0,B.useEffect)((()=>{if(Object.keys(S).length>0){F(!0);H.searchDetailDocuments(S).then((e=>{g(I(e.data)),j(e.data),F(!1)})).catch((e=>{console.log(e),F(!1)}))}}),[S]),(0,B.useEffect)((()=>{if(Object.keys(x).length>0){let e;R(!0),e=b?Y.buildingOwnerSearchPost(x):Y.buildingSearchPost(x),e.then((e=>{g(O(e.data)),C(e.data),R(!1)})).catch((e=>{console.log(e),R(!1)}))}}),[x,b]),(0,cn.jsxs)("div",{children:[(0,cn.jsx)(V.Section,{collapsed:f!==ne,title:"detailsearch.buildings_detail_search",children:(0,cn.jsxs)("div",{children:[(0,cn.jsx)("div",{className:"filter-block",style:{paddingBottom:20},children:(0,cn.jsx)(kZ,{onSubmit:e=>{w(e)},isAdminRole:v,isAdminPlusRole:b,callSearchPerson:q})}),Object.keys(x).length>0&&0===T.length&&!P?(0,cn.jsx)("div",{style:{height:210},className:"d-flex justify-content-center align-items-center",children:(0,cn.jsx)(V.Text,{raw:"detailsearch.empty_search_result"})}):P?(0,cn.jsx)(V.SectionLoader,{}):(0,cn.jsx)(MZ,{linkGen:u,generateLink:d,isAdminRole:v,isAdminPlusRole:b})]})}),(0,cn.jsx)(V.Section,{collapsed:"DOCUMENTS_SEARCH"!==f,title:"detailsearch.documents_detail_search",children:(0,cn.jsxs)("div",{children:[(0,cn.jsx)("div",{className:"filter-block",style:{paddingBottom:20},children:(0,cn.jsx)(TZ,{onSubmit:e=>{_(e)},callSearchPerson:q,isNonAuthenticatedUser:y})}),Object.keys(S).length>0&&0===D.length&&!L?(0,cn.jsx)("div",{style:{height:210},className:"d-flex justify-content-center align-items-center",children:(0,cn.jsx)(V.Text,{raw:"detailsearch.empty_search_result"})}):L?(0,cn.jsx)(V.SectionLoader,{}):(0,cn.jsx)(NZ,{linkGen:u,generateLink:d,userInfo:m,filterStateDocumentsSearch:S})]})}),v&&(0,cn.jsx)(V.Section,{collapsed:"PROCEEDINGS_SEARCH"!==f,title:"detailsearch.proceedings_detail_search",children:(0,cn.jsxs)("div",{children:[(0,cn.jsx)("div",{className:"filter-block",style:{paddingBottom:20},children:(0,cn.jsx)(CZ,{onSubmit:e=>{k(e)}})}),Object.keys(E).length>0&&0===A.length&&!U?(0,cn.jsx)("div",{style:{height:210},className:"d-flex justify-content-center align-items-center",children:(0,cn.jsx)(V.Text,{raw:"detailsearch.empty_search_result"})}):U?(0,cn.jsx)(V.SectionLoader,{}):(0,cn.jsx)(PZ,{linkGen:u,userInfo:m,generateLink:d})]})})]})}})(),module.exports=i})();
|