1(window.webpackJsonp=window.webpackJsonp||[]).push([["components-lib"],{100:function(t,e,i){"use strict";var r=i(31);i.n(r).a},101:function(t,e,i){(t.exports=i(14)(!1)).push([t.i,"\n@media (min-width: 960px) {\n.custom-distance {\n max-width: calc(50% - 12px) !important;\n}\n}\n",""])},102:function(t,e,i){"use strict";var r=i(32);i.n(r).a},103:function(t,e,i){(t.exports=i(14)(!1)).push([t.i,"\n@media (min-width: 960px) {\n.custom-distance {\n max-width: calc(50% - 12px) !important;\n}\n}\n",""])},104:function(t,e,i){"use strict";var r=i(33);i.n(r).a},105:function(t,e,i){(t.exports=i(14)(!1)).push([t.i,"\n.cropper-modal {\n opacity: 0.4;\n}\n.rt-cropper-circle .cropper-view-box,\n.rt-cropper-circle .cropper-face {\n border-radius: 50%;\n}\n",""])},202:function(t,e,i){"use strict";i.r(e);var r=i(8),n=i.n(r),a=i(0),s={mdiTextBox:a.md,mdiCalendarText:a.u,mdiMagnify:a.ic,mdiHelp:a.Yb,mdiAccount:a.a,mdiShieldAlertOutline:a.Sc,mdiLogout:a.hc,mdiRefresh:a.Hc,mdiClose:a.M,mdiAlert:a.e,mdiHelpCircle:a.Zb,mdiDownload:a.db,mdiShareVariant:a.Rc,mdiHeadset:a.Xb,mdiWhatsapp:a.zd,mdiEmail:a.hb,mdiPhone:a.zc,data:()=>({loading:{online:!1,requireProfile:!1,announcement:{},logout:!1,user:!1,guide:!1},requireProfileReady:!0,requireProfileMessage:"",requireProfileNote:"",requireProfileDialogActive:!1,requireProfileProps:{},requireProfileRules:{},requireProfileParams:{},fastAuthDialogActive:!1,fastAuthType:"register",fastAuthUsername:"",organizationOverlay:!1,onlineUsersTimeout:void 0,onlineUsersActive:!1,onlineUsersCount:0,annDialogActive:!1,activeAnnId:void 0,guideDialogActive:!1,activeGuideId:void 0,guideScores:{},pushNotifReq:!1}),computed:{segments(){return this.$route.path.split("/").filter(t=>t.length)},isAuth(){return this.$store.getters["client/isAuth"]},user(){return this.$store.state.client.user},roleIds(){return this.$store.getters["client/roleIds"]},userSupportData(){},model(){return(this.user.models||{})[this.segments[0]]},modelColor(){return this.model?this.$helpers.modelColor(this.model):this.$root.primary.base},guides(){if(!this.$store.state.guide)return[];const t=this.$store.state.guide.items.filter(t=>t.origins.includes("cachedData1")).map(t=>t.data);return t.sort((t,e)=>t.$.updated_at>e.$.updated_at?-1:1),t},activeGuide(){return this.guides.find(t=>t.$.id===this.activeGuideId)||{$:{}}},activeAnn(){const t=((this.$store.state.announcement||{}).items||[]).find(t=>t.id===this.activeAnnId);return t?t.data:{$:{}}},announcements(){if(!this.isAuth||!this.$store.state.announcement||!this.$root.routerIsReady||this.$route.meta.isPublic)return[];const t=[];for(const e of this.$store.state.announcement.items){const i=e.data.$;!i.matches_auth_user||"hidden"===i.position||i.is_closed&&"persistent"!==i.position||(i.route_path||[]).length&&!i.route_path.includes(this.$route.path)||t.push(i)}return t.sort((t,e)=>t.created_at>e.created_at?-1:1),t},archivedAnnouncements(){if(!this.isAuth||!this.$store.state.announcement||!this.$root.routerIsReady||this.$route.meta.isPublic)return[];const t=[];for(const e of this.$store.state.announcement.items){const i=e.data.$;i.matches_auth_user&&"hidden"!==i.position&&"persistent"!==i.position&&i.is_closed&&t.push(i)}return t.sort((t,e)=>t.created_at>e.created_at?-1:1),t},breadcrumbItems(){return this.model?this.segments.length>1?[this.model.specs.plural,((this.$store.state[this.segments[0]]||{items:[]}).items.find(t=>t.data.id===this.segments[1])||{data:{}}).data.id_title||this.$trans(this.segments[1]),...this.segments.slice(2).map(t=>this.$trans(t))]:[this.model.specs.plural,...this.segments.slice(1).map(t=>this.$trans(t))]:[this.$trans(this.segments[0]||"homepage"),...this.segments.slice(1).map(t=>this.$trans(t))]},breadcrumbText(){return this.breadcrumbItems.join(" | ")||""},persistentAlerts(){const t=[];if(this.isAuth){const{phone:e,email:i}=this.user.verifs||{};if(this.user.phone&&(!e||!e.verified)||this.user.email&&(!i||!i.verified))return t}return t},onlineUserIds(){return this.$root.onlineUserIds.filter(t=>t!==this.user.$.id)},onlineUsers(){return this.$store.state.user.items.filter(t=>t.origins.includes("onlineUsers")).map(t=>t.data)}},watch:{"$route.path"(){this.setDocTitle()},"$root.changePasswordActive"(t){t&&setTimeout(()=>{if(this.$root.changePasswordActive)try{const t=this.$refs.changePassForm.$refs.input.$refs.currentType;(t.$refs.input||t.$el).focus()}catch(t){console.warn(t)}},400)}},methods:{checkPushNotifReq(){this.pushNotifReq="Notification"in window&&"serviceWorker"
1in navigator&&"granted"!==Notification.permission&&"denied"!==Notification.permission},sendGuideScore(t,e){},getGuides(){},switchFastAuth(t){this.fastAuthType=t},switchDoFastAuth({type:t,handler:e}){this.switchFastAuth(t),this.$helpers.qTick(()=>e(this.$refs.fastAuthForm))},navSegment(t){if(!t&&"overview"!==this.segments[0])return this.$router.push("/overview");this.$router.push(`/${this.segments.slice(0,t).join("/")}`)},removeOrganizationOverlay(){this.$nextTick(()=>setTimeout(()=>this.organizationOverlay=!1,2e3))},getUser(){this.loading.user=!0,this.$store.dispatch("resources/get",{collection:[{model:"user",filters:[{field:"id",value:this.user.id}]}],origin:"client",replace:!0}).catch(console.warn).finally(()=>this.loading.user=!1)},setDocTitle(){this.$nextTick(()=>{this.$route.meta.isPublic||(window.document.title=`${this.breadcrumbText} | ${this.$config.title}`)})},logout(){this.loading.logout||(this.loading.logout=!0,this.$store.dispatch("client/logout").finally(()=>this.loading.logout=!1))},closeAnnouncement(t){this.loading.announcement[t]||(this.$set(this.loading.announcement,t,!0),this.$store.dispatch("resources/patch",{collection:[{model:"announcement",id:t,fill:{close:1}}]}).catch(console.warn).finally(()=>this.$set(this.loading.announcement,t,!1)))},showOrgOverlay(){this.isAuth&&this.user.$.organization_id&&(this.organizationOverlay=!0)},async activateInstallNotif(){await this.$helpers.installPromise},getOnlineUsers(t=!1){!this.loading.online&&this.onlineUserIds.length&&(t||(this.loading.online=!0),this.$store.dispatch("resources/get",{collection:[{model:"user",filters:[{field:"id",operator:"In",value:this.onlineUserIds}],pagination:{rows:50}}],replace:!0,origin:"onlineUsers",$ref:{noInteraction:t}}).then(()=>{this.$axios.get("online-users-count").then(t=>this.onlineUsersCount=t.data.public||0).catch(console.warn)}).catch(console.warn).finally(()=>this.loading.online=!1))},async sendRequireProfile(){const t=await this.$refs.requireProfileForm.validate();if(t)return this.$root.addNotif(t);this.loading.requireProfile=!0,await this.$store.dispatch("resources/patch",{collection:[{model:"user",id:this.user.id,fill:this.requireProfileParams}]}).then(t=>{200===t.data[0].code&&(this.requireProfileParams={},this.requireProfileDialogActive&&this.$popstate("requireProfileDialogActive",!1))}).catch(console.warn).finally(()=>this.loading.requireProfile=!1)},fastAuthSuccess(){this.$helpers.queue(()=>this.$popstate("fastAuthDialogActive",!1))},requireProfile(t){const{message:e,note:i,fields:r,some:n=!1,username:a}=t||{};if(!this.requireProfileReady)return Promise.resolve(!1);this.requireProfileReady=!1,this.requireProfileMessage=e[0].toUpperCase()+e.slice(1),this.requireProfileNote=i||"";const s=n?"some":"every",o=this.$store.state.client.user,l=new Promise(e=>{if(!this.isAuth){if(!this.$root.registerRoles.length)return e(!1);this.switchFastAuth("register"),a&&(this.fastAuthUsername=a,this.$helpers.qTick(()=>{this.$refs.fastAuthForm&&"function"==typeof this.$refs.fastAuthForm.register&&this.$refs.fastAuthForm.register()})),this.$popstate("fastAuthDialogActive",!0);const i=this.$watch("fastAuthDialogActive",r=>{if(!r){if(i(),!this.isAuth)return e(!1);this.requireProfileReady=!0,this.requireProfile(t).then(e)}});return}if(r[s](t=>o[t]))return e(!0);const{properties:i,rules:l}=o.models.user||{},{ps:c,rs:u}=r.reduce((t,e)=>(e in i&&(t.ps[e]=i[e],t.rs[e]=l[e],/\brequired\b/i.test(t.rs[e])||(r.length>1&&n?t.rs[e]=`required_without:${r.filter(t=>t!==e).join(",")}|${t.rs[e]}`:t.rs[e]=`required|${t.rs[e]}`)),t),{ps:{},rs:{}});if(this.requireProfileProps=c,this.requireProfileRules=u,this.$helpers.length(this.requireProfileProps)!==r.length)return e(!1);this.$popstate("requireProfileDialogActive",!0);const d=this.$watch("requireProfileDialogActive",t=>{t||(d(),this.$helpers.queue(()=>e(r[s](t=>this.$store.state.client.user[t]))))})});return l.finally(()=>this.requireProfileReady=!0),l},oneTimeIfAuth(){this.$nextTick(this.showOrgOverlay),setTimeout(this.activateInstallNotif,1e3)}},created(){this.$root.requireProfile=this.requireProfile},mounted(){this.checkPushNotifReq(),this.oneTimeIfAuth(),this.$bus.$on("authenticated",this.oneTimeIfAuth)},beforeDestroy(){this.$bus.$off("authenticated",this.oneTimeIfAuth),this.$root.requireProfile=()=>!1}},o=i(2),l=Object(o.a)(s,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.isAuth&&!t.$helpers.inIframe?i("div",{staticClass:"r-app-actionbar"},[t.$root.routerIsReady&&!t.$route.meta.isPublic?[t.persistentAlerts.length?i("div",{staticClass:"d-flex flex-wrap justify-center warning lighten-3 black--text py-1 px-2 px-md-0"},[i("div",t._l(t.persistentAlerts,function(e,r){return i("div",{key:r},[i("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[i("div",{staticClass:"pa-1 lh-2 font-1"},[t._v("\n "+t._s(e.message)+"\n ")]),t._v(" "),e.action?i("v-btn",{staticClass:"h-auto ww-auto py-1 px-3",attrs:{depressed:"",small:"",round:"",color:"accent"},on:{click:e.action.callback}},[i("div",{staticClass:"caption"},[t._v("\n "+t._s(e.action.label)+"\n ")])]):t._e()],1)],1)}),0)]):t._e(),t._v(" "),i("v-toolbar",{staticClass:"shadow-1 z-2",attrs:{color:"white"}},[i("v-toolbar-title",{staticStyle:{overflow:"auto","text-overflow":"unset"}},t._l(t.breadcrumbItems,function(e,r){return i("v-chip",{key:e+"-"+r,style:"max-width: 300px; color: "+t.modelColor+"; border: 1px dashed "+t.modelColor+" !important;",attrs:{color:"white",close:""},on:{input:function(e){return t.navSegment(r)}}},[i("span",{staticClass:"ellipsis overflow-hidden w-100",attrs:{dir:"auto",title:e}},[t._v(t._s(e))])])}),1),t._v(" "),i("div",{staticClass:"grow"}),t._v(" "),(t.$store.getters["client/can"].user||{}).index?i("v-menu",{attrs:{"offset-y":"",bottom:"",right:"",origin:"top left","max-width":320,lazy:""},scopedSlots:t._u([{key:"activator",fn:function(e){var r=e.on;return[i("v-btn",t._g({directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("online users"),expression:"$trans('online users')"}],staticClass:"m-end-0",attrs:{icon:"",flat:"",color:t.onlineUserIds.length?"success lighten-1":"secondary"},on:{click:function(e){return t.getOnlineUsers()}}},r),[i("icon",[t._v(t._s(t.$options.mdiAccount))]),t._v(" "),i("small",[t._v("\n "+t._s(t.onlineUserIds.length)+"\n ")])],1)]}}],null,!1,1218977990),model:{value:t.onlineUsersActive,callback:function(e){t.onlineUsersActive=e},expression:"onlineUsersActive"}},[t._v(" "),i("v-card",{staticStyle:{"min-width":"280px","max-height":"400px",overflow:"auto"}},[i("v-fade-transition",{attrs:{"hide-on-leave":""}},[t.loading.online?i("v-card-text",{key:"loading-card-text"},[i("v-progress-linear",{attrs:{color:"success lighten-1",height:"4",indeterminate:!0}})],1):t.onlineUserIds.length?i("v-list",{attrs:{dense:"","two-line":""}},[i("v-list-tile",{attrs:{avatar:""}},[i("span",{staticClass:"font-1"},[t._v("\n "+t._s(t.$trans("logged in"))+":\n "+t._s(t.onlineUserIds.length)+"\n ")]),t._v(" "),i("v-spacer"),t._v(" "),i("span",{staticClass:"font-1"},[t._v("\n "+t._s(t.$trans("all"))+":\n "+t._s(t.onlineUsersCount)+"\n ")])],1),t._v(" "),i("RecycleScroller",{staticStyle:{"max-height":"320px"},attrs:{items:t.onlineUsers,"item-size":60},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.item;return[i("v-list-tile",{attrs:{avatar:"",to:"/user/"+r.id}},[i("v-list-tile-avatar",{attrs:{color:"primary"}},[r.avatar?i("img",{staticStyle:{"object-fit":"cover"},attrs:{src:r.avatar}}):r.id_title?i("span",{staticClass:"white--text"},[t._v("\n "+t._s(r.i
1d_title[0])+"\n ")]):t._e()]),t._v(" "),i("v-list-tile-content",[i("v-list-tile-title",{staticClass:"body-2"},[t._v("\n "+t._s(r.id_title)+"\n  "),i("span",{staticClass:"success--text text--lighten-1"},[t._v("â")])]),t._v(" "),i("v-list-tile-sub-title",{staticClass:"caption"},[t._v("\n "+t._s(r.roles)+"\n ")])],1)],1)]}}],null,!1,823157875)})],1):i("v-card-text",{key:"no-user-card-text"},[i("div",{staticClass:"body-1 secondary--text text--darken-1"},[t._v("\n "+t._s(t.$trans("no user is online at the moment"))+"\n ")])])],1)],1)],1):t._e()],1),t._v(" "),i("user-verifications")]:t._e(),t._v(" "),!t.$root.routerIsReady||t.$route.meta.isPublic||t.user.roles?t._e():i("v-dialog",{attrs:{value:!0,"max-width":"360",persistent:"",transition:"slide-y-reverse-transition","hide-overlay":""}},[i("v-card",[i("v-card-text",[i("div",{staticClass:"body-1 lh-2 secondary--text text-xs-center"},[i("icon",{attrs:{size:"64",color:"error lighten-1"}},[t._v(t._s(t.$options.mdiShieldAlertOutline))]),t._v("\n "+t._s(t.$trans("no role for your account has been defined"))+"\n ")],1),t._v(" "),i("v-layout",{staticClass:"pt-4",attrs:{row:"","justify-center":""}},[i("v-btn",{staticClass:"error lighten-5",attrs:{outline:"",color:"error lighten-1",disabled:t.loading.logout,round:""},on:{click:t.logout}},[i("icon",[t._v(t._s(t.$options.mdiLogout))]),t._v("\n  \n "+t._s(t.$trans("logout"))+"\n ")],1),t._v(" "),i("span",{staticClass:"pa-1"}),t._v(" "),i("v-btn",{attrs:{depressed:"",color:"primary",round:"",disabled:t.loading.user},on:{click:t.getUser}},[i("icon",[t._v(t._s(t.$options.mdiRefresh))]),t._v("\n  \n "+t._s(t.$trans("check again"))+"\n ")],1)],1)],1)],1)],1),t._v(" "),i("v-dialog",{attrs:{value:!!t.user.password_expiry_at,"max-width":"640",persistent:"",lazy:"",transition:"slide-y-reverse-transition"}},[i("update-password-form",{attrs:{user:t.user,title:t.$trans("dear user please update your password and login again")}})],1),t._v(" "),i("v-dialog",{attrs:{value:t.$root.changePasswordActive,"max-width":"480",lazy:"",transition:"slide-y-reverse-transition"},on:{input:function(e){return t.$root.$popstate("changePasswordActive",e)}}},[i("update-password-form",{ref:"changePassForm",attrs:{user:t.user,cancelable:""},on:{update:function(e){return t.$root.$popstate("changePasswordActive",!1)},cancel:function(e){return t.$root.$popstate("changePasswordActive",!1)}}})],1),t._v(" "),i("v-slide-y-reverse-transition",[t.user.organ_data&&t.user.organ_data.logo&&t.organizationOverlay?i("v-layout",{staticClass:"white text-xs-center",staticStyle:{position:"fixed",top:"0",bottom:"0",left:"0",right:"0","z-index":"2000"},attrs:{row:"","justify-center":"","align-center":""}},[i("div",[t.user.organ_data.logo?i("v-img",{attrs:{transition:!1,contain:"",width:"250",src:t.$helpers.cdn(t.user.organ_data.logo)},on:{load:t.removeOrganizationOverlay,error:t.removeOrganizationOverlay}}):t._e(),t._v(" "),i("div",{staticClass:"title secondary--text pa-3"},[t._v("\n "+t._s(t.$trans("organizational panel"))+"\n "+t._s(t.user.organ_data.name)+"\n ")]),t._v(" "),i("v-progress-linear",{staticClass:"ma-0",attrs:{indeterminate:"",height:"3",color:"primary"}})],1)]):t._e()],1)],2):t._e(),t._v(" "),t.user.models.user?i("v-dialog",{attrs:{value:t.requireProfileDialogActive,"max-width":"520",transition:"slide-y-reverse-transition",lazy:""},on:{input:function(e){return t.$popstate("requireProfileDialogActive",e)}}},[i("v-card",[i("v-card-title",{staticClass:"secondary lighten-4 black--text"},[i("div",{staticClass:"body-2"},[t._v("\n "+t._s(t.$trans(t.requireProfileMessage))+"\n ")])]),t._v(" "),i("v-card-text",{staticClass:"pb-0"},[i("model-form",{ref:"requireProfileForm",attrs:{properties:t.requireProfileProps,rules:t.requireProfileRules,"params-model":"user","params-id":t.user.id,resource:t.user},model:{value:t.requireProfileParams,callback:function(e){t.requireProfileParams=e},expression:"requireProfileParams"}}),t._v(" "),t.requireProfileNote?i("div",{staticClass:"font-1 lh-2 black--text px-3 pb-3 pre-line break-word"},[t._v(t._s(t.requireProfileNote))]):t._e()],1),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{outline:"",color:"secondary"},on:{click:function(e){return t.$popstate("requireProfileDialogActive",!1)}}},[t._v("\n "+t._s(t.$trans("cancel"))+" \n ")]),t._v(" "),i("v-btn",{attrs:{disabled:t.loading.requireProfile,color:"primary",depressed:""},on:{click:t.sendRequireProfile}},[t._v("\n "+t._s(t.$trans("confirm and continue"))+" \n "),i("icon",{attrs:{size:"20"},domProps:{textContent:t._s(t.$root.arrowForward)}}
1)],1)],1)],1)],1):t._e(),t._v(" "),i("v-dialog",{attrs:{value:t.fastAuthDialogActive,"max-width":"450",transition:"slide-y-reverse-transition",lazy:""},on:{input:function(e){return t.$popstate("fastAuthDialogActive",e)}}},[i("v-card",[i("v-card-text",[i("v-slide-y-reverse-transition",{attrs:{"hide-on-leave":""}},["login"===t.fastAuthType?i("login-form",{ref:"fastAuthForm",on:{success:t.fastAuthSuccess,switch:t.switchFastAuth},scopedSlots:t._u([{key:"card-title",fn:function(){return[i("v-layout",{attrs:{row:"","align-end":"","pb-3":""}},[i("div",{staticClass:"body-2"},[t._v("\n Please login to your account\n ")]),t._v(" "),i("v-spacer"),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{icon:"",flat:"",color:"secondary"},on:{click:function(e){return t.$popstate("fastAuthDialogActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1)]},proxy:!0}],null,!1,3699283056),model:{value:t.fastAuthUsername,callback:function(e){t.fastAuthUsername=e},expression:"fastAuthUsername"}}):"register"===t.fastAuthType?i("register-form",{ref:"fastAuthForm",attrs:{passwordless:"","force-role":t.$config.service.general.default_register_role},on:{success:t.fastAuthSuccess,switch:t.switchFastAuth,switchDo:t.switchDoFastAuth},scopedSlots:t._u([{key:"card-title",fn:function(){return[i("v-layout",{attrs:{row:"","align-end":"","pb-3":""}},[i("div",{staticClass:"body-2"},[t._v("\n "+t._s(t.$trans("please enter your email address to continue"))+"\n ")]),t._v(" "),i("v-spacer"),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{icon:"",flat:"",color:"secondary"},on:{click:function(e){return t.$popstate("fastAuthDialogActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1)]},proxy:!0}]),model:{value:t.fastAuthUsername,callback:function(e){t.fastAuthUsername=e},expression:"fastAuthUsername"}}):t._e()],1)],1)],1)],1),t._v(" "),i("v-dialog",{attrs:{value:t.$root.confirmRequestActive,persistent:"","max-width":"600",scrollable:"",transition:"slide-y-reverse-transition",lazy:""}},[i("v-card",[i("v-card-title",{staticClass:"body-2 f-bold secondary lighten-4",staticStyle:{"border-bottom":"1px solid rgba(0,0,0,0.15)"}},[i("icon",{attrs:{color:"warning darken-1"}},[t._v(t._s(t.$options.mdiAlert))]),t._v("Â \n "+t._s(t.$trans("Confirmation required:"))+"\n ")],1),t._v(" "),i("v-card-text",{staticClass:"pt-0"},t._l(t.$root.confirmRequestWarnings,function(e,r){return i("div",{key:r},[i("v-checkbox",{staticClass:"my-3",attrs:{color:"primary","hide-details":""},scopedSlots:t._u([{key:"label",fn:function(){return[i("div",{staticClass:"lh-2 black--text body-1"},[t._v("\n "+t._s(e.message)+"\n ")])]},proxy:!0}],null,!0),model:{value:e.checked,callback:function(i){t.$set(e,"checked",i)},expression:"warning.checked"}})],1)}),0),t._v(" "),i("v-card-actions",{staticStyle:{"border-top":"1px solid rgba(0,0,0,0.15)"}},[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{outline:"",color:"secondary darken-1"},on:{click:function(e){return t.$bus.$emit("confirm-request",!1)}}},[t._v("\n "+t._s(t.$trans("cancel"))+"\n ")]),t._v(" "),i("v-btn",{attrs:{depressed:"",color:"primary",disabled:t.$root.confirmRequestWarnings.some(function(t){return!t.checked})},on:{click:function(e){return t.$bus.$emit("confirm-request",!0)}}},[t._v("\n "+t._s(t.$trans("confirm and continue"))+"\n ")])],1)],1)],1),t._v(" "),i("v-dialog",{attrs:{value:t.$root.askDialogActive,"max-width":"380",transition:"slide-y-reverse-transition"},on:{input:function(e){return t.$root.$popstate("askDialogActive",e)}}},[i("v-card",[i("v-card-title",{staticClass:"lh-2 body-2",staticStyle:{"flex-wrap":"nowrap"}},[i("div",[i("icon",{attrs:{size:"30",color:"secondary"}},[t._v(t._s(t.$options.mdiHelpCircle))])],1),t._v(" "),i("div",{staticClass:"px-1"},[t._v(t._s(t.$root.askDialogMessage))])]),t._v(" "),t.$root.askDialogActions.length>0?i("div",{staticClass:"pb-3 px-3",staticStyle:{display:"flex",gap:"1rem","flex-wrap":"wrap"}},t._l(t.$root.askDialogActions,function(e){return i("v-btn",{key:e.key,class:e.class||"ww-auto px-3 ma-0",attrs:{outline:!!e.outline,depressed:!!e.depressed,small:!!e.small,flat:!!e.flat,color:e.color||"primary"},on:{click:function(i){return t.$bus.$emit("ask-confirmed",e.key)}}},[t._v("\n "+t._s(e.label||e.key)+"\n ")])}),1):i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{staticClass:"ww-auto px-4 secondary lighten-4",attrs:{outline:"",color:"secondary darken-1"},on:{click:function(e){return t.$root.$popstate("askDialogActive",!1)}}},[t._v("\n "+t._s(t.$trans("cancel"))+"\n ")]),t._v(" "),i("v-btn",{staticClass:"ww-auto px-4",attrs:{depressed:"",color:"primary"},on:{click:function(e){return t.$bus.$emit("ask-confirmed")}}},[t._v("\n "+t._s(t.$trans("confirm"))+"\n ")])],1)],1)],1),t._v(" "),i("v-dialog",{attrs:{value:t.$root.fullscreenImageActive,fullscreen:"",transition:"slide-y-reverse-transition","content-class":"ma-0 radius-0 mx-h-none"},on:{input:function(e){return t.$root.$popstate("fullscreenImageActive",e)}}},[i("v-card",{staticClass:"d-flex align-center"},[i("div",{staticClass:"w-100"},[i("v-img",{attrs:{src:t.$root.fullscreenImageSrc,"max-height":t.$vuetify.breakpoint.height-100+"px","min-height":"10px",contain:""},on:{click:function(e){return t.$root.$popstate("fullscreenImageActive",!1)}}}),t._v(" "),i("div",{staticClass:"d-flex justify-center"},[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("download"),expression:"$trans('download')"}],attrs:{icon:"",color:"primary",disabled:t.$root.loading.download},on:{click:function(e){t.$root.$popstate("fullscreenImageActive",!1),t.$root.download(t.$root.fullscreenImageSrc)}}},[i("icon",[t._v(t._s(t.$options.mdiDownload))])],1),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("share"),expression:"$trans('share')"}],attrs:{icon:"",color:"primary",target:"_blank",href:"mailto:?subject="+t.$root.fullscreenImageSrc+"&body="+t.$root.fullscreenImageSrc},on:{click:function(e){return t.$root.$popstate("fullscreenImageActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiShareVariant))])],1),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],attrs:{icon:"",color:"secondary"},on:{click:function(e){return t.$root.$popstate("fullscreenImageActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1)],1)])],1),t._v(" "),i("v-dialog",{attrs:{value:t.guideDialogActive,"max-width":"960",lazy:"",scrollable:"",fullscreen:t.$root.smAndDown,transition:"slide-y-reverse-transition"},on:{input:function(e){return t.$popstate("guideDialogActive",e)}}},[i("v-card",{key:t.activeGuide.id||"0"},[i("v-card-title",{staticClass:"flex-nowrap secondary lighten-4 py-2"},[i("div",{staticClass:"subheading font-w-500"},[t._v("\n "+t._s(t.activeGuide.title)+"\n ")]),t._v(" "),i("div",{staticClass:"grow"}),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{flat:"",icon:"",color:"secondary darken-1"},on:{click:function(e){return t.$popstate("guideDialogActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1),t._v(" "),i("v-card-text",{staticClass:"pt-0"},[i("div",{staticClass:"reta-editor-content"},[i("div",{staticClass:"pa-3 content-wrapper",domProps:{innerHTML:t._s(t.activeGuide.body)},on:{click:t.$root.htmlWithListeners}})]),t._v(" "),i("v-divider"),t._v(" "),t.guideScores[t.activeGuide.$.id]?i("div",{staticClass:"pt-3 text-center subheading font-w-500 accent--text"},[t._v("\n "+t._s(t.$trans("thanks for your feedback"))+"\n ")]):i("div",{staticClass:"pt-3"},[i("div",{staticClass:"text-center subheading font-w-500 py-2"},[t._v("\n "+t._s(t.$trans("was this helpful?"))+"\n ")]),t._v(" "),i("div",{staticClass:"d-flex justify-center"},[i("v-btn",{attrs:{outline:"",color:"accent"},on:{click:function(e){return t.sendGuideScore(t.activeGuide.$.id,1)}}},[t._v("\n "+t._s(t.$trans("yes"))+"\n ")]),t._v(" "),i("v-btn",{attrs:{outline:"",color:"accent"},on:{click:function(e){return t.sendGuideScore(t.activeGuide.$.id,-1)}}},[t._v("\n "+t._s(t.$trans("no"))+"\n ")])],1)])],1)],1)],1),t._v(" "),i("v-dialog",{attrs:{value:t.annDialogActive,"max-width":"960",lazy:"",scrollable:"",fullscreen:t.$root.smAndDown,transition:"slide-y-reverse-transition"},on:{input:function(e){return t.$popstate("annDialogActive",e)}}},[i("v-card",{key:t.activeAnn.id||"0"},[i("v-card-title",{staticClass:"flex-nowrap secondary lighten-4 py-2"},[i("div",{staticClass:"subheading font-w-500"},[t._v("\n "+t._s(t.activeAnn.title)+"\n ")]),t._v(" "),i("div",{staticClass:"grow"}),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{flat:"",icon:"",color:"secondary darken-1"},on:{click:function(e){return t.$popstate("annDialogActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1),t._v(" "),i("v-card-text",{staticClass:"pt-0"},[i("div",{staticClass:"reta-editor-content"},[i("div",{staticClass:"pa-3 content-wrapper",domProps:{innerHTML:t._s(t.activeAnn.body)},on:{click:t.$root.htmlWithListeners}}
1)])])],1)],1),t._v(" "),t._l(t.announcements,function(e,r){return i("div",{key:r,class:["app-max-width-xl"]},["dialog"===e.position?i("v-dialog",{key:e.position,attrs:{persistent:!0,value:!0,"max-width":"960",scrollable:"",transition:"slide-y-reverse-transition"}},[i("v-card",[i("v-card-text",{staticClass:"lh-2 d-flex"},[i("div",{staticClass:"w-100"},[e.body?i("div",{staticClass:"reta-editor-content"},[i("div",{staticClass:"content-wrapper",domProps:{innerHTML:t._s(e.body)},on:{click:t.$root.htmlWithListeners}})]):t._e()]),t._v(" "),i("div",[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{icon:"",flat:"",color:"secondary darken-1",disabled:t.loading.announcement[e.id]},on:{click:function(i){return t.closeAnnouncement(e.id)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1)]),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{depressed:"",color:e.color,disabled:t.loading.announcement[e.id]},on:{click:function(i){return t.closeAnnouncement(e.id)}}},[t._v("\n "+t._s(t.$trans("close"))+"\n ")])],1)],1)],1):"terms"===e.position?i("v-dialog",{key:e.position,attrs:{persistent:!0,value:!0,"max-width":"960",scrollable:"",transition:"slide-y-reverse-transition"}},[i("v-card",[i("v-card-text",{staticClass:"lh-2 d-flex"},[i("div",{staticClass:"w-100"},[e.body?i("div",{staticClass:"reta-editor-content"},[i("div",{staticClass:"content-wrapper",domProps:{innerHTML:t._s(e.body)},on:{click:t.$root.htmlWithListeners}})]):t._e()])]),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{depressed:"",color:e.color,disabled:t.loading.announcement[e.id]},on:{click:function(i){return t.closeAnnouncement(e.id)}}},[t._v("\n "+t._s(t.$trans("I agree"))+"\n ")])],1)],1)],1):i("div",{class:"my-4 mx-3 mx-md-5 "+e.color+"--shadow",style:"border-"+(t.$vuetify.rtl?"right":"left")+": 5px solid "+(t.$root[e.color]||{}).base+";"},[i("div",{staticClass:"pa-3 white lh-2 font-1 d-flex"},[i("div",{class:["w-100"]},[e.body?i("div",{staticClass:"reta-editor-content"},[i("div",{staticClass:"content-wrapper",domProps:{innerHTML:t._s(e.body)},on:{click:t.$root.htmlWithListeners}})]):t._e()]),t._v(" "),"persistent"!==e.position?i("div",[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{icon:"",flat:"",color:e.color,disabled:t.loading.announcement[e.id]},on:{click:function(i){return t.closeAnnouncement(e.id)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1):t._e()])])],1)}),t._v(" "),i("v-menu",{attrs:{"position-x":t.$root.tooltipMenuX,"position-y":t.$root.tooltipMenuY,"z-index":"2000","content-class":"elevation-0 events-none","nudge-bottom":"10",lazy:""},model:{value:t.$root.tooltipMenuActive,callback:function(e){t.$set(t.$root,"tooltipMenuActive",e)},expression:"$root.tooltipMenuActive"}},[i("div",{staticClass:"radius-1000 px-2 py-1 lh-title secondary darken-2 white--text caption"}
1,[t._v("\n "+t._s(t.$root.tooltipValue)+"\n ")])]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.$root.networkActive,expression:"$root.networkActive"}],staticClass:"events-none"},[i("div",{staticClass:"d-flex justify-center align-center fixed a-0",staticStyle:{"z-index":"300",opacity:"0.9"}},[i("v-progress-circular",{staticClass:"primary lighten-2 elevation-6",staticStyle:{"border-radius":"100px"},attrs:{size:t.$root.smAndDown?66:76,width:4,indeterminate:"",color:"white"}},[i("v-avatar",{staticClass:"white",attrs:{size:t.$root.smAndDown?60:70}},[i("v-img",{attrs:{src:t.$helpers.asset("icons/logo.png"),contain:""}})],1)],1)],1)])],2)},[],!1,null,null,null).exports,c={mdiWalletPlus:a.yd,mdiPlusThick:a.Ec,mdiCheck:a.z,mdiClose:a.M,props:{forceAmount:{type:Number,required:!1}},data:()=>({loading:{send:!1},amountValue:"",dialogActive:!1}),computed:{user(){return this.$store.state.client.user}},watch:{forceAmount:{handler(){this.amountValue=String(this.forceAmount||"")},immediate:!0},dialogActive(t){t&&(this.forceAmount?(this.amountValue=String(this.forceAmount),setTimeout(()=>{this.dialogActive&&this.send()},400)):setTimeout(()=>{if(this.dialogActive&&this.$refs.input){const{currentType:t}=this.$refs.input.$refs;(t.$refs.input||t.$el).focus()}},400)),this.$emit(t?"show":"hide")}},methods:{show(){this.dialogActive||this.$popstate("dialogActive",!0)},hide(){this.dialogActive&&this.$popstate("dialogActive",!1)},async send(){if(this.loading.send)return;this.forceAmount&&(this.amountValue=this.forceAmount);const t=await this.$refs.input.validate();if(t)return this.$root.addNotif(t);if(await this.$root.requireProfile({message:"Please enter your email address to continue",fields:["email"],some:!0})){await this.$nextTick(),this.loading.send=!0;try{const{data:t}=await this.$axios.post("user-credit-invoice",{amount:this.amountValue});t.invoice_id?(this.$router.push(`/invoice/${t.invoice_id}`),this.amountValue="",this.$emit("success")):await this.$store.dispatch("resources/patch",{collection:[{model:"user",id:this.user.id,fill:{add_credit:this.amountValue}}]}).then(async t=>{if(200!==t.data[0].code)return;const{data:e}=await this.$axios.post("user-credit-invoice",{amount:this.amountValue});e.invoice_id?this.$router.push(`/invoice/${e.invoice_id}`):(this.$router.push("/invoice"),this.$root.addNotif("error getting invoice details!")),this.amountValue="",this.$emit("success")}).catch(console.warn)}catch(t){console.warn(t)}this.loading.send=!1}else this.$root.addNotif("email address is required!")},cancel(){this.hide(),this.amountValue="",this.$emit("cancel")}}},u=Object(o.a)(c,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._t("action",[i("v-btn",{staticClass:"ma-0 ww-auto",attrs:{round:"",outline:"",small:"",color:"success"},on:{click:t.show}},[i("icon",{attrs:{size:"18"},domProps:{textContent:t._s(t.$options.mdiPlusThick)}}),t._v(" "),i("span",{staticClass:"pr-1"}),t._v(" "),i("span",{staticClass:"font-1"},[t._v("Add funds")])],1)],{show:t.show}),t._v(" "),i("v-dialog",{attrs:{value:t.dialogActive,"max-width":"640",lazy:"",scrollable:"",fullscreen:t.$root.smAndDown,transition:"slide-y-reverse-transition"},on:{input:function(e){return t.$popstate("dialogActive",e)}}},[i("v-card",[i("v-card-title",{staticClass:"pb-0"},[i("div",{staticClass:"w-100"},[i("div",{staticClass:"pb-3 d-flex"},[i("div",{staticClass:"subheading black--text"},[i("icon",{attrs:{color:"success lighten-1",size:"36"}},[t._v(t._s(t.$options.mdiWalletPlus))]),t._v("\n Add funds to your account\n ")],1),t._v(" "),i("div",{staticClass:"grow"}),t._v(" "),i("div",[i("v-btn",{staticClass:"ma-0",attrs:{icon:"",flat:"",color:"secondary darken-1"},on:{click:function(e){return t.$popstate("dialogActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1)]),t._v(" "),i("form",{staticClass:"px-3 py-1",attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.send(e)}}},[i("v-card",{staticClass:"border-light",attrs:{flat:""}},[i("v-card-text",[i("model-input",{ref:"input",attrs:{type:"price",name:"amount",label:t.$trans("desired amount"),rules:"required|integer|min_value:"+(t.forceAmount||t.$config.service.financial.min_amount),readonly:!!t.forceAmount,color:"success lighten-1"},model:{value:t.amountValue,callback:function(e){t.amountValue=e},expression:"amountValue"}})],1)],1)],1)])]),t._v(" "),t.forceAmount?t._e():i("v-card-text",{staticClass:"pb-0"},[i("add-credit-package")],1),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{disabled:t.loading.send,flat:"",color:"secondary darken-1"},on:{click:t.cancel}},[t._v("\n "+t._s(t.$trans("cancel"))+"\n ")]),t._v(" "),i("v-btn",{attrs:{disabled:!t.amountValue||t.loading.send,depressed:"",color:"success"},on:{click:t.send}},[i("icon",[t._v(t._s(t.$options.mdiCheck))]),t._v("Â \n "+t._s(t.$trans("confirm and continue"))+"\n ")],1)],1)],1)],1)],2)}
1,[],!1,null,null,null).exports,d=i(5),h=i.n(d);function p(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}var f={mdiWalletPlus:a.yd,mdiCheck:a.z,mdiClose:a.M,props:{actionText:{type:String,required:!1}},data:()=>({loading:!1,sending:!1,dialogActive:!1}),computed:{user(){return this.$store.state.client.user},packages(){let t=(this.$store.state["bonus-package"]||{items:[]}).items;return(t=t.map(t=>{const e=t.data;return function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?p(i,!0).forEach(function(e){h()(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):p(i).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({},e,{giftAmount:this.$helpers.priceFormat(e.$.credit-e.$.amount)})})).sort((t,e)=>t.$.amount>e.$.amount?1:-1),t}},watch:{dialogActive(t){t&&this.load(),this.$emit(t?"show":"hide")}},methods:{show(){this.dialogActive||this.$popstate("dialogActive",!0)},hide(){this.dialogActive&&this.$popstate("dialogActive",!1)},async send(t){if(this.sending||!t)return;await this.$root.requireProfile({message:"please enter your email address to continue",fields:["email"],some:!0})?(await this.$nextTick(),this.sending=!0,this.$store.dispatch("resources/patch",{collection:[{model:"user",id:this.user.id,fill:{use_credit_pack:t}}]}).then(t=>{if(200===t.data[0].code)return this.$store.dispatch("resources/get",{collection:[{model:"invoice",pagination:{rows:1},filters:[{field:"model_id",value:this.user.id},{field:"model_identifier",value:"user"}]}],replace:!0}).then(t=>{if(200!==t.data[0].code)return Promise.reject("could not get the invoice");this.$router.push(`/invoice/${t.data[0].resources[0].id}`)}).catch(t=>(this.$router.push("/invoice"),Promise.reject(t)))}).catch(console.warn).finally(()=>{this.sending=!1})):this.$root.addNotif("email address is required!")},load(){this.loading||(this.loading=!0,this.$store.dispatch("resources/get",{collection:[{model:"bonus-package",pagination:{rows:900},replace:!0}],origin:"modelInput"}).catch(console.warn).finally(()=>{this.loading=!1}))}}},v=Object(o.a)(f,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._t("action",[i("v-btn",{staticClass:"ma-0",attrs:{outline:"",round:"",color:"primary"},on:{click:t.show}},[t._v("\n "+t._s(t.actionText||"Discounts")+"\n ")])],{show:t.show}),t._v(" "),i("v-dialog",{attrs:{value:t.dialogActive,"max-width":"720",fullscreen:t.$root.smAndDown,scrollable:"",lazy:"",transition:"slide-y-reverse-transition"},on:{input:function(e){return t.$popstate("dialogActive",e)}}},[i("v-card",[i("v-card-title",{staticClass:"d-flex"},[i("div",{staticClass:"subheading f-500"},[t._v("Discounts")]),t._v(" "),i("div",{staticClass:"grow"}),t._v(" "),i("div",[i("v-btn",{staticClass:"ma-0",attrs:{icon:"",flat:"",color:"secondary darken-1"},on:{click:function(e){return t.$popstate("dialogActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1)]),t._v(" "),i("v-card-text",[t.loading&&!t.packages.length?i("div",[i("div",{staticClass:"py-5"},[i("v-progress-linear",{attrs:{indeterminate:"",color:"accent"}})],1)]):t._e(),t._v(" "),i("div",{staticClass:"d-flex flex-wrap"},t._l(t.packages,function(e){return i("v-flex",{key:e.id,attrs:{xs12:"",md4:""}},[i("div",{staticClass:"mx-2 my-3 px-3 py-2 round border"},[i("div",{staticClass:"text-center body-2"},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),i("v-divider",{staticClass:"my-2"}),t._v(" "),i("div",{staticClass:"nowrap mb-2"},[i("div",{staticClass:"d-flex"},[i("div",[t._v("\n Price:\n ")]),t._v(" "),i("div",{staticClass:"grow px-1 text-center"},[t._v("\n "+t._s(e.amount)+"\n ")])])]),t._v(" "),i("div",{staticClass:"nowrap mb-2"},[i("div",{staticClass:"d-flex"},[i("div",[t._v("\n Gift ð:\n ")]),t._v(" "),i("div",{staticClass:"grow px-1 text-center black--text"},[i("b",[t._v(t._s(e.giftAmount))])])])]),t._v(" "),i("div",{staticClass:"nowrap mb-3"},[i("div",{staticClass:"d-flex"},[i("div",[t._v("\n Total:\n ")]),t._v(" "),i("div",{staticClass:"grow px-1 text-center"},[t._v("\n "+t._s(e.credit)+"\n ")])])]),t._v(" "),i("div",[i("v-btn",{attrs:{block:"",depressed:"",color:"success",small:"",disabled:t.sending},on:{click:function(i){return t.send(e.id)}}},[t._v("\n Purchase "+t._s(e.name)+"\n ")])],1)],1)])}),1)])],1)],1)],2)},[],!1,null,null,null).exports,m={props:{unixTime:{type:Number},now:{type:Number}},data:()=>({diff:0}),computed:{theNow(){return void 0!==this.now?this.now:this.$root.now},seconds(){return Math.trunc(this.diff%60)},minutes(){return Math.trunc(this.diff/60%60)},hours(){return Math.trunc(this.diff/60/60%24)},days(){return Math.trunc(this.diff/60/60/24)}},watch:{theNow(){this.diff=(this.unixTime||0)-this.theNow,this.diff<=0&&(this.diff=0,this.$emit("finished",this.unixTime||0))}},filters:{twoDigits:t=>(`${t}`.length<2?"0":"")+t}},g=Object(o.a)(m,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{dir:"ltr"}},[i("v-layout",{attrs:{row:""}},[t.days>0?[i("span",[t._v(t._s(t._f("twoDigits")(t.days)))]),t._v(" "),i("span",{staticClass:"r-countdown-sep"},[t._v(":")])]:t._e(),t._v(" "),t.hours>0?[i("span",[t._v(t._s(t._f("twoDigits")(t.hours)))]),t._v(" "),i("span",{staticClass:"r-countdown-sep"},[t._v(":")])]:t._e(),t._v(" "),[i("span",[t._v(t._s(t._f("twoDigits")(t.minutes)))]),t._v(" "),i("span",{staticClass:"r-countdown-sep"},[t._v(":")])],t._v(" "),[i("span",[t._v(t._s(t._f("twoDigits")(t.seconds)))])]],2)],1)},[],!1,null,null,null).exports,y={mdiDomain:a.bb,mdiAccount:a.a,mdiEye:a.ib,mdiEyeOff:a.kb,props:{autofocus:{type:Boolean,required:!1,default:!0},value:{type:String,required:!1,default:""}},data:()=>({loading:!1,passwordInputValue:"",passwordType:"password",orgActive:!1}),computed:{fieldValue:{get(){return this.value},set(t){this.$emit("input",this.$helpers.safeNums(t))}},passwordValue:{get(){return this.passwordInputValue},set(t){this.passwordInputValue=this.$helpers.safeNums(t)}},fieldLabel(){return this.orgActive?"Username":"Email"},otpTimeActive(){return this.$store.state.client.otpTime>this.$root.now}},methods:{async login(t={requestOTP:!1}){if(this.loading||t.requestOTP&&this.otpTimeActive)return;let e=this.fieldValue.replace(/\s+/g,"");if(this.fieldValue=e,!e)return void this.focusField();let i=this.$helpers.guessType(e);if(t.requestOTP){if(this.orgActive&&(this.orgActive=!1),!i)return this.focusField(),void this.$root.addNotif("The information you entered is incorrect!");if(!await this.$root.ask(`Do you want to send one-time password to your ${this.$trans(i)}?`))return}else if(!this.passwordValue)return void this.focusPass();this.$helpers.hideKeyboard(),this.loading=!0,this.$store.dispatch("client/login",{field_name:i,field_value:e,password:t.requestOTP?null:this.otpTimeActive?this.passwordValue.trim():this.passwordValue,otp:t.requestOTP}).then(e=>{t.requestOTP||e.data.forceOtp?(this.$root.addNotif({message:e.data.forceOtp?`Please enter the one-time password sent to your ${this.$trans(i)}.`:`One-time password was sent to your ${this.$trans(i)}.`,timeout:1e4}),this.passwordValue="",this.$nextTick(()=>this.$refs.passInput.resetValidation()),this.focusPass()):this.$nextTick(()=>this.$emit("success"))}).catch(console.warn).finally(()=>{this.loading=!1})},focusPass(){const t=this.$refs.passInput&&this.$refs.passInput.$refs.input;t&&t.focus()},focusField(){const t=this.$refs.fieldInput&&this.$refs.fieldInput.$refs.input;t&&t.focus()}}},w=Object(o.a)(y,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._t("card-title",[i("v-layout",{staticClass:"py-3 px-md-3",attrs:{row:""}},[i("div",{staticClass:"title f-500"},[t._v("Login to your account")]),t._v(" "),i("div",{staticClass:"grow"})])]),t._v(" "),i("div",{staticClass:"pa-2"}),t._v(" "),i("v-slide-y-reverse-transition",{attrs:{group:"","hide-on-leave":""}},[i("v-text-field",{key:"field-input-"+(t.orgActive?"org":"usr"),ref:"fieldInput",attrs:{color:"primary",autofocus:t.autofocus,type:"text",name:"username",label:t.fieldLabel,rules:[function(){return!!t.fieldValue||t.fieldLabel+" is required!"}],dir:"ltr"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.focusPass(e)}},scopedSlots:t._u([{key:"prepend",fn:function(){return[i("icon",[t._v(t._s(t.orgActive?t.$options.mdiDomain:t.$options.mdiAccount))])]},proxy:!0}]),model:{value:t.fieldValue,callback:function(e){t.fieldValue=e},expression:"fieldValue"}}),t._v(" "),i("v-text-field",{key:"password-input-"+(t.orgActive?"org":"usr"),ref:"passInput",attrs:{autocomplete:t.otpTimeActive?"new-password":void 0,color:"primary",type:t.passwordType,name:"password",label:t.otpTimeActive?"One time password":t.$trans(t.orgActive?"student id or default password":"password"),rules:[function(){return!!t.passwordValue||"password is required!"}],dir:"ltr"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.login(e)}},scopedSlots:t._u([{key:"prepend",fn:function(){return[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("show"),expression:"$trans('show')"}],staticClass:"ma-0",attrs:{tabindex:"-1",flat:"",icon:"",small:"",color:"text"===t.passwordType?"primary":"secondary darken-1"},on:{click:function(e){t.passwordType="text"===t.passwordType?"password":"text"}}},[i("icon",[t._v(t._s("text"===t.passwordType?t.$options.mdiEye:t.$options.mdiEyeOff))])],1)]},proxy:!0}]),model:{value:t.passwordValue,callback:function(e){t.passwordValue=e},expression:"passwordValue"}}),t._v(" "),i("v-btn",{key:"forgot-pass",staticClass:"mt-0 mx-0 mb-3",attrs:{flat:"",color:"accent",disabled:t.loading||t.otpTimeActive,tabindex:"-1"},on:{click:function(e){return t.login({requestOTP:!0})}}},[t.otpTimeActive?i("span",{staticClass:"f-400"},[t._v("\n "+t._s(t.$store.state.client.otpTime-t.$root.now)+" seconds to resend\n ")]):i("span",{staticClass:"f-400"},[t._v("\n Forgot password\n "),i("span",{staticClass:"secondary--text text--darken-1 font-1"},[t._v("\n ( Send one-time password )\n ")])])])],1
1),t._v(" "),i("v-layout",{attrs:{row:""}},[i("v-spacer"),t._v(" "),i("v-flex",{staticClass:"text-xs-center",attrs:{xs8:"",md6:""}},[i("v-btn",{attrs:{color:"primary",round:"",depressed:"",block:"",ripple:!1,disabled:t.loading},on:{click:t.login}},[t._v("\n Login\n ")]),t._v(" "),t.$root.registerRoles.length?i("div",{staticClass:"font-1 mt-2"},[i("span",[t._v("\n "+t._s(t.$trans("do not have an account?"))+"\n ")]),t._v(" "),i("v-btn",{staticClass:"ma-0",staticStyle:{width:"auto","min-width":"auto"},attrs:{flat:"",small:"",color:"primary"},on:{click:function(e){return t.$emit("switch","register")}}},[t._v("\n Register\n ")])],1):t._e()],1)],1)],2)},[],!1,null,null,null).exports,b=i(58),_=i(40),x=i(41),$={components:{Editor:()=>({component:i.e("editor-component").then(i.bind(null,203)),delay:200,loading:x.a,error:_.a})},props:{value:{required:!0},autofocus:{type:Boolean,required:!1,default:!1},basic:{type:Boolean,required:!1,default:!1},identifier:{type:String,required:!1,default:"response"},id:{type:[String,Number],required:!1,default:null},attribute:{type:String,required:!1,default:null},linkableSections:{required:!1},linkableReferences:{required:!1}},data:()=>({editor:void 0})},C=Object(o.a)($,function(){var t=this,e=t.$createElement;return(t._self._c||e)("editor",{key:t.identifier+t.id+"|"+t.basic,ref:"editorVue",attrs:{value:t.value,identifier:t.identifier,id:t.id,attribute:t.attribute,basic:t.basic,"linkable-sections":t.linkableSections,"linkable-references":t.linkableReferences},on:{input:function(e){return t.$emit("input",e)},ready:function(e){t.editor=e,!t.autofocus||t.editor.focus("end")}}})},[],!1,null,null,null).exports;var k={props:{value:{required:!0},identifier:{type:String,required:!1,default:"response"},id:{type:[String,Number],required:!1,default:null},attribute:{type:String,required:!1,default:null}},data:()=>({loading:!0,uploading:!1}),methods:{async loadDependencies(){const t=[this.$helpers.cdn("assets/grapesjs/grapes.min.css")],e=[this.$helpers.cdn("assets/grapesjs/grapes.min.js"),this.$helpers.cdn("assets/grapesjs/grapesjs-preset-newsletter.min.js")];for(const e of t)if(!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}for(const t of e)await new Promise(e=>{if(document.querySelector(`script[src="${t}"]`))return e();const i=document.createElement("script");i.src=t,i.onload=e,document.head.appendChild(i)})}},mounted(){this.loading=!0;const t=this.$store.dispatch("folder/get").then(()=>this.$store.state.folder.files.filter(t=>t.model_identifier===this.identifier&&(Number(t.model_id)||0)===(Number(this.id)||0)&&`${t.model_attribute||""}`===`${this.attribute||""}`));this.loadDependencies().then(()=>{if(this._isDestroyed)return;this.loading=!1;const e=grapesjs.init({container:this.$refs.editorContainer,height:"700px",width:"100%",storageManager:!1,plugins:["grapesjs-preset-newsletter"],pluginsOpts:{"grapesjs-preset-newsletter":{modalTitleImport:"Import HTML code",modalBtnImport:"Import Code"}},assetManager:{uploadFile:t=>{const i=t.dataTransfer?t.dataTransfer.files:t.target.files;i&&i.length&&(this.uploading=!0,Promise.all(Array.from(i).map(t=>{const i=new FormData;return i.append("model_identifier",this.identifier),this.id&&i.append("model_id",this.id),this.attribute&&i.append("model_attribute",this.attribute),i.append("file",t),this.$axios.post("file",i,{headers:{"Content-Type":"multipart/form-data"}}).then(t=>{this.$store.dispatch("folder/addFiles",t.data.files),e.AssetManager.add(t.data.files.map(t=>this.$helpers.cdn(t.path)))}).catch(console.warn)})).finally(()=>{this.uploading=!1}))}}});let i,r;t.then(t=>{e.AssetManager.add(t.map(t=>this.$helpers.cdn(t.path)))}),e.Panels.removeButton("options","export-template"),this.$options.editor=e;const n=()=>{let t=e.runCommand("gjs-get-inlined-html");const n=(new DOMParser).parseFromString(t,"text/html");if(!n.head){const t=n.createElement("head");n.documentElement.insertBefore(t,n.body)}if(n.body.querySelectorAll("style,script,meta,title,link").forEach(t=>{n.head.appendChild(t)}),!n.head.querySelector('meta[name="viewport"]')){const t=n.createElement("meta");t.name="viewport",t.content="width=device-width, initial-scale=1.0",n.head.prepend(t)}if(!n.head.querySelector('meta[http-equiv="X-UA-Compatible"]')){const t=n.createElement("meta");t.setAttribute("http-equiv","X-UA-Compatible"),t.setAttribute("content","IE=edge"),n.head.prepend(t)}if(!n.head.querySelector("meta[charset]")){const t=n.createElement("meta");t.setAttribute("charset","UTF-8"),n.head.prepend(t)}t=`<!DOCTYPE html>\n${n.documentElement.outerHTML}`,i=t;const a=n.createElement("script");a.type="application/json",a.id="r-gjs-data-json",a.textContent=JSON.stringify(e.getProjectData()),n.head.append(a),t=`<!DOCTYPE html>${n.documentElement.outerHTML}`,r=t};this.$options.debEmitInput=this.$helpers.debounce(()=>{if(this.$options.editor&&!this._isDestroyed)try{n(),this.$emit("input",r)}catch(t){console.warn("Error extracting GrapesJS HTML",t)}},300,2e4),e.Commands.add("import-system-template",{containerEl:null,run(t){if(!this.containerEl){const e=document.createElement("div");e.style.cssText="display:flex;flex-wrap:wrap;position:relative;",e.innerHTML='<div style="padding:2rem;text-align:center">Loading templates...</div>',this.containerEl=e;const i="/assets/prebuilt-email-templates";fetch(`${i}/data.json`).then(t=>t.json()).then(r=>{e.textContent="",r.forEach(r=>{const n=document.createElement("button");n.style.cssText="width:33.33%;
1display:flex;flex-direction:column;padding:0.25rem;gap:0.5rem;background:#373d49;color:white;align-items:center;justify-content:center;min-width:0;flex-grow:0;flex-shrink:0;";const a=document.createElement("img");a.style.cssText="width:100%;aspect-ratio:1;object-fit:cover;",a.src=`${i}/${r.cover}`,n.append(a);const s=document.createElement("span");s.textContent=r.title,n.append(s),n.addEventListener("click",()=>{n.style.opacity="0.3",e.style.pointerEvents="none",fetch(`${i}/${r.html}`).then(t=>t.text()).then(e=>{const i=(new DOMParser).parseFromString(e,"text/html"),r=document.createTreeWalker(i,NodeFilter.SHOW_COMMENT),n=[];for(;r.nextNode();)n.push(r.currentNode);n.forEach(t=>t.remove()),e=(new XMLSerializer).serializeToString(i),t.Components.clear(),t.Css.clear(),t.setComponents(e),t.Modal.close()}).catch(()=>{alert("Failed to load template! Please try again.")}).finally(()=>{n.style.opacity="1",e.style.pointerEvents="auto"})}),e.append(n)})})}t.Modal.open({title:"Select a template to import",content:this.containerEl})}}),e.Panels.addButton("options",{id:"import-system-template",label:'<i class="fa fa-arrow-circle-down"></i>',command:"import-system-template",attributes:{title:"Import template"}});const a=e.Panels.addButton("options",{id:"send-test-email",label:'<i class="fa fa-paper-plane"></i>',command:"send-test-email",attributes:{title:"Send test email",style:"color:orange;"}});e.Commands.add("send-test-email",{run:async()=>{if(!a.get("disable")){try{a.set("disable",!0),a.set("label",'<i class="fa fa-spinner fa-spin"></i>'),await this.$options.debEmitInput.immediate(),await this.$nextTick(),await this.$root.sendTestEmail(r)}catch(t){console.warn(t)}a.set("disable",!1),a.set("label",'<i class="fa fa-paper-plane"></i>')}}});const s=e.Panels.getButton("options","gjs-open-import-template");s&&s.set("label",'<i class="fa fa-code"></i>');const o=e.Commands.get("gjs-open-import-template");e.Commands.add("gjs-open-import-template",{run(...t){o.run(...t),o.codeEditorHtml.setContent(i)}}),e.Commands.add("gjs-toggle-images",{run(){let t=prompt("This will clear extrenal images and links, Please enter a link to replace all links wtih:","");if(!t)return;if(!/^https?:\/\//i.test(t))return void alert(`This is not a valid link: ${t}`);const r=document.createElement("div");t=new URL(t).href,r.textContent=t,t=r.innerHTML,n();const{origin:a}=location,s=t=>t.startsWith(a)?t:/\.(jpe?g|png|webp|gif|avif)(?:$|\?)/i.test(t)?`${a}/assets/resource/thumbnail-1.jpg`:"";e.setComponents(i.replace(/(<a\b[^>]*?\bhref\s*=\s*["'])[^'"]*?(["'])/gi,(e,i,r)=>i+t+r).replace(/\b(src|background[a-z0-9_-]*)=['"](https?:\/\/[^'"]+?)['"]/gi,(t,e,i)=>`${e}="${s(i)}"`).replace(/\b(background[a-z0-9_-]*\s*:\s*url\(\s*['"]?)(https?:\/\/[^'"]+?)(['"]?\s*\))/gi,(t,e,i,r)=>e+s(i)+r))}});let l=!1;const c=t=>{l||(l=!0,(()=>{if(!t)return void e.loadProjectData({});const i=(new DOMParser).parseFromString(t,"text/html");let r=i.getElementById("r-gjs-data-json");if(r)try{r=JSON.parse(r.textContent)}catch(t){}r?this.$options.editor.loadProjectData(r):this.$options.editor.setComponents(i.body.innerHTML)})(),n(),setTimeout(()=>{l=!1},10))};e.on("update",()=>{l||this.$options.debEmitInput()}),this.value&&(r=this.value,c(this.value)),this.$watch("value",t=>{t!==r&&(r=t,c(t))})})},beforeDestroy(){this.$options.editor&&(this.$options.editor.destroy(),delete this.$options.editor)}},D=(i(96),Object(o.a)(k,function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"rt-grapesjs-wrapper"},[this.loading?e("div",{staticClass:"pa-3 text-center"},[this._v("\n Email Editor is loading...\n ")]):this._e(),this._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!this.loading,expression:"!loading"}]},[e("div",{ref:"editorContainer"})])])},[],!1,null,null,null).exports),A={props:{value:{required:!0},identifier:{type:String,required:!1,default:"response"},id:{type:[String,Number],required:!1,default:null},autoFocus:{type:Boolean,required:!1,default:!1}},data:()=>({uploadDocxDialogActive:!1,isUplaodingDocx:!1,docxHtml:"",loading:!0}),methods:{afterScript(t){if(document.getElementById("rt-ckeditor-script"))return void(t&&t());const e=document.createElement("script");e.id="rt-ckeditor-script",e.src=this.$helpers.cdn("assets/ckeditor/ckeditor.js"),e.onload=t,document.head.appendChild(e)},async uploadDocx(t){if(this.isUplaodingDocx)return;let e=void 0;this.docxHtml="",this.isUplaodingDocx=!0;try{await(async()=>{const e=t.target.files[0];if(!e)return;const i=new FormData;i.append("fileData",e);const r=await fetch("https://rasanika.com/libr-api/docx-to-html",{method:"POST",body:i}).then(t=>{if(!t.ok)throw new Error(t.statusText);return t}).then(t=>t.json());"string"==typeof r.html&&(this.docxHtml=r.html)})()}catch(t){e=t}if(this.isUplaodingDocx=!1,void 0!==e)throw e}}
1,mounted(){this.loading=!0,this.afterScript(()=>{if(this.loading=!1,this._isDestroyed)return;const t={mathJaxLib:"//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML",height:"500px",removePlugins:"image2,exportpdf",startupFocus:!!this.autoFocus},{cke_upload_token:e}=this.$store.state.client.user;e&&(t.extraPlugins="uploadimage",t.uploadUrl=`${this.$config.apiBaseUrl}/cke-upload/${e}`);const i=CKEDITOR.replace(this.$el.querySelector("textarea.rt-cke-textarea"),t);let r;const n=this.$helpers.debounce(()=>{this.$options.editor&&(r=i.getData(),this.$emit("input",r))},50,1e3);i.on("change",n),i.on("fileUploadResponse",n),this.$options.editor=i,this.$options.autoUpdateTimer=setInterval(()=>{!document.hidden&&this.$options.autoUpdateTimer&&this.$options.editor&&n()},1e3),this.$watch("value",t=>{t!=r&&(r=t,i.setData(r))},{immediate:!0})})},beforeDestroy(){this.$options.autoUpdateTimer&&(clearInterval(this.$options.autoUpdateTimer),this.$options.autoUpdateTimer=void 0),this.$options.editor&&(this.$options.editor.destroy(),delete this.$options.editor)}},T=(i(98),Object(o.a)(A,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("textarea",{staticClass:"rt-cke-textarea"}),t._v(" "),t.loading?i("div",{staticClass:"pa-3 text-center"},[t._v("\n CKEditor is loading...\n ")]):t._e(),t._v(" "),t.$store.state.client.user.cke_upload_token?i("div",[i("v-dialog",{attrs:{value:t.uploadDocxDialogActive,width:"960px",scrollable:"",transition:"slide-y-reverse-transition"},on:{input:function(e){return t.$popstate("uploadDocxDialogActive",e)}},scopedSlots:t._u([{key:"activator",fn:function(e){var r=e.on;return[i("v-btn",t._g({attrs:{outline:"",color:"primary"}},r),[t._v("\n Upload DOCX file\n ")])]}}],null,!1,1972445449)},[t._v(" "),i("v-card",{staticStyle:{"min-width":"300px"}},[i("v-card-text",{staticStyle:{height:"100%"}},[i("input",{attrs:{type:"file",disabled:t.isUplaodingDocx,accept:".docx"},on:{change:function(e){t.uploadDocx(e).catch(function(){t.$root.addNotif("Error! could not convert to HTML")}).finally(function(){e.target.value=""})}}}),t._v(" "),i("v-divider",{staticClass:"my-3"}),t._v(" "),t.docxHtml?i("div",{staticClass:"d-flex"},[i("div",{staticClass:"w-100",attrs:{contenteditable:"true"},domProps:{innerHTML:t._s(t.docxHtml)}})]):t._e()],1)],1)],1)],1):t._e()])},[],!1,null,null,null).exports);function S(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}var M={props:{properties:{type:Object,required:!0},rules:{type:Object,required:!1},value:{type:Object,required:!0},readonly:{type:Boolean,required:!1,default:!1},iconEnd:{type:Boolean,required:!1,default:!1},halfWidthInputs:{type:Boolean,required:!1,default:!1},paramsModel:{type:String,required:!1,default:void 0},paramsId:{type:String,required:!1,default:void 0},resource:{required:!1},columnClass:{type:String,required:!1,default:void 0},transform:{type:Object,required:!1,default:void 0}},data:()=>({isValid:!0}),computed:{propsLength(){return this.$helpers.length(this.properties)},isOdd(){return!!(this.propsLength%2)},user(){return this.$store.state.client.user},model(){return this.paramsModel&&this.user.models[this.paramsModel]},modelColor(){return this.paramsModel?this.$helpers.modelColor(this.model||{specs:{identifier:this.paramsModel}}):void 0}},methods:{emitInput(t,e){this.transform&&this.transform[t]&&(e=this.transform[t](e));const i=function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?S(i,!0).forEach(function(e){h()(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):S(i).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({},this.value,{[t]:e});this.$emit("input",i),this.$nextTick(()=>{this.$bus.$emit(this.$helpers.inputEvKey(this.paramsModel,this.paramsId,t),e)})},getValue(t,e){return t?t in this.value?this.value[t]:this.resource&&t in this.resource.$?this.resource.$[t]:e:e},getColumnClass(t){return["xs12",!this.halfWidthInputs||this.isOdd&&t+1===this.propsLength?"md12":"md6 custom-distance"]},async validate(t){let e;t=t||{};for(const t of this.$refs.inputs){const i=await t.validate();!e&&i&&(e=i,t.$el.scrollIntoView({block:"center"}))}return e||(t.allowGuest||"user"===this.paramsModel||await this.$root.requireProfile({message:"please enter your email address to continue",fields:["email"],some:!0})?void 0:"Email address is required!")},resetValidation(){for(const t of this.$refs.inputs)t.resetValidation()}}},I=(i(100),Object(o.a)(M,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("submit")}}},[i("v-layout",{attrs:{row:"",wrap:""}},t._l(t.properties,function(e,r,n){return i("v-flex",{key:n,class:t.columnClass||t.getColumnClass(n),style:e.customFlexStyle},[i("div",{staticClass:"h-100 w-100 d-flex flex-column"},[i("div",{staticClass:"grow"}),t._v(" "),t._t("_before__"+r,null,{data:{prop:e,name:r,i:n}}),t._v(" "),t._t(r,[i("div",{staticClass:"d-flex align-end"},[i("model-input",{ref:"inputs",refInFor:!0,attrs:{readonly:t.readonly||e.check_value&&e.check_value===t.getValue(r,""),type:e.type,"new-item":e.newItem,name:r,label:e.label,"force-multiple":e.forceMultiple,messages:e.messages,"file-extensions":e.fileExtensions,"custom-filters":e.inputFilters,rules:t.rules&&t.rules[r]||"","icon-end":t.iconEnd,icon:e.icon||((t.user.models[e.type]||{}).specs||{}).icon,value:t.getValue(r,""),dirty:r in t.value,"params-model":t.paramsModel,"params-id":t.paramsId,"params-attribute":e.paramsAttribute,resource:t.resource,"crop-ratios":e.cropRatios,"crop-src":t.getValue(e.cropSourceProp),"crop-source-prop":e.cropSourceProp,"slug-of-value":t.resource?"":t.getValue(e.slugSourceProp),"copy-from-html":e.copyFromHtml,"get-value":t.getValue,color:t.modelColor,"multiple-split-by":e.multipleSplitBy,"html-type":e.htmlType},on:{input:function(e){return t.emitInput(r,e)}}}),t._v(" "),e.check_value?i("div",{staticClass:"d-flex"},[i("span",{staticClass:"px-2"}),t._v(" "),i("v-checkbox",{attrs:{value:e.check_value===t.getValue(r,""),"input-value":e.check_value===t.getValue(r,""),label:e.check_value,color:t.modelColor,readonly:t.readonly},on:{change:function(i){return t.emitInput(r,i?e.check_value:"")}}})],1):t._e()],1)],{data:{prop:e,name:r,i:n}}),t._v(" "),t._t("_after__"+r,null,{data:{prop:e,name:r,i:n}})],2)])}),1)],1)}
1,[],!1,null,null,null).exports),N=i(42),O={mdiClose:a.M,components:{PageTitle:N.a},props:{properties:{type:Object,required:!0},value:{type:Object,required:!0},halfWidthInputs:{type:Boolean,required:!1,default:!1},columnClass:{type:String,required:!1,default:void 0}},data:()=>({htmlContent:"",htmlDialogActive:!1}),computed:{propsLength(){return this.$helpers.length(this.properties)},isOdd(){return!!(this.propsLength%2)}},methods:{getKeyValues(t){const e=t.type.split("::");if("select"===e[0])try{return JSON.parse(e[1])}catch(t){console.warn(t)}return{}},getColumnClass(t){return["xs12",!this.halfWidthInputs||this.isOdd&&t+1===this.propsLength?"md12":"md6 custom-distance"]},showDialogWithContent({content:t,type:e}){switch(e){case"image":this.htmlContent=`<div style="width: 100%; text-align: center;"><img src="${t}" style="max-width: 100%;"></div>`;break;case"editorView":this.htmlContent=`<div class="reta-editor-content"><div class="pa-3 content-wrapper">${t}</div></div>`;break;default:this.htmlContent=t}this.$popstate("htmlDialogActive",!0)}}},P=(i(102),Object(o.a)(O,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("v-layout",{staticClass:"model-props--view",attrs:{row:"",wrap:"","justify-between":"","py-2":""}},t._l(t.properties,function(e,r,n){return i("v-flex",{key:n,class:t.columnClass||t.getColumnClass(n)},[i("div",{staticClass:"h-100 w-100 d-flex flex-column"},[i("div",{staticClass:"grow"}),t._v(" "),i("div",[i("div",{staticClass:"d-flex px-3 pb-2 lh-2 overflow-hidden"},[i("span",{staticClass:"font-1 nowrap secondary--text text--darken-1"},[t._v("\n "+t._s(e.label||t.$trans(r))+"\n  \n ")]),t._v(" "),["image_sm","image","image_lg"].includes(e.type)&&t.value[r]?i("v-btn",{staticClass:"my-0 mx-1 h-auto ww-auto",attrs:{flat:"",color:"accent",small:""},on:{click:function(e){return t.showDialogWithContent({content:t.value[r],type:"image"})}}},[i("div",{staticClass:"font-2"},[t._v(t._s(t.$trans("view")))])]):"file"===e.type&&t.value[r]?i("v-btn",{staticClass:"my-0 mx-1 h-auto ww-auto",attrs:{flat:"",color:"accent",small:"",href:t.value[r],target:"_blank",download:""}},[i("div",{staticClass:"font-2"},[t._v("Download")])]):"html"===e.type&&t.value[r]?i("span",{staticClass:"d-inline-flex overflow-hidden mx-w-100 ellipsis"},["basic"===e.htmlType?i("span",{staticClass:"font-2 nowrap overflow-hidden mx-w-100 ellipsis",domProps:{innerHTML:t._s(t.value[r])}}):i("span",{staticClass:"font-2 nowrap overflow-hidden mx-w-100 ellipsis"},[t._v("\n "+t._s(t.$helpers.strip(t.value[r]))+"\n ")]),t._v(" "),i("v-btn",{staticClass:"ma-0 h-auto ww-auto",attrs:{flat:"",color:"accent",small:""},on:{click:function(e){return t.showDialogWithContent({content:t.value[r],type:"editorView"})}}},[i("div",{staticClass:"font-2"},[t._v(t._s(t.$trans("view")))])])],1):"email_html"===e.type&&t.value[r]?i("span",{staticClass:"d-inline-flex overflow-hidden mx-w-100 ellipsis"},[i("v-btn",{staticClass:"ma-0 h-auto ww-auto",attrs:{flat:"",color:"accent",small:""},on:{click:function(e){return t.$helpers.openWin({html:t.value[r],width:700})}}},[i("div",{staticClass:"font-2"},[t._v(t._s(t.$trans("view")))])]),t._v(" "),i("v-btn",{staticClass:"ma-0 h-auto ww-auto",attrs:{flat:"",color:"primary",small:"",disabled:t.$root.loading.testEmail},on:{click:function(e){return t.$root.sendTestEmail(t.value[r])}}},[i("div",{staticClass:"font-2"},[t._v("Test")])])],1):Array.isArray(t.value[r])&&t.value[r].length?i("span",{staticClass:"d-inline-flex overflow-hidden mx-w-100 ellipsis"},[i("span",{staticClass:"font-2 nowrap overflow-hidden mx-w-100 ellipsis"},[t._v("\n "+t._s(t.$helpers.strip(t.value[r].toString()))+"\n ")]),t._v(" "),i("v-btn",{staticClass:"ma-0 h-auto ww-auto",attrs:{flat:"",color:"accent",small:""},on:{click:function(e){t.showDialogWithContent({content:t.value[r].reduce(function(t,e){return t+" <span class=pa-2>"+e+"</span> "},""),type:"editorView"})}}},[i("div",{staticClass:"font-2"},[t._v(t._s(t.$trans("view")))])])],1):"color"===e.type?i("span",{staticClass:"d-inline-flex",
1staticStyle:{"align-items":"center"},attrs:{dir:"auto"}},[i("span",{staticClass:"font-2 px-1"},[t._v(t._s(t.value[r]))]),t._v(" "),t.value[r]?i("span",{staticClass:"border-light round pa-1",style:"background-color: "+t.value[r]}):t._e()]):t.value[r]&&!isNaN(t.value[r])&&(t.$store.getters["client/can"][e.type]||{}).index?i("v-btn",{staticClass:"\n my-0\n mx-1\n h-auto\n ww-auto\n overflow-hidden\n mx-w-100\n text-trans-none\n ",attrs:{to:"/"+e.type+"/"+t.value[r],flat:"",dir:"auto",color:"accent",small:""}},[i("div",{staticClass:"font-2 space-normal"},[t._v(t._s(t.value[r]))])]):t.value[r]&&"/"===t.value[r][0]&&t.value[r].length<200?i("v-btn",{staticClass:"\n my-0\n mx-1\n overflow-hidden\n h-auto\n ww-auto\n mx-w-100\n text-trans-none\n ",attrs:{href:t.value[r],target:"_blank",flat:"",dir:"auto",color:"accent",small:""}},[i("div",{staticClass:"font-2 space-normal"},[i("page-title",{attrs:{path:t.value[r]}})],1)]):i("span",{staticClass:"font-2 px-1 pre-line break-word mx-w-100",attrs:{dir:"auto"}},[t._v(t._s(t.$trans(t.getKeyValues(e)[t.value[r]]||t.value[r]||(0==t.value[r]?"0":""))))])],1)])])])}),1),t._v(" "),i("v-dialog",{attrs:{value:t.htmlDialogActive,"max-width":"960",transition:"slide-y-reverse-transition",scrollable:"",fullscreen:t.$root.smAndDown,width:"unset"},on:{input:function(e){return t.$popstate("htmlDialogActive",e)}}},[i("v-card",[i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{flat:"",icon:"",color:"secondary"},on:{click:function(e){return t.$popstate("htmlDialogActive",!1)}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1),t._v(" "),i("v-divider"),t._v(" "),i("v-card-text",{staticStyle:{height:"100%"}},[i("div",{domProps:{innerHTML:t._s(t.htmlContent)},on:{click:t.$root.htmlWithListeners}})])],1)],1)],1)},[],!1,null,null,null).exports),E=function(t){return ut(["text","password","search","email","tel","url","textarea","number"],t.type)},q=function(t){return ut(["radio","checkbox"],t.type)},F=function(t,e){return t.getAttribute("data-vv-"+e)},j=function(t){return"isNaN"in Number?Number.isNaN(t):t==t},z=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.every(function(t){return null==t})},V=function(t,e){if(t instanceof RegExp&&e instanceof RegExp)return V(t.source,e.source)&&V(t.flags,e.flags);if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!V(t[i],e[i]))return!1;return!0}return G(t)&&G(e)?Object.keys(t).every(function(i){return V(t[i],e[i])})&&Object.keys(e).every(function(i){return V(t[i],e[i])}):!(!j(t)||!j(e))||t===e},R=function(t){return z(t)?null:"FORM"===t.tagName?t:z(t.form)?z(t.parentNode)?null:R(t.parentNode):t.form},B=function(t,e,i){if(void 0===i&&(i=void 0),!t||!e)return i;var r=e;return t.split(".").every(function(t){return t in r?(r=r[t],!0):(r=i,!1)}),r},U=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i={cancelled:!1}),0===e?t:function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];var s=function(){r=null,i.cancelled||t.apply(void 0,n)};clearTimeout(r),(r=setTimeout(s,e))||t.apply(void 0,n)};var r},L=function(t,e){return e?t?("string"==typeof e&&(e=H(e)),tt({},e,H(t))):H(e):H(t)},H=function(t){return t?G(t)?Object.keys(t).reduce(function(e,i){var r=[];return r=!0===t[i]?[]:Array.isArray(t[i])?t[i]:G(t[i])?t[i]:[t[i]],!1!==t[i]&&(e[i]=r),e},{}):"string"!=typeof t?(W("rules must be either a string or an object."),{}):t.split("|").reduce(function(t,e){var i=function(t){var e=[],i=t.split(":")[0];return ut(t,":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:i,params:e}}(e);return i.name?(t[i.name]=i.params,t):t},{}):{}},W=function(t){console.warn("[vee-validate] "+t)},Y=function(t){return new Error("[vee-validate] "+t)},G=function(t){return null!==t&&t&&"object"==typeof t&&!Array.isArray(t)},X=function(t){return"function"==typeof t},Z=function(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}
1,K=function(t,e,i){if(t&&e){if(!Array.isArray(e))return i?function(t,e){t.classList?t.classList.add(e):Z(t,e)||(t.className+=" "+e)}(t,e):void function(t,e){if(t.classList)t.classList.remove(e);else if(Z(t,e)){var i=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(i," ")}}(t,e);e.forEach(function(e){return K(t,e,i)})}},Q=function(t){if(X(Array.from))return Array.from(t);for(var e=[],i=t.length,r=0;r<i;r++)e.push(t[r]);return e},J=function(t){if(Array.isArray(t))return[].concat(t);var e=Q(t);return dt(e)?[t]:e},tt=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(X(Object.assign))return Object.assign.apply(Object,[t].concat(e));if(null==t)throw new TypeError("Cannot convert undefined or null to object");var r=Object(t);return e.forEach(function(t){null!=t&&Object.keys(t).forEach(function(e){r[e]=t[e]})}),r},et=0,it="{id}",rt=function(t,e){for(var i=Array.isArray(t)?t:Q(t),r=0;r<i.length;r++)if(e(i[r]))return r;return-1},nt=function(t,e){var i=Array.isArray(t)?t:Q(t),r=rt(i,e);return-1===r?void 0:i[r]},at=function(t){if(!t)return!1;var e=t.componentOptions.tag;return/^(keep-alive|transition|transition-group)$/.test(e)},st=function(t){if("number"==typeof t)return t;if("string"==typeof t)return parseInt(t);var e={};for(var i in t)e[i]=parseInt(t[i]);return e},ot=function(t,e){return G(t)&&G(e)?(Object.keys(e).forEach(function(i){var r,n;if(G(e[i]))return t[i]||tt(t,((r={})[i]={},r)),void ot(t[i],e[i]);tt(t,((n={})[i]=e[i],n))}),t):t},lt=function(t,e){if(t.required&&(e=L("required",e)),E(t))return"email"===t.type&&(e=L("email"+(t.multiple?":multiple":""),e)),t.pattern&&(e=L({regex:t.pattern},e)),t.maxLength>=0&&t.maxLength<524288&&(e=L("max:"+t.maxLength,e)),t.minLength>0&&(e=L("min:"+t.minLength,e)),"number"===t.type&&(e=L("decimal",e),""!==t.min&&(e=L("min_value:"+t.min,e)),""!==t.max&&(e=L("max_value:"+t.max,e))),e;if(function(t){return ut(["date","week","month","datetime-local","time"],t.type)}(t)){var i=t.step&&Number(t.step)<60?"HH:mm:ss":"HH:mm";if("date"===t.type)return L("date_format:yyyy-MM-dd",e);if("datetime-local"===t.type)return L("date_format:yyyy-MM-ddT"+i,e);if("month"===t.type)return L("date_format:yyyy-MM",e);if("week"===t.type)return L("date_format:yyyy-[W]WW",e);if("time"===t.type)return L("date_format:"+i,e)}return e},ct=function(t){return X(Object.values)?Object.values(t):Object.keys(t).map(function(e){return t[e]})},ut=function(t,e){return-1!==t.indexOf(e)},dt=function(t){return Array.isArray(t)&&0===t.length},ht=function(t,e,i){Object.defineProperty(t,e,{configurable:!1,writable:!0,value:i})},pt="en",ft=function(t){void 0===t&&(t={}),this.container={}
1,this.merge(t)},vt={locale:{configurable:!0}};vt.locale.get=function(){return pt},vt.locale.set=function(t){pt=t||"en"},ft.prototype.hasLocale=function(t){return!!this.container[t]},ft.prototype.setDateFormat=function(t,e){this.container[t]||(this.container[t]={}),this.container[t].dateFormat=e},ft.prototype.getDateFormat=function(t){return this.container[t]&&this.container[t].dateFormat?this.container[t].dateFormat:null},ft.prototype.getMessage=function(t,e,i){var r=null;return r=this.hasMessage(t,e)?this.container[t].messages[e]:this._getDefaultMessage(t),X(r)?r.apply(void 0,i):r},ft.prototype.getFieldMessage=function(t,e,i,r){if(!this.hasLocale(t))return this.getMessage(t,i,r);var n=this.container[t].custom&&this.container[t].custom[e];if(!n||!n[i])return this.getMessage(t,i,r);var a=n[i];return X(a)?a.apply(void 0,r):a},ft.prototype._getDefaultMessage=function(t){return this.hasMessage(t,"_default")?this.container[t].messages._default:this.container.en.messages._default},ft.prototype.getAttribute=function(t,e,i){return void 0===i&&(i=""),this.hasAttribute(t,e)?this.container[t].attributes[e]:i},ft.prototype.hasMessage=function(t,e){return!!(this.hasLocale(t)&&this.container[t].messages&&this.container[t].messages[e])},ft.prototype.hasAttribute=function(t,e){return!!(this.hasLocale(t)&&this.container[t].attributes&&this.container[t].attributes[e])},ft.prototype.merge=function(t){ot(this.container,t)},ft.prototype.setMessage=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].messages[e]=i},ft.prototype.setAttribute=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].attributes[e]=i},Object.defineProperties(ft.prototype,vt);var mt={default:new ft({en:{messages:{},attributes:{},custom:{}}})},gt="default",yt=function(){};yt._checkDriverName=function(t){if(!t)throw Y("you must provide a name to the dictionary driver")},yt.setDriver=function(t,e){void 0===e&&(e=null),this._checkDriverName(t),e&&(mt[t]=e),gt=t},yt.getDriver=function(){return mt[gt]};var wt=function t(e,i){void 0===e&&(e=null),void 0===i&&(i=null),this.vmId=i||null,this.items=e&&e instanceof t?e.items:[]};wt.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var t=this,e=0;return{next:function(){return{value:t.items[e++],done:e>t.items.length}}}},wt.prototype.add=function(t){var e;(e=this.items).push.apply(e,this._normalizeError(t))},wt.prototype._normalizeError=function(t){var e=this;return Array.isArray(t)?t.map(function(t){return t.scope=z(t.scope)?null:t.scope,t.vmId=z(t.vmId)?e.vmId||null:t.vmId,t}):(t.scope=z(t.scope)?null:t.scope,t.vmId=z(t.vmId)?this.vmId||null:t.vmId,[t])},wt.prototype.regenerate=function(){this.items.forEach(function(t){t.msg=X(t.regenerate)?t.regenerate():t.msg})},wt.prototype.update=function(t,e){var i=nt(this.items,function(e){return e.id===t});if(i){var r=this.items.indexOf(i);this.items.splice(r,1),i.scope=e.scope,this.items.push(i)}},wt.prototype.all=function(t){var e=this;return this.items.filter(function(i){var r=!0,n=!0;return z(t)||(r=i.scope===t),z(e.vmId)||(n=i.vmId===e.vmId),n&&r}).map(function(t){return t.msg})},wt.prototype.any=function(t){var e=this;return!!this.items.filter(function(i){var r=!0,n=!0;return z(t)||(r=i.scope===t),z(e.vmId)||(n=i.vmId===e.vmId),n&&r}).length},wt.prototype.clear=function(t){var e=this,i=z(this.vmId)?function(){return!0}:function(t){return t.vmId===e.vmId};z(t)&&(t=null);for(var r=0;r<this.items.length;++r)i(this.items[r])&&this.items[r].scope===t&&(this.items.splice(r,1),--r)},wt.prototype.collect=function(t,e,i){var r=this;void 0===i&&(i=!0);var n=!z(t)&&!t.includes("*"),a=function(t){var e=t.reduce(function(t,e){return z(r.vmId)||e.vmId===r.vmId?(t[e.field]||(t[e.field]=[]),t[e.field].push(i?e.msg:e),t):t},{});return n?ct(e)[0]||[]:e};if(z(t))return a(this.items);var s=z(e)?String(t):e+"."+t,o=this._makeCandidateFilters(s),l=o.isPrimary,c=o.isAlt,u=this.items.reduce(function(t,e){return l(e)&&t.primary.push(e),c(e)&&t.alt.push(e),t},{primary:[],alt:[]});return a(u=u.primary.length?u.primary:u.alt)},wt.prototype.count=function(){var t=this;return this.vmId?this.items.filter(function(e){return e.vmId===t.vmId}).length:this.items.length},wt.prototype.firstById=function(t){var e=nt(this.items,function(e){return e.id===t});return e?e.msg:void 0},wt.prototype.first=function(t,e){void 0===e&&(e=null);var i=z(e)?t:e+"."+t,r=this._match(i);return r&&r.msg},wt.prototype.firstRule=function(t,e){var i=this.collect(t,e,!1);return i.length&&i[0].rule||void 0},wt.prototype.has=function(t,e){return void 0===e&&(e=null),!!this.first(t,e)}
1,wt.prototype.firstByRule=function(t,e,i){void 0===i&&(i=null);var r=this.collect(t,i,!1).filter(function(t){return t.rule===e})[0];return r&&r.msg||void 0},wt.prototype.firstNot=function(t,e,i){void 0===e&&(e="required"),void 0===i&&(i=null);var r=this.collect(t,i,!1).filter(function(t){return t.rule!==e})[0];return r&&r.msg||void 0},wt.prototype.removeById=function(t){var e=function(e){return e.id===t};Array.isArray(t)&&(e=function(e){return-1!==t.indexOf(e.id)});for(var i=0;i<this.items.length;++i)e(this.items[i])&&(this.items.splice(i,1),--i)},wt.prototype.remove=function(t,e,i){if(!z(t))for(var r,n=z(e)?String(t):e+"."+t,a=this._makeCandidateFilters(n),s=a.isPrimary,o=a.isAlt,l=function(t){return s(t)||o(t)},c=0;c<this.items.length;++c)r=this.items[c],(z(i)?l(r):l(r)&&r.vmId===i)&&(this.items.splice(c,1),--c)},wt.prototype._makeCandidateFilters=function(t){var e=this,i=function(){return!0},r=function(){return!0},n=function(){return!0},a=function(){return!0},s=function(t){var e=null;if(ut(t,":")&&(e=t.split(":").pop(),t=t.replace(":"+e,"")),"#"===t[0])return{id:t.slice(1),rule:e,name:null,scope:null};var i=null,r=t;if(ut(t,".")){var n=t.split(".");i=n[0],r=n.slice(1).join(".")}return{id:null,scope:i,name:r,rule:e}}(t),o=s.id,l=s.rule,c=s.scope,u=s.name;if(l&&(i=function(t){return t.rule===l}),o)return{isPrimary:function(t){return i(t)&&function(t){return o===t.id}},isAlt:function(){return!1}};r=z(c)?function(t){return z(t.scope)}:function(t){return t.scope===c},z(u)||"*"===u||(n=function(t){return t.field===u}),z(this.vmId)||(a=function(t){return t.vmId===e.vmId});return{isPrimary:function(t){return a(t)&&n(t)&&i(t)&&r(t)},isAlt:function(t){return a(t)&&i(t)&&t.field===c+"."+u}}},wt.prototype._match=function(t){if(!z(t)){var e=this._makeCandidateFilters(t),i=e.isPrimary,r=e.isAlt;return this.items.reduce(function(t,e,n,a){var s=n===a.length-1;return t.primary?s?t.primary:t:(i(e)&&(t.primary=e),r(e)&&(t.alt=e),s?t.primary||t.alt:t)},{})}};var bt=tt({},{locale:"en",delay:0,errorBagName:"errors",dictionary:null,fieldsBagName:"fields",classes:!1,classNames:null,events:"input",inject:!0,fastExit:!0,aria:!0,validity:!1,mode:"aggressive",useConstraintAttrs:!0,i18n:null,i18nRootKey:"validation"}),_t=function(t){var e=B("$options.$_veeValidate",t,{});return tt({},bt,e)},xt=function(){return bt},$t=function(t){bt=tt({},bt,t)};function Ct(t){return t.data?t.data.model?t.data.model:!!t.data.directives&&nt(t.data.directives,function(t){return"model"===t.name}):null}function kt(t){return Ct(t)?[t]:function(t){return Array.isArray(t)?t:Array.isArray(t.children)?t.children:t.componentOptions&&Array.isArray(t.componentOptions.children)?t.componentOptions.children:[]}(t).reduce(function(t,e){var i=kt(e);return i.length&&t.push.apply(t,i),t},[])}function Dt(t){return t.componentOptions?t.componentOptions.Ctor.options.model:null}function At(t,e,i){if(X(t[e])){var r=t[e];t[e]=[r]}Array.isArray(t[e])?t[e].push(i):z(t[e])&&(t[e]=[i])}function Tt(t,e,i){t.componentOptions&&function(t,e,i){t.componentOptions.listeners||(t.componentOptions.listeners={}),At(t.componentOptions.listeners,e,i)}(t,e,i),function(t,e,i){z(t.data.on)&&(t.data.on={}),At(t.data.on,e,i)}(t,e,i)}function St(t,e){return t.componentOptions?(Dt(t)||{event:"input"}).event:e&&e.modifiers&&e.modifiers.lazy||"select"===t.tag?"change":t.data.attrs&&E({type:t.data.attrs.type||"text"})?"input":"change"}var Mt=function(){};Mt.generate=function(t,e,i){var r=Mt.resolveModel(e,i),n=_t(i.context);return{name:Mt.resolveName(t,i),el:t,listen:!e.modifiers.disable,bails:!!e.modifiers.bails||!0!==e.modifiers.continues&&void 0,scope:Mt.resolveScope(t,e,i),vm:i.context,expression:e.value,component:i.componentInstance,classes:n.classes,classNames:n.classNames,getter:Mt.resolveGetter(t,i,r),events:Mt.resolveEvents(t,i)||n.events,model:r,delay:Mt.resolveDelay(t,i,n),rules:Mt.resolveRules(t,e,i),immediate:!!e.modifiers.initial||!!e.modifiers.immediate,persist:!!e.modifiers.persist,validity:n.validity&&!i.componentInstance,aria:n.aria&&!i.componentInstance,initialValue:Mt.resolveInitialValue(i)}},Mt.getCtorConfig=function(t){return t.componentInstance?B("componentInstance.$options.$_veeValidate",t):null}
1,Mt.resolveRules=function(t,e,i){var r="";if(e.value||e&&e.expression||(r=F(t,"rules")),e.value&&ut(["string","object"],typeof e.value.rules)?r=e.value.rules:e.value&&(r=e.value),i.componentInstance)return r;var n=H(r);return xt().useConstraintAttrs?tt({},lt(t,{}),n):n},Mt.resolveInitialValue=function(t){var e=t.data.model||nt(t.data.directives,function(t){return"model"===t.name});return e&&e.value},Mt.resolveDelay=function(t,e,i){var r=F(t,"delay"),n=i&&"delay"in i?i.delay:0;return!r&&e.componentInstance&&e.componentInstance.$attrs&&(r=e.componentInstance.$attrs["data-vv-delay"]),G(n)?(z(r)||(n.input=r),st(n)):st(r||n)},Mt.resolveEvents=function(t,e){var i=F(t,"validate-on");if(!i&&e.componentInstance&&e.componentInstance.$attrs&&(i=e.componentInstance.$attrs["data-vv-validate-on"]),!i&&e.componentInstance){var r=Mt.getCtorConfig(e);i=r&&r.events}if(!i&&xt().events&&(i=xt().events),i&&e.componentInstance&&ut(i,"input")){var n=(e.componentInstance.$options.model||{event:"input"}).event;if(!n)return i;i=i.replace("input",n)}return i},Mt.resolveScope=function(t,e,i){void 0===i&&(i={});var r=null;return i.componentInstance&&z(r)&&(r=i.componentInstance.$attrs&&i.componentInstance.$attrs["data-vv-scope"]),z(r)?function(t){var e=F(t,"scope");if(z(e)){var i=R(t);i&&(e=F(i,"scope"))}return z(e)?null:e}(t):r},Mt.resolveModel=function(t,e){if(t.arg)return{expression:t.arg};var i=Ct(e);if(!i)return null;var r=!/[^\w.$]/.test(i.expression)&&function(t,e){var i=e,r=null;return t.split(".").reduce(function(t,e){return null==i||"object"!=typeof i?t&&!1:e in i?(i=i[e],r=null===r?e:r+"."+e,t&&!0):t&&!1},!0)}(i.expression,e.context),n=!(!i.modifiers||!i.modifiers.lazy);return r?{expression:i.expression,lazy:n}:{expression:null,lazy:n}},Mt.resolveName=function(t,e){var i=F(t,"name");if(!i&&!e.componentInstance)return t.name;if(!i&&e.componentInstance&&e.componentInstance.$attrs&&(i=e.componentInstance.$attrs["data-vv-name"]||e.componentInstance.$attrs.name),!i&&e.componentInstance){var r=Mt.getCtorConfig(e);return r&&X(r.name)?r.name.bind(e.componentInstance)():e.componentInstance.name}return i},Mt.resolveGetter=function(t,e,i){if(i&&i.expression)return function(){return B(i.expression,e.context)};if(e.componentInstance){var r=F(t,"value-path")||e.componentInstance.$attrs&&e.componentInstance.$attrs["data-vv-value-path"];if(r)return function(){return B(r,e.componentInstance)};var n=Mt.getCtorConfig(e);if(n&&X(n.value)){var a=n.value.bind(e.componentInstance);return function(){return a()}}var s=(e.componentInstance.$options.model||{prop:"value"}).prop;return function(){return e.componentInstance[s]}}switch(t.type){case"checkbox":return function(){var e=document.querySelectorAll('input[name="'+t.name+'"]');if((e=Q(e).filter(function(t){return t.checked})).length)return e.map(function(t){return t.value})};case"radio":return function(){var e=document.querySelectorAll('input[name="'+t.name+'"]'),i=nt(e,function(t){return t.checked});return i&&i.value};case"file":return function(e){return Q(t.files)};case"select-multiple":return function(){return Q(t.options).filter(function(t){return t.selected}).map(function(t){return t.value})};default:return function(){return t&&t.value}}};var It={},Nt=function(){},Ot={rules:{configurable:!0}};Nt.add=function(t,e){var i=e.validate,r=e.options,n=e.paramNames;It[t]={validate:i,options:r,paramNames:n}},Ot.rules.get=function(){return It},Nt.has=function(t){return!!It[t]},Nt.isImmediate=function(t){return!(!It[t]||!It[t].options.immediate)},Nt.isRequireRule=function(t){return!(!It[t]||!It[t].options.computesRequired)},Nt.isTargetRule=function(t){return!(!It[t]||!It[t].options.hasTarget)},Nt.remove=function(t){delete It[t]},Nt.getParamNames=function(t){return It[t]&&It[t].paramNames},Nt.getOptions=function(t){return It[t]&&It[t].options},Nt.getValidatorMethod=function(t){return It[t]?It[t].validate:null},Object.defineProperties(Nt,Ot);var Pt=function(t){return"undefined"!=typeof Event&&X(Event)&&t instanceof Event||t&&t.srcElement},Et=function(t){return t?"string"==typeof t?t.split("|"):t:[]}
1,qt=!0,Ft=function(t,e,i){t.addEventListener(e,i,!!qt&&{passive:!0})},jt={targetOf:null,immediate:!1,persist:!1,scope:null,listen:!0,name:null,rules:{},vm:null,classes:!1,validity:!0,aria:!0,events:"input|blur",delay:0,classNames:{touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"}},zt=function(t){void 0===t&&(t={}),this.id=(et>=9999&&(et=0,it=it.replace("{id}","_{id}")),et++,it.replace("{id}",String(et))),this.el=t.el,this.updated=!1,this.vmId=t.vmId,ht(this,"dependencies",[]),ht(this,"watchers",[]),ht(this,"events",[]),this.delay=0,this.rules={},this.forceRequired=!1,this._cacheId(t),this.classNames=tt({},jt.classNames),t=tt({},jt,t),this._delay=z(t.delay)?0:t.delay,this.validity=t.validity,this.aria=t.aria,this.flags=t.flags||{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},ht(this,"vm",t.vm),ht(this,"componentInstance",t.component),this.ctorConfig=this.componentInstance?B("$options.$_veeValidate",this.componentInstance):void 0,this.update(t),this.initialValue=this.value,this.updated=!1},Vt={validator:{configurable:!0},isRequired:{configurable:!0},isDisabled:{configurable:!0},alias:{configurable:!0},value:{configurable:!0},bails:{configurable:!0},rejectsFalse:{configurable:!0}};Vt.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:{validate:function(){}}},Vt.isRequired.get=function(){return!!this.rules.required||this.forceRequired},Vt.isDisabled.get=function(){return!(!this.componentInstance||!this.componentInstance.disabled)||!(!this.el||!this.el.disabled)},Vt.alias.get=function(){if(this._alias)return this._alias;var t=null;return this.ctorConfig&&this.ctorConfig.alias&&(t=X(this.ctorConfig.alias)?this.ctorConfig.alias.call(this.componentInstance):this.ctorConfig.alias),!t&&this.el&&(t=F(this.el,"as")),!t&&this.componentInstance?this.componentInstance.$attrs&&this.componentInstance.$attrs["data-vv-as"]:t},Vt.value.get=function(){if(X(this.getter))return this.getter()},Vt.bails.get=function(){return this._bails},Vt.rejectsFalse.get=function(){return this.componentInstance&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},zt.prototype.matches=function(t){var e=this;return!t||(t.id?this.id===t.id:!!(z(t.vmId)?function(){return!0}:function(t){return t===e.vmId})(t.vmId)&&(void 0===t.name&&void 0===t.scope||(void 0===t.scope?this.name===t.name:void 0===t.name?this.scope===t.scope:t.name===this.name&&t.scope===this.scope)))},zt.prototype._cacheId=function(t){this.el&&!t.targetOf&&(this.el._veeValidateId=this.id)},zt.prototype.waitFor=function(t){this._waitingFor=t},zt.prototype.isWaitingFor=function(t){return this._waitingFor===t},zt.prototype.update=function(t){var e,i,r;this.targetOf=t.targetOf||null,this.immediate=t.immediate||this.immediate||!1,this.persist=t.persist||this.persist||!1,!z(t.scope)&&t.scope!==this.scope&&X(this.validator.update)&&this.validator.update(this.id,{scope:t.scope}),this.scope=z(t.scope)?z(this.scope)?null:this.scope:t.scope,this.name=(z(t.name)?t.name:String(t.name))||this.name||null,this.rules=void 0!==t.rules?H(t.rules):this.rules,this._bails=void 0!==t.bails?t.bails:this._bails,this.model=t.model||this.model,this.listen=void 0!==t.listen?t.listen:this.listen,this.classes=!(!t.classes&&!this.classes)&&!this.componentInstance,this.classNames=G(t.classNames)?ot(this.classNames,t.classNames):this.classNames,this.getter=X(t.getter)?t.getter:this.getter,this._alias=t.alias||this._alias,this.events=t.events?Et(t.events):this.events,this.delay=(e=this.events,i=t.delay||this.delay,r=this._delay,"number"==typeof i?e.reduce(function(t,e){return t[e]=i,t},{}):e.reduce(function(t,e){return"object"==typeof i&&e in i?(t[e]=i[e],t):"number"==typeof r?(t[e]=r,t):(t[e]=r&&r[e]||0,t)},{})),this.updateDependencies(),this.addActionListeners(),void 0!==t.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==t.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.addValueListeners(),this.el&&(this.updateClasses(),this.updateAriaAttrs())},zt.prototype.reset=function(){var t=this;this._cancellationToken&&(this._cancellationToken.cancelled=!0,delete this._cancellationToken);var e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invali
1d:null,validated:!1,pending:!1,required:!1,changed:!1};Object.keys(this.flags).filter(function(t){return"required"!==t}).forEach(function(i){t.flags[i]=e[i]}),this.initialValue=this.value,this.flags.changed=!1,this.addValueListeners(),this.addActionListeners(),this.updateClasses(!0),this.updateAriaAttrs(),this.updateCustomValidity()},zt.prototype.setFlags=function(t){var e=this,i={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach(function(r){e.flags[r]=t[r],i[r]&&void 0===t[i[r]]&&(e.flags[i[r]]=!t[r])}),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},zt.prototype.updateDependencies=function(){var t=this;this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[];var e=Object.keys(this.rules).reduce(function(e,i){return Nt.isTargetRule(i)&&e.push({selector:t.rules[i][0],name:i}),e},[]);e.length&&this.vm&&this.vm.$el&&e.forEach(function(e){var i=e.selector,r=e.name,n=t.vm.$refs[i],a=Array.isArray(n)?n[0]:n;if(a){var s={vm:t.vm,classes:t.classes,classNames:t.classNames,delay:t.delay,scope:t.scope,events:t.events.join("|"),immediate:t.immediate,targetOf:t.id};X(a.$watch)?(s.component=a,s.el=a.$el,s.getter=Mt.resolveGetter(a.$el,a.$vnode)):(s.el=a,s.getter=Mt.resolveGetter(a,{})),t.dependencies.push({name:r,field:new zt(s)})}})},zt.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach(function(t){return t.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(e){return t.test(e.tag)}).forEach(function(t){return t.unwatch()}),this.watchers=this.watchers.filter(function(e){return!t.test(e.tag)})},zt.prototype.updateClasses=function(t){var e=this;if(void 0===t&&(t=!1),this.classes&&!this.isDisabled){var i=function(i){K(i,e.classNames.dirty,e.flags.dirty),K(i,e.classNames.pristine,e.flags.pristine),K(i,e.classNames.touched,e.flags.touched),K(i,e.classNames.untouched,e.flags.untouched),t&&(K(i,e.classNames.valid,!1),K(i,e.classNames.invalid,!1)),!z(e.flags.valid)&&e.flags.validated&&K(i,e.classNames.valid,e.flags.valid),!z(e.flags.invalid)&&e.flags.validated&&K(i,e.classNames.invalid,e.flags.invalid)};if(q(this.el)){var r=document.querySelectorAll('input[name="'+this.el.name+'"]');Q(r).forEach(i)}else i(this.el)}},zt.prototype.addActionListeners=function(){var t=this;if(this.unwatch(/class/),this.el){var e=function(){t.flags.touched=!0,t.flags.untouched=!1,t.classes&&(K(t.el,t.classNames.touched,!0),K(t.el,t.classNames.untouched,!1)),t.unwatch(/^class_blur$/)},i=E(this.el)?"input":"change",r=function(){t.flags.dirty=!0,t.flags.pristine=!1,t.classes&&(K(t.el,t.classNames.pristine,!1),K(t.el,t.classNames.dirty,!0)),t.unwatch(/^class_input$/)};if(this.componentInstance&&X(this.componentInstance.$once))return this.componentInstance.$once("input",r),this.componentInstance.$once("blur",e),this.watchers.push({tag:"class_input",unwatch:function(){t.componentInstance.$off("input",r)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){t.componentInstance.$off("blur",e)}});if(this.el){Ft(this.el,i,r);var n=q(this.el)?"change":"blur";Ft(this.el,n,e),this.watchers.push({tag:"class_input",unwatch:function(){t.el.removeEventListener(i,r)}}),this.watchers.push({tag:"class_blur",unwatch:function(){t.el.removeEventListener(n,e)}})}}},zt.prototype.checkValueChanged=function(){return(null!==this.initialValue||""!==this.value||!E(this.el))&&this.value!==this.initialValue},zt.prototype._determineInputEvent=function(){return this.componentInstance?this.componentInstance.$options.model&&this.componentInstance.$options.model.event||"input":this.model&&this.model.lazy?"change":E(this.el)?"input":"change"},zt.prototype._determineEventList=function(t){var e=this;return!this.events.length||this.componentInstance||E(this.el)?[].concat(this.events).map(function(t){return"input"===t&&e.model&&e.model.lazy?"change":t}):this.events.map(function(e){return"input"===e?t:e})},zt.prototype.addValueListeners=function(){var t=this;if(this.unwatch(/^input_.+/),this.listen&&this.el){var e={cancelled:!1},i=this.targetOf?function(){var e=t.validator._resolveField("#"+t.targetOf);
1e&&e.flags.validated&&t.validator.validate("#"+t.targetOf)}:function(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];(0===i.length||Pt(i[0]))&&(i[0]=t.value),t.flags.pending=!0,t._cancellationToken=e,t.validator.validate("#"+t.id,i[0])},r=this._determineInputEvent(),n=this._determineEventList(r);if(this.model&&ut(n,r)){var a=null,s=this.model.expression;if(this.model.expression&&(a=this.vm,s=this.model.expression),!s&&this.componentInstance&&this.componentInstance.$options.model&&(a=this.componentInstance,s=this.componentInstance.$options.model.prop||"value"),a&&s){var o=U(i,this.delay[r],e),l=a.$watch(s,o);this.watchers.push({tag:"input_model",unwatch:function(){t.vm.$nextTick(function(){l()})}}),n=n.filter(function(t){return t!==r})}}n.forEach(function(r){var n=U(i,t.delay[r],e);t._addComponentEventListener(r,n),t._addHTMLEventListener(r,n)})}},zt.prototype._addComponentEventListener=function(t,e){var i=this;this.componentInstance&&(this.componentInstance.$on(t,e),this.watchers.push({tag:"input_vue",unwatch:function(){i.componentInstance.$off(t,e)}}))},zt.prototype._addHTMLEventListener=function(t,e){var i=this;if(this.el&&!this.componentInstance){var r=function(r){Ft(r,t,e),i.watchers.push({tag:"input_native",unwatch:function(){r.removeEventListener(t,e)}})};if(r(this.el),q(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');Q(n).forEach(function(t){t._veeValidateId&&t!==i.el||r(t)})}}},zt.prototype.updateAriaAttrs=function(){var t=this;if(this.aria&&this.el&&X(this.el.setAttribute)){var e=function(e){e.setAttribute("aria-required",t.isRequired?"true":"false"),e.setAttribute("aria-invalid",t.flags.invalid?"true":"false")};if(q(this.el)){var i=document.querySelectorAll('input[name="'+this.el.name+'"]');
1Q(i).forEach(e)}else e(this.el)}},zt.prototype.updateCustomValidity=function(){this.validity&&this.el&&X(this.el.setCustomValidity)&&this.validator.errors&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},zt.prototype.destroy=function(){this._cancellationToken&&(this._cancellationToken.cancelled=!0),this.unwatch(),this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[]},Object.defineProperties(zt.prototype,Vt);var Rt=function(t){void 0===t&&(t=[]),this.items=t||[],this.itemsById=this.items.reduce(function(t,e){return t[e.id]=e,t},{})},Bt={length:{configurable:!0}};Rt.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var t=this,e=0;return{next:function(){return{value:t.items[e++],done:e>t.items.length}}}},Bt.length.get=function(){return this.items.length},Rt.prototype.find=function(t){return nt(this.items,function(e){return e.matches(t)})},Rt.prototype.findById=function(t){return this.itemsById[t]||null},Rt.prototype.filter=function(t){return Array.isArray(t)?this.items.filter(function(e){return t.some(function(t){return e.matches(t)})}):this.items.filter(function(e){return e.matches(t)})},Rt.prototype.map=function(t){return this.items.map(t)},Rt.prototype.remove=function(t){var e=null;if(!(e=t instanceof zt?t:this.find(t)))return null;var i=this.items.indexOf(e);return this.items.splice(i,1),delete this.itemsById[e.id],e},Rt.prototype.push=function(t){if(!(t instanceof zt))throw Y("FieldBag only accepts instances of Field that has an id defined.");if(!t.id)throw Y("Field id must be defined.");if(this.findById(t.id))throw Y("Field with id "+t.id+" is already added.");this.items.push(t),this.itemsById[t.id]=t},Object.defineProperties(Rt.prototype,Bt);var Ut=function(t,e){this.id=e._uid,this._base=t,this._paused=!1,this.errors=new wt(t.errors,this.id)},Lt={flags:{configurable:!0},rules:{configurable:!0},fields:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};Lt.flags.get=function(){var t=this;return this._base.fields.items.filter(function(e){return e.vmId===t.id}).reduce(function(t,e){return e.scope&&(t["$"+e.scope]||(t["$"+e.scope]={}),t["$"+e.scope][e.name]=e.flags),t[e.name]=e.flags,t},{})},Lt.rules.get=function(){return this._base.rules},Lt.fields.get=function(){return new Rt(this._base.fields.filter({vmId:this.id}))},Lt.dictionary.get=function(){return this._base.dictionary},Lt.locale.get=function(){return this._base.locale},Lt.locale.set=function(t){this._base.locale=t},Ut.prototype.localize=function(){for(var t,e=[],i=arguments.length;i--;)e[i]=arguments[i];return(t=this._base).localize.apply(t,e)},Ut.prototype.update=function(){for(var t,e=[],i=arguments.length;i--;)e[i]=arguments[i];return(t=this._base).update.apply(t,e)},Ut.prototype.attach=function(t){var e=tt({},t,{vmId:this.id});return this._base.attach(e)},Ut.prototype.pause=function(){this._paused=!0},Ut.prototype.resume=function(){this._paused=!1},Ut.prototype.remove=function(t){return this._base.remove(t)},Ut.prototype.detach=function(t,e){return this._base.detach(t,e,this.id)},Ut.prototype.extend=function(){for(var t,e=[],i=arguments.length;i--;)e[i]=arguments[i];return(t=this._base).extend.apply(t,e)},Ut.prototype.validate=function(t,e,i){return void 0===i&&(i={}),this._paused?Promise.resolve(!0):this._base.validate(t,e,tt({},{vmId:this.id},i||{}))},Ut.prototype.verify=function(){for(var t,e=[],i=arguments.length;i--;)e[i]=arguments[i];return(t=this._base).verify.apply(t,e)},Ut.prototype.validateAll=function(t,e){return void 0===e&&(e={}),this._paused?Promise.resolve(!0):this._base.validateAll(t,tt({},{vmId:this.id},e||{}))},Ut.prototype.validateScopes=function(t){return void 0===t&&(t={}),this._paused?Promise.resolve(!0):this._base.validateScopes(tt({},{vmId:this.id},t||{}))},Ut.prototype.destroy=function(){delete this.id,delete this._base},Ut.prototype.reset=function(t){return this._base.reset(Object.assign({},t||{},{vmId:this.id}))},Ut.prototype.flag=function(){for(var t,e=[],i=arguments.length;i--;)e[i]=arguments[i];return(t=this._base).flag.apply(t,e.concat([this.id]))},Ut.prototype._resolveField=function(){for(var t,e=[],i=arguments.length;i--;)e[i]=arguments[i];return(t=this._base)._resolveField.apply(t,e)},Object.defineProperties(Ut.prototype,Lt);var Ht=null,Wt=function(){return Ht}
1,Yt={provide:function(){return this.$validator&&!at(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!at(this.$vnode)&&!1!==this.$options.$__veeInject){this.$parent||$t(this.$options.$_veeValidate||{});var t=_t(this);(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=new Ut(Wt(),this));var e,i=(e=this.$options.inject,!(!G(e)||!e.$validator));if(this.$validator||!t.inject||i||(this.$validator=new Ut(Wt(),this)),i||this.$validator){if(!i&&this.$validator)this.$options._base.util.defineReactive(this.$validator,"errors",this.$validator.errors);this.$options.computed||(this.$options.computed={}),this.$options.computed[t.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[t.fieldsBagName||"fields"]=function(){return this.$validator.fields.items.reduce(function(t,e){return e.scope?(t["$"+e.scope]||(t["$"+e.scope]={}),t["$"+e.scope][e.name]=e.flags,t):(t[e.name]=e.flags,t)},{})}}}},beforeDestroy:function(){this.$validator&&this._uid===this.$validator.id&&this.$validator.errors.clear()}};function Gt(t,e){return e&&e.$validator?e.$validator.fields.findById(t._veeValidateId):null}var Xt={bind:function(t,e,i){var r=i.context.$validator;if(r){var n=Mt.generate(t,e,i);r.attach(n)}},inserted:function(t,e,i){var r=Gt(t,i.context),n=Mt.resolveScope(t,e,i);r&&n!==r.scope&&(r.update({scope:n}),r.updated=!1)},update:function(t,e,i){var r=Gt(t,i.context);if(!(!r||r.updated&&V(e.value,e.oldValue))){var n=Mt.resolveScope(t,e,i),a=Mt.resolveRules(t,e,i);r.update({scope:n,rules:a})}},unbind:function(t,e,i){var r=i.context,n=Gt(t,r);n&&r.$validator.detach(n)}},Zt=function(t,e,i){void 0===e&&(e={fastExit:!0}),void 0===i&&(i=null),this.errors=new wt,this.fields=new Rt,this._createFields(t),this.paused=!1,this.fastExit=!!z(e&&e.fastExit)||e.fastExit,this.$vee=i||{_vm:{$nextTick:function(t){return X(t)?t():Promise.resolve()},$emit:function(){},$off:function(){}}}},Kt={rules:{configurable:!0},dictionary:{configurable:!0},flags:{configurable:!0},locale:{configurable:!0}},Qt={rules:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};Qt.rules.get=function(){return Nt.rules},Kt.rules.get=function(){return Nt.rules},Kt.dictionary.get=function(){return yt.getDriver()},Qt.dictionary.get=function(){return yt.getDriver()},Kt.flags.get=function(){return this.fields.items.reduce(function(t,e){var i;return e.scope?(t["$"+e.scope]=((i={})[e.name]=e.flags,i),t):(t[e.name]=e.flags,t)},{})},Kt.locale.get=function(){return Zt.locale},Kt.locale.set=function(t){Zt.locale=t},Qt.locale.get=function(){return yt.getDriver().locale},Qt.locale.set=function(t){var e=t!==yt.getDriver().locale;yt.getDriver().locale=t,e&&Zt.$vee&&Zt.$vee._vm&&Zt.$vee._vm.$emit("localeChanged")},Zt.create=function(t,e){return new Zt(t,e)},Zt.extend=function(t,e,i){void 0===i&&(i={}),Zt._guardExtend(t,e);var r=e.options||{};Zt._merge(t,{validator:e,paramNames:i&&i.paramNames||e.paramNames,options:tt({hasTarget:!1,immediate:!0},r,i||{})})},Zt.remove=function(t){Nt.remove(t)},Zt.prototype.localize=function(t,e){Zt.localize(t,e)},Zt.localize=function(t,e){var i;if(G(t))yt.getDriver().merge(t);else{if(e){var r=t||e.name;e=tt({},e),yt.getDriver().merge(((i={})[r]=e,i))}t&&(Zt.locale=t)}},Zt.prototype.attach=function(t){var e=this,i={name:t.name,scope:t.scope,persist:!0},r=t.persist?this.fields.find(i):null;r&&(t.flags=r.flags,r.destroy(),this.fields.remove(r));var n=t.initialValue,a=new zt(t);return this.fields.push(a),a.immediate?this.$vee._vm.$nextTick(function(){return e.validate("#"+a.id,n||a.value,{vmId:t.vmId})}):this._validate(a,n||a.value,{initial:!0}).then(function(t){a.flags.valid=t.valid,a.flags.invalid=!t.valid}),a},Zt.prototype.flag=function(t,e,i){void 0===i&&(i=null);var r=this._resolveField(t,void 0,i);r&&e&&r.setFlags(e)},Zt.prototype.detach=function(t,e,i){var r=X(t.destroy)?t:this._resolveField(t,e,i);r&&(r.persist||(r.destroy(),this.errors.remove(r.name,r.scope,r.vmId),this.fields.remove(r)))},Zt.prototype.extend=function(t,e,i){void 0===i&&(i={}),Zt.extend(t,e,i)},Zt.prototype.reset=function(t){var e=this;return this.$vee._vm.$nextTick().then(function(){return e.$vee._vm.$nextTick()}).then(function(){e.fields.filter(t).forEach(function(i){i.waitFor(null),i.reset(),e.errors.remove(i.name,i.scope,t&&t.vmId)})})},Zt.prototype.update=function(t,e){var i=e.scope;this._resolveField("#"+t)&&this.errors.update(t,{scope:i})},Zt.prototype.remove=function(t){Zt.remove(t)}
1,Zt.prototype.validate=function(t,e,i){var r=this;void 0===i&&(i={});var n=i.silent,a=i.vmId;if(this.paused)return Promise.resolve(!0);if(z(t))return this.validateScopes({silent:n,vmId:a});if("*"===t)return this.validateAll(void 0,{silent:n,vmId:a});if(/^(.+)\.\*$/.test(t)){var s=t.match(/^(.+)\.\*$/)[1];return this.validateAll(s)}var o=this._resolveField(t);if(!o)return this._handleFieldNotFound(t);n||(o.flags.pending=!0),void 0===e&&(e=o.value);var l=this._validate(o,e);return o.waitFor(l),l.then(function(t){return!n&&o.isWaitingFor(l)&&(o.waitFor(null),r._handleValidationResults([t],a)),t.valid})},Zt.prototype.pause=function(){return this.paused=!0,this},Zt.prototype.resume=function(){return this.paused=!1,this},Zt.prototype.validateAll=function(t,e){var i=this;void 0===e&&(e={});var r=e.silent,n=e.vmId;if(this.paused)return Promise.resolve(!0);var a=null,s=!1;return"string"==typeof t?a={scope:t,vmId:n}:G(t)?(a=Object.keys(t).map(function(t){return{name:t,vmId:n,scope:null}}),s=!0):a=Array.isArray(t)?t.map(function(t){return"object"==typeof t?Object.assign({vmId:n},t):{name:t,vmId:n}}):{scope:null,vmId:n},Promise.all(this.fields.filter(a).map(function(e){return i._validate(e,s?t[e.name]:e.value)})).then(function(t){return r||i._handleValidationResults(t,n),t.every(function(t){return t.valid})})},Zt.prototype.validateScopes=function(t){var e=this;void 0===t&&(t={});var i=t.silent,r=t.vmId;return this.paused?Promise.resolve(!0):Promise.all(this.fields.filter({vmId:r}).map(function(t){return e._validate(t,t.value)})).then(function(t){return i||e._handleValidationResults(t,r),t.every(function(t){return t.valid})})},Zt.prototype.verify=function(t,e,i){void 0===i&&(i={});var r={name:i&&i.name||"{field}",rules:H(e),bails:B("bails",i,!0),forceRequired:!1,get isRequired(){return!!this.rules.required||this.forceRequired}},n=Object.keys(r.rules).filter(Nt.isTargetRule);return n.length&&i&&G(i.values)&&(r.dependencies=n.map(function(t){var e=r.rules[t][0];return{name:t,field:{value:i.values[e]}}})),this._validate(r,t).then(function(t){var e=[],i={};return t.errors.forEach(function(t){e.push(t.msg),i[t.rule]=t.msg}),{valid:t.valid,errors:e,failedRules:i}})},Zt.prototype.destroy=function(){this.$vee._vm.$off("localeChanged")},Zt.prototype._createFields=function(t){var e=this;t&&Object.keys(t).forEach(function(i){var r=tt({},{name:i,rules:t[i]});e.attach(r)})},Zt.prototype._getDateFormat=function(t){var e=null;return t.date_format&&Array.isArray(t.date_format)&&(e=t.date_format[0]),e||yt.getDriver().getDateFormat(this.locale)},Zt.prototype._formatErrorMessage=function(t,e,i,r){void 0===i&&(i={}),void 0===r&&(r=null);var n=this._getFieldDisplayName(t),a=this._getLocalizedParams(e,r);return yt.getDriver().getFieldMessage(this.locale,t.name,e.name,[n,a,i])},Zt.prototype._convertParamObjectToArray=function(t,e){if(Array.isArray(t))return t;var i=Nt.getParamNames(e);return i&&G(t)?i.reduce(function(e,i){return i in t&&e.push(t[i]),e},[]):t},Zt.prototype._getLocalizedParams=function(t,e){void 0===e&&(e=null);var i=this._convertParamObjectToArray(t.params,t.name);return t.options.hasTarget&&i&&i[0]?[e||yt.getDriver().getAttribute(this.locale,i[0],i[0])].concat(i.slice(1)):i},Zt.prototype._getFieldDisplayName=function(t){return t.alias||yt.getDriver().getAttribute(this.locale,t.name,t.name)},Zt.prototype._convertParamArrayToObj=function(t,e){var i=Nt.getParamNames(e);if(!i)return t;if(G(t)){if(i.some(function(e){return-1!==Object.keys(t).indexOf(e)}))return t;t=[t]}return t.reduce(function(t,e,r){return t[i[r]]=e,t},{})},Zt.prototype._test=function(t,e,i){var r=this,n=Nt.getValidatorMethod(i.name),a=Array.isArray(i.params)?Q(i.params):i.params;a||(a=[]);var s=null;if(!n||"function"!=typeof n)return Promise.reject(Y("No such validator '"+i.name+"' exists."));if(i.options.hasTarget&&t.dependencies){var o=nt(t.dependencies,function(t){return t.name===i.name});o&&(s=o.field.alias,a=[o.field.value].concat(a.slice(1)))}else"required"===i.name&&t.rejectsFalse&&(a=a.length?a:[!0]);if(i.options.isDate){var l=this._getDateFormat(t.rules);"date_format"!==i.name&&a.push(l)}var c=n(e,this._convertParamArrayToObj(a,i.name));return X(c.then)?c.then(function(e){var n=!0,a={};return Array.isArray(e)?n=e.every(function(t){return G(t)?t.valid:t}):(n=G(e)?e.valid:e,a=e.data),{valid:n,data:c.data,errors:n?[]:[r._createFieldError(t,i,a,s)]}}):(G(c)||(c={valid:c,data:{}}),{valid:c.valid,data:c.data,errors:c.valid?[]:[this._createFieldError(t,i,c.data,s)]})},Zt._merge=function(t,e){var i=e.validator,r=e.options,n=e.paramNames,a=X(i)?i:i.validate;i.getMessage&&yt.getDriver().setMessage(Zt.locale,t,i.getMessage),Nt.add(t,{validate:a,options:r,paramNames:n})},Zt._guardExtend=function(t,e){if(!X(e)&&!X(e.validate))throw Y("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.")}
1,Zt.prototype._createFieldError=function(t,e,i,r){var n=this;return{id:t.id,vmId:t.vmId,field:t.name,msg:this._formatErrorMessage(t,e,i,r),rule:e.name,scope:t.scope,regenerate:function(){return n._formatErrorMessage(t,e,i,r)}}},Zt.prototype._resolveField=function(t,e,i){if("#"===t[0])return this.fields.findById(t.slice(1));if(!z(e))return this.fields.find({name:t,scope:e,vmId:i});if(ut(t,".")){var r=t.split("."),n=r[0],a=r.slice(1),s=this.fields.find({name:a.join("."),scope:n,vmId:i});if(s)return s}return this.fields.find({name:t,scope:null,vmId:i})},Zt.prototype._handleFieldNotFound=function(t,e){var i=z(e)?t:(z(e)?"":e+".")+t;return Promise.reject(Y('Validating a non-existent field: "'+i+'". Use "attach()" first.'))},Zt.prototype._handleValidationResults=function(t,e){var i=this,r=t.map(function(t){return{id:t.id}});this.errors.removeById(r.map(function(t){return t.id})),t.forEach(function(t){i.errors.remove(t.field,t.scope,e)});var n=t.reduce(function(t,e){return t.push.apply(t,e.errors),t},[]);this.errors.add(n),this.fields.filter(r).forEach(function(e){var i=nt(t,function(t){return t.id===e.id});e.setFlags({pending:!1,valid:i.valid,validated:!0})})},Zt.prototype._shouldSkip=function(t,e){return!1!==t.bails&&(!!t.isDisabled||!t.isRequired&&(z(e)||""===e||dt(e)))},Zt.prototype._shouldBail=function(t){return void 0!==t.bails?t.bails:this.fastExit},Zt.prototype._validate=function(t,e,i){var r=this;void 0===i&&(i={});var n=i.initial,a=Object.keys(t.rules).filter(Nt.isRequireRule);if(t.forceRequired=!1,a.forEach(function(i){var n=Nt.getOptions(i),a=r._test(t,e,{name:i,params:t.rules[i],options:n});if(X(a.then))throw Y("Require rules cannot be async");if(!G(a))throw Y("Require rules has to return an object (see docs)");!0===a.data.required&&(t.forceRequired=!0)}),this._shouldSkip(t,e))return Promise.resolve({valid:!0,id:t.id,field:t.name,scope:t.scope,errors:[]});var s=[],o=[],l=!1;return X(t.checkValueChanged)&&(t.flags.changed=t.checkValueChanged()),Object.keys(t.rules).filter(function(t){return!n||!Nt.has(t)||Nt.isImmediate(t)}).some(function(i){var n=Nt.getOptions(i),a=r._test(t,e,{name:i,params:t.rules[i],options:n});return X(a.then)?s.push(a):!a.valid&&r._shouldBail(t)?(o.push.apply(o,a.errors),l=!0):s.push(new Promise(function(t){return t(a)})),l}),l?Promise.resolve({valid:!1,errors:o,id:t.id,field:t.name,scope:t.scope}):Promise.all(s).then(function(e){return e.reduce(function(t,e){var i;return e.valid||(i=t.errors).push.apply(i,e.errors),t.valid=t.valid&&e.valid,t},{valid:!0,errors:o,id:t.id,field:t.name,scope:t.scope})})},Object.defineProperties(Zt.prototype,Kt),Object.defineProperties(Zt,Qt);var Jt=function(t){return G(t)?Object.keys(t).reduce(function(e,i){return e[i]=Jt(t[i]),e},{}):X(t)?t("{0}",["{1}","{2}","{3}"]):t},te=function(t,e){this.i18n=t,this.rootKey=e},ee={locale:{configurable:!0}};ee.locale.get=function(){return this.i18n.locale},ee.locale.set=function(t){W("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},te.prototype.getDateFormat=function(t){return this.i18n.getDateTimeFormat(t||this.locale)},te.prototype.setDateFormat=function(t,e){this.i18n.setDateTimeFormat(t||this.locale,e)},te.prototype.getMessage=function(t,e,i){var r=this.rootKey+".messages."+e,n=i;return Array.isArray(i)&&(n=[].concat.apply([],i)),this.i18n.te(r)?this.i18n.t(r,n):this.i18n.te(r,this.i18n.fallbackLocale)?this.i18n.t(r,this.i18n.fallbackLocale,n):this.i18n.t(this.rootKey+".messages._default",n)},te.prototype.getAttribute=function(t,e,i){void 0===i&&(i="");var r=this.rootKey+".attributes."+e;return this.i18n.te(r)?this.i18n.t(r):i},te.prototype.getFieldMessage=function(t,e,i,r){var n=this.rootKey+".custom."+e+"."+i;return this.i18n.te(n)?this.i18n.t(n,r):this.getMessage(t,i,r)},te.prototype.merge=function(t){var e=this;Object.keys(t).forEach(function(i){var r,n=ot({}
1,B(i+"."+e.rootKey,e.i18n.messages,{})),a=ot(n,function(t){var e={};return t.messages&&(e.messages=Jt(t.messages)),t.custom&&(e.custom=Jt(t.custom)),t.attributes&&(e.attributes=t.attributes),z(t.dateFormat)||(e.dateFormat=t.dateFormat),e}(t[i]));e.i18n.mergeLocaleMessage(i,((r={})[e.rootKey]=a,r)),a.dateFormat&&e.i18n.setDateTimeFormat(i,a.dateFormat)})},te.prototype.setMessage=function(t,e,i){var r,n;this.merge(((n={})[t]={messages:(r={},r[e]=i,r)},n))},te.prototype.setAttribute=function(t,e,i){var r,n;this.merge(((n={})[t]={attributes:(r={},r[e]=i,r)},n))},Object.defineProperties(te.prototype,ee);var ie,re,ne,ae={aggressive:function(){return{on:["input"]}},eager:function(t){return t.errors.length?{on:["input"]}:{on:["change","blur"]}},passive:function(){return{on:[]}},lazy:function(){return{on:["change"]}}},se=function(t,e){var i;this.configure(t),ne=this,e&&(ie=e),this._validator=(i=new Zt(null,{fastExit:t&&t.fastExit},this),Ht=i,i),this._initVM(this.config),this._initI18n(this.config)},oe={i18nDriver:{configurable:!0},config:{configurable:!0}},le={i18nDriver:{configurable:!0},config:{configurable:!0}};se.setI18nDriver=function(t,e){yt.setDriver(t,e)},se.configure=function(t){$t(t)},se.setMode=function(t,e){if($t({mode:t}),e){if(!X(e))throw new Error("A mode implementation must be a function");ae[t]=e}},se.use=function(t,e){return void 0===e&&(e={}),X(t)?ne?void t({Validator:Zt,ErrorBag:wt,Rules:Zt.rules},e):(re||(re=[]),void re.push({plugin:t,options:e})):W("The plugin must be a callable function")},se.install=function(t,e){ie&&t===ie||(ie=t,ne=new se(e),Zt.$vee=ne,function(){try{var t=Object.defineProperty({},"passive",{get:function(){qt=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(t){qt=!1}}(),ie.mixin(Yt),ie.directive("validate",Xt),re&&(re.forEach(function(t){var e=t.plugin,i=t.options;se.use(e,i)}),re=null))},oe.i18nDriver.get=function(){return yt.getDriver()},le.i18nDriver.get=function(){return yt.getDriver()},oe.config.get=function(){return xt()},le.config.get=function(){return xt()},se.prototype._initVM=function(t){var e=this;this._vm=new ie({data:function(){return{errors:e._validator.errors,fields:e._validator.fields}}})},se.prototype._initI18n=function(t){var e=this,i=t.dictionary,r=t.i18n,n=t.i18nRootKey,a=t.locale,s=function(){e._validator.errors.regenerate()};r?(se.setI18nDriver("i18n",new te(r,n)),r._vm.$watch("locale",s)):"undefined"!=typeof window&&this._vm.$on("localeChanged",s),i&&this.i18nDriver.merge(i),a&&!r&&this._validator.localize(a)},se.prototype.configure=function(t){$t(t)},Object.defineProperties(se.prototype,oe),Object.defineProperties(se,le),se.mixin=Yt,se.directive=Xt,se.Validator=Zt,se.ErrorBag=wt;var ce,ue={name:"en",messages:{_default:function(t){return"The "+t+" value is not valid."},after:function(t,e){var i=e[0];return"The "+t+" must be after "+(e[1]?"or equal to ":"")+i+"."},alpha:function(t){return"The "+t+" field may only contain alphabetic characters."},alpha_dash:function(t){return"The "+t+" field may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(t){return"The "+t+" field may only contain alpha-numeric characters."},alpha_spaces:function(t){return"The "+t+" field may only contain alphabetic characters as well as spaces."},before:function(t,e){var i=e[0];return"The "+t+" must be before "+(e[1]?"or equal to ":"")+i+"."},between:function(t,e){return"The "+t+" field must be between "+e[0]+" and "+e[1]+"."},confirmed:function(t){return"The "+t+" confirmation does not match."},credit_card:function(t){return"The "+t+" field is invalid."},date_between:function(t,e){return"The "+t+" must be between "+e[0]+" and "+e[1]+"."},date_format:function(t,e){return"The "+t+" must be in the format "+e[0]+"."},decimal:function(t,e){void 0===e&&(e=[]);var i=e[0];return void 0===i&&(i="*"),"The "+t+" field must be numeric and may contain "+(i&&"*"!==i?i:"")+" decimal points."},digits:function(t,e){return"The "+t+" field must be numeric and exactly contain "+e[0]+" digits."},dimensions:function(t,e){return"The "+t+" field must be "+e[0]+" pixels by "+e[1]+" pixels."},email:function(t){return"The "+t+" field must be a valid email."},excluded:function(t){return"The "+t+" field must be a valid value."},ext:function(t){return"The "+t+" field must be a valid file."},image:function(t){return"The "+t+" field must be an image."},included:function(t){return"The "+t+" field must be a valid value."},integer:function(t){return"The "+t+" field must be an integer."},ip:function(t){return"The "+t+" field must be a valid ip address."},ip_or_fqdn:function(t){return"The "+t+" field must be a valid ip address or FQDN."},length:function(t,e){var i=e[0],r=e[1];return r?"The "+t+" length must be between "+i+" and "+r+".":"The "+t+" length must be "+i+"."},max:function(t,e){return"The "+t+" field may not be greater than "+e[0]+" characters."},max_value:function(t,e){return"The "+t+" field must be "+e[0]+" or less."},mimes:function(t){return"The "+t+" field must have a valid file type."},min:function(t,e){return"The "+t+" field must be at least "+e[0]+" characters."},min_value:function(t,e){return"The "+t+" field must be "+e[0]+" or more."},numeric:function(t){return"The "+t+" field may only contain numeric characters."}
1,regex:function(t){return"The "+t+" field format is invalid."},required:function(t){return"The "+t+" field is required."},required_if:function(t,e){return"The "+t+" field is required when the "+e[0]+" field has this value."},size:function(t,e){return"The "+t+" size must be less than "+function(t){var e=0==(t=1024*Number(t))?0:Math.floor(Math.log(t)/Math.log(1024));return 1*(t/Math.pow(1024,e)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][e]}(e[0])+"."},url:function(t){return"The "+t+" field is not a valid URL."}},attributes:{}};function de(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}"undefined"!=typeof VeeValidate&&VeeValidate.Validator.localize(((ce={})[ue.name]=ue,ce));var he=6e4;function pe(t){var e=new Date(t.getTime()),i=e.getTimezoneOffset();e.setSeconds(0,0);var r=e.getTime()%he;return i*he+r}var fe=36e5,ve=6e4,me=2,ge={dateTimeDelimeter:/[T ]/,plainTime:/:/,timeZoneDelimeter:/[Z ]/i,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ye(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===t)return new Date(NaN);var i=e||{},r=null==i.additionalDigits?me:de(i.additionalDigits);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))return new Date(t.getTime());if("number"==typeof t||"[object Number]"===Object.prototype.toString.call(t))return new Date(t);if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var n=function(t){var e,i={},r=t.split(ge.dateTimeDelimeter);ge.plainTime.test(r[0])?(i.date=null,e=r[0]):(i.date=r[0],e=r[1],ge.timeZoneDelimeter.test(i.date)&&(i.date=t.split(ge.timeZoneDelimeter)[0],e=t.substr(i.date.length,t.length)));if(e){var n=ge.timezone.exec(e);n?(i.time=e.replace(n[1],""),i.timezone=n[1]):i.time=e}return i}(t),a=function(t,e){var i,r=ge.YYY[e],n=ge.YYYYY[e];if(i=ge.YYYY.exec(t)||n.exec(t)){var a=i[1];return{year:parseInt(a,10),restDateString:t.slice(a.length)}}if(i=ge.YY.exec(t)||r.exec(t)){var s=i[1];return{year:100*parseInt(s,10),restDateString:t.slice(s.length)}}return{year:null}}(n.date,r),s=a.year,o=function(t,e){if(null===e)return null;var i,r,n,a;if(0===t.length)return(r=new Date(0)).setUTCFullYear(e),r;if(i=ge.MM.exec(t))return r=new Date(0),n=parseInt(i[1],10)-1,$e(e,n)?(r.setUTCFullYear(e,n),r):new Date(NaN);if(i=ge.DDD.exec(t)){r=new Date(0);var s=parseInt(i[1],10);return function(t,e){if(e<1)return!1;var i=xe(t);if(i&&e>366)return!1;if(!i&&e>365)return!1;return!0}(e,s)?(r.setUTCFullYear(e,0,s),r):new Date(NaN)}if(i=ge.MMDD.exec(t)){r=new Date(0),n=parseInt(i[1],10)-1;var o=parseInt(i[2],10);return $e(e,n,o)?(r.setUTCFullYear(e,n,o),r):new Date(NaN)}if(i=ge.Www.exec(t))return a=parseInt(i[1],10)-1,Ce(e,a)?we(e,a):new Date(NaN);if(i=ge.WwwD.exec(t)){a=parseInt(i[1],10)-1;var l=parseInt(i[2],10)-1;return Ce(e,a,l)?we(e,a,l):new Date(NaN)}return null}(a.restDateString,s);if(isNaN(o))return new Date(NaN);if(o){var l,c=o.getTime(),u=0;if(n.time&&(u=function(t){var e,i,r;if(e=ge.HH.exec(t))return ke(i=parseFloat(e[1].replace(",",".")))?i%24*fe:NaN;if(e=ge.HHMM.exec(t))return i=parseInt(e[1],10),r=parseFloat(e[2].replace(",",".")),ke(i,r)?i%24*fe+r*ve:NaN;if(e=ge.HHMMSS.exec(t)){i=parseInt(e[1],10),r=parseInt(e[2],10);var n=parseFloat(e[3].replace(",","."));return ke(i,r,n)?i%24*fe+r*ve+1e3*n:NaN}return null}(n.time),isNaN(u)))return new Date(NaN);if(n.timezone){if(l=function(t){var e,i,r;if(e=ge.timezoneZ.exec(t))return 0;if(e=ge.timezoneHH.exec(t))return De(r=parseInt(e[2],10))?(i=r*fe,"+"===e[1]?-i:i):NaN;if(e=ge.timezoneHHMM.exec(t)){r=parseInt(e[2],10);var n=parseInt(e[3],10);return De(r,n)?(i=r*fe+n*ve,"+"===e[1]?-i:i):NaN}return 0}(n.timezone),isNaN(l))return new Date(NaN)}else l=pe(new Date(c+u)),l=pe(new Date(c+u+l));return new Date(c+u+l)}return new Date(NaN)}function we(t,e,i){e=e||0,i=i||0;var r=new Date(0);r.setUTCFullYear(t,0,4);var n=7*e+i+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+n),r}var be=[31,28,31,30,31,30,31,31,30,31,30,31],_e=[31,29,31,30,31,30,31,31,30,31,30,31];function xe(t){return t%400==0||t%4==0&&t%100!=0}function $e(t,e,i){if(e<0||e>11)return!1;if(null!=i){if(i<1)return!1;var r=xe(t);if(r&&i>_e[e])return!1;if(!r&&i>be[e])return!1}return!0}function Ce(t,e,i){return!(e<0||e>52)&&(null==i||!(i<0||i>6))}function ke(t,e,i){return(null==t||!(t<0||t>=25))&&((null==e||!(e<0||e>=60))&&(null==i||!(i<0||i>=60)))}function De(t,e){return null==e||!(e<0||e>59)}function Ae(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=ye(t,e);return!isNaN(i)}var Te={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Se(t){return function(e){var i=e||{},r=i.width?String(i.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Me={date:Se({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Se({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Se({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ie={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ne(t){return function(e,i){var r=i||{},n=r.width?String(r.width):t.defaultWidth;return("formatting"===(r.context?String(r.context):"standalone")&&t.formattingValues?t.formattingValues[n]||t.formattingValues[t.defaultFormattingWidth]:t.values[n]||t.values[t.defaultWidth])[t.argumentCallback?t.argumentCallback(e):e]}}function Oe(t){return function(e,i){var r=String(e),n=i||{},a=n.width,s=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],o=r.match(s);if(!o)return null;var l,c=o[0],u=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(u)?u.findIndex(function(t){return t.test(r)}):function(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}(u,function(t){return t.test(r)}),l=t.valueCallback?t.valueCallback(l):l,{value:l=n.valueCallback?n.valueCallback(l):l,rest:r.slice(c.length)}}}
vendor: 5,415 bytes, line 1
1var Pe,Ee={formatDistance:function(t,e,i){var r;return i=i||{},r="string"==typeof Te[t]?Te[t]:1===e?Te[t].one:Te[t].other.replace("{{count}}",e),i.addSuffix?i.comparison>0?"in "+r:r+" ago":r},formatLong:Me,formatRelative:function(t,e,i,r){return Ie[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),r=i%100;if(r>20||r<10)switch(r%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:Ne({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ne({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:Ne({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ne({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ne({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaulFormattingWidth:"wide"})},match:{ordinalNumber:(Pe={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var i=String(t),r=e||{},n=i.match(Pe.matchPattern);if(!n)return null;var a=n[0],s=i.match(Pe.parsePattern);if(!s)return null;var o=Pe.valueCallback?Pe.valueCallback(s[0]):s[0];return{value:o=r.valueCallback?r.valueCallback(o):o,rest:i.slice(a.length)}}),era:Oe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Oe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Oe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Oe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Oe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},qe=864e5;function Fe(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=ye(t,e),r=i.getUTCDay(),n=(r<1?7:0)+r-1;return i.setUTCDate(i.getUTCDate()-n),i.setUTCHours(0,0,0,0),i}function je(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=ye(t,e),r=i.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Fe(n,e),s=new Date(0);s.setUTCFullYear(r,0,4),s.setUTCHours(0,0,0,0);var o=Fe(s,e);return i.getTime()>=a.getTime()?r+1:i.getTime()>=o.getTime()?r:r-1}var ze=6048e5;function Ve(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=ye(t,e),r=Fe(i,e).getTime()-function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=je(t,e),r=new Date(0);return r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0),Fe(r,e)}(i,e).getTime();return Math.round(r/ze)+1}
1function Re(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=e||{},r=i.locale,n=r&&r.options&&r.options.weekStartsOn,a=null==n?0:de(n),s=null==i.weekStartsOn?a:de(i.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var o=ye(t,i),l=o.getUTCDay(),c=(l<s?7:0)+l-s;return o.setUTCDate(o.getUTCDate()-c),o.setUTCHours(0,0,0,0),o}function Be(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=ye(t,e),r=i.getUTCFullYear(),n=e||{},a=n.locale,s=a&&a.options&&a.options.firstWeekContainsDate,o=null==s?1:de(s),l=null==n.firstWeekContainsDate?o:de(n.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,l),c.setUTCHours(0,0,0,0);var u=Re(c,e),d=new Date(0);d.setUTCFullYear(r,0,l),d.setUTCHours(0,0,0,0);var h=Re(d,e);return i.getTime()>=u.getTime()?r+1:i.getTime()>=h.getTime()?r:r-1}var Ue=6048e5;function Le(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=ye(t,e),r=Re(i,e).getTime()-function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=e||{},r=i.locale,n=r&&r.options&&r.options.firstWeekContainsDate,a=null==n?1:de(n),s=null==i.firstWeekContainsDate?a:de(i.firstWeekContainsDate),o=Be(t,e),l=new Date(0);return l.setUTCFullYear(o,0,s),l.setUTCHours(0,0,0,0),Re(l,e)}(i,e).getTime();return Math.round(r/Ue)+1}var He="midnight",We="noon",Ye="morning",Ge="afternoon",Xe="evening",Ze="night",Ke={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})}},y:function(t,e,i,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return"yy"===e?Qe(a%100,2):"yo"===e?i.ordinalNumber(a,{unit:"year"}):Qe(a,e.length)},Y:function(t,e,i,r){var n=Be(t,r),a=n>0?n:1-n;return"YY"===e?Qe(a%100,2):"Yo"===e?i.ordinalNumber(a,{unit:"year"}):Qe(a,e.length)},R:function(t,e,i,r){return Qe(je(t,r),e.length)},u:function(t,e,i,r){return Qe(t.getUTCFullYear(),e.length)},Q:function(t,e,i,r){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Qe(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i,r){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Qe(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i,r){var n=t.getUTCMonth();switch(e){case"M":return String(n+1);case"MM":return Qe(n+1,2);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i,r){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return Qe(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){var n=Le(t,r);return"wo"===e?i.ordinalNumber(n,{unit:"week"}):Qe(n,e.length)},I:function(t,e,i,r){var n=Ve(t,r);return"Io"===e?i.ordinalNumber(n,{unit:"week"}):Qe(n,e.length)},d:function(t,e,i,r){var n=t.getUTCDate();return"do"===e?i.ordinalNumber(n,{unit:"date"}):Qe(n,e.length)}
1,D:function(t,e,i,r){var n=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var i=ye(t,e),r=i.getTime();i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0);var n=r-i.getTime();return Math.floor(n/qe)+1}(t,r);return"Do"===e?i.ordinalNumber(n,{unit:"dayOfYear"}):Qe(n,e.length)},E:function(t,e,i,r){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){var n=t.getUTCDay(),a=(n-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return Qe(a,2);case"eo":return i.ordinalNumber(a,{unit:"day"});case"eee":return i.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"});case"eeee":default:return i.day(n,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){var n=t.getUTCDay(),a=(n-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return Qe(a,e.length);case"co":return i.ordinalNumber(a,{unit:"day"});case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"});case"cccc":default:return i.day(n,{width:"wide",context:"standalone"})}},i:function(t,e,i,r){var n=t.getUTCDay(),a=0===n?7:n;switch(e){case"i":return String(a);case"ii":return Qe(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,i){var r,n=t.getUTCHours();switch(r=12===n?We:0===n?He:n/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){var r,n=t.getUTCHours();switch(r=n>=17?Xe:n>=12?Ge:n>=4?Ye:Ze,e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i,r){var n=t.getUTCHours()%12;return 0===n&&(n=12),"ho"===e?i.ordinalNumber(n,{unit:"hour"}):Qe(n,e.length)},H:function(t,e,i,r){var n=t.getUTCHours();return"Ho"===e?i.ordinalNumber(n,{unit:"hour"}):Qe(n,e.length)},K:function(t,e,i,r){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):Qe(n,e.length)},k:function(t,e,i,r){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):Qe(n,e.length)},m:function(t,e,i,r){var n=t.getUTCMinutes();return"mo"===e?i.ordinalNumber(n,{unit:"minute"}):Qe(n,e.length)},s:function(t,e,i,r){var n=t.getUTCSeconds();return"so"===e?i.ordinalNumber(n,{unit:"second"}):Qe(n,e.length)},S:function(t,e,i,r){var n=e.length,a=t.getUTCMilliseconds();return Qe(Math.floor(a*Math.pow(10,n-3)),n)},X:function(t,e,i,r){var n=(r._originalDate||t).getTimezoneOffset();if(0===n)return"Z";switch(e){case"X":return ti(n);case"XXXX":case"XX":return Je(n);case"XXXXX":case"XXX":default:return Je(n,":")}},x:function(t,e,i,r){var n=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return ti(n);case"xxxx":case"xx":return Je(n);case"xxxxx":case"xxx":default:return Je(n,":")}}
1,O:function(t,e,i,r){var n=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ei(n,":");case"OOOO":default:return"GMT"+Je(n,":")}},z:function(t,e,i,r){var n=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ei(n,":");case"zzzz":default:return"GMT"+Je(n,":")}},t:function(t,e,i,r){var n=r._originalDate||t;return Qe(Math.floor(n.getTime()/1e3),e.length)},T:function(t,e,i,r){return Qe((r._originalDate||t).getTime(),e.length)}};function Qe(t,e){for(var i=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return i+r}function Je(t,e){var i=e||"",r=t>0?"-":"+",n=Math.abs(t);return r+Qe(Math.floor(n/60),2)+i+Qe(n%60,2)}function ti(t,e){return t%60==0?(t>0?"-":"+")+Qe(Math.abs(t)/60,2):Je(t,e)}function ei(t,e){var i=t>0?"-":"+",r=Math.abs(t),n=Math.floor(r/60),a=r%60;if(0===a)return i+String(n);var s=e||"";return i+String(n)+s+Qe(a,2)}function ii(t,e,i){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function ri(t,e,i){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var ni={p:ri,P:function(t,e,i){var r,n=t.match(/(P+)(p+)?/),a=n[1],s=n[2];if(!s)return ii(t,e);switch(a){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"})}return r.replace("{{date}}",ii(a,e)).replace("{{time}}",ri(s,e))}};function ai(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return function(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=ye(t,i).getTime(),n=de(e);return new Date(r+n)}(t,-de(e),i)}var si=["D","DD","YY","YYYY"];function oi(t){return-1!==si.indexOf(t)}function li(t){throw new RangeError("`options.awareOfUnicodeTokens` must be set to `true` to use `"+t+"` token; see: https://git.io/fxCyr")}var ci=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ui=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,di=/^'(.*?)'?$/,hi=/''/g;function pi(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),n=i||{},a=n.locale||Ee,s=a.options&&a.options.firstWeekContainsDate,o=null==s?1:de(s),l=null==n.firstWeekContainsDate?o:de(n.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=a.options&&a.options.weekStartsOn,u=null==c?0:de(c),d=null==n.weekStartsOn?u:de(n.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var h=ye(t,n);if(!Ae(h,n))return"Invalid Date";var p=ai(h,pe(h),n),f={firstWeekContainsDate:l,weekStartsOn:d,locale:a,_originalDate:h};return r.match(ui).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,ni[e])(t,a.formatLong,f):t}).join("").match(ci).map(function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return t.match(di)[1].replace(hi,"'");var i=Ke[e];return i?(!n.awareOfUnicodeTokens&&oi(t)&&li(t),i(p,t,a.localize,f)):t}).join("")}function fi(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=ye(t,i),n=ye(e,i);return r.getTime()>n.getTime()}function vi(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=ye(t,i),n=ye(e,i);return r.getTime()<n.getTime()}function mi(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=ye(t,i),n=ye(e,i);return r.getTime()===n.getTime()}function gi(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=i||{},n=r.locale,a=n&&n.options&&n.options.weekStartsOn,s=null==a?0:de(a),o=null==r.weekStartsOn?s:de(r.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
1var l=ye(t,i),c=de(e),u=((c%7+7)%7<o?7:0)+c-l.getUTCDay();return l.setUTCDate(l.getUTCDate()+u),l}var yi=36e5,wi=6e4,bi=1e3,_i={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},xi=/^([+-])(\d{2})(\d{2})?|Z/,$i=/^([+-])(\d{2})(\d{2})|Z/,Ci=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ki=/^([+-])(\d{2}):(\d{2})|Z/,Di=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Ai(t,e,i){var r=e.match(t);if(!r)return null;var n=parseInt(r[0],10);return{value:i?i(n):n,rest:e.slice(r[0].length)}}function Ti(t,e){var i=e.match(t);if(!i)return null;if("Z"===i[0])return{value:0,rest:e.slice(1)};var r="+"===i[1]?1:-1,n=i[2]?parseInt(i[2],10):0,a=i[3]?parseInt(i[3],10):0,s=i[5]?parseInt(i[5],10):0;return{value:r*(n*yi+a*wi+s*bi),rest:e.slice(i[0].length)}}function Si(t,e){return Ai(_i.anyDigitsSigned,t,e)}function Mi(t,e,i){switch(t){case 1:return Ai(_i.singleDigit,e,i);case 2:return Ai(_i.twoDigits,e,i);case 3:return Ai(_i.threeDigits,e,i);case 4:return Ai(_i.fourDigits,e,i);default:return Ai(new RegExp("^\\d{1,"+t+"}"),e,i)}}function Ii(t,e,i){switch(t){case 1:return Ai(_i.singleDigitSigned,e,i);case 2:return Ai(_i.twoDigitsSigned,e,i);case 3:return Ai(_i.threeDigitsSigned,e,i);case 4:return Ai(_i.fourDigitsSigned,e,i);default:return Ai(new RegExp("^-?\\d{1,"+t+"}"),e,i)}}function Ni(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Oi(t,e){var i,r=e>0,n=r?e:1-e;if(n<=50)i=t||100;else{var a=n+50;i=t+100*Math.floor(a/100)-(t>=a%100?100:0)}return r?i:1-i}var Pi=[31,28,31,30,31,30,31,31,30,31,30,31],Ei=[31,29,31,30,31,30,31,31,30,31,30,31];function qi(t){return t%400==0||t%4==0&&t%100!=0}var Fi={G:{priority:140,parse:function(t,e,i,r){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}},set:function(t,e,i){return t.setUTCFullYear(1===e?10:-9,0,1),t.setUTCHours(0,0,0,0),t}},y:{priority:130,parse:function(t,e,i,r){var n=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Mi(4,t,n);case"yo":return i.ordinalNumber(t,{unit:"year",valueCallback:n});default:return Mi(e.length,t,n)}},validate:function(t,e,i){return e.isTwoDigitYear||e.year>0},set:function(t,e,i){var r=Be(t,i);if(e.isTwoDigitYear){var n=Oi(e.year,r);return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}var a=r>0?e.year:1-e.year;return t.setUTCFullYear(a,0,1),t.setUTCHours(0,0,0,0),t}},Y:{priority:130,parse:function(t,e,i,r){var n=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Mi(4,t,n);case"Yo":return i.ordinalNumber(t,{unit:"year",valueCallback:n});default:return Mi(e.length,t,n)}},validate:function(t,e,i){return e.isTwoDigitYear||e.year>0},set:function(t,e,i){var r=t.getUTCFullYear();if(e.isTwoDigitYear){var n=Oi(e.year,r);return t.setUTCFullYear(n,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Re(t,i)}var a=r>0?e.year:1-e.year;return t.setUTCFullYear(a,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Re(t,i)}},R:{priority:130,parse:function(t,e,i,r){return Ii("R"===e?4:e.length,t)},set:function(t,e,i){var r=new Date(0);return r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0),Fe(r)}},u:{priority:130,parse:function(t,e,i,r){return Ii("u"===e?4:e.length,t)},set:function(t,e,i){return t.setUTCFullYear(e,0,1),t.setUTCHours(0,0,0,0),t}},Q:{priority:120,parse:function(t,e,i,r){switch(e){case"Q":case"QQ":return Mi(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}
1,validate:function(t,e,i){return e>=1&&e<=4},set:function(t,e,i){return t.setUTCMonth(3*(e-1),1),t.setUTCHours(0,0,0,0),t}},q:{priority:120,parse:function(t,e,i,r){switch(e){case"q":case"qq":return Mi(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=1&&e<=4},set:function(t,e,i){return t.setUTCMonth(3*(e-1),1),t.setUTCHours(0,0,0,0),t}},M:{priority:110,parse:function(t,e,i,r){var n=function(t){return t-1};switch(e){case"M":return Ai(_i.month,t,n);case"MM":return Mi(2,t,n);case"Mo":return i.ordinalNumber(t,{unit:"month",valueCallback:n});case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i){return t.setUTCMonth(e,1),t.setUTCHours(0,0,0,0),t}},L:{priority:110,parse:function(t,e,i,r){var n=function(t){return t-1};switch(e){case"L":return Ai(_i.month,t,n);case"LL":return Mi(2,t,n);case"Lo":return i.ordinalNumber(t,{unit:"month",valueCallback:n});case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i){return t.setUTCMonth(e,1),t.setUTCHours(0,0,0,0),t}},w:{priority:100,parse:function(t,e,i,r){switch(e){case"w":return Ai(_i.week,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Mi(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=53},set:function(t,e,i){return Re(function(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=ye(t,i),n=de(e),a=Le(r,i)-n;return r.setUTCDate(r.getUTCDate()-7*a),r}(t,e,i),i)}},I:{priority:100,parse:function(t,e,i,r){switch(e){case"I":return Ai(_i.week,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Mi(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=53},set:function(t,e,i){return Fe(function(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=ye(t,i),n=de(e),a=Ve(r,i)-n;return r.setUTCDate(r.getUTCDate()-7*a),r}(t,e,i),i)}},d:{priority:90,parse:function(t,e,i,r){switch(e){case"d":return Ai(_i.date,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Mi(e.length,t)}},validate:function(t,e,i){var r=qi(t.getUTCFullYear()),n=t.getUTCMonth();return r?e>=1&&e<=Ei[n]:e>=1&&e<=Pi[n]},set:function(t,e,i){return t.setUTCDate(e),t.setUTCHours(0,0,0,0),t}},D:{priority:90,parse:function(t,e,i,r){switch(e){case"D":case"DD":return Ai(_i.dayOfYear,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Mi(e.length,t)}},validate:function(t,e,i){return qi(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365},set:function(t,e,i){return t.setUTCMonth(0,e),t.setUTCHours(0,0,0,0),t}},E:{priority:90,parse:function(t,e,i,r){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}
1,validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i){return(t=gi(t,e,i)).setUTCHours(0,0,0,0),t}},e:{priority:90,parse:function(t,e,i,r){var n=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Mi(e.length,t,n);case"eo":return i.ordinalNumber(t,{unit:"day",valueCallback:n});case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i){return(t=gi(t,e,i)).setUTCHours(0,0,0,0),t}},c:{priority:90,parse:function(t,e,i,r){var n=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Mi(e.length,t,n);case"co":return i.ordinalNumber(t,{unit:"day",valueCallback:n});case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i){return(t=gi(t,e,i)).setUTCHours(0,0,0,0),t}},i:{priority:90,parse:function(t,e,i,r){var n=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Mi(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return i.day(t,{width:"abbreviated",context:"formatting",valueCallback:n})||i.day(t,{width:"short",context:"formatting",valueCallback:n})||i.day(t,{width:"narrow",context:"formatting",valueCallback:n});case"iiiii":return i.day(t,{width:"narrow",context:"formatting",valueCallback:n});case"iiiiii":return i.day(t,{width:"short",context:"formatting",valueCallback:n})||i.day(t,{width:"narrow",context:"formatting",valueCallback:n});case"iiii":default:return i.day(t,{width:"wide",context:"formatting",valueCallback:n})||i.day(t,{width:"abbreviated",context:"formatting",valueCallback:n})||i.day(t,{width:"short",context:"formatting",valueCallback:n})||i.day(t,{width:"narrow",context:"formatting",valueCallback:n})}},validate:function(t,e,i){return e>=1&&e<=7},set:function(t,e,i){return(t=function(t,e,i){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=de(e);r%7==0&&(r-=7);var n=ye(t,i),a=((r%7+7)%7<1?7:0)+r-n.getUTCDay();return n.setUTCDate(n.getUTCDate()+a),n}(t,e,i)).setUTCHours(0,0,0,0),t}},a:{priority:80,parse:function(t,e,i,r){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,i){return t.setUTCHours(Ni(e),0,0,0),t}},b:{priority:80,parse:function(t,e,i,r){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}
1,set:function(t,e,i){return t.setUTCHours(Ni(e),0,0,0),t}},B:{priority:80,parse:function(t,e,i,r){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,i){return t.setUTCHours(Ni(e),0,0,0),t}},h:{priority:70,parse:function(t,e,i,r){switch(e){case"h":return Ai(_i.hour12h,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Mi(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=12},set:function(t,e,i){var r=t.getUTCHours()>=12;return r&&e<12?t.setUTCHours(e+12,0,0,0):r||12!==e?t.setUTCHours(e,0,0,0):t.setUTCHours(0,0,0,0),t}},H:{priority:70,parse:function(t,e,i,r){switch(e){case"H":return Ai(_i.hour23h,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Mi(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=23},set:function(t,e,i){return t.setUTCHours(e,0,0,0),t}},K:{priority:70,parse:function(t,e,i,r){switch(e){case"K":return Ai(_i.hour11h,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Mi(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i){return t.getUTCHours()>=12&&e<12?t.setUTCHours(e+12,0,0,0):t.setUTCHours(e,0,0,0),t}},k:{priority:70,parse:function(t,e,i,r){switch(e){case"k":return Ai(_i.hour24h,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Mi(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=24},set:function(t,e,i){var r=e<=24?e%24:e;return t.setUTCHours(r,0,0,0),t}},m:{priority:60,parse:function(t,e,i,r){switch(e){case"m":return Ai(_i.minute,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Mi(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=59},set:function(t,e,i){return t.setUTCMinutes(e,0,0),t}},s:{priority:50,parse:function(t,e,i,r){switch(e){case"s":return Ai(_i.second,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Mi(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=59},set:function(t,e,i){return t.setUTCSeconds(e,0),t}},S:{priority:40,parse:function(t,e,i,r){return Mi(e.length,t,function(t){return Math.floor(t*Math.pow(10,3-e.length))})},set:function(t,e,i){return t.setUTCMilliseconds(e),t}},X:{priority:20,parse:function(t,e,i,r){switch(e){case"X":return Ti(xi,t);case"XX":return Ti($i,t);case"XXXX":return Ti(Ci,t);case"XXXXX":return Ti(Di,t);case"XXX":default:return Ti(ki,t)}},set:function(t,e,i){return new Date(t.getTime()-e)}},x:{priority:20,parse:function(t,e,i,r){switch(e){case"x":return Ti(xi,t);case"xx":return Ti($i,t);case"xxxx":return Ti(Ci,t);case"xxxxx":return Ti(Di,t);case"xxx":default:return Ti(ki,t)}},set:function(t,e,i){return new Date(t.getTime()-e)}},t:{priority:10,parse:function(t,e,i,r){return Si(t)},set:function(t,e,i){return new Date(1e3*e)}},T:{priority:10,parse:function(t,e,i,r){return Si(t)},set:function(t,e,i){return new Date(e)}}},ji=20,zi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vi=/^'(.*?)'?$/,Ri=/''/g,Bi=/\S/;function Ui(t){var e=new Date(0);return e.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e}function Li(t,e){if("string"!=typeof t)return Ae(t)?t:null;var i=function(t,e,i,r){if(arguments.length<3)throw new TypeError("3 arguments required, but only "+arguments.length+" present");var n=String(t),a=String(e),s=r||{},o=s.locale||Ee;if(!o.match)throw new RangeError("locale must contain match property");var l=o.options&&o.options.firstWeekContainsDate,c=null==l?1:de(l),u=null==s.firstWeekContainsDate?c:de(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=o.options&&o.options.weekStartsOn,h=null==d?0:de(d),p=null==s.weekStartsOn?h:de(s.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===a)return""===n?ye(i,s):new Date(NaN);var f,v={firstWeekContainsDate:u,weekStartsOn:p,locale:o},m=[{priority:ji,set:Ui,index:0}],g=a.match(zi);for(f=0;f<g.length;f++){var y=g[f];!s.awareOfUnicodeTokens&&oi(y)&&li(y);var w=y[0],b=Fi[w];if(b){var _=b.parse(n,y,o.match,v);if(!_)return new Date(NaN);m.push({priority:b.priority,set:b.set,validate:b.validate,value:_.value,index:m.length}),n=_.rest}else{if("''"===y?y="'":"'"===w&&(y=y.match(Vi)[1].replace(Ri,"'")),0!==n.indexOf(y))return new Date(NaN);n=n.slice(y.length)}}if(n.length>0&&Bi.test(n))return new Date(NaN);var x=m.map(function(t){return t.priority}).sort(function(t,e){return e-t}
1).filter(function(t,e,i){return i.indexOf(t)===e}).map(function(t){return m.filter(function(e){return e.priority===t}).reverse()}).map(function(t){return t[0]}),$=ye(i,s);if(isNaN($))return new Date(NaN);var C=ai($,pe($));for(f=0;f<x.length;f++){var k=x[f];if(k.validate&&!k.validate(C,k.value,v))return new Date(NaN);C=k.set(C,k.value,v)}return C}(t,e,new Date);return Ae(i)&&pi(i,e)===t?i:null}var Hi={validate:function(t,e){void 0===e&&(e={});var i=e.targetValue,r=e.inclusion;void 0===r&&(r=!1);var n=e.format;return void 0===n&&(n=r,r=!1),t=Li(t,n),i=Li(i,n),!(!t||!i)&&(fi(t,i)||r&&mi(t,i))},options:{hasTarget:!0,isDate:!0},paramNames:["targetValue","inclusion","format"]},Wi={en:/^[A-Z]*$/i,cs:/^[A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ]*$/i,da:/^[A-ZÃÃÃ
]*$/i,de:/^[A-ZÃÃÃÃ]*$/i,es:/^[A-ZÃÃÃÃÃÃÃ]*$/i,fr:/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß]*$/i,it:/^[A-Z\xC0-\xFF]*$/i,lt:/^[A-ZÄÄÄÄĮŠŲŪŽ]*$/i,nl:/^[A-ZÃÃÃÃÃÃ]*$/i,hu:/^[A-ZÃÃÃÃÃÅÃÃŰ]*$/i,pl:/^[A-ZÄÄÄÅÅÅÃŻŹ]*$/i,pt:/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃ]*$/i,ru:/^[Ð-ЯÐ]*$/i,sk:/^[A-ZÃÃÄÄÃÃĹĽÅÃÅŠŤÃÃŽ]*$/i,sr:/^[A-ZÄÄŽŠÄ]*$/i,sv:/^[A-ZÃ
ÃÃ]*$/i,tr:/^[A-ZÃÄİıÃÅÃ]*$/i,uk:/^[Ð-ЩЬЮЯÐÐÐÒ]*$/i,ar:/^[Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°]*$/,az:/^[A-ZÃÆÄİıÃÅÃ]*$/i},Yi={en:/^[A-Z\s]*$/i,cs:/^[A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ\s]*$/i,da:/^[A-ZÃÃÃ
\s]*$/i,de:/^[A-ZÃÃÃÃ\s]*$/i,es:/^[A-ZÃÃÃÃÃÃÃ\s]*$/i,fr:/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß\s]*$/i,it:/^[A-Z\xC0-\xFF\s]*$/i,lt:/^[A-ZÄÄÄÄĮŠŲŪŽ\s]*$/i,nl:/^[A-ZÃÃÃÃÃÃ\s]*$/i,hu:/^[A-ZÃÃÃÃÃÅÃÃŰ\s]*$/i,pl:/^[A-ZÄÄÄÅÅÅÃŻŹ\s]*$/i,pt:/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃ\s]*$/i,ru:/^[Ð-ЯÐ\s]*$/i,sk:/^[A-ZÃÃÄÄÃÃĹĽÅÃÅŠŤÃÃŽ\s]*$/i,sr:/^[A-ZÄÄŽŠÄ\s]*$/i,sv:/^[A-ZÃ
ÃÃ\s]*$/i,tr:/^[A-ZÃÄİıÃÅÃ\s]*$/i,uk:/^[Ð-ЩЬЮЯÐÐÐÒ\s]*$/i,ar:/^[Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°\s]*$/,az:/^[A-ZÃÆÄİıÃÅÃ\s]*$/i},Gi={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ]*$/i,da:/^[0-9A-ZÃÃÃ
]$/i,de:/^[0-9A-ZÃÃÃÃ]*$/i,es:/^[0-9A-ZÃÃÃÃÃÃÃ]*$/i,fr:/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß]*$/i,it:/^[0-9A-Z\xC0-\xFF]*$/i,lt:/^[0-9A-ZÄÄÄÄĮŠŲŪŽ]*$/i,hu:/^[0-9A-ZÃÃÃÃÃÅÃÃŰ]*$/i,nl:/^[0-9A-ZÃÃÃÃÃÃ]*$/i,pl:/^[0-9A-ZÄÄÄÅÅÅÃŻŹ]*$/i,pt:/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃ]*$/i,ru:/^[0-9Ð-ЯÐ]*$/i,sk:/^[0-9A-ZÃÃÄÄÃÃĹĽÅÃÅŠŤÃÃŽ]*$/i,sr:/^[0-9A-ZÄÄŽŠÄ]*$/i,sv:/^[0-9A-ZÃ
ÃÃ]*$/i,tr:/^[0-9A-ZÃÄİıÃÅÃ]*$/i,uk:/^[0-9Ð-ЩЬЮЯÐÐÐÒ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°]*$/,az:/^[0-9A-ZÃÆÄİıÃÅÃ]*$/i},Xi={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ_-]*$/i,da:/^[0-9A-ZÃÃÃ
_-]*$/i,de:/^[0-9A-ZÃÃÃÃ_-]*$/i,es:/^[0-9A-ZÃÃÃÃÃÃÃ_-]*$/i,fr:/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß_-]*$/i,it:/^[0-9A-Z\xC0-\xFF_-]*$/i,lt:/^[0-9A-ZÄÄÄÄĮŠŲŪŽ_-]*$/i,nl:/^[0-9A-ZÃÃÃÃÃÃ_-]*$/i,hu:/^[0-9A-ZÃÃÃÃÃÅÃÃŰ_-]*$/i,pl:/^[0-9A-ZÄÄÄÅÅÅÃŻŹ_-]*$/i,pt:/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃ_-]*$/i,ru:/^[0-9Ð-ЯÐ_-]*$/i,sk:/^[0-9A-ZÃÃÄÄÃÃĹĽÅÃÅŠŤÃÃŽ_-]*$/i,sr:/^[0-9A-ZÄÄŽŠÄ_-]*$/i,sv:/^[0-9A-ZÃ
ÃÃ_-]*$/i,tr:/^[0-9A-ZÃÄİıÃÅÃ_-]*$/i,uk:/^[0-9Ð-ЩЬЮЯÐÐÐÒ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°_-]*$/,az:/^[0-9A-ZÃÆÄİıÃÅÃ_-]*$/i},Zi=function(t,e){void 0===e&&(e={});var i=e.locale;return Array.isArray(t)?t.every(function(t){return Zi(t,[i])}):i?(Wi[i]||Wi.en).test(t):Object.keys(Wi).some(function(e){return Wi[e].test(t)})},Ki={validate:Zi,paramNames:["locale"]},Qi=function(t,e){void 0===e&&(e={});var i=e.locale;return Array.isArray(t)?t.every(function(t){return Qi(t,[i])}):i?(Xi[i]||Xi.en).test(t):Object.keys(Xi).some(function(e){return Xi[e].test(t)})},Ji={validate:Qi,paramNames:["locale"]},tr=function(t,e){void 0===e&&(e={});var i=e.locale;return Array.isArray(t)?t.every(function(t){return tr(t,[i])}):i?(Gi[i]||Gi.en).test(t):Object.keys(Gi).some(function(e){return Gi[e].test(t)})},er={validate:tr,paramNames:["locale"]},ir=function(t,e){void 0===e&&(e={});var i=e.locale;return Array.isArray(t)?t.every(function(t){return ir(t,[i])}):i?(Yi[i]||Yi.en).test(t):Object.keys(Yi).some(function(e){return Yi[e].test(t)})},rr={validate:ir,paramNames:["locale"]},nr={validate:function(t,e){void 0===e&&(e={});var i=e.targetValue,r=e.inclusion;void 0===r&&(r=!1);var n=e.format;return void 0===n&&(n=r,r=!1),t=Li(t,n),i=Li(i,n),!(!t||!i)&&(vi(t,i)||r&&mi(t,i))},options:{hasTarget:!0,isDate:!0},paramNames:["targetValue","inclusion","format"]},ar=function(t,e){void 0===e&&(e={});var i=e.min,r=e.max;return Array.isArray(t)?t.every(function(t){return ar(t,{min:i,max:r})}):Number(i)<=t&&Number(r)>=t},sr={validate:ar,paramNames:["min","max"]},or={validate:function(t,e){var i=e.targetValue;return String(t)===String(i)},options:{hasTarget:!0},paramNames:["targetValue"]};function lr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function cr(t,e){return t(e={exports:{}},e.exports),e.exports}
1var ur=cr(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="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){if(!("string"==typeof t||t instanceof String)){var e=void 0;throw e=null===t?"null":"object"===(e=void 0===t?"undefined":i(t))&&t.constructor&&t.constructor.hasOwnProperty("name")?t.constructor.name:"a "+e,new TypeError("Expected string but received "+e+".")}},t.exports=e.default});lr(ur);var dr=lr(cr(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){(0,i.default)(t);var e=t.replace(/[- ]+/g,"");if(!r.test(e))return!1;for(var n=0,a=void 0,s=void 0,o=void 0,l=e.length-1;l>=0;l--)a=e.substring(l,l+1),s=parseInt(a,10),n+=o&&(s*=2)>=10?s%10+1:s,o=!o;return!(n%10!=0||!e)};var i=function(t){return t&&t.__esModule?t:{default:t}}(ur);var r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14})$/;t.exports=e.default})),hr={validate:function(t){return dr(String(t))}},pr={validate:function(t,e){void 0===e&&(e={});var i=e.min,r=e.max,n=e.inclusivity;void 0===n&&(n="()");var a=e.format;void 0===a&&(a=n,n="()");var s=Li(String(i),a),o=Li(String(r),a),l=Li(String(t),a);return!!(s&&o&&l)&&("()"===n?fi(l,s)&&vi(l,o):"(]"===n?fi(l,s)&&(mi(l,o)||vi(l,o)):"[)"===n?vi(l,o)&&(mi(l,s)||fi(l,s)):mi(l,o)||mi(l,s)||vi(l,o)&&fi(l,s))},options:{isDate:!0},paramNames:["min","max","inclusivity","format"]},fr={validate:function(t,e){return!!Li(t,e.format)},options:{isDate:!0},paramNames:["format"]},vr=function(t,e){void 0===e&&(e={});var i=e.decimals;void 0===i&&(i="*");var r=e.separator;if(void 0===r&&(r="."),z(t)||""===t)return!1;if(Array.isArray(t))return t.every(function(t){return vr(t,{decimals:i,separator:r})});if(0===Number(i))return/^-?\d*$/.test(t);if(!new RegExp("^[-+]?\\d*(\\"+r+"\\d"+("*"===i?"+":"{1,"+i+"}")+")?$").test(t))return!1;var n=parseFloat(t);return n==n},mr={validate:vr,paramNames:["decimals","separator"]},gr=function(t,e){var i=e[0];if(Array.isArray(t))return t.every(function(t){return gr(t,[i])});var r=String(t);return/^[0-9]*$/.test(r)&&r.length===Number(i)},yr={validate:gr},wr=/\.(jpg|svg|jpeg|png|bmp|gif)$/i,br={validate:function(t,e){var i=e[0],r=e[1],n=J(t).filter(function(t){return wr.test(t.name)});return 0!==n.length&&Promise.all(n.map(function(t){return function(t,e,i){var r=window.URL||window.webkitURL;return new Promise(function(n){var a=new Image;a.onerror=function(){return n({valid:!1})},a.onload=function(){return n({valid:a.width===Number(e)&&a.height===Number(i)})},a.src=r.createObjectURL(t)})}(t,i,r)}))}},_r=cr(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];for(var i in e)void 0===t[i]&&(t[i]=e[i]);return t},t.exports=e.default});lr(_r);var xr=cr(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="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,e){(0,r.default)(t);var n=void 0,a=void 0;"object"===(void 0===e?"undefined":i(e))?(n=e.min||0,a=e.max):(n=arguments[1],a=arguments[2]);var s=encodeURI(t).split(/%..|./).length-1;return s>=n&&(void 0===a||s<=a)};var r=function(t){return t&&t.__esModule?t:{default:t}}(ur);t.exports=e.default});lr(xr);var $r=cr(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,i.default)(t),(e=(0,r.default)(e,a)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));for(var n=t.split("."),s=0;s<n.length;s++)if(n[s].length>63)return!1;if(e.require_tld){var o=n.pop();if(!n.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(o))return!1}for(var l,c=0;c<n.length;c++){if(l=n[c],e.allow_underscores&&(l=l.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(l))return!1;if(/[\uff01-\uff5e]/.test(l))return!1;if("-"===l[0]||"-"===l[l.length-1])return!1}return!0};var i=n(ur),r=n(_r);function n(t){return t&&t.__esModule?t:{default:t}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};t.exports=e.default}
1),Cr=lr($r),kr=cr(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,i.default)(e);a=String(a);if(!a)return t(e,4)||t(e,6);if("4"===a){if(!r.test(e))return!1;var s=e.split(".").sort(function(t,e){return t-e});return s[3]<=255}if("6"===a){var o=e.split(":"),l=!1,c=t(o[o.length-1],4),u=c?7:8;if(o.length>u)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(o.shift(),o.shift(),l=!0):"::"===e.substr(e.length-2)&&(o.pop(),o.pop(),l=!0);for(var d=0;d<o.length;++d)if(""===o[d]&&d>0&&d<o.length-1){if(l)return!1;l=!0}else if(c&&d===o.length-1);else if(!n.test(o[d]))return!1;return l?o.length>=1:o.length===u}return!1};var i=function(t){return t&&t.__esModule?t:{default:t}}(ur);var r=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,n=/^[0-9A-F]{1,4}$/i;t.exports=e.default}),Dr=lr(kr),Ar=lr(cr(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,i.default)(t),(e=(0,r.default)(e,l)).require_display_name||e.allow_display_name){var o=t.match(c);if(o)t=o[1];else if(e.require_display_name)return!1}var v=t.split("@"),m=v.pop(),g=v.join("@"),y=m.toLowerCase();if(e.domain_specific_validation&&("gmail.com"===y||"googlemail.com"===y)){var w=(g=g.toLowerCase()).split("+")[0];if(!(0,n.default)(w.replace(".",""),{min:6,max:30}))return!1;for(var b=w.split("."),_=0;_<b.length;_++)if(!d.test(b[_]))return!1}if(!(0,n.default)(g,{max:64})||!(0,n.default)(m,{max:254}))return!1;if(!(0,a.default)(m,{require_tld:e.require_tld})){if(!e.allow_ip_domain)return!1;if(!(0,s.default)(m)){if(!m.startsWith("[")||!m.endsWith("]"))return!1;var x=m.substr(1,m.length-2);if(0===x.length||!(0,s.default)(x))return!1}}if('"'===g[0])return g=g.slice(1,g.length-1),e.allow_utf8_local_part?f.test(g):h.test(g);for(var $=e.allow_utf8_local_part?p:u,C=g.split("."),k=0;k<C.length;k++)if(!$.test(C[k]))return!1;return!0};var i=o(ur),r=o(_r),n=o(xr),a=o($r),s=o(kr);function o(t){return t&&t.__esModule?t:{default:t}}var l={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},c=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\,\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,u=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,d=/^[a-z\d]+$/,h=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,p=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;t.exports=e.default}));var Tr={validate:function(t,e){void 0===e&&(e={});var i=e.multiple;void 0===i&&(i=!1);var r=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===e.indexOf(r)&&(i[r]=t[r]);return i}(e,["multiple"]);i&&!Array.isArray(t)&&(t=String(t).split(",").map(function(t){return t.trim()}));var n=tt({},r);return Array.isArray(t)?t.every(function(t){return Ar(String(t),n)}):Ar(String(t),n)}},Sr=function(t,e){return Array.isArray(t)?t.every(function(t){return Sr(t,e)}):Q(e).some(function(e){return e==t})},Mr={validate:Sr},Ir={validate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return!Sr.apply(void 0,t)}},Nr={validate:function(t,e){var i=new RegExp(".("+e.join("|")+")$","i");return J(t).every(function(t){return i.test(t.name)})}},Or={validate:function(t){return(Array.isArray(t)?t:[t]).every(function(t){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(t.name)})}},Pr={validate:function(t){return Array.isArray(t)?t.every(function(t){return/^-?[0-9]+$/.test(String(t))}):/^-?[0-9]+$/.test(String(t))}},Er={validate:function(t,e){void 0===e&&(e={});var i=e.version;return void 0===i&&(i=4),z(t)&&(t=""),Array.isArray(t)?t.every(function(t){return Dr(t,i)}):Dr(t,i)},paramNames:["version"]},qr={validate:function(t){return z(t)&&(t=""),Array.isArray(t)?t.every(function(t){return Dr(t,"")||Cr(t)}):Dr(t,"")||Cr(t)}},Fr={validate:function(t,e){return void 0===e&&(e=[]),t===e[0]}},jr={validate:function(t,e){return void 0===e&&(e=[]),t!==e[0]}},zr={validate:function(t,e){var i=e[0],r=e[1];return void 0===r&&(r=void 0),!z(t)&&(i=Number(i),"number"==typeof t&&(t=String(t)),t.length||(t=Q(t)),function(t,e,
1i){return void 0===i?t.length===e:(i=Number(i),t.length>=e&&t.length<=i)}(t,i,r))}},Vr=function(t,e){var i=e[0];return z(t)?i>=0:Array.isArray(t)?t.every(function(t){return Vr(t,[i])}):String(t).length<=i},Rr={validate:Vr},Br=function(t,e){var i=e[0];return!z(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every(function(t){return Br(t,[i])}):Number(t)<=i)},Ur={validate:Br},Lr={validate:function(t,e){var i=new RegExp(e.join("|").replace("*",".+")+"$","i");return J(t).every(function(t){return i.test(t.type)})}},Hr=function(t,e){var i=e[0];return!z(t)&&(Array.isArray(t)?t.every(function(t){return Hr(t,[i])}):String(t).length>=i)},Wr={validate:Hr},Yr=function(t,e){var i=e[0];return!z(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every(function(t){return Yr(t,[i])}):Number(t)>=i)},Gr={validate:Yr},Xr=/^[٠١٢٣٤٥٦٧٨٩]+$/,Zr=/^[0-9]+$/,Kr={validate:function(t){var e=function(t){var e=String(t);return Zr.test(e)||Xr.test(e)};return Array.isArray(t)?t.every(e):e(t)}},Qr=function(t,e){var i=e.expression;return"string"==typeof i&&(i=new RegExp(i)),Array.isArray(t)?t.every(function(t){return Qr(t,{expression:i})}):i.test(String(t))},Jr={validate:Qr,paramNames:["expression"]},tn={validate:function(t,e){void 0===e&&(e=[]);var i=e[0];return void 0===i&&(i=!1),!(z(t)||dt(t)||!1===t&&i||!String(t).trim().length)}},en={validate:function(t,e){void 0===e&&(e=[]);var i=e[0],r=e.slice(1).includes(String(i).trim());if(!r)return{valid:!0,data:{required:r}};var n=dt(t)||[!1,null,void 0].includes(t);return{valid:!(n=n||!String(t).trim().length),data:{required:r}}},options:{hasTarget:!0,computesRequired:!0}},rn={validate:function(t,e){var i=e[0];if(isNaN(i))return!1;var r=1024*Number(i);return J(t).every(function(t){return t.size<=r})}},nn=lr(cr(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,i.default)(t),!t||t.length>=2083||/[\s<>]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;e=(0,a.default)(e,o);var s=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,v=void 0,m=void 0;if(v=t.split("#"),t=v.shift(),v=t.split("?"),t=v.shift(),(v=t.split("://")).length>1){if(s=v.shift().toLowerCase(),e.require_valid_protocol&&-1===e.protocols.indexOf(s))return!1}else{if(e.require_protocol)return!1;if("//"===t.substr(0,2)){if(!e.allow_protocol_relative_urls)return!1;v[0]=t.substr(2)}}if(""===(t=v.join("://")))return!1;if(v=t.split("/"),""===(t=v.shift())&&!e.require_host)return!0;if((v=t.split("@")).length>1&&(c=v.shift()).indexOf(":")>=0&&c.split(":").length>2)return!1;h=v.join("@"),f=null,m=null;var g=h.match(l);g?(d="",m=g[1],f=g[2]||null):(v=h.split(":"),d=v.shift(),v.length&&(f=v.join(":")));if(null!==f&&(p=parseInt(f,10),!/^[0-9]+$/.test(f)||p<=0||p>65535))return!1;if(!((0,n.default)(d)||(0,r.default)(d,e)||m&&(0,n.default)(m,6)))return!1;if(d=d||m,e.host_whitelist&&!u(d,e.host_whitelist))return!1;if(e.host_blacklist&&u(d,e.host_blacklist))return!1;return!0};var i=s(ur),r=s($r),n=s(kr),a=s(_r);function s(t){return t&&t.__esModule?t:{default:t}}var o={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},l=/^\[([^\]]+)\](?::([0-9]+))?$/;function c(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function u(t,e){for(var i=0;i<e.length;i++){var r=e[i];if(t===r||c(r)&&r.test(t))return!0}return!1}t.exports=e.default})),an={validate:function(t,e){void 0===e&&(e={}),z(t)&&(t="");var i=tt({},e);return Array.isArray(t)?t.every(function(t){return nn(t,i)}):nn(t,i)}},sn=Object.freeze({after:Hi,alpha_dash:Ji,alpha_num:er,alpha_spaces:rr,alpha:Ki,before:nr,between:sr,confirmed:or,credit_card:hr,date_between:pr,date_format:fr,decimal:mr,digits:yr,dimensions:br,email:Tr,ext:Nr,image:Or,included:Mr,integer:Pr,length:zr,ip:Er,ip_or_fqdn:qr,is_not:jr,is:Fr,max:Rr,max_value:Ur,mimes:Lr,min:Wr,min_value:Gr,excluded:Ir,numeric:Kr,regex:Jr,required:tn,required_if:en,size:rn,url:an}),on=function(t,e){var i={pristine:function(t,e){return t&&e},dirty:function(t,e){return t||e},touched:function(t,e){return t||e},untouched:function(t,e){return t&&e},valid:function(t,e){return t&&e},invalid:function(t,e){return t||e},pending:function(t,e){return t||e},required:function(t,e){return t||e},validated:function(t,e){return t&&e}};return Object.keys(i).reduce(function(r,n){return r[n]=i[n](t[n],e[n]),r},{})},ln=function(t,e){return void 0===e&&(e=!0),Object.keys(t).reduce(function(i,r){if(!i)return i=tt({},t[r]);var n=0===r.indexOf("$");return e&&n?on(ln(t[r]),i):!e&&n?i:i=on(i,t[r])},null)},cn=null,un=0;function dn(t){return{errors:t.messages,flags:t.flags,classes:t.classes,val
1id:t.isValid,failedRules:t.failedRules,reset:function(){return t.reset()},validate:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];return t.validate.apply(t,e)},aria:{"aria-invalid":t.flags.invalid?"true":"false","aria-required":t.isRequired?"true":"false"}}}function hn(t){return(X(t.mode)?t.mode:ae[t.mode])({errors:t.messages,value:t.value,flags:t.flags})}function pn(t){this.initialized||(this.initialValue=t.value);var e=function(t,e){return!(t._ignoreImmediate||!t.immediate)||t.value!==e.value||!!t._needsValidation||!t.initialized&&void 0===e.value}(this,t);this._needsValidation=!1,this.value=t.value,this._ignoreImmediate=!0,e&&this.validateSilent().then(this.immediate||this.flags.validated?this.applyResult:function(t){return t})}function fn(t){var e=t.$veeHandler,i=hn(t);return e&&t.$veeDebounce===t.debounce||(e=U(function(){t.$nextTick(function(){var e=t.validateSilent();t._pendingValidation=e,e.then(function(i){e===t._pendingValidation&&(t.applyResult(i),t._pendingValidation=null)})})},i.debounce||t.debounce),t.$veeHandler=e,t.$veeDebounce=t.debounce),{onInput:function(e){t.syncValue(e),t.setFlags({dirty:!0,pristine:!1})},onBlur:function(){t.setFlags({touched:!0,untouched:!1})},onValidate:e}}var vn={$__veeInject:!1,inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver={refs:{},subscribe:function(t){this.refs[t.vid]=t},unsubscribe:function(t){delete this.refs[t.vid]}}),this.$vnode.context.$_veeObserver}}},props:{vid:{type:[String,Number],default:function(){return"_vee_"+ ++un}},name:{type:String,default:null},mode:{type:[String,Function],default:function(){return xt().mode}},events:{type:Array,validate:function(){return!0},default:function(){var t=xt().events;return"string"==typeof t?t.split("|"):t}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},persist:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return xt().fastExit}},debounce:{type:Number,default:function(){return xt().delay||0}},tag:{type:String,default:"span"}},watch:{rules:{deep:!0,handler:function(t,e){this._needsValidation=!V(t,e)}}},data:function(){return{messages:[],value:void 0,initialized:!1,initialValue:void 0,flags:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},failedRules:{},forceRequired:!1,isDeactivated:!1,id:null}},computed:{isValid:function(){return this.flags.valid},fieldDeps:function(){var t=this,e=H(this.rules),i=this.$_veeObserver.refs;return Object.keys(e).filter(Nt.isTargetRule).map(function(r){var n=e[r][0],a="$__"+n;return!X(t[a])&&i[n]&&(t[a]=i[n].$watch("value",function(){t.flags.validated&&(t._needsValidation=!0,t.validate())})),n})},normalizedEvents:function(){var t=this,e=hn(this).on;return Et(e||this.events||[]).map(function(e){return"input"===e?t._inputEventName:e})},isRequired:function(){var t=H(this.rules),e=this.forceRequired,i=t.required||e;return this.flags.required=i,i},classes:function(){var t=this,e=xt().classNames;return Object.keys(this.flags).reduce(function(i,r){var n=e&&e[r]||r;return z(t.flags[r])?i:(n&&(i[n]=t.flags[r]),i)},{})}},render:function(t){var e=this;this.registerField();var i=dn(this),r=this.$scopedSlots.default;if(!X(r))return t(this.tag,this.$slots.default);var n=r(i);return kt(n).forEach(function(t){(function(t){var e=Ct(t);this._inputEventName=this._inputEventName||St(t,e),pn.call(this,e);var i=fn(this),r=i.onInput,n=i.onBlur,a=i.onValidate;Tt(t,this._inputEventName,r),Tt(t,"blur",n),this.normalizedEvents.forEach(function(e){Tt(t,e,a)}),this.initialized=!0}).call(e,t)}),t(this.tag,n)},beforeDestroy:function(){this.$_veeObserver.unsubscribe(this)},activated:function(){this.$_veeObserver.subscribe(this),this.isDeactivated=!1},deactivated:function(){this.$_veeObserver.unsubscribe(this),this.isDeactivated=!0},methods:{setFlags:function(t){var e=this;Object.keys(t).forEach(function(i){e.flags[i]=t[i]})},syncValue:function(t){var e=function(t){return Pt(t)?"file"===t.target.type?Q(t.target.files):t.target.value:t}(t);this.value=e,this.flags.changed=this.initialValue!==e},reset:function(){this.messages=[],this._pendingValidation=null,this.initialValue=this.value;var t={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invali
1d:null,validated:!1,pending:!1,required:!1,changed:!1};this.setFlags(t)},validate:function(){for(var t=this,e=[],i=arguments.length;i--;)e[i]=arguments[i];return e.length>0&&this.syncValue(e[0]),this.validateSilent().then(function(e){return t.applyResult(e),e})},validateSilent:function(){var t,e,i=this;return this.setFlags({pending:!0}),cn.verify(this.value,this.rules,{name:this.name,values:(t=this,e=t.$_veeObserver.refs,t.fieldDeps.reduce(function(t,i){return e[i]?(t[i]=e[i].value,t):t},{})),bails:this.bails}).then(function(t){return i.setFlags({pending:!1}),i.isRequired||i.setFlags({valid:t.valid,invalid:!t.valid}),t})},applyResult:function(t){var e=t.errors,i=t.failedRules;this.messages=e,this.failedRules=tt({},i),this.setFlags({valid:!e.length,changed:this.value!==this.initialValue,invalid:!!e.length,validated:!0})},registerField:function(){cn||(cn=Wt()||new Zt(null,{fastExit:xt().fastExit})),function(t){z(t.id)&&t.id===t.vid&&(t.id=un,un++);var e=t.id,i=t.vid;t.isDeactivated||e===i&&t.$_veeObserver.refs[e]||(e!==i&&t.$_veeObserver.refs[e]===t&&t.$_veeObserver.unsubscribe(t),t.$_veeObserver.subscribe(t),t.id=i)}(this)}}},mn={pristine:"every",dirty:"some",touched:"some",untouched:"every",valid:"every",invalid:"some",pending:"some",validated:"every"};var gn=0,yn={name:"ValidationObserver",provide:function(){return{$_veeObserver:this}},inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver?this.$vnode.context.$_veeObserver:null}}},props:{tag:{type:String,default:"span"}},data:function(){return{vid:"obs_"+gn++,refs:{},observers:[]}},computed:{ctx:function(){var t=this,e={errors:{},validate:function(e){var i=t.validate(e);return{then:function(t){i.then(function(e){return e&&X(t)?Promise.resolve(t()):Promise.resolve(e)})}}},reset:function(){return t.reset()}};return ct(this.refs).concat(this.observers).reduce(function(t,e){return Object.keys(mn).forEach(function(i){var r,n,a=e.flags||e.ctx;i in t?t[i]=(r=t[i],n=a[i],[r,n][mn[i]](function(t){return t})):t[i]=a[i]}),t.errors[e.vid]=e.messages||ct(e.ctx.errors).reduce(function(t,e){return t.concat(e)},[]),t},e)}},created:function(){this.$_veeObserver&&this.$_veeObserver.subscribe(this,"observer")},activated:function(){this.$_veeObserver&&this.$_veeObserver.subscribe(this,"observer")},deactivated:function(){this.$_veeObserver&&this.$_veeObserver.unsubscribe(this,"observer")},beforeDestroy:function(){this.$_veeObserver&&this.$_veeObserver.unsubscribe(this,"observer")},render:function(t){var e=this.$scopedSlots.default;return this._persistedStore=this._persistedStore||{},X(e)?t(this.tag,{on:this.$listeners,attrs:this.$attrs},e(this.ctx)):t(this.tag,this.$slots.default)},methods:{subscribe:function(t,e){var i;void 0===e&&(e="provider"),"observer"!==e?(this.refs=Object.assign({},this.refs,((i={})[t.vid]=t,i)),t.persist&&this._persistedStore[t.vid]&&this.restoreProviderState(t)):this.observers.push(t)},unsubscribe:function(t,e){var i=t.vid;void 0===e&&(e="provider"),"provider"===e&&this.removeProvider(i);var r=rt(this.observers,function(t){return t.vid===i});-1!==r&&this.observers.splice(r,1)},validate:function(t){void 0===t&&(t={silent:!1});var e=t.silent;return Promise.all(ct(this.refs).map(function(t){return t[e?"validateSilent":"validate"]().then(function(t){return t.valid})}).concat(this.observers.map(function(t){return t.validate({silent:e})}))).then(function(t){return t.every(function(t){return t})})},reset:function(){return ct(this.refs).concat(this.observers).forEach(function(t){return t.reset()})},restoreProviderState:function(t){var e=this._persistedStore[t.vid];t.setFlags(e.flags),t.applyResult(e),delete this._persistedStore[t.vid]},removeProvider:function(t){var e=this.refs[t];e&&e.persist&&(this._persistedStore[t]={flags:e.flags,errors:e.messages,failedRules:e.failedRules}),this.$delete(this.refs,t)}}};Object.keys(sn).forEach(function(t){Zt.extend(t,sn[t].validate,tt({},sn[t].options,{paramNames:sn[t].paramNames}))}),Zt.localize({en:ue});se.version="2.2.4",se.mapFields=function(t){if(!t)return function(){return ln(this.$validator.flags)};var e=function(t){return Array.isArray(t)?t.reduce(function(t,e){return ut(e,".")?t[e.split(".")[1]]=e:t[e]=e,t},{}):t}(t);return Object.keys(e).reduce(function(t,i){var r=e[i];return t[i]=function(){if(this.$validator.flags[r])return this.$validator.flags[r];if("*"===e[i])return ln(this.$validator.flags,!1);if(r.indexOf(".")<=0)return{};var t=r.split("."),n=t[0],a=t.slice(1);return n=this.$validator.flags["$"+n],"*"===(a=a.join("."))&&n?ln(n):n&&n[a]?n[a]:{}},t},{})},se.ValidationProvider=vn,se.ValidationObserver=yn,se.withValidation=function(t,e){void 0===e&&(e=null);var i=X(t)?t.options:t;i.$__veeInject=!1;
1var r={name:(i.name||"AnonymousHoc")+"WithValidation",props:tt({},vn.props),data:vn.data,computed:tt({},vn.computed),methods:tt({},vn.methods),$__veeInject:!1,beforeDestroy:vn.beforeDestroy,inject:vn.inject};e||(e=function(t){return t});var n=i.model&&i.model.event||"input";return r.render=function(t){var r;this.registerField();var a=dn(this),s=tt({},this.$listeners),o=Ct(this.$vnode);this._inputEventName=this._inputEventName||St(this.$vnode,o),pn.call(this,o);var l=fn(this),c=l.onInput,u=l.onBlur,d=l.onValidate;At(s,n,c),At(s,"blur",u),this.normalizedEvents.forEach(function(t,e){At(s,t,d)});var h,p,f=(Dt(this.$vnode)||{prop:"value"}).prop,v=tt({},this.$attrs,((r={})[f]=o.value,r),e(a));return t(i,{attrs:this.$attrs,props:v,on:s},(h=this.$slots,p=this.$vnode.context,Object.keys(h).reduce(function(t,e){return h[e].forEach(function(t){t.context||(h[e].context=p,t.data||(t.data={}),t.data.slot=e)}),t.concat(h[e])},[])))},r};var wn=se,bn=i(25);function _n(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}function xn(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?_n(i,!0).forEach(function(e){h()(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):_n(i).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var $n={mdiCrop:a.X,mdiDownload:a.db,mdiCheckboxMarked:a.E,mdiCheckboxBlankOutline:a.D,mdiMenuUp:a.qc,mdiMenuDown:a.nc,mdiCheckBold:a.A,mdiCamera:a.v,mdiCloudUpload:a.R,mdiDatabaseEdit:a.Y,mdiClose:a.M,mdiFullscreen:a.Tb,mdiFormatColorFill:a.zb,mdiGestureTap:a.Ub,mdiPlus:a.Cc,mdiPercentOutline:a.yc,mdiPencil:a.wc,mdiCalendarEdit:a.t,mdiEye:a.ib,mdiEyeOff:a.kb,mdiCash:a.w,mdiRadioboxMarked:a.Gc,mdiCheckCircle:a.B,mdiRadioboxBlank:a.Fc,mdiDelete:a.ab,mdiDotsVertical:a.cb,mdiChevronDoubleUp:a.H,mdiChevronUp:a.L,mdiChevronDoubleDown:a.G,mdiChevronDown:a.I,mdiArrowDown:a.h,components:{ValidationProvider:vn,ModelFilter:bn.a},props:{copyFromHtml:{type:String,required:!1},getValue:{type:Function,required:!1},returnObject:{type:Boolean,required:!1,default:!1},cropRatios:{type:Array,required:!1},cropSrc:{type:String,required:!1},cropSourceProp:{type:String,required:!1},slugOfValue:{type:String,required:!1},value:{required:!0},dirty:{type:Boolean,required:!1,default:void 0},name:{type:String,required:!0},icon:{type:String,required:!1},type:{type:String,required:!0},rules:{type:String,required:!1,default:""},iconEnd:{type:Boolean,required:!1,default:!1},noIcon:{type:Boolean,required:!1,default:!1},hideDetails:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},color:{type:String,required:!1,default:"primary"},customOriginName:{type:String,required:!1},label:{type:String,required:!1,default:void 0},loading:{type:Boolean,required:!1,default:!1},placeholder:{type:String,required:!1,default:void 0},paramsModel:{type:String,required:!1,default:void 0},paramsId:{type:String,required:!1,default:void 0},paramsAttribute:{required:!1,default:void 0},fileExtensions:{required:!1,default:void 0},messages:{type:Array,required:!1,default:void 0},resource:{required:!1},rowsCount:{type:[String,Number],required:!1,default:void 0},textareaByDefault:{required:!1,default:!0},forceMultiple:{type:[Boolean,Number],required:!1,default:void 0},multipleSplitBy:{type:String,required:!1,default:void 0},htmlType:{type:String,required:!1,default:void 0},dir:{type:String,required:!1,default:"auto"},customFilters:{type:[Array,Object],required:!1,default:void 0},newItem:{type:Object,required:!1,default:void 0},linkableSections:{required:!1},linkableReferences:{required:!1}},data:()=>({cropperResetCount:0,canShowFilter:!1,innerLoading:!1,datetimeMenu:!1,datetimeMenuX:0,datetimeMenuY:0,datePickerActive:!0,dateValue:"",timeValue:"",jsonDialogActive:!1,dropzoneDialogActive:!1,cropDialogActive:!1,fileGroupsDialogActive:!1,fileGroupsEditIndex:-1,fileGroupsEditFile:{},passwordVisible:!1,modelEditorDialog:!1,modelEditorCanInput:!1,modelEmailEditorDialog:!1,modelEmailEditorCanInput:!1,isModelFullscreen:!1,search:void 0,valueItems:[],colorMenuActive:!1,colorCodes:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b","#000000","#ffffff"],treeParentId:null,arrayNewItem:"",arrayErrorMessages:[],arrayMenuActive:!1,arrayMenuActiveX:0,arrayMenuActiveY:0,arrayMenuDeleteActive:!1,hasRealItems:!1,modelNewItemFill:{},modelNewItemSending:!1,modelNewItemDialogActive:!1}),computed:{iconSlotName(){return this.iconEnd?"append":"prepend"},originName(){return this.customOriginName||"modelInput"},typeParts(){return this.type.split("::")},typeOptions(){return this.typeParts[1]?JSON.parse(this.typeParts[1]):void 0},isResourceArray(){return this.type.startsWith("array::")}
1,isResourceType(){if(this.isResourceArray)return!0;switch(this.typeParts[0]){case"object":case"json":case"color":case"size":case"crop":case"image_sm":case"image":case"image_lg":case"file_group_array":case"file":case"string":case"html":case"email_html":case"password":case"int":case"price":case"percent":case"double":case"timestamp":case"select":case"array":case"model":case"check":return!1}return!0},resourceType(){return this.isResourceArray?this.typeParts[1]:this.type},theState(){return this.$store.state[this.resourceType]||{}},user(){return this.$store.state.client.user},model(){if(!this.isResourceType)return;const{models:t}=this.$store.state.client.user;return t[this.resourceType]},isFullModel(){return!!this.isResourceType&&(!this.model||!!this.model.specs.inputFull)},isModelNotFull(){return this.isResourceType&&!this.isFullModel},isTreeview(){return this.model&&this.model.specs.treeview},modelNewItem(){const{newItem:t,model:e}=this;if(!t||!e)return null;const i={name:t.name,properties:{},rules:{},paramsModel:this.resourceType,color:e.specs.color||"primary"};for(const r in t.props)i.properties[r]=e.properties[r],i.rules[r]=t.props[r];return i},modelNewItemKey(){const{modelNewItem:t}=this;if(!t)return null;let e="";for(const i in t.properties)e+=`-${i}`;return`${t.paramsModel}-${e}`},filters:{get(){if(!this.isResourceType||!this.theState.options)return[];const{filters:t}=this.theState.options[this.originName]||{};return t||[]},set(t){this.tryGet(t)}},_loading(){return this.loading||this.innerLoading},stateItems(){if(this.isResourceType){const{items:t}=this.theState;return Array.isArray(t)?t:[]}return[]},_realItems(){if(this.isResourceType){let t=this.stateItems.filter(t=>t.origins.includes(this.originName));this.isTreeview&&(t=t.filter(t=>t.data.$.parent_id===this.treeParentId));const e=this.isResourceArray;return t.map(t=>{const i=t.data.id_title||t.id;return{text:i,value:e?i:t.id,subText:t.data.roles?`id ${t.id} ${t.data.roles}`:void 0,avatar:this.isTreeview?void 0:t.data.avatar||t.data.logo||t.data.cover}})}if("select"===this.typeParts[0])try{return Object.entries(this.typeOptions).map(t=>{const e=this.$trans(t[1]);return{value:t[0],text:e}})}catch(t){return console.warn(t),[]}if("model"===this.type){const t=[],{models:e}=this.user;for(const i in e)this.$store.getters["client/can"][i].index&&t.push({value:i,text:e[i].specs.singular});return t.sort((t,e)=>t.text.localeCompare(e.text)),t}},_items(){if(!this._realItems)return;const t=[];return this.valueItems.forEach(e=>{-1===this._realItems.findIndex(t=>e.value==t.value)&&t.push(xn({},e,{isValueItem:!0}))}),t.concat(this._realItems)},multiple(){return void 0!==this.forceMultiple?!!this.forceMultiple:"check"!==this.typeParts[0]&&("file_group_array"===this.typeParts[0]||("array"===this.typeParts[0]||(!("json"!==this.typeParts[0]||!this.typeParts[1])||this.hasRealItems&&this.$helpers.isPlural(this.name))))},_label_lower(){return void 0!==this.label?this.label:this.$helpers.translations[this.name]?this.$helpers.translations[this.name]:this.model?this.multiple?this.model.specs.plural:this.model.specs.singular:this.$trans(this.name)},_label(){let t=this._label_lower;return t&&(t=t[0].toUpperCase()+t.slice(1)),t},hint(){const t=this.$helpers.format(this.value,this.type);return t!=this.value?t:""},multiValue(){let t=this.value;if(Array.isArray(t))return t;if("array"===this.typeParts[0])return t?[t]:[];if(this.multipleSplitBy)return(this.value||"").toString().split(this.multipleSplitBy).filter(t=>t.trim());if("json"===this.typeParts[0]&&this.typeParts[1])try{const e=t&&JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}if("select"!==this.typeParts[0]||this.multiple||(t=null==t?"":t+""),!this.multiple||"model"===this.type)return t;if("string"==typeof t)try{t=JSON.parse(t||"{}")}catch(e){t=t?{[t]:t}:{}}return Object.keys(t||{}).map(t=>isNaN(t)?t:Math.trunc(t))},arrayMultiValRev(){return"array"===this.typeParts[0]?this.multiValue.slice().reverse():[]},valueLength(){return this.multiple?this.multiValue.length:this.value?1:0},arrayValue(){return Array.isArray(this.multiValue)?this.multiValue:this.value?[this.value]:[]},colorBase(){const t=this.color.split(" ").filter(t=>!/lighten|darken/.test(t)).join(" ");return/^(primary|accent|success|secondary|info|warning|error)$/i.test(t)?t:"custom-color"},_resource(){return this.resource||{$:{}}},valuePlaceholder(){return this.multiValue!==this._resource.$[this.name]?this.arrayValue.join(" - ").trim():this._resource[this.name]},treeParent(){if(this.isTreeview&&this.treeParentId)return(this.stateItems.find(t=>t.data.$.id==this.treeParentId)||{}).data},itemsLength(){return this._realItems?this._realItems.length:0},activeDir(){return"auto"!==this.dir?this.dir:this.$helpers.textDir(this.value)},externalFnEventName(){return`model-input-external-fn:${this.name}`},cropSourceInputEvKey(){if(this.cropSourceProp)return this.$helpers.inputEvKey(this.paramsModel,this.paramsId,this.cropSourceProp)},inputEvKey(){return this.$helpers.inputEvKey(this.paramsModel,this.paramsId,this.name)},canPostNew(){if(!this.isResourceType)return!1;const t=this.$store.getters["client/can"][this.resourceType];return t&&t.post}},watch:{modelEditorDialog(t){!t&&this.$refs.modelEditor&&this.$refs.modelEditor.$refs.editorVue&&this.$refs.modelEditor.$refs.editorVue.debounceEmitInput.immediate(),!t&&this.$refs.cke&&this.$refs.cke.$options.editor&&this.input(this.$refs.cke.$options.editor.getData()),this.$nextTick(()=>{this.modelEditorCanInput=t})},modelEmailEditorDialog(t){!t&&this.$refs.modelEmailEditor&&this.$refs.modelEmailEditor.$options.debEmitInput&&this.$refs.modelEmailEditor.$options.debEmitInput.immediate(),this.$nextTick(()=>{this.modelEmailEditorCanInput=t})},modelNewItemKey(t,e){e!==t&&(this.modelNewItemFill={})},cropSourceInputEvKey:{handler(t,e){t!=e&&(e&&this.$bus.$off(e,this.onCropSourceChange),t&&this.$bus.$on(t,this.onCropSourceChange))},immediate:!0},inputEvKey:{handler(t,e){t!=e&&(this.$bus.$off(e+"--crop",this.onCropRequest),this.$bus.$on(t+"--crop",this.onCropRequest))},immediate:!0},datePickerActive(t,e){if(t===e)return;const i=this.$refs.datetimeMenuRef;i&&this.$nextTick(()=>i.updateDimensions())},slugOfValue(t){(t=this.$helpers.toSlug(t)).replace(/-[^-]+$/,"")!==this.value.replace(/-[^-]+$/,"")&&this.input(t)},datetimeMenu(t){if(t&&this.$refs.currentType){const t=this.$refs.currentType.$el.getBoundingClientRect();this.datetimeMenuX=t.x+24,this.datetimeMenuY=t.y+t.height-24}},arrayMenuActive(t){if(t&&this.$refs.currentType){const t=this.$refs.currentType.$el.getBoundingClientRect();this.arrayMenuActiveX=t.x+24,this.arrayMenuActiveY=t.y+t.height-24}},name(){this.resetValidation()},_realItems:{handler(t){this.hasRealItems=!!t},immediate:!0}
1,value(){this.$nextTick(()=>{const t=this.multiple?this.arrayValue[0]:this.value;!1===this.dirty?this.$refs.provider.reset():this.$refs.provider.validate(t)})},dirty(t){t||this.value||this.$nextTick(()=>this.$refs.provider.reset())},multiValue:{handler(){!this._inactive&&this.isFullModel&&this.multiValue&&!this.arrayValue.every(t=>this._realItems.some(e=>e.value==t))&&this.tryGet()},immediate:!0},arrayValue:{handler(t){const e=[];let i={};if("string"==typeof this.value&&"{"===this.value[0])try{i=JSON.parse(this.value)}catch(t){}for(let r of t){const t=r+"";let n=t in i?i[t]:t;if(this.isResourceType&&!this.isResourceArray){const e=this.stateItems.find(e=>e.id==t);e&&(n=e.data.id_title)}e.push({value:t,text:n})}this.valueItems=e},immediate:!0},itemsLength(){const t=this.$refs.currentType||{};"function"==typeof t.updateMenuDimensions&&t.updateMenuDimensions()},type:{handler(t,e){t!==e&&"timestamp"===t&&(this.dateValue=this.$helpers.time.format(1e3*this.value,"YYYY-MM-DD"),this.timeValue=this.$helpers.time.format(1e3*this.value,"HH:mm"))},immediate:!0},dropzoneDialogActive(t){if(t&&!this.arrayValue.length&&this.$refs.dropzone&&(this.$refs.dropzone.getIfNeed(),!this.readonly&&!this.$options.disableDropzoneAutoClick)){const t=this.$refs.dropzone.$el.querySelector(".dropzone");t&&!this.$refs.dropzone.files.length&&t.click()}}},methods:{async processCopyFromHtml(){if(!this.getValue||!this.copyFromHtml)return;const t=this.getValue(this.copyFromHtml,""),e=(new DOMParser).parseFromString(t,"text/html"),i=Array.from(e.body.querySelectorAll("p,h1,h2,h3,h4,h5,h6")).map(t=>t.textContent.replace(/\s+/gi," ").trim()).filter(t=>t.length).join("\n\n");i.length&&(this.value&&!await this.$root.ask(`Replace current ${this._label}?`)||(this.multiple?this.inputMultiple([i]):this.input(i)))},async modelNewItemSend(){if(this.modelNewItemSending||!this.modelNewItem||!this.$refs.modelNewItemForm)return;const t=await this.$refs.modelNewItemForm.validate();if(t)return this.$root.addNotif(t);const{modelNewItem:e}=this;this.modelNewItemSending=!0,await this.$axios.post("create-model-new-item",{model:this.paramsModel,prop_name:this.name,fill_json:this.$helpers.json(this.modelNewItemFill)}).then(({data:t})=>{t.item&&(this.modelNewItemFill={},this.$store.dispatch(`${e.paramsModel}/setOriginItems`,{origin:this.originName,replace:!1,items:[t.item]}),this.$popstate("modelNewItemDialogActive",!1),setTimeout(()=>{this.$refs.currentType.$refs.input.click()},50))}).catch(console.warn).finally(()=>this.modelNewItemSending=!1)},setFileGroupsEditFile(t){if("file_group_array"!==this.type||!this.value)return;const{index:e,fileIndex:i,name:r,path:n}=this.fileGroupsEditFile;if(void 0===e)return;t||(t={fg_file_name:r,fg_file_path:n});const a=Array.from(this.value),s=Object.assign({},a[e]);s.files=Array.from(s.files);const o=Object.assign({},s.files[i]);o.name=t.fg_file_name,o.path=t.fg_file_path,s.files.splice(i,1,o),a.splice(e,1,s),this.fileGroupsEditFile=xn({},this.fileGroupsEditFile,{name:o.name,path:o.path}),this.$emit("input",a)},async deleteFileGroup(t){if("file_group_array"!==this.type||!this.value)return;if(!await this.$root.ask("Do you want to delete this group?"))return;const e=Array.from(this.value),[i]=e.splice(t,1);if(i&&i.files&&i.files.length){const t=i.files.reduce((t,e)=>(t[e.path]=1,t),{}),e=this.$store.state.folder.files.filter(e=>t[e.path]);e.length&&this.$store.dispatch("folder/deleteMultiple",e.map(t=>t.id)).catch(console.warn)}this.$emit("input",e.length?e:"")},async deleteFileGroupFile(t,e){if("file_group_array"!==this.type||!this.value)return;if(!await this.$root.ask("Do you want to delete this file?"))return;const i=Array.from(this.value),r=Object.assign({},i[t]);r.files=Array.from(r.files);const[n]=r.files.splice(e,1);if(i.splice(t,1,r),n&&n.path){const t=this.$store.state.folder.files.find(t=>t.path===n.path);t&&this.$store.dispatch("folder/delete",t.id).catch(console.warn)}this.$emit("input",i)},addToFileGroup(t){if("file_group_array"!==this.type||!this.value)return;const e=Array.from(this.value),i=Object.assign({},e[t]);i.files=Array.from(i.files);const r={name:"",path:"",preview:!1};this.fileGroupsEditFile={index:t,fileIndex:i.files.length,name:r.name,path:r.path},i.files.push(r),e.splice(t,1,i),this.$emit("input",e)},toggleFileGroupFilePreview(t,e){if("file_group_array"!==this.type||!this.value)return;const i=Array.from(this.value),r=Object.assign({},i[t]);r.files=Array.from(r.files);const n=Object.assign({},r.files[e]);n.preview=!n.preview,r.files.splice(e,1,n),i.splice(t,1,r),this.$emit("input",i)},setFileGroupTitle(t,e){if("file_group_array"!==this.type||!this.value)return;const i=Array.from(this.value),r=Object.assign({},i[t]);r.title=this.$helpers.fixBadChars(e),i.splice(t,1,r),this.$emit("input",i)},showDropzoneIfNotActive(){setTimeout(()=>{this.dropzoneDialogActive||this.$popstate("dropzoneDialogActive",!0)},300)},moveArrayItem(t,e){if(t<0||e<0||t>=this.arrayMultiValRev.length||e>=this.arrayMultiValRev.length)return;const i=this.arrayMultiValRev.slice(),r=i.splice(t,1)[0];i.splice(e,0,r),i.reverse(),this.input(i)},removeArrayItem(t){if(t<0||t>=this.arrayMultiValRev.length)return;const e=this.arrayMultiValRev.slice();e.splice(t,1),e.reverse(),this.input(e)},toggleArrayMenu(t){this.$popstate("arrayMenuActive",t),t&&setTimeout(()=>this.$refs.arrNewItmInput.$refs.input.click(),100)},showArrayMenuIfNotActive(){setTimeout(()=>{this.arrayMenuActive||this.toggleArrayMenu(!0)},300)},addArrayItem(){this.$emit("preventMenuClosing"),this.arrayNewItem=(this.arrayNewItem||"").trim(),this.arrayErrorMessages=[],this.arrayNewItem&&(this.multiValue.includes(this.arrayNewItem)?this.arrayErrorMessages=["This item already exists!"]:(this.arrayMenuDeleteActive=!1,this.input(this.multiValue.concat([this.arrayNewItem])),this.arrayNewItem="",this.$refs.arrNewItmInput.$refs.input.click()))},pasteArrayItems(t){const e=t.clipboardData||window.clipboardData;if(!e)return;const i=e.getData("text");if(!i)return;const r=new Set;i.split("\n").forEach(t=>{(t=t&&t.trim())&&!this.multiValue.includes(t)&&r.add(t)}),r.size<2||(t.preventDefault(),this.input(this.multiValue.concat([...r])))},setFilters(t,e){this.filters=e?t:[]},mergeInput(t){this.input(this.value?xn({},this.value,{},t):t)},input(t){if(this.readonly)return;const e=Array.isArray(t);this.multiple&&e&&!t.length&&(t=""),t&&(e?t=t.map(this.$helpers.fixBadChars):"string"==typeof t&&(t=this.$helpers.fixBadChars(t))),this.$emit("input",t)},keepResourceSelectionOrder(t){if(!this.isResourceType||!this.$options._keepResSelOrderMap)return t;const e=this.$options._keepResSelOrderMap;return(t=t.slice()).sort((t,i)=>
1e.hasOwnProperty(t)?e.hasOwnProperty(i)?e[t]-e[i]:-1:1),t},inputMultiple(t){let e="";if(this.multipleSplitBy)e=t.map(t=>(this._items.find(e=>e.value===t)||{text:t}).text).filter(t=>t).join(this.multipleSplitBy);else if("model"===this.type)e=t.length?t:"";else if(this.isResourceArray)e=t||[];else if(t.length){t=this.keepResourceSelectionOrder(t);const i={};let r=0;this.$options._keepResSelOrderMap={};for(const e of t){this.$options._keepResSelOrderMap[e]=r++;const t=this._items.find(t=>t.value==e);i[e]=t?t.text:e}e=JSON.stringify(i,t)}this.input(e)},inputMultipleAll(){this.inputMultiple(this.multipleSplitBy?this._items.map(t=>t.text).join(this.multipleSplitBy):this._items.map(t=>t.value))},focus(){this.$nextTick(()=>{this.tryGet()}),setTimeout(()=>{const t=this.$refs.currentType,e=t&&t.$refs.menu;if(e&&e.isActive){this.canShowFilter=!0,this.$nextTick(e.updateDimensions);const t=e.$watch("isActive",e=>{e||this.$options.preventingMenuClose||(t(),this.canShowFilter=!1)})}},200)},tryGet(t){this.isResourceType&&!this._loading&&(this.customFilters&&
1(t=t?Array.isArray(t)?t.concat(this.customFilters):{filters:[t].concat(this.customFilters)}:this.customFilters),!t||Array.isArray(t)||t.filters||(t=[t]),this.innerLoading=!0,this.$store.dispatch("resources/get",{collection:[{model:this.resourceType,pagination:{rows:this.isModelNotFull?50:250},filters:t||[]}],origin:this.originName,replace:!0}).catch(console.warn).finally(()=>{this.innerLoading=!1}))},filterFn(t,e){const i=(t.text+(t.subText||"")+t.value).toLocaleLowerCase();return(e=e.toLocaleLowerCase()).split("|").some(t=>i.indexOf(t.trim())>-1)},delayEmitDatetime(t){this.$nextTick(()=>setTimeout(()=>this.emitDatetime(t),50))},emitDatetime(t){this.datePickerActive=!0,this.$popstate("datetimeMenu",!1),void 0!==t?(this.input(t),this.setDateValue(t?this.$helpers.time.format(1e3*t,"YYYY-MM-DD"):""),this.datePickerActive=!0):this.input(this.$helpers.time.toUnix(this.dateValue+this.timeValue+this.timeValue.split(":").pop(),"YYYY-MM-DDHH:mmss"))},setDateValue(t){this.datePickerActive=!1,this.dateValue=t,this.timeValue||(this.timeValue=this.$helpers.moment().format("HH:mm"))},async emitFilesIfChanged(t=[]){let e=!1,i=this.$parent;for(;i;){if("restoringAutoSave"in i.$options){e=i.$options.restoringAutoSave;break}i=i.$parent}e&&await new Promise(t=>setTimeout(t,240)),t.length===this.arrayValue.length&&this.arrayValue.every(e=>t.includes(e))||(this.multiple?this.input(t.length?t:""):this.input(t[0]||""))},async validate(){if("file_group_array"===this.type){const t=this.value;if(!t)return;if(!Array.isArray(t)||!t.length)return`${this._label} is not valid!`;for(const e of t){if(!e.title||!e.files||!e.files.length)return`${this._label} is not valid!`;for(const t of e.files)if(!t.name||!t.path)return`${this._label} is not valid!`}}const t=this.multiple?this.arrayValue[0]:this.value,e=await this.$refs.provider.validate(t);return this.errors=e.errors,e.valid?void 0:e.errors[0]},resetValidation(){this.$refs.provider.reset()},selectColor(t){this.input(t),this.colorMenuActive=!1},showRawHtmlEditor(){this.$popstate("modelEditorDialog",!0),setTimeout(()=>{this.$refs.editable&&this.$refs.editable.focus()},400)},addNewJsonItem(){const t={};for(const e in this.typeOptions)t[e]="";this.input(this.$helpers.json(this.multiValue.concat(t)))},updateJsonItem(t,e,i){if(!this.multiValue[t])return;const r=xn({},this.multiValue[t],{[e]:i}),n=this.multiValue.slice();n.splice(t,1,r),this.input(this.$helpers.json(n))},deleteJsonItem(t){if(!this.multiValue[t])return;const e=this.multiValue.slice();e.splice(t,1),this.input(this.$helpers.json(e))},preventMenuClosing(){this.$emit("preventMenuClosing");const t=this.$refs.currentType,e=t&&t.$refs.menu;if(!e)return;if(!e.isActive)return e.isActive=!0,this.canShowFilter=!0,void this.$nextTick(e.updateDimensions);this.$options.preventingMenuClose=!0;const i=e.$watch("isActive",t=>{t||(i(),e.isActive=!0,this.$options.preventingMenuClose=!1,this.$nextTick(e.updateDimensions))});setTimeout(()=>{i(),this.$options.preventingMenuClose=!1},100)},onCropSourceChange(){this.input(),this.$nextTick(()=>this.cropperResetCount++),this.cropSrc&&!this.cropDialogActive&&setTimeout(()=>{this.$popstate("cropDialogActive",!0)},250)},onCropRequest(){this.$nextTick(()=>{this.$popstate("dropzoneDialogActive",!0),setTimeout(()=>{const t=this.$refs.dropzone&&this.$refs.dropzone.$el.querySelectorAll(".dz-details button.open-dropzone-crop");1===t.length&&t[0].click()},250)})},postNewItemPopup(){this.canPostNew&&(this.$helpers.openWin({title:"Create New Item",url:`${this.$router.options.base||"/"}${this.resourceType}/create`,width:800,height:800}),this.$refs.currentType.$refs.menu.isActive=!1)}},created(){this.$options.externalFnListener=([t,e])=>{const i=[],r=[];for(const t in e)i.push(t),r.push(e[t]);Function(...i,t).apply(this,r)},this.$bus.$on(this.externalFnEventName,this.$options.externalFnListener),this.$watch("externalFnEventName",(t,e)=>{t!==e&&(this.$bus.$off(e,this.$options.externalFnListener),this.$bus.$on(t,this.$options.externalFnListener))})},beforeDestroy(){this.$bus.$off(this.externalFnEventName,this.$options.externalFnListener),this.$bus.$off(this.inputEvKey+"--crop",this.onCropRequest),this.cropSourceInputEvKey&&this.$bus.$off(this.cropSourceInputEvKey,this.onCropSourceChange)}},Cn=Object(o.a)($n,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("validation-provider",{ref:"provider",staticClass:"is-model-input w-100",class:{"opacity-6":t.readonly,"mb-2":(t.messages||[]).length>0},style:"--custom-color:"+t.color,attrs:{rules:t.rules,name:t._label,tag:"div"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.errors;return[t._items?[i("v-autocomplete",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{value:t.multiValue,autocomplete:"off",items:t._items,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,"no-data-text":t.$trans(t._loading?"loading...":"there are no items"),multiple:t.multiple,chips:"",readonly:t.readonly,dir:t.activeDir,color:t.color,"search-input":t.search,"n
1o-filter":t.isModelNotFull,filter:t.filterFn,"value-comparator":function(t,e){return t==e},"return-object":t.returnObject},on:{input:function(e){t.multiple?t.inputMultiple(e):t.input(e)},focus:t.focus,"update:searchInput":function(e){t.search=e},"update:search-input":function(e){t.search=e}},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t._label,expression:"_label"}],staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$refs.currentType.$refs.input.click()}}},[t._v(t._s(t.icon||t.$options.mdiGestureTap))])]},proxy:!0},{key:"prepend-item",fn:function(){return[t.isResourceArray?i("v-layout",{attrs:{row:"","px-3":""}},[i("v-text-field",{ref:"arrNewItmInput",attrs:{label:"New item",readonly:t.readonly,dir:t.$helpers.textDir(t.arrayNewItem),color:t.color,"error-messages":t.arrayErrorMessages,value:t.arrayNewItem},on:{input:function(e){t.arrayNewItem=e},keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addArrayItem(e)},paste:t.pasteArrayItems},scopedSlots:t._u([{key:"append-outer",fn:function(){return[i("v-btn",{staticClass:"ma-0 ww-auto px-3",attrs:{small:"",round:"",depressed:"",color:t.color,disabled:t.readonly||!t.arrayNewItem},on:{click:t.addArrayItem}},[i("span",{staticClass:"white--text"},[t._v("Add")])])]},proxy:!0}],null,!0)})],1):t._e(),t._v(" "),t.treeParent?[i("v-list-tile",{attrs:{color:t.color,ripple:""},on:{click:function(e){t.treeParentId=t.treeParent.$.parent_id,t.$emit("preventMenuClosing")}}},[i("v-layout",{staticClass:"font-1",attrs:{row:""}},[i("icon",[t._v(t._s(t.$options.mdiMenuUp))]),t._v(" "),i("span",{staticClass:"pa-1"}),t._v(" "),i("span",[t._v(t._s(t.treeParent.id_title))])],1)],1),t._v(" "),i("v-divider")]:t._e(),t._v(" "),t.isModelNotFull&&t.canShowFilter?[i("div",{staticClass:"mb-3 mx-2"},[i("model-filter",{attrs:{model:t.model,"focus-on":"value","action-name":"Filter",disabled:t._loading,"allow-empty":"",wrap:t.$root.smAndDown},on:{input:function(e){return t.tryGet(e)},modified:t.preventMenuClosing,preventMenuClosing:t.preventMenuClosing}})],1)]:t._e(),t._v(" "),!t.isResourceArray&&t.multiple&&t.isFullModel&&!t.search&&t.itemsLength>2?[i("v-list-tile",{class:[t.multiValue.length<t.itemsLength||"v-list__tile--active "+t.colorBase+"--text text--lighten-1"],attrs:{ripple:""},on:{click:function(e){t.multiValue.length>=t.itemsLength?t.inputMultiple([]):t.inputMultipleAll()}}},[i("v-list-tile-avatar",{attrs:{color:"transparent"}},[i("icon",{staticStyle:{color:"inherit",transition:"none"},domProps:{textContent:t._s(t.multiValue.length>=t.itemsLength?t.$options.mdiCheckboxMarked:t.$options.mdiCheckboxBlankOutline)}})],1),t._v(" "),i("v-list-tile-content",[i("v-list-tile-title",{staticClass:"body-1",class:{"font-w-500":t.multiValue.length>=t.itemsLength}},[i("span",[t._v(t._s(t.$trans(["select","all"])))])])],1)],1),t._v(" "),i("v-divider")]:t._e()]},proxy:!0},{key:"append-item",fn:function(){return[i("div",{staticClass:"d-flex sticky events-none pa-2",staticStyle:{bottom:"0px",gap:"0.5rem"}},[i("div",{staticClass:"grow"}),t._v(" "),i("div",{staticClass:"white"},[i("v-btn",{staticClass:"events-auto ww-auto px-3 ma-0",attrs:{outline:"",small:"",color:t.color},on:{click:function(e){t.$refs.currentType.$refs.menu.isActive=!1}}},[t._v("\n Close\n ")])],1),t._v(" "),t.modelNewItem?i("div",[i("v-btn",{staticClass:"white--text events-auto ww-auto px-3 ma-0",attrs:{depressed:"",small:"",color:t.color},on:{click:function(e){return t.$popstate("modelNewItemDialogActive",!0)}}},[t._v("\n New "+t._s(t.modelNewItem.name)+"\n ")])],1):t.canPostNew?i("div",[i("v-btn",{staticClass:"white--text events-auto ww-auto px-3 ma-0",attrs:{depressed:"",small:"",color:t.color},on:{click:t.postNewItemPopup}},[t._v("\n New\n ")])],1):t._e()])]},proxy:!0},{key:"item",fn:function(e){var r=e.item,n=e.tile;return[r.avatar?[n.props.value?i("v-list-tile-avatar",{key:"item-checked",class:{"opacity-4":!!r.isValueItem},attrs:{color:"secondary lighten-4"}},[i("icon",{attrs:{color:t.color}}
1,[t._v(t._s(t.$options.mdiCheckBold))])],1):i("v-list-tile-avatar",{key:"item-avatar",class:{"opacity-4":!!r.isValueItem},attrs:{color:t.color}},[/\.(jpeg|jpg|png|gif)($|\?)/i.test(r.avatar)?i("img",{staticStyle:{"object-fit":"cover"},attrs:{src:r.avatar}}):i("span",{staticClass:"white--text"},[t._v(t._s(r.avatar[0]))])])]:i("v-list-tile-avatar",{class:{"opacity-4":!!r.isValueItem},attrs:{color:"transparent"}},[i("icon",{style:{transition:"none"},attrs:{color:n.props.value?t.color:"inherit"},domProps:{textContent:t._s(n.props.value?t.multiple?t.$options.mdiCheckCircle:t.$options.mdiRadioboxMarked:t.$options.mdiRadioboxBlank)}})],1),t._v(" "),i("v-list-tile-content",{class:{"opacity-4":!!r.isValueItem}},[i("v-list-tile-title",{staticClass:"body-1",class:{"font-w-500":n.props.value}},[t._v("\n "+t._s(r.text)+"\n ")]),t._v(" "),r.subText?i("v-list-tile-sub-title",{staticClass:"caption",staticStyle:{"max-width":"200px"}},[t._v("\n "+t._s(r.subText)+"\n ")]):t._e()],1),t._v(" "),t.isTreeview?i("v-list-tile-action",[t.$store.state[t.type].items.some(function(t){return t.data.$.parent_id===r.value})?i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Sub categories",expression:"'Sub categories'"}],attrs:{small:"",outline:"",icon:"",color:t.color},on:{click:function(e){e.stopPropagation(),t.treeParentId=r.value,t.$emit("preventMenuClosing")}}}
1,[i("icon",[t._v(t._s(t.$options.mdiMenuDown))])],1):t._e()],1):t._e()]}},{key:"selection",fn:function(e){var r=e.item,n=e.selected,a=e.index;return[!t.multiple||t.multiValue.length<3?i("v-chip",{staticClass:"auto-height",staticStyle:{"background-color":"#ececec !important"},attrs:{selected:n,disabled:t.readonly,close:!t.readonly},on:{input:function(e){t.multiple?t.inputMultiple(t.multiValue.filter(function(t){return t!=r.value})):t.input("")}}},[i("span",{staticClass:"black--text"},[t._v(t._s(r.text))])]):0===a?i("v-chip",{staticClass:"auto-height",staticStyle:{"background-color":"#ececec !important"},attrs:{close:!t.readonly},on:{input:function(e){t.multiple?t.inputMultiple([]):t.input("")}}},[i("span",{staticClass:"black--text"},[t._v(t._s(""+t.multiValue.length)+" "+t._s(t.$trans(["item","selected"])))])]):t._e()]}}],null,!0)}),t._v(" "),t.modelNewItem?i("div",{staticClass:"d-flex"},[i("v-dialog",{attrs:{value:t.modelNewItemDialogActive,"max-width":"700",scrollable:"",transition:"slide-y-reverse-transition",fullscreen:t.$root.smAndDown,lazy:""},on:{input:function(e){return t.$popstate("modelNewItemDialogActive",e)}},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-card",[i("v-card-text",{staticClass:"h-100"},[i("div",{staticClass:"body-2 f-600 mt--3 mx--3 secondary lighten-4 pa-3 mb-2"},[t._v("\n "+t._s(t.modelNewItem.name)+"\n ")]),t._v(" "),i("model-form",{ref:"modelNewItemForm",attrs:{properties:t.modelNewItem.properties,rules:t.modelNewItem.rules,"half-width-inputs":"","params-model":t.modelNewItem.paramsModel},model:{value:t.modelNewItemFill,callback:function(e){t.modelNewItemFill=e},expression:"modelNewItemFill"}})],1),t._v(" "),i("v-card-actions",[i("v-btn",{attrs:{outline:"",color:"secondary darken-1"},on:{click:function(e){return t.$popstate("modelNewItemDialogActive",!1)}}},[t._v("\n Back\n ")]),t._v(" "),i("v-spacer"),t._v(" "),i("v-btn",{staticClass:"white--text",attrs:{disabled:t.modelNewItemSending,depressed:"",color:t.modelNewItem.color},on:{click:t.modelNewItemSend}},[t._v("\n New "+t._s(t.modelNewItem.name)+"\n ")])],1)],1)]},proxy:!0}],null,!0)})],1):t._e()]:"array"===t.type?[i("v-combobox",{key:t.name,ref:"currentType",class:["rt-input-n-"+t.name,"input-selections-nowrap"],attrs:{autocomplete:"off",value:t.value,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,multiple:"",chips:"",readonly:"",dir:t.activeDir,color:t.color,dense:""},on:{input:t.input,click:t.toggleArrayMenu,focus:t.showArrayMenuIfNotActive},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:t.toggleArrayMenu}},[t._v(t._s(t.icon||t.$options.mdiPlus))])]},proxy:!0},{key:"selection",fn:function(e){return e.item,e.selected,[e.index?t._e():i("v-chip",{staticClass:"auto-height",staticStyle:{"background-color":"#ececec !important"},on:{click:t.toggleArrayMenu}},[i("span",{staticClass:"black--text"},[t._v(t._s(t.multiValue.length+" Item"+(t.multiValue.length>1?"s":"")))])])]}}],null,!0)}),t._v(" "),i("v-menu",{attrs:{"close-on-content-click":!1,value:t.arrayMenuActive,"min-width":"320","max-width":"320","offset-y":"",bottom:"",right:"",origin:"top left",lazy:!1,"position-x":t.arrayMenuActiveX,"position-y":t.arrayMenuActiveY},on:{input:t.toggleArrayMenu},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-list",{attrs:{dense:""}},[i("v-layout",{attrs:{row:"","px-2":""}},[i("v-text-field",{ref:"arrNewItmInput",attrs:{label:"New item",readonly:t.readonly,dir:t.$helpers.textDir(t.arrayNewItem),color:t.color,"error-messages":t.arrayErrorMessages,value:t.arrayNewItem},on:{input:function(e){t.arrayNewItem=e},keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addArrayItem(e)},paste:t.pasteArrayItems},scopedSlots:t._u([{key:"append-outer",fn:function(){return[i("v-btn",{staticClass:"ma-0 ww-auto px-3",attrs:{small:"",round:"",depressed:"",color:t.color,disabled:t.readonly||!t.arrayNewItem},on:{click:t.addArrayItem}},[i("span",{staticClass:"white--text"},[t._v("Add")])])]},proxy:!0}])})],1),t._v(" "),i("div",{staticClass:"overflow-auto",staticStyle:{"max-height":"200px"}},[t._l(t.arrayMultiValRev,function(e,r){return i("div",{key:r,staticClass:"d-flex align-center pa-1 border-bottom"},[i("div",{staticClass:"lh-title font-1 pa-2 w-100",attrs:{dir:"auto"}},[t._v("\n "+t._s(e)+"\n ")]),t._v(" "),i("v-menu",{attrs:{lazy:""},scopedSlots:t._u([{key:"activator",fn:function(e){var n=e.on;return[t.arrayMenuDeleteActive?i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Delete",expression:"'Delete'"}],attrs:{icon:"",small:"",flat:"",color:"error",disabled:t.readonly},on:{click:function(e){return t.removeArrayItem(r)}}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiDelete))])],1):i("v-btn",t._g({directives:[{name:"tooltip",rawName:"v-tooltip",value:"Options",expression:"'Options'"}],attrs:{icon:"",small:"",flat:"",color:"accent",disabled:t.readonly}},n),[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiDotsVertical))])],1)]}}],null,!0)},[t._v(" "),i("v-list",{staticClass:"pa-0",attrs:{dense:""}},[t.arrayMultiValRev.length>2&&r>1?i("v-list-tile",{attrs:{disabled:t.readonly},on:{click:function(e){return t.moveArrayItem(r,0)}}},[i("v-list-tile-title",[i("icon",{attrs:{size:"20",color:"accent"}},[t._v(t._s(t.$options.mdiChevronDoubleUp))]),t._v("\n Top\n ")],1)],1):t._e(),t._v(" "),r>0?i("v-list-tile",{attrs:{disabled:t.readonly},on:{click:function(e){return t.moveArrayItem(r,r-1)}}},[i("v-list-tile-title",[i("icon",{attrs:{size:"20",color:"accent"}},[t._v(t._s(t.$options.mdiChevronUp))]),t._v("\n Up\n ")],1)],1):t._e(),t._v(" "),r+1<t.arrayMultiValRev.length?
1i("v-list-tile",{attrs:{disabled:t.readonly},on:{click:function(e){return t.moveArrayItem(r,r+1)}}},[i("v-list-tile-title",[i("icon",{attrs:{size:"20",color:"accent"}},[t._v(t._s(t.$options.mdiChevronDown))]),t._v("\n Down\n ")],1)],1):t._e(),t._v(" "),t.arrayMultiValRev.length>2&&r+2<t.arrayMultiValRev.length?i("v-list-tile",{attrs:{disabled:t.readonly},on:{click:function(e){return t.moveArrayItem(r,t.arrayMultiValRev.length-1)}}},[i("v-list-tile-title",[i("icon",{attrs:{size:"20",color:"accent"}},[t._v(t._s(t.$options.mdiChevronDoubleDown))]),t._v("\n Bottom\n ")],1)],1):t._e(),t._v(" "),i("v-divider",{staticClass:"my-2"}),t._v(" "),i("v-list-tile",{attrs:{disabled:t.readonly},on:{click:function(e){return t.removeArrayItem(r)}}},[i("v-list-tile-title",[i("icon",{attrs:{size:"20",color:"error"}},[t._v(t._s(t.$options.mdiDelete))]),t._v("\n Delete\n ")],1)],1)],1)],1)],1)}),t._v(" "),t.arrayMultiValRev.length>3||t.arrayMenuDeleteActive&&t.arrayMultiValRev.length?i("div",{staticClass:"px-2 pb-2"},[i("v-checkbox",{attrs:{value:t.arrayMenuDeleteActive,color:"error","hide-details":"",readonly:t.readonly,dense:""},on:{change:function(e){t.arrayMenuDeleteActive=e}},scopedSlots:t._u([{key:"label",fn:function(){return[i("div",{staticClass:"body-1 black--text"},[t._v("\n Quick delete\n ")])]},proxy:!0}],null,!1,3951230491)})],1):t._e()],2)],1)]},proxy:!0}])})]:"percent"===t.type?i("v-text-field",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{autocomplete:"off",value:t.value,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,hint:t.hint,"persistent-hint":"",name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,readonly:t.readonly,dir:t.activeDir,color:t.color},on:{input:t.input},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$refs.currentType.$refs.input.click()}}},[t._v(t._s(t.icon||t.$options.mdiPercentOutline))])]},proxy:!0}],null,!0)}):"timestamp"===t.type?[i("v-text-field",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{name:t.name,autocomplete:"off","data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,label:t._label,hint:t.hint,"persistent-hint":"",placeholder:t.placeholder||t.valuePlaceholder,color:t.color,value:t.$helpers.time.format(1e3*t.value),readonly:t.readonly},on:{change:function(e){t.emitDatetime(t.$helpers.time.toUnix(e))},click:function(e){return t.$popstate("datetimeMenu",!t.datetimeMenu)}},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$popstate("datetimeMenu",!0)}}},[t._v(t._s(t.icon||t.$options.mdiCalendarEdit))])]},proxy:!0}],null,!0)}),t._v(" "),i("v-menu",{ref:"datetimeMenuRef",attrs:{"close-on-content-click":!1,value:t.datetimeMenu,"min-width":"320","offset-y":"",bottom:"",right:"",origin:"top left","position-x":t.datetimeMenuX,"position-y":t.datetimeMenuY},on:{input:function(e){return t.$popstate("datetimeMenu",e)}},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-card",[i("v-card-title",{staticClass:"secondary lighten-4 pa-2"},[i("v-layout",{attrs:{row:"","justify-space-between":"","align-center":""}},[i("span",{staticClass:"font-1 secondary--text text--darken-2"},[t._v("\n Select "+t._s(t._label)+"\n ")]),t._v(" "),i("div",[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{color:"secondary darken-1",flat:"",icon:""},on:{click:function(e){t.datePickerActive?t.$popstate("datetimeMenu",!1):t.datePickerActive=!0}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1)])],1),t._v(" "),i("v-card-text",[i("v-layout",{attrs:{row:"",wrap:""}},[i("v-slide-x-transition",{attrs:{"hide-on-leave":""}},[t.datePickerActive||!t.dateValue?i("v-date-picker",{staticClass:"elevation-0",attrs:{value:t.dateValue,"no-title":"",locale:t.$config.locale,"first-day-of-week":"fa"===t.$config.locale?6:0,readonly:t.readonly,color:t.color},on:{input:t.setDateValue}}):i("div",[i("v-time-picker",{staticClass:"elevation-0",attrs:{disabled:!t.dateValue,value:t.timeValue,format:"24hr",readonly:t.readonly,color:t.color},on:{input:function(e){t.timeValue=e}}}),t._v(" "),i("div",{staticClass:"d-flex justify-center gap-2 pt-2"},[i("v-btn",{staticClass:"ww-auto ma-0",attrs:{small:"",outline:"",color:t.color,disabled:t.readonly},on:{click:function(e){t.timeValue="00:00"}}},[t._v("\n "+t._s("00:00")+"\
1n ")]),t._v(" "),i("v-btn",{staticClass:"ww-auto ma-0",attrs:{small:"",outline:"",color:t.color,disabled:t.readonly},on:{click:function(e){t.timeValue="23:59"}}},[t._v("\n "+t._s("23:59")+"\n ")]),t._v(" "),i("v-spacer"),t._v(" "),i("v-btn",{staticClass:"ww-auto ma-0",attrs:{small:"",outline:"",color:"secondary darken-1"},on:{click:function(e){t.datePickerActive=!0}}},[t._v("\n Back\n ")]),t._v(" "),i("v-btn",{staticClass:"ww-auto px-3 ma-0",attrs:{small:"",depressed:"",color:t.color,disabled:t.readonly},on:{click:function(e){return t.delayEmitDatetime()}}},[i("span",{staticClass:"white--text"},[t._v("Confirm")])])],1)],1)],1)],1),t._v(" "),t.datePickerActive?i("div",{staticClass:"d-flex"},[i("v-spacer"),t._v(" "),i("v-btn",{staticClass:"ww-auto",attrs:{small:"",flat:"",color:"secondary darken-1"},on:{click:function(e){return t.$popstate("datetimeMenu",!1)}}},[t._v("\n "+t._s(t.$trans("cancel"))+"\n ")]),t._v(" "),i("v-btn",{staticClass:"ww-auto",attrs:{small:"",flat:"",color:"error",disabled:t.readonly},on:{click:function(e){return t.emitDatetime("")}}},[t._v("\n "+t._s(t.$trans("clear"))+"\n ")]),t._v(" "),i("v-btn",{staticClass:"ww-auto px-3",attrs:{small:"",depressed:"",color:t.color,disabled:t.readonly},on:{click:function(e){t.setDateValue(t.$helpers.moment().format("YYYY-MM-DD"))}}},[i("span",{staticClass:"white--text"},[t._v("Today")])])],1):t._e()],1)],1)]},proxy:!0}])})]:{image_sm:1,image:1,image_lg:1,file:1}[t.type]?[i("v-combobox",{key:t.name,class:["rt-input-n-","input-selections-nowrap"],attrs:{value:t.arrayValue,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,name:t.name,autocomplete:"off","data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,multiple:"",chips:"",readonly:"",dir:t.activeDir,color:t.color,dense:""},on:{input:t.input,click:function(e){return t.$popstate("dropzoneDialogActive",!t.dropzoneDialogActive)},focus:t.showDropzoneIfNotActive},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$popstate("dropzoneDialogActive",!t.dropzoneDialogActive)}}},[t._v(t._s(t.icon||("file"==t.type?t.$options.mdiCloudUpload:t.$options.mdiCamera)))])]},proxy:!0},{key:"selection",fn:function(e){var r=e.item,n=(e.selected,e.index);return[i("v-avatar",{staticClass:"ma-1",attrs:{size:"30",color:"secondary lighten-3"},on:{click:function(e){return t.$popstate("dropzoneDialogActive",!t.dropzoneDialogActive)}}},["file"==t.type?i("span",{staticClass:"caption"},[t._v(t._s(n+1))]):i("img",{staticClass:"cover",attrs:{src:t.$helpers.cdn(r)+"?preview"}})])]}}],null,!0)}),t._v(" "),i("div",{staticClass:"d-flex"},[i("v-dialog",{attrs:{value:t.dropzoneDialogActive,width:"680px",scrollable:"",transition:"slide-y-reverse-transition",lazy:!1},on:{input:function(e){return t.$popstate("dropzoneDialogActive",e)}},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-card",{staticStyle:{"min-width":"300px"}},[i("v-card-text",{staticStyle:{height:"100%"}},[i("div",{staticClass:"body-2 pb-3"},[t._v("\n "+t._s(t._label)+"\n ")]),t._v(" "),i("model-dropzone",{ref:"dropzone",attrs:{identifier:t.paramsModel,id:t.paramsId||null,attribute:void 0===t.paramsAttribute?t.name:t.paramsAttribute,"current-paths":t.arrayValue,accept:void 0===t.fileExtensions?"file"==t.type?null:".jpeg,.jpg,.png,.gif":t.fileExtensions,"max-files":t.multiple?20:1,"image-resize":"image"===t.type&&"cover"===t.name&&"journal"===t.paramsModel?700:{image_sm:400,image:1200,image_lg:2e3,file:1600}[t.type],"crop-ratio":"image_sm"===t.type?1:NaN,crop:"",readonly:t.readonly},on:{refreshed:t.emitFilesIfChanged,newFileAdded:function(e){!t.multiple&&t.dropzoneDialogActive&&t.$popstate("dropzoneDialogActive",!1)}}}
1)],1),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{outline:"",color:t.color},on:{click:function(e){return t.$popstate("dropzoneDialogActive",!1)}}},[t._v("\n "+t._s(t.$trans("continue"))+"\n ")])],1)],1)]},proxy:!0}])})],1)]:"crop"===t.type?[i("v-combobox",{key:t.name,class:["rt-input-n-","input-selections-nowrap"],attrs:{value:t.arrayValue,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,name:t.name,autocomplete:"off","data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,multiple:"",chips:"",readonly:"",dir:t.activeDir,color:t.color,dense:""},on:{input:t.input,click:function(e){return t.$popstate("cropDialogActive",!t.cropDialogActive)}},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$popstate("cropDialogActive",!t.cropDialogActive)}}},[t._v(t._s(t.icon||t.$options.mdiCrop))])]},proxy:!0},{key:"selection",fn:function(){return[i("div",{staticClass:"ma-1",on:{click:function(e){return t.$popstate("cropDialogActive",!t.cropDialogActive)}}},[i("span",{staticClass:"caption"},[t._v("Crop info")])])]},proxy:!0}],null,!0)}),t._v(" "),i("div",{staticClass:"d-flex"},[i("v-dialog",{attrs:{value:t.cropDialogActive,width:"800px",scrollable:"",transition:"slide-y-reverse-transition",lazy:""},on:{input:function(e){return t.$popstate("cropDialogActive",e)}},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-card",{staticStyle:{"min-width":"300px"}},[i("v-card-text",{staticStyle:{height:"100%"}},[i("div",{staticClass:"body-2 pb-3"},[t._v("\n "+t._s(t._label)+"\n ")]),t._v(" "),t.cropSrc?t.cropDialogActive&&t.cropRatios&&t.cropRatios.length&&Array.isArray(t.cropRatios)?i("div",[Array.isArray(t.cropSrc)?i("div",{staticClass:"error--text"},[t._v("\n Can not crop more than 1 file at a time!\n ")]):i("div",{staticClass:"d-flex flex-wrap justify-center align-center"},[i("v-flex",{attrs:{xs12:"",md12:""}}
1,[i("v-btn",{staticClass:"mt-0",attrs:{outline:"",color:"accent",small:""},on:{click:function(e){return t.$bus.$emit(t.cropSourceInputEvKey+"--crop")}}},[t._v("\n Crop main image\n ")])],1),t._v(" "),t._l(t.cropRatios,function(e){return i("v-flex",{key:e+"-"+t.cropperResetCount,attrs:{xs12:"",md6:""}},[i("cropper-custom",{staticClass:"pa-2",attrs:{src:t.cropSrc,"ratio-type":e,value:t.value&&t.value[e]},on:{input:function(i){var r;return t.mergeInput(((r={})[e]=i,r))}}})],1)})],2)]):t._e():i("div",{staticClass:"text-center ma-3"},[t._v("\n No image is selected!\n ")])]),t._v(" "),i("v-card-actions",[i("v-btn",{attrs:{flat:"",color:"error"},on:{click:function(e){t.input(),t.$nextTick(function(){return t.cropperResetCount++})}}},[t._v("\n Reset\n ")]),t._v(" "),i("v-spacer"),t._v(" "),i("v-btn",{attrs:{outline:"",color:t.color},on:{click:function(e){return t.$popstate("cropDialogActive",!1)}}},[t._v("\n "+t._s(t.$trans("continue"))+"\n ")])],1)],1)]},proxy:!0}])})],1)]:"file_group_array"===t.type?[i("v-combobox",{key:t.name,class:["rt-input-n-","input-selections-nowrap"],attrs:{value:t.arrayValue,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,name:t.name,autocomplete:"off","data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,multiple:"",chips:"",readonly:"",dir:t.activeDir,color:t.color,dense:""},on:{input:t.input,click:function(e){return t.$popstate("fileGroupsDialogActive",!t.fileGroupsDialogActive)}},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$popstate("fileGroupsDialogActive",!t.fileGroupsDialogActive)}}},[t._v(t._s(t.icon||t.$options.mdiDownload))])]},proxy:!0},{key:"selection",fn:function(e){return[e.index?t._e():i("div",{staticClass:"ma-1",on:{click:function(e){return t.$popstate("fileGroupsDialogActive",!t.fileGroupsDialogActive)}}},[i("span",{staticClass:"caption"},[t._v("Files info")])])]}}],null,!0)}),t._v(" "),i("div",{staticClass:"d-flex"},[i("v-dialog",{attrs:{value:t.fileGroupsDialogActive,width:"800px",scrollable:"",transition:"slide-y-reverse-transition",lazy:""},on:{input:function(e){return t.$popstate("fileGroupsDialogActive",e)}},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-card",{staticStyle:{"min-width":"300px"}},[i("v-card-text",{staticStyle:{height:"100%"}},[i("div",{staticClass:"body-2 pb-3"},[t._v("\n "+t._s(t._label)+"\n ")]),t._v(" "),i("div",t._l(t.value||[],function(e,r){return i("div",{key:r},[i("div",{staticClass:"border round mb-3"},[t.fileGroupsEditIndex===r?i("div",[i("div",{staticClass:"pa-2"},[i("v-text-field",{attrs:{autofocus:"",label:"Group title",readonly:t.readonly,dir:t.$helpers.textDir(e.title),color:t.color,"error-messages":t.arrayErrorMessages,value:e.title},on:{input:function(e){return t.setFileGroupTitle(r,e)}},scopedSlots:t._u([{key:"append-outer",fn:function(){return[i("v-btn",{staticClass:"ma-0 ww-auto px-3",attrs:{small:"",round:"",depressed:"",color:"accent"},on:{click:function(i){t.fileGroupsEditIndex=-1,t.setFileGroupTitle(r,e.title.trim())}}},[t._v("\n Done editing\n ")])]},proxy:!0}],null,!0)})],1)]):t.fileGroupsEditFile.index===r?i("div",[i("div",{staticClass:"pa-2"},[i("model-form",{attrs:{properties:{fg_file_name:{label:"Visible title",type:"string"},fg_file_path:{label:"File",type:"file",paramsAttribute:t.name+"_"+r+"_"+t.fileGroupsEditFile.fileIndex}},value:{fg_file_name:t.fileGroupsEditFile.name,fg_file_path:t.fileGroupsEditFile.path},"params-model":t.paramsModel,"params-id":t.paramsId,"half-width-inputs":""},on:{input:function(e){return t.setFileGroupsEditFile(e)}}}),t._v(" "),i("div",{staticClass:"text-left"},[i("v-btn",{staticClass:"ma-0",attrs:{small:"",round:"",depressed:"",color:t.color},on:{click:function(e){t.setFileGroupsEditFile(),t.fileGroupsEditFile={}}}},[i("span",{staticClass:"white--text"},[t._v("Done editing")])])],1)],1)]):i("div",[i("div",{staticClass:"pa-2 d-flex flex-wrap"},[i("b",{staticClass:"d-inline-block subheading ma-1"},[t._v(t._s(e.title))]),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Edit group title",expression:"'Edit group title'"}],staticClass:"ma-1",attrs:{color:"accent",flat:"",icon:"",small:"",disabled:t.readonly},on:{click:function(e){t.fileGroupsEditIndex=r}}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiPencil))])],1),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Delete group",expression:"'Delete group'"}],staticClass:"ma-1",attrs:{color:"error",flat:"",icon:"",small:"",disabled:t.readonly},on:{click:function(e){return t.deleteFileGroup(r)}}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiDelete))])],1),t._v(" "),i("div",{staticClass:"grow"}),t._v(" "),i("v-btn",{staticClass:"ma-1",attrs:{color:t.color,depressed:"",small:"",disabled:t.readonly},on:{click:function(e){return t.addToFileGroup(r)}}},[i("icon",{attrs:{color:"white"}},[t._v(t._s(t.$options.mdiPlus))]),t._v(" "),i("span",{staticClass:"white--text"},[t._v("New file")])],1)],1),t._v(" "),i("div",{staticClass:"pa-2 d-flex flex-wrap"},t._l(e.files,function(e,n){return i("div",{key:n,style:{width:t.$root.mdAndUp?"50%":"100%"}},[i("div",{staticClass:"pa-1 text-center secondary lighten-4 roun
1d ma-1"},[i("div",{staticClass:"d-block ma-1"},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Activate preview",expression:"'Activate preview'"}],staticClass:"ma-1",attrs:{color:t.color,flat:!e.preview,depressed:!!e.preview,icon:"",small:"",disabled:t.readonly},on:{click:function(e){return t.toggleFileGroupFilePreview(r,n)}}},[i("icon",{attrs:{size:"20",color:e.preview?"white":void 0}},[t._v(t._s(t.$options.mdiEye))])],1),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Download",expression:"'Download'"}],staticClass:"ma-1",attrs:{color:t.color,flat:"",icon:"",small:""},on:{click:function(i){t.$root.download(t.$helpers.cdn(e.path))}}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiDownload))])],1),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Edit",expression:"'Edit'"}],staticClass:"ma-1",attrs:{color:"accent",flat:"",icon:"",small:"",disabled:t.readonly},on:{click:function(i){t.fileGroupsEditFile={index:r,fileIndex:n,name:e.name,path:e.path}}}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiPencil))])],1),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Delete",expression:"'Delete'"}],staticClass:"ma-1",attrs:{color:"error",flat:"",icon:"",small:"",disabled:t.readonly},on:{click:function(e){return t.deleteFileGroupFile(r,n)}}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiDelete))])],1)],1)])}),0)])])])}),0),t._v(" "),i("div",{staticClass:"p-2 text-left"},[i("v-btn",{staticClass:"ma-0",attrs:{color:"accent",depressed:"",small:"",disabled:t.readonly},on:{click:function(e){t.$emit("input",(t.value||[]).concat([{title:"Files",files:[]}]))}}},[i("icon",[t._v(t._s(t.$options.mdiPlus))]),t._v("\n New group\n ")],1)],1)]),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{outline:"",color:t.color},on:{click:function(e){return t.$popstate("fileGroupsDialogActive",!1)}}},[t._v("\n "+t._s(t.$trans("continue"))+"\n ")])],1)],1)]},proxy:!0}])})],1)]:"json"===t.typeParts[0]?[i("v-combobox",{key:t.name,class:["rt-input-n-","input-selections-nowrap"],attrs:{value:t.arrayValue,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,name:t.name,autocomplete:"off","data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,multiple:"",chips:"",readonly:"",dir:t.activeDir,color:t.color,dense:""},on:{input:t.input,click:function(e){return t.$popstate("jsonDialogActive",!t.jsonDialogActive)}},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$popstate("jsonDialogActive",!t.jsonDialogActive)}}},[t._v(t._s(t.icon||t.$options.mdiDatabaseEdit))])]},proxy:!0},{key:"selection",fn:function(e){return e.item,e.selected,[e.index?t._e():i("v-chip",{staticClass:"auto-height",staticStyle:{"background-color":"#ececec !important"},on:{click:function(e){return t.$popstate("jsonDialogActive",!t.jsonDialogActive)}}},[i("span",{staticClass:"black--text"},[t._v(t._s(t.multiValue.length+" Item"+(t.multiValue.length>1?"s":"")))])])]}}],null,!0)}),t._v(" "),i("div",{staticClass:"d-flex"},[i("v-dialog",{attrs:{value:t.jsonDialogActive,"max-width":"720",scrollable:"",transition:"slide-y-reverse-transition",fullscreen:t.$root.smAndDown,lazy:""},on:{input:function(e){return t.$popstate("jsonDialogActive",e)}},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-card",[i("v-card-text",{staticClass:"h-100 secondary lighten-4"},[i("div",{staticClass:"body-2 pb-3"},[t._v("\n "+t._s(t._label)+"\n ")]),t._v(" "),t._l(t.multiValue,function(e,r){return i("div",{key:r,staticClass:"d-flex mb-3 white"},[i("div",{staticClass:"w-100 py-2 px-3"},t._l(t.typeOptions,function(n,a){return i("v-textarea",{key:a,attrs:{autocomplete:"off",value:e[a],label:n,readonly:t.readonly,dir:t.$helpers.textDir(e[a]),color:t.color,rows:"1","auto-grow":""},on:{input:function(e){return t.updateJsonItem(r,a,e)}}})}),1),t._v(" "),i("div",[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Delete",expression:"'Delete'"}],attrs:{small:"",icon:"",flat:"",color:"error"},on:{click:function(e){return t.deleteJsonItem(r)}}},[i("icon",{attrs:{size:"22"}},[t._v(t._s(t.$options.mdiDelete))])],1)],1)])}),t._v(" "),i("v-btn",{attrs:{depressed:"",color:t.color,round:""}
1,on:{click:t.addNewJsonItem}},[i("span",{staticClass:"white--text"},[t._v("Add")])])],2),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{outline:"",color:t.color},on:{click:function(e){return t.$popstate("jsonDialogActive",!1)}}},[t._v("\n "+t._s(t.$trans("continue"))+"\n ")])],1)],1)]},proxy:!0}])})],1)]:"html"===t.type?[i("v-text-field",{key:t.name,ref:"currentType",class:["w-100","rt-input-n-"+t.name],attrs:{name:t.name,autocomplete:"off","data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,color:t.color,value:t.$helpers.strip(t.value),readonly:"",disabled:t.readonly},on:{click:function(e){return t.$popstate("modelEditorDialog",!t.modelEditorDialog)}},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$refs.currentType.$refs.input.click()}}},[t._v(t._s(t.icon||t.$options.mdiPencil))])]},proxy:!0}],null,!0)}),t._v(" "),i("div",{staticClass:"d-flex"},[i("v-dialog",{attrs:{value:t.modelEditorDialog,"max-width":"960",fullscreen:t.$root.smAndDown||t.isModelFullscreen,scrollable:"",transition:"slide-y-reverse-transition",lazy:""},on:{input:function(e){t.$helpers.qTick(function(){return t.$popstate("modelEditorDialog",e)})}},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-card",[i("v-card-text",{staticClass:"overflow-auto h-100"},[i("v-layout",{attrs:{row:"","align-center":""}},[i("div",{staticClass:"subheading font-w-500"},[t._v("\n "+t._s(t._label)+"\n ")]),t._v(" "),i("v-spacer"),t._v(" "),t.$root.smAndDown?t._e():i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Fullscreen",expression:"'Fullscreen'"}],staticClass:"mx-1 my-0",attrs:{depressed:"",flat:!t.isModelFullscreen,icon:"",color:t.color},on:{click:function(e){t.isModelFullscreen=!t.isModelFullscreen}}},[i("icon",{attrs:{color:t.isModelFullscreen?"white":void 0}},[t._v(t._s(t.$options.mdiFullscreen))])],1),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{flat:"",icon:"",color:"secondary darken-1"},on:{click:function(e){t.$helpers.qTick(function(){return t.$popstate("modelEditorDialog",!1)})}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1),t._v(" "),i("v-divider",{staticClass:"mt-2 mb-1"}),t._v(" "),["article","journal-page"].includes(t.paramsModel)?i("model-ckeditor",{ref:"cke",attrs:{"auto-focus":"",value:t.value,identifier:t.paramsModel,id:t.paramsId||null,attribute:t.name},on:{input:function(e){(t.modelEditorDialog||t.modelEditorCanInput)&&t.input(e)}}}):i("model-editor",{ref:"modelEditor",attrs:{autofocus:"",value:t.value,identifier:t.paramsModel,id:t.paramsId||null,attribute:t.name,basic:"basic"===t.htmlType,"linkable-sections":t.linkableSections,"linkable-references":t.linkableReferences},on:{input:function(e){(t.modelEditorDialog||t.modelEditorCanInput)&&t.input(e)}}})],1),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{outline:"",color:t.color},on:{click:function(e){t.$helpers.qTick(function(){return t.$popstate("modelEditorDialog",!1)})}}},[t._v("\n "+t._s(t.$trans("continue"))+"\n ")])],1)],1)]},proxy:!0}])})],1)]:"email_html"===t.type?[i("v-text-field",{key:t.name,ref:"currentType",class:["w-100","rt-input-n-"+t.name],attrs:{name:t.name,autocomplete:"off","data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,color:t.color,value:t.$helpers.strip(t.value),readonly:"",disabled:t.readonly},on:{click:function(e){return t.$popstate("modelEmailEditorDialog",!t.modelEmailEditorDialog)}}
1,scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$refs.currentType.$refs.input.click()}}},[t._v(t._s(t.icon||t.$options.mdiPencil))])]},proxy:!0}],null,!0)}),t._v(" "),i("div",{staticClass:"d-flex"},[i("v-dialog",{attrs:{value:t.modelEmailEditorDialog,"max-width":"960",fullscreen:t.$root.smAndDown||t.isModelFullscreen,scrollable:"",transition:"slide-y-reverse-transition",lazy:""},on:{input:function(e){t.$helpers.qTick(function(){return t.$popstate("modelEmailEditorDialog",e)})}},scopedSlots:t._u([{key:"default",fn:function(){return[i("v-card",[i("v-card-text",{staticClass:"overflow-auto h-100"},[i("v-layout",{attrs:{row:"","align-center":""}},[i("div",{staticClass:"subheading font-w-500"},[t._v("\n "+t._s(t._label)+"\n ")]),t._v(" "),i("v-spacer"),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{flat:"",icon:"",color:"secondary darken-1"},on:{click:function(e){t.$helpers.qTick(function(){return t.$popstate("modelEmailEditorDialog",!1)})}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1),t._v(" "),i("v-divider",{staticClass:"mt-2 mb-1"}),t._v(" "),i("model-email-editor",{ref:"modelEmailEditor",attrs:{value:t.value,identifier:t.paramsModel,id:t.paramsId||null,attribute:t.name},on:{input:function(e){(t.modelEmailEditorDialog||t.modelEmailEditorCanInput)&&t.input(e)}}})],1),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),i("v-btn",{attrs:{outline:"",color:t.color},on:{click:function(e){t.$helpers.qTick(function(){return t.$popstate("modelEmailEditorDialog",!1)})}}},[t._v("\n "+t._s(t.$trans("continue"))+"\n ")])],1)],1)]},proxy:!0}])})],1)]:"color"===t.type?i("v-layout",{attrs:{row:"","align-center":""}},[i("v-text-field",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{dir:"ltr",autocomplete:"off",value:t.value,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,hint:t.hint,"persistent-hint":"",name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,readonly:t.readonly,color:t.color},on:{input:t.input},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){t.colorMenuActive=!0}}},[t._v(t._s(t.icon||t.$options.mdiFormatColorFill))])]},proxy:!0}],null,!0)}),t._v(" "),i("v-menu",{attrs:{"close-on-content-click":!1,value:t.colorMenuActive,"min-width":"320"},on:{input:function(e){t.colorMenuActive=e}},scopedSlots:t._u([{key:"activator",fn:function(e){var r=e.on;return[i("v-btn",t._g({directives:[{name:"tooltip",rawName:"v-tooltip",value:t._label,expression:"_label"}],staticClass:"pa-0 border-light",attrs:{icon:"",depressed:"",color:t.value,disabled:t.readonly}},r),[i("icon",{staticStyle:{"text-shadow":"0px 0px 1px #000000"},attrs:{color:"white"}},[t._v(t._s(t.$options.mdiFormatColorFill))])],1)]}}])},[t._v(" "),i("v-card",[i("v-card-text",[i("v-layout",{attrs:{row:"","justify-space-between":"","align-center":""}},[i("span",{staticClass:"title secondary--text"},[t._v("\n "+t._s(t._label)+"\n ")]),t._v(" "),i("div",[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],staticClass:"ma-0",attrs:{color:"secondary",flat:"",icon:""},on:{click:function(e){t.colorMenuActive=!1}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1)]),t._v(" "),i("v-layout",{staticStyle:{"max-width":"300px"},attrs:{row:"",wrap:"","align-center":"","justify-center":""}},t._l(t.colorCodes,function(e){return i("v-btn",{key:e,staticClass:"pa-0",attrs:{icon:"",flat:"",color:e},on:{click:function(i){return t.selectColor(e)}}},[i("span",{staticClass:"border-light round",style:"padding: 10px; background-color: "+e})])}),1)],1)],1)],1)],1):"password"===t.type?i("v-text-field",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{type:t.passwordVisible?"text":"password",autocomplete:"new-password",value:t.value,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,hint:t.hint,"persistent-hint":"",name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,readonly:t.readonly,dir:t.activeDir,color:t.color},on:{input:t.input}
1,scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("show"),expression:"$trans('show')"}],staticClass:"ma-0",attrs:{tabindex:"-1",flat:"",color:r.length?"error":t.color,icon:"",small:""},on:{click:function(e){t.passwordVisible=!t.passwordVisible}}},[i("icon",{domProps:{textContent:t._s(t.icon||(t.passwordVisible?t.$options.mdiEye:t.$options.mdiEyeOff))}})],1)]},proxy:!0}],null,!0)}):"price"===t.type?i("v-text-field",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{autocomplete:"off",value:t.value,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,hint:t.hint,"persistent-hint":"",name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,readonly:t.readonly,dir:t.activeDir,color:t.color},on:{input:function(e){t.input(t.$helpers.toNumeric(e))}},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$refs.currentType.$refs.input.click()}}},[t._v(t._s(t.icon||t.$options.mdiCash))])]},proxy:!0}],null,!0)}):"int"===t.type||"double"===t.type?i("v-text-field",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{autocomplete:"off",value:t.value,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,hint:t.hint,"persistent-hint":"",name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,readonly:t.readonly,dir:t.activeDir,color:t.color},on:{input:t.input},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$refs.currentType.$refs.input.click()}}},[t._v(t._s(t.icon||t.$options.mdiPencil))])]},proxy:!0}],null,!0)}):"check"===t.type?i("v-checkbox",{key:t.name,staticClass:"dense-input-message mb-0 mt-1 mx-3 pa-0",class:"rt-input-n-"+t.name,attrs:{value:"1"==t.value,"input-value":"1"==t.value,name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,readonly:t.readonly,color:t.color},on:{change:function(e){return t.input(e?"1":"")}},scopedSlots:t._u([{key:"label",fn:function(){return[i("div",{class:"1"==t.value?t.colorBase+"--text text--darken-2 body-2":"black--text body-1"},[t._v(t._s(t._label))])]},proxy:!0}])}):t.textareaByDefault?i("v-textarea",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{autocomplete:"off",value:t.value,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,hint:t.hint,"persistent-hint":"",name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,readonly:t.readonly,dir:t.activeDir,color:t.color,rows:t.rowsCount||1,"auto-grow":""},on:{input:t.input},scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[t.copyFromHtml&&t.getValue?i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Auto import",expression:"'Auto import'"}],staticClass:"pointer ma-0 pa-1",attrs:{outline:"",icon:"",small:"",color:r.length?"error":"accent"},on:{click:t.processCopyFromHtml}},[i("icon",{attrs:{color:r.length?"error":"accent"}},[t._v(t._s(t.$options.mdiArrowDown))])],1):i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$refs.currentType.$refs.input.click()}}},[t._v(t._s(t.icon||t.$options.mdiPencil))])]},proxy:!0}],null,!0)}):i("v-text-field",{key:t.name,ref:"currentType",class:"rt-input-n-"+t.name,attrs:{autocomplete:"off",value:t.value,label:t._label,placeholder:t.placeholder||t.valuePlaceholder,hint:t.hint,"persistent-hint":"",name:t.name,"data-rt-label":t._label,"data-rt-val-length":t.valueLength,"hide-details":t.hideDetails,"error-messages":r,messages:t.messages,readonly:t.readonly,dir:t.activeDir,color:t.color},on:{input:t.input}
1,scopedSlots:t._u([t.noIcon?null:{key:t.iconSlotName,fn:function(){return[i("icon",{staticClass:"pointer",attrs:{color:r.length?"error":t.color},on:{click:function(e){return t.$refs.currentType.$refs.input.click()}}},[t._v(t._s(t.icon||t.$options.mdiPencil))])]},proxy:!0}],null,!0)})]}}])})},[],!1,null,null,null).exports,kn={props:{notification:{type:Object,required:!0},isModelView:{type:Boolean,required:!1,default:!1}},data:()=>({loading:{delete:!1,patch:!1}}),computed:{baseColor(){return this.notification.$.checked_at?"secondary":this.notification.data.color}},methods:{markAsChecked(){this.loading.patch||(this.notification.$.checked_at||this.notification.data.auto_dismiss||(this.loading.patch=!0,this.$store.dispatch("resources/patch",{collection:[{model:"notification",id:this.notification.id,fill:{checked_at:this.$root.now}}]}).then(t=>{t.data.some(t=>200!==t.code)&&this.$root.fetchClientNotifs()}).catch(console.warn).finally(()=>this.loading.patch=!1)),this.$router.push(`/${this.notification.model_identifier}/${this.notification.model_id}`))},deleteNotif(){this.loading.delete||(this.loading.delete=!0,this.$store.dispatch("resources/delete",{collection:[{model:"notification",id:this.notification.id}]}).then(t=>{t.data.some(t=>200!==t.code)&&this.$root.fetchClientNotifs()}).catch(console.warn).finally(()=>this.loading.delete=!1))}}},Dn={components:{NotificationCard:Object(o.a)(kn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-expansion-panel-content",{scopedSlots:t._u([{key:"header",fn:function(){return[i("div",[i("div",{staticClass:"secondary--text text--lighten-1 mb-1",staticStyle:{"font-size":"10px","font-weight":"light"}},[t._v("\n "+t._s(t.notification.created_at)+"\n ")]),t._v(" "),i("div",{class:(t.baseColor||"black")+"--text font-2 mb-1"},[t._v("\n "+t._s(t.notification.data.title)+"\n ")]),t._v(" "),i("div",{staticClass:"secondary--text text--darken-1 font-1"},[t._v("\n "+t._s(t.notification.data.message)+"\n ")])])]},proxy:!0}])},[t._v(" "),i("v-card",[i("v-card-actions",{staticClass:"pt-0 px-3"},[i("v-spacer"),t._v(" "),t.isModelView&&t.notification.$.checked_at?t._e():i("v-btn",{attrs:{disabled:t.loading.patch,depressed:"",small:"",color:t.baseColor||"info"},on:{click:t.markAsChecked}},[i("span",{staticClass:"caption"},[t._v("\n "+t._s(t.$trans(t.isModelView?"dismiss":"view"))+"\n ")])]),t._v(" "),t.isModelView||t.notification.$.checked_at?i("v-btn",{staticClass:"px-3",staticStyle:{"min-width":"auto"},attrs:{flat:"",small:"",color:"secondary",disabled:t.loading.delete},on:{click:t.deleteNotif}},[i("span",{staticClass:"caption"},[t._v("\n "+t._s(t.$trans("delete"))+"\n ")])]):t._e()],1),t._v(" "),i("v-divider")],1)],1)},[],!1,null,null,null).exports},props:{items:{type:Array,required:!0},isModelView:{type:Boolean,required:!1,default:!1}},data:()=>({loading:{delete:!1,check:!1}}),computed:{checkedNotifs(){return this.items.filter(t=>t.data.$.checked_at).map(t=>t.data)},newNotifs(){return this.items.filter(t=>!t.data.$.checked_at).map(t=>t.data)}},methods:{deleteChecked(){if(this.loading.delete)return;const t=this.checkedNotifs.slice(0,120).map(t=>({model:"notification",id:t.id}));t.length&&(this.loading.delete=!0,this.$store.dispatch("resources/delete",{collection:t}).then(t=>{t.data.some(t=>200!==t.code)&&this.$root.fetchClientNotifs()}).catch(console.warn).finally(()=>this.loading.delete=!1))},markAllAsChecked(){if(this.loading.check)return;const t=this.newNotifs.map(t=>({model:"notification",id:t.id,fill:{checked_at:this.$root.now}}));t.length&&(this.loading.check=!0,this.$store.dispatch("resources/patch",{collection:t}).then(t=>{t.data.some(t=>200!==t.code)&&this.$root.fetchClientNotifs()}).catch(console.warn).finally(()=>this.loading.check=!1))}}},An=Object(o.a)(Dn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.newNotifs.length?[i("div",{staticClass:"px-3 pt-3 font-1 black--text"},[t._v("\n "+t._s(t.$trans("new notifications"))+"\n "),i("v-btn",{staticClass:"my-0 py-1 px-2",staticStyle:{height:"auto","min-width":"auto"},attrs:{small:"",flat:"",color:"info",disabled:t.loading.check},on:{click:t.markAllAsChecked}},[t._v("\n Close all\n ")])],1),t._v(" "),i("v-expansion-panel",{key:t.newNotifs.length,staticClass:"px-3",attrs:{popout:"",value:0}},t._l(t.newNotifs,function(e,r){return i("notification-card",{key:r,attrs:{notification:e,"is-model-view":t.isModelView}})}),1),t._v(" "),i("v-divider")]:t._e(),t._v(" "),t.checkedNotifs.length?[i("div",{staticClass:"px-3 pt-3 font-1 secondary--text text--darken-1"},[t._v("\n Previous notifications\n "),i("v-btn",{staticClass:"my-0 py-1 px-2",staticStyle:{height:"auto","min-width":"auto"},attrs:{small:"",depressed:"",disabled:t.loading.delete},on:{click:t.deleteChecked}},[t._v("\n Delete all\n ")])],1),t._v(" "),i("v-expansion-panel",{staticClass:"px-3",attrs:{popout:""}},t._l(t.checkedNotifs,function(e,r){return i("notification-card",{key:r,attrs:{notification:e,"is-model-view":t.isModelView}})}),1)]:t._e()],2)},[],!1,null,null,null).exports,Tn={mdiCheck:a.z,mdiClose:a.M,props:{resource:{type:Object,required:!0},startProp:{type:String,required:!1,default:"started_at"},endProp:{type:String,required:!1,default:"delivery_at"},endPropName:{type:String,required:!1},completedProp:{type:String,required:!1,default:"delivered_at"},linear:{type:Boolean,required:!1,default:!1},hideText:{type:Boolean,required:!1,default:!1},linearHeight:{type:String,required:!1,default:void 0},label:{type:String,required:!1,default:void 0}},tickUnwatch:void 0,data(){return{percent:this.resource.$[this.completedProp]?100:0,ticked:!1}},computed:{user(){return this.$store.state.client.user},visualPercent(){return this.ticked?this.percent||(this.linear?1:0):100},colorBase(){return this.percent<100||this.resource.$[this.completedProp]?"primary":"error"}},methods:{tick(){if(this.ticked=!0,this.resource.$[this.completedProp])return void(this.percent=100);let t=this.resource.$[this.startProp]||0;const e=this.resource.$[this.endProp]||0;t>this.$root.now&&(t=this.$root.now);const i=Math.trunc(100*(this.$root.now-t)/(e-t));this.percent=i>100?100:i}},created(){this.$options.tickUnwatch||setTimeout(()=>{this._inactive||this.$options.tickUnwatch||(this.$options.tickUnwatch=this.$watch("$root.now",this.tick))},500)},activated(){this.$options.tickUnwatch||setTimeout(()=>{this._inactive||this.$options.tickUnwatch||(this.$options.tickUnwatch=this.$watch("$root.now",this.tick))},500)},deactivated(){this.$options.tickUnwatch&&(this.$options.tickUnwatch(),this.$options.tickUnwatch=void 0)},beforeDestroy(){this.$options.tickUnwatch&&(this.$options.tickUnwatch(),this.$options.tickUnwatch=void 0)}},Sn=Object(o.a)(Tn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"text-xs-center",staticStyle:{position:"relative"}}
1,[t.linear?[i("v-progress-linear",{class:{"d-none":t.hideText,"reta-linear-progress":!0},attrs:{value:t.visualPercent,"buffer-value":t.visualPercent,height:"4",color:t.colorBase}}),t._v(" "),i("div",{class:[t.colorBase,t.colorBase+"--text","lighten-1 text--lighten-1"],style:"position: absolute; pointer-events: none; bottom: 0; "+(t.$vuetify.rtl?"right":"left")+": 0; width: "+t.visualPercent+"%; "+(t.linearHeight?"height: "+t.linearHeight+"; opacity: 0.07;":"height: 3px; box-shadow: 0 -3px 6px currentColor;")}),t._v(" "),i("div",{class:{"d-none":t.hideText,"reta-progress-text":!0},style:"white-space: nowrap; position: absolute; bottom: 100%; "+(t.$vuetify.rtl?"right":"left")+": "+t.visualPercent+"%; transform: translateY(-50%) translateX("+t.visualPercent+"%);"},[i("div",{class:"d-inline-block "+t.colorBase+"--text"},[t._v("\n "+t._s(t.label)+"\n ")]),t._v("\n  \n "),i("v-scale-transition",{attrs:{mode:"out-in"}},[t.percent<100?i("div",{key:"percent",class:"d-inline-block caption "+t.colorBase+"--text"},[i("div",{staticClass:"d-inline-block"},[i("countdown",{attrs:{"unix-time":t.resource.$[t.endProp]}})],1)]):t.resource.$[t.completedProp]?i("div",{key:"success",staticClass:"d-inline-block"},[i("icon",{attrs:{color:t.colorBase,size:"30"}},[t._v(t._s(t.$options.mdiCheck))])],1):i("div",{key:"fail",staticClass:"d-inline-block"},[i("icon",{attrs:{color:"error",size:"30"}},[t._v(t._s(t.$options.mdiClose))])],1)])],1)]:[i("v-progress-circular",{attrs:{rotate:-90,size:120,width:5,value:t.visualPercent,color:t.colorBase}},[i("v-scale-transition",{attrs:{mode:"out-in"}},[t.percent<100?i("div",{key:"percent"},[t._v("\n "+t._s(t.percent)+"%\n "),i("br"),t._v(" "),i("div",{staticClass:"d-inline-block caption secondary--text"},[i("countdown",{attrs:{"unix-time":t.resource.$[t.endProp]}})],1)]):t.resource.$[t.completedProp]?i("div",{key:"success"},[i("icon",{style:{transform:"translateX("+(t.$vuetify.rtl?"50%":"-50%")+")"},attrs:{color:t.colorBase,size:"40"}},[t._v(t._s(t.$options.mdiCheck))])],1):i("div",{key:"fail"},[i("icon",{style:{transform:"translateX("+(t.$vuetify.rtl?"50%":"-50%")+")"},attrs:{color:"error",size:"40"}},[t._v(t._s(t.$options.mdiClose))])],1)])],1),t._v(" "),i("div",{staticClass:"py-3 caption"},[i("div",{staticClass:"secondary--text pb-2"},[t._v("\n "+t._s(t.endPropName||t.$trans(t.endProp))+"\n ")]),t._v(" "),i("div",[t._v("\n "+t._s(t.resource[t.endProp])+"\n ")])])]],2)},[],!1,null,null,null).exports,Mn={mdiAccount:a.a,mdiEye:a.ib,mdiEyeOff:a.kb,mdiCheck:a.z,mdiMenuDown:a.nc,props:{autofocus:{type:Boolean,required:!1,default:!0},passwordless:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:""},forceRole:{type:String,required:!1}},data:()=>({loading:!1,passwordInputValue:"",passwordDeviceValue:window.$genDeviceToken(),passwordType:"password"}),computed:{singleRole(){return this.forceRole?this.forceRole:1===this.$root.registerRoles.length?this.$root.registerRoles[0]:void 0},fieldValue:{get(){return this.value},set(t){this.$emit("input",this.$helpers.safeNums(t))}},passwordValue:{get(){return this.passwordless?this.passwordDeviceValue:this.passwordInputValue},set(t){this.passwordInputValue=this.$helpers.safeNums(t)}}},methods:{register(t){if(this.loading||!t)return;let e=this.fieldValue.replace(/\s+/g,"");if(this.fieldValue=e,!e)return void this.focusField();if(!this.passwordValue)return void this.focusPass();if(this.passwordValue.length<6)return void this.focusPass();let i=this.$helpers.guessType(e);if(!i)return this.focusField(),void this.$root.addNotif("The information you entered is incorrect!");this.$helpers.hideKeyboard(),this.loading=!0,this.$store.dispatch("client/register",{field_name:i,field_value:e,password:this.passwordValue,roles:[t]}).then(()=>this.$nextTick(()=>this.$emit("success"))).catch(t=>{console.warn(t);const{status:e}=t.response||{},i=!this.passwordless&&this.passwordValue;401===e&&this.$emit("switchDo",{type:"login",handler:t=>{t&&"function"==typeof t.login&&i&&(t.passwordValue=i)}})}).finally(()=>{this.loading=!1})},focusPass(){const t=this.$refs.passInput&&this.$refs.passInput.$refs.input;t&&t.focus()},focusField(){const t=this.$refs.fieldInput&&this.$refs.fieldInput.$refs.input;t&&t.focus()},clickRegisterBtn(){this.$helpers.hideKeyboard(),setTimeout(()=>{const t=this.$refs.registerBtn&&this.$refs.registerBtn.$el;t&&(t.click(),t.scrollIntoView())},100)}}},In=Object(o.a)(Mn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._t("card-title",[i("v-layout",{staticClass:"py-3 px-md-3",attrs:{row:""}},[i("div",{staticClass:"title f-500"},[t._v("Create your account")]),t._v(" "),i("div",{staticClass:"grow"})])]),t._v(" "),i("div",{staticClass:"pa-2"}),t._v(" "),i("v-text-field",{key:"field-input",ref:"fieldInput",attrs:{color:"primary",autofocus:t.autofocus,type:"text",label:"Email",rules:[function(){return!!t.fieldValue||"Email is required"}],dir:"ltr"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.focusPass(e)}},scopedSlots:t._u([{key:"prepend",fn:function(){return[i("icon",[t._v(t._s(t.$options.mdiAccount))])]},proxy:!0}]),model:{value:t.fieldValue,callback:function(e){t.fieldValue=e},expression:"fieldValue"}}),t._v(" "),t.passwordless?t._e():i("v-text-field",{key:"password-input",ref:"passInput",attrs:{autocomplete:"new-password",color:"primary",type:t.passwordType,label:t.$trans("password"),dir:"ltr",rules:[function(){return!!t.passwordValue||t.$trans(["password","is required"])},function(){return t.passwordValue.length>=8||t.$trans(["password","must be at least 8 characters"])}]},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.clickRegisterBtn(e)}},scopedSlots:t._u([{key:"prepend",fn:function(){return[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("show"),expression:"$trans('show')"}],staticClass:"ma-0",attrs:{tabindex:"-1",flat:"",icon:"",small:"",color:"text"===t.passwordType?"primary":"secondary darken-1"},on:{click:function(e){t.passwordType="text"===t.passwordType?"password":"text"}}},[i("icon",[t._v(t._s("text"===t.passwordType?t.$options.mdiEye:t.$options.mdiEyeOff))])],1)]},proxy:!0}],null,!1,2848098746),model:{value:t.passwordValue,callback:function(e){t.passwordValue=e},expression:"passwordValue"}}),t._v(" "),i("div",{staticClass:"pt-2 pb-4 d-flex align-items-center"},[i("span",[i("icon",{attrs:{color:"accent"}}
1,[t._v(t._s(t.$options.mdiCheck))])],1),t._v("Â \n "),i("div",{staticClass:"d-inline-block"},[t._v("\n By creating an account you agree to our terms and conditions.\n ")])]),t._v(" "),i("v-layout",{attrs:{row:""}},[i("v-spacer"),t._v(" "),i("v-flex",{staticClass:"text-xs-center",attrs:{xs8:"",md6:""}},[t.singleRole?i("v-btn",{ref:"registerBtn",attrs:{round:"",color:"primary",depressed:"",block:"",ripple:!1,disabled:t.loading},on:{click:function(e){return t.register(t.singleRole)}}},[t._v("\n Register\n ")]):i("v-menu",{attrs:{"offset-y":"",bottom:"",right:"",origin:"top left","max-width":"280",lazy:""},scopedSlots:t._u([{key:"activator",fn:function(e){var r=e.on;return[i("v-btn",t._g({ref:"registerBtn",attrs:{round:"",color:"primary",depressed:"",block:"",ripple:!1,disabled:t.loading}},r),[t._v("\n Register\n "),i("icon",[t._v(t._s(t.$options.mdiMenuDown))])],1)]}}])},[t._v(" "),i("v-list",{attrs:{dense:""}},t._l(t.$root.registerRoles,function(e){return i("v-list-tile",{key:e,staticClass:"my-1",attrs:{disabled:t.loading},on:{click:function(i){return t.register(e)}}},[i("div",{staticClass:"px-3"}),t._v(" "),i("v-list-tile-title",[t._v("\n Register as: "),i("b",[t._v(t._s(t.$trans(e)))])]),t._v(" "),i("div",{staticClass:"px-3 d-flex justify-center"},[i("icon",{attrs:{size:"20",color:"primary"}},[t._v(t._s(t.$root.arrowForward))])],1)],1)}),1)],1),t._v(" "),i("div",{staticClass:"font-1 mt-2"},[i("span",[t._v(" Already have an account? ")]),t._v(" "),i("v-btn",{staticClass:"ma-0",staticStyle:{width:"auto","min-width":"auto"},attrs:{flat:"",small:"",color:"primary"},on:{click:function(e){return t.$emit("switch","login")}}},[t._v("\n Login\n ")])],1)],1)],1)],2)},[],!1,null,null,null).exports,Nn={mdiAlertCircle:a.f,mdiDownload:a.db,mdiOpenInNew:a.uc,mdiCog:a.S,mdiEyeOff:a.kb,props:{guest:{type:Boolean,required:!1,default:!1},patchable:{type:Boolean,required:!1,default:!0},response:{type:Object,required:!0},resource:{type:Object,required:!1,default:()=>({$:{}})},hideDetails:{type:Boolean,required:!1,default:!1},hideableItems:{type:Array,required:!1,default:()=>[]}},data:()=>({modifing:!1,modifyMenuActive:!1,downloading:!1,typingTimeout:void 0}),computed:{user(){return this.$store.state.client.user},userAvatarSrc(){return this.response.user.avatar?this.$helpers.cdn(this.response.user.avatar):null},canPatch(){return!!(this.$store.getters["client/can"].response||{}).patch},isSelf(){return this.guest&&this.response.user.guest||!this.response.user.guest&&this.response.user.id===this.user.$.id},flexDir:()=>"row",color(){return this.isSelf?"primary":"accent"},textColor(){return this.isSelf?"primary--text":"accent--text"},details(){return Object.keys(this.response.data.details||{}).map(t=>({text:this.$trans(t),value:this.resource[t]||this.$trans(this.response.data.details[t])}))},files(){return(this.response.files||[]).map((t,e)=>{const i=t.split(".").pop(),r=t.split("/").pop().split("."+i)[0];let n=!1;return"html"!==i&&(n=this.response.data.filename?`${this.response.data.filename}${e?`-${e+1}`:""}.${i}`:`${r}.${i}`),{link:this.$helpers.cdn(t),type:i,name:r,downloadName:n}})},responseUserIdTitle(){return this.$trans(this.response.user.guest?this.guest?"you":"visitor":this.response.user.id_title||"name")},respMessageHtml(){if(this.response.data.message)return this.$helpers.highlightLinks(this.response.data.message)},hiddenFor(){if(!this.response.revision_request)return[];try{const t=JSON.parse(this.response.revision_request);if(!Array.isArray(t))throw"Expected Array";return t}catch(t){return["everyone"]}},allHidden(){return this.hiddenFor.length&&this.hiddenFor.includes("everyone")},modifiables(){const t=[];for(const e of this.hideableItems)this.allHidden||this.hiddenFor.includes(e)?t.push({icon:a.lb,titleHtml:`Show for <b>${e}</b>`,options:{showFor:e}}):t.push({icon:a.jb,titleHtml:`Hide for <b>${e}</b>`,options:{hideFor:e}});return(this.allHidden||this.hideableItems.some(t=>this.hiddenFor.includes(t)))&&t.unshift({icon:a.ib,titleHtml:"Show for <b>everyone</b>",options:{showFor:"everyone"}}),this.allHidden||t.unshift({icon:a.kb,titleHtml:"Hide for <b>everyone</b>",options:{hideFor:"everyone"}}),t.push({icon:a.ab,titleHtml:"<b>Delete</b> the message",options:{delete:!0}}),t},respModified(){if(this.response.data.submission_fill&&this.user.models.submission){const t=this.user.models.submission.properties,e=this.response.data.submission_fill;return Object.keys(e).map(e=>this.$trans(t[e]&&t[e].label||e))}return[]}},methods:{download(t,e){this.downloading||(this.downloading=!0,this.$root.download(t,e).finally(()=>this.downloading=!1))},checkViewUser(){this.canPatch&&!this.response.user.guest&&this.$router.push(`/user/${this.response.user.id}`)},async modify(t){if(this.modifing)return;const e=t.delete?"delete":"patch";if("delete"===e&&!await this.$root.ask("This message will be DELETED"))return;const i={model:"response",id:this.response.id};if(t.hideFor){if(this.allHidden||this.hiddenFor.includes(t.hideFor))return;const e="everyone"!==t.hideFor?this.hiddenFor.concat([t.hideFor]):["everyone"];i.fill={revision_request:JSON.stringify(e.length<this.hideableItems.length?e:["everyone"])}}else if(t.showFor){if(!this.hiddenFor.length)return;const e=this.allHidden?this.hideableItems:this.hiddenFor,r="everyone"!==t.showFor?e.filter(e=>e!==t.showFor):[];i.fill={revision_request:r.length?JSON.stringify(r):null}}this.modifing=!0,this.$store.dispatch(`resources/${e}
1`,{collection:[i]}).then(t=>{200===t.data[0].code&&this.$nextTick(()=>this.$emit("update"))}).catch(console.warn).finally(()=>this.modifing=!1)},checkTyping(t=6){this.typingTimeout=setTimeout(()=>{this.response.data.typing&&t<=60&&(this.$emit("update"),this.checkTyping(t+6))},1e3*t)}},created(){this.checkTyping()},beforeDestroy(){this.typingTimeout&&clearTimeout(this.typingTimeout)}},On=Object(o.a)(Nn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-layout",{class:[t.flexDir,t.hideDetails?"":"pt-3"],attrs:{wrap:""}},[i("v-flex",{class:{"warning lighten-5":t.modifyMenuActive},attrs:{xs12:""}},[i("v-layout",{class:[t.flexDir]},[i("div",{class:["text-xs-center",t.hideDetails?"":"pt-4"]},[t.hideDetails?i("div",{staticStyle:{width:"36px"}}):i("v-avatar",{attrs:{size:"36",color:t.$helpers.hslColor(t.responseUserIdTitle)}},[t.userAvatarSrc?i("img",{staticClass:"cover pointer",attrs:{src:t.userAvatarSrc},on:{click:function(e){return t.$root.imageDialog(t.userAvatarSrc)}}}):i("span",{staticClass:"white--text"},[t._v("\n "+t._s(t.responseUserIdTitle[0])+"\n ")])])],1),t._v(" "),i("div",{staticClass:"pa-1"}),t._v(" "),i("div",{staticClass:"w-100",staticStyle:{"border-bottom":"1px solid #ccc"}},[i("v-layout",{class:[t.flexDir,"align-center"]},[t.hideDetails||!t.canPatch||t.response.user.guest?t.hideDetails?t._e():i("div",{class:[t.textColor]},[t._v("\n "+t._s(t.responseUserIdTitle)+"\n ")]):i("v-btn",{staticClass:"ma-0 px-1",staticStyle:{"min-width":"auto",height:"auto"},attrs:{small:"",flat:"",color:t.color},on:{click:t.checkViewUser}},[i("div",{staticClass:"body-1"},[t._v("\n "+t._s(t.responseUserIdTitle)+"\n ")])]),t._v(" "),i("div",{staticClass:"pa-1"}),t._v(" "),t.hideDetails?t._e():i("div",{staticClass:"secondary--text caption"},[t._v("\n "+t._s(t.$helpers.time.format(1e3*t.response.created_at,"mdt"))+"\n ")])],1),t._v(" "),i("div",{class:t.hideDetails?"pb-1":"py-1"},[t.response.data.typing?i("div",{class:["pa-2 caption secondary lighten-4 secondary--text text--lighten-4",!t.isSelf||"is-self",t.hideDetails?"chat-start-margin round-8":"chat-card-box"]},[i("div",{staticClass:"secondary--text text--darken-3"},[t._v("\n "+t._s(t.$trans("is typing"))+"\n "),i("span",{staticClass:"d-inline-flex"},[i("span",{staticClass:"dotwave"},[t._v("â¢")]),t._v(" "),i("span",{staticClass:"dotwave"},[t._v("â¢")]),t._v(" "),i("span",{staticClass:"dotwave"},[t._v("â¢")])])])]):i("v-card",{class:["black--text transparent",!t.isSelf||"is-self"],attrs:{flat:""}},[i("div",{staticClass:"px-2 py-1 font-1"},[i("div",{staticClass:"pt-1"}),t._v(" "),t.response.data.rating?i("v-rating",{staticStyle:{direction:"ltr"},attrs:{value:t.response.data.rating,small:"",dense:"",color:"white","background-color":"white","half-increments":"",readonly:""}}):t._e(),t._v(" "),t.respModified.length?i("div",{staticClass:"pb-1"},[t._v("\n Modified: "),t._l(t.respModified,function(e,r){return i("span",{key:r,staticClass:"font-2"},[t._v(" "+t._s(e)+", ")])})],2):t._e(),t._v(" "),t.response.data.title?i("div",{staticClass:"pb-1"},[t._v("\n "+t._s(t.response.data.title)+"\n ")]):t._e(),t._v(" "),t.respMessageHtml?i("div",{staticClass:"pb-1",staticStyle:{"white-space":"pre-line","word-break":"break-word"},domProps:{innerHTML:t._s(t.respMessageHtml)},on:{click:t.$root.htmlWithListeners}}):t._e(),t._v(" "),t.response.data.summary?i("div",{staticClass:"pb-1"},[t._v("\n "+t._s(t.response.data.summary)+"\n ")]):t._e(),t._v(" "),t.details.length?i("div",{staticClass:"pb-1"},t._l(t.details,function(e,r){var n=e.text,a=e.value;return i("div",{key:r,staticClass:"pa-1"},[t._v("\n "+t._s(n)+":\n "),i("span",{staticClass:"body-2"},[t._v("\n "+t._s(a)+"\n ")])])}),0):t._e(),t._v(" "),t.files.length?i("div",{staticClass:"mt-1 mx--1"},t._l(t.files,function(e,r){var n=e.link,a=e.type,s=(e.name,e.downloadName);return i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:(s?"Download":"View")+" "+a+" file",expression:"`${downloadName ? 'Download' : 'View'} ${type} file`"}],key:r,staticClass:"ma-1 py-1 px-2 ww-auto",attrs:{disabled:t.downloading,href:n,target:"_blank",depressed:"",color:t.color,small:""},on:{click:function(e){!s||t.download(n,s)||e.preventDefault()}}},[i("div",{staticClass:"caption"},[i("icon",{attrs:{size:"16"},domProps:{textContent:t._s(s?t.$options.mdiDownload:t.$options.mdiOpenInNew)}}),t._v(" "),i("span",{staticStyle:{"text-transform":"uppercase"}},[t._v(t._s(a))]),t._v("\n "+t._s(t.$trans("file"))+"\n ")],1)])}),1):t._e()],1)])],1)],1),t._v(" "),t.patchable&&t.canPatch?i("div",{staticClass:"d-inline-flex pa-1",staticStyle:{"border-bottom":"1px solid #ccc"}},[i("div",{staticClass:"d-inline-flex"}
1,[t.hiddenFor.length?i("div",{staticClass:"secondary--text caption px-2 text-center",attrs:{title:"Hidden for "+t.hiddenFor.join(", ")+" (Except the sender)"}},[i("icon",{attrs:{size:"20",color:"inherit"}},[t._v(t._s(t.$options.mdiEyeOff))]),t._v(" "),i("div",{staticClass:"nowrap"},t._l(t.hiddenFor,function(e,r){return i("div",{key:r},[t._v("\n "+t._s(e)+"\n ")])}),0)],1):t._e(),t._v(" "),i("v-menu",{attrs:{"max-width":"230"},scopedSlots:t._u([{key:"activator",fn:function(e){var r=e.on;return[i("v-btn",t._g({directives:[{name:"tooltip",rawName:"v-tooltip",value:"Message settings",expression:"'Message settings'"}],staticClass:"ma-0",attrs:{flat:"",icon:"",small:"",color:"primary"}},r),[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiCog))])],1)]}}],null,!1,933990153),model:{value:t.modifyMenuActive,callback:function(e){t.modifyMenuActive=e},expression:"modifyMenuActive"}},[t._v(" "),i("v-list",{attrs:{dense:""}},[i("div",{staticClass:"py-2 px-3 caption black--text"},[t._v("\n A hidden message is still "),i("b",[t._v("visible")]),t._v(" to the sender of the message\n ")]),t._v(" "),t._l(t.modifiables,function(e,r){var n=e.titleHtml,a=e.icon,s=e.options;return i("v-list-tile",{key:r,attrs:{disabled:t.modifing},on:{click:function(e){return t.modify(s)}}},[i("v-list-tile-action",[i("icon",[t._v(t._s(a))])],1),t._v(" "),i("v-list-tile-title",{staticClass:"body-1"},[i("div",{domProps:{innerHTML:t._s(n)}})])],1)})],2)],1)],1)]):t._e()])],1)],1)},[],!1,null,null,null).exports;function Pn(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}var En={mdiClose:a.M,mdiPaperclip:a.vc,mdiSend:a.Oc,mdiTextShort:a.od,mdiText:a.ld,props:{withTitle:{type:Boolean,required:!1,default:!1},withMessage:{type:Boolean,required:!1,default:!1},defaultMessage:{type:String,required:!1},messageOptional:{type:Boolean,required:!1,default:!1},messageLabel:{type:String,required:!1,default:void 0},chat:{type:Boolean,required:!1,default:!1},chatLabel:{type:String,required:!1,default:"Your message..."},withFile:{type:Boolean,required:!1,default:!1},addLinksToDocs:{type:Boolean,required:!1,default:!1},fileIdentifier:{type:String,required:!1,default:"response"},fileId:{type:[String,Number],required:!1,default:null},attachBtn:{type:Boolean,required:!1,default:!1},attachBtnText:{type:String,required:!1,default:void 0},label:{type:String,required:!1,default:void 0},actionName:{type:String,required:!1,default:void 0},actionIcon:{type:String,required:!1,default:void 0},actionIconStart:{type:Boolean,required:!1,default:!1},actionOutline:{type:Boolean,required:!1,default:!1},tag:{type:String,required:!1,default:null},modelIdentifier:{type:String,required:!0},modelId:{type:[String,Number],required:!0},data:{type:Object,required:!1,default:void 0},valid:{type:Boolean,required:!1,default:!0},hideDisabledAction:{type:Boolean,required:!1,default:!1},autofocus:{type:Boolean,required:!1,default:!1},overrideSend:{type:Boolean,required:!1,default:!1},color:{type:String,required:!1,default:"primary"},filePreferText:{type:Boolean,required:!1,default:!1},askMessage:{type:String,required:!1,default:void 0},validFn:{type:Function,required:!1},small:{type:Boolean,required:!1,default:!1}},data:()=>({loading:!1,title:null,message:null,attach:!1,autoGrowHack:-100}),computed:{user(){return this.$store.state.client.user},hasActiveFiles(){return this.$store.state.folder.files.some(t=>t.model_identifier===this.fileIdentifier&&t.model_id===this.fileId)},requiresMessage(){return(this.withMessage||this.chat&&!this.hasActiveFiles)&&!this.messageOptional},disabled(){return!this.valid||this.withFile&&!this.hasActiveFiles||this.withTitle&&!this.title||this.requiresMessage&&!this.message||this.data&&Object.keys(this.data).some(t=>!this.data[t])}},methods:{async send(t){if(this.loading||this.disabled)return;if(this.validFn&&!await this.validFn())return;if(this.askMessage&&!await this.$root.ask(this.askMessage))return;if(this.overrideSend&&(!t||!t.forceSend))return void this.$emit("overrideSend");this.loading=!0;const e={model_identifier:this.modelIdentifier,model_id:this.modelId};if(e.data=this.data?function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
1e%2?Pn(i,!0).forEach(function(e){h()(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pn(i).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({},this.data):{},this.tag&&(e.tag=this.tag),this.withTitle&&!(e.data.title=this.title.trim()))return;const i=(this.message||"").trim();if(i)e.data.message=i;else if(this.defaultMessage)e.data.message=this.defaultMessage.trim();else if(this.requiresMessage)return;(this.withFile||this.attach)&&(e.with_file=!0,this.fileId&&(e.file_id=this.fileId),"response"!==this.fileIdentifier&&(e.file_identifier=this.fileIdentifier)),this.$store.dispatch("resources/post",{collection:[{model:"response",fill:e}]}).then(t=>{200===t.data[0].code&&((this.withFile||this.attach)&&this.$store.dispatch("folder/get").catch(console.warn),this.title=null,this.message=null,this.attach=!1,this.$nextTick(()=>this.$emit("update",t.data[0])))}).catch(console.warn).finally(()=>this.loading=!1)}}},qn=Object(o.a)(En,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.label?i("div",{staticClass:"caption black--text py-2"},[t._v("\n "+t._s(t.label)+"\n ")]):t._e(),t._v(" "),t.chat?i("v-form",{class:!t.attach||"pb-3",on:{submit:function(t){t.preventDefault()}}},[i("v-textarea",{key:t.autoGrowHack,ref:"chat",staticClass:"flip-outer-icon-when-rtl",attrs:{autofocus:t.autofocus,color:t.color,label:t.chatLabel,autocomplete:"off","auto-grow":"","hide-details":"",rows:"1",maxlength:"3000"},scopedSlots:t._u([{key:"append",fn:function(){return[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("attach"),expression:"$trans('attach')"}],staticClass:"ma-0",attrs:{flat:"",icon:"",color:t.color,tabindex:"-1"},on:{click:function(e){t.attach=!t.attach}}},[i("icon",{domProps:{textContent:t._s(t.attach?t.$options.mdiClose:t.$options.mdiPaperclip)}})],1)]},proxy:!0},!t.message&&t.requiresMessage||t.hideDisabledAction&&t.disabled?null:{key:"append-outer",fn:function(){return[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("send"),expression:"$trans('send')"}],staticClass:"ma-0",attrs:{small:"",fab:"",depressed:"",color:t.color,disabled:t.disabled||t.loading},on:{click:function(e){return t.send()}}},[i("icon",[t._v(t._s(t.$options.mdiSend))])],1)]},proxy:!0}],null,!0),model:{value:t.message,callback:function(e){t.message=e},expression:"message"}})],1):i("v-form",{on:{submit:function(t){t.preventDefault()}}},[t.withTitle?i("model-input",{ref:"title",staticClass:"pb-3",attrs:{color:t.color,name:"subject",type:"string",icon:t.$options.mdiTextShort,"hide-details":""},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}}):t._e(),t._v(" "),t.withMessage?i("v-textarea",{ref:"message",staticClass:"pb-3 lh-2",attrs:{autofocus:t.autofocus,color:t.color,label:t.messageLabel,name:"message",autocomplete:"off","auto-grow":"","hide-details":"",rows:"1",maxlength:"1500"},scopedSlots:t._u([{key:"prepend",fn:function(){return[i("icon",[t._v(t._s(t.$options.mdiText))])]},proxy:!0}],null,!1,961725427),model:{value:t.message,callback:function(e){t.message=e},expression:"message"}}):t._e()],1),t._v(" "),i("model-dropzone",{directives:[{name:"show",rawName:"v-show",value:!t.attachBtn&&t.withFile||t.attach,expression:"(!attachBtn && withFile) || attach"}],ref:"modelDz",attrs:{identifier:t.fileIdentifier,crop:"","image-resize":"1600",id:t.fileId,"prefer-text":t.filePreferText,"add-links-to-docs":t.addLinksToDocs}}),t._v(" "),t.chat?t._e():i("v-layout",{staticClass:"pt-2",attrs:{row:""}},[t.attachBtn?[t.attach?i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$trans("close"),expression:"$trans('close')"}],key:"close",attrs:{icon:"",flat:"",color:t.color},on:{click:function(e){t.attach=!1}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1):i("v-btn",{staticClass:"mx-0",attrs:{flat:"",color:t.color,tabindex:"-1"},on:{click:function(e){t.attach=!0}}},[i("div",[i("icon",[t._v(t._s(t.$options.mdiPaperclip))]),t._v("\n "+t._s(t.attachBtnText||t.$trans(["file","attach"]))+"\n ")],1)])]:t._e(),t._v(" "),i("v-spacer"),t._v(" "),t._t("close"),t._v(" "),t.withFile&&t.attachBtn&&!t.attach||t.hideDisabledAction&&t.disabled?t._e():i("v-btn",{staticClass:"mx-0",attrs:{small:t.small,disabled:t.loading||t.disabled,color:t.color,depressed:"",outline:t.actionOutline},on:{click:function(e){return t.send()}}},[t.actionIconStart?i("icon",{attrs:{size:t.small?"18":"24"},domProps:{textContent:t._s(t.actionIcon||t.$root.arrowBackward)}}):t._e(),t._v("\n  "),i("span",[t._v(t._s(t.actionName||t.$trans("send")))]),t._v(" \n "),t.actionIconStart?t._e():i("icon",{attrs:{size:t.small?"18":"24"},domProps:{textContent:t._s(t.actionIcon||t.$root.arrowForward)}}
1)],1)],2)],1)},[],!1,null,null,null).exports,Fn={props:{user:{type:Object,required:!0},title:{type:String,required:!1,default:void 0},cancelable:{type:Boolean,required:!1,default:!1},cancelable:{type:Boolean,required:!1,default:!1}},data:()=>({loading:!1,newPasswordValue:""}),methods:{async send(){if(this.loading)return;const t=await this.$refs.input.validate();return t?this.$root.addNotif(t):!!await this.$root.requireProfile({message:"please enter your email address to continue",fields:["email"],some:!0})&&(this.loading=!0,void await this.$store.dispatch("resources/patch",{collection:[{model:"user",id:this.user.id,fill:{new_password:this.newPasswordValue}}]}).then(t=>{200===t.data[0].code&&(this.newPasswordValue="",this.$root.addNotif({message:"updated",timeout:4e3,icon:a.z}),this.$nextTick(()=>this.$emit("update")))}).catch(console.warn).finally(()=>this.loading=!1))},cancel(){this.newPasswordValue="",this.$emit("cancel")},focus(){}}},jn=Object(o.a)(Fn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-card",[i("v-card-title",{staticClass:"secondary lighten-4 black--text"},[i("div",{staticClass:"subheading font-w-500"},[t._v("\n "+t._s(t.title||t.$trans("by changing the password you will logout from all devices"))+"\n ")])]),t._v(" "),i("v-card-text",{staticClass:"pb-0"},[i("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.send(e)}}},[i("model-input",{ref:"input",attrs:{type:"password",name:"password",label:t.$trans("new :n",{n:t.$trans("password")}),rules:"required|min:6|max:191"},model:{value:t.newPasswordValue,callback:function(e){t.newPasswordValue=e},expression:"newPasswordValue"}})],1)]),t._v(" "),i("v-card-actions",[i("v-spacer"),t._v(" "),t.cancelable?i("v-btn",{attrs:{disabled:t.loading,color:"secondary",flat:""},on:{click:t.cancel}},[t._v("\n "+t._s(t.$trans("cancel"))+"\n ")]):t._e(),t._v(" "),i("v-btn",{attrs:{disabled:t.loading,color:"primary",depressed:""},on:{click:t.send}},[t._v("\n "+t._s(t.$trans("confirm"))+"\n ")])],1)],1)},[],!1,null,null,null).exports,zn=i(43),Vn=i.n(zn),Rn={mdiCrop:a.X,mdiClose:a.M,props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:NaN},disabled:{type:Boolean,required:!1,default:!1}},data:()=>({cropper:void 0,localRatio:void 0}),computed:{validSrc:{get(){return this.src?this.$helpers.cdn(this.src)+"?preview":void 0},set(t){this.srcValue=t}}},watch:{validSrc(t){t?this.setupCropper():this.destoryCropper()},localRatio(){this.destoryCropper(),this.setupCropper()},ratio(){this.destoryCropper(),this.setupCropper()}},methods:{setupCropper(){this.$nextTick(()=>{this.cropper?this.cropper.replace(this.validSrc):this.cropper=new Vn.a(this.$refs.image,{viewMode:1,autoCrop:!0,rotatable:!1,scalable:!1,zoomable:!1,checkOrientation:!1,checkCrossOrigin:!1,aspectRatio:this.ratio||this.localRatio,minCropBoxWidth:50,minCropBoxHeight:50})})},destoryCropper(){this.cropper&&(this.cropper.destroy(),this.cropper=void 0)}},mounted(){this.setupCropper()},beforeDestroy(){this.destoryCropper()}},Bn=Object(o.a)(Rn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-card",[i("v-card-title",{staticClass:"d-flex"},[i("div",{staticClass:"body-2"},[t._v("\n Crop image\n ")]),t._v(" "),i("div",{staticClass:"grow"}),t._v(" "),i("v-btn",{staticClass:"ma-0",attrs:{small:"",flat:"",icon:"",color:"secondary"},on:{click:function(e){return t.$emit("cancel")}}},[i("icon",[t._v(t._s(t.$options.mdiClose))])],1)],1),t._v(" "),i("v-card-text",{staticClass:"d-flex"},[i("div",{staticClass:"w-100"},[t.validSrc?i("img",{ref:"image",staticStyle:{"max-width":"100%",height:"100%",width:"100%","object-fit":"contain"},attrs:{src:t.validSrc}}):t._e()])]),t._v(" "),t.ratio?t._e():i("v-card-actions",{staticClass:"justify-center pb-3"},[i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"crop ratio",expression:"'crop ratio'"}],staticClass:"ww-auto px-2",attrs:{small:"",outline:1!==t.localRatio,depressed:"",color:"accent"},on:{click:function(e){t.localRatio=1}}},[t._v("\n 1:1\n ")]),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"crop ratio",expression:"'crop ratio'"}],staticClass:"ww-auto px-2",attrs:{small:"",outline:1.333!==t.localRatio,depressed:"",color:"accent"},on:{click:function(e){t.localRatio=1.333}}},[t._v("\n 4:3\n ")]),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"crop ratio",expression:"'crop ratio'"}],staticClass:"ww-auto px-2",attrs:{small:"",outline:1.5!==t.localRatio,depressed:"",color:"accent"},on:{click:function(e){t.localRatio=1.5}}},[t._v("\n 3:2\n ")]),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"crop ratio",expression:"'crop ratio'"}],staticClass:"ww-auto px-2",attrs:{small:"",outline:.666!==t.localRatio,depressed:"",color:"accent"},on:{click:function(e){t.localRatio=.666}}},[t._v("\n 2:3\n ")]),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"crop ratio",expression:"'crop ratio'"}],staticClass:"ww-auto px-2",attrs:{small:"",outline:!!t.localRatio,depressed:"",color:"accent"},on:{click:function(e){t.localRatio=void 0}}},[t._v("\n Free\n ")])],1),t._v(" "),i("v-card-actions",[i("div",{staticClass:"grow"}),t._v(" "),i("v-btn",{attrs:{outline:"",color:"secondary"},on:{click:function(e){return t.$emit("cancel")}}},[t._v("\n Cancel\n ")]),t._v(" "),i("v-btn",{attrs:{depressed:"",color:"primary",disabled:t.disabled},on:{click:function(e){t.$emit("input",t.cropper.getData(!0))}}},[i("icon",[t._v(t._s(t.$options.mdiCrop))]),t._v("Â \n Confirm and crop\n ")],1)],1)],1)},[],!1,null,null,null).exports,Un={mdiMagnifyPlus:a.kc,mdiMagnifyMinus:a.jc,props:{src:{type:String,required:!0},ratioType:{type:String,required:!0},value:{required:!1,default:null}},data(){return{cropper:void 0,debInput:this.$helpers.debounce(t=>{const e={};for(const i in t)e[i]=Math.round(t[i]);this.$emit("input",e)},250)}}
1,computed:{ratio(){if("circle"===this.ratioType)return 1;const[t,e]=this.ratioType.split("x");return t&&e?t/e:0},validSrc(){return this.src?this.$helpers.cdn(this.src)+"?preview&ratio="+this.ratioType:void 0}},watch:{validSrc(t){t?this.setupCropper():this.destoryCropper()}},methods:{setupCropper(){this.$nextTick(()=>{this.cropper?this.cropper.replace(this.validSrc):this.cropper=new Vn.a(this.$refs.image,{viewMode:0,autoCrop:!0,autoCropArea:1,rotatable:!1,dragMode:"move",scalable:!1,checkOrientation:!1,checkCrossOrigin:!1,zoomOnWheel:!1,zoomOnTouch:!1,toggleDragModeOnDblclick:!1,aspectRatio:this.ratio,minCropBoxWidth:70,minCropBoxHeight:70,background:!1,data:this.value,crop:({detail:t})=>{this.debInput(t)},ready:()=>{if(!this.value)return;const{x:t,y:e,width:i}=this.value;this.cropper.zoom(1-i/this.cropper.getData().width);const r=this.cropper.getData(),n=this.cropper.getCanvasData(),a=n.width/n.naturalWidth;this.cropper.move(Math.round((r.x-t)*a),Math.round((r.y-e)*a))}})})},destoryCropper(){this.cropper&&(this.cropper.destroy(),this.cropper=void 0)}},mounted(){this.setupCropper()},beforeDestroy(){this.destoryCropper()}},Ln=(i(104),Object(o.a)(Un,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"d-flex flex-wrap"},[i("div",{staticClass:"w-100 relative",class:{"rt-cropper-circle":"circle"===t.ratioType}},[i("div",{staticClass:"overflow-hidden",staticStyle:{position:"absolute",top:"0",left:"0",right:"0",bottom:"0"}},[t.validSrc?i("img",{staticStyle:{"max-width":"100%",height:"100%",width:"100%",transform:"scale(1.1)",filter:"blur(15px)",position:"relative"},attrs:{src:t.validSrc}}):t._e()]),t._v(" "),t.validSrc?i("img",{ref:"image",staticStyle:{"max-width":"100%",height:"100%",width:"100%","object-fit":"contain",position:"relative"},attrs:{src:t.validSrc}}):t._e()]),t._v(" "),i("div",{staticClass:"w-100"},[i("v-btn",{attrs:{icon:""},on:{click:function(e){t.cropper&&t.cropper.zoom(.1)}}},[i("icon",{attrs:{color:"primary"},domProps:{textContent:t._s(t.$options.mdiMagnifyPlus)}})],1),t._v(" "),i("v-btn",{attrs:{icon:""},on:{click:function(e){t.cropper&&t.cropper.zoom(-.1)}}},[i("icon",{attrs:{color:"primary"},domProps:{textContent:t._s(t.$options.mdiMagnifyMinus)}})],1)],1)])])},[],!1,null,null,null).exports),Hn={props:{flat:{type:Boolean,required:!1,default:!1}},data:()=>({loading:{phone:!1,email:!1},verifCode:{phone:"",email:""}}),computed:{user(){return this.$store.state.client.user},verifications(){const t=[],{phone:e,email:i}=this.user.verifs||{};return!this.user.phone||e&&e.verified||t.push("phone"),!this.user.email||i&&i.verified||t.push("email"),t}},methods:{verify(t,e){if(this.loading[t])return;const i={verify_type:t,verify_code:this.verifCode[t].trim()};e&&(i.verify_resend="1"),(i.verify_code||i.verify_resend)&&(this.loading[t]=!0,this.$store.dispatch("resources/patch",{collection:[{model:"user",id:this.user.id,fill:i}]}).then(i=>{200===i.data[0].code&&((()=>{const i=`verify-user-${t}`+(e?"-resend":""),r=`${i}-${this.user.id}`;this.$gtag("event",i,{event_category:"verify-user",event_label:r})})(),this.verifCode[t]="",this.$root.addNotif({message:e?"verification code sent":`${t} verified`,icon:a.z,timeout:8e3}))}).catch(console.warn).finally(()=>this.loading[t]=!1))}}},Wn=Object(o.a)(Hn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.verifications.length?i("v-layout",{class:{"shadow-1":!t.flat},attrs:{row:"","justify-center":"",white:""}},[i("div",{staticClass:"my-3 mx-2 mx-md-0",style:"border-"+(t.$vuetify.rtl?"right":"left")+": 4px solid "+t.$root.primary.base+";"},t._l(t.verifications,function(e,r){return i("div",{key:"verif-"+r,class:[r||"pt-3","pb-3","px-3"],attrs:{id:e+"-verification-container"}},[i("v-layout",{attrs:{row:"",wrap:"","align-center":"","no-top-spacing-input":""}},[i("div",{staticClass:"py-2 body-2 mb-2 mb-md-0"},[t._v("\n "+t._s(t.$trans("a verification code was sent to"))+"\n "),i("b",{staticStyle:{"text-decoration":"underline"}},[t._v(t._s(t.user[e]))])]),t._v(" "),i("div",{staticClass:"pa-2"}),t._v(" "),i("div",{staticClass:"d-flex has-small-input input-font-14"},[i("v-text-field",{attrs:{"hide-details":"",flat:"",color:"primary",label:t.$trans("please enter the code")},on:{keydown:function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:t.verify(e)}},model:{value:t.verifCode[e],callback:function(i){t.$set(t.verifCode,e,i)},expression:"verifCode[type]"}}),t._v(" "),t.verifCode[e]?i("v-btn",{attrs:{disabled:t.loading[e],small:"",depressed:"",color:"primary"},on:{click:function(i){return t.verify(e)}}},[i("div",{staticClass:"font-1"},[t._v("\n "+t._s(t.$trans("confirm"))+"\n ")])]):t._e(),t._v(" "),t.loading[e]||t.verifCode[e]&&!(t.$root.now>(t.user.verifs[e].time||0))?t._e():[t.$root.now>(t.user.verifs[e].time||0)?i("v-btn",{staticClass:"mx-0",attrs:{small:"",flat:"",color:"primary"},on:{click:function(i){return t.verify(e,!0)}}},[i("div",{staticClass:"font-1"},[t._v("\n "+t._s(t.$trans("resend"))+"\n ")])]):i("div",{staticClass:"caption d-inline-flex secondary--text px-3 py-2"},[t._v("\n "+t._s(t.$trans(["resend","in"]))+"\n "),i("span",{staticClass:"pr-1"}),t._v(" "),i("countdown",{attrs:{"unix-time":t.user.verifs[e].time||0}})],1),t._v(" "),i("v-btn",{staticClass:"ww-auto mx-0",attrs:{small:"",flat:"",color:"accent",to:"/user/"+t.user.id+"/update"}},[i("div",{staticClass:"font-1"},[t._v("\n "+t._s(t.$trans("edit"))+"\n ")])])]],2)]),t._v(" "),"email"===e?i("div",{staticClass:"mt-2"},[i("b",[t._v("Note:")]),t._v(" it is recommended to check your SPAM folder in case of not receiving the emails.\n ")]):t._e()],1)}),0)]):t._e()},[],!1,null,null,null).exports;const Yn=(t,e)=>!(!t||t!==e.key&&!(e.routes||[]).some(e=>Yn(t,e)));var Gn={mdiPlusThick:a.Ec,mdiPlus:a.Cc,name:"drawer-item",props:["route","notifCounts"],data:()=>({active:!1}),computed:{can(){return this.$store.getters["client/can"]},models(){return this.$store.state.client.user.models},routeActive(){return Yn(this.$route.params.model,this.route)}},watch:{routeActive:{handler(t){this.active=t},immediate:!0}},methods:{selectFilter(t,e,i){window.scrollTo(0,0),this.$nextTick(()=>this.$bus.$emit("index-select-filter",{name:e,viewIndex:i})),this.$emit("checkCloseDrawer")}}},Xn=Object(o.a)(Gn,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{style:"--custom-color: "+t.route.modelColor},[t.route.routes?i("v-list-group",{staticClass:"no-list-group-transition",attrs:{lazy:""},scopedSlots:t._u([{key:"activator",fn:function(){return[i("v-list-tile",{staticClass:"m-end-2 radius-end-50",style:t.routeActive?"box-shadow: -1px 1px 2px -1px "+t.route.modelColor:void 0,attrs:{ripple:"","active-class":"",avatar:""}},[i("v-list-tile-action",{staticClass:"justify-center",style:t.routeActive?"transform:scale(1.1)":"filter:contrast(0.3)"},[i("icon",{attrs:{color:t.route.modelColor}}
1,[t._v(t._s(t.route.icon))])],1),t._v(" "),i("v-list-tile-title",{style:t.routeActive?"color:"+t.route.modelColor:void 0},[t._v("\n "+t._s(t.route.title)+"\n ")]),t._v(" "),t.notifCounts[t.route.key]&&!t.active?i("v-list-tile-avatar",{staticClass:"white--text",staticStyle:{"justify-content":"flex-end"},attrs:{color:"info lighten-1",size:"24"}},[i("small",[t._v("\n "+t._s(t.notifCounts[t.route.key])+"\n ")])]):t._e()],1)]},proxy:!0}],null,!1,1933213702),model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[t._v(" "),i("div",{staticClass:"d-flex"},[i("div",{staticClass:"px-1"}),t._v(" "),i("div",{staticClass:"w-100"},[i("v-list",{attrs:{expand:""}},t._l(t.route.routes,function(e){return i("drawer-item",{key:e.key,attrs:{route:e,"notif-counts":t.notifCounts},on:{checkCloseDrawer:function(e){return t.$emit("checkCloseDrawer")}}})}),1)],1)])]):i("v-list-tile",{staticClass:"m-end-2 radius-end-50",attrs:{ripple:"",to:"/"+t.route.key,"active-class":"secondary lighten-4 border-r-3--light",avatar:""}},[i("v-list-tile-action",{staticClass:"justify-center",style:t.routeActive?"transform:scale(1.1)":"filter:contrast(0.3)"},[i("icon",{attrs:{color:t.route.modelColor}},[t._v(t._s(t.route.icon))])],1),t._v(" "),i("v-list-tile-title",{style:t.routeActive?"color:"+t.route.modelColor:void 0},[t._v("\n "+t._s(t.route.title)+"\n ")]),t._v(" "),t.notifCounts[t.route.key]?i("v-list-tile-avatar",{staticClass:"white--text",staticStyle:{"justify-content":"flex-end"},attrs:{color:"info lighten-1",size:"24"}},[i("small",[t._v("\n "+t._s(t.notifCounts[t.route.key])+"\n ")])]):t.can[t.route.key].post&&t.$route.params.model!==t.route.key?i("v-list-tile-avatar",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"New "+t.models[t.route.key].specs.singular,expression:"`New ${models[route.key].specs.singular}`"}],staticStyle:{"justify-content":"flex-end","min-width":"unset","margin-left":"-5px"},attrs:{color:"transparent",size:"16"},on:{click:function(e){return e.preventDefault(),t.$router.push("/"+t.route.key+"/create")}}},[i("icon",{attrs:{size:"16",color:"secondary"}},[t._v(t._s(t.$options.mdiPlus))])],1):t._e()],1),t._v(" "),t.$route.params.model===t.route.key?i("div",[t.can[t.route.key].post?i("v-list-tile",{staticClass:"m-end-2 radius-end-50 secondary--text text--darken-1",attrs:{ripple:"",to:"/"+t.route.key+"/create","active-class":"custom-color--text"}},[i("v-list-tile-avatar"),t._v(" "),i("v-list-tile-title",{staticClass:"body-1"},[i("span",[t._v("\n New "+t._s(t.models[t.route.key].specs.singular)+"\n ")]),t._v(" "),i("icon",{attrs:{size:"18",color:"inherit"}},[t._v(t._s(t.$options.mdiPlus))])],1)],1):t._e(),t._v(" "),t.models[t.route.key].specs.views&&t.models[t.route.key].specs.views.length>1?i("div",t._l(t.models[t.route.key].specs.views,function(e,r){return i("v-list-group",{key:r,attrs:{"append-icon":"","sub-group":"",lazy:"",value:t.$route.path==="/"+t.route.key&&t.$store.state[t.route.key].options.index.viewIndex===r},on:{click:function(e){t.$router.push("/"+t.route.key),t.$helpers.qTick(function(){return t.selectFilter(t.route.key,void 0,r)})}},scopedSlots:t._u([{key:"activator",fn:function(){return[i("v-subheader",{class:{"custom-color--text":t.$route.path==="/"+t.route.key&&t.$store.state[t.route.key].options.index.viewIndex===r}},[t._v("\n "+t._s(t.$trans(e.name))+"\n ")])]},proxy:!0}],null,!0)},[t._v(" "),t._l(t.models[t.route.key].filters,function(e,n){return i("v-list-tile",{key:n,staticClass:"m-end-2 radius-end-50 secondary--text text--darken-1",class:[t.$store.state[t.route.key]&&t.$store.state[t.route.key].options.index.viewIndex===r&&e.name===t.$store.getters[t.route.key+"/indexFilterName"]?"is-custom-active-list-tile":"is-custom-inactive-list-tile"],attrs:{ripple:"","active-class":"",to:"/"+t.route.key},on:{click:function(i){return t.selectFilter(t.route.key,e.name,r)}}},[i("v-list-tile-avatar"),t._v(" "),i("v-list-tile-title",[t.models[t.route.key]?i("span",[t._v("\n "+t._s(t.$trans(e.name.split("_")))+"\n ")]):t._e()])],1)})],2)}),1):i("div",t._l(t.models[t.route.key].filters,function(e,r){return i("v-list-tile",{key:r,staticClass:"m-end-2 radius-end-50 secondary--text text--darken-1",attrs:{ripple:"","active-class":"",to:"/"+t.route.key},on:{click:function(i){return t.selectFilter(t.route.key,e.name)}}},[i("v-list-tile-avatar"),t._v(" "),i("v-list-tile-title",{class:[t.$store.state[t.route.key]&&e.name===t.$store.getters[t.route.key+"/indexFilterName"]?"body-2 custom-color--text":"body-1"]},[t.models[t.route.key]?i("span",[t._v("\n "+t._s(t.$trans(e.name.split("_")))+"\n ")]):t._e()])],1)}),1)],1):t._e()],1)},[],!1,null,null,null).exports;function Zn(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}function Kn(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
1e%2?Zn(i,!0).forEach(function(e){h()(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Zn(i).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Qn={props:{type:{type:String,required:!1,default:"patch"},request:{type:Object,required:!0},initialFill:{type:Object,required:!1}},data(){return{isSending:!1,fill:this.initialFill?Kn({},this.initialFill):{}}},methods:{setFill(t){this.fill=t},send(){this.isSending||(this.isSending=!0,this.$store.dispatch(`resources/${this.type}`,{collection:[Kn({},this.request,{fill:Kn({},this.fill)})]}).then(t=>{200===t.data[0].code&&(this.setFill(this.initialFill?Kn({},this.initialFill):{}),this.$emit("success",t))}).catch(t=>{console.warn(t),this.$emit("error",t)}).finally(()=>{this.isSending=!1,this.$emit("completed")}))}}},Jn=Object(o.a)(Qn,function(){var t=this.$createElement,e=this._self._c||t;return e("div",[this._t("actions",[e("div")],{fill:this.fill,setFill:this.setFill,isSending:this.isSending,send:this.send})],2)},[],!1,null,null,null).exports;function ta(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}function ea(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ta(i,!0).forEach(function(e){h()(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ta(i).forEac
1h(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ia={functional:!0,inject:{theme:{default:{isDark:!1}}},props:{dark:{type:Boolean,required:!1,default:!1},light:{type:Boolean,required:!1,default:!1},path:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},size:{type:String,required:!1,default:""}},render:(t,{injections:e,props:i,data:r,children:n})=>{let a=i.path;a||(r.domProps&&(a=r.domProps.textContent||r.domProps.innerHTML),!a&&n&&(a=n[0].text)),a=a?a.trim():"",r.domProps={innerHTML:`<path fill="currentColor" d="${a}" />`};const s=i.dark||!i.light&&e.theme.isDark,o={style:{},class:{"v-icon":!r.staticClass||!r.staticClass.includes("v-icon"),"theme--dark":s,"theme--light":!s}};if(i.color)if(i.color.match(/^(#|inherit|(rgb|hsl)a?\()/))o.style.color=i.color;else{const[t,e]=i.color.split(" ",2);o.class[`${t}--text`]=!0,e&&(o.class[`text--${e}`]=!0)}if(i.size){const t=/\d$/.test(i.size)?"px":"";o.style.width=i.size+t,o.style.height=i.size+t}if(r.style)if(Array.isArray(r.style)){const t=r.style.find(t=>t.fontSize);t&&(o.style.height=o.style.width=t.fontSize),r.style=[...r.style,o.style]}else r.style.fontSize&&(o.style.height=o.style.width=r.style.fontSize),r.style=ea({},r.style,{},o.style);else r.style=o.style;r.class?r.class=Array.isArray(r.class)?[...r.class,...Object.keys(o.class)]:ea({},r.class,{},o.class):r.class=o.class;const l={viewBox:"0 0 24 24"};return r.attrs=r.attrs?ea({},r.attrs,{},l):l,t("svg",r)}},ra={ActionBar:l,AddCreditForm:u,AddCreditPackage:v,Countdown:g,LoginForm:w,ModelDropzone:b.a,ModelEditor:C,ModelEmailEditor:D,ModelCkeditor:T,ModelForm:I,ModelFormView:P,ModelInput:Cn,ModelNotifications:An,ModelProgress:Sn,RegisterForm:In,Response:On,SendResponse:qn,UpdatePasswordForm:jn,Cropper:Bn,CropperCustom:Ln,UserVerifications:Wn,DrawerItem:Xn,ResourceDispatch:Jn,Icon:ia},na=i(6),aa=i(9),sa=i(66),oa=i(3);Object.keys(ra).forEach(t=>n.a.component(t,ra[t])),n.a.use(wn,{inject:!1}),Zt.extend("nullable",()=>!0),Zt.extend("string",()=>!0),Zt.extend("different",()=>!0),Zt.extend("date",()=>!0),Zt.extend("exists",()=>!0),Zt.extend("unique",()=>!0),Zt.extend("array",()=>!0),Zt.extend("json",()=>!0),Zt.extend("in",sn.included.validate),Zt.extend("not_in",sn.excluded.validate),Zt.extend("slug",t=>/^[\w\d-]+$/.test(t)),Zt.extend("required_without",function(t,[e]){return(e=document.querySelector(`.rt-input-n-${e} [data-rt-val-length]`))?{valid:(e=e.dataset.rtValLength>0)||!!t,data:{required:!e}}:{valid:!0,data:{required:!0}}},{hasTarget:!1,computesRequired:!0}),Zt.extend("required_with",function(t,[e]){return(e=document.querySelector(`.rt-input-n-${e}`))?{valid:!(e=e.dataset.rtValLength>0)||!!t,data:{required:e}}:{valid:!0,data:{required:!1}}},{hasTarget:!1,computesRequired:!0}),Zt.extend("regex",function(t,e){let i=e.expression;return e.undefined&&(i+=","+e.undefined),"string"==typeof i&&(i=new RegExp(i.slice(1).slice(0,-1))),i.test(t)},{hasTarget:!1,immediate:!0,paramNames:["expression"]});const la=t=>(e,i)=>{if(null==e)return!1;if(Array.isArray(e))return e.every(e=>la(t)(e,i));const r=+i[0];return e=String(e),e=isNaN(e)||[191,350,500].some(t=>t===r)?e.length:+e,"min"===t?e>=r:e<=r};Zt.extend("min",la("min"),{hasTarget:!1,immediate:!0}),Zt.extend("max",la("max"),{hasTarget:!1,immediate:!0}),n.a.use(sa.a),aa.a.$once("locale-ready",t=>{oa.a.moment=t.moment,oa.a.time.formats=t.formats,Object.assign(oa.a.translations,t.translations),n.a.prototype.$trans=oa.a.trans,t.dictionary&&Zt.localize(na.a.locale,t.dictionary)})},25:function(t,e,i){"use strict";var r=i(5),n=i.n(r),a=i(0);function s(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(i,!0).forEach(function(e){n()(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(i).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}const l=(t,e)=>{if(e&&e.endsWith("/hsm")){const[t,i]=e.split("/");return{type:t,relation:e,col_type:"rel",inputFilters:[{field:i,operator:"NotNull",value:"NotNull"}]}}return t[e]||{}};var c={mdiFilterMenu:a.sb,mdiDatabaseOff:a.Z,mdiClose:a.M,name:"model-filter",props:{model:{type:Object,required:!0},filter:{type:Object,required:!1,default:()=>({field:"",operator:"",value:""})},focusOn:{type:[String,Boolean],required:!1,default:"field"},actionName:{type:String,required:!1,default:"Apply"},disabled:{type:Boolean,required:!1,default:!1},allowEmpty:{type:Boolean,required:!1,default:!1},wrap:{type:Boolean,required:!1,default:!0}},data(){return{field:this.filter.field,operator:this.filter.operator,value:this.filter.value,fieldModelActive:!1,negativeRelActive:!1,relatedFocusOn:"field",fieldComponentKey:1}},computed:{modelColor(){return this.$root.accent.base},user(){return this.$store.state.client.user},searchColumns(){const t=[],{specs:{search:e},properties:i}=this.model;
1return Array.isArray(e)?(e.forEach(e=>{const{searchable:r,label:n}=i[e]||{};r&&t.push({value:e,text:n||this.$trans(e)})}),t):t},searchActive(){return!this.field&&this.searchColumns.some(t=>"id"!==t.value)},searchPlaceholder(){if(this.searchActive)return"Search..."},fields(){const t=[],{properties:e}=this.model;for(const i in e){const r=e[i];r.searchable&&t.push({value:i,text:r.label||this.$trans(i)})}if(t.length>0){const{identifier:e}=this.model.specs;for(const i in this.user.models){if(i===e)continue;const{properties:r,specs:n}=this.user.models[i];for(const a in r){const s=r[a];s.type===e&&s.searchable&&"virtual"!=s.col_type&&"nosql"!=s.col_type&&"rel"!=s.col_type&&t.push({value:`${i}/${a}/hsm`,text:`${n.plural} (${s.label||this.$trans(a)})`})}}}return t},currentFieldValue(){return this.field||(this.fields[0]||{}).value||""},currentProp(){return l(this.model.properties,this.currentFieldValue)},type(){if(this.searchActive)return"string";const{type:t}=this.currentProp,e=t&&t.split("::")[0];return!e||["html","email_html","password","array","json","file","image","image_lg","image_sm","crop","file_group_array"].includes(e)?"string":t},fieldModel(){return this.user.models[this.type]},canFilterRelation(){return!!this.fieldModel&&Object.keys(this.fieldModel.properties).some(t=>this.fieldModel.properties[t].searchable)},canFilterNegativeRel(){return this.canFilterRelation&&"rel"==this.currentProp.col_type},canNegativeRelActive(){return this.canFilterNegativeRel&&this.negativeRelActive},isHsmField(){return this.currentFieldValue.endsWith("/hsm")},relationActive(){return this.canFilterRelation&&(this.fieldModelActive||this.isHsmField)},operators(){switch(this.type){case"string":return this.searchActive?[{value:"search",text:"search"}]:[{value:"%like%",text:"include"},{value:"%not like%",text:"not include"},{value:"=",text:"exact match"},{value:"!=",text:"not exact match"},{value:"In",text:"one of"},{value:"NotIn",text:"not one of"},{value:"NotNull",text:"exist"},{value:"Null",text:"not exist"},{value:"Column",text:"same as"},{value:"regexp",text:"match regex"},{value:"not regexp",text:"not match regex"}];case"price":case"percent":return[{value:">",text:"greater than"},{value:"<",text:"less than"},{value:"=",text:"exact match"},{value:"!=",text:"not exact match"},{value:"In",text:"one of"},{value:"NotIn",text:"not one of"},{value:"NotNull",text:"exist"},{value:"Null",text:"not exist"},{value:"Column",text:"same as"}];case"timestamp":return[{value:">",text:"after"},{value:"<",text:"before"},{value:"=",text:"exact match"},{value:"!=",text:"not exact match"},{value:"NotNull",text:"exist"},{value:"Null",text:"not exist"},{value:"Column",text:"same as"}];case"int":case"double":return[{value:"=",text:"exact match"},{value:">",text:"greater than"},{value:"<",text:"less than"},{value:"!=",text:"not exact match"},{value:"In",text:"one of"},{value:"NotIn",text:"not one of"},{value:"NotNull",text:"exist"},{value:"Null",text:"not exist"},{value:"Column",text:"same as"}];default:return this.fieldModel&&this.fieldModel.specs.treeview?[{value:"=",text:"inside"},{value:"!=",text:"not inside"},{value:"NotNull",text:"exist"},{value:"Null",text:"not exist"},{value:"Column",text:"same as"}]:[{value:"=",text:"exact match"},{value:"!=",text:"not exact match"},{value:"In",text:"one of"},{value:"NotIn",text:"not one of"},{value:"NotNull",text:"exist"},{value:"Null",text:"not exist"},{value:"Column",text:"same as"}]}},computedFilter(){return{field:this.currentFieldValue,operator:this.operator||this.operators[0].value,value:this.value}},nullOperActive(){const{operator:t}=this.computedFilter;return"Null"==t||"NotNull"==t},needsMultiple(){const{operator:t}=this.computedFilter;return"In"==t||"NotIn"==t},currInputType(){let t=this.type;if(this.needsMultiple)switch(t){case"string":case"price":case"percent":case"int":case"double":t="array"}return t},subRelatedFilter(){return o({},this.filter,{relation:this.filter.relation&&(this.filter.relation.split(".").slice(1).join(".")||null)})}},watch:{fieldModelActive(t,e){!t&&e&&(this.relatedFocusOn="field")}},methods:{focusField(){this.searchActive?this.focusValue():this.$refs.fieldInput&&this.$refs.fieldInput.$refs.input.click()},focusOperator(){this.$refs.operatorInput&&this.$refs.operatorInput.$refs.input.click()},focusValue(){if(this.$refs.columnInput)return void this.$refs.columnInput.$refs.input.click();if(this.nullOperActive)return void this.focusOperator();if(!this.$refs.valueInput||!this.$refs.valueInput.$refs.currentType)return;const t=this.$refs.valueInput.$refs.currentType,e=t.$refs.input||t.$el;e&&e.click()},inputField(t){this.$emit("modified"),this.value="",this.operator="",this.field=t,this.$nextTick(["price","percent","timestamp"].includes(this.type)?this.focusOperator:this.focusValue)},inputOperator(t){this.$emit("modified"),this.value="Null"==t||"NotNull"==t?t:"",this.operator=t,this.$nextTick(()=>{this.nullOperActive?this.emitFilter():this.focusValue()})},inputValue(t){switch(this.$emit("modified"),this.value=t,this.type){case"string":case"price":case"percent":case"int":case"double":break;default:this.needsMultiple||Array.isArray(t)||this.$helpers.isJson(t)||this.$nextTick(()=>this.emitFilter())}},emitFilter(t){this.$emit("modified"),t||(t=o({},this.computedFilter));const e=Array.isArray(t.value);if(!e&&this.$helpers.isJson(t.value))try{t.value=Object.keys(JSON.parse(t.value))}catch(t){console.warn(t)}else e||(null==t.value&&(t.value=""),t.value=`${t.value}`.trim());if(t.value.length){if(!t.relation){const{relation:e,col_type:i}=l(this.model.properties,t.field);e&&"rel"==i&&(t.relation=e,t.field="id")}t.relation&&"-"!=t.relation[0]&&this.canNegativeRelActive&&(t.relation="-"+t.relation),"search"==t.operator&&delete t.field,this.$emit("input",t)}else this.allowEmpty&&this.$emit("input",void 0)},emitRelationFilter(t){let e=l(this.model.properties,this.computedFilter.field).relation||this.type;if(t.relation){let i=t.relation;"-"==i[0]&&(i=i.slice(1),e="-"+e),e=[e,i].join(".")}this.emitFilter(o({},t,{relation:e}))},emitModified(){this.$emit("modified")},emitPreventMenuClosing(){this.$emit("preventMenuClosing")},activateSearch(){this.searchActive&&(this.fieldComponentKey++,this.field="",this.operator="search",this.value="",this.$nextTick(this.focusValue))}},created(){if(this.filter.relation){let t=this.filter.relation;"-"==t[0]&&(this.negativeRelActive=!0,t=t.slice(1)),t=t.split(".")[0];let e="";const{properties:i}=this.model;for(const r in i){const n=i[r];if(t===(n.relation||n.type)){e=r;break}}this.field=e,this.operator="",this.value="",(this.subRelatedFilter.relation||"id"!==this.filter.field)&&(this.relatedFocusOn="value",this.fieldModelActive=!0)}},mounted(){if(!this.relationActive)switch(this.focusOn){case"field":this.$nextTick(this.focusField);break;case"operator":this.$nextTick(this.focusOperator);break;case"value":this.$nextTick(this.focusValue)}}},u=i(2),d=Object(u.a)(c,function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.fields.length>0?i("div",{staticClass:"d-flex align-end",class:{"flex-wrap":t.wrap}},[i("v-autocomplete",{key:t.fieldComponentKey,ref:"fieldInput",class:{"select-input-10":!t.searchActive,"select-input-100":1},staticStyle:{"white-space":"nowrap"},attrs:{"menu-props":{minWidth:"180px",offsetY:!0,bottom:!0,right:!0,origin:"top left"},items:t.fields,value:t.searchActive?"":t.computedFilter.field,placeholder:"Field","hide-details":"",dense:""},on:{input:t.inputField},scopedSlots:t._u([{key:"selection",fn:function(e){var r=e.item;return[i("div",{staticClass:"caption font-weight-bold"},[t._v("\n "+t._s(r.text)+"\n "),t.searchActive?i("v-btn",{staticClass:"ma-0",attrs:{small:"",flat:"",icon:"",color:"primary"},on:{click:t.activateSearch}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiClose))])],1):t._e()],1)]}},{key:"item",fn:function(e){var r=e.item;return[i("v-list-tile-content",[i("v-list-tile-title",{staticClass:"caption"},[t._v("\n "+t._s(r.text)+"\n ")])],1)]}}],null,!1,1550511562)}),t._v(" "),t.canFilterNegativeRel?[i("span",{staticClass:"pr-1"}),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"without",expression:"'without'"}],staticClass:"ma-0",attrs:{flat:"",small:"",icon:"",color:t.negativeRelActive?t.modelColor:"secondary"},on:{click:function(e){t.negativeRelActive=!t.negativeRelActive}}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiDatabaseOff))])],1)]:t._e(),t._v(" "),t.canFilterRelation&&!t.isHsmField?[i("span",{staticClass:"pr-1"}),t._v(" "),i("v-btn",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"details",expression:"'details'"}],staticClass:"ma-0",attrs:{flat:"",small:"",icon:"",color:t.fieldModelActive?t.modelColor:"secondary"},on:{click:function(e){t.fieldModelActive=!t.fieldModelActive}}},[i("icon",{attrs:{size:"20"}},[t._v(t._s(t.$options.mdiFilterMenu))])],1)]:t._e(),t._v(" "),t.relationActive?[i("span",{staticClass:"pr-1"}),t._v(" "),i("model-filter",{attrs:{model:t.fieldModel,filter:t.subRelatedFilter,"focus-on":t.relatedFocusOn},on:{input:t.emitRelationFilter,modified:t.emitModified,preventMenuClosing:t.emitPreventMenuClosing}})]:[t.operators.length>
11?[i("div",{staticClass:"pa-1"}),t._v(" "),i("v-autocomplete",{ref:"operatorInput",class:{"select-input-10":t.computedFilter.operator,"select-input-100":1},staticStyle:{"white-space":"nowrap"},attrs:{"menu-props":{minWidth:"130px",offsetY:!0,bottom:!0,right:!0,origin:"top left"},items:t.operators,value:t.computedFilter.operator,"hide-details":"",dense:""},on:{input:t.inputOperator},scopedSlots:t._u([{key:"selection",fn:function(e){var r=e.item;return[i("div",{staticClass:"caption font-weight-bold"},[t._v("\n "+t._s(r.text)+"\n ")])]}},{key:"item",fn:function(e){var r=e.item;return[i("v-list-tile-content",[i("v-list-tile-title",{staticClass:"caption"},[t._v("\n "+t._s(r.text)+"\n ")])],1)]}}],null,!1,667813202)})]:t._e(),t._v(" "),i("div",{staticClass:"pa-1"}),t._v(" "),t.nullOperActive?t._e():i("div",["Column"===t.computedFilter.operator?i("v-autocomplete",{ref:"columnInput",class:{"select-input-10":t.value,"select-input-100":1},staticStyle:{"white-space":"nowrap"},attrs:{"menu-props":{minWidth:"180px",offsetY:!0,bottom:!0,right:!0,origin:"top left"},items:t.fields,value:t.value,"hide-details":"",dense:""},on:{input:t.inputValue},scopedSlots:t._u([{key:"selection",fn:function(e){var r=e.item;return[i("div",{staticClass:"caption font-weight-bold"},[t._v("\n "+t._s(r.text)+"\n ")])]}},{key:"item",fn:function(e){var r=e.item;return[i("v-list-tile-content",[i("v-list-tile-title",{staticClass:"caption"},[t._v("\n "+t._s(r.text)+"\n ")])],1)]}}],null,!1,667813202)}):i("model-input",{ref:"valueInput",style:"width: "+(t.searchActive?"250px":"170px")+";",attrs:{placeholder:t.searchPlaceholder,type:t.currInputType,"no-icon":"",label:"","force-multiple":t.needsMultiple,"custom-filters":t.currentProp.inputFilters,name:t.computedFilter.field,value:t.value,"hide-details":""},on:{input:t.inputValue,preventMenuClosing:t.emitPreventMenuClosing}})],1),t._v(" "),i("v-btn",{staticClass:"mx-2 mt-2 mb-0 h-auto ww-auto px-2 py-1",attrs:{disabled:t.disabled,small:"",round:"",depressed:"",color:t.modelColor},on:{click:function(e){return t.emitFilter()}}},[i("span",{staticClass:"caption white--text"},[t._v("\n "+t._s(t.actionName)+"\n ")])])]],2):t._e()},[],!1,null,null,null);e.a=d.exports},28:function(t,e,i){var r=i(95);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(15)(r,n);r.locals&&(t.exports=r.locals)},29:function(t,e,i){var r=i(97);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(15)(r,n);r.locals&&(t.exports=r.locals)},30:function(t,e,i){var r=i(99);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(15)(r,n);r.locals&&(t.exports=r.locals)},31:function(t,e,i){var r=i(101);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(15)(r,n);r.locals&&(t.exports=r.locals)},32:function(t,e,i){var r=i(103);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(15)(r,n);r.locals&&(t.exports=r.locals)},33:function(t,e,i){var r=i(105);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(15)(r,n);r.locals&&(t.exports=r.locals)},40:function(t,e,i){"use strict";var r=i(0),n={mdiTabRemove:r.Yc,mdiRefresh:r.Hc,props:{message:{type:String,required:!1,default:"could not load the component. please try again"}},data:()=>({loading:!1}),methods:{reload(){this.loading=!0,location.reload()}}},a=i(2),s=Object(a.a)(n,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"pa-3"},[i("v-card",{attrs:{color:"error lighten-5",elevation:"0"}},[i("v-card-text",[i("v-layout",{attrs:{row:""}},[i("icon",{attrs:{size:"60",color:"error lighten-4"}},[t._v(t._s(t.$options.mdiTabRemove))]),t._v(" "),i("div",{staticClass:"pa-3 error--text text--lighten-1"},[t._v("\n "+t._s(t.$trans(t.message))+"\n ")])],1),t._v(" "),i("v-layout",{attrs:{row:""}},[i("v-spacer"),t._v(" "),i("v-btn",{staticClass:"ma-0",attrs:{depressed:"",small:"",color:"error lighten-1",disabled:t.loading},on:{click:t.reload}},[i("icon",{attrs:{size:"16"}},[t._v(t._s(t.$options.mdiRefresh))]),t._v("Â \n "),i("span",{staticClass:"caption"}
1,[t._v(t._s(t.$trans("reload")))])],1)],1)],1)],1)],1)},[],!1,null,null,null);e.a=s.exports},41:function(t,e,i){"use strict";var r={},n=i(2),a=Object(n.a)(r,function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"pa-3"},[e("v-progress-linear",{staticClass:"ma-0",attrs:{indeterminate:"",height:"3",color:"primary"}})],1)},[],!1,null,null,null);e.a=a.exports},42:function(t,e,i){"use strict";const r={};var n={memCache:r,props:["path"],data:()=>({title:void 0}),computed:{displayedName(){return this.title||this.path}},watch:{path:{immediate:!0,handler(t){this.$options.memCache[t]?this.title=this.$options.memCache[t]:fetch(t).then(t=>t.text()).then(e=>{const i=e.match(/<title>([^<]+)<\/title>/i);i&&(this.$options.memCache[t]=i[1].replace(/\s+/g," ").replace("| "+this.$config.title,"").trim(),this.title=r[this.path])}).catch(console.warn)}}}},a=(i(94),i(2)),s=Object(a.a)(n,function(){var t=this.$createElement,e=this._self._c||t;return e("span",[this._v(this._s(this.displayedName)+"\n "),this.displayedName===this.path?e("span",{staticStyle:{animation:"opacityBlink 0.5s ease infinite alternate","font-size":"80%",color:"black"}},[this._v("loading...")]):this._e()])},[],!1,null,null,null);e.a=s.exports},43:function(t,e,i){t.exports=function(){"use strict";function t(e){return(t="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)}function e(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r="undefined"!=typeof window,n=r?window:{},a=!!r&&"ontouchstart"in n.document.documentElement,s=!!r&&"PointerEvent"in n,o="".concat("cropper","-crop"),l="".concat("cropper","-disabled"),c="".concat("cropper","-hidden"),u="".concat("cropper","-hide"),d="".concat("cropper","-invisible"),h="".concat("cropper","-modal"),p="".concat("cropper","-move"),f="".concat("cropper","Action"),v="".concat("cropper","Preview"),m=a?"touchstart":"mousedown",g=a?"touchmove":"mousemove",y=a?"touchend touchcancel":"mouseup",w=s?"pointerdown":m,b=s?"pointermove":g,_=s?"pointerup pointercancel":y,x=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,$=/^data:image\/jpeg;base64,/,C=/^img|canvas$/i,k={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},D=Number.isNaN||n.isNaN;function A(t){return"number"==typeof t&&!D(t)}var T=function(t){return t>0&&t<1/0};function S(t){return void 0===t}function M(e){return"object"===t(e)&&null!==e}var I=Object.prototype.hasOwnProperty;function N(t){if(!M(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&I.call(i,"isPrototypeOf")}catch(t){return!1}}function O(t){return"function"==typeof t}var P=Array.prototype.slice;function E(t){return Array.from?Array.from(t):P.call(t)}function q(t,e){return t&&O(e)&&(Array.isArray(t)||A(t.length)?E(t).forEach(function(i,r){e.call(t,i,r,t)}):M(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var F=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return M(t)&&i.length>
vendor: 4,617 bytes, line 1
10&&i.forEach(function(e){M(e)&&Object.keys(e).forEach(function(i){t[i]=e[i]})}),t},j=/\.\d*(?:0|9){12}\d*$/;function z(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return j.test(t)?Math.round(t*e)/e:t}var V=/^width|height|left|top|marginLeft|marginTop$/;function R(t,e){var i=t.style;q(e,function(t,e){V.test(e)&&A(t)&&(t="".concat(t,"px")),i[e]=t})}function B(t,e){if(e)if(A(t.length))q(t,function(t){B(t,e)});else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function U(t,e){e&&(A(t.length)?q(t,function(t){U(t,e)}):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function L(t,e,i){e&&(A(t.length)?q(t,function(t){L(t,e,i)}):i?B(t,e):U(t,e))}var H=/([a-z\d])([A-Z])/g;function W(t){return t.replace(H,"$1-$2").toLowerCase()}function Y(t,e){return M(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(W(e)))}function G(t,e,i){M(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(W(e)),i)}var X=/\s\s*/,Z=function(){var t=!1;if(r){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});n.addEventListener("test",i,a),n.removeEventListener("test",i,a)}return t}();function K(t,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(X).forEach(function(e){if(!Z){var a=t.listeners;a&&a[e]&&a[e][i]&&(n=a[e][i],delete a[e][i],0===Object.keys(a[e]).length&&delete a[e],0===Object.keys(a).length&&delete t.listeners)}t.removeEventListener(e,n,r)})}function Q(t,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(X).forEach(function(e){if(r.once&&!Z){var a=t.listeners,s=void 0===a?{}:a;n=function(){delete s[e][i],t.removeEventListener(e,n,r);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];i.apply(t,o)},s[e]||(s[e]={}),s[e][i]&&t.removeEventListener(e,s[e][i],r),s[e][i]=n,t.listeners=s}t.addEventListener(e,n,r)})}function J(t,e,i){var r;return O(Event)&&O(CustomEvent)?r=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(r)}function tt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var et=n.location,it=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function rt(t){var e=t.match(it);return null!==e&&(e[1]!==et.protocol||e[2]!==et.hostname||e[3]!==et.port)}function nt(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function at(t){var e=t.rotate,i=t.scaleX,r=t.scaleY,n=t.translateX,a=t.translateY,s=[];A(n)&&0!==n&&s.push("translateX(".concat(n,"px)")),A(a)&&0!==a&&s.push("translateY(".concat(a,"px)")),A(e)&&0!==e&&s.push("rotate(".concat(e,"deg)")),A(i)&&1!==i&&s.push("scaleX(".concat(i,")")),A(r)&&1!==r&&s.push("scaleY(".concat(r,")"));var o=s.length?s.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function st(t,e){var i=t.pageX,r=t.pageY,n={endX:i,endY:r};return e?n:F({startX:i,startY:r},n)}function ot(t){var e=t.aspectRatio,i=t.height,r=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",a=T(r),s=T(i);if(a&&s){var o=i*e;"contain"===n&&o>r||"cover"===n&&o<r?i=r/e:r=i*e}else a?i=r/e:s&&(r=i*e);return{width:r,height:i}}function lt(t,e,r,n){var a=e.aspectRatio,s=e.naturalWidth,o=e.naturalHeight,l=e.rotate,c=void 0===l?0:l,u=e.scaleX,d=void 0===u?1:u,h=e.scaleY,p=void 0===h?1:h,f=r.aspectRatio,v=r.naturalWidth,m=r.naturalHeight,g=n.fillColor,y=void 0===g?"transparent":g,w=n.imageSmoothingEnabled,b=void 0===w||w,_=n.imageSmoothingQuality,x=void 0===_?"low":_,$=n.maxWidth,C=void 0===$?1/0:$,k=n.maxHeight,D=void 0===k?1/0:k,A=n.minWidth,T=void 0===A?0:A,S=n.minHeight,M=void 0===S?0:S,I=document.createElement("canvas"),N=I.getContext("2d"),O=ot({aspectRatio:f,width:C,height:D}),P=ot({aspectRatio:f,width:T,height:M},"cover"),E=Math.min(O.width,Math.max(P.width,v)),q=Math.min(O.height,Math.max(P.height,m)),F=ot({aspectRatio:a,width:C,height:D}),j=ot({aspectRatio:a,width:T,height:M},"cover"),V=Math.min(F.width,Math.max(j.width,s)),R=Math.min(F.height,Math.max(j.height,o)),B=[-V/2,-R/2,V,R];return I.width=z(E),I.height=z(q),N.fillStyle=y,N.fillRect(0,0,E,q),N.save(),N.translate(E/2,q/2),N.rotate(c*Math.PI/180),N.scale(d,p),N.imageSmoothingEnabled=b,N.imageSmoothingQuality=x,N.drawImage.apply(N,[t].concat(i(B.map(function(t){return Math.floor(z(t))}
1)))),N.restore(),I}var ct=String.fromCharCode,ut=/^data:.*,/;function dt(t){var e,i=new DataView(t);try{var r,n,a;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var s=i.byteLength,o=2;o+1<s;){if(255===i.getUint8(o)&&225===i.getUint8(o+1)){n=o;break}o+=1}if(n){var l=n+4,c=n+10;if("Exif"===function(t,e,i){var r="";i+=e;for(var n=e;n<i;n+=1)r+=ct(t.getUint8(n));return r}(i,l,4)){var u=i.getUint16(c);if(((r=18761===u)||19789===u)&&42===i.getUint16(c+2,r)){var d=i.getUint32(c+4,r);d>=8&&(a=c+d)}}}if(a){var h,p,f=i.getUint16(a,r);for(p=0;p<f;p+=1)if(h=a+12*p+2,274===i.getUint16(h,r)){h+=8,e=i.getUint16(h,r),i.setUint16(h,1,r);break}}}catch(t){e=1}return e}var ht={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,r=this.cropper;B(r,c),U(t,c);var n={width:Math.max(i.offsetWidth,Number(e.minContainerWidth)||200),height:Math.max(i.offsetHeight,Number(e.minContainerHeight)||100)};this.containerData=n,R(r,{width:n.width,height:n.height}),B(t,c),U(r,c)}
vendor: 4,636 bytes, line 1
1,initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,r=Math.abs(e.rotate)%180==90,n=r?e.naturalHeight:e.naturalWidth,a=r?e.naturalWidth:e.naturalHeight,s=n/a,o=t.width,l=t.height;t.height*s>t.width?3===i?o=t.height*s:l=t.width/s:3===i?l=t.width/s:o=t.height*s;var c={aspectRatio:s,naturalWidth:n,naturalHeight:a,width:o,height:l};c.left=(t.width-o)/2,c.top=(t.height-l)/2,c.oldLeft=c.left,c.oldTop=c.top,this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=F({},e),this.initialCanvasData=F({},c)},limitCanvas:function(t,e){var i=this.options,r=this.containerData,n=this.canvasData,a=this.cropBoxData,s=i.viewMode,o=n.aspectRatio,l=this.cropped&&a;if(t){var c=Number(i.minCanvasWidth)||0,u=Number(i.minCanvasHeight)||0;s>1?(c=Math.max(c,r.width),u=Math.max(u,r.height),3===s&&(u*o>c?c=u*o:u=c/o)):s>0&&(c?c=Math.max(c,l?a.width:0):u?u=Math.max(u,l?a.height:0):l&&(c=a.width,(u=a.height)*o>c?c=u*o:u=c/o));var d=ot({aspectRatio:o,width:c,height:u});c=d.width,u=d.height,n.minWidth=c,n.minHeight=u,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(s>(l?0:1)){var h=r.width-n.width,p=r.height-n.height;n.minLeft=Math.min(0,h),n.minTop=Math.min(0,p),n.maxLeft=Math.max(0,h),n.maxTop=Math.max(0,p),l&&this.limited&&(n.minLeft=Math.min(a.left,a.left+(a.width-n.width)),n.minTop=Math.min(a.top,a.top+(a.height-n.height)),n.maxLeft=a.left,n.maxTop=a.top,2===s&&(n.width>=r.width&&(n.minLeft=Math.min(0,h),n.maxLeft=Math.max(0,h)),n.height>=r.height&&(n.minTop=Math.min(0,p),n.maxTop=Math.max(0,p))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=r.width,n.maxTop=r.height},renderCanvas:function(t,e){var i=this.canvasData,r=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,r=t.degree;if(90==(r=Math.abs(r)%180))return{width:i,height:e};var n=r%90*Math.PI/180,a=Math.sin(n),s=Math.cos(n),o=e*s+i*a,l=e*a+i*s;return r>90?{width:l,height:o}:{width:o,height:l}}({width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0}),a=n.width,s=n.height,o=i.width*(a/i.naturalWidth),l=i.height*(s/i.naturalHeight);i.left-=(o-i.width)/2,i.top-=(l-i.height)/2,i.width=o,i.height=l,i.aspectRatio=a/s,i.naturalWidth=a,i.naturalHeight=s,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,R(this.canvas,F({width:i.width,height:i.height},at({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,r=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);F(i,{width:r,height:n,left:(e.width-r)/2,top:(e.height-n)/2}),R(this.image,F({width:i.width,height:i.height},at(F({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,r=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*r),n.height=Math.max(n.minHeight,n.height*r),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=F({},n)},limitCropBox:function(t,e){var i=this.options,r=this.containerData,n=this.canvasData,a=this.cropBoxData,s=this.limited,o=i.aspectRatio;if(t){var l=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,u=s?Math.min(r.width,n.width,n.width+n.left,r.width-n.left):r.width,d=s?Math.min(r.height,n.height,n.height+n.top,r.height-n.top):r.height;l=Math.min(l,r.width),c=Math.min(c,r.height),o&&(l&&c?c*o>l?c=l/o:l=c*o:l?c=l/o:c&&(l=c*o),d*o>u?d=u/o:u=d*o),a.minWidth=Math.min(l,u),a.minHeight=Math.min(c,d),a.maxWidth=u,a.maxHeight=d}e&&(s?(a.minLeft=Math.max(0,n.left),a.minTop=Math.max(0,n.top),a.maxLeft=Math.min(r.width,n.left+n.width)-a.width,a.maxTop=Math.min(r.height,n.top+n.height)-a.height):(a.minLeft=0,a.minTop=0,a.maxLeft=r.width-a.width,a.maxTop=r.height-a.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>
1i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&G(this.face,f,i.width>=e.width&&i.height>=e.height?"move":"all"),R(this.cropBox,F({width:i.width,height:i.height},at({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),J(this.element,"crop",this.getData())}},pt={initPreview:function(){var t=this.crossOrigin,e=this.options.preview,i=t?this.crossOriginUrl:this.url,r=document.createElement("img");if(t&&(r.crossOrigin=t),r.src=i,this.viewBox.appendChild(r),this.viewBoxImage=r,e){var n=e;"string"==typeof e?n=this.element.ownerDocument.querySelectorAll(e):e.querySelector&&(n=[e]),this.previews=n,q(n,function(e){var r=document.createElement("img");G(e,v,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(r.crossOrigin=t),r.src=i,r.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(r)})}},resetPreview:function(){q(this.previews,function(t){var e=Y(t,v);R(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(M(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(W(e)))}(t,v)})},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,r=i.width,n=i.height,a=t.width,s=t.height,o=i.left-e.left-t.left,l=i.top-e.top-t.top;this.cropped&&!this.disabled&&(R(this.viewBoxImage,F({width:a,height:s},at(F({translateX:-o,translateY:-l},t)))),q(this.previews,function(e){var i=Y(e,v),c=i.width,u=i.height,d=c,h=u,p=1;r&&(h=n*(p=c/r)),n&&h>u&&(d=r*(p=u/n),h=u),R(e,{width:d,height:h}),R(e.getElementsByTagName("img")[0],F({width:a*p,height:s*p},at(F({translateX:-o*p,translateY:-l*p},t))))}))}},ft={bind:function(){var t=this.element,e=this.options,i=this.cropper;O(e.cropstart)&&Q(t,"cropstart",e.cropstart),O(e.cropmove)&&Q(t,"cropmove",e.cropmove),O(e.cropend)&&Q(t,"cropend",e.cropend),O(e.crop)&&Q(t,"crop",e.crop),O(e.zoom)&&Q(t,"zoom",e.zoom),Q(i,w,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Q(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Q(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),Q(t.ownerDocument,b,this.onCropMove=this.cropMove.bind(this)),Q(t.ownerDocument,_,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Q(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;O(e.cropstart)&&K(t,"cropstart",e.cropstart),O(e.cropmove)&&K(t,"cropmove",e.cropmove),O(e.cropend)&&K(t,"cropend",e.cropend),O(e.crop)&&K(t,"crop",e.crop),O(e.zoom)&&K(t,"zoom",e.zoom),K(i,w,this.onCropStart),e.zoomable&&e.zoomOnWheel&&K(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&K(i,"dblclick",this.onDblclick),K(t.ownerDocument,b,this.onCropMove),K(t.ownerDocument,_,this.onCropEnd),e.responsive&&K(window,"resize",this.onResize)}},vt={resize:function(){var t=this.options,e=this.container,i=this.containerData,r=Number(t.minContainerWidth)||200,n=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=r||i.height<=n)){var a,s,o=e.offsetWidth/i.width;1===o&&e.offsetHeight===i.height||(t.restore&&(a=this.getCanvasData(),s=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(q(a,function(t,e){a[e]=t*o})),this.setCropBoxData(q(s,function(t,e){s[e]=t*o}))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=o,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?"move":"crop"))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?r=t.deltaY>0?1:-1:t.wheelDelta?r=-t.wheelDelta/120:t.detail&&(r=t.detail>0?1:-1),this.zoom(-r*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||A(e)&&1!==e||A(i)&&0!==i||t.ctrlKey)){var r,n=this.options,a=this.pointers;t.changedTouches?q(t.changedTouches,function(t){a[t.identifier]=st(t)}):a[t.pointerId||0]=st(t),r=Object.keys(a).length>1&&n.zoomable&&n.zoomOnTouch?"zoom":Y(t.target,f),x.test(r)&&!1!==J(this.element,"cropstart",{originalEvent:t,action:r})&&(t.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,B(this.dragBox,h)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==J(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?q(t.changedTouches,function(t){F(i[t.identifier]||{},st(t,!0))}):F(i[t.pointerId||0]||{},st(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?q(t.changedTouches,function(t){delete i[t.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,L(this.dragBox,h,this.cropped&&this.options.modal)),J(this.element,"cropend",{originalEvent:t,action:e}))}}},mt={change:function(t){var e,i=this.options,r=this.canvasData,n=this.containerData,a=this.cropBoxData,s=this.pointers,o=this.action,l=i.aspectRatio,u=a.left,d=a.top,h=a.width,p=a.height,f=u+h,v=d+p,m=0,g=0,y=n.width,w=n.height,b=!0;!l&&t.shiftKey&&(l=h&&p?h/p:1),this.limited&&(m=a.minLeft,g=a.minTop,y=m+Math.min(n.width,r.width,r.left+r.
vendor: 4,514 bytes, line 1
1width),w=g+Math.min(n.height,r.height,r.top+r.height));var _=s[Object.keys(s)[0]],x={x:_.endX-_.startX,y:_.endY-_.startY},$=function(t){switch(t){case"e":f+x.x>y&&(x.x=y-f);break;case"w":u+x.x<m&&(x.x=m-u);break;case"n":d+x.y<g&&(x.y=g-d);break;case"s":v+x.y>w&&(x.y=w-v)}};switch(o){case"all":u+=x.x,d+=x.y;break;case"e":if(x.x>=0&&(f>=y||l&&(d<=g||v>=w))){b=!1;break}$("e"),(h+=x.x)<0&&(o="w",u-=h=-h),l&&(p=h/l,d+=(a.height-p)/2);break;case"n":if(x.y<=0&&(d<=g||l&&(u<=m||f>=y))){b=!1;break}$("n"),p-=x.y,d+=x.y,p<0&&(o="s",d-=p=-p),l&&(h=p*l,u+=(a.width-h)/2);break;case"w":if(x.x<=0&&(u<=m||l&&(d<=g||v>=w))){b=!1;break}$("w"),h-=x.x,u+=x.x,h<0&&(o="e",u-=h=-h),l&&(p=h/l,d+=(a.height-p)/2);break;case"s":if(x.y>=0&&(v>=w||l&&(u<=m||f>=y))){b=!1;break}$("s"),(p+=x.y)<0&&(o="n",d-=p=-p),l&&(h=p*l,u+=(a.width-h)/2);break;case"ne":if(l){if(x.y<=0&&(d<=g||f>=y)){b=!1;break}$("n"),p-=x.y,d+=x.y,h=p*l}else $("n"),$("e"),x.x>=0?f<y?h+=x.x:x.y<=0&&d<=g&&(b=!1):h+=x.x,x.y<=0?d>g&&(p-=x.y,d+=x.y):(p-=x.y,d+=x.y);h<0&&p<0?(o="sw",d-=p=-p,u-=h=-h):h<0?(o="nw",u-=h=-h):p<0&&(o="se",d-=p=-p);break;case"nw":if(l){if(x.y<=0&&(d<=g||u<=m)){b=!1;break}$("n"),p-=x.y,d+=x.y,h=p*l,u+=a.width-h}else $("n"),$("w"),x.x<=0?u>m?(h-=x.x,u+=x.x):x.y<=0&&d<=g&&(b=!1):(h-=x.x,u+=x.x),x.y<=0?d>g&&(p-=x.y,d+=x.y):(p-=x.y,d+=x.y);h<0&&p<0?(o="se",d-=p=-p,u-=h=-h):h<0?(o="ne",u-=h=-h):p<0&&(o="sw",d-=p=-p);break;case"sw":if(l){if(x.x<=0&&(u<=m||v>=w)){b=!1;break}$("w"),h-=x.x,u+=x.x,p=h/l}else $("s"),$("w"),x.x<=0?u>m?(h-=x.x,u+=x.x):x.y>=0&&v>=w&&(b=!1):(h-=x.x,u+=x.x),x.y>=0?v<w&&(p+=x.y):p+=x.y;h<0&&p<0?(o="ne",d-=p=-p,u-=h=-h):h<0?(o="se",u-=h=-h):p<0&&(o="nw",d-=p=-p);break;case"se":if(l){if(x.x>=0&&(f>=y||v>=w)){b=!1;break}$("e"),h+=x.x,p=h/l}else $("s"),$("e"),x.x>=0?f<y?h+=x.x:x.y>=0&&v>=w&&(b=!1):h+=x.x,x.y>=0?v<w&&(p+=x.y):p+=x.y;h<0&&p<0?(o="nw",d-=p=-p,u-=h=-h):h<0?(o="sw",u-=h=-h):p<0&&(o="ne",d-=p=-p);break;case"move":this.move(x.x,x.y),b=!1;break;case"zoom":this.zoom(function(t){var e=F({},t),i=[];return q(t,function(t,r){delete e[r],q(e,function(e){var r=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),a=Math.abs(t.endX-e.endX),s=Math.abs(t.endY-e.endY),o=Math.sqrt(r*r+n*n),l=(Math.sqrt(a*a+s*s)-o)/o;i.push(l)})}),i.sort(function(t,e){return Math.abs(t)<Math.abs(e)}),i[0]}(s),t),b=!1;break;case"crop":if(!x.x||!x.y){b=!1;break}e=tt(this.cropper),u=_.startX-e.left,d=_.startY-e.top,h=a.minWidth,p=a.minHeight,x.x>0?o=x.y>0?"se":"ne":x.x<0&&(u-=h,o=x.y>0?"sw":"nw"),x.y<0&&(d-=p),this.cropped||(U(this.cropBox,c),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}b&&(a.width=h,a.height=p,a.left=u,a.top=d,this.action=o,this.renderCropBox()),q(s,function(t){t.startX=t.endX,t.startY=t.endY})}},gt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&B(this.dragBox,h),U(this.cropBox,c),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=F({},this.initialImageData),this.canvasData=F({},this.initialCanvasData),this.cropBoxData=F({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(F(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),U(this.dragBox,h),B(this.cropBox,c)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,q(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,U(this.cropper,l)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,B(this.cropper,l)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,r=i.left,n=i.top;return this.moveTo(S(t)?t:r+Number(t),S(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,r=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(A(t)&&(i.left
vendor: 4,136 bytes, line 1
1=t,r=!0),A(e)&&(i.top=e,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var r=this.options,n=this.canvasData,a=n.width,s=n.height,o=n.naturalWidth,l=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&r.zoomable){var c=o*t,u=l*t;if(!1===J(this.element,"zoom",{ratio:t,oldRatio:a/o,originalEvent:i}))return this;if(i){var d=this.pointers,h=tt(this.cropper),p=d&&Object.keys(d).length?function(t){var e=0,i=0,r=0;return q(t,function(t){var n=t.startX,a=t.startY;e+=n,i+=a,r+=1}),{pageX:e/=r,pageY:i/=r}}(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(c-a)*((p.pageX-h.left-n.left)/a),n.top-=(u-s)*((p.pageY-h.top-n.top)/s)}else N(e)&&A(e.x)&&A(e.y)?(n.left-=(c-a)*((e.x-n.left)/a),n.top-=(u-s)*((e.y-n.top)/s)):(n.left-=(c-a)/2,n.top-=(u-s)/2);n.width=c,n.height=u,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return A(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,A(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(A(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,r=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(A(t)&&(i.scaleX=t,r=!0),A(e)&&(i.scaleY=e,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,r=this.imageData,n=this.canvasData,a=this.cropBoxData;if(this.ready&&this.cropped){t={x:a.left-n.left,y:a.top-n.top,width:a.width,height:a.height};var s=r.width/r.naturalWidth;if(q(t,function(e,i){t[i]=e/s}),e){var o=Math.round(t.y+t.height),l=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=l-t.x,t.height=o-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=r.rotate||0),i.scalable&&(t.scaleX=r.scaleX||1,t.scaleY=r.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,r=this.canvasData,n={};if(this.ready&&!this.disabled&&N(t)){var a=!1;e.rotatable&&A(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,a=!0),e.scalable&&(A(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,a=!0),A(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,a=!0)),a&&this.renderCanvas(!0,!0);var s=i.width/i.naturalWidth;A(t.x)&&(n.left=t.x*s+r.left),A(t.y)&&(n.top=t.y*s+r.top),A(t.width)&&(n.width=t.width*s),A(t.height)&&(n.height=t.height*s),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?F({},this.containerData):{}},getImageData:function(){return this.sized?F({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&q(["left","top","width","height","naturalWidth","naturalHeight"],function(i){e[i]=t[i]}),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&N(t)&&(A(t.left)&&(e.left=t.left),A(t.top)&&(e.top=t.top),A(t.width)?(e.width=t.width,e.height=t.width/i):A(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,r=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&N(t)&&(A(t.left)&&(r.left=t.left),A(t.top)&&(r.top=t.top),A(t.width)&&t.width!==r.width&&(e=!0,r.width=t.width),A(t.height)&&t.height!==r.height&&(i=!0,r.height=t.height),n&&(e?r.height=r.width/n:i&&(r.width=r.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,r=lt(this.image,this.imageData,e,t);if(!this.cropped)return r;var n=this.getData(),a=n.x,s=n.y,o=n.width,l=n.height,c=r.width/
1Math.floor(e.naturalWidth);1!==c&&(a*=c,s*=c,o*=c,l*=c);var u=o/l,d=ot({aspectRatio:u,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),h=ot({aspectRatio:u,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=ot({aspectRatio:u,width:t.width||(1!==c?r.width:o),height:t.height||(1!==c?r.height:l)}),f=p.width,v=p.height;f=Math.min(d.width,Math.max(h.width,f)),v=Math.min(d.height,Math.max(h.height,v));var m=document.createElement("canvas"),g=m.getContext("2d");m.width=z(f),m.height=z(v),g.fillStyle=t.fillColor||"transparent",g.fillRect(0,0,f,v);var y=t.imageSmoothingEnabled,w=void 0===y||y,b=t.imageSmoothingQuality;g.imageSmoothingEnabled=w,b&&(g.imageSmoothingQuality=b);var _,x,$,C,k,D,A=r.width,T=r.height,S=a,M=s;S<=-o||S>A?(S=0,_=0,$=0,k=0):S<=0?($=-S,S=0,_=Math.min(A,o+S),k=_):S<=A&&($=0,_=Math.min(o,A-S),k=_),_<=0||M<=-l||M>T?(M=0,x=0,C=0,D=0):M<=0?(C=-M,M=0,x=Math.min(T,l+M),D=x):M<=T&&(C=0,x=Math.min(l,T-M),D=x);var I=[S,M,_,x];if(k>0&&D>0){var N=f/o;I.push($*N,C*N,k*N,D*N)}return g.drawImage.apply(g,[r].concat(i(I.map(function(t){return Math.floor(z(t))})))),m},setAspectRatio:function(t){var e=this.options;return this.disabled||S(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,r=this.face;if(this.ready&&!this.disabled){var n="crop"===t,a=e.movable&&"move"===t;t=n||a?t:"none",e.dragMode=t,G(i,f,t),L(i,o,n),L(i,p,a),e.cropBoxMovable||(G(r,f,t),L(r,o,n),L(r,p,a))}return this}},yt=n.Cropper,wt=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!C.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=F({},k,N(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return i=t,a=[{key:"noConflict",value:function(){return window.Cropper=yt,t}},{key:"setDefaults",value:function(t){F(k,N(t)&&t)}}],(r=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,r=this.options;if(r.rotatable||r.scalable||(r.checkOrientation=!1),r.checkOrientation&&window.ArrayBuffer)if($.test(t))this.read((n=t.replace(ut,""),a=atob(n),s=new ArrayBuffer(a.length),q(o=new Uint8Array(s),function(t,e){o[e]=a.charCodeAt(e)}),s));else{var n,a,s,o,l=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=l,l.onabort=c,l.onerror=c,l.ontimeout=c,l.onprogress=function(){"image/jpeg"!==l.getResponseHeader("content-type")&&l.abort()},l.onload=function(){e.read(l.response)},l.onloadend=function(){e.reloading=!1,e.xhr=null},r.checkCrossOrigin&&rt(t)&&i.crossOrigin&&(t=nt(t)),l.open("GET",t),l.responseType="arraybuffer",l.withCredentials="use-credentials"===i.crossOrigin,l.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,r=dt(t),n=0,a=1,s=1;if(r>1){this.url=function(t,e){for(var i=[],r=new Uint8Array(t);r.length>0;)i.push(ct.apply(null,E(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var o=function(t){var e=0,i=1,r=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:r=-1;break;case 5:e=90,r=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:r}}(r);n=o.rotate,a=o.scaleX,s=o.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=a,i.scaleY=s),this.clone()}},{key:"clone",value:function(){var t,e,i=this.element,r=this.url;this.options.checkCrossOrigin&&rt(r)&&((t=i.crossOrigin)||(t="anonymous"),e=nt(r)),this.crossOrigin=t,this.crossOriginUrl=e;var n=document.createElement("img");t&&(n.crossOrigin=t),n.src=e||r,this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),B(n,u),i.parentNode.insertBefore(n,i.nextSibling)}},{key:"start",value:function(){var t=this,e=this.isImg?this.element:this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=n.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(n.navigator.userAgent),r=function(e,i){F(t.imageData,{naturalWi
1dth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var a=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=a,a.onload=function(){r(a.width,a.height),i||s.removeChild(a)},a.src=e.src,i||(a.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(a))}else r(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,r=t.parentNode,n=document.createElement("div");n.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var a=n.querySelector(".".concat("cropper","-container")),s=a.querySelector(".".concat("cropper","-canvas")),o=a.querySelector(".".concat("cropper","-drag-box")),l=a.querySelector(".".concat("cropper","-crop-box")),h=l.querySelector(".".concat("cropper","-face"));this.container=r,this.cropper=a,this.canvas=s,this.dragBox=o,this.cropBox=l,this.viewBox=a.querySelector(".".concat("cropper","-view-box")),this.face=h,s.appendChild(i),B(t,c),r.insertBefore(a,t.nextSibling),this.isImg||U(i,u),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,B(l,c),e.guides||B(l.getElementsByClassName("".concat("cropper","-dashed")),c),e.center||B(l.getElementsByClassName("".concat("cropper","-center")),c),e.background&&B(a,"".concat("cropper","-bg")),e.highlight||B(h,d),e.cropBoxMovable&&(B(h,p),G(h,f,"all")),e.cropBoxResizable||(B(l.getElementsByClassName("".concat("cropper","-line")),c),B(l.getElementsByClassName("".concat("cropper","-point")),c)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),O(e.ready)&&Q(t,"ready",e.ready,{once:!0}),J(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),U(this.element,c))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&e(i.prototype,r),a&&e(i,a),t;var i,r,a}();return F(wt.prototype,ht,pt,ft,vt,mt,gt),wt}()},66:function(t,e,i){"use strict";(function(t){i(8);var r={itemsLimit:1e3};var n=void 0;function a(){a.init||(a.init=!0,n=-1!==function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}
1var r=t.indexOf("Edge/");return r>0?parseInt(t.substring(r+5,t.indexOf(".",r)),10):-1}())}var s={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{compareAndNotify:function(){this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.$emit("notify"))},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!n&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),delete this._resizeObject.onload)}},mounted:function(){var t=this;a(),this.$nextTick(function(){t._w=t.$el.offsetWidth,t._h=t.$el.offsetHeight});var e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",n&&this.$el.appendChild(e),e.data="about:blank",n||this.$el.appendChild(e)},beforeDestroy:function(){this.removeResizeHandlers()}};var o={version:"0.4.5",install:function(t){t.component("resize-observer",s),t.component("ResizeObserver",s)}},l=null;"undefined"!=typeof window?l=window.Vue:void 0!==t&&(l=t.Vue),l&&l.use(o);var c="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},u=(function(){function t(t){this.value=t}function e(e){var i,r;function n(i,r){try{var s=e[i](r),o=s.value;o instanceof t?Promise.resolve(o.value).then(function(t){n("next",t)},function(t){n("throw",t)}):a(s.done?"return":"normal",s.value)}catch(t){a("throw",t)}}function a(t,e){switch(t){case"return":i.resolve({value:e,done:!0});break;case"throw":i.reject(e);break;default:i.resolve({value:e,done:!1})}(i=i.next)?n(i.key,i.arg):r=null}this._invoke=function(t,e){return new Promise(function(a,s){var o={key:t,arg:e,resolve:a,reject:s,next:null};r?r=r.next=o:(i=r=o,n(t,e))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}),d=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),h=function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)};var p=function(){function t(e,i,r){u(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(i,r)}return d(t,[{key:"createObserver",value:function(t,e){var i,r,n,a,s,o,l,c=this;(this.observer&&this.destroyObserver(),this.frozen)||(this.options="function"==typeof(i=t)?{callback:i}:i,this.callback=this.options.callback,this.callback&&this.options.throttle&&(this.callback=(r=this.callback,n=this.options.throttle,a=void 0,s=void 0,o=void 0,(l=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),l=1;l<e;l++)i[l-1]=arguments[l];o=i,a&&t===s||(s=t,clearTimeout(a),a=setTimeout(function(){r.apply(void 0,[t].concat(h(o))),a=0},n))})._clear=function(){clearTimeout(a)},l)),this.oldResult=void 0,this.observer=new IntersectionObserver(function(t){var e=t[0];if(c.callback){var i=e.isIntersecting&&e.intersectionRatio>=c.threshold;if(i===c.oldResult)return;c.oldResult=i,c.callback(i,e),i&&c.options.once&&(c.frozen=!0,c.destroyObserver())}},this.options.intersection),e.context.$nextTick(function(){c.observer.observe(c.el)}))}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&this.options.intersection.threshold||0}}]),t}();function f(t,e,i){var r=e.value;if("undefined"==typeof IntersectionObserver)console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var n=new p(t,r,i);t._vue_visibilityState=n}}
1var v={bind:f,update:function(t,e,i){var r=e.value;if(!function t(e,i){if(e===i)return!0;if("object"===(void 0===e?"undefined":c(e))){for(var r in e)if(!t(e[r],i[r]))return!1;return!0}return!1}(r,e.oldValue)){var n=t._vue_visibilityState;n?n.createObserver(r,i):f(t,{value:r},i)}},unbind:function(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}};var m={version:"0.4.3",install:function(t){t.directive("observe-visibility",v)}},g=null;"undefined"!=typeof window?g=window.Vue:void 0!==t&&(g=t.Vue),g&&g.use(m);var y="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};var w=function(t,e){return t(e={exports:{}},e.exports),e.exports}(function(t){var e,i;e=y,i=function(){var t=/(auto|scroll)/,e=function(t,i){return null===t.parentNode?i:e(t.parentNode,i.concat([t]))},i=function(t,e){return getComputedStyle(t,null).getPropertyValue(e)},r=function(e){return t.test(function(t){return i(t,"overflow")+i(t,"overflow-y")+i(t,"overflow-x")}(e))};return function(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var i=e(t.parentNode,[]),n=0;n<i.length;n+=1)if(r(i[n]))return i[n];return document.scrollingElement||document.documentElement}}},t.exports?t.exports=i():e.Scrollparent=i()}),b="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},_=(function(){function t(t){this.value=t}function e(e){var i,r;function n(i,r){try{var s=e[i](r),o=s.value;o instanceof t?Promise.resolve(o.value).then(function(t){n("next",t)},function(t){n("throw",t)}):a(s.done?"return":"normal",s.value)}catch(t){a("throw",t)}}function a(t,e){switch(t){case"return":i.resolve({value:e,done:!0});break;case"throw":i.reject(e);break;default:i.resolve({value:e,done:!1})}(i=i.next)?n(i.key,i.arg):r=null}this._invoke=function(t,e){return new Promise(function(a,s){var o={key:t,arg:e,resolve:a,reject:s,next:null};r?r=r.next=o:(i=r=o,n(t,e))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}),x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},$={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}}};function C(){return this.items.length&&"object"!==b(this.items[0])}var k=!1;if("undefined"!=typeof window){k=!1;try{var D=Object.defineProperty({},"passive",{get:function(){k=!0}});window.addEventListener("test",null,D)}catch(t){}}var A=0,T={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:t.handleVisibilityChange,expression:"handleVisibilityChange"}],staticClass:"vue-recycle-scroller",class:_({ready:t.ready,"page-mode":t.pageMode},"direction-"+t.direction,!0),on:{"&scroll":function(e){return t.handleScroll(e)}}},[t.$slots.before?i("div",{staticClass:"vue-recycle-scroller__slot"},[t._t("before")],2):t._e(),t._v(" "),i("div",{ref:"wrapper",staticClass:"vue-recycle-scroller__item-wrapper",style:_({},"vertical"===t.direction?"minHeight":"minWidth",t.totalSize+"px")},t._l(t.pool,function(e){return i("div",{key:e.nr.id,staticClass:"vue-recycle-scroller__item-view",class:{hover:t.hoverKey===e.nr.key},style:t.ready?{transform:"translate"+("vertical"===t.direction?"Y":"X")+"("+e.position+"px)"}:null,on:{mouseenter:function(i){t.hoverKey=e.nr.key},mouseleave:function(e){t.hoverKey=null}}},[t._t("default",null,{item:e.item,index:e.nr.index,active:e.nr.used})],2)}),0),t._v(" "),t.$slots.after?i("div",{staticClass:"vue-recycle-scroller__slot"},[t._t("after")],2):t._e(),t._v(" "),i("ResizeObserver",{on:{notify:t.handleResize}})],1)},staticRenderFns:[],name:"RecycleScroller",components:{ResizeObserver:s},directives:{ObserveVisibility:v},props:x({},$,{itemSize:{type:Number,default:null},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1}}),data:function(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes:function(){if(null===this.itemSize){for(var t={"-1":{accumulator:0}},e=this.items,i=this.sizeField,r=this.minItemSize,n=0,a=void 0,s=0,o=e.length;s<o;s++)n+=a=e[s][i]||r,t[s]={accumulator:n,size:a};return t}return[]},simpleArray:C},watch:{items:function(){this.updateVisibleItems(!0)},pageMode:function(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler:function(){this.updateVisibleItems(!1)},deep:!0}},created:function(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$isServer&&this.updateVisibleItems(!1)},mounted:function(){var t=this;this.applyPageMode(),this.$nextTick(function(){t.updateVisibleItems(!0),t.ready=!0})},beforeDestroy:function(){this.removeListeners()}
1,methods:{addView:function(t,e,i,r,n){var a={item:i,position:0},s={id:A++,index:e,used:!0,key:r,type:n};return Object.defineProperty(a,"nr",{configurable:!1,value:s}),t.push(a),a},unuseView:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.$_unusedViews,r=t.nr.type,n=i.get(r);n||(n=[],i.set(r,n)),n.push(t),e||(t.nr.used=!1,t.position=-9999,this.$_views.delete(t.nr.key))},handleResize:function(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll:function(t){var e=this;this.$_scrollDirty||(this.$_scrollDirty=!0,requestAnimationFrame(function(){e.$_scrollDirty=!1,e.updateVisibleItems(!1).continuous||(clearTimeout(e.$_refreshTimout),e.$_refreshTimout=setTimeout(e.handleScroll,100))}))},handleVisibilityChange:function(t,e){var i=this;this.ready&&(t||0!==e.boundingClientRect.width||0!==e.boundingClientRect.height?(this.$emit("visible"),requestAnimationFrame(function(){i.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems:function(t){var e=this.itemSize,i=this.typeField,n=this.simpleArray?null:this.keyField,a=this.items,s=a.length,o=this.sizes,l=this.$_views,c=this.$_unusedViews,u=this.pool,d=void 0,h=void 0,p=void 0;if(s)if(this.$isServer)d=0,h=this.prerender,p=null;else{var f=this.getScroll(),v=this.buffer;if(f.start-=v,f.end+=v,null===e){var m=0,g=s-1,y=~~(s/2),w=void 0;do{w=y,o[y].accumulator<f.start?m=y:y<s-1&&o[y+1].accumulator>f.start&&(g=y),y=~~((m+g)/2)}while(y!==w);for(y<0&&(y=0),d=y,p=o[s-1].accumulator,h=y;h<s&&o[h].accumulator<f.end;h++);-1===h?h=a.length-1:++h>s&&(h=s)}else(d=~~(f.start/e))<0&&(d=0),(h=Math.ceil(f.end/e))>s&&(h=s),p=s*e}else d=h=p=0;h-d>r.itemsLimit&&this.itemsLimitError(),this.totalSize=p;var b=void 0,_=d<=this.$_endIndex&&h>=this.$_startIndex,x=void 0;if(this.$_continuous!==_){if(_){l.clear(),c.clear();for(var $=0,C=u.length;$<C;$++)b=u[$],this.unuseView(b)}this.$_continuous=_}else if(_)for(var k=0,D=u.length;k<D;k++)(b=u[k]).nr.used&&(t&&(b.nr.index=a.findIndex(function(t){return n?t[n]===b.item[n]:t===b.item})),(-1===b.nr.index||b.nr.index<d||b.nr.index>=h)&&this.unuseView(b));_||(x=new Map);for(var A=void 0,T=void 0,S=void 0,M=void 0,I=d;I<h;I++){A=a[I];var N=n?A[n]:A;b=l.get(N),e||o[I].size?(b?(b.nr.used=!0,b.item=A):(T=A[i],_?(S=c.get(T))&&S.length?((b=S.pop()).item=A,b.nr.used=!0,b.nr.index=I,b.nr.key=N,b.nr.type=T):b=this.addView(u,I,A,N,T):(S=c.get(T),M=x.get(T)||0,S&&M<S.length?((b=S[M]).item=A,b.nr.used=!0,b.nr.index=I,b.nr.key=N,b.nr.type=T,x.set(T,M+1)):(b=this.addView(u,I,A,N,T),this.unuseView(b,!0)),M++),l.set(N,b)),b.position=null===e?o[I-1].accumulator:I*e):b&&this.unuseView(b)}return this.$_startIndex=d,this.$_endIndex=h,this.emitUpdate&&this.$emit("update",d,h),{continuous:_}},getListenerTarget:function(){var t=w(this.$el);return!window.document||t!==window.document.documentElement&&t!==window.document.body||(t=window),t},getScroll:function(){var t=this.$el,e="vertical"===this.direction,i=void 0;if(this.pageMode){var r=t.getBoundingClientRect(),n=e?r.height:r.width,a=-(e?r.top:r.left),s=e?window.innerHeight:window.innerWidth;a<0&&(s+=a,a=0),a+s>n&&(s=n-a),i={start:a,end:a+s}}else i=e?{start:t.scrollTop,end:t.scrollTop+t.clientHeight}:{start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return i},applyPageMode:function(){this.pageMode?this.addListeners():this.removeListeners()},addListeners:function(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,!!k&&{passive:!0}),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners:function(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem:function(t){var e=void 0;e=null===this.itemSize?t>0?this.sizes[t-1].accumulator:0:t*this.itemSize,this.scrollToPosition(e)},scrollToPosition:function(t){"vertical"===this.direction?this.$el.scrollTop=t:this.$el.scrollLeft=t},itemsLimitError:function(){var t=this;throw setTimeout(function(){console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",t.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")}}},S={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("RecycleScroller",t._g(t._b({ref:"scroller",attrs:{items:t.itemsWithSize,"min-item-size":t.minItemSize,direction:t.direction,"key-field":"id"},on:{resize:t.onScrollerResize,visible:t.onScrollerVisible},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.item,r=e.index,n=e.active;return[t._t("default",null,null,{item:i.item,index:r,active:n,itemWithSize:i})]}}])},"RecycleScroller",t.$attrs,!1),t.listeners),[i("template",{slot:"before"},[t._t("before")],2),t._v(" "),i("template",{slot:"after"},[t._t("after")],2)],2)},staticRenderFns:[],name:"DynamicScroller",components:{RecycleScroller:T},inheritAttrs:!1,provide:function(){return{vscrollData:this.vscrollData,vscrollParent:this}},props:x({},$,{minItemSize:{type:[Number,String],required:!0}}),data:function(){return{vscrollData:{active:!0,sizes:{},validSizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:C,itemsWithSize:function(){for(var t=[],e=this.items,i=this.keyField,r=this.simpleArray,n=this.vscrollData.sizes,a=0;a<e.length;a++){var s=e[a],o=r?a:s[i],l=n[o];void 0!==l||this.$_undefinedMap[o]||(this.$_undefinedSizes++,this.$_undefinedMap[o]=!0,l=0),t.push({item:s,id:o,size:l})}return t},listeners:function(){var t={};for(var e in this.$listeners)"resize"!==e&&"visible"!==e&&(t[e]=this.$listeners[e]);return t}},watch:{items:function(){this.forceUpdate(!1)},simpleArray:{handler:function(t){this.vscrollData.simpleArray=t},immediate:!0},direction:function(t){this.forceUpdate(!0)}},created:function(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={}},activated:function(){this.vscrollData.active=!0},deactivated:function(){this.vscrollData.active=!1},methods:{onScrollerResize:function(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible:function(){this.$emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(t||this.simpleArray)&&(this.vscrollData.validSizes={}),this.$emit("vscroll:update",{force:!0})},scrollToItem:function(t){var e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this.simpleArray?null!=e?e:this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[i]||0},scrollToBottom:function(){var t=this;if(!this.$_scrollingToBottom){this.$_scrollingToBottom=!0;var e=this.$el;this.$nextTick(function(){requestAnimationFrame(function i(){e.scrollTop=e.scrollHeight,0===t.$_undefinedSizes?t.$_scrollingToBottom=!1:requestAnimationFrame(i)})})}}}},M={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},computed:{id:function(){return this.vscrollData.simpleArray?this.index:this.item[this.vscrollData.keyField]},size:function(){return this.vscrollData.validSizes[this.id]&&this.vscrollData.sizes[this.id]||0}},watch:{watchData:"updateWatchData",id:function(){this.size||this.onDataUpdate()},active:function(t){t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created:function(){var t=this;if(!this.$isServer){this.$_forceNextVScrollUpdate=null,this.updateWatchData();
1var e=function(e){t.$watch(function(){return t.sizeDependencies[e]},t.onDataUpdate)};for(var i in this.sizeDependencies)e(i);this.vscrollParent.$on("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$on("vscroll:update-size",this.onVscrollUpdateSize)}},mounted:function(){this.vscrollData.active&&this.updateSize()},beforeDestroy:function(){this.vscrollParent.$off("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$off("vscroll:update-size",this.onVscrollUpdateSize)},methods:{updateSize:function(){this.active&&this.vscrollData.active?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.active&&this.vscrollData.active&&this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},getBounds:function(){return this.$el.getBoundingClientRect()},updateWatchData:function(){var t=this;this.watchData?this.$_watchData=this.$watch("data",function(){t.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate:function(t){var e=t.force;!this.active&&e&&(this.$_pendingVScrollUpdate=this.id),this.$_forceNextVScrollUpdate!==this.id&&!e&&this.size||this.updateSize()},onDataUpdate:function(){this.updateSize()},computeSize:function(t){var e=this;this.$nextTick(function(){if(e.id===t){var i=e.getBounds(),r=Math.round("vertical"===e.vscrollParent.direction?i.height:i.width);r&&e.size!==r&&(e.vscrollParent.$_undefinedMap[t]&&(e.vscrollParent.$_undefinedSizes--,e.vscrollParent.$_undefinedMap[t]=void 0),e.$set(e.vscrollData.sizes,e.id,r),e.$set(e.vscrollData.validSizes,e.id,!0),e.emitResize&&e.$emit("resize",e.id))}e.$_pendingSizeUpdate=null})}},render:function(t){return t(this.tag,this.$slots.default)}};var I={version:"1.0.0-rc.2",install:function(t,e){var i=Object.assign({},{installComponents:!0,componentsPrefix:""},e);for(var n in i)void 0!==i[n]&&(r[n]=i[n]);i.installComponents&&function(t,e){t.component(e+"recycle-scroller",T),t.component(e+"RecycleScroller",T),t.component(e+"dynamic-scroller",S),t.component(e+"DynamicScroller",S),t.component(e+"dynamic-scroller-item",M),t.component(e+"DynamicScrollerItem",M)}(t,i.componentsPrefix)}},N=null;"undefined"!=typeof window?N=window.Vue:void 0!==t&&(N=t.Vue),N&&N.use(I),e.a=I}).call(this,i(13))},94:function(t,e,i){"use strict";var r=i(28);i.n(r).a},95:function(t,e,i){(t.exports=i(14)(!1)).push([t.i,"\n@-webkit-keyframes opacityBlink {\nfrom {\n opacity: 1;\n}\nto {\n opacity: 0.3;\n}\n}\n@keyframes opacityBlink {\nfrom {\n opacity: 1;\n}\nto {\n opacity: 0.3;\n}\n}\n",""])},96:function(t,e,i){"use strict";var r=i(29);i.n(r).a},97:function(t,e,i){(t.exports=i(14)(!1)).push([t.i,"\n.gjs-import-code .CodeMirror {\n height: min(90vh, 500px);\n}\n",""])},98:function(t,e,i){"use strict";var r=i(30);i.n(r).a},99:function(t,e,i){(t.exports=i(14)(!1)).push([t.i,"\n.cke_wordcount {\n margin-top: 6px !important;\n}\n",""])}},0,["editor-component"]]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.