import{r as t,c as e,d as o,e as r,h as n,H as s,f as i}from"./p-fb454e97.js";import{g as a,a as c}from"./p-e4d9af6c.js";import{c as u}from"./p-39eb611e.js";import"./p-bdf078de.js";import{c as l,u as p}from"./p-56cafef4.js";import{d}from"./p-fe259235.js";import{b as h,h as f,c as m}from"./p-4528e464.js";import{G as b,a as w,b as v,l as g,i as y,c as E,g as S,d as O,e as j,s as _,f as T,r as P,h as C}from"./p-bcd015ef.js";import"./p-6f78ea17.js";import{A as R}from"./p-bc71b894.js";import"./p-9bfc5cec.js";import"./p-c5a0d075.js";import"./p-70700d3b.js";import"./p-754b7832.js";import{n as I,d as U}from"./p-a7724efa.js";import{a as k}from"./p-56b80293.js";import{U as N,G as L,a as G,b as A}from"./p-5414fa36.js";import{a as D,n as x,G as M,c as V,y as B,z as q,b as W,A as F}from"./p-4d3f8c91.js";import{S as H,G as Y,a as z,b as Q}from"./p-a51133ea.js";import{G as $,a as K,b as J,c as X,d as Z,e as tt}from"./p-b877c4b7.js";import{l as et}from"./p-d4a61462.js";import{a as ot,g as rt}from"./p-f4d2e8f3.js";import"./p-a53c9466.js";import{a as nt}from"./p-1bab3be7.js";import"./p-eeabbeed.js";import"./p-ab98ab7b.js";import"./p-308f51a0.js";import"./p-c5a78206.js";import"./p-9e2b7d7c.js";import"./p-713517a8.js";import{b as st}from"./p-9b3682d7.js";import{g as it,P as at}from"./p-aa27f571.js";import{a as ct,d as ut}from"./p-69615ba5.js";import{l as lt,t as pt,s as dt,L as ht,a as ft,b as mt}from"./p-d80c1df8.js";import{a as bt}from"./p-12d36d1f.js";import{c as wt,d as vt,g as gt}from"./p-6cdfcb07.js";var yt=l((function(t){function e(t,e){var o=[],r=[];return null==e&&(e=function(t,e){return o[0]===e?"[Circular ~]":"[Circular ~."+r.slice(0,o.indexOf(e)).join(".")+"]"}),function(n,s){if(o.length>0){var i=o.indexOf(this);~i?o.splice(i+1):o.push(this),~i?r.splice(i,1/0,n):r.push(n),~o.indexOf(s)&&(s=e.call(this,n,s))}else o.push(s);return null==t?s:t.call(this,n,s)}}(t.exports=function(t,o,r,n){return JSON.stringify(t,e(o,n),r)}).getSerialize=e})),Et=l((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t){return"object"!==(void 0===t?"undefined":o(t))||null==t}}));p(Et);var St=l((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,o){var r=function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],s={value:r};if(!e(r))for(var i in s.children={},r){var a=n.concat(i);o.length&&-1!==o.indexOf(a.join("."))||(s.children[i]=t(e,o,r[i],a))}return s}(t,e,o);return{detectMutations:function(){return function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n=arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=r?r.value:void 0,c=a===n;if(s&&!c&&!Number.isNaN(n))return{wasMutated:!0,path:i};if(e(a)||e(n))return{wasMutated:!1};var u={};Object.keys(r.children).forEach((function(t){u[t]=!0})),Object.keys(n).forEach((function(t){u[t]=!0}));for(var l=Object.keys(u),p=0;p<l.length;p++){var d=l[p],h=i.concat(d);if(!o.length||-1===o.indexOf(h.join("."))){var f=t(e,o,r.children[d],n[d],c,h);if(f.wasMutated)return f}}return{wasMutated:!1}}(t,e,r,o)}}}}));p(St);p(l((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.isImmutable,i=void 0===e?n.default:e,u=t.ignore,l=s.default.bind(null,i,u);return function(t){var e=t.getState,n=e(),s=l(n),i=void 0;return function(t){return function(u){n=e(),i=s.detectMutations(),s=l(n),(0,o.default)(!i.wasMutated,a,(i.path||[]).join("."));var p=t(u);return n=e(),i=s.detectMutations(),s=l(n),i.wasMutated&&(0,o.default)(!i.wasMutated,c,(i.path||[]).join("."),(0,r.default)(u)),p}}}};var o=i(h),r=i(yt),n=i(Et),s=i(St);function i(t){return t&&t.__esModule?t:{default:t}}var a=["A state mutation was detected between dispatches, in the path `%s`.","This may cause incorrect behavior.","(http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)"].join(" "),c=["A state mutation was detected inside a dispatch, in the path: `%s`.","Take a look at the reducer(s) handling the action %s.","(http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)"].join(" ")})));var Ot=function(){var t,e=("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()).Symbol;return"function"==typeof e?e.observable?t=e.observable:(t=e("observable"),e.observable=t):t="@@observable",t}(),jt=function(){return Math.random().toString(36).substring(7).split("").join(".")},_t={INIT:"@@redux/INIT"+jt(),REPLACE:"@@redux/REPLACE"+jt(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+jt()}};function Tt(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Pt(t,e,o){var r;if("function"==typeof e&&"function"==typeof o||"function"==typeof o&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof e&&void 0===o&&(o=e,e=void 0),void 0!==o){if("function"!=typeof o)throw new Error("Expected the enhancer to be a function.");return o(Pt)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var n=t,s=e,i=[],a=i,c=!1;function u(){a===i&&(a=i.slice())}function l(){if(c)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function p(t){if("function"!=typeof t)throw new Error("Expected the listener to be a function.");if(c)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var e=!0;return u(),a.push(t),function(){if(e){if(c)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");e=!1,u();var o=a.indexOf(t);a.splice(o,1),i=null}}}function d(t){if(!Tt(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw new Error("Reducers may not dispatch actions.");try{c=!0,s=n(s,t)}finally{c=!1}for(var e=i=a,o=0;o<e.length;o++)(0,e[o])();return t}function h(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");n=t,d({type:_t.REPLACE})}function f(){var t,e=p;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new TypeError("Expected the observer to be an object.");function o(){t.next&&t.next(l())}return o(),{unsubscribe:e(o)}}})[Ot]=function(){return this},t}return d({type:_t.INIT}),(r={dispatch:d,subscribe:p,getState:l,replaceReducer:h})[Ot]=f,r}function Ct(t,e){var o=e&&e.type;return"Given "+(o&&'action "'+String(o)+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function Rt(t){for(var e=Object.keys(t),o={},r=0;r<e.length;r++){var n=e[r];"function"==typeof t[n]&&(o[n]=t[n])}var s,i=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(e){var o=t[e];if(void 0===o(void 0,{type:_t.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===o(void 0,{type:_t.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+_t.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(o)}catch(a){s=a}return function(t,e){if(void 0===t&&(t={}),s)throw s;for(var r=!1,n={},a=0;a<i.length;a++){var c=i[a],u=t[c],l=(0,o[c])(u,e);if(void 0===l){var p=Ct(c,e);throw new Error(p)}n[c]=l,r=r||l!==u}return(r=r||i.length!==Object.keys(t).length)?n:t}}function It(t,e){return function(){return e(t.apply(this,arguments))}}function Ut(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function kt(t,e){var o=Object.keys(t);return Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(t)),e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o}function Nt(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?kt(o,!0).forEach((function(e){Ut(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):kt(o).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function Lt(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Gt(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(t){return function(){var o=t.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},n={getState:o.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=e.map((function(t){return t(n)}));return Nt({},o,{dispatch:r=Lt.apply(void 0,s)(o.dispatch)})}}}const At=Object.freeze({__proto__:null,__DO_NOT_USE__ActionTypes:_t,applyMiddleware:Gt,bindActionCreators:function(t,e){if("function"==typeof t)return It(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var o={};for(var r in t){var n=t[r];"function"==typeof n&&(o[r]=It(n,e))}return o},combineReducers:Rt,compose:Lt,createStore:Pt}),Dt=f({},null),xt=f({[b]:(t,{payload:e})=>Object.assign({},e.entities.pages)},null),Mt=(t,{payload:e})=>Object.assign({},t,e.entities.users),Vt=f({[D]:(t,{payload:e})=>e?Object.assign({},t,e.entities.users):t,[N]:Mt,[x]:Mt,[H]:Mt,[L]:(t,{payload:e})=>Object.assign({},t,e.entities.users),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.users)},null),Bt=f({[Y]:(t,{payload:e})=>Object.assign({},t,e.entities.toDos),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.toDos)},null),qt=f({GET_EVENTS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,e.entities.events),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.events)},null),Wt=f({GET_EVENTS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,e.entities.eventTypes),GET_EVENT_TYPES_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,e.entities.eventTypes),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.eventTypes)},null),Ft=f({GET_FORUM_TOPICS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,e.entities.forumTopics),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.forumTopics)},null),Ht=f({[$]:(t,{payload:e})=>Object.assign({},t,e.entities.comments),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.comments)},null),Yt=f({GET_BLOGS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,e.entities.blogs)},null),zt=f({GET_ANNOUNCEMENTS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,e.entities.announcements),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.announcements)},null),Qt=f({GET_TO_DO_SUBMISSIONS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,e.entities.toDoSubmissions),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.toDoSubmissions)},null),$t=f({[v]:(t,{payload:e})=>Object.assign({},t,e.entities.navigationMenus)},null),Kt=f({[K]:(t,{payload:e})=>Object.assign({},t,e.entities.likes),[w]:(t,{payload:e})=>Object.assign({},t,e.entities.likes)},null),Jt=f({[w]:(t,{payload:e})=>Object.assign({},t,e.entities.eventFollowUpSubmissions)},null),Xt=Rt({operations:f({[w]:(t,{payload:e})=>Object.assign({},t,e.entities.operations)},null),announcements:zt,blogs:Yt,users:Vt,pages:xt,toDos:Bt,toDoSubmissions:Qt,events:qt,eventTypes:Wt,forumTopics:Ft,comments:Ht,likes:Kt,navigationMenus:$t,eventFollowUpSubmissions:Jt,userAuth:f({[M]:(t,{payload:e})=>e.entities.userAuth,[V]:(t,{})=>null},null)}),Zt=f({[b]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items})},null),te=f({[z]:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),[Y]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),[Q]:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.toDosList.items})},null),ee=f({GET_EVENTS_LIST_REQUEST:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),GET_EVENTS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),GET_EVENTS_LIST_ERROR:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.eventsList.items})},null),oe=f({GET_EVENT_TYPES_LIST_REQUEST:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),GET_EVENT_TYPES_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),GET_EVENT_TYPES_LIST_ERROR:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.eventTypesList.items})},null),re=f({GET_ANNOUNCEMENTS_LIST_REQUEST:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),GET_ANNOUNCEMENTS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),GET_ANNOUNCEMENTS_LIST_ERROR:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.announcementsList.items})},null),ne=f({GET_BLOGS_LIST_REQUEST:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),GET_BLOGS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),GET_BLOGS_LIST_ERROR:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0})},null),se=f({GET_FORUM_TOPICS_LIST_REQUEST:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),GET_FORUM_TOPICS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),GET_FORUM_TOPICS_LIST_ERROR:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.forumTopicsList.items})},null),ie=f({[G]:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),[L]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),[A]:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.usersList.items})},null),ae=f({GET_TO_DO_SUBMISSIONS_LIST_REQUEST:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),GET_TO_DO_SUBMISSIONS_LIST_SUCCESS:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),GET_TO_DO_SUBMISSIONS_LIST_ERROR:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.toDoSubmissionsList.items})},null),ce=f({[J]:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),[$]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),[X]:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.commentsList.items})},null),ue=f({[Z]:(t,{})=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),[K]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.items}),[tt]:(t,{})=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.likesList.items})},null),le=f({[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.eventFollowUpSubmissionsList.items})},null),pe=Rt({operations:f({[w]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,items:e.result.operationsList.items})},null),ambassadors:ie,announcements:re,blogs:ne,pages:Zt,toDosPage:te,toDoSubmissions:ae,events:ee,eventTypes:oe,forumTopics:se,comments:ce,likes:ue,eventFollowUpSubmissions:le,userAuth:f({[B]:t=>Object.assign({},t,{inProcess:!0,hasErrors:!1}),[M]:(t,{payload:e})=>Object.assign({},t,{inProcess:!1,hasErrors:!1,data:e.result}),[q]:t=>Object.assign({},t,{inProcess:!1,hasErrors:!0}),[V]:(t,{})=>null},null)}),de=Rt({cacheName:Dt,isAuthenticated:f({[W]:(t,{})=>!1,[D]:(t,{payload:e})=>!!e,[x]:(t,{})=>!0,[V]:(t,{})=>!1},null),userId:f({[W]:(t,{})=>null,[V]:(t,{})=>null,[D]:(t,{payload:e})=>e?e.result:null,[x]:(t,{payload:e})=>e.result},null),content:pe,entities:Xt,currentRoute:f({ROUTE_DID_CHANGE:(t,{payload:e})=>e.to},null)});var he=l((function(t,e){var o=At.compose;e.__esModule=!0,e.composeWithDevTools="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?o:o.apply(null,arguments)},e.devToolsEnhancer="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}}}));p(he);function fe(t){return function(e){var o=e.dispatch,r=e.getState;return function(e){return function(n){return"function"==typeof n?n(o,r,t):e(n)}}}}var me=fe();me.withExtraArgument=fe;const be={cacheName:"resville-2",isAuthenticated:!1,userId:null,content:{operations:{items:[],inProcess:!0,hasErrors:!1},pages:{items:[],inProcess:!0,hasErrors:!1},toDosPage:{items:[],inProcess:!0,hasErrors:!1},toDoSubmissions:{items:[],inProcess:!0,hasErrors:!1},events:{items:[],inProcess:!0,hasErrors:!1},eventTypes:{items:[],inProcess:!0,hasErrors:!1},blogs:{items:[],inProcess:!0,hasErrors:!1},forumTopics:{items:[],inProcess:!0,hasErrors:!1},announcements:{items:[],inProcess:!0,hasErrors:!1},ambassadors:{items:[],inProcess:!0,hasErrors:!1},comments:{items:[],inProcess:!0,hasErrors:!1},likes:{items:[],inProcess:!0,hasErrors:!1},eventFollowUpSubmissions:{items:[],inProcess:!0,hasErrors:!1},userAuth:{inProcess:!0,hasErrors:!1,data:null}},entities:{operations:{},blogs:{},users:{},pages:{},toDos:{},toDoSubmissions:{},events:{},eventTypes:{},forumTopics:{},announcements:{},navigationMenus:{},comments:{},likes:{},eventFollowUpSubmissions:{},userAuth:{}},currentRoute:null},we=d("mvu:redux"),ve=et(t=>{g.setItem("state",t.getState()).catch(t=>{we("save to state error",t),g.removeItem("state")})},2e3,{leading:!0}),ge=t=>e=>o=>{const r=e(o);return ve(t),r},ye=()=>g.getItem("state").then(t=>{let e;return e=t?t.cacheName!==be.cacheName?be:t:be,e}),Ee=d("mvu:general"),Se=()=>ye().then(t=>Pt(de,t,Gt(me.withExtraArgument({}),ge))).then(t=>{const e=t.dispatch;return ot(t),e(y()).catch(t=>(Ee("init user error. try to logout",t),e(E())))}).then(()=>null),Oe=(t,e)=>{const o=document.getElementsByTagName("head")[0],r=o.querySelector('meta[name="'+t+'"]');if(null!=r&&r.remove(),null!=e&&""!==e&&"0"!==e){let r=document.createElement("meta");r.name=t,r.content=e,o.appendChild(r)}},je=(t,e)=>{const o=document.getElementsByTagName("head")[0],r=o.querySelector('meta[property="'+t+'"]');if(null!=r&&r.remove(),null!=e&&""!==e&&"0"!==e){let r=document.createElement("meta");r.setAttribute("property",t),r.content=e,o.appendChild(r)}},_e=()=>{document.getElementsByTagName("title")[0].innerHTML="Resourceville"},Te=class{constructor(n){t(this,n),this.isReady=!1,this.userLoggedIn=e(this,"userLoggedIn",7),this.toastCtrl=o(this,"ion-toast-controller"),this.stencilStore=r(this,"store")}componentWillLoad(){Se().then(()=>{const t=this.stencilStore,e=rt();e.getState(),t.setStore(e);const o=e.dispatch;o(S()),o(t=>(t(m("GET_BLOGS_LIST_REQUEST")()),fetch("https://api.bubbleup.net/margaritaville/blog-posts/?per_page=10").then(t=>t.json()).then(t=>Promise.all(t.map(t=>fetch("https://api.bubbleup.net/margaritaville/blog-media/media/"+t.featured_media).then(t=>t.json()).then(e=>t.featured_media_object=e).then(()=>t)))).then(t=>({items:t})).then(e=>{const o=I(e,st);var r;return t((r=o,m("GET_BLOGS_LIST_SUCCESS")(r))),e}).catch(e=>{throw t((t=>m("GET_BLOGS_LIST_ERROR")(t))(e)),e}))),o(O()),F().then(t=>{if(t){const t=R.injector();this.userLoggedIn.emit({token:t.tokenService.userAuthToken}),"undefined"!=typeof Notification&&("granted"===Notification.permission?j():"default"===Notification.permission&&_().then(t=>{t&&T()}))}}),this.unsubscribe=t.mapStateToProps(this,t=>{const{currentRoute:e,entities:o}=t;return((t,e)=>{if(null===t)return void _e();let o=t.substr(1);""===o&&(o="home");const r=e.pages[o],n=e.pages.home;r||n?(((t,e)=>{t&&t.seoTitle?document.getElementsByTagName("title")[0].innerHTML=t.seoTitle:t&&t.title?document.getElementsByTagName("title")[0].innerHTML=t.title:e&&e.seoTitle?document.getElementsByTagName("title")[0].innerHTML=e.seoTitle:e&&e.title&&(document.getElementsByTagName("title")[0].innerHTML=e.title)})(r,n),((t,e)=>{t&&t.seoTitle?(Oe("title",t.seoTitle),je("og:title",t.seoTitle)):t&&t.title?(Oe("title",t.title),je("og:title",t.title)):(e&&e.seoTitle||e&&e.title)&&(Oe("title",e.seoTitle),je("og:title",e.seoTitle)),je("og:type","website"),je("og:url",t&&t.path?"https://www.resourceville.com"+t.path:"https://www.resourceville.com/"),t&&t.description?(Oe("description",t.description),je("og:description",t.description)):e&&e.description&&(Oe("description",e.description),je("og:description",e.description)),t&&t.robots?Oe("robots",t.robots):e&&e.robots&&Oe("robots",e.robots),t&&t.ogImage?je("og:image",t.ogImage):e&&e.ogImage&&je("og:image",e.ogImage),t&&t.ogVideo?je("og:video",t.ogVideo):e&&e.ogVideo&&je("og:video",e.ogVideo),t&&t.ogAudio?je("og:audio",t.ogAudio):e&&e.ogAudio&&je("og:audio",e.ogAudio)})(r,n)):_e()})(e,o),{pushWelcomePageData:U("push-welcome",k,t.entities)}}),this.isReady=!0}),(()=>{const t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0})()&&document.documentElement.classList.add("ie")}componentDidUnload(){this.unsubscribe()}async onSWUpdate(){const t=await navigator.serviceWorker.getRegistration();t&&t.waiting&&console.log("New version available. Please reload")}render(){return this.isReady?n("ion-app",null,n("app-router",null),n("ion-nav",null),n("div",{style:{display:"none",width:"600px"},id:"push-notifications-modal"},this.pushWelcomePageData&&n("p",{innerHTML:this.pushWelcomePageData.html}),n("p",null,n("button",{class:"btn btn-primary md ion-activatable hydrated activated",onClick:()=>{j(),C()}},"Yes"),n("button",{class:"btn md ion-activatable hydrated activated",onClick:()=>{P(),C()}},"Later")))):null}};Te.style=".agreement-required{color:#dc3545;border:5px solid #dc3545}.modal-backdrop.show{display:none}",window.rsResetToken="";const Pe=class{constructor(e){t(this,e),this.isAuthenticated=!1,this.store=r(this,"store")}componentWillLoad(){this.unsubscribe=this.store.mapStateToProps(this,t=>{const{isAuthenticated:e,entities:o,userId:r}=t;let n;return r&&(n=U(r,nt,o)),{isAuthenticated:e,user:n}})}componentDidUnload(){this.unsubscribe()}getRouter(){return n("ion-router",{useHash:!1,onIonRouteDidChange:t=>this.onIonRouteDidChange(t),onIonRouteWillChange:t=>this.onIonRouteWillChange(t)},n("ion-route",{url:"/reset-password",component:"app-reset-password-page"}),n("ion-route",{url:"/",component:"app-frontend-page"},n("ion-route",{component:"app-home-page"}),n("ion-route",{url:"/login",component:"app-login2-page"}),n("ion-route",{url:"/brand-updates",component:"app-brand-updates-page"}),n("ion-route",{url:"/brand-standards",component:"app-brand-standards-page"}),n("ion-route",{url:"/mvu-request-form",component:"app-mvu-request-page"}),n("ion-route",{url:"/brand-assets",component:"app-brand-assets-page"}),n("ion-route",{url:"/when-the-coast-is-clear",component:"app-coast-is-clear-page"}),n("ion-route",{url:"/forgot-password",component:"app-forgot-password-page"}),n("ion-route",{url:"/reset-link-sent",component:"app-reset-link-sent-page"}),n("ion-route",{url:"/password-changed",component:"app-password-changed-page"}),n("ion-route",{url:"/access-request",component:"app-access-request-page"}),n("ion-route",{url:"/waiver-request",component:"app-waiver-request-page"}),n("ion-route",{url:"/waiver-thank-you",component:"app-waiver-thank-you-page"}),n("ion-route",{url:"/events",component:"app-events-page"}),n("ion-route",{url:"/About",component:"app-about-page"}),n("ion-route",{url:"/overview",component:"app-overview-page"}),n("ion-route",{url:"/ambassadors",component:"app-ambassadors-page"}),n("ion-route",{url:"/round-table",component:"app-roundtable-page"}),n("ion-route",{url:"/Apply",component:"app-apply-page"}),n("ion-route",{url:"/faq",component:"app-faq-page"}),n("ion-route",{url:"/cbm",component:"app-cmb-page"}),n("ion-route",{url:"/flag",component:"app-flag-page"}),n("ion-route",{url:"/alumni",component:"app-alumni-page"}),n("ion-route",{url:"/idea",component:"app-idea-page"}),n("ion-route",{url:"/highlights",component:"app-highlights-page"}),n("ion-route",{url:"/media",component:"app-media-page"}),n("ion-route",{url:"/margaritaville-on-the-map",component:"app-map-page"}),n("ion-route",{url:"/apply-confirmation",component:"app-apply-confirmation-page"}),n("ion-route",{url:"/idea-confirmation",component:"app-idea-confirmation-page"}),n("ion-route",{url:"/revenue-strategy",component:"app-revenue-page"}),n("ion-route",{url:"/resources",component:"app-resources-page"}),n("ion-route",{url:"/stickers",component:"app-stickers-page"}),n("ion-route",{url:"/terms-and-conditions",component:"app-terms-and-conditions-page"}),n("ion-route",{url:"/change-password",component:"app-change-password-page"}),n("ion-route",{url:"/privacy-policy",component:"app-privacy-policy-page"}),n("ion-route",{url:"/privacy",component:"app-privacy-policy-page"}),n("ion-route",{url:"/cookie-notice",component:"app-cookie-notice-page"}),n("ion-route",{url:"/contact",component:"app-contact-us-page"}),n("ion-route",{url:"/contact-thankyou",component:"app-contact-thank-you-page"}),n("ion-route",{url:"/:pageId",component:"app-simple-text-dropdown-page"})),!this.isAuthenticated&&[n("ion-route-redirect",{from:"/contact-thankyou",to:"/contact-thankyou"}),n("ion-route-redirect",{from:"/privacy",to:"/privacy-policy"}),n("ion-route-redirect",{id:"resetPassword",from:"/reset-password",to:"/reset-password"}),n("ion-route-redirect",{from:"/forgot-password",to:"/forgot-password"}),n("ion-route-redirect",{from:"/password-changed",to:"/password-changed"}),n("ion-route-redirect",{from:"/reset-link-sent",to:"/reset-link-sent"}),n("ion-route-redirect",{from:"/privacy-policy",to:"/privacy-policy"}),n("ion-route-redirect",{from:"/access-request",to:"/access-request"}),n("ion-route-redirect",{from:"/waiver-thank-you",to:"/waiver-thank-you"}),n("ion-route-redirect",{from:"/waiver-request",to:"/waiver-request"}),n("ion-route-redirect",{from:"/cookie-notice",to:"/cookie-notice"}),n("ion-route-redirect",{from:"/terms",to:"/terms-and-conditions"}),n("ion-route-redirect",{from:"/terms-and-conditions",to:"/terms-and-conditions"}),n("ion-route-redirect",{from:"/legal",to:"/legal"}),n("ion-route-redirect",{from:"/*",to:"/login"})],this.isAuthenticated&&[n("ion-route-redirect",{from:"/privacy",to:"/privacy-policy"}),n("ion-route-redirect",{from:"/login",to:"/"})])}render(){let t=this.getRouter();if(this.user&&this.user.passwordExpired)return n("ion-router",{useHash:!1,onIonRouteDidChange:t=>this.onIonRouteDidChange(t),onIonRouteWillChange:t=>this.onIonRouteWillChange(t)},n("ion-route",{url:"/change-password",component:"app-change-password-page"}),n("ion-route-redirect",{from:"/change-password",to:"/change-password"}),n("ion-route-redirect",{from:"/password-changed",to:"/password-changed"}),",",n("ion-route-redirect",{from:"/*",to:"/change-password"}));if("/reset-password"===window.location.pathname){let t=this.getParams();t&&t.token&&t.token&&(window.rsResetToken=t.token)}return t}getParams(){let t={},e=document.createElement("a");e.href=window.location.href;let o=e.search.substring(1).split("&");for(let r=0;r<o.length;r++){let e=o[r].split("=");t[e[0]]=decodeURIComponent(e[1])}return t}onIonRouteWillChange(t){}onIonRouteDidChange(t){var e;(0,rt().dispatch)((e=t.detail,m("ROUTE_DID_CHANGE")(e))),R.injector().tokenService.currentRoute=t.detail.to,this.handleScrollChange()}handleScrollChange(){const t=document.querySelector("ion-app .ion-page:not(.ion-page-hidden) ion-nav > .ion-page:not(.ion-page-hidden) > ion-content");t&&(t.scrollToTop(),t.dataset.scrollIsHandled||(t.dataset.scrollIsHandled="1",t.scrollEvents=!0,t.addEventListener("ionScroll",t=>{var e=document.getElementsByTagName("html")[0];t.detail.scrollTop>=200?e.classList.add("has-scrolled"):e.classList.remove("has-scrolled")})))}},Ce=class{constructor(e){t(this,e)}componentDidLoad(){Ie(()=>{const t=c(window,"hybrid");u.getBoolean("_testing")||__sc_import_resourceville("./p-6e61c1d9.js").then(t=>t.startTapClick(u)),u.getBoolean("statusTap",t)&&__sc_import_resourceville("./p-a960b660.js").then(t=>t.startStatusTap()),u.getBoolean("inputShims",Re())&&__sc_import_resourceville("./p-1d684629.js").then(t=>t.startInputShims(u)),u.getBoolean("hardwareBackButton",t)&&__sc_import_resourceville("./p-53967afa.js").then(t=>t.startHardwareBackButton()),__sc_import_resourceville("./p-93dfd6b6.js").then(t=>t.startFocusVisible())})}render(){const t=a(this);return n(s,{class:{[t]:!0,"ion-page":!0,"force-statusbar-padding":u.getBoolean("_forceStatusbarPadding")}})}get el(){return i(this)}},Re=()=>c(window,"ios")&&c(window,"mobile"),Ie=t=>{"requestIdleCallback"in window?window.requestIdleCallback(t):setTimeout(t,32)};Ce.style="html.plt-mobile ion-app{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}";class Ue{constructor(t,e){this.component=t,this.params=e,this.state=1}async init(t){if(this.state=2,!this.element){const e=this.component;this.element=await bt(this.delegate,t,e,["ion-page","ion-page-invisible"],this.params)}}_destroy(){ct(3!==this.state,"view state must be ATTACHED");const t=this.element;t&&(this.delegate?this.delegate.removeViewFromDom(t.parentElement,t):t.remove()),this.nav=void 0,this.state=3}}const ke=(t,e,o)=>{if(!t)return!1;if(t.component!==e)return!1;const r=t.params;if(r===o)return!0;if(!r&&!o)return!0;if(!r||!o)return!1;const n=Object.keys(r),s=Object.keys(o);if(n.length!==s.length)return!1;for(const i of n)if(r[i]!==o[i])return!1;return!0},Ne=(t,e)=>t?t instanceof Ue?t:new Ue(t,e):null,Le=class{constructor(o){t(this,o),this.transInstr=[],this.animationEnabled=!0,this.useRouter=!1,this.isTransitioning=!1,this.destroyed=!1,this.views=[],this.animated=!0,this.ionNavWillLoad=e(this,"ionNavWillLoad",7),this.ionNavWillChange=e(this,"ionNavWillChange",3),this.ionNavDidChange=e(this,"ionNavDidChange",3)}swipeGestureChanged(){this.gesture&&this.gesture.setDisabled(!0!==this.swipeGesture)}rootChanged(){void 0!==this.root&&(this.useRouter||this.setRoot(this.root,this.rootParams))}componentWillLoad(){if(this.useRouter=!!document.querySelector("ion-router")&&!this.el.closest("[no-router]"),void 0===this.swipeGesture){const t=a(this);this.swipeGesture=u.getBoolean("swipeBackEnabled","ios"===t)}this.ionNavWillLoad.emit()}async componentDidLoad(){this.rootChanged(),this.gesture=(await __sc_import_resourceville("./p-55f76582.js")).createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this)),this.swipeGestureChanged()}componentDidUnload(){for(const t of this.views)lt(t.element,ht),t._destroy();this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.transInstr.length=this.views.length=0,this.destroyed=!0}push(t,e,o,r){return this.queueTrns({insertStart:-1,insertViews:[{page:t,params:e}],opts:o},r)}insert(t,e,o,r,n){return this.queueTrns({insertStart:t,insertViews:[{page:e,params:o}],opts:r},n)}insertPages(t,e,o,r){return this.queueTrns({insertStart:t,insertViews:e,opts:o},r)}pop(t,e){return this.queueTrns({removeStart:-1,removeCount:1,opts:t},e)}popTo(t,e,o){const r={removeStart:-1,removeCount:-1,opts:e};return"object"==typeof t&&t.component?(r.removeView=t,r.removeStart=1):"number"==typeof t&&(r.removeStart=t+1),this.queueTrns(r,o)}popToRoot(t,e){return this.queueTrns({removeStart:1,removeCount:-1,opts:t},e)}removeIndex(t,e=1,o,r){return this.queueTrns({removeStart:t,removeCount:e,opts:o},r)}setRoot(t,e,o,r){return this.setPages([{page:t,params:e}],o,r)}setPages(t,e,o){return null==e&&(e={}),!0!==e.animated&&(e.animated=!1),this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:e},o)}setRouteId(t,e,o){const r=this.getActiveSync();if(ke(r,t,e))return Promise.resolve({changed:!1,element:r.element});let n;const s=new Promise(t=>n=t);let i;const a={updateURL:!1,viewIsReady:t=>{let e;const o=new Promise(t=>e=t);return n({changed:!0,element:t,markVisible:async()=>{e(),await i}}),o}};if("root"===o)i=this.setRoot(t,e,a);else{const r=this.views.find(o=>ke(o,t,e));r?i=this.popTo(r,Object.assign(Object.assign({},a),{direction:"back"})):"forward"===o?i=this.push(t,e,a):"back"===o&&(i=this.setRoot(t,e,Object.assign(Object.assign({},a),{direction:"back",animated:!0})))}return s}async getRouteId(){const t=this.getActiveSync();return t?{id:t.element.tagName,params:t.params,element:t.element}:void 0}getActive(){return Promise.resolve(this.getActiveSync())}getByIndex(t){return Promise.resolve(this.views[t])}canGoBack(t){return Promise.resolve(this.canGoBackSync(t))}getPrevious(t){return Promise.resolve(this.getPreviousSync(t))}getLength(){return this.views.length}getActiveSync(){return this.views[this.views.length-1]}canGoBackSync(t=this.getActiveSync()){return!(!t||!this.getPreviousSync(t))}getPreviousSync(t=this.getActiveSync()){if(!t)return;const e=this.views,o=e.indexOf(t);return o>0?e[o-1]:void 0}queueTrns(t,e){if(this.isTransitioning&&null!=t.opts&&t.opts.skipIfBusy)return Promise.resolve(!1);const o=new Promise((e,o)=>{t.resolve=e,t.reject=o});return t.done=e,t.insertViews&&0===t.insertViews.length&&(t.insertViews=void 0),this.transInstr.push(t),this.nextTrns(),o}success(t,e){if(this.destroyed)this.fireError("nav controller was destroyed",e);else if(e.done&&e.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction),e.resolve(t.hasCompleted),!1!==e.opts.updateURL&&this.useRouter){const e=document.querySelector("ion-router");e&&e.navChanged("back"===t.direction?"back":"forward")}}failed(t,e){this.destroyed?this.fireError("nav controller was destroyed",e):(this.transInstr.length=0,this.fireError(t,e))}fireError(t,e){e.done&&e.done(!1,!1,t),e.reject&&!this.destroyed?e.reject(t):e.resolve(!1)}nextTrns(){if(this.isTransitioning)return!1;const t=this.transInstr.shift();return!!t&&(this.runTransition(t),!0)}async runTransition(t){try{this.ionNavWillChange.emit(),this.isTransitioning=!0,this.prepareTI(t);const e=this.getActiveSync(),o=this.getEnteringView(t,e);if(!e&&!o)throw new Error("no views in the stack to be removed");o&&1===o.state&&await o.init(this.el),this.postViewInit(o,e,t);const r=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&o!==e?await this.transition(o,e,t):{hasCompleted:!0,requiresTransition:!1};this.success(r,t),this.ionNavDidChange.emit()}catch(e){this.failed(e,t)}this.isTransitioning=!1,this.nextTrns()}prepareTI(t){const e=this.views.length;if(t.opts=t.opts||{},void 0===t.opts.delegate&&(t.opts.delegate=this.delegate),void 0!==t.removeView){ct(void 0!==t.removeStart,"removeView needs removeStart"),ct(void 0!==t.removeCount,"removeView needs removeCount");const e=this.views.indexOf(t.removeView);if(e<0)throw new Error("removeView was not found");t.removeStart+=e}void 0!==t.removeStart&&(t.removeStart<0&&(t.removeStart=e-1),t.removeCount<0&&(t.removeCount=e-t.removeStart),t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===e),t.insertViews&&((t.insertStart<0||t.insertStart>e)&&(t.insertStart=e),t.enteringRequiresTransition=t.insertStart===e);const o=t.insertViews;if(!o)return;ct(o.length>0,"length can not be zero");const r=o.map(t=>t instanceof Ue?t:"page"in t?Ne(t.page,t.params):Ne(t,void 0)).filter(t=>null!==t);if(0===r.length)throw new Error("invalid views to insert");for(const n of r){n.delegate=t.opts.delegate;const e=n.nav;if(e&&e!==this)throw new Error("inserted view was already inserted");if(3===n.state)throw new Error("inserted view was already destroyed")}t.insertViews=r}getEnteringView(t,e){const o=t.insertViews;if(void 0!==o)return o[o.length-1];const r=t.removeStart;if(void 0!==r){const o=this.views,n=r+t.removeCount;for(let t=o.length-1;t>=0;t--){const s=o[t];if((t<r||t>=n)&&s!==e)return s}}}postViewInit(t,e,o){ct(e||t,"Both leavingView and enteringView are null"),ct(o.resolve,"resolve must be valid"),ct(o.reject,"reject must be valid");const r=o.opts,n=o.insertViews,s=o.removeStart,i=o.removeCount;let a;if(void 0!==s&&void 0!==i){ct(s>=0,"removeStart can not be negative"),ct(i>=0,"removeCount can not be negative"),a=[];for(let o=0;o<i;o++){const r=this.views[o+s];r&&r!==t&&r!==e&&a.push(r)}r.direction=r.direction||"back"}const c=this.views.length+(void 0!==n?n.length:0)-(void 0!==i?i:0);if(ct(c>=0,"final balance can not be negative"),0===c)throw console.warn("You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el),new Error("navigation stack needs at least one root page");if(n){let t=o.insertStart;for(const e of n)this.insertViewAt(e,t),t++;o.enteringRequiresTransition&&(r.direction=r.direction||"forward")}if(a&&a.length>0){for(const t of a)lt(t.element,ft),lt(t.element,mt),lt(t.element,ht);for(const t of a)this.destroyView(t)}}async transition(t,e,o){const r=o.opts,n=r.progressAnimation?t=>this.sbAni=t:void 0,s=a(this),i=t.element,c=e&&e.element,l=Object.assign({mode:s,showGoBack:this.canGoBackSync(t),baseEl:this.el,animationBuilder:this.animation||r.animationBuilder||u.get("navAnimation"),progressCallback:n,animated:this.animated&&u.getBoolean("animated",!0),enteringEl:i,leavingEl:c},r),{hasCompleted:p}=await pt(l);return this.transitionFinish(p,t,e,r)}transitionFinish(t,e,o,r){const n=t?e:o;return n&&this.cleanup(n),{hasCompleted:t,requiresTransition:!0,enteringView:e,leavingView:o,direction:r.direction}}insertViewAt(t,e){const o=this.views,r=o.indexOf(t);r>-1?(ct(t.nav===this,"view is not part of the nav"),o.splice(e,0,o.splice(r,1)[0])):(ct(!t.nav,"nav is used"),t.nav=this,o.splice(e,0,t))}removeView(t){ct(2===t.state||3===t.state,"view state should be loaded or destroyed");const e=this.views,o=e.indexOf(t);ct(o>-1,"view must be part of the stack"),o>=0&&e.splice(o,1)}destroyView(t){t._destroy(),this.removeView(t)}cleanup(t){if(this.destroyed)return;const e=this.views,o=e.indexOf(t);for(let r=e.length-1;r>=0;r--){const t=e[r],n=t.element;r>o?(lt(n,ht),this.destroyView(t)):r<o&&dt(n,!0)}}canStart(){return!!this.swipeGesture&&!this.isTransitioning&&0===this.transInstr.length&&this.animationEnabled&&this.canGoBackSync()}onStart(){this.queueTrns({removeStart:-1,removeCount:1,opts:{direction:"back",progressAnimation:!0}},void 0)}onMove(t){this.sbAni&&this.sbAni.progressStep(t)}onEnd(t,e,o){if(this.sbAni){this.animationEnabled=!1,this.sbAni.onFinish(()=>{this.animationEnabled=!0},{oneTimeCallback:!0});let r=t?-.001:.001;t?r+=it(new at(0,0),new at(.32,.72),new at(0,1),new at(1,1),e):(this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)"),r+=it(new at(0,0),new at(1,0),new at(.68,.28),new at(1,1),e)),this.sbAni.progressEnd(t?1:0,r,o)}}render(){return n("slot",null)}get el(){return i(this)}static get watchers(){return{swipeGesture:["swipeGestureChanged"],root:["rootChanged"]}}};Le.style=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;overflow:hidden;z-index:0}";const Ge=class{constructor(o){t(this,o),this.url="",this.ionRouteDataChanged=e(this,"ionRouteDataChanged",7)}onUpdate(t){this.ionRouteDataChanged.emit(t)}onComponentProps(t,e){if(t===e)return;const o=t?Object.keys(t):[],r=e?Object.keys(e):[];if(o.length===r.length){for(const n of o)if(t[n]!==e[n])return void this.onUpdate(t)}else this.onUpdate(t)}connectedCallback(){this.ionRouteDataChanged.emit()}static get watchers(){return{url:["onUpdate"],component:["onUpdate"],componentProps:["onComponentProps"]}}},Ae=class{constructor(o){t(this,o),this.ionRouteRedirectChanged=e(this,"ionRouteRedirectChanged",7)}propDidChange(){this.ionRouteRedirectChanged.emit()}connectedCallback(){this.ionRouteRedirectChanged.emit()}static get watchers(){return{from:["propDidChange"],to:["propDidChange"]}}},De=t=>"/"+t.filter(t=>t.length>0).join("/"),xe=t=>{if(null==t)return[""];const e=t.split("/").map(t=>t.trim()).filter(t=>t.length>0);return 0===e.length?[""]:e},Me=async(t,e,o,r,n=!1)=>{try{const s=Be(t);if(r>=e.length||!s)return n;await s.componentOnReady();const i=e[r],a=await s.setRouteId(i.id,i.params,o);return a.changed&&(o="root",n=!0),n=await Me(a.element,e,o,r+1,n),a.markVisible&&await a.markVisible(),n}catch(s){return console.error(s),!1}},Ve=":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet",Be=t=>{if(!t)return;if(t.matches(Ve))return t;return t.querySelector(Ve)||void 0},qe=(t,e)=>e.find(e=>((t,e)=>{const{from:o,to:r}=e;if(void 0===r)return!1;if(o.length>t.length)return!1;for(let n=0;n<o.length;n++){const e=o[n];if("*"===e)return!0;if(e!==t[n])return!1}return o.length===t.length})(t,e)),We=(t,e)=>{const o=Math.min(t.length,e.length);let r=0;for(;r<o&&t[r].toLowerCase()===e[r].id;r++);return r},Fe=(t,e)=>{const o=new ze(t);let r,n=!1;for(let s=0;s<e.length;s++){const t=e[s].path;if(""===t[0])n=!0;else{for(const e of t){const t=o.next();if(":"===e[0]){if(""===t)return null;r=r||[],(r[s]||(r[s]={}))[e.slice(1)]=t}else if(t!==e)return null}n=!1}}return n&&n!==(""===o.next())?null:r?e.map((t,e)=>({id:t.id,path:t.path,params:He(t.params,r[e])})):e},He=(t,e)=>!t&&e?e:t&&!e?t:t&&e?Object.assign(Object.assign({},t),e):void 0,Ye=t=>{let e=1,o=1;for(const r of t)for(const t of r.path)":"===t[0]?e+=Math.pow(1,o):""!==t&&(e+=Math.pow(2,o)),o++;return e};class ze{constructor(t){this.path=t.slice()}next(){return this.path.length>0?this.path.shift():""}}const Qe=t=>Array.from(t.children).filter(t=>"ION-ROUTE-REDIRECT"===t.tagName).map(t=>{const e=Je(t,"to");return{from:xe(Je(t,"from")),to:null==e?void 0:xe(e)}}),$e=t=>Xe(Ke(t)),Ke=(t,e=t)=>Array.from(e.children).filter(t=>"ION-ROUTE"===t.tagName&&t.component).map(e=>{const o=Je(e,"component");if(null==o)throw new Error("component missing in ion-route");return{path:xe(Je(e,"url")),id:o.toLowerCase(),params:e.componentProps,children:Ke(t,e)}}),Je=(t,e)=>e in t?t[e]:t.hasAttribute(e)?t.getAttribute(e):null,Xe=t=>{const e=[];for(const o of t)Ze([],e,o);return e},Ze=(t,e,o)=>{const r=t.slice();if(r.push({id:o.id,path:o.path,params:o.params}),0!==o.children.length)for(const n of o.children)Ze(r,e,n);else e.push(r)},to=class{constructor(o){t(this,o),this.previousPath=null,this.busy=!1,this.state=0,this.lastState=0,this.root="/",this.useHash=!0,this.ionRouteWillChange=e(this,"ionRouteWillChange",7),this.ionRouteDidChange=e(this,"ionRouteDidChange",7)}async componentWillLoad(){console.debug("[ion-router] router will load"),await(Be(document.body)?Promise.resolve():new Promise(t=>{window.addEventListener("ionNavWillLoad",t,{once:!0})})),console.debug("[ion-router] found nav"),await this.onRoutesChanged()}componentDidLoad(){window.addEventListener("ionRouteRedirectChanged",ut(this.onRedirectChanged.bind(this),10)),window.addEventListener("ionRouteDataChanged",ut(this.onRoutesChanged.bind(this),100))}onPopState(){const t=this.historyDirection(),e=this.getPath();return console.debug("[ion-router] URL changed -> update nav",e,t),this.writeNavStateRoot(e,t)}onBackButton(t){t.detail.register(0,()=>this.back())}push(t,e="forward"){t.startsWith(".")&&(t=new URL(t,window.location.href).pathname),console.debug("[ion-router] URL pushed -> updating nav",t,e);const o=xe(t);return this.setPath(o,e),this.writeNavStateRoot(o,e)}back(){return window.history.back(),Promise.resolve(this.waitPromise)}async printDebug(){console.debug("CURRENT PATH",this.getPath()),console.debug("PREVIOUS PATH",this.previousPath),(t=>{console.group(`[ion-core] ROUTES[${t.length}]`);for(const e of t){const t=[];e.forEach(e=>t.push(...e.path));const o=e.map(t=>t.id);console.debug("%c "+De(t),"font-weight: bold; padding-left: 20px","=>\t",`(${o.join(", ")})`)}console.groupEnd()})($e(this.el)),(t=>{console.group(`[ion-core] REDIRECTS[${t.length}]`);for(const e of t)e.to&&console.debug("FROM: ","$c "+De(e.from),"font-weight: bold"," TO: ","$c "+De(e.to),"font-weight: bold");console.groupEnd()})(Qe(this.el))}async navChanged(t){if(this.busy)return console.warn("[ion-router] router is busy, navChanged was cancelled"),!1;const{ids:e,outlet:o}=await(async()=>{const t=[];let e,o=window.document.body;for(;e=Be(o),e;){const r=await e.getRouteId();if(!r)break;o=r.element,r.element=void 0,t.push(r)}return{ids:t,outlet:e}})(),r=((t,e)=>{let o=null,r=0;const n=t.map(t=>t.id);for(const s of e){const t=We(n,s);t>r&&(o=s,r=t)}return o?o.map((e,o)=>({id:e.id,path:e.path,params:He(e.params,t[o]&&t[o].params)})):null})(e,$e(this.el));if(!r)return console.warn("[ion-router] no matching URL for ",e.map(t=>t.id)),!1;const n=(t=>{const e=[];for(const o of t)for(const t of o.path)if(":"===t[0]){const r=o.params&&o.params[t.slice(1)];if(!r)return null;e.push(r)}else""!==t&&e.push(t);return e})(r);return n?(console.debug("[ion-router] nav changed -> update URL",e,n),this.setPath(n,t),await this.safeWriteNavState(o,r,"root",n,null,e.length),!0):(console.warn("[ion-router] router could not match path because some required param is missing"),!1)}onRedirectChanged(){const t=this.getPath();t&&qe(t,Qe(this.el))&&this.writeNavStateRoot(t,"root")}onRoutesChanged(){return this.writeNavStateRoot(this.getPath(),"root")}historyDirection(){const t=window;null===t.history.state&&(this.state++,t.history.replaceState(this.state,t.document.title,t.document.location&&t.document.location.href));const e=t.history.state,o=this.lastState;return this.lastState=e,e>o?"forward":e<o?"back":"root"}async writeNavStateRoot(t,e){if(!t)return console.error("[ion-router] URL is not part of the routing set"),!1;const o=Qe(this.el),r=qe(t,o);let n=null;r&&(this.setPath(r.to,e),n=r.from,t=r.to);const s=((t,e)=>{let o=null,r=0;for(const n of e){const e=Fe(t,n);if(null!==e){const t=Ye(e);t>r&&(r=t,o=e)}}return o})(t,$e(this.el));return s?this.safeWriteNavState(document.body,s,e,t,n):(console.error("[ion-router] the path does not match any route"),!1)}async safeWriteNavState(t,e,o,r,n,s=0){const i=await this.lock();let a=!1;try{a=await this.writeNavState(t,e,o,r,n,s)}catch(c){console.error(c)}return i(),a}async lock(){const t=this.waitPromise;let e;return this.waitPromise=new Promise(t=>e=t),void 0!==t&&await t,e}async writeNavState(t,e,o,r,n,s=0){if(this.busy)return console.warn("[ion-router] router is busy, transition was cancelled"),!1;this.busy=!0;const i=this.routeChangeEvent(r,n);i&&this.ionRouteWillChange.emit(i);const a=await Me(t,e,o,s);return this.busy=!1,a&&console.debug("[ion-router] route changed",r),i&&this.ionRouteDidChange.emit(i),a}setPath(t,e){this.state++,((t,e,o,r,n,s)=>{let i=De([...xe(this.root),...r]);o&&(i="#"+i),"forward"===n?t.pushState(s,"",i):t.replaceState(s,"",i)})(window.history,0,this.useHash,t,e,this.state)}getPath(){return((t,e)=>{let o=t.pathname;if(this.useHash){const e=t.hash;o="#"===e[0]?e.slice(1):""}return((t,e)=>{if(t.length>e.length)return null;if(t.length<=1&&""===t[0])return e;for(let o=0;o<t.length;o++)if(t[o].length>0&&t[o]!==e[o])return null;return e.length===t.length?[""]:e.slice(t.length)})(xe(e),xe(o))})(window.location,this.root)}routeChangeEvent(t,e){const o=this.previousPath,r=De(t);return this.previousPath=r,r===o?null:{from:o,redirectedFrom:e?De(e):null,to:r}}get el(){return i(this)}},eo=class{constructor(e){t(this,e)}create(t){return wt("ion-toast",t)}dismiss(t,e,o){return vt(document,t,e,"ion-toast",o)}async getTop(){return gt(document,"ion-toast")}};export{Te as app_root,Pe as app_router,Ce as ion_app,Le as ion_nav,Ge as ion_route,Ae as ion_route_redirect,to as ion_router,eo as ion_toast_controller}