(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6741],{28461:(Ge,$,f)=>{f.d($,{Hw:()=>a,bw:()=>h,EE:()=>g});var o=f(47423),a=(()=>{return(m=a||(a={}))[m.Min=1]="Min",m[m.Low=2]="Low",m[m.Default=3]="Default",m[m.High=4]="High",m[m.Max=5]="Max",a;var m})(),g=(()=>{return(m=g||(g={}))[m.Secret=-1]="Secret",m[m.Private=0]="Private",m[m.Public=1]="Public",g;var m})();const h=(0,o.fo)("NotifyPersistent")},47394:(Ge,$,f)=>{f.d($,{AB:()=>h,Ds:()=>g,bO:()=>a,dz:()=>o});var o=(()=>{return(m=o||(o={}))[m.none=0]="none",m[m.touchId=1]="touchId",m[m.faceId=2]="faceId",m[m.fingerprintAuthentication=3]="fingerprintAuthentication",m[m.faceAuthentication=4]="faceAuthentication",m[m.irisAuthentication=5]="irisAuthentication",o;var m})(),a=(()=>{return(m=a||(a={}))[m.weak=0]="weak",m[m.strong=1]="strong",a;var m})(),g=(()=>{return(m=g||(g={})).none="",m.appCancel="appCancel",m.authenticationFailed="authenticationFailed",m.invalidContext="invalidContext",m.notInteractive="notInteractive",m.passcodeNotSet="passcodeNotSet",m.systemCancel="systemCancel",m.userCancel="userCancel",m.userFallback="userFallback",m.biometryLockout="biometryLockout",m.biometryNotAvailable="biometryNotAvailable",m.biometryNotEnrolled="biometryNotEnrolled",m.noDeviceCredential="noDeviceCredential",g;var m})();class h{constructor(L,v){this.message=L,this.code=v}}},69107:(Ge,$,f)=>{f.d($,{Gw:()=>m,bO:()=>g.bO,dz:()=>g.dz});var o=f(15861),a=f(2461),g=f(47394);f(6371);const m=(0,a.fo)("BiometricAuthNative",{web:(L=(0,o.Z)(function*(){return f.e(9064).then(f.bind(f,29064)).then(v=>new v.BiometricAuthWeb)}),function(){return L.apply(this,arguments)}),ios:function(){var L=(0,o.Z)(function*(){return f.e(2505).then(f.bind(f,52505)).then(v=>new v.BiometricAuthNative(m))});return function(){return L.apply(this,arguments)}}(),android:function(){var L=(0,o.Z)(function*(){return f.e(2505).then(f.bind(f,52505)).then(v=>new v.BiometricAuthNative(m))});return function(){return L.apply(this,arguments)}}()});var L},6371:(Ge,$,f)=>{f.d($,{S:()=>g});var o=f(47394);const a={[o.dz.none]:"",[o.dz.touchId]:"Touch ID",[o.dz.faceId]:"Face ID",[o.dz.fingerprintAuthentication]:"Fingerprint Authentication",[o.dz.faceAuthentication]:"Face Authentication",[o.dz.irisAuthentication]:"Iris Authentication"};function g(h){return a[h]||""}},2461:(Ge,$,f)=>{f.d($,{Uw:()=>K,fo:()=>j,xz:()=>k});var o=f(15861);typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"&&global;var b=(()=>{return(ie=b||(b={})).Unimplemented="UNIMPLEMENTED",ie.Unavailable="UNAVAILABLE",b;var ie})();class k extends Error{constructor(se,me,Ne){super(se),this.message=se,this.code=me,this.data=Ne}}const Y=ie=>{var se,me,Ne,_e,we;const Ee=ie.CapacitorCustomPlatform||null,le=ie.Capacitor||{},Ue=le.Plugins=le.Plugins||{},ke=ie.CapacitorPlatforms,ye=(null===(se=ke?.currentPlatform)||void 0===se?void 0:se.getPlatform)||(()=>null!==Ee?Ee.name:(ie=>{var se,me;return ie?.androidBridge?"android":null!==(me=null===(se=ie?.webkit)||void 0===se?void 0:se.messageHandlers)&&void 0!==me&&me.bridge?"ios":"web"})(ie)),Ze=(null===(me=ke?.currentPlatform)||void 0===me?void 0:me.isNativePlatform)||(()=>"web"!==ye()),At=(null===(Ne=ke?.currentPlatform)||void 0===Ne?void 0:Ne.isPluginAvailable)||(ft=>!(!gn.get(ft)?.platforms.has(ye())&&!fn(ft))),fn=(null===(_e=ke?.currentPlatform)||void 0===_e?void 0:_e.getPluginHeader)||(ft=>{var Tt;return null===(Tt=le.PluginHeaders)||void 0===Tt?void 0:Tt.find(en=>en.name===ft)}),gn=new Map,cn=(null===(we=ke?.currentPlatform)||void 0===we?void 0:we.registerPlugin)||((ft,Tt={})=>{const en=gn.get(ft);if(en)return console.warn(`Capacitor plugin "${ft}" already registered. Cannot register plugins twice.`),en.proxy;const Gt=ye(),or=fn(ft);let Cr;const wr=function(){var Qn=(0,o.Z)(function*(){return!Cr&&Gt in Tt?Cr=Cr="function"==typeof Tt[Gt]?yield Tt[Gt]():Tt[Gt]:null!==Ee&&!Cr&&"web"in Tt&&(Cr=Cr="function"==typeof Tt.web?yield Tt.web():Tt.web),Cr});return function(){return Qn.apply(this,arguments)}}(),er=Qn=>{let Pr;const jr=(...Nr)=>{const go=wr().then(Zr=>{const ro=((Qn,Pr)=>{var jr,Nr;if(!or){if(Qn)return null===(Nr=Qn[Pr])||void 0===Nr?void 0:Nr.bind(Qn);throw new k(`"${ft}" plugin is not implemented on ${Gt}`,b.Unimplemented)}{const go=or?.methods.find(Zr=>Pr===Zr.name);if(go)return"promise"===go.rtype?Zr=>le.nativePromise(ft,Pr.toString(),Zr):(Zr,ro)=>le.nativeCallback(ft,Pr.toString(),Zr,ro);if(Qn)return null===(jr=Qn[Pr])||void 0===jr?void 0:jr.bind(Qn)}})(Zr,Qn);if(ro){const mo=ro(...Nr);return Pr=mo?.remove,mo}throw new k(`"${ft}.${Qn}()" is not implemented on ${Gt}`,b.Unimplemented)});return"addListener"===Qn&&(go.remove=(0,o.Z)(function*(){return Pr()})),go};return jr.toString=()=>`${Qn.toString()}() { [capacitor code] }`,Object.defineProperty(jr,"name",{value:Qn,writable:!1,configurable:!1}),jr},Jn=er("addListener"),Er=er("removeListener"),lo=(Qn,Pr)=>{const jr=Jn({eventName:Qn},Pr),Nr=function(){var Zr=(0,o.Z)(function*(){const ro=yield jr;Er({eventName:Qn,callbackId:ro},Pr)});return function(){return Zr.apply(this,arguments)}}(),go=new Promise(Zr=>jr.then(()=>Zr({remove:Nr})));return go.remove=(0,o.Z)(function*(){console.warn("Using addListener() without 'await' is deprecated."),yield Nr()}),go},Gr=new Proxy({},{get(Qn,Pr){switch(Pr){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return or?lo:Jn;case"removeListener":return Er;default:return er(Pr)}}});return Ue[ft]=Gr,gn.set(ft,{name:ft,proxy:Gr,platforms:new Set([...Object.keys(Tt),...or?[Gt]:[]])}),Gr});return le.convertFileSrc||(le.convertFileSrc=ft=>ft),le.getPlatform=ye,le.handleError=ft=>ie.console.error(ft),le.isNativePlatform=Ze,le.isPluginAvailable=At,le.pluginMethodNoop=(ft,Tt,en)=>Promise.reject(`${en} does not have an implementation of "${Tt}".`),le.registerPlugin=cn,le.Exception=k,le.DEBUG=!!le.DEBUG,le.isLoggingEnabled=!!le.isLoggingEnabled,le.platform=le.getPlatform(),le.isNative=le.isNativePlatform(),le},D=(ie=>ie.Capacitor=Y(ie))(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),j=D.registerPlugin;class K{constructor(se){this.listeners={},this.retainedEventArguments={},this.windowListeners={},se&&(console.warn(`Capacitor WebPlugin "${se.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=se)}addListener(se,me){var Ne=this;let _e=!1;this.listeners[se]||(this.listeners[se]=[],_e=!0),this.listeners[se].push(me);const Ee=this.windowListeners[se];Ee&&!Ee.registered&&this.addWindowListener(Ee),_e&&this.sendRetainedArgumentsForEvent(se);const le=function(){var ke=(0,o.Z)(function*(){return Ne.removeListener(se,me)});return function(){return ke.apply(this,arguments)}}();return Promise.resolve({remove:le})}removeAllListeners(){var se=this;return(0,o.Z)(function*(){se.listeners={};for(const me in se.windowListeners)se.removeWindowListener(se.windowListeners[me]);se.windowListeners={}})()}notifyListeners(se,me,Ne){const _e=this.listeners[se];if(_e)_e.forEach(we=>we(me));else if(Ne){let we=this.retainedEventArguments[se];we||(we=[]),we.push(me),this.retainedEventArguments[se]=we}}hasListeners(se){return!!this.listeners[se].length}registerWindowListener(se,me){this.windowListeners[me]={registered:!1,windowEventName:se,pluginEventName:me,handler:Ne=>{this.notifyListeners(me,Ne)}}}unimplemented(se="not implemented"){return new D.Exception(se,b.Unimplemented)}unavailable(se="not available"){return new D.Exception(se,b.Unavailable)}removeListener(se,me){var Ne=this;return(0,o.Z)(function*(){const _e=Ne.listeners[se];if(!_e)return;const we=_e.indexOf(me);Ne.listeners[se].splice(we,1),Ne.listeners[se].length||Ne.removeWindowListener(Ne.windowListeners[se])})()}addWindowListener(se){window.addEventListener(se.windowEventName,se.handler),se.registered=!0}removeWindowListener(se){!se||(window.removeEventListener(se.windowEventName,se.handler),se.registered=!1)}sendRetainedArgumentsForEvent(se){const me=this.retainedEventArguments[se];!me||(delete this.retainedEventArguments[se],me.forEach(Ne=>{this.notifyListeners(se,Ne)}))}}const De=ie=>encodeURIComponent(ie).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Te=ie=>ie.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ce extends K{getCookies(){return(0,o.Z)(function*(){const se=document.cookie,me={};return se.split(";").forEach(Ne=>{if(Ne.length<=0)return;let[_e,we]=Ne.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");_e=Te(_e).trim(),we=Te(we).trim(),me[_e]=we}),me})()}setCookie(se){return(0,o.Z)(function*(){try{const me=De(se.key),Ne=De(se.value),_e=`; expires=${(se.expires||"").replace("expires=","")}`,we=(se.path||"/").replace("path=",""),Ee=null!=se.url&&se.url.length>0?`domain=${se.url}`:"";document.cookie=`${me}=${Ne||""}${_e}; path=${we}; ${Ee};`}catch(me){return Promise.reject(me)}})()}deleteCookie(se){return(0,o.Z)(function*(){try{document.cookie=`${se.key}=; Max-Age=0`}catch(me){return Promise.reject(me)}})()}clearCookies(){return(0,o.Z)(function*(){try{const se=document.cookie.split(";")||[];for(const me of se)document.cookie=me.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(se){return Promise.reject(se)}})()}clearAllCookies(){var se=this;return(0,o.Z)(function*(){try{yield se.clearCookies()}catch(me){return Promise.reject(me)}})()}}j("CapacitorCookies",{web:()=>new ce});const te=function(){var ie=(0,o.Z)(function*(se){return new Promise((me,Ne)=>{const _e=new FileReader;_e.onload=()=>{const we=_e.result;me(we.indexOf(",")>=0?we.split(",")[1]:we)},_e.onerror=we=>Ne(we),_e.readAsDataURL(se)})});return function(me){return ie.apply(this,arguments)}}();class Le extends K{request(se){return(0,o.Z)(function*(){const me=((ie,se={})=>{const me=Object.assign({method:ie.method||"GET",headers:ie.headers},se),_e=((ie={})=>{const se=Object.keys(ie);return Object.keys(ie).map(_e=>_e.toLocaleLowerCase()).reduce((_e,we,Ee)=>(_e[we]=ie[se[Ee]],_e),{})})(ie.headers)["content-type"]||"";if("string"==typeof ie.data)me.body=ie.data;else if(_e.includes("application/x-www-form-urlencoded")){const we=new URLSearchParams;for(const[Ee,le]of Object.entries(ie.data||{}))we.set(Ee,le);me.body=we.toString()}else if(_e.includes("multipart/form-data")||ie.data instanceof FormData){const we=new FormData;if(ie.data instanceof FormData)ie.data.forEach((le,Ue)=>{we.append(Ue,le)});else for(const le of Object.keys(ie.data))we.append(le,ie.data[le]);me.body=we;const Ee=new Headers(me.headers);Ee.delete("content-type"),me.headers=Ee}else(_e.includes("application/json")||"object"==typeof ie.data)&&(me.body=JSON.stringify(ie.data));return me})(se,se.webFetchExtra),Ne=((ie,se=!0)=>ie?Object.entries(ie).reduce((Ne,_e)=>{const[we,Ee]=_e;let le,Ue;return Array.isArray(Ee)?(Ue="",Ee.forEach(ke=>{le=se?encodeURIComponent(ke):ke,Ue+=`${we}=${le}&`}),Ue.slice(0,-1)):(le=se?encodeURIComponent(Ee):Ee,Ue=`${we}=${le}`),`${Ne}&${Ue}`},"").substr(1):null)(se.params,se.shouldEncodeUrlParams),_e=Ne?`${se.url}?${Ne}`:se.url,we=yield fetch(_e,me),Ee=we.headers.get("content-type")||"";let Ue,ke,{responseType:le="text"}=we.ok?se:{};switch(Ee.includes("application/json")&&(le="json"),le){case"arraybuffer":case"blob":ke=yield we.blob(),Ue=yield te(ke);break;case"json":Ue=yield we.json();break;default:Ue=yield we.text()}const ze={};return we.headers.forEach((ye,je)=>{ze[je]=ye}),{data:Ue,headers:ze,status:we.status,url:we.url}})()}get(se){var me=this;return(0,o.Z)(function*(){return me.request(Object.assign(Object.assign({},se),{method:"GET"}))})()}post(se){var me=this;return(0,o.Z)(function*(){return me.request(Object.assign(Object.assign({},se),{method:"POST"}))})()}put(se){var me=this;return(0,o.Z)(function*(){return me.request(Object.assign(Object.assign({},se),{method:"PUT"}))})()}patch(se){var me=this;return(0,o.Z)(function*(){return me.request(Object.assign(Object.assign({},se),{method:"PATCH"}))})()}delete(se){var me=this;return(0,o.Z)(function*(){return me.request(Object.assign(Object.assign({},se),{method:"DELETE"}))})()}}j("CapacitorHttp",{web:()=>new Le})},14690:(Ge,$,f)=>{f.d($,{r:()=>m});var o=f(97582),a=f(45449),h=f(17598),m=function(L){function v(){var b=null!==L&&L.apply(this,arguments)||this;return b.PERMISSION={ACCESS_CHECKIN_PROPERTIES:"android.permission.ACCESS_CHECKIN_PROPERTIES",ACCESS_COARSE_LOCATION:"android.permission.ACCESS_COARSE_LOCATION",ACCESS_FINE_LOCATION:"android.permission.ACCESS_FINE_LOCATION",ACCESS_LOCATION_EXTRA_COMMANDS:"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS",ACCESS_MOCK_LOCATION:"android.permission.ACCESS_MOCK_LOCATION",ACCESS_NETWORK_STATE:"android.permission.ACCESS_NETWORK_STATE",ACCESS_SURFACE_FLINGER:"android.permission.ACCESS_SURFACE_FLINGER",ACCESS_WIFI_STATE:"android.permission.ACCESS_WIFI_STATE",ACCOUNT_MANAGER:"android.permission.ACCOUNT_MANAGER",ADD_VOICEMAIL:"com.android.voicemail.permission.ADD_VOICEMAIL",AUTHENTICATE_ACCOUNTS:"android.permission.AUTHENTICATE_ACCOUNTS",BATTERY_STATS:"android.permission.BATTERY_STATS",BIND_ACCESSIBILITY_SERVICE:"android.permission.BIND_ACCESSIBILITY_SERVICE",BIND_APPWIDGET:"android.permission.BIND_APPWIDGET",BIND_CARRIER_MESSAGING_SERVICE:"android.permission.BIND_CARRIER_MESSAGING_SERVICE",BIND_DEVICE_ADMIN:"android.permission.BIND_DEVICE_ADMIN",BIND_DREAM_SERVICE:"android.permission.BIND_DREAM_SERVICE",BIND_INPUT_METHOD:"android.permission.BIND_INPUT_METHOD",BIND_NFC_SERVICE:"android.permission.BIND_NFC_SERVICE",BIND_NOTIFICATION_LISTENER_SERVICE:"android.permission.BIND_NOTIFICATION_LISTENER_SERVICE",BIND_PRINT_SERVICE:"android.permission.BIND_PRINT_SERVICE",BIND_REMOTEVIEWS:"android.permission.BIND_REMOTEVIEWS",BIND_TEXT_SERVICE:"android.permission.BIND_TEXT_SERVICE",BIND_TV_INPUT:"android.permission.BIND_TV_INPUT",BIND_VOICE_INTERACTION:"android.permission.BIND_VOICE_INTERACTION",BIND_VPN_SERVICE:"android.permission.BIND_VPN_SERVICE",BIND_WALLPAPER:"android.permission.BIND_WALLPAPER",BLUETOOTH:"android.permission.BLUETOOTH",BLUETOOTH_ADMIN:"android.permission.BLUETOOTH_ADMIN",BLUETOOTH_ADVERTISE:"android.permission.BLUETOOTH_ADVERTISE",BLUETOOTH_CONNECT:"android.permission.BLUETOOTH_CONNECT",BLUETOOTH_PRIVILEGED:"android.permission.BLUETOOTH_PRIVILEGED",BLUETOOTH_SCAN:"android.permission.BLUETOOTH_SCAN",BODY_SENSORS:"android.permission.BODY_SENSORS",BRICK:"android.permission.BRICK",BROADCAST_PACKAGE_REMOVED:"android.permission.BROADCAST_PACKAGE_REMOVED",BROADCAST_SMS:"android.permission.BROADCAST_SMS",BROADCAST_STICKY:"android.permission.BROADCAST_STICKY",BROADCAST_WAP_PUSH:"android.permission.BROADCAST_WAP_PUSH",CALL_PHONE:"android.permission.CALL_PHONE",CALL_PRIVILEGED:"android.permission.CALL_PRIVILEGED",CAMERA:"android.permission.CAMERA",CAPTURE_AUDIO_OUTPUT:"android.permission.CAPTURE_AUDIO_OUTPUT",CAPTURE_SECURE_VIDEO_OUTPUT:"android.permission.CAPTURE_SECURE_VIDEO_OUTPUT",CAPTURE_VIDEO_OUTPUT:"android.permission.CAPTURE_VIDEO_OUTPUT",CHANGE_COMPONENT_ENABLED_STATE:"android.permission.CHANGE_COMPONENT_ENABLED_STATE",CHANGE_CONFIGURATION:"android.permission.CHANGE_CONFIGURATION",CHANGE_NETWORK_STATE:"android.permission.CHANGE_NETWORK_STATE",CHANGE_WIFI_MULTICAST_STATE:"android.permission.CHANGE_WIFI_MULTICAST_STATE",CHANGE_WIFI_STATE:"android.permission.CHANGE_WIFI_STATE",CLEAR_APP_CACHE:"android.permission.CLEAR_APP_CACHE",CLEAR_APP_USER_DATA:"android.permission.CLEAR_APP_USER_DATA",CONTROL_LOCATION_UPDATES:"android.permission.CONTROL_LOCATION_UPDATES",DELETE_CACHE_FILES:"android.permission.DELETE_CACHE_FILES",DELETE_PACKAGES:"android.permission.DELETE_PACKAGES",DEVICE_POWER:"android.permission.DEVICE_POWER",DIAGNOSTIC:"android.permission.DIAGNOSTIC",DISABLE_KEYGUARD:"android.permission.DISABLE_KEYGUARD",DUMP:"android.permission.DUMP",EXPAND_STATUS_BAR:"android.permission.EXPAND_STATUS_BAR",FACTORY_TEST:"android.permission.FACTORY_TEST",FLASHLIGHT:"android.permission.FLASHLIGHT",FORCE_BACK:"android.permission.FORCE_BACK",GET_ACCOUNTS:"android.permission.GET_ACCOUNTS",GET_PACKAGE_SIZE:"android.permission.GET_PACKAGE_SIZE",GET_TASKS:"android.permission.GET_TASKS",GET_TOP_ACTIVITY_INFO:"android.permission.GET_TOP_ACTIVITY_INFO",GLOBAL_SEARCH:"android.permission.GLOBAL_SEARCH",HARDWARE_TEST:"android.permission.HARDWARE_TEST",INJECT_EVENTS:"android.permission.INJECT_EVENTS",INSTALL_LOCATION_PROVIDER:"android.permission.INSTALL_LOCATION_PROVIDER",INSTALL_PACKAGES:"android.permission.INSTALL_PACKAGES",INSTALL_SHORTCUT:"com.android.launcher.permission.INSTALL_SHORTCUT",INTERNAL_SYSTEM_WINDOW:"android.permission.INTERNAL_SYSTEM_WINDOW",INTERNET:"android.permission.INTERNET",KILL_BACKGROUND_PROCESSES:"android.permission.KILL_BACKGROUND_PROCESSES",LOCATION_HARDWARE:"android.permission.LOCATION_HARDWARE",MANAGE_ACCOUNTS:"android.permission.MANAGE_ACCOUNTS",MANAGE_APP_TOKENS:"android.permission.MANAGE_APP_TOKENS",MANAGE_DOCUMENTS:"android.permission.MANAGE_DOCUMENTS",MASTER_CLEAR:"android.permission.MASTER_CLEAR",MEDIA_CONTENT_CONTROL:"android.permission.MEDIA_CONTENT_CONTROL",MODIFY_AUDIO_SETTINGS:"android.permission.MODIFY_AUDIO_SETTINGS",MODIFY_PHONE_STATE:"android.permission.MODIFY_PHONE_STATE",MOUNT_FORMAT_FILESYSTEMS:"android.permission.MOUNT_FORMAT_FILESYSTEMS",MOUNT_UNMOUNT_FILESYSTEMS:"android.permission.MOUNT_UNMOUNT_FILESYSTEMS",NFC:"android.permission.NFC",PERSISTENT_ACTIVITY:"android.permission.PERSISTENT_ACTIVITY",POST_NOTIFICATIONS:"android.permission.POST_NOTIFICATIONS",PROCESS_OUTGOING_CALLS:"android.permission.PROCESS_OUTGOING_CALLS",READ_CALENDAR:"android.permission.READ_CALENDAR",READ_CALL_LOG:"android.permission.READ_CALL_LOG",READ_CONTACTS:"android.permission.READ_CONTACTS",READ_EXTERNAL_STORAGE:"android.permission.READ_EXTERNAL_STORAGE",READ_FRAME_BUFFER:"android.permission.READ_FRAME_BUFFER",READ_HISTORY_BOOKMARKS:"com.android.browser.permission.READ_HISTORY_BOOKMARKS",READ_INPUT_STATE:"android.permission.READ_INPUT_STATE",READ_LOGS:"android.permission.READ_LOGS",READ_MEDIA_AUDIO:"android.permission.READ_MEDIA_AUDIO",READ_MEDIA_IMAGES:"android.permission.READ_MEDIA_IMAGES",READ_MEDIA_VIDEO:"android.permission.READ_MEDIA_VIDEO",READ_PHONE_STATE:"android.permission.READ_PHONE_STATE",READ_PROFILE:"android.permission.READ_PROFILE",READ_SMS:"android.permission.READ_SMS",READ_SOCIAL_STREAM:"android.permission.READ_SOCIAL_STREAM",READ_SYNC_SETTINGS:"android.permission.READ_SYNC_SETTINGS",READ_SYNC_STATS:"android.permission.READ_SYNC_STATS",READ_USER_DICTIONARY:"android.permission.READ_USER_DICTIONARY",READ_VOICEMAIL:"com.android.voicemail.permission.READ_VOICEMAIL",REBOOT:"android.permission.REBOOT",RECEIVE_BOOT_COMPLETED:"android.permission.RECEIVE_BOOT_COMPLETED",RECEIVE_MMS:"android.permission.RECEIVE_MMS",RECEIVE_SMS:"android.permission.RECEIVE_SMS",RECEIVE_WAP_PUSH:"android.permission.RECEIVE_WAP_PUSH",RECORD_AUDIO:"android.permission.RECORD_AUDIO",REORDER_TASKS:"android.permission.REORDER_TASKS",RESTART_PACKAGES:"android.permission.RESTART_PACKAGES",SEND_RESPOND_VIA_MESSAGE:"android.permission.SEND_RESPOND_VIA_MESSAGE",SEND_SMS:"android.permission.SEND_SMS",SET_ACTIVITY_WATCHER:"android.permission.SET_ACTIVITY_WATCHER",SET_ALARM:"com.android.alarm.permission.SET_ALARM",SET_ALWAYS_FINISH:"android.permission.SET_ALWAYS_FINISH",SET_ANIMATION_SCALE:"android.permission.SET_ANIMATION_SCALE",SET_DEBUG_APP:"android.permission.SET_DEBUG_APP",SET_ORIENTATION:"android.permission.SET_ORIENTATION",SET_POINTER_SPEED:"android.permission.SET_POINTER_SPEED",SET_PREFERRED_APPLICATIONS:"android.permission.SET_PREFERRED_APPLICATIONS",SET_PROCESS_LIMIT:"android.permission.SET_PROCESS_LIMIT",SET_TIME:"android.permission.SET_TIME",SET_TIME_ZONE:"android.permission.SET_TIME_ZONE",SET_WALLPAPER:"android.permission.SET_WALLPAPER",SET_WALLPAPER_HINTS:"android.permission.SET_WALLPAPER_HINTS",SIGNAL_PERSISTENT_PROCESSES:"android.permission.SIGNAL_PERSISTENT_PROCESSES",STATUS_BAR:"android.permission.STATUS_BAR",SUBSCRIBED_FEEDS_READ:"android.permission.SUBSCRIBED_FEEDS_READ",SUBSCRIBED_FEEDS_WRITE:"android.permission.SUBSCRIBED_FEEDS_WRITE",SYSTEM_ALERT_WINDOW:"android.permission.SYSTEM_ALERT_WINDOW",TRANSMIT_IR:"android.permission.TRANSMIT_IR",UNINSTALL_SHORTCUT:"com.android.launcher.permission.UNINSTALL_SHORTCUT",UPDATE_DEVICE_STATS:"android.permission.UPDATE_DEVICE_STATS",USE_CREDENTIALS:"android.permission.USE_CREDENTIALS",USE_SIP:"android.permission.USE_SIP",VIBRATE:"android.permission.VIBRATE",WAKE_LOCK:"android.permission.WAKE_LOCK",WRITE_APN_SETTINGS:"android.permission.WRITE_APN_SETTINGS",WRITE_CALENDAR:"android.permission.WRITE_CALENDAR",WRITE_CALL_LOG:"android.permission.WRITE_CALL_LOG",WRITE_CONTACTS:"android.permission.WRITE_CONTACTS",WRITE_EXTERNAL_STORAGE:"android.permission.WRITE_EXTERNAL_STORAGE",WRITE_GSERVICES:"android.permission.WRITE_GSERVICES",WRITE_HISTORY_BOOKMARKS:"com.android.browser.permission.WRITE_HISTORY_BOOKMARKS",WRITE_PROFILE:"android.permission.WRITE_PROFILE",WRITE_SECURE_SETTINGS:"android.permission.WRITE_SECURE_SETTINGS",WRITE_SETTINGS:"android.permission.WRITE_SETTINGS",WRITE_SMS:"android.permission.WRITE_SMS",WRITE_SOCIAL_STREAM:"android.permission.WRITE_SOCIAL_STREAM",WRITE_SYNC_SETTINGS:"android.permission.WRITE_SYNC_SETTINGS",WRITE_USER_DICTIONARY:"android.permission.WRITE_USER_DICTIONARY",WRITE_VOICEMAIL:"com.android.voicemail.permission.WRITE_VOICEMAIL"},b}return(0,o.ZT)(v,L),v.prototype.checkPermission=function(b){return(0,h.DM)(this,"checkPermission",{},arguments)},v.prototype.requestPermission=function(b){return(0,h.DM)(this,"requestPermission",{},arguments)},v.prototype.requestPermissions=function(b){return(0,h.DM)(this,"requestPermissions",{},arguments)},v.prototype.hasPermission=function(b){return(0,h.DM)(this,"hasPermission",{},arguments)},v.\u0275fac=function(){let b;return function(F){return(b||(b=a.\u0275\u0275getInheritedFactory(v)))(F||v)}}(),v.\u0275prov=a.\u0275\u0275defineInjectable({token:v,factory:v.\u0275fac}),v.pluginName="AndroidPermissions",v.plugin="cordova-plugin-android-permissions",v.pluginRef="cordova.plugins.permissions",v.repo="https://github.com/NeoLSN/cordova-plugin-android-permissions",v.platforms=["Android"],v=(0,o.gn)([],v)}(h.On)},27317:(Ge,$,f)=>{f.d($,{f:()=>m});var o=f(97582),a=f(45449),h=f(17598),m=function(L){function v(){return null!==L&&L.apply(this,arguments)||this}return(0,o.ZT)(v,L),v.prototype.hasReadWritePermission=function(){return(0,h.DM)(this,"hasReadWritePermission",{},arguments)},v.prototype.hasReadPermission=function(){return(0,h.DM)(this,"hasReadPermission",{},arguments)},v.prototype.hasWritePermission=function(){return(0,h.DM)(this,"hasWritePermission",{},arguments)},v.prototype.requestWritePermission=function(){return(0,h.DM)(this,"requestWritePermission",{},arguments)},v.prototype.requestReadPermission=function(){return(0,h.DM)(this,"requestReadPermission",{},arguments)},v.prototype.requestReadWritePermission=function(){return(0,h.DM)(this,"requestReadWritePermission",{},arguments)},v.prototype.createCalendar=function(b){return(0,h.DM)(this,"createCalendar",{},arguments)},v.prototype.deleteCalendar=function(b){return(0,h.DM)(this,"deleteCalendar",{},arguments)},v.prototype.getCalendarOptions=function(){return(0,h.DM)(this,"getCalendarOptions",{sync:!0},arguments)},v.prototype.getCreateCalendarOptions=function(){return(0,h.DM)(this,"getCreateCalendarOptions",{sync:!0},arguments)},v.prototype.createEvent=function(b,k,F,Y,I){return(0,h.DM)(this,"createEvent",{},arguments)},v.prototype.createEventWithOptions=function(b,k,F,Y,I,D){return(0,h.DM)(this,"createEventWithOptions",{},arguments)},v.prototype.createEventInteractively=function(b,k,F,Y,I){return(0,h.DM)(this,"createEventInteractively",{},arguments)},v.prototype.createEventInteractivelyWithOptions=function(b,k,F,Y,I,D){return(0,h.DM)(this,"createEventInteractivelyWithOptions",{},arguments)},v.prototype.findEvent=function(b,k,F,Y,I){return(0,h.DM)(this,"findEvent",{},arguments)},v.prototype.findEventWithOptions=function(b,k,F,Y,I,D){return(0,h.DM)(this,"findEventWithOptions",{},arguments)},v.prototype.listEventsInRange=function(b,k){return(0,h.DM)(this,"listEventsInRange",{platforms:["Android"]},arguments)},v.prototype.listCalendars=function(){return(0,h.DM)(this,"listCalendars",{},arguments)},v.prototype.findAllEventsInNamedCalendar=function(b){return(0,h.DM)(this,"findAllEventsInNamedCalendar",{platforms:["iOS"]},arguments)},v.prototype.modifyEvent=function(b,k,F,Y,I,D,j,W,de,K){return(0,h.DM)(this,"modifyEvent",{platforms:["iOS"]},arguments)},v.prototype.modifyEventWithOptions=function(b,k,F,Y,I,D,j,W,de,K,ee,De){return(0,h.DM)(this,"modifyEventWithOptions",{platforms:["iOS"]},arguments)},v.prototype.deleteEvent=function(b,k,F,Y,I){return(0,h.DM)(this,"deleteEvent",{},arguments)},v.prototype.deleteEventFromNamedCalendar=function(b,k,F,Y,I,D){return(0,h.DM)(this,"deleteEventFromNamedCalendar",{platforms:["iOS"]},arguments)},v.prototype.deleteEventById=function(b,k){return(0,h.DM)(this,"deleteEventById",{},arguments)},v.prototype.openCalendar=function(b){return(0,h.DM)(this,"openCalendar",{},arguments)},v.\u0275fac=function(){let b;return function(F){return(b||(b=a.\u0275\u0275getInheritedFactory(v)))(F||v)}}(),v.\u0275prov=a.\u0275\u0275defineInjectable({token:v,factory:v.\u0275fac}),v.pluginName="Calendar",v.plugin="cordova-plugin-calendar",v.pluginRef="plugins.calendar",v.repo="https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin",v.platforms=["Android","iOS"],v=(0,o.gn)([],v)}(h.On)},17598:(Ge,$,f)=>{f.d($,{On:()=>ge,DM:()=>xe});var a=f(56498),g=f(23753),h={error:"cordova_not_available"},m={error:"plugin_not_installed"};function L(me){if(typeof window<"u"&&window.angular){var _e=window.document,we=window.angular.element(_e.querySelector("[ng-app]")||_e.body).injector();if(we)return we.get("$q")(function(le,Ue){me(le,Ue)});console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return function(){if(Promise)return new Promise(function(le,Ue){me(le,Ue)});console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}()}function v(me,Ne,_e,we){void 0===we&&(we={});var Ee,le,Ue=L(function(ke,ze){Ee=we.destruct?j(me,Ne,_e,we,function(){for(var ye=[],je=0;je"u")||(typeof window>"u"||!window.cordova?(function De(me,Ne){typeof process>"u"&&console.warn(Ne?"Native: tried calling "+me+"."+Ne+", but Cordova is not available. Make sure to include cordova.js or run in a device/simulator":"Native: tried accessing the "+me+" plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator")}(_e,Ne),h):(function ee(me,Ne,_e){console.warn(_e?"Native: tried calling "+me+"."+_e+", but the "+me+" plugin is not installed.":"Native: tried accessing the "+me+" plugin but it's not installed."),Ne&&console.warn("Install the "+me+" plugin: 'ionic cordova plugin add "+Ne+"'")}(_e,Ee,Ne),m))}function j(me,Ne,_e,we,Ee,le){void 0===we&&(we={}),_e=function D(me,Ne,_e,we){if(void 0===Ne&&(Ne={}),Ne.sync)return me;if("reverse"===Ne.callbackOrder)me.unshift(we),me.unshift(_e);else if("node"===Ne.callbackStyle)me.push(function(ke,ze){ke?we(ke):_e(ze)});else if("object"===Ne.callbackStyle&&Ne.successName&&Ne.errorName){var Ee={};Ee[Ne.successName]=_e,Ee[Ne.errorName]=we,me.push(Ee)}else if(typeof Ne.successIndex<"u"||typeof Ne.errorIndex<"u"){var le=function(){Ne.successIndex>me.length?me[Ne.successIndex]=_e:me.splice(Ne.successIndex,0,_e)},Ue=function(){Ne.errorIndex>me.length?me[Ne.errorIndex]=we:me.splice(Ne.errorIndex,0,we)};Ne.successIndex>Ne.errorIndex?(Ue(),le()):(le(),Ue())}else me.push(_e),me.push(we);return me}(_e,we,Ee,le);var Ue=Y(me,Ne);if(!0===Ue){var ke=de(me.constructor.getPluginRef());return ke[Ne].apply(ke,_e)}return Ue}function de(me){return typeof window<"u"?K(window,me):null}function K(me,Ne){for(var _e=Ne.split("."),we=me,Ee=0;Ee<_e.length;Ee++){if(!we)return null;we=we[_e[Ee]]}return we}var ge=function(){function me(){}return me.installed=function(){return!0===Y(this.pluginRef)},me.getPlugin=function(){return typeof window<"u"?function oe(me,Ne){for(var _e=Ne.split("."),we=me,Ee=0;Ee<_e.length;Ee++){if(!we)return null;we=we[_e[Ee]]}return we}(window,this.pluginRef):null},me.getPluginName=function(){return this.pluginName},me.getPluginRef=function(){return this.pluginRef},me.getPluginInstallName=function(){return this.plugin},me.getSupportedPlatforms=function(){return this.platforms},me.pluginName="",me.pluginRef="",me.plugin="",me.repo="",me.platforms=[],me.install="",me}();function xe(me,Ne,_e,we){return function(me,Ne,_e){return void 0===_e&&(_e={}),function(){for(var we=[],Ee=0;Ee"u"){var me=typeof window<"u"?window:{},_e=Date.now(),we=!1;me.document.addEventListener("deviceready",function(){console.log("Ionic Native: deviceready event fired after "+(Date.now()-_e)+" ms"),we=!0}),setTimeout(function(){!we&&me.cordova&&console.warn("Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.")},5e3)}}()},68867:(Ge,$,f)=>{f.d($,{E:()=>m});var o=f(97582),a=f(45449),h=f(17598),m=function(L){function v(){var b=null!==L&&L.apply(this,arguments)||this;return b.REQUEST_PRIORITY_NO_POWER=0,b.REQUEST_PRIORITY_LOW_POWER=1,b.REQUEST_PRIORITY_BALANCED_POWER_ACCURACY=2,b.REQUEST_PRIORITY_HIGH_ACCURACY=3,b.SUCCESS_SETTINGS_SATISFIED=0,b.SUCCESS_USER_AGREED=1,b.ERROR_ALREADY_REQUESTING=-1,b.ERROR_INVALID_ACTION=0,b.ERROR_INVALID_ACCURACY=1,b.ERROR_EXCEPTION=1,b.ERROR_CANNOT_CHANGE_ACCURACY=3,b.ERROR_USER_DISAGREED=4,b.ERROR_GOOGLE_API_CONNECTION_FAILED=4,b}return(0,o.ZT)(v,L),v.prototype.canRequest=function(){return(0,h.DM)(this,"canRequest",{},arguments)},v.prototype.isRequesting=function(){return(0,h.DM)(this,"isRequesting",{},arguments)},v.prototype.request=function(b){return(0,h.DM)(this,"request",{callbackOrder:"reverse"},arguments)},v.\u0275fac=function(){let b;return function(F){return(b||(b=a.\u0275\u0275getInheritedFactory(v)))(F||v)}}(),v.\u0275prov=a.\u0275\u0275defineInjectable({token:v,factory:v.\u0275fac}),v.pluginName="LocationAccuracy",v.plugin="cordova-plugin-request-location-accuracy",v.pluginRef="cordova.plugins.locationAccuracy",v.repo="https://github.com/dpa99c/cordova-plugin-request-location-accuracy",v.platforms=["Android","iOS"],v=(0,o.gn)([],v)}(h.On)},89102:(Ge,$,f)=>{f.d($,{e:()=>m});var o=f(97582),a=f(45449),h=f(17598),m=function(L){function v(){return null!==L&&L.apply(this,arguments)||this}return(0,o.ZT)(v,L),v.prototype.share=function(b,k,F,Y){return(0,h.DM)(this,"share",{successIndex:4,errorIndex:5},arguments)},v.prototype.shareWithOptions=function(b){return(0,h.DM)(this,"shareWithOptions",{platforms:["iOS","Android"]},arguments)},v.prototype.canShareVia=function(b,k,F,Y,I){return(0,h.DM)(this,"canShareVia",{successIndex:5,errorIndex:6,platforms:["iOS","Android"]},arguments)},v.prototype.shareViaTwitter=function(b,k,F){return(0,h.DM)(this,"shareViaTwitter",{successIndex:3,errorIndex:4,platforms:["iOS","Android"]},arguments)},v.prototype.shareViaFacebook=function(b,k,F){return(0,h.DM)(this,"shareViaFacebook",{successIndex:3,errorIndex:4,platforms:["iOS","Android"]},arguments)},v.prototype.shareViaFacebookWithPasteMessageHint=function(b,k,F,Y){return(0,h.DM)(this,"shareViaFacebookWithPasteMessageHint",{successIndex:4,errorIndex:5,platforms:["iOS","Android"]},arguments)},v.prototype.shareViaInstagram=function(b,k){return(0,h.DM)(this,"shareViaInstagram",{platforms:["iOS","Android"]},arguments)},v.prototype.shareViaWhatsApp=function(b,k,F){return(0,h.DM)(this,"shareViaWhatsApp",{successIndex:3,errorIndex:4,platforms:["iOS","Android"]},arguments)},v.prototype.shareViaWhatsAppToReceiver=function(b,k,F,Y){return(0,h.DM)(this,"shareViaWhatsAppToReceiver",{successIndex:4,errorIndex:5,platforms:["iOS","Android"]},arguments)},v.prototype.shareViaSMS=function(b,k){return(0,h.DM)(this,"shareViaSMS",{platforms:["iOS","Android"]},arguments)},v.prototype.canShareViaEmail=function(){return(0,h.DM)(this,"canShareViaEmail",{platforms:["iOS","Android"]},arguments)},v.prototype.shareViaEmail=function(b,k,F,Y,I,D){return(0,h.DM)(this,"shareViaEmail",{platforms:["iOS","Android"],successIndex:6,errorIndex:7},arguments)},v.prototype.shareVia=function(b,k,F,Y,I){return(0,h.DM)(this,"shareVia",{successIndex:5,errorIndex:6,platforms:["iOS","Android"]},arguments)},v.prototype.setIPadPopupCoordinates=function(b){return(0,h.DM)(this,"setIPadPopupCoordinates",{sync:!0,platforms:["iOS"]},arguments)},v.prototype.saveToPhotoAlbum=function(b){return(0,h.DM)(this,"saveToPhotoAlbum",{platforms:["iOS"]},arguments)},v.prototype.shareViaWhatsAppToPhone=function(b,k,F,Y){return(0,h.DM)(this,"shareViaWhatsAppToPhone",{successIndex:5,errorIndex:6,platforms:["iOS","Android"]},arguments)},v.\u0275fac=function(){let b;return function(F){return(b||(b=a.\u0275\u0275getInheritedFactory(v)))(F||v)}}(),v.\u0275prov=a.\u0275\u0275defineInjectable({token:v,factory:v.\u0275fac}),v.pluginName="SocialSharing",v.plugin="cordova-plugin-x-socialsharing",v.pluginRef="plugins.socialsharing",v.repo="https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin",v.platforms=["Android","Browser","iOS","Windows","Windows Phone"],v=(0,o.gn)([],v)}(h.On)},53695:(Ge,$,f)=>{f.d($,{J:()=>a});const a=(0,f(47423).fo)("PrivacyScreen",{web:()=>f.e(5397).then(f.bind(f,35397)).then(g=>new g.PrivacyScreenWeb)})},35548:(Ge,$,f)=>{f.d($,{g:()=>a});const a=(0,f(47423).fo)("App",{web:()=>f.e(4477).then(f.bind(f,94477)).then(g=>new g.AppWeb)})},89191:(Ge,$,f)=>{f.d($,{V1:()=>b,GW:()=>h,dk:()=>m,oK:()=>g});var o=f(47423),a=f(15861),g=(()=>{return(k=g||(g={})).Prompt="PROMPT",k.Camera="CAMERA",k.Photos="PHOTOS",g;var k})(),h=(()=>{return(k=h||(h={})).Rear="REAR",k.Front="FRONT",h;var k})(),m=(()=>{return(k=m||(m={})).Uri="uri",k.Base64="base64",k.DataUrl="dataUrl",m;var k})();class L extends o.Uw{getPhoto(F){var Y=this;return(0,a.Z)(function*(){return new Promise(function(){var I=(0,a.Z)(function*(D,j){if(F.webUseInput||F.source===g.Photos)Y.fileInputExperience(F,D,j);else if(F.source===g.Prompt){let W=document.querySelector("pwa-action-sheet");W||(W=document.createElement("pwa-action-sheet"),document.body.appendChild(W)),W.header=F.promptLabelHeader||"Photo",W.cancelable=!1,W.options=[{title:F.promptLabelPhoto||"From Photos"},{title:F.promptLabelPicture||"Take Picture"}],W.addEventListener("onSelection",function(){var de=(0,a.Z)(function*(K){0===K.detail?Y.fileInputExperience(F,D,j):Y.cameraExperience(F,D,j)});return function(K){return de.apply(this,arguments)}}())}else Y.cameraExperience(F,D,j)});return function(D,j){return I.apply(this,arguments)}}())})()}pickImages(F){var Y=this;return(0,a.Z)(function*(){return new Promise(function(){var I=(0,a.Z)(function*(D,j){Y.multipleFileInputExperience(D,j)});return function(D,j){return I.apply(this,arguments)}}())})()}cameraExperience(F,Y,I){var D=this;return(0,a.Z)(function*(){if(customElements.get("pwa-camera-modal")){const j=document.createElement("pwa-camera-modal");j.facingMode=F.direction===h.Front?"user":"environment",document.body.appendChild(j);try{yield j.componentOnReady(),j.addEventListener("onPhoto",function(){var W=(0,a.Z)(function*(de){const K=de.detail;null===K?I(new o.xz("User cancelled photos app")):K instanceof Error?I(K):Y(yield D._getCameraPhoto(K,F)),j.dismiss(),document.body.removeChild(j)});return function(de){return W.apply(this,arguments)}}()),j.present()}catch{D.fileInputExperience(F,Y,I)}}else console.error("Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements."),D.fileInputExperience(F,Y,I)})()}fileInputExperience(F,Y,I){let D=document.querySelector("#_capacitor-camera-input");const j=()=>{var W;null===(W=D.parentNode)||void 0===W||W.removeChild(D)};D||(D=document.createElement("input"),D.id="_capacitor-camera-input",D.type="file",D.hidden=!0,document.body.appendChild(D),D.addEventListener("change",W=>{const de=D.files[0];let K="jpeg";if("image/png"===de.type?K="png":"image/gif"===de.type&&(K="gif"),"dataUrl"===F.resultType||"base64"===F.resultType){const ee=new FileReader;ee.addEventListener("load",()=>{if("dataUrl"===F.resultType)Y({dataUrl:ee.result,format:K});else if("base64"===F.resultType){const De=ee.result.split(",")[1];Y({base64String:De,format:K})}j()}),ee.readAsDataURL(de)}else Y({webPath:URL.createObjectURL(de),format:K}),j()}),D.addEventListener("cancel",W=>{I(new o.xz("User cancelled photos app")),j()})),D.accept="image/*",D.capture=!0,F.source===g.Photos||F.source===g.Prompt?D.removeAttribute("capture"):F.direction===h.Front?D.capture="user":F.direction===h.Rear&&(D.capture="environment"),D.click()}multipleFileInputExperience(F,Y){let I=document.querySelector("#_capacitor-camera-input-multiple");const D=()=>{var j;null===(j=I.parentNode)||void 0===j||j.removeChild(I)};I||(I=document.createElement("input"),I.id="_capacitor-camera-input-multiple",I.type="file",I.hidden=!0,I.multiple=!0,document.body.appendChild(I),I.addEventListener("change",j=>{const W=[];for(let de=0;de{Y(new o.xz("User cancelled photos app")),D()})),I.accept="image/*",I.click()}_getCameraPhoto(F,Y){return new Promise((I,D)=>{const j=new FileReader,W=F.type.split("/")[1];"uri"===Y.resultType?I({webPath:URL.createObjectURL(F),format:W,saved:!1}):(j.readAsDataURL(F),j.onloadend=()=>{const de=j.result;I("dataUrl"===Y.resultType?{dataUrl:de,format:W,saved:!1}:{base64String:de.split(",")[1],format:W,saved:!1})},j.onerror=de=>{D(de)})})}checkPermissions(){var F=this;return(0,a.Z)(function*(){if(typeof navigator>"u"||!navigator.permissions)throw F.unavailable("Permissions API not available in this browser");try{return{camera:(yield window.navigator.permissions.query({name:"camera"})).state,photos:"granted"}}catch{throw F.unavailable("Camera permissions are not available in this browser")}})()}requestPermissions(){var F=this;return(0,a.Z)(function*(){throw F.unimplemented("Not implemented on web.")})()}pickLimitedLibraryPhotos(){var F=this;return(0,a.Z)(function*(){throw F.unavailable("Not implemented on web.")})()}getLimitedLibraryPhotos(){var F=this;return(0,a.Z)(function*(){throw F.unavailable("Not implemented on web.")})()}}new L;const b=(0,o.fo)("Camera",{web:()=>new L})},47423:(Ge,$,f)=>{f.d($,{Uw:()=>k,dV:()=>v,fo:()=>b,kv:()=>Te,xz:()=>g});var o=f(15861),a=(()=>{return(ce=a||(a={})).Unimplemented="UNIMPLEMENTED",ce.Unavailable="UNAVAILABLE",a;var ce})();class g extends Error{constructor(oe,te,ge){super(oe),this.message=oe,this.code=te,this.data=ge}}const m=ce=>{const oe=ce.CapacitorCustomPlatform||null,te=ce.Capacitor||{},ge=te.Plugins=te.Plugins||{},xe=()=>null!==oe?oe.name:(ce=>{var oe,te;return ce?.androidBridge?"android":null!==(te=null===(oe=ce?.webkit)||void 0===oe?void 0:oe.messageHandlers)&&void 0!==te&&te.bridge?"ios":"web"})(ce),Ce=Ne=>{var _e;return null===(_e=te.PluginHeaders)||void 0===_e?void 0:_e.find(we=>we.name===Ne)},se=new Map;return te.convertFileSrc||(te.convertFileSrc=Ne=>Ne),te.getPlatform=xe,te.handleError=Ne=>ce.console.error(Ne),te.isNativePlatform=()=>"web"!==xe(),te.isPluginAvailable=Ne=>!(!se.get(Ne)?.platforms.has(xe())&&!Ce(Ne)),te.registerPlugin=(Ne,_e={})=>{const we=se.get(Ne);if(we)return console.warn(`Capacitor plugin "${Ne}" already registered. Cannot register plugins twice.`),we.proxy;const Ee=xe(),le=Ce(Ne);let Ue;const ke=function(){var Vt=(0,o.Z)(function*(){return!Ue&&Ee in _e?Ue=Ue="function"==typeof _e[Ee]?yield _e[Ee]():_e[Ee]:null!==oe&&!Ue&&"web"in _e&&(Ue=Ue="function"==typeof _e.web?yield _e.web():_e.web),Ue});return function(){return Vt.apply(this,arguments)}}(),ye=Vt=>{let fn;const mn=(...xn)=>{const gn=ke().then(Et=>{const cn=((Vt,fn)=>{var mn,xn;if(!le){if(Vt)return null===(xn=Vt[fn])||void 0===xn?void 0:xn.bind(Vt);throw new g(`"${Ne}" plugin is not implemented on ${Ee}`,a.Unimplemented)}{const gn=le?.methods.find(Et=>fn===Et.name);if(gn)return"promise"===gn.rtype?Et=>te.nativePromise(Ne,fn.toString(),Et):(Et,cn)=>te.nativeCallback(Ne,fn.toString(),Et,cn);if(Vt)return null===(mn=Vt[fn])||void 0===mn?void 0:mn.bind(Vt)}})(Et,Vt);if(cn){const ft=cn(...xn);return fn=ft?.remove,ft}throw new g(`"${Ne}.${Vt}()" is not implemented on ${Ee}`,a.Unimplemented)});return"addListener"===Vt&&(gn.remove=(0,o.Z)(function*(){return fn()})),gn};return mn.toString=()=>`${Vt.toString()}() { [capacitor code] }`,Object.defineProperty(mn,"name",{value:Vt,writable:!1,configurable:!1}),mn},je=ye("addListener"),Ze=ye("removeListener"),_t=(Vt,fn)=>{const mn=je({eventName:Vt},fn),xn=function(){var Et=(0,o.Z)(function*(){const cn=yield mn;Ze({eventName:Vt,callbackId:cn},fn)});return function(){return Et.apply(this,arguments)}}(),gn=new Promise(Et=>mn.then(()=>Et({remove:xn})));return gn.remove=(0,o.Z)(function*(){console.warn("Using addListener() without 'await' is deprecated."),yield xn()}),gn},At=new Proxy({},{get(Vt,fn){switch(fn){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return le?_t:je;case"removeListener":return Ze;default:return ye(fn)}}});return ge[Ne]=At,se.set(Ne,{name:Ne,proxy:At,platforms:new Set([...Object.keys(_e),...le?[Ee]:[]])}),At},te.Exception=g,te.DEBUG=!!te.DEBUG,te.isLoggingEnabled=!!te.isLoggingEnabled,te},v=(ce=>ce.Capacitor=m(ce))(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),b=v.registerPlugin;class k{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(oe,te){var ge=this;let xe=!1;this.listeners[oe]||(this.listeners[oe]=[],xe=!0),this.listeners[oe].push(te);const Le=this.windowListeners[oe];Le&&!Le.registered&&this.addWindowListener(Le),xe&&this.sendRetainedArgumentsForEvent(oe);const Ce=function(){var se=(0,o.Z)(function*(){return ge.removeListener(oe,te)});return function(){return se.apply(this,arguments)}}();return Promise.resolve({remove:Ce})}removeAllListeners(){var oe=this;return(0,o.Z)(function*(){oe.listeners={};for(const te in oe.windowListeners)oe.removeWindowListener(oe.windowListeners[te]);oe.windowListeners={}})()}notifyListeners(oe,te,ge){const xe=this.listeners[oe];if(xe)xe.forEach(he=>he(te));else if(ge){let he=this.retainedEventArguments[oe];he||(he=[]),he.push(te),this.retainedEventArguments[oe]=he}}hasListeners(oe){var te;return!(null===(te=this.listeners[oe])||void 0===te||!te.length)}registerWindowListener(oe,te){this.windowListeners[te]={registered:!1,windowEventName:oe,pluginEventName:te,handler:ge=>{this.notifyListeners(te,ge)}}}unimplemented(oe="not implemented"){return new v.Exception(oe,a.Unimplemented)}unavailable(oe="not available"){return new v.Exception(oe,a.Unavailable)}removeListener(oe,te){var ge=this;return(0,o.Z)(function*(){const xe=ge.listeners[oe];if(!xe)return;const he=xe.indexOf(te);ge.listeners[oe].splice(he,1),ge.listeners[oe].length||ge.removeWindowListener(ge.windowListeners[oe])})()}addWindowListener(oe){window.addEventListener(oe.windowEventName,oe.handler),oe.registered=!0}removeWindowListener(oe){!oe||(window.removeEventListener(oe.windowEventName,oe.handler),oe.registered=!1)}sendRetainedArgumentsForEvent(oe){const te=this.retainedEventArguments[oe];!te||(delete this.retainedEventArguments[oe],te.forEach(ge=>{this.notifyListeners(oe,ge)}))}}const Y=ce=>encodeURIComponent(ce).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),I=ce=>ce.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class D extends k{getCookies(){return(0,o.Z)(function*(){const oe=document.cookie,te={};return oe.split(";").forEach(ge=>{if(ge.length<=0)return;let[xe,he]=ge.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");xe=I(xe).trim(),he=I(he).trim(),te[xe]=he}),te})()}setCookie(oe){return(0,o.Z)(function*(){try{const te=Y(oe.key),ge=Y(oe.value),xe=`; expires=${(oe.expires||"").replace("expires=","")}`,he=(oe.path||"/").replace("path=",""),Le=null!=oe.url&&oe.url.length>0?`domain=${oe.url}`:"";document.cookie=`${te}=${ge||""}${xe}; path=${he}; ${Le};`}catch(te){return Promise.reject(te)}})()}deleteCookie(oe){return(0,o.Z)(function*(){try{document.cookie=`${oe.key}=; Max-Age=0`}catch(te){return Promise.reject(te)}})()}clearCookies(){return(0,o.Z)(function*(){try{const oe=document.cookie.split(";")||[];for(const te of oe)document.cookie=te.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(oe){return Promise.reject(oe)}})()}clearAllCookies(){var oe=this;return(0,o.Z)(function*(){try{yield oe.clearCookies()}catch(te){return Promise.reject(te)}})()}}b("CapacitorCookies",{web:()=>new D});const W=function(){var ce=(0,o.Z)(function*(oe){return new Promise((te,ge)=>{const xe=new FileReader;xe.onload=()=>{const he=xe.result;te(he.indexOf(",")>=0?he.split(",")[1]:he)},xe.onerror=he=>ge(he),xe.readAsDataURL(oe)})});return function(te){return ce.apply(this,arguments)}}();class De extends k{request(oe){return(0,o.Z)(function*(){const te=((ce,oe={})=>{const te=Object.assign({method:ce.method||"GET",headers:ce.headers},oe),xe=((ce={})=>{const oe=Object.keys(ce);return Object.keys(ce).map(xe=>xe.toLocaleLowerCase()).reduce((xe,he,Le)=>(xe[he]=ce[oe[Le]],xe),{})})(ce.headers)["content-type"]||"";if("string"==typeof ce.data)te.body=ce.data;else if(xe.includes("application/x-www-form-urlencoded")){const he=new URLSearchParams;for(const[Le,Ce]of Object.entries(ce.data||{}))he.set(Le,Ce);te.body=he.toString()}else if(xe.includes("multipart/form-data")||ce.data instanceof FormData){const he=new FormData;if(ce.data instanceof FormData)ce.data.forEach((Ce,ie)=>{he.append(ie,Ce)});else for(const Ce of Object.keys(ce.data))he.append(Ce,ce.data[Ce]);te.body=he;const Le=new Headers(te.headers);Le.delete("content-type"),te.headers=Le}else(xe.includes("application/json")||"object"==typeof ce.data)&&(te.body=JSON.stringify(ce.data));return te})(oe,oe.webFetchExtra),ge=((ce,oe=!0)=>ce?Object.entries(ce).reduce((ge,xe)=>{const[he,Le]=xe;let Ce,ie;return Array.isArray(Le)?(ie="",Le.forEach(se=>{Ce=oe?encodeURIComponent(se):se,ie+=`${he}=${Ce}&`}),ie.slice(0,-1)):(Ce=oe?encodeURIComponent(Le):Le,ie=`${he}=${Ce}`),`${ge}&${ie}`},"").substr(1):null)(oe.params,oe.shouldEncodeUrlParams),xe=ge?`${oe.url}?${ge}`:oe.url,he=yield fetch(xe,te),Le=he.headers.get("content-type")||"";let ie,se,{responseType:Ce="text"}=he.ok?oe:{};switch(Le.includes("application/json")&&(Ce="json"),Ce){case"arraybuffer":case"blob":se=yield he.blob(),ie=yield W(se);break;case"json":ie=yield he.json();break;default:ie=yield he.text()}const me={};return he.headers.forEach((Ne,_e)=>{me[_e]=Ne}),{data:ie,headers:me,status:he.status,url:he.url}})()}get(oe){var te=this;return(0,o.Z)(function*(){return te.request(Object.assign(Object.assign({},oe),{method:"GET"}))})()}post(oe){var te=this;return(0,o.Z)(function*(){return te.request(Object.assign(Object.assign({},oe),{method:"POST"}))})()}put(oe){var te=this;return(0,o.Z)(function*(){return te.request(Object.assign(Object.assign({},oe),{method:"PUT"}))})()}patch(oe){var te=this;return(0,o.Z)(function*(){return te.request(Object.assign(Object.assign({},oe),{method:"PATCH"}))})()}delete(oe){var te=this;return(0,o.Z)(function*(){return te.request(Object.assign(Object.assign({},oe),{method:"DELETE"}))})()}}const Te=b("CapacitorHttp",{web:()=>new De})},45670:(Ge,$,f)=>{f.d($,{Z:()=>a});const a=(0,f(47423).fo)("Network",{web:()=>f.e(4203).then(f.bind(f,54203)).then(g=>new g.NetworkWeb)})},53509:(Ge,$,f)=>{f.d($,{M:()=>a});const a=(0,f(47423).fo)("EdgeToEdge",{})},52671:(Ge,$,f)=>{f.d($,{F:()=>o});var o=(()=>{return(a=o||(o={})).LANDSCAPE="landscape",a.LANDSCAPE_PRIMARY="landscape-primary",a.LANDSCAPE_SECONDARY="landscape-secondary",a.PORTRAIT="portrait",a.PORTRAIT_PRIMARY="portrait-primary",a.PORTRAIT_SECONDARY="portrait-secondary",o;var a})()},90603:(Ge,$,f)=>{f.r($),f.d($,{ActionSheetController:()=>Xt,AlertController:()=>qt,AngularDelegate:()=>Sr,AnimationController:()=>y,BooleanValueAccessor:()=>fn,Config:()=>va,DomController:()=>fo,GestureController:()=>G,IonAccordion:()=>or,IonAccordionGroup:()=>Cr,IonApp:()=>wr,IonAvatar:()=>dr,IonBackButton:()=>er,IonBackButtonDelegate:()=>lt,IonBackdrop:()=>Jn,IonBadge:()=>Er,IonBreadcrumb:()=>lo,IonBreadcrumbs:()=>Gr,IonButton:()=>Qn,IonButtons:()=>Pr,IonCard:()=>jr,IonCardContent:()=>Nr,IonCardHeader:()=>go,IonCardSubtitle:()=>Zr,IonCardTitle:()=>ro,IonCheckbox:()=>mo,IonChip:()=>ki,IonCol:()=>Yo,IonContent:()=>Ko,IonDatetime:()=>wo,IonDatetimeButton:()=>$r,IonFab:()=>hi,IonFabButton:()=>mi,IonFabList:()=>vn,IonFooter:()=>Eo,IonGrid:()=>Ur,IonHeader:()=>vo,IonIcon:()=>br,IonImg:()=>Zn,IonInfiniteScroll:()=>uo,IonInfiniteScrollContent:()=>fr,IonInput:()=>Vo,IonItem:()=>Fo,IonItemDivider:()=>_i,IonItemGroup:()=>xr,IonItemOption:()=>It,IonItemOptions:()=>ut,IonItemSliding:()=>nt,IonLabel:()=>Ot,IonList:()=>Zt,IonListHeader:()=>jn,IonMenu:()=>ct,IonMenuButton:()=>xt,IonMenuToggle:()=>rt,IonModal:()=>bt,IonNav:()=>Yt,IonNavLink:()=>$t,IonNote:()=>Wt,IonPopover:()=>mt,IonProgressBar:()=>dn,IonRadio:()=>un,IonRadioGroup:()=>Pn,IonRange:()=>On,IonRefresher:()=>In,IonRefresherContent:()=>Fn,IonReorder:()=>Hr,IonReorderGroup:()=>xo,IonRippleEffect:()=>yo,IonRouterOutlet:()=>Wi,IonRow:()=>Ho,IonSearchbar:()=>io,IonSegment:()=>Mo,IonSegmentButton:()=>bi,IonSelect:()=>Zi,IonSelectOption:()=>tr,IonSkeletonText:()=>Po,IonSlide:()=>We,IonSlides:()=>ot,IonSpinner:()=>Pt,IonSplitPane:()=>zt,IonTabBar:()=>Qt,IonTabButton:()=>qe,IonTabs:()=>fe,IonText:()=>wt,IonTextarea:()=>Ht,IonThumbnail:()=>Kt,IonTitle:()=>on,IonToggle:()=>Mn,IonToolbar:()=>Yn,IonVirtualScroll:()=>Xe,IonicModule:()=>Rr,IonicRouteStrategy:()=>Je,IonicSafeString:()=>W.I,IonicSlides:()=>ge,IonicSwiper:()=>te,LoadingController:()=>Sn,MenuController:()=>Wn,ModalController:()=>hr,NavController:()=>Xo,NavDelegate:()=>P,NavParams:()=>Hn,NumericValueAccessor:()=>mn,PickerController:()=>Un,Platform:()=>ii,PopoverController:()=>Ar,RadioValueAccessor:()=>xn,RouterLinkDelegate:()=>Q,RouterLinkWithHrefDelegate:()=>Pe,SelectValueAccessor:()=>gn,TextValueAccessor:()=>Et,ToastController:()=>eo,VirtualFooter:()=>Ve,VirtualHeader:()=>Z,VirtualItem:()=>re,createAnimation:()=>b.c,createGesture:()=>I.createGesture,getPlatforms:()=>D.g,getTimeGivenProgression:()=>Y.g,iosTransitionAnimation:()=>k.iosTransitionAnimation,isPlatform:()=>D.a,mdTransitionAnimation:()=>F.mdTransitionAnimation});var o=f(45449),a=f(24006),g=f(97582),h=f(23753),m=f(8929),L=f(591),v=f(61380),b=f(90181),k=f(66439),F=f(87838),Y=f(32225),I=f(81898),D=f(35179),j=f(35730),W=f(15820),de=f(1843),K=f(56369),ee=f(63539),ce=(f(13457),f(34349),f(71308));const oe=(A,X=!0)=>{if(typeof window>"u")return;const _=A.el,T=_.closest(".ion-page");if(!T){if(X){const Lt=_.getRootNode();if("DIV"===Lt.tagName){const an=new MutationObserver(nr=>{const Io=null===nr[0].oldValue,Lo=Lt.classList.contains("ion-page");Io&&Lo&&(an.disconnect(),oe(A,!1))});an.observe(Lt,{attributeFilter:["class"],attributeOldValue:!0})}}return}const O=_.closest("ion-modal, ion-popover");if(O){const Lt="ION-MODAL"===O.tagName?"ionModalWillPresent":"ionPopoverWillPresent",an=()=>{(0,j.r)(()=>{_.swiper.update(),(0,j.b)(O,Lt,an)})};(0,j.a)(O,Lt,an)}else new MutationObserver(an=>{var nr;const Io=null===(nr=an[0].oldValue)||void 0===nr?void 0:nr.includes("ion-page-invisible"),Lo=T.classList.contains("ion-page-invisible");!Lo&&Lo!==Io&&_.swiper.update()}).observe(T,{attributeFilter:["class"],attributeOldValue:!0});const ve=()=>{_.swiper.update(),(0,j.b)(window,"appload",ve)};(0,j.a)(window,"appload",ve)},te={name:"ionic",on:{afterInit(A){console.warn("[Deprecation Warning]: The IonicSwiper module has been deprecated in favor of the IonSlides module. This change was made to better support the Swiper 7 release. The IonicSwiper module will be removed in Ionic 7.0. See https://ionicframework.com/docs/api/slides#migration for revised migration steps."),oe(A)}}},ge=A=>{const{swiper:X,extendParams:_}=A,T={effect:void 0,direction:"horizontal",initialSlide:0,loop:!1,parallax:!1,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,zoom:{maxRatio:3,minRatio:1,toggle:!1},touchRatio:1,touchAngle:45,simulateTouch:!0,touchStartPreventDefault:!1,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loopAdditionalSlides:0,noSwiping:!0,runCallbacksOnInit:!0,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flipEffect:{slideShadows:!0,limitRotation:!0},cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:!1},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};X.pagination&&(T.pagination={type:"bullets",clickable:!1,hideOnClick:!1}),X.scrollbar&&(T.scrollbar={hide:!0}),_(T)};var xe=f(92198),he=f(87545),Le=f(75778),Ce=f(90944);const se=D.i,_e=["*"],we=["outlet"],Ee=[[["","slot","top"]],"*"],le=["[slot=top]","*"];function Ue(A,X){if(1&A&&(o.\u0275\u0275elementStart(0,"div",1),o.\u0275\u0275elementContainer(1,2),o.\u0275\u0275elementEnd()),2&A){const _=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngTemplateOutlet",_.template)}}function ke(A,X){if(1&A&&o.\u0275\u0275elementContainer(0,1),2&A){const _=o.\u0275\u0275nextContext();o.\u0275\u0275property("ngTemplateOutlet",_.template)}}const ze=A=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(A):"function"==typeof requestAnimationFrame?requestAnimationFrame(A):setTimeout(A),ye=A=>!!A.resolveComponentFactory;let je=(()=>{class A{constructor(_,T){this.injector=_,this.el=T,this.onChange=()=>{},this.onTouched=()=>{}}writeValue(_){this.el.nativeElement.value=this.lastValue=_??"",Ze(this.el)}handleChangeEvent(_,T){_===this.el.nativeElement&&(T!==this.lastValue&&(this.lastValue=T,this.onChange(T)),Ze(this.el))}_handleBlurEvent(_){_===this.el.nativeElement&&(this.onTouched(),Ze(this.el))}registerOnChange(_){this.onChange=_}registerOnTouched(_){this.onTouched=_}setDisabledState(_){this.el.nativeElement.disabled=_}ngOnDestroy(){this.statusChanges&&this.statusChanges.unsubscribe()}ngAfterViewInit(){let _;try{_=this.injector.get(a.NgControl)}catch{}if(!_)return;_.statusChanges&&(this.statusChanges=_.statusChanges.subscribe(()=>Ze(this.el)));const T=_.control;T&&["markAsTouched","markAllAsTouched","markAsUntouched","markAsDirty","markAsPristine"].forEach(ve=>{if(typeof T[ve]<"u"){const Lt=T[ve].bind(T);T[ve]=(...an)=>{Lt(...an),Ze(this.el)}}})}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.Injector),o.\u0275\u0275directiveInject(o.ElementRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("ionBlur",function(ve){return T._handleBlurEvent(ve.target)})}}),A})();const Ze=A=>{ze(()=>{const X=A.nativeElement,_=null!=X.value&&X.value.toString().length>0,T=_t(X);At(X,T);const O=X.closest("ion-item");O&&At(O,_?[...T,"item-has-value"]:T)})},_t=A=>{const X=A.classList,_=[];for(let T=0;T{const _=A.classList;_.remove("ion-valid","ion-invalid","ion-touched","ion-untouched","ion-dirty","ion-pristine"),_.add(...X)},Vt=(A,X)=>A.substring(0,X.length)===X;let fn=(()=>{class A extends je{constructor(_,T){super(_,T)}writeValue(_){this.el.nativeElement.checked=this.lastValue=_??!1,Ze(this.el)}_handleIonChange(_){this.handleChangeEvent(_,_.checked)}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.Injector),o.\u0275\u0275directiveInject(o.ElementRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["ion-checkbox"],["ion-toggle"]],hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("ionChange",function(ve){return T._handleIonChange(ve.target)})},features:[o.\u0275\u0275ProvidersFeature([{provide:a.NG_VALUE_ACCESSOR,useExisting:A,multi:!0}]),o.\u0275\u0275InheritDefinitionFeature]}),A})(),mn=(()=>{class A extends je{constructor(_,T){super(_,T)}_handleIonChange(_){this.handleChangeEvent(_,_.value)}registerOnChange(_){super.registerOnChange(T=>{_(""===T?null:parseFloat(T))})}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.Injector),o.\u0275\u0275directiveInject(o.ElementRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["ion-input","type","number"]],hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("ionChange",function(ve){return T._handleIonChange(ve.target)})},features:[o.\u0275\u0275ProvidersFeature([{provide:a.NG_VALUE_ACCESSOR,useExisting:A,multi:!0}]),o.\u0275\u0275InheritDefinitionFeature]}),A})(),xn=(()=>{class A extends je{constructor(_,T){super(_,T)}_handleIonSelect(_){this.handleChangeEvent(_,_.checked)}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.Injector),o.\u0275\u0275directiveInject(o.ElementRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["ion-radio"]],hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("ionSelect",function(ve){return T._handleIonSelect(ve.target)})},features:[o.\u0275\u0275ProvidersFeature([{provide:a.NG_VALUE_ACCESSOR,useExisting:A,multi:!0}]),o.\u0275\u0275InheritDefinitionFeature]}),A})(),gn=(()=>{class A extends je{constructor(_,T){super(_,T)}_handleChangeEvent(_){this.handleChangeEvent(_,_.value)}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.Injector),o.\u0275\u0275directiveInject(o.ElementRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["ion-range"],["ion-select"],["ion-radio-group"],["ion-segment"],["ion-datetime"]],hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("ionChange",function(ve){return T._handleChangeEvent(ve.target)})},features:[o.\u0275\u0275ProvidersFeature([{provide:a.NG_VALUE_ACCESSOR,useExisting:A,multi:!0}]),o.\u0275\u0275InheritDefinitionFeature]}),A})(),Et=(()=>{class A extends je{constructor(_,T){super(_,T)}_handleInputEvent(_){this.handleChangeEvent(_,_.value)}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.Injector),o.\u0275\u0275directiveInject(o.ElementRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["ion-input",3,"type","number"],["ion-textarea"],["ion-searchbar"]],hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("ionChange",function(ve){return T._handleInputEvent(ve.target)})},features:[o.\u0275\u0275ProvidersFeature([{provide:a.NG_VALUE_ACCESSOR,useExisting:A,multi:!0}]),o.\u0275\u0275InheritDefinitionFeature]}),A})();const cn=(A,X)=>{const _=A.prototype;X.forEach(T=>{Object.defineProperty(_,T,{get(){return this.el[T]},set(O){this.z.runOutsideAngular(()=>this.el[T]=O)}})})},ft=(A,X)=>{const _=A.prototype;X.forEach(T=>{_[T]=function(){const O=arguments;return this.z.runOutsideAngular(()=>this.el[T].apply(this.el,O))}})},Tt=(A,X,_)=>{_.forEach(T=>A[T]=(0,h.R)(X,T))};function Gt(A){return function(_){const{defineCustomElementFn:T,inputs:O,methods:ve}=A;return void 0!==T&&T(),O&&cn(_,O),ve&&ft(_,ve),_}}let or=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-accordion"]],inputs:{disabled:"disabled",mode:"mode",readonly:"readonly",toggleIcon:"toggleIcon",toggleIconSlot:"toggleIconSlot",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["disabled","mode","readonly","toggleIcon","toggleIconSlot","value"]})],A),A})(),Cr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionChange"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-accordion-group"]],inputs:{animated:"animated",disabled:"disabled",expand:"expand",mode:"mode",multiple:"multiple",readonly:"readonly",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["animated","disabled","expand","mode","multiple","readonly","value"]})],A),A})(),wr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-app"]],ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0})],A),A})(),dr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-avatar"]],ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0})],A),A})(),er=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-back-button"]],inputs:{color:"color",defaultHref:"defaultHref",disabled:"disabled",icon:"icon",mode:"mode",routerAnimation:"routerAnimation",text:"text",type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","defaultHref","disabled","icon","mode","routerAnimation","text","type"]})],A),A})(),Jn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionBackdropTap"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-backdrop"]],inputs:{stopPropagation:"stopPropagation",tappable:"tappable",visible:"visible"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["stopPropagation","tappable","visible"]})],A),A})(),Er=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-badge"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode"]})],A),A})(),lo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionFocus","ionBlur"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-breadcrumb"]],inputs:{active:"active",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",separator:"separator",target:"target"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["active","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","separator","target"]})],A),A})(),Gr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionCollapsedClick"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-breadcrumbs"]],inputs:{color:"color",itemsAfterCollapse:"itemsAfterCollapse",itemsBeforeCollapse:"itemsBeforeCollapse",maxItems:"maxItems",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","itemsAfterCollapse","itemsBeforeCollapse","maxItems","mode"]})],A),A})(),Qn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionFocus","ionBlur"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-button"]],inputs:{buttonType:"buttonType",color:"color",disabled:"disabled",download:"download",expand:"expand",fill:"fill",form:"form",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",size:"size",strong:"strong",target:"target",type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["buttonType","color","disabled","download","expand","fill","form","href","mode","rel","routerAnimation","routerDirection","shape","size","strong","target","type"]})],A),A})(),Pr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-buttons"]],inputs:{collapse:"collapse"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["collapse"]})],A),A})(),jr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-card"]],inputs:{button:"button",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",target:"target",type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["button","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","target","type"]})],A),A})(),Nr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-card-content"]],inputs:{mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["mode"]})],A),A})(),go=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-card-header"]],inputs:{color:"color",mode:"mode",translucent:"translucent"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode","translucent"]})],A),A})(),Zr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-card-subtitle"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode"]})],A),A})(),ro=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-card-title"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode"]})],A),A})(),mo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionChange","ionFocus","ionBlur"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-checkbox"]],inputs:{checked:"checked",color:"color",disabled:"disabled",indeterminate:"indeterminate",mode:"mode",name:"name",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["checked","color","disabled","indeterminate","mode","name","value"]})],A),A})(),ki=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-chip"]],inputs:{color:"color",disabled:"disabled",mode:"mode",outline:"outline"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","disabled","mode","outline"]})],A),A})(),Yo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-col"]],inputs:{offset:"offset",offsetLg:"offsetLg",offsetMd:"offsetMd",offsetSm:"offsetSm",offsetXl:"offsetXl",offsetXs:"offsetXs",pull:"pull",pullLg:"pullLg",pullMd:"pullMd",pullSm:"pullSm",pullXl:"pullXl",pullXs:"pullXs",push:"push",pushLg:"pushLg",pushMd:"pushMd",pushSm:"pushSm",pushXl:"pushXl",pushXs:"pushXs",size:"size",sizeLg:"sizeLg",sizeMd:"sizeMd",sizeSm:"sizeSm",sizeXl:"sizeXl",sizeXs:"sizeXs"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["offset","offsetLg","offsetMd","offsetSm","offsetXl","offsetXs","pull","pullLg","pullMd","pullSm","pullXl","pullXs","push","pushLg","pushMd","pushSm","pushXl","pushXs","size","sizeLg","sizeMd","sizeSm","sizeXl","sizeXs"]})],A),A})(),Ko=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionScrollStart","ionScroll","ionScrollEnd"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-content"]],inputs:{color:"color",forceOverscroll:"forceOverscroll",fullscreen:"fullscreen",scrollEvents:"scrollEvents",scrollX:"scrollX",scrollY:"scrollY"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","forceOverscroll","fullscreen","scrollEvents","scrollX","scrollY"],methods:["getScrollElement","scrollToTop","scrollToBottom","scrollByPoint","scrollToPoint"]})],A),A})(),wo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionCancel","ionChange","ionFocus","ionBlur"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-datetime"]],inputs:{cancelText:"cancelText",clearText:"clearText",color:"color",dayValues:"dayValues",disabled:"disabled",doneText:"doneText",firstDayOfWeek:"firstDayOfWeek",highlightedDates:"highlightedDates",hourCycle:"hourCycle",hourValues:"hourValues",isDateEnabled:"isDateEnabled",locale:"locale",max:"max",min:"min",minuteValues:"minuteValues",mode:"mode",monthValues:"monthValues",multiple:"multiple",name:"name",preferWheel:"preferWheel",presentation:"presentation",readonly:"readonly",showClearButton:"showClearButton",showDefaultButtons:"showDefaultButtons",showDefaultTimeLabel:"showDefaultTimeLabel",showDefaultTitle:"showDefaultTitle",size:"size",titleSelectedDatesFormatter:"titleSelectedDatesFormatter",value:"value",yearValues:"yearValues"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["cancelText","clearText","color","dayValues","disabled","doneText","firstDayOfWeek","highlightedDates","hourCycle","hourValues","isDateEnabled","locale","max","min","minuteValues","mode","monthValues","multiple","name","preferWheel","presentation","readonly","showClearButton","showDefaultButtons","showDefaultTimeLabel","showDefaultTitle","size","titleSelectedDatesFormatter","value","yearValues"],methods:["confirm","reset","cancel"]})],A),A})(),$r=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-datetime-button"]],inputs:{color:"color",datetime:"datetime",disabled:"disabled",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","datetime","disabled","mode"]})],A),A})(),hi=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-fab"]],inputs:{activated:"activated",edge:"edge",horizontal:"horizontal",vertical:"vertical"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["activated","edge","horizontal","vertical"],methods:["close"]})],A),A})(),mi=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionFocus","ionBlur"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-fab-button"]],inputs:{activated:"activated",closeIcon:"closeIcon",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",show:"show",size:"size",target:"target",translucent:"translucent",type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["activated","closeIcon","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","show","size","target","translucent","type"]})],A),A})(),vn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-fab-list"]],inputs:{activated:"activated",side:"side"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["activated","side"]})],A),A})(),Eo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-footer"]],inputs:{collapse:"collapse",mode:"mode",translucent:"translucent"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["collapse","mode","translucent"]})],A),A})(),Ur=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-grid"]],inputs:{fixed:"fixed"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["fixed"]})],A),A})(),vo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-header"]],inputs:{collapse:"collapse",mode:"mode",translucent:"translucent"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["collapse","mode","translucent"]})],A),A})(),br=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-icon"]],inputs:{color:"color",flipRtl:"flipRtl",icon:"icon",ios:"ios",lazy:"lazy",md:"md",mode:"mode",name:"name",sanitize:"sanitize",size:"size",src:"src"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","flipRtl","icon","ios","lazy","md","mode","name","sanitize","size","src"]})],A),A})(),Zn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionImgWillLoad","ionImgDidLoad","ionError"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-img"]],inputs:{alt:"alt",src:"src"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["alt","src"]})],A),A})(),uo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionInfinite"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-infinite-scroll"]],inputs:{disabled:"disabled",position:"position",threshold:"threshold"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["disabled","position","threshold"],methods:["complete"]})],A),A})(),fr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-infinite-scroll-content"]],inputs:{loadingSpinner:"loadingSpinner",loadingText:"loadingText"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["loadingSpinner","loadingText"]})],A),A})(),Vo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionInput","ionChange","ionBlur","ionFocus"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-input"]],inputs:{accept:"accept",autocapitalize:"autocapitalize",autocomplete:"autocomplete",autocorrect:"autocorrect",autofocus:"autofocus",clearInput:"clearInput",clearOnEdit:"clearOnEdit",color:"color",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",max:"max",maxlength:"maxlength",min:"min",minlength:"minlength",mode:"mode",multiple:"multiple",name:"name",pattern:"pattern",placeholder:"placeholder",readonly:"readonly",required:"required",size:"size",spellcheck:"spellcheck",step:"step",type:"type",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["accept","autocapitalize","autocomplete","autocorrect","autofocus","clearInput","clearOnEdit","color","debounce","disabled","enterkeyhint","inputmode","max","maxlength","min","minlength","mode","multiple","name","pattern","placeholder","readonly","required","size","spellcheck","step","type","value"],methods:["setFocus","getInputElement"]})],A),A})(),Fo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-item"]],inputs:{button:"button",color:"color",counter:"counter",counterFormatter:"counterFormatter",detail:"detail",detailIcon:"detailIcon",disabled:"disabled",download:"download",fill:"fill",href:"href",lines:"lines",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",target:"target",type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["button","color","counter","counterFormatter","detail","detailIcon","disabled","download","fill","href","lines","mode","rel","routerAnimation","routerDirection","shape","target","type"]})],A),A})(),_i=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-item-divider"]],inputs:{color:"color",mode:"mode",sticky:"sticky"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode","sticky"]})],A),A})(),xr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-item-group"]],ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0})],A),A})(),It=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-item-option"]],inputs:{color:"color",disabled:"disabled",download:"download",expandable:"expandable",href:"href",mode:"mode",rel:"rel",target:"target",type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","disabled","download","expandable","href","mode","rel","target","type"]})],A),A})(),ut=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionSwipe"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-item-options"]],inputs:{side:"side"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["side"]})],A),A})(),nt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionDrag"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-item-sliding"]],inputs:{disabled:"disabled"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["disabled"],methods:["getOpenAmount","getSlidingRatio","open","close","closeOpened"]})],A),A})(),Ot=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-label"]],inputs:{color:"color",mode:"mode",position:"position"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode","position"]})],A),A})(),Zt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-list"]],inputs:{inset:"inset",lines:"lines",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["inset","lines","mode"],methods:["closeSlidingItems"]})],A),A})(),jn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-list-header"]],inputs:{color:"color",lines:"lines",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","lines","mode"]})],A),A})(),ct=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionWillOpen","ionWillClose","ionDidOpen","ionDidClose"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-menu"]],inputs:{contentId:"contentId",disabled:"disabled",maxEdgeStart:"maxEdgeStart",menuId:"menuId",side:"side",swipeGesture:"swipeGesture",type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["contentId","disabled","maxEdgeStart","menuId","side","swipeGesture","type"],methods:["isOpen","isActive","open","close","toggle","setOpen"]})],A),A})(),xt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-menu-button"]],inputs:{autoHide:"autoHide",color:"color",disabled:"disabled",menu:"menu",mode:"mode",type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["autoHide","color","disabled","menu","mode","type"]})],A),A})(),rt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-menu-toggle"]],inputs:{autoHide:"autoHide",menu:"menu"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["autoHide","menu"]})],A),A})(),Yt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionNavWillChange","ionNavDidChange"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-nav"]],inputs:{animated:"animated",animation:"animation",root:"root",rootParams:"rootParams",swipeGesture:"swipeGesture"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["animated","animation","root","rootParams","swipeGesture"],methods:["push","insert","insertPages","pop","popTo","popToRoot","removeIndex","setRoot","setPages","getActive","getByIndex","canGoBack","getPrevious"]})],A),A})(),$t=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-nav-link"]],inputs:{component:"component",componentProps:"componentProps",routerAnimation:"routerAnimation",routerDirection:"routerDirection"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["component","componentProps","routerAnimation","routerDirection"]})],A),A})(),Wt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-note"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode"]})],A),A})(),dn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-progress-bar"]],inputs:{buffer:"buffer",color:"color",mode:"mode",reversed:"reversed",type:"type",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["buffer","color","mode","reversed","type","value"]})],A),A})(),un=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionFocus","ionBlur"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-radio"]],inputs:{color:"color",disabled:"disabled",mode:"mode",name:"name",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","disabled","mode","name","value"]})],A),A})(),Pn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionChange"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-radio-group"]],inputs:{allowEmptySelection:"allowEmptySelection",name:"name",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["allowEmptySelection","name","value"]})],A),A})(),On=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionChange","ionFocus","ionBlur","ionKnobMoveStart","ionKnobMoveEnd"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-range"]],inputs:{activeBarStart:"activeBarStart",color:"color",debounce:"debounce",disabled:"disabled",dualKnobs:"dualKnobs",max:"max",min:"min",mode:"mode",name:"name",pin:"pin",pinFormatter:"pinFormatter",snaps:"snaps",step:"step",ticks:"ticks",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["activeBarStart","color","debounce","disabled","dualKnobs","max","min","mode","name","pin","pinFormatter","snaps","step","ticks","value"]})],A),A})(),In=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionRefresh","ionPull","ionStart"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-refresher"]],inputs:{closeDuration:"closeDuration",disabled:"disabled",pullFactor:"pullFactor",pullMax:"pullMax",pullMin:"pullMin",snapbackDuration:"snapbackDuration"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["closeDuration","disabled","pullFactor","pullMax","pullMin","snapbackDuration"],methods:["complete","cancel","getProgress"]})],A),A})(),Fn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-refresher-content"]],inputs:{pullingIcon:"pullingIcon",pullingText:"pullingText",refreshingSpinner:"refreshingSpinner",refreshingText:"refreshingText"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["pullingIcon","pullingText","refreshingSpinner","refreshingText"]})],A),A})(),Hr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-reorder"]],ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0})],A),A})(),xo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionItemReorder"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-reorder-group"]],inputs:{disabled:"disabled"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["disabled"],methods:["complete"]})],A),A})(),yo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-ripple-effect"]],inputs:{type:"type"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["type"],methods:["addRipple"]})],A),A})(),Ho=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-row"]],ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0})],A),A})(),io=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionInput","ionChange","ionCancel","ionClear","ionBlur","ionFocus"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-searchbar"]],inputs:{animated:"animated",autocomplete:"autocomplete",autocorrect:"autocorrect",cancelButtonIcon:"cancelButtonIcon",cancelButtonText:"cancelButtonText",clearIcon:"clearIcon",color:"color",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",mode:"mode",placeholder:"placeholder",searchIcon:"searchIcon",showCancelButton:"showCancelButton",showClearButton:"showClearButton",spellcheck:"spellcheck",type:"type",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["animated","autocomplete","autocorrect","cancelButtonIcon","cancelButtonText","clearIcon","color","debounce","disabled","enterkeyhint","inputmode","mode","placeholder","searchIcon","showCancelButton","showClearButton","spellcheck","type","value"],methods:["setFocus","getInputElement"]})],A),A})(),Mo=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionChange"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-segment"]],inputs:{color:"color",disabled:"disabled",mode:"mode",scrollable:"scrollable",selectOnFocus:"selectOnFocus",swipeGesture:"swipeGesture",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","disabled","mode","scrollable","selectOnFocus","swipeGesture","value"]})],A),A})(),bi=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-segment-button"]],inputs:{disabled:"disabled",layout:"layout",mode:"mode",type:"type",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["disabled","layout","mode","type","value"]})],A),A})(),Zi=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionChange","ionCancel","ionDismiss","ionFocus","ionBlur"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-select"]],inputs:{cancelText:"cancelText",compareWith:"compareWith",disabled:"disabled",interface:"interface",interfaceOptions:"interfaceOptions",mode:"mode",multiple:"multiple",name:"name",okText:"okText",placeholder:"placeholder",selectedText:"selectedText",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["cancelText","compareWith","disabled","interface","interfaceOptions","mode","multiple","name","okText","placeholder","selectedText","value"],methods:["open"]})],A),A})(),tr=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-select-option"]],inputs:{disabled:"disabled",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["disabled","value"]})],A),A})(),Po=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-skeleton-text"]],inputs:{animated:"animated"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["animated"]})],A),A})(),We=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-slide"]],ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0})],A),A})(),ot=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionSlidesDidLoad","ionSlideTap","ionSlideDoubleTap","ionSlideWillChange","ionSlideDidChange","ionSlideNextStart","ionSlidePrevStart","ionSlideNextEnd","ionSlidePrevEnd","ionSlideTransitionStart","ionSlideTransitionEnd","ionSlideDrag","ionSlideReachStart","ionSlideReachEnd","ionSlideTouchStart","ionSlideTouchEnd"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-slides"]],inputs:{mode:"mode",options:"options",pager:"pager",scrollbar:"scrollbar"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["mode","options","pager","scrollbar"],methods:["update","updateAutoHeight","slideTo","slideNext","slidePrev","getActiveIndex","getPreviousIndex","length","isEnd","isBeginning","startAutoplay","stopAutoplay","lockSwipeToNext","lockSwipeToPrev","lockSwipes","getSwiper"]})],A),A})(),Pt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-spinner"]],inputs:{color:"color",duration:"duration",name:"name",paused:"paused"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","duration","name","paused"]})],A),A})(),zt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionSplitPaneVisible"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-split-pane"]],inputs:{contentId:"contentId",disabled:"disabled",when:"when"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["contentId","disabled","when"]})],A),A})(),Qt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-tab-bar"]],inputs:{color:"color",mode:"mode",selectedTab:"selectedTab",translucent:"translucent"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode","selectedTab","translucent"]})],A),A})(),qe=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-tab-button"]],inputs:{disabled:"disabled",download:"download",href:"href",layout:"layout",mode:"mode",rel:"rel",selected:"selected",tab:"tab",target:"target"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["disabled","download","href","layout","mode","rel","selected","tab","target"]})],A),A})(),wt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-text"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode"]})],A),A})(),Ht=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionChange","ionInput","ionBlur","ionFocus"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-textarea"]],inputs:{autoGrow:"autoGrow",autocapitalize:"autocapitalize",autofocus:"autofocus",clearOnEdit:"clearOnEdit",color:"color",cols:"cols",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",maxlength:"maxlength",minlength:"minlength",mode:"mode",name:"name",placeholder:"placeholder",readonly:"readonly",required:"required",rows:"rows",spellcheck:"spellcheck",value:"value",wrap:"wrap"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["autoGrow","autocapitalize","autofocus","clearOnEdit","color","cols","debounce","disabled","enterkeyhint","inputmode","maxlength","minlength","mode","name","placeholder","readonly","required","rows","spellcheck","value","wrap"],methods:["setFocus","getInputElement"]})],A),A})(),Kt=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-thumbnail"]],ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0})],A),A})(),on=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-title"]],inputs:{color:"color",size:"size"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","size"]})],A),A})(),Mn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement,Tt(this,this.el,["ionChange","ionFocus","ionBlur"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-toggle"]],inputs:{checked:"checked",color:"color",disabled:"disabled",enableOnOffLabels:"enableOnOffLabels",mode:"mode",name:"name",value:"value"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["checked","color","disabled","enableOnOffLabels","mode","name","value"]})],A),A})(),Yn=(()=>{let A=class{constructor(_,T,O){this.z=O,_.detach(),this.el=T.nativeElement}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-toolbar"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({defineCustomElementFn:void 0,inputs:["color","mode"]})],A),A})();class Hn{constructor(X={}){this.data=X}get(X){return this.data[X]}}let Sr=(()=>{class A{constructor(_,T){this.zone=_,this.appRef=T}create(_,T,O,ve){return new Co(_,T,O,this.appRef,this.zone,ve)}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275inject(o.NgZone),o.\u0275\u0275inject(o.ApplicationRef))},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac}),A})();class Co{constructor(X,_,T,O,ve,Lt){this.resolverOrInjector=X,this.injector=_,this.location=T,this.appRef=O,this.zone=ve,this.elementReferenceKey=Lt,this.elRefMap=new WeakMap,this.elEventsMap=new WeakMap}attachViewToDom(X,_,T,O){return this.zone.run(()=>new Promise(ve=>{const Lt=Object.assign({},T);void 0!==this.elementReferenceKey&&(Lt[this.elementReferenceKey]=X),ve(bo(this.zone,this.resolverOrInjector,this.injector,this.location,this.appRef,this.elRefMap,this.elEventsMap,X,_,Lt,O))}))}removeViewFromDom(X,_){return this.zone.run(()=>new Promise(T=>{const O=this.elRefMap.get(_);if(O){O.destroy(),this.elRefMap.delete(_);const ve=this.elEventsMap.get(_);ve&&(ve(),this.elEventsMap.delete(_))}T()}))}}const bo=(A,X,_,T,O,ve,Lt,an,nr,Kr,Io)=>{let Lo;const Ui=o.Injector.create({providers:Qr(Kr),parent:_});if(X&&ye(X)){const bs=X.resolveComponentFactory(nr);Lo=T?T.createComponent(bs,T.length,Ui):bs.create(Ui)}else{if(!T)return null;Lo=T.createComponent(nr,{index:T.indexOf,injector:Ui,environmentInjector:X})}const Ma=Lo.instance,oo=Lo.location.nativeElement;if(Kr&&Object.assign(Ma,Kr),Io)for(const bs of Io)oo.classList.add(bs);const As=gi(A,Ma,oo);return an.appendChild(oo),T||O.attachView(Lo.hostView),Lo.changeDetectorRef.reattach(),ve.set(oo,Lo),Lt.set(oo,As),oo},Jr=[de.L,de.a,de.b,de.c,de.d],gi=(A,X,_)=>A.run(()=>{const T=Jr.filter(O=>"function"==typeof X[O]).map(O=>{const ve=Lt=>X[O](Lt.detail);return _.addEventListener(O,ve),()=>_.removeEventListener(O,ve)});return()=>T.forEach(O=>O())}),Ri=new o.InjectionToken("NavParamsToken"),Qr=A=>[{provide:Ri,useValue:A},{provide:Hn,useFactory:Bo,deps:[Ri]}],Bo=A=>new Hn(A),Di=(A,X)=>((A=A.filter(_=>_.stackId!==X.stackId)).push(X),A),ci=(A,X)=>{const _=A.createUrlTree(["."],{relativeTo:X});return A.serializeUrl(_)},sa=(A,X)=>{if(!A)return;const _=qo(X);for(let T=0;T<_.length;T++){if(T>=A.length)return _[T];if(_[T]!==A[T])return}},qo=A=>A.split("/").map(X=>X.trim()).filter(X=>""!==X),Li=A=>{A&&(A.ref.destroy(),A.unlistenEvents())};class qr{constructor(X,_,T,O,ve,Lt){this.containerEl=_,this.router=T,this.navCtrl=O,this.zone=ve,this.location=Lt,this.views=[],this.skipTransition=!1,this.nextId=0,this.tabsPrefix=void 0!==X?qo(X):void 0}createView(X,_){var T;const O=ci(this.router,_),ve=null===(T=X?.location)||void 0===T?void 0:T.nativeElement,Lt=gi(this.zone,X.instance,ve);return{id:this.nextId++,stackId:sa(this.tabsPrefix,O),unlistenEvents:Lt,element:ve,ref:X,url:O}}getExistingView(X){const _=ci(this.router,X),T=this.views.find(O=>O.url===_);return T&&T.ref.changeDetectorRef.reattach(),T}setActive(X){var _,T;const O=this.navCtrl.consumeTransition();let{direction:ve,animation:Lt,animationBuilder:an}=O;const nr=this.activeView,Kr=((A,X)=>!X||A.stackId!==X.stackId)(X,nr);Kr&&(ve="back",Lt=void 0);const Io=this.views.slice();let Lo;const Ui=this.router;Ui.getCurrentNavigation?Lo=Ui.getCurrentNavigation():!(null===(_=Ui.navigations)||void 0===_)&&_.value&&(Lo=Ui.navigations.value),null!==(T=Lo?.extras)&&void 0!==T&&T.replaceUrl&&this.views.length>0&&this.views.splice(-1,1);const Ma=this.views.includes(X),oo=this.insertView(X,ve);Ma||X.ref.changeDetectorRef.detectChanges();const As=X.animationBuilder;return void 0===an&&"back"===ve&&!Kr&&void 0!==As&&(an=As),nr&&(nr.animationBuilder=an),this.zone.runOutsideAngular(()=>this.wait(()=>(nr&&nr.ref.changeDetectorRef.detach(),X.ref.changeDetectorRef.reattach(),this.transition(X,nr,Lt,this.canGoBack(1),!1,an).then(()=>ga(X,oo,Io,this.location,this.zone)).then(()=>({enteringView:X,direction:ve,animation:Lt,tabSwitch:Kr})))))}canGoBack(X,_=this.getActiveStackId()){return this.getStack(_).length>X}pop(X,_=this.getActiveStackId()){return this.zone.run(()=>{var T,O;const ve=this.getStack(_);if(ve.length<=X)return Promise.resolve(!1);const Lt=ve[ve.length-X-1];let an=Lt.url;const nr=Lt.savedData;if(nr){const Io=nr.get("primary");null!==(O=null===(T=Io?.route)||void 0===T?void 0:T._routerState)&&void 0!==O&&O.snapshot.url&&(an=Io.route._routerState.snapshot.url)}const{animationBuilder:Kr}=this.navCtrl.consumeTransition();return this.navCtrl.navigateBack(an,Object.assign(Object.assign({},Lt.savedExtras),{animation:Kr})).then(()=>!0)})}startBackTransition(){const X=this.activeView;if(X){const _=this.getStack(X.stackId),T=_[_.length-2],O=T.animationBuilder;return this.wait(()=>this.transition(T,X,"back",this.canGoBack(2),!0,O))}return Promise.resolve()}endBackTransition(X){X?(this.skipTransition=!0,this.pop(1)):this.activeView&&Fa(this.activeView,this.views,this.views,this.location,this.zone)}getLastUrl(X){const _=this.getStack(X);return _.length>0?_[_.length-1]:void 0}getRootUrl(X){const _=this.getStack(X);return _.length>0?_[0]:void 0}getActiveStackId(){return this.activeView?this.activeView.stackId:void 0}hasRunningTask(){return void 0!==this.runningTask}destroy(){this.containerEl=void 0,this.views.forEach(Li),this.activeView=void 0,this.views=[]}getStack(X){return this.views.filter(_=>_.stackId===X)}insertView(X,_){return this.activeView=X,this.views=((A,X,_)=>"root"===_?Di(A,X):"forward"===_?((A,X)=>(A.indexOf(X)>=0?A=A.filter(T=>T.stackId!==X.stackId||T.id<=X.id):A.push(X),A))(A,X):((A,X)=>A.indexOf(X)>=0?A.filter(T=>T.stackId!==X.stackId||T.id<=X.id):Di(A,X))(A,X))(this.views,X,_),this.views.slice()}transition(X,_,T,O,ve,Lt){if(this.skipTransition)return this.skipTransition=!1,Promise.resolve(!1);if(_===X)return Promise.resolve(!1);const an=X?X.element:void 0,nr=_?_.element:void 0,Kr=this.containerEl;return an&&an!==nr&&(an.classList.add("ion-page"),an.classList.add("ion-page-invisible"),an.parentElement!==Kr&&Kr.appendChild(an),Kr.commit)?Kr.commit(an,nr,{deepWait:!0,duration:void 0===T?0:void 0,direction:T,showGoBack:O,progressAnimation:ve,animationBuilder:Lt}):Promise.resolve(!1)}wait(X){return(0,g.mG)(this,void 0,void 0,function*(){void 0!==this.runningTask&&(yield this.runningTask,this.runningTask=void 0);const _=this.runningTask=X();return _.finally(()=>this.runningTask=void 0),_})}}const ga=(A,X,_,T,O)=>"function"==typeof requestAnimationFrame?new Promise(ve=>{requestAnimationFrame(()=>{Fa(A,X,_,T,O),ve()})}):Promise.resolve(),Fa=(A,X,_,T,O)=>{O.run(()=>_.filter(ve=>!X.includes(ve)).forEach(Li)),X.forEach(ve=>{const an=T.path().split("?")[0].split("#")[0];if(ve!==A&&ve.url!==an){const nr=ve.element;nr.setAttribute("aria-hidden","true"),nr.classList.add("ion-page-hidden"),ve.ref.changeDetectorRef.detach()}})};let va=(()=>{class A{get(_,T){const O=Ha();return O?O.get(_,T):null}getBoolean(_,T){const O=Ha();return!!O&&O.getBoolean(_,T)}getNumber(_,T){const O=Ha();return O?O.getNumber(_,T):0}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})();const ya=new o.InjectionToken("USERCONFIG"),Ha=()=>{if(typeof window<"u"){const A=window.Ionic;if(A?.config)return A.config}return null};let ii=(()=>{class A{constructor(_,T){this.doc=_,this.backButton=new m.xQ,this.keyboardDidShow=new m.xQ,this.keyboardDidHide=new m.xQ,this.pause=new m.xQ,this.resume=new m.xQ,this.resize=new m.xQ,T.run(()=>{var O;let ve;this.win=_.defaultView,this.backButton.subscribeWithPriority=function(Lt,an){return this.subscribe(nr=>nr.register(Lt,Kr=>T.run(()=>an(Kr))))},Go(this.pause,_,"pause"),Go(this.resume,_,"resume"),Go(this.backButton,_,"ionBackButton"),Go(this.resize,this.win,"resize"),Go(this.keyboardDidShow,this.win,"ionKeyboardDidShow"),Go(this.keyboardDidHide,this.win,"ionKeyboardDidHide"),this._readyPromise=new Promise(Lt=>{ve=Lt}),null!==(O=this.win)&&void 0!==O&&O.cordova?_.addEventListener("deviceready",()=>{ve("cordova")},{once:!0}):ve("dom")})}is(_){return(0,D.a)(this.win,_)}platforms(){return(0,D.g)(this.win)}ready(){return this._readyPromise}get isRTL(){return"rtl"===this.doc.dir}getQueryParam(_){return Fi(this.win.location.href,_)}isLandscape(){return!this.isPortrait()}isPortrait(){var _,T;return null===(T=(_=this.win).matchMedia)||void 0===T?void 0:T.call(_,"(orientation: portrait)").matches}testUserAgent(_){const T=this.win.navigator;return!!(T?.userAgent&&T.userAgent.indexOf(_)>=0)}url(){return this.win.location.href}width(){return this.win.innerWidth}height(){return this.win.innerHeight}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275inject(Ce.DOCUMENT),o.\u0275\u0275inject(o.NgZone))},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})();const Fi=(A,X)=>{X=X.replace(/[[\]\\]/g,"\\$&");const T=new RegExp("[\\?&]"+X+"=([^&#]*)").exec(A);return T?decodeURIComponent(T[1].replace(/\+/g," ")):null},Go=(A,X,_)=>{X&&X.addEventListener(_,T=>{A.next(T?.detail)})};let Xo=(()=>{class A{constructor(_,T,O,ve){this.location=T,this.serializer=O,this.router=ve,this.direction=Si,this.animated=Ji,this.guessDirection="forward",this.lastNavId=-1,ve&&ve.events.subscribe(Lt=>{if(Lt instanceof v.NavigationStart){const an=Lt.restoredState?Lt.restoredState.navigationId:Lt.id;this.guessDirection=an{this.pop(),Lt()})}navigateForward(_,T={}){return this.setDirection("forward",T.animated,T.animationDirection,T.animation),this.navigate(_,T)}navigateBack(_,T={}){return this.setDirection("back",T.animated,T.animationDirection,T.animation),this.navigate(_,T)}navigateRoot(_,T={}){return this.setDirection("root",T.animated,T.animationDirection,T.animation),this.navigate(_,T)}back(_={animated:!0,animationDirection:"back"}){return this.setDirection("back",_.animated,_.animationDirection,_.animation),this.location.back()}pop(){return(0,g.mG)(this,void 0,void 0,function*(){let _=this.topOutlet;for(;_&&!(yield _.pop());)_=_.parentOutlet})}setDirection(_,T,O,ve){this.direction=_,this.animated=Xa(_,T,O),this.animationBuilder=ve}setTopOutlet(_){this.topOutlet=_}consumeTransition(){let T,_="root";const O=this.animationBuilder;return"auto"===this.direction?(_=this.guessDirection,T=this.guessAnimation):(T=this.animated,_=this.direction),this.direction=Si,this.animated=Ji,this.animationBuilder=void 0,{direction:_,animation:T,animationBuilder:O}}navigate(_,T){if(Array.isArray(_))return this.router.navigate(_,T);{const O=this.serializer.parse(_.toString());return void 0!==T.queryParams&&(O.queryParams=Object.assign({},T.queryParams)),void 0!==T.fragment&&(O.fragment=T.fragment),this.router.navigateByUrl(O,T)}}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275inject(ii),o.\u0275\u0275inject(Ce.Location),o.\u0275\u0275inject(v.UrlSerializer),o.\u0275\u0275inject(v.Router,8))},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})();const Xa=(A,X,_)=>{if(!1!==X){if(void 0!==_)return _;if("forward"===A||"back"===A)return A;if("root"===A&&!0===X)return"forward"}},Si="auto",Ji=void 0;let Wi=(()=>{class A{constructor(_,T,O,ve,Lt,an,nr,Kr,Io,Lo,Ui,Ma,oo){this.parentContexts=_,this.location=T,this.config=Lt,this.navCtrl=an,this.componentFactoryResolver=nr,this.parentOutlet=oo,this.activated=null,this.activatedView=null,this._activatedRoute=null,this.proxyMap=new WeakMap,this.currentActivatedRoute$=new L.X(null),this.stackEvents=new o.EventEmitter,this.activateEvents=new o.EventEmitter,this.deactivateEvents=new o.EventEmitter,this.nativeEl=Io.nativeElement,this.name=O||v.PRIMARY_OUTLET,this.tabsPrefix="true"===ve?ci(Lo,Ma):void 0,this.stackCtrl=new qr(this.tabsPrefix,this.nativeEl,Lo,an,Ui,Kr),_.onChildOutletCreated(this.name,this)}set animation(_){this.nativeEl.animation=_}set animated(_){this.nativeEl.animated=_}set swipeGesture(_){this._swipeGesture=_,this.nativeEl.swipeHandler=_?{canStart:()=>this.stackCtrl.canGoBack(1)&&!this.stackCtrl.hasRunningTask(),onStart:()=>this.stackCtrl.startBackTransition(),onEnd:T=>this.stackCtrl.endBackTransition(T)}:void 0}ngOnDestroy(){this.stackCtrl.destroy()}getContext(){return this.parentContexts.getContext(this.name)}ngOnInit(){if(!this.activated){const _=this.getContext();_?.route&&this.activateWith(_.route,_.resolver||null)}new Promise(_=>(0,j.c)(this.nativeEl,_)).then(()=>{void 0===this._swipeGesture&&(this.swipeGesture=this.config.getBoolean("swipeBackEnabled","ios"===this.nativeEl.mode))})}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){throw new Error("incompatible reuse strategy")}attach(_,T){throw new Error("incompatible reuse strategy")}deactivate(){if(this.activated){if(this.activatedView){const T=this.getContext();this.activatedView.savedData=new Map(T.children.contexts);const O=this.activatedView.savedData.get("primary");if(O&&T.route&&(O.route=Object.assign({},T.route)),this.activatedView.savedExtras={},T.route){const ve=T.route.snapshot;this.activatedView.savedExtras.queryParams=ve.queryParams,this.activatedView.savedExtras.fragment=ve.fragment}}const _=this.component;this.activatedView=null,this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(_)}}activateWith(_,T){var O;if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=_;let ve,Lt=this.stackCtrl.getExistingView(_);if(Lt){ve=this.activated=Lt.ref;const an=Lt.savedData;an&&(this.getContext().children.contexts=an),this.updateActivatedRouteProxy(ve.instance,_)}else{const an=_._futureSnapshot;if(null==an.routeConfig.component&&null==this.environmentInjector)return void console.warn('[Ionic Warning]: You must supply an environmentInjector to use standalone components with routing:\n\nIn your component class, add:\n\n import { EnvironmentInjector } from \'@angular/core\';\n constructor(public environmentInjector: EnvironmentInjector) {}\n\nIn your router outlet template, add:\n\n \n\nAlternatively, if you are routing within ion-tabs:\n\n ');const nr=this.parentContexts.getOrCreateContext(this.name).children,Kr=new L.X(null),Io=this.createActivatedRouteProxy(Kr,_),Lo=new Za(Io,nr,this.location.injector),Ui=null!==(O=an.routeConfig.component)&&void 0!==O?O:an.component;if((T=T||this.componentFactoryResolver)&&ye(T)){const Ma=T.resolveComponentFactory(Ui);ve=this.activated=this.location.createComponent(Ma,this.location.length,Lo)}else ve=this.activated=this.location.createComponent(Ui,{index:this.location.length,injector:Lo,environmentInjector:T??this.environmentInjector});Kr.next(ve.instance),Lt=this.stackCtrl.createView(this.activated,_),this.proxyMap.set(ve.instance,Io),this.currentActivatedRoute$.next({component:ve.instance,activatedRoute:_})}this.activatedView=Lt,this.navCtrl.setTopOutlet(this),this.stackCtrl.setActive(Lt).then(an=>{this.activateEvents.emit(ve.instance),this.stackEvents.emit(an)})}canGoBack(_=1,T){return this.stackCtrl.canGoBack(_,T)}pop(_=1,T){return this.stackCtrl.pop(_,T)}getLastUrl(_){const T=this.stackCtrl.getLastUrl(_);return T?T.url:void 0}getLastRouteView(_){return this.stackCtrl.getLastUrl(_)}getRootView(_){return this.stackCtrl.getRootUrl(_)}getActiveStackId(){return this.stackCtrl.getActiveStackId()}createActivatedRouteProxy(_,T){const O=new v.ActivatedRoute;return O._futureSnapshot=T._futureSnapshot,O._routerState=T._routerState,O.snapshot=T.snapshot,O.outlet=T.outlet,O.component=T.component,O._paramMap=this.proxyObservable(_,"paramMap"),O._queryParamMap=this.proxyObservable(_,"queryParamMap"),O.url=this.proxyObservable(_,"url"),O.params=this.proxyObservable(_,"params"),O.queryParams=this.proxyObservable(_,"queryParams"),O.fragment=this.proxyObservable(_,"fragment"),O.data=this.proxyObservable(_,"data"),O}proxyObservable(_,T){return _.pipe((0,xe.h)(O=>!!O),(0,he.w)(O=>this.currentActivatedRoute$.pipe((0,xe.h)(ve=>null!==ve&&ve.component===O),(0,he.w)(ve=>ve&&ve.activatedRoute[T]),(0,Le.x)())))}updateActivatedRouteProxy(_,T){const O=this.proxyMap.get(_);if(!O)throw new Error("Could not find activated route proxy for view");O._futureSnapshot=T._futureSnapshot,O._routerState=T._routerState,O.snapshot=T.snapshot,O.outlet=T.outlet,O.component=T.component,this.currentActivatedRoute$.next({component:_,activatedRoute:T})}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(v.ChildrenOutletContexts),o.\u0275\u0275directiveInject(o.ViewContainerRef),o.\u0275\u0275injectAttribute("name"),o.\u0275\u0275injectAttribute("tabs"),o.\u0275\u0275directiveInject(va),o.\u0275\u0275directiveInject(Xo),o.\u0275\u0275directiveInject(o.ComponentFactoryResolver,8),o.\u0275\u0275directiveInject(Ce.Location),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(v.Router),o.\u0275\u0275directiveInject(o.NgZone),o.\u0275\u0275directiveInject(v.ActivatedRoute),o.\u0275\u0275directiveInject(A,12))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["ion-router-outlet"]],inputs:{animated:"animated",animation:"animation",mode:"mode",swipeGesture:"swipeGesture",environmentInjector:"environmentInjector"},outputs:{stackEvents:"stackEvents",activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),A})();class Za{constructor(X,_,T){this.route=X,this.childContexts=_,this.parent=T}get(X,_){return X===v.ActivatedRoute?this.route:X===v.ChildrenOutletContexts?this.childContexts:this.parent.get(X,_)}}let fe=(()=>{class A{constructor(_){this.navCtrl=_,this.ionTabsWillChange=new o.EventEmitter,this.ionTabsDidChange=new o.EventEmitter}onPageSelected(_){const T=_.enteringView.stackId;_.tabSwitch&&void 0!==T&&(this.ionTabsWillChange.emit({tab:T}),this.tabBar&&(this.tabBar.selectedTab=T),this.ionTabsDidChange.emit({tab:T}))}select(_){const T="string"==typeof _,O=T?_:_.detail.tab,ve=this.outlet.getActiveStackId()===O,Lt=`${this.outlet.tabsPrefix}/${O}`;if(T||_.stopPropagation(),ve){const an=this.outlet.getActiveStackId();if(this.outlet.getLastRouteView(an)?.url===Lt)return;const Kr=this.outlet.getRootView(O);return this.navCtrl.navigateRoot(Lt,Object.assign(Object.assign({},Kr&&Lt===Kr.url&&Kr.savedExtras),{animated:!0,animationDirection:"back"}))}{const an=this.outlet.getLastRouteView(O),Kr=an?.savedExtras;return this.navCtrl.navigateRoot(an?.url||Lt,Object.assign(Object.assign({},Kr),{animated:!0,animationDirection:"back"}))}}getSelected(){return this.outlet.getActiveStackId()}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(Xo))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-tabs"]],contentQueries:function(_,T,O){if(1&_&&o.\u0275\u0275contentQuery(O,Qt,5),2&_){let ve;o.\u0275\u0275queryRefresh(ve=o.\u0275\u0275loadQuery())&&(T.tabBar=ve.first)}},viewQuery:function(_,T){if(1&_&&o.\u0275\u0275viewQuery(we,5,Wi),2&_){let O;o.\u0275\u0275queryRefresh(O=o.\u0275\u0275loadQuery())&&(T.outlet=O.first)}},hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("ionTabButtonClick",function(ve){return T.select(ve)})},inputs:{environmentInjector:"environmentInjector"},outputs:{ionTabsWillChange:"ionTabsWillChange",ionTabsDidChange:"ionTabsDidChange"},ngContentSelectors:le,decls:5,vars:1,consts:[[1,"tabs-inner"],["tabs","true",3,"environmentInjector","stackEvents"],["outlet",""]],template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(Ee),o.\u0275\u0275projection(0),o.\u0275\u0275elementStart(1,"div",0)(2,"ion-router-outlet",1,2),o.\u0275\u0275listener("stackEvents",function(ve){return T.onPageSelected(ve)}),o.\u0275\u0275elementEnd()(),o.\u0275\u0275projection(4,1)),2&_&&(o.\u0275\u0275advance(2),o.\u0275\u0275property("environmentInjector",T.environmentInjector))},dependencies:[Wi],styles:["[_nghost-%COMP%] {\n display: flex;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n flex-direction: column;\n\n width: 100%;\n height: 100%;\n\n contain: layout size style;\n z-index: $z-index-page-container;\n }\n .tabs-inner[_ngcontent-%COMP%] {\n position: relative;\n\n flex: 1;\n\n contain: layout size style;\n }"]}),A})(),lt=(()=>{class A{constructor(_,T,O){this.routerOutlet=_,this.navCtrl=T,this.config=O}onClick(_){var T;const O=this.defaultHref||this.config.get("backButtonDefaultHref");null!==(T=this.routerOutlet)&&void 0!==T&&T.canGoBack()?(this.navCtrl.setDirection("back",void 0,void 0,this.routerAnimation),this.routerOutlet.pop(),_.preventDefault()):null!=O&&(this.navCtrl.navigateBack(O,{animation:this.routerAnimation}),_.preventDefault())}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(Wi,8),o.\u0275\u0275directiveInject(Xo),o.\u0275\u0275directiveInject(va))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["ion-back-button"]],hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("click",function(ve){return T.onClick(ve)})},inputs:{defaultHref:"defaultHref",routerAnimation:"routerAnimation"}}),A})(),P=(()=>{let A=class{constructor(_,T,O,ve,Lt){this.el=_.nativeElement,_.nativeElement.delegate=ve.create(T,O,Lt),Tt(this,this.el,["ionNavDidChange","ionNavWillChange"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.ComponentFactoryResolver),o.\u0275\u0275directiveInject(o.Injector),o.\u0275\u0275directiveInject(Sr),o.\u0275\u0275directiveInject(o.ViewContainerRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["ion-nav"]]}),A=(0,g.gn)([Gt({inputs:["animated","animation","root","rootParams","swipeGesture"],methods:["push","insert","insertPages","pop","popTo","popToRoot","removeIndex","setRoot","setPages","getActive","getByIndex","canGoBack","getPrevious"]})],A),A})(),Q=(()=>{class A{constructor(_,T,O,ve,Lt){this.locationStrategy=_,this.navCtrl=T,this.elementRef=O,this.router=ve,this.routerLink=Lt,this.routerDirection="forward"}ngOnInit(){this.updateTargetUrlAndHref()}ngOnChanges(){this.updateTargetUrlAndHref()}updateTargetUrlAndHref(){var _;if(null!==(_=this.routerLink)&&void 0!==_&&_.urlTree){const T=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));this.elementRef.nativeElement.href=T}}onClick(_){this.navCtrl.setDirection(this.routerDirection,void 0,void 0,this.routerAnimation),_.preventDefault()}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(Ce.LocationStrategy),o.\u0275\u0275directiveInject(Xo),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(v.Router),o.\u0275\u0275directiveInject(v.RouterLink,8))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("click",function(ve){return T.onClick(ve)})},inputs:{routerDirection:"routerDirection",routerAnimation:"routerAnimation"},features:[o.\u0275\u0275NgOnChangesFeature]}),A})(),Pe=(()=>{class A{constructor(_,T,O,ve,Lt){this.locationStrategy=_,this.navCtrl=T,this.elementRef=O,this.router=ve,this.routerLink=Lt,this.routerDirection="forward"}ngOnInit(){this.updateTargetUrlAndHref()}ngOnChanges(){this.updateTargetUrlAndHref()}updateTargetUrlAndHref(){var _;if(null!==(_=this.routerLink)&&void 0!==_&&_.urlTree){const T=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));this.elementRef.nativeElement.href=T}}onClick(){this.navCtrl.setDirection(this.routerDirection,void 0,void 0,this.routerAnimation)}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(Ce.LocationStrategy),o.\u0275\u0275directiveInject(Xo),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(v.Router),o.\u0275\u0275directiveInject(v.RouterLink,8))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["a","routerLink",""],["area","routerLink",""]],hostBindings:function(_,T){1&_&&o.\u0275\u0275listener("click",function(){return T.onClick()})},inputs:{routerDirection:"routerDirection",routerAnimation:"routerAnimation"},features:[o.\u0275\u0275NgOnChangesFeature]}),A})(),Ve=(()=>{class A{constructor(_){this.templateRef=_}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.TemplateRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["","virtualFooter",""]]}),A})(),Z=(()=>{class A{constructor(_){this.templateRef=_}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.TemplateRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["","virtualHeader",""]]}),A})(),re=(()=>{class A{constructor(_,T){this.templateRef=_,this.viewContainer=T}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.TemplateRef),o.\u0275\u0275directiveInject(o.ViewContainerRef))},A.\u0275dir=o.\u0275\u0275defineDirective({type:A,selectors:[["","virtualItem",""]]}),A})(),Xe=(()=>{let A=class{constructor(_,T,O){this.z=_,this.iterableDiffers=T,this.refMap=new WeakMap,this.el=O.nativeElement,this.el.nodeRender=this.nodeRender.bind(this)}ngOnChanges(_){if(this.trackBy&&"items"in _){const T=_.items.currentValue;if(void 0===this.differ&&null!=T)try{this.differ=this.iterableDiffers.find(T).create(this.trackBy)}catch{throw new Error(`Cannot find a differ supporting object '${T}'. VirtualScroll only supports binding to Iterables such as Arrays.`)}}}ngDoCheck(){null!==(void 0!==this.differ&&this.items?this.differ.diff(this.items):null)&&this.checkRange(0)}nodeRender(_,T,O){return this.z.run(()=>{let ve;if(_){ve=this.refMap.get(_);const Lt=ve.context;Lt.$implicit=T.value,Lt.index=T.index}else ve=this.itmTmp.viewContainer.createEmbeddedView(this.getComponent(T.type),{$implicit:T.value,index:O},O),_=it(ve),this.refMap.set(_,ve);return ve.detectChanges(),_})}getComponent(_){switch(_){case"item":return this.itmTmp.templateRef;case"header":return this.hdrTmp.templateRef;case"footer":return this.ftrTmp.templateRef;default:throw new Error("template for virtual item was not provided")}}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.NgZone),o.\u0275\u0275directiveInject(o.IterableDiffers),o.\u0275\u0275directiveInject(o.ElementRef))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-virtual-scroll"]],contentQueries:function(_,T,O){if(1&_&&(o.\u0275\u0275contentQuery(O,re,5),o.\u0275\u0275contentQuery(O,Z,5),o.\u0275\u0275contentQuery(O,Ve,5)),2&_){let ve;o.\u0275\u0275queryRefresh(ve=o.\u0275\u0275loadQuery())&&(T.itmTmp=ve.first),o.\u0275\u0275queryRefresh(ve=o.\u0275\u0275loadQuery())&&(T.hdrTmp=ve.first),o.\u0275\u0275queryRefresh(ve=o.\u0275\u0275loadQuery())&&(T.ftrTmp=ve.first)}},inputs:{approxItemHeight:"approxItemHeight",approxHeaderHeight:"approxHeaderHeight",approxFooterHeight:"approxFooterHeight",headerFn:"headerFn",footerFn:"footerFn",items:"items",itemHeight:"itemHeight",headerHeight:"headerHeight",footerHeight:"footerHeight",trackBy:"trackBy"},features:[o.\u0275\u0275NgOnChangesFeature],ngContentSelectors:_e,decls:1,vars:0,template:function(_,T){1&_&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275projection(0))},encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({inputs:["approxItemHeight","approxHeaderHeight","approxFooterHeight","headerFn","footerFn","items","itemHeight","headerHeight","footerHeight"],methods:["checkEnd","checkRange","positionForItem"]})],A),A})();const it=A=>{const X=A.rootNodes;for(let _=0;_{let A=class{constructor(_,T,O){this.z=O,this.isCmpOpen=!1,this.el=T.nativeElement,this.el.addEventListener("willPresent",()=>{this.isCmpOpen=!0,_.detectChanges()}),this.el.addEventListener("didDismiss",()=>{this.isCmpOpen=!1,_.detectChanges()}),Tt(this,this.el,["ionModalDidPresent","ionModalWillPresent","ionModalWillDismiss","ionModalDidDismiss","ionBreakpointDidChange","didPresent","willPresent","willDismiss","didDismiss"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-modal"]],contentQueries:function(_,T,O){if(1&_&&o.\u0275\u0275contentQuery(O,o.TemplateRef,5),2&_){let ve;o.\u0275\u0275queryRefresh(ve=o.\u0275\u0275loadQuery())&&(T.template=ve.first)}},inputs:{animated:"animated",keepContentsMounted:"keepContentsMounted",backdropBreakpoint:"backdropBreakpoint",backdropDismiss:"backdropDismiss",breakpoints:"breakpoints",canDismiss:"canDismiss",cssClass:"cssClass",enterAnimation:"enterAnimation",event:"event",handle:"handle",handleBehavior:"handleBehavior",initialBreakpoint:"initialBreakpoint",isOpen:"isOpen",keyboardClose:"keyboardClose",leaveAnimation:"leaveAnimation",mode:"mode",presentingElement:"presentingElement",showBackdrop:"showBackdrop",swipeToClose:"swipeToClose",translucent:"translucent",trigger:"trigger"},decls:1,vars:1,consts:[["class","ion-delegate-host ion-page",4,"ngIf"],[1,"ion-delegate-host","ion-page"],[3,"ngTemplateOutlet"]],template:function(_,T){1&_&&o.\u0275\u0275template(0,Ue,2,1,"div",0),2&_&&o.\u0275\u0275property("ngIf",T.isCmpOpen||T.keepContentsMounted)},dependencies:[Ce.NgIf,Ce.NgTemplateOutlet],encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({inputs:["animated","keepContentsMounted","backdropBreakpoint","backdropDismiss","breakpoints","canDismiss","cssClass","enterAnimation","event","handle","handleBehavior","initialBreakpoint","isOpen","keyboardClose","leaveAnimation","mode","presentingElement","showBackdrop","swipeToClose","translucent","trigger"],methods:["present","dismiss","onDidDismiss","onWillDismiss","setCurrentBreakpoint","getCurrentBreakpoint"]})],A),A})(),mt=(()=>{let A=class{constructor(_,T,O){this.z=O,this.isCmpOpen=!1,this.el=T.nativeElement,this.el.addEventListener("ionMount",()=>{this.isCmpOpen=!0,_.detectChanges()}),this.el.addEventListener("didDismiss",()=>{this.isCmpOpen=!1,_.detectChanges()}),Tt(this,this.el,["ionPopoverDidPresent","ionPopoverWillPresent","ionPopoverWillDismiss","ionPopoverDidDismiss","didPresent","willPresent","willDismiss","didDismiss"])}};return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(o.NgZone))},A.\u0275cmp=o.\u0275\u0275defineComponent({type:A,selectors:[["ion-popover"]],contentQueries:function(_,T,O){if(1&_&&o.\u0275\u0275contentQuery(O,o.TemplateRef,5),2&_){let ve;o.\u0275\u0275queryRefresh(ve=o.\u0275\u0275loadQuery())&&(T.template=ve.first)}},inputs:{alignment:"alignment",animated:"animated",arrow:"arrow",keepContentsMounted:"keepContentsMounted",backdropDismiss:"backdropDismiss",cssClass:"cssClass",dismissOnSelect:"dismissOnSelect",enterAnimation:"enterAnimation",event:"event",isOpen:"isOpen",keyboardClose:"keyboardClose",leaveAnimation:"leaveAnimation",mode:"mode",showBackdrop:"showBackdrop",translucent:"translucent",trigger:"trigger",triggerAction:"triggerAction",reference:"reference",size:"size",side:"side"},decls:1,vars:1,consts:[[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(_,T){1&_&&o.\u0275\u0275template(0,ke,1,1,"ng-container",0),2&_&&o.\u0275\u0275property("ngIf",T.isCmpOpen||T.keepContentsMounted)},dependencies:[Ce.NgIf,Ce.NgTemplateOutlet],encapsulation:2,changeDetection:0}),A=(0,g.gn)([Gt({inputs:["alignment","animated","arrow","keepContentsMounted","backdropDismiss","cssClass","dismissOnSelect","enterAnimation","event","isOpen","keyboardClose","leaveAnimation","mode","showBackdrop","translucent","trigger","triggerAction","reference","size","side"],methods:["present","dismiss","onDidDismiss","onWillDismiss"]})],A),A})();class Rt{constructor(X){this.ctrl=X}create(X){return this.ctrl.create(X||{})}dismiss(X,_,T){return this.ctrl.dismiss(X,_,T)}getTop(){return this.ctrl.getTop()}}let Xt=(()=>{class A extends Rt{constructor(){super(ee.b)}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})(),qt=(()=>{class A extends Rt{constructor(){super(ee.a)}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})(),Sn=(()=>{class A extends Rt{constructor(){super(ee.l)}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})(),Wn=(()=>{class A{open(_){return K.m.open(_)}close(_){return K.m.close(_)}toggle(_){return K.m.toggle(_)}enable(_,T){return K.m.enable(_,T)}swipeGesture(_,T){return K.m.swipeGesture(_,T)}isOpen(_){return K.m.isOpen(_)}isEnabled(_){return K.m.isEnabled(_)}get(_){return K.m.get(_)}getOpen(){return K.m.getOpen()}getMenus(){return K.m.getMenus()}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})(),Un=(()=>{class A extends Rt{constructor(){super(ee.p)}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})();class sr{}let hr=(()=>{class A extends Rt{constructor(_,T,O,ve){super(ee.m),this.angularDelegate=_,this.resolver=T,this.injector=O,this.environmentInjector=ve}create(_){var T;return super.create(Object.assign(Object.assign({},_),{delegate:this.angularDelegate.create(null!==(T=this.resolver)&&void 0!==T?T:this.environmentInjector,this.injector,void 0,"modal")}))}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275inject(Sr),o.\u0275\u0275inject(o.ComponentFactoryResolver),o.\u0275\u0275inject(o.Injector),o.\u0275\u0275inject(sr,8))},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac}),A})(),Ar=(()=>{class A extends Rt{constructor(_,T,O,ve){super(ee.c),this.angularDelegate=_,this.resolver=T,this.injector=O,this.environmentInjector=ve}create(_){var T;return super.create(Object.assign(Object.assign({},_),{delegate:this.angularDelegate.create(null!==(T=this.resolver)&&void 0!==T?T:this.environmentInjector,this.injector,void 0,"popover")}))}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275inject(Sr),o.\u0275\u0275inject(o.ComponentFactoryResolver),o.\u0275\u0275inject(o.Injector),o.\u0275\u0275inject(sr,8))},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac}),A})(),eo=(()=>{class A extends Rt{constructor(){super(ee.t)}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})(),fo=(()=>{class A{read(_){ko().read(_)}write(_){ko().write(_)}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})();const ko=()=>{const A=typeof window<"u"?window:null;if(null!=A){const X=A.Ionic;return X?.queue?X.queue:{read:_=>A.requestAnimationFrame(_),write:_=>A.requestAnimationFrame(_)}}return{read:X=>X(),write:X=>X()}};let y=(()=>{class A{create(_){return(0,b.c)(_)}easingTime(_,T,O,ve,Lt){return(0,Y.g)(_,T,O,ve,Lt)}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})(),G=(()=>{class A{constructor(_){this.zone=_}create(_,T=!1){return T&&Object.getOwnPropertyNames(_).forEach(O=>{if("function"==typeof _[O]){const ve=_[O];_[O]=(...Lt)=>this.zone.run(()=>ve(...Lt))}}),(0,I.createGesture)(_)}}return A.\u0275fac=function(_){return new(_||A)(o.\u0275\u0275inject(o.NgZone))},A.\u0275prov=o.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac,providedIn:"root"}),A})();class Je{shouldDetach(X){return!1}shouldAttach(X){return!1}store(X,_){}retrieve(X){return null}shouldReuseRoute(X,_){if(X.routeConfig!==_.routeConfig)return!1;const T=X.params,O=_.params,ve=Object.keys(T),Lt=Object.keys(O);if(ve.length!==Lt.length)return!1;for(const an of ve)if(O[an]!==T[an])return!1;return!0}}const dt=(A,X,_)=>()=>{if(X.defaultView&&typeof window<"u"){(0,W.s)(Object.assign(Object.assign({},A),{_zoneGate:ve=>_.run(ve)}));const O="__zone_symbol__addEventListener"in X.body?"__zone_symbol__addEventListener":"addEventListener";return function ie(){var A=[];if(typeof window<"u"){var X=window;(!X.customElements||X.Element&&(!X.Element.prototype.closest||!X.Element.prototype.matches||!X.Element.prototype.remove||!X.Element.prototype.getRootNode))&&A.push(f.e(6748).then(f.t.bind(f,30723,23))),("function"!=typeof Object.assign||!Object.entries||!Array.prototype.find||!Array.prototype.includes||!String.prototype.startsWith||!String.prototype.endsWith||X.NodeList&&!X.NodeList.prototype.forEach||!X.fetch||!function(){try{var T=new URL("b","http://a");return T.pathname="c%20d","http://a/c%20d"===T.href&&T.searchParams}catch{return!1}}()||typeof WeakMap>"u")&&A.push(f.e(2214).then(f.t.bind(f,24144,23)))}return Promise.all(A)}().then(()=>((A,X)=>typeof window>"u"?Promise.resolve():(0,ce.p)().then(()=>(se(),(0,ce.b)(JSON.parse('[["ion-menu_3",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"],[0,"keydown","onKeydown"]]],[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["ion-fab_3",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}],[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]}],[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["ion-refresher_2",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}],[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["ion-back-button",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["ion-toast",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"layout":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-card_5",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}],[32,"ion-card-content"],[33,"ion-card-header",{"color":[513],"translucent":[4]}],[33,"ion-card-subtitle",{"color":[513]}],[33,"ion-card-title",{"color":[513]}]]],["ion-item-option_3",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}],[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}],[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["ion-accordion_2",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]}],[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]]]]],["ion-breadcrumb_2",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}],[33,"ion-breadcrumbs",{"color":[1],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]]]]],["ion-infinite-scroll_2",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["ion-reorder_2",[[33,"ion-reorder",null,[[2,"click","onClick"]]],[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["ion-segment_2",[[33,"ion-segment-button",{"disabled":[4],"layout":[1],"type":[1],"value":[1],"checked":[32],"setFocus":[64]}],[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1025],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[0,"keydown","onKeyDown"]]]]],["ion-tab-bar_2",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]],[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]}]]],["ion-chip",[[1,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["ion-datetime-button",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["ion-input",[[34,"ion-input",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"inputmode":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["ion-searchbar",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}]]],["ion-toggle",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"activated":[32]}]]],["ion-avatar_3",[[33,"ion-avatar"],[33,"ion-badge",{"color":[513]}],[1,"ion-thumbnail"]]],["ion-textarea",[[34,"ion-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["ion-backdrop",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["ion-loading",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-modal",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"swipeToClose":[4,"swipe-to-close"],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]}]]],["ion-route_4",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]}],[0,"ion-route-redirect",{"from":[1],"to":[1]}],[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]],[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["ion-col_3",[[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"]]],["ion-nav_2",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}],[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["ion-slide_2",[[0,"ion-slide"],[36,"ion-slides",{"options":[8],"pager":[4],"scrollbar":[4],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"getPreviousIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipeToNext":[64],"lockSwipeToPrev":[64],"lockSwipes":[64],"getSwiper":[64]}]]],["ion-tab_2",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}],[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["ion-img",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["ion-progress-bar",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["ion-range",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["ion-split-pane",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}]]],["ion-text",[[1,"ion-text",{"color":[513]}]]],["ion-virtual-scroll",[[0,"ion-virtual-scroll",{"approxItemHeight":[2,"approx-item-height"],"approxHeaderHeight":[2,"approx-header-height"],"approxFooterHeight":[2,"approx-footer-height"],"headerFn":[16],"footerFn":[16],"items":[16],"itemHeight":[16],"headerHeight":[16],"footerHeight":[16],"renderItem":[16],"renderHeader":[16],"renderFooter":[16],"nodeRender":[16],"domRender":[16],"totalHeight":[32],"positionForItem":[64],"checkRange":[64],"checkEnd":[64]},[[9,"resize","onResize"]]]]],["ion-picker-column-internal",[[33,"ion-picker-column-internal",{"items":[16],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64]}]]],["ion-picker-internal",[[33,"ion-picker-internal",{"exitInputMode":[64]},[[1,"touchstart","preventTouchStartPropagation"]]]]],["ion-radio_2",[[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]]]]],["ion-ripple-effect",[[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["ion-button_2",[[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1],"form":[1]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32],"ariaLabel":[32]}]]],["ion-datetime_3",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"readonly":[4],"isDateEnabled":[16],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"titleSelectedDatesFormatter":[16],"multiple":[4],"highlightedDates":[16],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isPresented":[32],"isTimePopoverOpen":[32],"confirm":[64],"reset":[64],"cancel":[64]}],[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}],[32,"ion-picker-column",{"col":[16]}]]],["ion-action-sheet",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-alert",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]]]]],["ion-popover",[[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-checkbox",[[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[8]}]]],["ion-select_3",[[33,"ion-select",{"disabled":[4],"cancelText":[1,"cancel-text"],"okText":[1,"ok-text"],"placeholder":[1],"name":[1],"selectedText":[1,"selected-text"],"multiple":[4],"interface":[1],"interfaceOptions":[8,"interface-options"],"compareWith":[1,"compare-with"],"value":[1032],"isExpanded":[32],"open":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}],[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]},[[0,"ionChange","onSelect"]]]]],["ion-app_8",[[0,"ion-app",{"setFocus":[64]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"],[9,"resize","onResize"]]],[36,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}],[33,"ion-title",{"color":[513],"size":[1]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}]]],["ion-spinner",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["ion-item_8",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}],[32,"ion-item-group"],[1,"ion-skeleton-text",{"animated":[4]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[33,"ion-list-header",{"color":[513],"lines":[1]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"fill":[1],"shape":[1],"href":[1],"rel":[1],"lines":[1],"counter":[4],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"counterFormatter":[16],"multipleInputs":[32],"focusable":[32],"counterString":[32]},[[0,"ionChange","handleIonChange"],[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]]],[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]}],[33,"ion-note",{"color":[513]}]]]]'),X))))(0,{exclude:["ion-tabs","ion-tab"],syncQueue:!0,raf:ze,jmp:ve=>_.runOutsideAngular(ve),ael(ve,Lt,an,nr){ve[O](Lt,an,nr)},rel(ve,Lt,an,nr){ve.removeEventListener(Lt,an,nr)}}))}};let Rr=(()=>{class A{static forRoot(_){return{ngModule:A,providers:[{provide:ya,useValue:_},{provide:o.APP_INITIALIZER,useFactory:dt,multi:!0,deps:[ya,Ce.DOCUMENT,o.NgZone]}]}}}return A.\u0275fac=function(_){return new(_||A)},A.\u0275mod=o.\u0275\u0275defineNgModule({type:A}),A.\u0275inj=o.\u0275\u0275defineInjector({providers:[Sr,hr,Ar],imports:[[Ce.CommonModule]]}),A})()},90181:(Ge,$,f)=>{f.d($,{c:()=>de});var o=f(35730),a=f(13457);let g;const m=K=>K.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L=K=>{if(void 0===g){const De=void 0!==K.style.webkitAnimationName;g=void 0===K.style.animationName&&De?"-webkit-":""}return g},v=(K,ee,De)=>{const Te=ee.startsWith("animation")?L(K):"";K.style.setProperty(Te+ee,De)},b=(K,ee)=>{const De=ee.startsWith("animation")?L(K):"";K.style.removeProperty(De+ee)},Y=[],W=(K=[],ee)=>{if(void 0!==ee){const De=Array.isArray(ee)?ee:[ee];return[...K,...De]}return K},de=K=>{let ee,De,Te,ce,oe,te,Ce,le,Ue,ke,ze,_t,At,ge=[],xe=[],he=[],Le=!1,ie={},se=[],me=[],Ne={},_e=0,we=!1,Ee=!1,ye=!0,je=!1,Ze=!0,Vt=!1;const fn=K,mn=[],xn=[],gn=[],Et=[],cn=[],ft=[],Tt=[],en=[],Gt=[],or=[],Cr="function"==typeof AnimationEffect||void 0!==a.w&&"function"==typeof a.w.AnimationEffect,wr="function"==typeof Element&&"function"==typeof Element.prototype.animate&&Cr,er=()=>or,Qn=(qe,wt)=>((wt?.oneTimeCallback?xn:mn).push({c:qe,o:wt}),At),jr=()=>{if(wr)or.forEach(qe=>{qe.cancel()}),or.length=0;else{const qe=gn.slice();(0,o.r)(()=>{qe.forEach(wt=>{b(wt,"animation-name"),b(wt,"animation-duration"),b(wt,"animation-timing-function"),b(wt,"animation-iteration-count"),b(wt,"animation-delay"),b(wt,"animation-play-state"),b(wt,"animation-fill-mode"),b(wt,"animation-direction")})})}},Nr=()=>{cn.forEach(qe=>{qe?.parentNode&&qe.parentNode.removeChild(qe)}),cn.length=0},Eo=()=>void 0!==oe?oe:Ce?Ce.getFill():"both",Ur=()=>void 0!==Ue?Ue:void 0!==te?te:Ce?Ce.getDirection():"normal",vo=()=>we?"linear":void 0!==Te?Te:Ce?Ce.getEasing():"linear",br=()=>Ee?0:void 0!==ke?ke:void 0!==De?De:Ce?Ce.getDuration():0,Zn=()=>void 0!==ce?ce:Ce?Ce.getIterations():1,uo=()=>void 0!==ze?ze:void 0!==ee?ee:Ce?Ce.getDelay():0,Yt=()=>{0!==_e&&(_e--,0===_e&&((()=>{Mo(),en.forEach(on=>on()),Gt.forEach(on=>on());const qe=ye?1:0,wt=se,Ht=me,Kt=Ne;gn.forEach(on=>{const Mn=on.classList;wt.forEach(Yn=>Mn.add(Yn)),Ht.forEach(Yn=>Mn.remove(Yn));for(const Yn in Kt)Kt.hasOwnProperty(Yn)&&v(on,Yn,Kt[Yn])}),mn.forEach(on=>on.c(qe,At)),xn.forEach(on=>on.c(qe,At)),xn.length=0,Ze=!0,ye&&(je=!0),ye=!0})(),Ce&&Ce.animationFinish()))},$t=(qe=!0)=>{Nr();const wt=(K=>(K.forEach(ee=>{for(const De in ee)if(ee.hasOwnProperty(De)){const Te=ee[De];if("easing"===De)ee["animation-timing-function"]=Te,delete ee[De];else{const ce=m(De);ce!==De&&(ee[ce]=Te,delete ee[De])}}}),K))(ge);gn.forEach(Ht=>{if(wt.length>0){const Kt=((K=[])=>K.map(ee=>{const De=ee.offset,Te=[];for(const ce in ee)ee.hasOwnProperty(ce)&&"offset"!==ce&&Te.push(`${ce}: ${ee[ce]};`);return`${100*De}% { ${Te.join(" ")} }`}).join(" "))(wt);_t=void 0!==K?K:(K=>{let ee=Y.indexOf(K);return ee<0&&(ee=Y.push(K)-1),`ion-animation-${ee}`})(Kt);const on=((K,ee,De)=>{var Te;const ce=(K=>{const ee=void 0!==K.getRootNode?K.getRootNode():K;return ee.head||ee})(De),oe=L(De),te=ce.querySelector("#"+K);if(te)return te;const ge=(null!==(Te=De.ownerDocument)&&void 0!==Te?Te:document).createElement("style");return ge.id=K,ge.textContent=`@${oe}keyframes ${K} { ${ee} } @${oe}keyframes ${K}-alt { ${ee} }`,ce.appendChild(ge),ge})(_t,Kt,Ht);cn.push(on),v(Ht,"animation-duration",`${br()}ms`),v(Ht,"animation-timing-function",vo()),v(Ht,"animation-delay",`${uo()}ms`),v(Ht,"animation-fill-mode",Eo()),v(Ht,"animation-direction",Ur());const Mn=Zn()===1/0?"infinite":Zn().toString();v(Ht,"animation-iteration-count",Mn),v(Ht,"animation-play-state","paused"),qe&&v(Ht,"animation-name",`${on.id}-alt`),(0,o.r)(()=>{v(Ht,"animation-name",on.id||null)})}})},dn=(qe=!0)=>{(()=>{ft.forEach(Kt=>Kt()),Tt.forEach(Kt=>Kt());const qe=xe,wt=he,Ht=ie;gn.forEach(Kt=>{const on=Kt.classList;qe.forEach(Mn=>on.add(Mn)),wt.forEach(Mn=>on.remove(Mn));for(const Mn in Ht)Ht.hasOwnProperty(Mn)&&v(Kt,Mn,Ht[Mn])})})(),ge.length>0&&(wr?(gn.forEach(qe=>{const wt=qe.animate(ge,{id:fn,delay:uo(),duration:br(),easing:vo(),iterations:Zn(),fill:Eo(),direction:Ur()});wt.pause(),or.push(wt)}),or.length>0&&(or[0].onfinish=()=>{Yt()})):$t(qe)),Le=!0},un=qe=>{if(qe=Math.min(Math.max(qe,0),.9999),wr)or.forEach(wt=>{wt.currentTime=wt.effect.getComputedTiming().delay+br()*qe,wt.pause()});else{const wt=`-${br()*qe}ms`;gn.forEach(Ht=>{ge.length>0&&(v(Ht,"animation-delay",wt),v(Ht,"animation-play-state","paused"))})}},Pn=qe=>{or.forEach(wt=>{wt.effect.updateTiming({delay:uo(),duration:br(),easing:vo(),iterations:Zn(),fill:Eo(),direction:Ur()})}),void 0!==qe&&un(qe)},On=(qe=!0,wt)=>{(0,o.r)(()=>{gn.forEach(Ht=>{v(Ht,"animation-name",_t||null),v(Ht,"animation-duration",`${br()}ms`),v(Ht,"animation-timing-function",vo()),v(Ht,"animation-delay",void 0!==wt?`-${wt*br()}ms`:`${uo()}ms`),v(Ht,"animation-fill-mode",Eo()||null),v(Ht,"animation-direction",Ur()||null);const Kt=Zn()===1/0?"infinite":Zn().toString();v(Ht,"animation-iteration-count",Kt),qe&&v(Ht,"animation-name",`${_t}-alt`),(0,o.r)(()=>{v(Ht,"animation-name",_t||null)})})})},In=(qe=!1,wt=!0,Ht)=>(qe&&Et.forEach(Kt=>{Kt.update(qe,wt,Ht)}),wr?Pn(Ht):On(wt,Ht),At),yo=()=>{Le&&(wr?or.forEach(qe=>{qe.pause()}):gn.forEach(qe=>{v(qe,"animation-play-state","paused")}),Vt=!0)},io=()=>{le=void 0,Yt()},Mo=()=>{le&&clearTimeout(le)},We=qe=>new Promise(wt=>{qe?.sync&&(Ee=!0,Qn(()=>Ee=!1,{oneTimeCallback:!0})),Le||dn(),je&&(wr?(un(0),Pn()):On(),je=!1),Ze&&(_e=Et.length+1,Ze=!1),Qn(()=>wt(),{oneTimeCallback:!0}),Et.forEach(Ht=>{Ht.play()}),wr?(or.forEach(qe=>{qe.play()}),(0===ge.length||0===gn.length)&&Yt()):(()=>{if(Mo(),(0,o.r)(()=>{gn.forEach(qe=>{ge.length>0&&v(qe,"animation-play-state","running")})}),0===ge.length||0===gn.length)Yt();else{const qe=uo()||0,wt=br()||0,Ht=Zn()||1;isFinite(Ht)&&(le=setTimeout(io,qe+wt*Ht+100)),((K,ee)=>{let De;const Te={passive:!0},oe=te=>{K===te.target&&(De&&De(),Mo(),(0,o.r)(()=>{gn.forEach(qe=>{b(qe,"animation-duration"),b(qe,"animation-delay"),b(qe,"animation-play-state")}),(0,o.r)(Yt)}))};K&&(K.addEventListener("webkitAnimationEnd",oe,Te),K.addEventListener("animationend",oe,Te),De=()=>{K.removeEventListener("webkitAnimationEnd",oe,Te),K.removeEventListener("animationend",oe,Te)})})(gn[0])}})(),Vt=!1}),Pt=(qe,wt)=>{const Ht=ge[0];return void 0===Ht||void 0!==Ht.offset&&0!==Ht.offset?ge=[{offset:0,[qe]:wt},...ge]:Ht[qe]=wt,At};return At={parentAnimation:Ce,elements:gn,childAnimations:Et,id:fn,animationFinish:Yt,from:Pt,to:(qe,wt)=>{const Ht=ge[ge.length-1];return void 0===Ht||void 0!==Ht.offset&&1!==Ht.offset?ge=[...ge,{offset:1,[qe]:wt}]:Ht[qe]=wt,At},fromTo:(qe,wt,Ht)=>Pt(qe,wt).to(qe,Ht),parent:qe=>(Ce=qe,At),play:We,pause:()=>(Et.forEach(qe=>{qe.pause()}),yo(),At),stop:()=>{Et.forEach(qe=>{qe.stop()}),Le&&(jr(),Le=!1),we=!1,Ee=!1,Ze=!0,Ue=void 0,ke=void 0,ze=void 0,_e=0,je=!1,ye=!0,Vt=!1},destroy:qe=>(Et.forEach(wt=>{wt.destroy(qe)}),(qe=>{jr(),qe&&Nr()})(qe),gn.length=0,Et.length=0,ge.length=0,mn.length=0,xn.length=0,Le=!1,Ze=!0,At),keyframes:qe=>{const wt=ge!==qe;return ge=qe,wt&&(qe=>{wr?er().forEach(wt=>{if(wt.effect.setKeyframes)wt.effect.setKeyframes(qe);else{const Ht=new KeyframeEffect(wt.effect.target,qe,wt.effect.getTiming());wt.effect=Ht}}):$t()})(ge),At},addAnimation:qe=>{if(null!=qe)if(Array.isArray(qe))for(const wt of qe)wt.parent(At),Et.push(wt);else qe.parent(At),Et.push(qe);return At},addElement:qe=>{if(null!=qe)if(1===qe.nodeType)gn.push(qe);else if(qe.length>=0)for(let wt=0;wt(oe=qe,In(!0),At),direction:qe=>(te=qe,In(!0),At),iterations:qe=>(ce=qe,In(!0),At),duration:qe=>(!wr&&0===qe&&(qe=1),De=qe,In(!0),At),easing:qe=>(Te=qe,In(!0),At),delay:qe=>(ee=qe,In(!0),At),getWebAnimations:er,getKeyframes:()=>ge,getFill:Eo,getDirection:Ur,getDelay:uo,getIterations:Zn,getEasing:vo,getDuration:br,afterAddRead:qe=>(en.push(qe),At),afterAddWrite:qe=>(Gt.push(qe),At),afterClearStyles:(qe=[])=>{for(const wt of qe)Ne[wt]="";return At},afterStyles:(qe={})=>(Ne=qe,At),afterRemoveClass:qe=>(me=W(me,qe),At),afterAddClass:qe=>(se=W(se,qe),At),beforeAddRead:qe=>(ft.push(qe),At),beforeAddWrite:qe=>(Tt.push(qe),At),beforeClearStyles:(qe=[])=>{for(const wt of qe)ie[wt]="";return At},beforeStyles:(qe={})=>(ie=qe,At),beforeRemoveClass:qe=>(he=W(he,qe),At),beforeAddClass:qe=>(xe=W(xe,qe),At),onFinish:Qn,isRunning:()=>0!==_e&&!Vt,progressStart:(qe=!1,wt)=>(Et.forEach(Ht=>{Ht.progressStart(qe,wt)}),yo(),we=qe,Le||dn(),In(!1,!0,wt),At),progressStep:qe=>(Et.forEach(wt=>{wt.progressStep(qe)}),un(qe),At),progressEnd:(qe,wt,Ht)=>(we=!1,Et.forEach(Kt=>{Kt.progressEnd(qe,wt,Ht)}),void 0!==Ht&&(ke=Ht),je=!1,ye=!0,0===qe?(Ue="reverse"===Ur()?"normal":"reverse","reverse"===Ue&&(ye=!1),wr?(In(),un(1-wt)):(ze=(1-wt)*br()*-1,In(!1,!1))):1===qe&&(wr?(In(),un(wt)):(ze=wt*br()*-1,In(!1,!1))),void 0!==qe&&(Qn(()=>{ke=void 0,Ue=void 0,ze=void 0},{oneTimeCallback:!0}),Ce||We()),At)}}},15820:(Ge,$,f)=>{f.d($,{E:()=>F,I:()=>v,a:()=>o,s:()=>b});const o=Y=>{try{if(Y instanceof v)return Y.value;if(!h()||"string"!=typeof Y||""===Y)return Y;if(Y.includes("onload="))return"";const I=document.createDocumentFragment(),D=document.createElement("div");I.appendChild(D),D.innerHTML=Y,L.forEach(K=>{const ee=I.querySelectorAll(K);for(let De=ee.length-1;De>=0;De--){const Te=ee[De];Te.parentNode?Te.parentNode.removeChild(Te):I.removeChild(Te);const ce=g(Te);for(let oe=0;oe{if(Y.nodeType&&1!==Y.nodeType)return;if(typeof NamedNodeMap<"u"&&!(Y.attributes instanceof NamedNodeMap))return void Y.remove();for(let D=Y.attributes.length-1;D>=0;D--){const j=Y.attributes.item(D),W=j.name;if(!m.includes(W.toLowerCase())){Y.removeAttribute(W);continue}const de=j.value,K=Y[W];(null!=de&&de.toLowerCase().includes("javascript:")||null!=K&&K.toLowerCase().includes("javascript:"))&&Y.removeAttribute(W)}const I=g(Y);for(let D=0;Dnull!=Y.children?Y.children:Y.childNodes,h=()=>{var Y;const D=null===(Y=window?.Ionic)||void 0===Y?void 0:Y.config;return!D||(D.get?D.get("sanitizerEnabled",!0):!0===D.sanitizerEnabled||void 0===D.sanitizerEnabled)},m=["class","id","href","src","name","slot"],L=["script","style","iframe","meta","link","object","embed"];class v{constructor(I){this.value=I}}const b=Y=>{const I=window,D=I.Ionic;if(!D||!D.config||"Object"===D.config.constructor.name)return I.Ionic=I.Ionic||{},I.Ionic.config=Object.assign(Object.assign({},I.Ionic.config),Y),I.Ionic.config},F=!0},32225:(Ge,$,f)=>{f.d($,{g:()=>o});const o=(L,v,b,k,F)=>g(L[1],v[1],b[1],k[1],F).map(Y=>a(L[0],v[0],b[0],k[0],Y)),a=(L,v,b,k,F)=>F*(3*v*Math.pow(F-1,2)+F*(-3*b*F+3*b+k*F))-L*Math.pow(F-1,3),g=(L,v,b,k,F)=>m((k-=F)-3*(b-=F)+3*(v-=F)-(L-=F),3*b-6*v+3*L,3*v-3*L,L).filter(I=>I>=0&&I<=1),m=(L,v,b,k)=>{if(0===L)return((L,v,b)=>{const k=v*v-4*L*b;return k<0?[]:[(-v+Math.sqrt(k))/(2*L),(-v-Math.sqrt(k))/(2*L)]})(v,b,k);const F=(3*(b/=L)-(v/=L)*v)/3,Y=(2*v*v*v-9*v*b+27*(k/=L))/27;if(0===F)return[Math.pow(-Y,1/3)];if(0===Y)return[Math.sqrt(-F),-Math.sqrt(-F)];const I=Math.pow(Y/2,2)+Math.pow(F/3,3);if(0===I)return[Math.pow(Y/2,.5)-v/3];if(I>0)return[Math.pow(-Y/2+Math.sqrt(I),1/3)-Math.pow(Y/2+Math.sqrt(I),1/3)-v/3];const D=Math.sqrt(Math.pow(-F/3,3)),j=Math.acos(-Y/(2*Math.sqrt(Math.pow(-F/3,3)))),W=2*Math.pow(D,1/3);return[W*Math.cos(j/3)-v/3,W*Math.cos((j+2*Math.PI)/3)-v/3,W*Math.cos((j+4*Math.PI)/3)-v/3]}},34349:(Ge,$,f)=>{f.d($,{G:()=>m});class a{constructor(v,b,k,F,Y){this.id=b,this.name=k,this.disableScroll=Y,this.priority=1e6*F+b,this.ctrl=v}canStart(){return!!this.ctrl&&this.ctrl.canStart(this.name)}start(){return!!this.ctrl&&this.ctrl.start(this.name,this.id,this.priority)}capture(){if(!this.ctrl)return!1;const v=this.ctrl.capture(this.name,this.id,this.priority);return v&&this.disableScroll&&this.ctrl.disableScroll(this.id),v}release(){this.ctrl&&(this.ctrl.release(this.id),this.disableScroll&&this.ctrl.enableScroll(this.id))}destroy(){this.release(),this.ctrl=void 0}}class g{constructor(v,b,k,F){this.id=b,this.disable=k,this.disableScroll=F,this.ctrl=v}block(){if(this.ctrl){if(this.disable)for(const v of this.disable)this.ctrl.disableGesture(v,this.id);this.disableScroll&&this.ctrl.disableScroll(this.id)}}unblock(){if(this.ctrl){if(this.disable)for(const v of this.disable)this.ctrl.enableGesture(v,this.id);this.disableScroll&&this.ctrl.enableScroll(this.id)}}destroy(){this.unblock(),this.ctrl=void 0}}const h="backdrop-no-scroll",m=new class o{constructor(){this.gestureId=0,this.requestedStart=new Map,this.disabledGestures=new Map,this.disabledScroll=new Set}createGesture(v){var b;return new a(this,this.newID(),v.name,null!==(b=v.priority)&&void 0!==b?b:0,!!v.disableScroll)}createBlocker(v={}){return new g(this,this.newID(),v.disable,!!v.disableScroll)}start(v,b,k){return this.canStart(v)?(this.requestedStart.set(b,k),!0):(this.requestedStart.delete(b),!1)}capture(v,b,k){if(!this.start(v,b,k))return!1;const F=this.requestedStart;let Y=-1e4;if(F.forEach(I=>{Y=Math.max(Y,I)}),Y===k){this.capturedId=b,F.clear();const I=new CustomEvent("ionGestureCaptured",{detail:{gestureName:v}});return document.dispatchEvent(I),!0}return F.delete(b),!1}release(v){this.requestedStart.delete(v),this.capturedId===v&&(this.capturedId=void 0)}disableGesture(v,b){let k=this.disabledGestures.get(v);void 0===k&&(k=new Set,this.disabledGestures.set(v,k)),k.add(b)}enableGesture(v,b){const k=this.disabledGestures.get(v);void 0!==k&&k.delete(b)}disableScroll(v){this.disabledScroll.add(v),1===this.disabledScroll.size&&document.body.classList.add(h)}enableScroll(v){this.disabledScroll.delete(v),0===this.disabledScroll.size&&document.body.classList.remove(h)}canStart(v){return!(void 0!==this.capturedId||this.isDisabled(v))}isCaptured(){return void 0!==this.capturedId}isScrollDisabled(){return this.disabledScroll.size>0}isDisabled(v){const b=this.disabledGestures.get(v);return!!(b&&b.size>0)}newID(){return this.gestureId++,this.gestureId}}},47593:(Ge,$,f)=>{f.r($),f.d($,{MENU_BACK_BUTTON_PRIORITY:()=>m,OVERLAY_BACK_BUTTON_PRIORITY:()=>h,blockHardwareBackButton:()=>a,startHardwareBackButton:()=>g});var o=f(15861);const a=()=>{document.addEventListener("backbutton",()=>{})},g=()=>{const L=document;let v=!1;L.addEventListener("backbutton",()=>{if(v)return;let b=0,k=[];const F=new CustomEvent("ionBackButton",{bubbles:!1,detail:{register(D,j){k.push({priority:D,handler:j,id:b++})}}});L.dispatchEvent(F);const Y=function(){var D=(0,o.Z)(function*(j){try{if(j?.handler){const W=j.handler(I);null!=W&&(yield W)}}catch(W){console.error(W)}});return function(W){return D.apply(this,arguments)}}(),I=()=>{if(k.length>0){let D={priority:Number.MIN_SAFE_INTEGER,handler:()=>{},id:-1};k.forEach(j=>{j.priority>=D.priority&&(D=j)}),v=!0,k=k.filter(j=>j.id!==D.id),Y(D).then(()=>v=!1)}};I()})},h=100,m=99},35730:(Ge,$,f)=>{f.d($,{a:()=>v,b:()=>b,c:()=>g,d:()=>j,e:()=>W,f:()=>D,g:()=>k,h:()=>ce,i:()=>L,j:()=>h,k:()=>I,l:()=>de,m:()=>Y,n:()=>K,o:()=>Te,p:()=>De,q:()=>oe,r:()=>F,s:()=>te,t:()=>o,u:()=>ee});const o=(ge,xe=0)=>new Promise(he=>{a(ge,xe,he)}),a=(ge,xe=0,he)=>{let Le,Ce;const ie={passive:!0},me=()=>{Le&&Le()},Ne=_e=>{(void 0===_e||ge===_e.target)&&(me(),he(_e))};return ge&&(ge.addEventListener("webkitTransitionEnd",Ne,ie),ge.addEventListener("transitionend",Ne,ie),Ce=setTimeout(Ne,xe+500),Le=()=>{Ce&&(clearTimeout(Ce),Ce=void 0),ge.removeEventListener("webkitTransitionEnd",Ne,ie),ge.removeEventListener("transitionend",Ne,ie)}),me},g=(ge,xe)=>{ge.componentOnReady?ge.componentOnReady().then(he=>xe(he)):F(()=>xe(ge))},h=(ge,xe=[])=>{const he={};return xe.forEach(Le=>{ge.hasAttribute(Le)&&(null!==ge.getAttribute(Le)&&(he[Le]=ge.getAttribute(Le)),ge.removeAttribute(Le))}),he},m=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],L=(ge,xe)=>{let he=m;return xe&&xe.length>0&&(he=he.filter(Le=>!xe.includes(Le))),h(ge,he)},v=(ge,xe,he,Le)=>{var Ce;if(typeof window<"u"){const se=null===(Ce=window?.Ionic)||void 0===Ce?void 0:Ce.config;if(se){const me=se.get("_ael");if(me)return me(ge,xe,he,Le);if(se._ael)return se._ael(ge,xe,he,Le)}}return ge.addEventListener(xe,he,Le)},b=(ge,xe,he,Le)=>{var Ce;if(typeof window<"u"){const se=null===(Ce=window?.Ionic)||void 0===Ce?void 0:Ce.config;if(se){const me=se.get("_rel");if(me)return me(ge,xe,he,Le);if(se._rel)return se._rel(ge,xe,he,Le)}}return ge.removeEventListener(xe,he,Le)},k=(ge,xe=ge)=>ge.shadowRoot||xe,F=ge=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(ge):"function"==typeof requestAnimationFrame?requestAnimationFrame(ge):setTimeout(ge),Y=ge=>!!ge.shadowRoot&&!!ge.attachShadow,I=ge=>{const xe=ge.closest("ion-item");return xe?xe.querySelector("ion-label"):null},D=ge=>{if(ge.focus(),ge.classList.contains("ion-focusable")){const xe=ge.closest("ion-app");xe&&xe.setFocus([ge])}},j=(ge,xe)=>{let he;const Le=ge.getAttribute("aria-labelledby"),Ce=ge.id;let ie=null!==Le&&""!==Le.trim()?Le:xe+"-lbl",se=null!==Le&&""!==Le.trim()?document.getElementById(Le):I(ge);return se?(null===Le&&(se.id=ie),he=se.textContent,se.setAttribute("aria-hidden","true")):""!==Ce.trim()&&(se=document.querySelector(`label[for="${Ce}"]`),se&&(""!==se.id?ie=se.id:se.id=ie=`${Ce}-lbl`,he=se.textContent)),{label:se,labelId:ie,labelText:he}},W=(ge,xe,he,Le,Ce)=>{if(ge||Y(xe)){let ie=xe.querySelector("input.aux-input");ie||(ie=xe.ownerDocument.createElement("input"),ie.type="hidden",ie.classList.add("aux-input"),xe.appendChild(ie)),ie.disabled=Ce,ie.name=he,ie.value=Le||""}},de=(ge,xe,he)=>Math.max(ge,Math.min(xe,he)),K=(ge,xe)=>{if(!ge){const he="ASSERT: "+xe;throw console.error(he),new Error(he)}},ee=ge=>ge.timeStamp||Date.now(),De=ge=>{if(ge){const xe=ge.changedTouches;if(xe&&xe.length>0){const he=xe[0];return{x:he.clientX,y:he.clientY}}if(void 0!==ge.pageX)return{x:ge.pageX,y:ge.pageY}}return{x:0,y:0}},Te=ge=>{const xe="rtl"===document.dir;switch(ge){case"start":return xe;case"end":return!xe;default:throw new Error(`"${ge}" is not a valid value for [side]. Use "start" or "end" instead.`)}},ce=(ge,xe)=>{const he=ge._original||ge;return{_original:ge,emit:oe(he.emit.bind(he),xe)}},oe=(ge,xe=0)=>{let he;return(...Le)=>{clearTimeout(he),he=setTimeout(ge,xe,...Le)}},te=(ge,xe)=>{if(ge??(ge={}),xe??(xe={}),ge===xe)return!0;const he=Object.keys(ge);if(he.length!==Object.keys(xe).length)return!1;for(const Le of he)if(!(Le in xe)||ge[Le]!==xe[Le])return!1;return!0}},1843:(Ge,$,f)=>{f.d($,{L:()=>h,a:()=>m,b:()=>L,c:()=>v,d:()=>b,e:()=>xe,g:()=>Ce,l:()=>te,s:()=>he,t:()=>Y});var o=f(15861),a=f(71308),g=f(35730);const h="ionViewWillEnter",m="ionViewDidEnter",L="ionViewWillLeave",v="ionViewDidLeave",b="ionViewWillUnload",Y=ie=>new Promise((se,me)=>{(0,a.c)(()=>{I(ie),D(ie).then(Ne=>{Ne.animation&&Ne.animation.destroy(),j(ie),se(Ne)},Ne=>{j(ie),me(Ne)})})}),I=ie=>{const se=ie.enteringEl,me=ie.leavingEl;Le(se,me,ie.direction),ie.showGoBack?se.classList.add("can-go-back"):se.classList.remove("can-go-back"),he(se,!1),se.style.setProperty("pointer-events","none"),me&&(he(me,!1),me.style.setProperty("pointer-events","none"))},D=function(){var ie=(0,o.Z)(function*(se){const me=yield W(se);return me&&a.B.isBrowser?de(me,se):K(se)});return function(me){return ie.apply(this,arguments)}}(),j=ie=>{const se=ie.enteringEl,me=ie.leavingEl;se.classList.remove("ion-page-invisible"),se.style.removeProperty("pointer-events"),void 0!==me&&(me.classList.remove("ion-page-invisible"),me.style.removeProperty("pointer-events"))},W=function(){var ie=(0,o.Z)(function*(se){return se.leavingEl&&se.animated&&0!==se.duration?se.animationBuilder?se.animationBuilder:"ios"===se.mode?(yield Promise.resolve().then(f.bind(f,66439))).iosTransitionAnimation:(yield Promise.resolve().then(f.bind(f,87838))).mdTransitionAnimation:void 0});return function(me){return ie.apply(this,arguments)}}(),de=function(){var ie=(0,o.Z)(function*(se,me){yield ee(me,!0);const Ne=se(me.baseEl,me);ce(me.enteringEl,me.leavingEl);const _e=yield Te(Ne,me);return me.progressCallback&&me.progressCallback(void 0),_e&&oe(me.enteringEl,me.leavingEl),{hasCompleted:_e,animation:Ne}});return function(me,Ne){return ie.apply(this,arguments)}}(),K=function(){var ie=(0,o.Z)(function*(se){const me=se.enteringEl,Ne=se.leavingEl;return yield ee(se,!1),ce(me,Ne),oe(me,Ne),{hasCompleted:!0}});return function(me){return ie.apply(this,arguments)}}(),ee=function(){var ie=(0,o.Z)(function*(se,me){const _e=(void 0!==se.deepWait?se.deepWait:me)?[xe(se.enteringEl),xe(se.leavingEl)]:[ge(se.enteringEl),ge(se.leavingEl)];yield Promise.all(_e),yield De(se.viewIsReady,se.enteringEl)});return function(me,Ne){return ie.apply(this,arguments)}}(),De=function(){var ie=(0,o.Z)(function*(se,me){se&&(yield se(me))});return function(me,Ne){return ie.apply(this,arguments)}}(),Te=(ie,se)=>{const me=se.progressCallback,Ne=new Promise(_e=>{ie.onFinish(we=>_e(1===we))});return me?(ie.progressStart(!0),me(ie)):ie.play(),Ne},ce=(ie,se)=>{te(se,L),te(ie,h)},oe=(ie,se)=>{te(ie,m),te(se,v)},te=(ie,se)=>{if(ie){const me=new CustomEvent(se,{bubbles:!1,cancelable:!1});ie.dispatchEvent(me)}},ge=ie=>ie?new Promise(se=>(0,g.c)(ie,se)):Promise.resolve(),xe=function(){var ie=(0,o.Z)(function*(se){const me=se;if(me){if(null!=me.componentOnReady){if(null!=(yield me.componentOnReady()))return}else if(null!=me.__registerHost)return void(yield new Promise(_e=>(0,g.r)(_e)));yield Promise.all(Array.from(me.children).map(xe))}});return function(me){return ie.apply(this,arguments)}}(),he=(ie,se)=>{se?(ie.setAttribute("aria-hidden","true"),ie.classList.add("ion-page-hidden")):(ie.hidden=!1,ie.removeAttribute("aria-hidden"),ie.classList.remove("ion-page-hidden"))},Le=(ie,se,me)=>{void 0!==ie&&(ie.style.zIndex="back"===me?"99":"101"),void 0!==se&&(se.style.zIndex="100")},Ce=ie=>ie.classList.contains("ion-page")?ie:ie.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||ie},56369:(Ge,$,f)=>{f.d($,{m:()=>Y});var o=f(15861),a=f(47593),g=f(35730),h=f(35179),m=f(90181);const L=I=>(0,m.c)().duration(I?400:300),v=I=>{let D,j;const W=I.width+8,de=(0,m.c)(),K=(0,m.c)();I.isEndSide?(D=W+"px",j="0px"):(D=-W+"px",j="0px"),de.addElement(I.menuInnerEl).fromTo("transform",`translateX(${D})`,`translateX(${j})`);const De="ios"===(0,h.b)(I),Te=De?.2:.25;return K.addElement(I.backdropEl).fromTo("opacity",.01,Te),L(De).addAnimation([de,K])},b=I=>{let D,j;const W=(0,h.b)(I),de=I.width;I.isEndSide?(D=-de+"px",j=de+"px"):(D=de+"px",j=-de+"px");const K=(0,m.c)().addElement(I.menuInnerEl).fromTo("transform",`translateX(${j})`,"translateX(0px)"),ee=(0,m.c)().addElement(I.contentEl).fromTo("transform","translateX(0px)",`translateX(${D})`),De=(0,m.c)().addElement(I.backdropEl).fromTo("opacity",.01,.32);return L("ios"===W).addAnimation([K,ee,De])},k=I=>{const D=(0,h.b)(I),j=I.width*(I.isEndSide?-1:1)+"px",W=(0,m.c)().addElement(I.contentEl).fromTo("transform","translateX(0px)",`translateX(${j})`);return L("ios"===D).addAnimation(W)},Y=(()=>{const I=new Map,D=[],j=function(){var le=(0,o.Z)(function*(Ue){const ke=yield ce(Ue);return!!ke&&ke.open()});return function(ke){return le.apply(this,arguments)}}(),W=function(){var le=(0,o.Z)(function*(Ue){const ke=yield void 0!==Ue?ce(Ue):oe();return void 0!==ke&&ke.close()});return function(ke){return le.apply(this,arguments)}}(),de=function(){var le=(0,o.Z)(function*(Ue){const ke=yield ce(Ue);return!!ke&&ke.toggle()});return function(ke){return le.apply(this,arguments)}}(),K=function(){var le=(0,o.Z)(function*(Ue,ke){const ze=yield ce(ke);return ze&&(ze.disabled=!Ue),ze});return function(ke,ze){return le.apply(this,arguments)}}(),ee=function(){var le=(0,o.Z)(function*(Ue,ke){const ze=yield ce(ke);return ze&&(ze.swipeGesture=Ue),ze});return function(ke,ze){return le.apply(this,arguments)}}(),De=function(){var le=(0,o.Z)(function*(Ue){if(null!=Ue){const ke=yield ce(Ue);return void 0!==ke&&ke.isOpen()}return void 0!==(yield oe())});return function(ke){return le.apply(this,arguments)}}(),Te=function(){var le=(0,o.Z)(function*(Ue){const ke=yield ce(Ue);return!!ke&&!ke.disabled});return function(ke){return le.apply(this,arguments)}}(),ce=function(){var le=(0,o.Z)(function*(Ue){return yield Ee(),"start"===Ue||"end"===Ue?we(ye=>ye.side===Ue&&!ye.disabled)||we(ye=>ye.side===Ue):null!=Ue?we(ze=>ze.menuId===Ue):we(ze=>!ze.disabled)||(D.length>0?D[0].el:void 0)});return function(ke){return le.apply(this,arguments)}}(),oe=function(){var le=(0,o.Z)(function*(){return yield Ee(),me()});return function(){return le.apply(this,arguments)}}(),te=function(){var le=(0,o.Z)(function*(){return yield Ee(),Ne()});return function(){return le.apply(this,arguments)}}(),ge=function(){var le=(0,o.Z)(function*(){return yield Ee(),_e()});return function(){return le.apply(this,arguments)}}(),xe=(le,Ue)=>{I.set(le,Ue)},Ce=le=>{const Ue=le.side;D.filter(ke=>ke.side===Ue&&ke!==le).forEach(ke=>ke.disabled=!0)},ie=function(){var le=(0,o.Z)(function*(Ue,ke,ze){if(_e())return!1;if(ke){const ye=yield oe();ye&&Ue.el!==ye&&(yield ye.setOpen(!1,!1))}return Ue._setOpen(ke,ze)});return function(ke,ze,ye){return le.apply(this,arguments)}}(),me=()=>we(le=>le._isOpen),Ne=()=>D.map(le=>le.el),_e=()=>D.some(le=>le.isAnimating),we=le=>{const Ue=D.find(le);if(void 0!==Ue)return Ue.el},Ee=()=>Promise.all(Array.from(document.querySelectorAll("ion-menu")).map(le=>new Promise(Ue=>(0,g.c)(le,Ue))));return xe("reveal",k),xe("push",b),xe("overlay",v),typeof document<"u"&&document.addEventListener("ionBackButton",le=>{const Ue=me();Ue&&le.detail.register(a.MENU_BACK_BUTTON_PRIORITY,()=>Ue.close())}),{registerAnimation:xe,get:ce,getMenus:te,getOpen:oe,isEnabled:Te,swipeGesture:ee,isAnimating:ge,isOpen:De,enable:K,toggle:de,close:W,open:j,_getOpenSync:me,_createAnimation:(le,Ue)=>{const ke=I.get(le);if(!ke)throw new Error("animation not registered");return ke(Ue)},_register:le=>{D.indexOf(le)<0&&(le.disabled||Ce(le),D.push(le))},_unregister:le=>{const Ue=D.indexOf(le);Ue>-1&&D.splice(Ue,1)},_setOpen:ie,_setActiveMenu:Ce}})()},13457:(Ge,$,f)=>{f.d($,{w:()=>o});const o=typeof window<"u"?window:void 0},81898:(Ge,$,f)=>{f.r($),f.d($,{GESTURE_CONTROLLER:()=>o.G,createGesture:()=>k});var o=f(34349);const a=(D,j,W,de)=>{const K=g(D)?{capture:!!de.capture,passive:!!de.passive}:!!de.capture;let ee,De;return D.__zone_symbol__addEventListener?(ee="__zone_symbol__addEventListener",De="__zone_symbol__removeEventListener"):(ee="addEventListener",De="removeEventListener"),D[ee](j,W,K),()=>{D[De](j,W,K)}},g=D=>{if(void 0===h)try{const j=Object.defineProperty({},"passive",{get:()=>{h=!0}});D.addEventListener("optsTest",()=>{},j)}catch{h=!1}return!!h};let h;const v=D=>D instanceof Document?D:D.ownerDocument,k=D=>{let j=!1,W=!1,de=!0,K=!1;const ee=Object.assign({disableScroll:!1,direction:"x",gesturePriority:0,passive:!0,maxAngle:40,threshold:10},D),De=ee.canStart,Te=ee.onWillStart,ce=ee.onStart,oe=ee.onEnd,te=ee.notCaptured,ge=ee.onMove,xe=ee.threshold,he=ee.passive,Le=ee.blurOnStart,Ce={type:"pan",startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,event:void 0,data:void 0},ie=((D,j,W)=>{const de=W*(Math.PI/180),K="x"===D,ee=Math.cos(de),De=j*j;let Te=0,ce=0,oe=!1,te=0;return{start(ge,xe){Te=ge,ce=xe,te=0,oe=!0},detect(ge,xe){if(!oe)return!1;const he=ge-Te,Le=xe-ce,Ce=he*he+Le*Le;if(Ceee?1:se<-ee?-1:0,oe=!1,!0},isGesture:()=>0!==te,getDirection:()=>te}})(ee.direction,ee.threshold,ee.maxAngle),se=o.G.createGesture({name:D.gestureName,priority:D.gesturePriority,disableScroll:D.disableScroll}),_e=()=>{!j||(K=!1,ge&&ge(Ce))},we=()=>!!se.capture()&&(j=!0,de=!1,Ce.startX=Ce.currentX,Ce.startY=Ce.currentY,Ce.startTime=Ce.currentTime,Te?Te(Ce).then(le):le(),!0),le=()=>{Le&&(()=>{if(typeof document<"u"){const je=document.activeElement;je?.blur&&je.blur()}})(),ce&&ce(Ce),de=!0},Ue=()=>{j=!1,W=!1,K=!1,de=!0,se.release()},ke=je=>{const Ze=j,_t=de;if(Ue(),_t){if(F(Ce,je),Ze)return void(oe&&oe(Ce));te&&te(Ce)}},ze=((D,j,W,de,K)=>{let ee,De,Te,ce,oe,te,ge,xe=0;const he=Ee=>{xe=Date.now()+2e3,j(Ee)&&(!De&&W&&(De=a(D,"touchmove",W,K)),Te||(Te=a(Ee.target,"touchend",Ce,K)),ce||(ce=a(Ee.target,"touchcancel",Ce,K)))},Le=Ee=>{xe>Date.now()||!j(Ee)||(!te&&W&&(te=a(v(D),"mousemove",W,K)),ge||(ge=a(v(D),"mouseup",ie,K)))},Ce=Ee=>{se(),de&&de(Ee)},ie=Ee=>{me(),de&&de(Ee)},se=()=>{De&&De(),Te&&Te(),ce&&ce(),De=Te=ce=void 0},me=()=>{te&&te(),ge&&ge(),te=ge=void 0},Ne=()=>{se(),me()},_e=(Ee=!0)=>{Ee?(ee||(ee=a(D,"touchstart",he,K)),oe||(oe=a(D,"mousedown",Le,K))):(ee&&ee(),oe&&oe(),ee=oe=void 0,Ne())};return{enable:_e,stop:Ne,destroy:()=>{_e(!1),de=W=j=void 0}}})(ee.el,je=>{const Ze=I(je);return!(W||!de||(Y(je,Ce),Ce.startX=Ce.currentX,Ce.startY=Ce.currentY,Ce.startTime=Ce.currentTime=Ze,Ce.velocityX=Ce.velocityY=Ce.deltaX=Ce.deltaY=0,Ce.event=je,De&&!1===De(Ce))||(se.release(),!se.start()))&&(W=!0,0===xe?we():(ie.start(Ce.startX,Ce.startY),!0))},je=>{j?!K&&de&&(K=!0,F(Ce,je),requestAnimationFrame(_e)):(F(Ce,je),ie.detect(Ce.currentX,Ce.currentY)&&(!ie.isGesture()||!we())&&ye())},ke,{capture:!1,passive:he}),ye=()=>{Ue(),ze.stop(),te&&te(Ce)};return{enable(je=!0){je||(j&&ke(void 0),Ue()),ze.enable(je)},destroy(){se.destroy(),ze.destroy()}}},F=(D,j)=>{if(!j)return;const W=D.currentX,de=D.currentY,K=D.currentTime;Y(j,D);const ee=D.currentX,De=D.currentY,ce=(D.currentTime=I(j))-K;if(ce>0&&ce<100){const te=(De-de)/ce;D.velocityX=(ee-W)/ce*.7+.3*D.velocityX,D.velocityY=.7*te+.3*D.velocityY}D.deltaX=ee-D.startX,D.deltaY=De-D.startY,D.event=j},Y=(D,j)=>{let W=0,de=0;if(D){const K=D.changedTouches;if(K&&K.length>0){const ee=K[0];W=ee.clientX,de=ee.clientY}else void 0!==D.pageX&&(W=D.pageX,de=D.pageY)}j.currentX=W,j.currentY=de},I=D=>D.timeStamp||Date.now()},71308:(Ge,$,f)=>{f.d($,{B:()=>Po,H:()=>gn,a:()=>ye,b:()=>xt,c:()=>tr,e:()=>Yo,f:()=>Zi,g:()=>je,h:()=>mn,i:()=>ki,j:()=>Ur,k:()=>rt,p:()=>de,r:()=>Wt,s:()=>j});var o=f(15861);let g,h,m,L=!1,v=!1,b=!1,k=!1,F=!1;const Y=typeof window<"u"?window:{},I=Y.document||{head:{}},D={$flags$:0,$resourcesUrl$:"",jmp:We=>We(),raf:We=>requestAnimationFrame(We),ael:(We,ot,Pt,zt)=>We.addEventListener(ot,Pt,zt),rel:(We,ot,Pt,zt)=>We.removeEventListener(ot,Pt,zt),ce:(We,ot)=>new CustomEvent(We,ot)},j=We=>{Object.assign(D,We)},de=We=>Promise.resolve(We),K=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),ee=(We,ot,Pt,zt)=>{Pt&&Pt.map(([Qt,qe,wt])=>{const Ht=Te(We,Qt),Kt=De(ot,wt),on=ce(Qt);D.ael(Ht,qe,Kt,on),(ot.$rmListeners$=ot.$rmListeners$||[]).push(()=>D.rel(Ht,qe,Kt,on))})},De=(We,ot)=>Pt=>{try{256&We.$flags$?We.$lazyInstance$[ot](Pt):(We.$queuedListeners$=We.$queuedListeners$||[]).push([ot,Pt])}catch(zt){Pn(zt)}},Te=(We,ot)=>4&ot?I:8&ot?Y:16&ot?I.body:We,ce=We=>0!=(2&We),he="s-id",Le="sty-id",se="http://www.w3.org/1999/xlink",_e=new WeakMap,we=(We,ot,Pt)=>{let zt=Fn.get(We);K&&Pt?(zt=zt||new CSSStyleSheet,"string"==typeof zt?zt=ot:zt.replaceSync(ot)):zt=ot,Fn.set(We,zt)},Ee=(We,ot,Pt,zt)=>{let Qt=Ue(ot,Pt);const qe=Fn.get(Qt);if(We=11===We.nodeType?We:I,qe)if("string"==typeof qe){let Ht,wt=_e.get(We=We.head||We);wt||_e.set(We,wt=new Set),wt.has(Qt)||(We.host&&(Ht=We.querySelector(`[${Le}="${Qt}"]`))?Ht.innerHTML=qe:(Ht=I.createElement("style"),Ht.innerHTML=qe,We.insertBefore(Ht,We.querySelector("link"))),wt&&wt.add(Qt))}else We.adoptedStyleSheets.includes(qe)||(We.adoptedStyleSheets=[...We.adoptedStyleSheets,qe]);return Qt},Ue=(We,ot)=>"sc-"+(ot&&32&We.$flags$?We.$tagName$+"-"+ot:We.$tagName$),ke=We=>We.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),ye=We=>Hr.push(We),je=We=>$t(We).$modeName$,Ze={},fn=We=>"object"==(We=typeof We)||"function"===We,mn=(We,ot,...Pt)=>{let zt=null,Qt=null,qe=null,wt=!1,Ht=!1;const Kt=[],on=Yn=>{for(let Hn=0;HnYn[Hn]).join(" "))}}if("function"==typeof We)return We(null===ot?{}:ot,Kt,cn);const Mn=xn(We,null);return Mn.$attrs$=ot,Kt.length>0&&(Mn.$children$=Kt),Mn.$key$=Qt,Mn.$name$=qe,Mn},xn=(We,ot)=>({$flags$:0,$tag$:We,$text$:ot,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null}),gn={},cn={forEach:(We,ot)=>We.map(ft).forEach(ot),map:(We,ot)=>We.map(ft).map(ot).map(Tt)},ft=We=>({vattrs:We.$attrs$,vchildren:We.$children$,vkey:We.$key$,vname:We.$name$,vtag:We.$tag$,vtext:We.$text$}),Tt=We=>{if("function"==typeof We.vtag){const Pt=Object.assign({},We.vattrs);return We.vkey&&(Pt.key=We.vkey),We.vname&&(Pt.name=We.vname),mn(We.vtag,Pt,...We.vchildren||[])}const ot=xn(We.vtag,We.vtext);return ot.$attrs$=We.vattrs,ot.$children$=We.vchildren,ot.$key$=We.vkey,ot.$name$=We.vname,ot},en=(We,ot,Pt,zt,Qt,qe)=>{if(Pt!==zt){let wt=un(We,ot),Ht=ot.toLowerCase();if("class"===ot){const Kt=We.classList,on=or(Pt),Mn=or(zt);Kt.remove(...on.filter(Yn=>Yn&&!Mn.includes(Yn))),Kt.add(...Mn.filter(Yn=>Yn&&!on.includes(Yn)))}else if("style"===ot){for(const Kt in Pt)(!zt||null==zt[Kt])&&(Kt.includes("-")?We.style.removeProperty(Kt):We.style[Kt]="");for(const Kt in zt)(!Pt||zt[Kt]!==Pt[Kt])&&(Kt.includes("-")?We.style.setProperty(Kt,zt[Kt]):We.style[Kt]=zt[Kt])}else if("key"!==ot)if("ref"===ot)zt&&zt(We);else if(wt||"o"!==ot[0]||"n"!==ot[1]){const Kt=fn(zt);if((wt||Kt&&null!==zt)&&!Qt)try{if(We.tagName.includes("-"))We[ot]=zt;else{const Mn=zt??"";"list"===ot?wt=!1:(null==Pt||We[ot]!=Mn)&&(We[ot]=Mn)}}catch{}let on=!1;Ht!==(Ht=Ht.replace(/^xlink\:?/,""))&&(ot=Ht,on=!0),null==zt||!1===zt?(!1!==zt||""===We.getAttribute(ot))&&(on?We.removeAttributeNS(se,ot):We.removeAttribute(ot)):(!wt||4&qe||Qt)&&!Kt&&(zt=!0===zt?"":zt,on?We.setAttributeNS(se,ot,zt):We.setAttribute(ot,zt))}else ot="-"===ot[2]?ot.slice(3):un(Y,Ht)?Ht.slice(2):Ht[2]+ot.slice(3),Pt&&D.rel(We,ot,Pt,!1),zt&&D.ael(We,ot,zt,!1)}},Gt=/\s/,or=We=>We?We.split(Gt):[],Cr=(We,ot,Pt,zt)=>{const Qt=11===ot.$elm$.nodeType&&ot.$elm$.host?ot.$elm$.host:ot.$elm$,qe=We&&We.$attrs$||Ze,wt=ot.$attrs$||Ze;for(zt in qe)zt in wt||en(Qt,zt,qe[zt],void 0,Pt,ot.$flags$);for(zt in wt)en(Qt,zt,qe[zt],wt[zt],Pt,ot.$flags$)},wr=(We,ot,Pt,zt)=>{const Qt=ot.$children$[Pt];let wt,Ht,Kt,qe=0;if(L||(b=!0,"slot"===Qt.$tag$&&(g&&zt.classList.add(g+"-s"),Qt.$flags$|=Qt.$children$?2:1)),null!==Qt.$text$)wt=Qt.$elm$=I.createTextNode(Qt.$text$);else if(1&Qt.$flags$)wt=Qt.$elm$=I.createTextNode("");else{if(k||(k="svg"===Qt.$tag$),wt=Qt.$elm$=I.createElementNS(k?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&Qt.$flags$?"slot-fb":Qt.$tag$),k&&"foreignObject"===Qt.$tag$&&(k=!1),Cr(null,Qt,k),(We=>null!=We)(g)&&wt["s-si"]!==g&&wt.classList.add(wt["s-si"]=g),Qt.$children$)for(qe=0;qe{D.$flags$|=1;const Pt=We.childNodes;for(let zt=Pt.length-1;zt>=0;zt--){const Qt=Pt[zt];Qt["s-hn"]!==m&&Qt["s-ol"]&&(Qn(Qt).insertBefore(Qt,Gr(Qt)),Qt["s-ol"].remove(),Qt["s-ol"]=void 0,b=!0),ot&&dr(Qt,ot)}D.$flags$&=-2},er=(We,ot,Pt,zt,Qt,qe)=>{let Ht,wt=We["s-cr"]&&We["s-cr"].parentNode||We;for(wt.shadowRoot&&wt.tagName===m&&(wt=wt.shadowRoot);Qt<=qe;++Qt)zt[Qt]&&(Ht=wr(null,Pt,Qt,We),Ht&&(zt[Qt].$elm$=Ht,wt.insertBefore(Ht,Gr(ot))))},Jn=(We,ot,Pt,zt,Qt)=>{for(;ot<=Pt;++ot)(zt=We[ot])&&(Qt=zt.$elm$,ro(zt),v=!0,Qt["s-ol"]?Qt["s-ol"].remove():dr(Qt,!0),Qt.remove())},lo=(We,ot)=>We.$tag$===ot.$tag$&&("slot"===We.$tag$?We.$name$===ot.$name$:We.$key$===ot.$key$),Gr=We=>We&&We["s-ol"]||We,Qn=We=>(We["s-ol"]?We["s-ol"]:We).parentNode,Pr=(We,ot)=>{const Pt=ot.$elm$=We.$elm$,zt=We.$children$,Qt=ot.$children$,qe=ot.$tag$,wt=ot.$text$;let Ht;null===wt?(k="svg"===qe||"foreignObject"!==qe&&k,"slot"===qe||Cr(We,ot,k),null!==zt&&null!==Qt?((We,ot,Pt,zt)=>{let Co,bo,Qt=0,qe=0,wt=0,Ht=0,Kt=ot.length-1,on=ot[0],Mn=ot[Kt],Yn=zt.length-1,Hn=zt[0],Sr=zt[Yn];for(;Qt<=Kt&&qe<=Yn;)if(null==on)on=ot[++Qt];else if(null==Mn)Mn=ot[--Kt];else if(null==Hn)Hn=zt[++qe];else if(null==Sr)Sr=zt[--Yn];else if(lo(on,Hn))Pr(on,Hn),on=ot[++Qt],Hn=zt[++qe];else if(lo(Mn,Sr))Pr(Mn,Sr),Mn=ot[--Kt],Sr=zt[--Yn];else if(lo(on,Sr))("slot"===on.$tag$||"slot"===Sr.$tag$)&&dr(on.$elm$.parentNode,!1),Pr(on,Sr),We.insertBefore(on.$elm$,Mn.$elm$.nextSibling),on=ot[++Qt],Sr=zt[--Yn];else if(lo(Mn,Hn))("slot"===on.$tag$||"slot"===Sr.$tag$)&&dr(Mn.$elm$.parentNode,!1),Pr(Mn,Hn),We.insertBefore(Mn.$elm$,on.$elm$),Mn=ot[--Kt],Hn=zt[++qe];else{for(wt=-1,Ht=Qt;Ht<=Kt;++Ht)if(ot[Ht]&&null!==ot[Ht].$key$&&ot[Ht].$key$===Hn.$key$){wt=Ht;break}wt>=0?(bo=ot[wt],bo.$tag$!==Hn.$tag$?Co=wr(ot&&ot[qe],Pt,wt,We):(Pr(bo,Hn),ot[wt]=void 0,Co=bo.$elm$),Hn=zt[++qe]):(Co=wr(ot&&ot[qe],Pt,qe,We),Hn=zt[++qe]),Co&&Qn(on.$elm$).insertBefore(Co,Gr(on.$elm$))}Qt>Kt?er(We,null==zt[Yn+1]?null:zt[Yn+1].$elm$,Pt,zt,qe,Yn):qe>Yn&&Jn(ot,Qt,Kt)})(Pt,zt,ot,Qt):null!==Qt?(null!==We.$text$&&(Pt.textContent=""),er(Pt,null,ot,Qt,0,Qt.length-1)):null!==zt&&Jn(zt,0,zt.length-1),k&&"svg"===qe&&(k=!1)):(Ht=Pt["s-cr"])?Ht.parentNode.textContent=wt:We.$text$!==wt&&(Pt.data=wt)},jr=We=>{const ot=We.childNodes;let Pt,zt,Qt,qe,wt,Ht;for(zt=0,Qt=ot.length;zt{let ot,Pt,zt,Qt,qe,wt,Ht=0;const Kt=We.childNodes,on=Kt.length;for(;Ht=0;wt--)Pt=zt[wt],!Pt["s-cn"]&&!Pt["s-nr"]&&Pt["s-hn"]!==ot["s-hn"]&&(Zr(Pt,Qt)?(qe=Nr.find(Mn=>Mn.$nodeToRelocate$===Pt),v=!0,Pt["s-sn"]=Pt["s-sn"]||Qt,qe?qe.$slotRefNode$=ot:Nr.push({$slotRefNode$:ot,$nodeToRelocate$:Pt}),Pt["s-sr"]&&Nr.map(Mn=>{Zr(Mn.$nodeToRelocate$,Pt["s-sn"])&&(qe=Nr.find(Yn=>Yn.$nodeToRelocate$===Pt),qe&&!Mn.$slotRefNode$&&(Mn.$slotRefNode$=qe.$slotRefNode$))})):Nr.some(Mn=>Mn.$nodeToRelocate$===Pt)||Nr.push({$nodeToRelocate$:Pt}));1===ot.nodeType&&go(ot)}},Zr=(We,ot)=>1===We.nodeType?null===We.getAttribute("slot")&&""===ot||We.getAttribute("slot")===ot:We["s-sn"]===ot||""===ot,ro=We=>{We.$attrs$&&We.$attrs$.ref&&We.$attrs$.ref(null),We.$children$&&We.$children$.map(ro)},ki=We=>$t(We).$hostElement$,Yo=(We,ot,Pt)=>{const zt=ki(We);return{emit:Qt=>Ko(zt,ot,{bubbles:!!(4&Pt),composed:!!(2&Pt),cancelable:!!(1&Pt),detail:Qt})}},Ko=(We,ot,Pt)=>{const zt=D.ce(ot,Pt);return We.dispatchEvent(zt),zt},wo=(We,ot)=>{ot&&!We.$onRenderResolve$&&ot["s-p"]&&ot["s-p"].push(new Promise(Pt=>We.$onRenderResolve$=Pt))},$r=(We,ot)=>{if(We.$flags$|=16,!(4&We.$flags$))return wo(We,We.$ancestorComponent$),tr(()=>hi(We,ot));We.$flags$|=512},hi=(We,ot)=>{const zt=We.$lazyInstance$;let Qt;return ot&&(We.$flags$|=256,We.$queuedListeners$&&(We.$queuedListeners$.map(([qe,wt])=>br(zt,qe,wt)),We.$queuedListeners$=null),Qt=br(zt,"componentWillLoad")),Qt=Zn(Qt,()=>br(zt,"componentWillRender")),Zn(Qt,()=>mi(We,zt,ot))},mi=function(){var We=(0,o.Z)(function*(ot,Pt,zt){const Qt=ot.$hostElement$,wt=Qt["s-rc"];zt&&(We=>{const ot=We.$cmpMeta$,Pt=We.$hostElement$,zt=ot.$flags$,qe=Ee(Pt.shadowRoot?Pt.shadowRoot:Pt.getRootNode(),ot,We.$modeName$);10&zt&&(Pt["s-sc"]=qe,Pt.classList.add(qe+"-h"),2&zt&&Pt.classList.add(qe+"-s"))})(ot);vn(ot,Pt),wt&&(wt.map(Kt=>Kt()),Qt["s-rc"]=void 0);{const Kt=Qt["s-p"],on=()=>Eo(ot);0===Kt.length?on():(Promise.all(Kt).then(on),ot.$flags$|=4,Kt.length=0)}});return function(Pt,zt,Qt){return We.apply(this,arguments)}}(),vn=(We,ot,Pt)=>{try{ot=ot.render&&ot.render(),We.$flags$&=-17,We.$flags$|=2,((We,ot)=>{const Pt=We.$hostElement$,zt=We.$cmpMeta$,Qt=We.$vnode$||xn(null,null),qe=(We=>We&&We.$tag$===gn)(ot)?ot:mn(null,null,ot);if(m=Pt.tagName,zt.$attrsToReflect$&&(qe.$attrs$=qe.$attrs$||{},zt.$attrsToReflect$.map(([wt,Ht])=>qe.$attrs$[Ht]=Pt[wt])),qe.$tag$=null,qe.$flags$|=4,We.$vnode$=qe,qe.$elm$=Qt.$elm$=Pt.shadowRoot||Pt,g=Pt["s-sc"],h=Pt["s-cr"],L=0!=(1&zt.$flags$),v=!1,Pr(Qt,qe),D.$flags$|=1,b){go(qe.$elm$);let wt,Ht,Kt,on,Mn,Yn,Hn=0;for(;Hn{const Pt=We.$hostElement$,Qt=We.$lazyInstance$,qe=We.$ancestorComponent$;br(Qt,"componentDidRender"),64&We.$flags$?br(Qt,"componentDidUpdate"):(We.$flags$|=64,uo(Pt),br(Qt,"componentDidLoad"),We.$onReadyResolve$(Pt),qe||vo()),We.$onInstanceResolve$(Pt),We.$onRenderResolve$&&(We.$onRenderResolve$(),We.$onRenderResolve$=void 0),512&We.$flags$&&bi(()=>$r(We,!1)),We.$flags$&=-517},Ur=We=>{{const ot=$t(We),Pt=ot.$hostElement$.isConnected;return Pt&&2==(18&ot.$flags$)&&$r(ot,!1),Pt}},vo=We=>{uo(I.documentElement),bi(()=>Ko(Y,"appload",{detail:{namespace:"ionic"}}))},br=(We,ot,Pt)=>{if(We&&We[ot])try{return We[ot](Pt)}catch(zt){Pn(zt)}},Zn=(We,ot)=>We&&We.then?We.then(ot):ot(),uo=We=>We.classList.add("hydrated"),Vo=(We,ot,Pt,zt,Qt,qe,wt)=>{let Ht,Kt,on,Mn;if(1===qe.nodeType){for(Ht=qe.getAttribute("c-id"),Ht&&(Kt=Ht.split("."),(Kt[0]===wt||"0"===Kt[0])&&(on={$flags$:0,$hostId$:Kt[0],$nodeId$:Kt[1],$depth$:Kt[2],$index$:Kt[3],$tag$:qe.tagName.toLowerCase(),$elm$:qe,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},ot.push(on),qe.removeAttribute("c-id"),We.$children$||(We.$children$=[]),We.$children$[on.$index$]=on,We=on,zt&&"0"===on.$depth$&&(zt[on.$index$]=on.$elm$))),Mn=qe.childNodes.length-1;Mn>=0;Mn--)Vo(We,ot,Pt,zt,Qt,qe.childNodes[Mn],wt);if(qe.shadowRoot)for(Mn=qe.shadowRoot.childNodes.length-1;Mn>=0;Mn--)Vo(We,ot,Pt,zt,Qt,qe.shadowRoot.childNodes[Mn],wt)}else if(8===qe.nodeType)Kt=qe.nodeValue.split("."),(Kt[1]===wt||"0"===Kt[1])&&(Ht=Kt[0],on={$flags$:0,$hostId$:Kt[1],$nodeId$:Kt[2],$depth$:Kt[3],$index$:Kt[4],$elm$:qe,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},"t"===Ht?(on.$elm$=qe.nextSibling,on.$elm$&&3===on.$elm$.nodeType&&(on.$text$=on.$elm$.textContent,ot.push(on),qe.remove(),We.$children$||(We.$children$=[]),We.$children$[on.$index$]=on,zt&&"0"===on.$depth$&&(zt[on.$index$]=on.$elm$))):on.$hostId$===wt&&("s"===Ht?(on.$tag$="slot",qe["s-sn"]=Kt[5]?on.$name$=Kt[5]:"",qe["s-sr"]=!0,zt&&(on.$elm$=I.createElement(on.$tag$),on.$name$&&on.$elm$.setAttribute("name",on.$name$),qe.parentNode.insertBefore(on.$elm$,qe),qe.remove(),"0"===on.$depth$&&(zt[on.$index$]=on.$elm$)),Pt.push(on),We.$children$||(We.$children$=[]),We.$children$[on.$index$]=on):"r"===Ht&&(zt?qe.remove():(Qt["s-cr"]=qe,qe["s-cn"]=!0))));else if(We&&"style"===We.$tag$){const Yn=xn(null,qe.textContent);Yn.$elm$=qe,Yn.$index$="0",We.$children$=[Yn]}},Fo=(We,ot)=>{if(1===We.nodeType){let Pt=0;for(;Pt{if(ot.$members$){We.watchers&&(ot.$watchers$=We.watchers);const zt=Object.entries(ot.$members$),Qt=We.prototype;if(zt.map(([qe,[wt]])=>{31&wt||2&Pt&&32&wt?Object.defineProperty(Qt,qe,{get(){return((We,ot)=>$t(this).$instanceValues$.get(ot))(0,qe)},set(Ht){((We,ot,Pt,zt)=>{const Qt=$t(We),qe=Qt.$hostElement$,wt=Qt.$instanceValues$.get(ot),Ht=Qt.$flags$,Kt=Qt.$lazyInstance$;Pt=((We,ot)=>null==We||fn(We)?We:4&ot?"false"!==We&&(""===We||!!We):2&ot?parseFloat(We):1&ot?String(We):We)(Pt,zt.$members$[ot][0]);const on=Number.isNaN(wt)&&Number.isNaN(Pt);if((!(8&Ht)||void 0===wt)&&Pt!==wt&&!on&&(Qt.$instanceValues$.set(ot,Pt),Kt)){if(zt.$watchers$&&128&Ht){const Yn=zt.$watchers$[ot];Yn&&Yn.map(Hn=>{try{Kt[Hn](Pt,wt,ot)}catch(Sr){Pn(Sr,qe)}})}2==(18&Ht)&&$r(Qt,!1)}})(this,qe,Ht,ot)},configurable:!0,enumerable:!0}):1&Pt&&64&wt&&Object.defineProperty(Qt,qe,{value(...Ht){const Kt=$t(this);return Kt.$onInstancePromise$.then(()=>Kt.$lazyInstance$[qe](...Ht))}})}),1&Pt){const qe=new Map;Qt.attributeChangedCallback=function(wt,Ht,Kt){D.jmp(()=>{const on=qe.get(wt);if(this.hasOwnProperty(on))Kt=this[on],delete this[on];else if(Qt.hasOwnProperty(on)&&"number"==typeof this[on]&&this[on]==Kt)return;this[on]=(null!==Kt||"boolean"!=typeof this[on])&&Kt})},We.observedAttributes=zt.filter(([wt,Ht])=>15&Ht[0]).map(([wt,Ht])=>{const Kt=Ht[1]||wt;return qe.set(Kt,wt),512&Ht[0]&&ot.$attrsToReflect$.push([wt,Kt]),Kt})}}return We},nt=function(){var We=(0,o.Z)(function*(ot,Pt,zt,Qt,qe){if(0==(32&Pt.$flags$)){{if(Pt.$flags$|=32,(qe=In(zt)).then){const on=()=>{};qe=yield qe,on()}qe.isProxied||(zt.$watchers$=qe.watchers,ut(qe,zt,2),qe.isProxied=!0);const Kt=()=>{};Pt.$flags$|=8;try{new qe(Pt)}catch(on){Pn(on)}Pt.$flags$&=-9,Pt.$flags$|=128,Kt(),Ot(Pt.$lazyInstance$)}if(qe.style){let Kt=qe.style;"string"!=typeof Kt&&(Kt=Kt[Pt.$modeName$=(We=>Hr.map(ot=>ot(We)).find(ot=>!!ot))(ot)]);const on=Ue(zt,Pt.$modeName$);if(!Fn.has(on)){const Mn=()=>{};we(on,Kt,!!(1&zt.$flags$)),Mn()}}}const wt=Pt.$ancestorComponent$,Ht=()=>$r(Pt,!0);wt&&wt["s-rc"]?wt["s-rc"].push(Ht):Ht()});return function(Pt,zt,Qt,qe,wt){return We.apply(this,arguments)}}(),Ot=We=>{br(We,"connectedCallback")},jn=We=>{const ot=We["s-cr"]=I.createComment("");ot["s-cn"]=!0,We.insertBefore(ot,We.firstChild)},xt=(We,ot={})=>{const zt=[],Qt=ot.exclude||[],qe=Y.customElements,wt=I.head,Ht=wt.querySelector("meta[charset]"),Kt=I.createElement("style"),on=[],Mn=I.querySelectorAll(`[${Le}]`);let Yn,Hn=!0,Sr=0;for(Object.assign(D,ot),D.$resourcesUrl$=new URL(ot.resourcesUrl||"./",I.baseURI).href,D.$flags$|=2;Sr{Co[1].map(bo=>{const Jr={$flags$:bo[0],$tagName$:bo[1],$members$:bo[2],$listeners$:bo[3]};Jr.$members$=bo[2],Jr.$listeners$=bo[3],Jr.$attrsToReflect$=[],Jr.$watchers$={};const gi=Jr.$tagName$,Ri=class extends HTMLElement{constructor(Qr){super(Qr),dn(Qr=this,Jr),1&Jr.$flags$&&Qr.attachShadow({mode:"open",delegatesFocus:!!(16&Jr.$flags$)})}connectedCallback(){Yn&&(clearTimeout(Yn),Yn=null),Hn?on.push(this):D.jmp(()=>(We=>{if(0==(1&D.$flags$)){const ot=$t(We),Pt=ot.$cmpMeta$,zt=()=>{};if(1&ot.$flags$)ee(We,ot,Pt.$listeners$),Ot(ot.$lazyInstance$);else{let Qt;if(ot.$flags$|=1,Qt=We.getAttribute(he),Qt){if(1&Pt.$flags$){const qe=Ee(We.shadowRoot,Pt,We.getAttribute("s-mode"));We.classList.remove(qe+"-h",qe+"-s")}((We,ot,Pt,zt)=>{const qe=We.shadowRoot,wt=[],Kt=qe?[]:null,on=zt.$vnode$=xn(ot,null);D.$orgLocNodes$||Fo(I.body,D.$orgLocNodes$=new Map),We[he]=Pt,We.removeAttribute(he),Vo(on,wt,[],Kt,We,We,Pt),wt.map(Mn=>{const Yn=Mn.$hostId$+"."+Mn.$nodeId$,Hn=D.$orgLocNodes$.get(Yn),Sr=Mn.$elm$;Hn&&""===Hn["s-en"]&&Hn.parentNode.insertBefore(Sr,Hn.nextSibling),qe||(Sr["s-hn"]=ot,Hn&&(Sr["s-ol"]=Hn,Sr["s-ol"]["s-nr"]=Sr)),D.$orgLocNodes$.delete(Yn)}),qe&&Kt.map(Mn=>{Mn&&qe.appendChild(Mn)})})(We,Pt.$tagName$,Qt,ot)}Qt||12&Pt.$flags$&&jn(We);{let qe=We;for(;qe=qe.parentNode||qe.host;)if(1===qe.nodeType&&qe.hasAttribute("s-id")&&qe["s-p"]||qe["s-p"]){wo(ot,ot.$ancestorComponent$=qe);break}}Pt.$members$&&Object.entries(Pt.$members$).map(([qe,[wt]])=>{if(31&wt&&We.hasOwnProperty(qe)){const Ht=We[qe];delete We[qe],We[qe]=Ht}}),bi(()=>nt(We,ot,Pt))}zt()}})(this))}disconnectedCallback(){D.jmp(()=>(We=>{if(0==(1&D.$flags$)){const ot=$t(this),Pt=ot.$lazyInstance$;ot.$rmListeners$&&(ot.$rmListeners$.map(zt=>zt()),ot.$rmListeners$=void 0),br(Pt,"disconnectedCallback")}})())}componentOnReady(){return $t(this).$onReadyPromise$}};Jr.$lazyBundleId$=Co[0],!Qt.includes(gi)&&!qe.get(gi)&&(zt.push(gi),qe.define(gi,ut(Ri,Jr,1)))})}),Kt.innerHTML=zt+"{visibility:hidden}.hydrated{visibility:inherit}",Kt.setAttribute("data-styles",""),wt.insertBefore(Kt,Ht?Ht.nextSibling:wt.firstChild),Hn=!1,on.length?on.map(Co=>Co.connectedCallback()):D.jmp(()=>Yn=setTimeout(vo,30))},rt=We=>{const ot=new URL(We,D.$resourcesUrl$);return ot.origin!==Y.location.origin?ot.href:ot.pathname},Yt=new WeakMap,$t=We=>Yt.get(We),Wt=(We,ot)=>Yt.set(ot.$lazyInstance$=We,ot),dn=(We,ot)=>{const Pt={$flags$:0,$hostElement$:We,$cmpMeta$:ot,$instanceValues$:new Map};return Pt.$onInstancePromise$=new Promise(zt=>Pt.$onInstanceResolve$=zt),Pt.$onReadyPromise$=new Promise(zt=>Pt.$onReadyResolve$=zt),We["s-p"]=[],We["s-rc"]=[],ee(We,Pt,ot.$listeners$),Yt.set(We,Pt)},un=(We,ot)=>ot in We,Pn=(We,ot)=>(0,console.error)(We,ot),On=new Map,In=(We,ot,Pt)=>{const zt=We.$tagName$.replace(/-/g,"_"),Qt=We.$lazyBundleId$,qe=On.get(Qt);return qe?qe[zt]:f(50863)(`./${Qt}.entry.js`).then(wt=>(On.set(Qt,wt),wt[zt]),Pn)},Fn=new Map,Hr=[],xo=[],yo=[],Ho=(We,ot)=>Pt=>{We.push(Pt),F||(F=!0,ot&&4&D.$flags$?bi(Mo):D.raf(Mo))},io=We=>{for(let ot=0;ot{io(xo),io(yo),(F=xo.length>0)&&D.raf(Mo)},bi=We=>de().then(We),Zi=Ho(xo,!1),tr=Ho(yo,!0),Po={isDev:!1,isBrowser:!0,isServer:!1,isTesting:!1}},35179:(Ge,$,f)=>{f.d($,{a:()=>Y,b:()=>_e,c:()=>g,g:()=>F,i:()=>we});var o=f(71308);class a{constructor(){this.m=new Map}reset(le){this.m=new Map(Object.entries(le))}get(le,Ue){const ke=this.m.get(le);return void 0!==ke?ke:Ue}getBoolean(le,Ue=!1){const ke=this.m.get(le);return void 0===ke?Ue:"string"==typeof ke?"true"===ke:!!ke}getNumber(le,Ue){const ke=parseFloat(this.m.get(le));return isNaN(ke)?void 0!==Ue?Ue:NaN:ke}set(le,Ue){this.m.set(le,Ue)}}const g=new a,b="ionic:",k="ionic-persist-config",F=Ee=>I(Ee),Y=(Ee,le)=>("string"==typeof Ee&&(le=Ee,Ee=void 0),F(Ee).includes(le)),I=(Ee=window)=>{if(typeof Ee>"u")return[];Ee.Ionic=Ee.Ionic||{};let le=Ee.Ionic.platforms;return null==le&&(le=Ee.Ionic.platforms=D(Ee),le.forEach(Ue=>Ee.document.documentElement.classList.add(`plt-${Ue}`))),le},D=Ee=>{const le=g.get("platform");return Object.keys(me).filter(Ue=>{const ke=le?.[Ue];return"function"==typeof ke?ke(Ee):me[Ue](Ee)})},W=Ee=>!!(ie(Ee,/iPad/i)||ie(Ee,/Macintosh/i)&&oe(Ee)),ee=Ee=>ie(Ee,/android|sink/i),oe=Ee=>se(Ee,"(any-pointer:coarse)"),ge=Ee=>xe(Ee)||he(Ee),xe=Ee=>!!(Ee.cordova||Ee.phonegap||Ee.PhoneGap),he=Ee=>!!Ee.Capacitor?.isNative,ie=(Ee,le)=>le.test(Ee.navigator.userAgent),se=(Ee,le)=>{var Ue;return null===(Ue=Ee.matchMedia)||void 0===Ue?void 0:Ue.call(Ee,le).matches},me={ipad:W,iphone:Ee=>ie(Ee,/iPhone/i),ios:Ee=>ie(Ee,/iPhone|iPod/i)||W(Ee),android:ee,phablet:Ee=>{const le=Ee.innerWidth,Ue=Ee.innerHeight,ke=Math.min(le,Ue),ze=Math.max(le,Ue);return ke>390&&ke<520&&ze>620&&ze<800},tablet:Ee=>{const le=Ee.innerWidth,Ue=Ee.innerHeight,ke=Math.min(le,Ue),ze=Math.max(le,Ue);return W(Ee)||(Ee=>ee(Ee)&&!ie(Ee,/mobile/i))(Ee)||ke>460&&ke<820&&ze>780&&ze<1400},cordova:xe,capacitor:he,electron:Ee=>ie(Ee,/electron/i),pwa:Ee=>{var le;return!(!(null===(le=Ee.matchMedia)||void 0===le?void 0:le.call(Ee,"(display-mode: standalone)").matches)&&!Ee.navigator.standalone)},mobile:oe,mobileweb:Ee=>oe(Ee)&&!ge(Ee),desktop:Ee=>!oe(Ee),hybrid:ge};let Ne;const _e=Ee=>Ee&&(0,o.g)(Ee)||Ne,we=(Ee={})=>{if(typeof window>"u")return;const le=window.document,Ue=window,ke=Ue.Ionic=Ue.Ionic||{},ze={};Ee._ael&&(ze.ael=Ee._ael),Ee._rel&&(ze.rel=Ee._rel),Ee._ce&&(ze.ce=Ee._ce),(0,o.s)(ze);const ye=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(Ee=>{try{const le=Ee.sessionStorage.getItem(k);return null!==le?JSON.parse(le):{}}catch{return{}}})(Ue)),{persistConfig:!1}),ke.config),(Ee=>{const le={};return Ee.location.search.slice(1).split("&").map(Ue=>Ue.split("=")).map(([Ue,ke])=>[decodeURIComponent(Ue),decodeURIComponent(ke)]).filter(([Ue])=>((Ee,le)=>Ee.substr(0,le.length)===le)(Ue,b)).map(([Ue,ke])=>[Ue.slice(b.length),ke]).forEach(([Ue,ke])=>{le[Ue]=ke}),le})(Ue)),Ee);g.reset(ye),g.getBoolean("persistConfig")&&((Ee,le)=>{try{Ee.sessionStorage.setItem(k,JSON.stringify(le))}catch{return}})(Ue,ye),I(Ue),ke.config=g,ke.mode=Ne=g.get("mode",le.documentElement.getAttribute("mode")||(Y(Ue,"ios")?"ios":"md")),g.set("mode",Ne),le.documentElement.setAttribute("mode",Ne),le.documentElement.classList.add(Ne),g.getBoolean("_testing")&&g.set("animated",!1);const je=_t=>{var At;return null===(At=_t.tagName)||void 0===At?void 0:At.startsWith("ION-")},Ze=_t=>["ios","md"].includes(_t);(0,o.a)(_t=>{for(;_t;){const At=_t.mode||_t.getAttribute("mode");if(At){if(Ze(At))return At;je(_t)&&console.warn('Invalid ionic mode: "'+At+'", expected: "ios" or "md"')}_t=_t.parentElement}return Ne})}},66439:(Ge,$,f)=>{f.r($),f.d($,{iosTransitionAnimation:()=>D,shadow:()=>v});var o=f(90181),a=f(1843);f(13457),f(71308);const L=j=>document.querySelector(`${j}.ion-cloned-element`),v=j=>j.shadowRoot||j,b=j=>{const W="ION-TABS"===j.tagName?j:j.querySelector("ion-tabs"),de="ion-content ion-header:not(.header-collapse-condense-inactive) ion-title.title-large";if(null!=W){const K=W.querySelector("ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)");return null!=K?K.querySelector(de):null}return j.querySelector(de)},k=(j,W)=>{const de="ION-TABS"===j.tagName?j:j.querySelector("ion-tabs");let K=[];if(null!=de){const ee=de.querySelector("ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)");null!=ee&&(K=ee.querySelectorAll("ion-buttons"))}else K=j.querySelectorAll("ion-buttons");for(const ee of K){const De=ee.closest("ion-header"),Te=De&&!De.classList.contains("header-collapse-condense-inactive"),ce=ee.querySelector("ion-back-button"),oe=ee.classList.contains("buttons-collapse"),te="start"===ee.slot||""===ee.slot;if(null!==ce&&te&&(oe&&Te&&W||!oe))return ce}return null},Y=(j,W,de,K,ee,De)=>{const Te=W?`calc(100% - ${De.right+4}px)`:De.left-4+"px",ce=W?"7px":"-7px",oe=W?"-4px":"4px",te=W?"-4px":"4px",ge=W?"right":"left",xe=W?"left":"right",Ce=de?[{offset:0,opacity:1,transform:`translate3d(${oe}, ${De.top-46}px, 0) scale(1)`},{offset:.6,opacity:0},{offset:1,opacity:0,transform:`translate3d(${ce}, ${ee.top-40}px, 0) scale(2.1)`}]:[{offset:0,opacity:0,transform:`translate3d(${ce}, ${ee.top-40}px, 0) scale(2.1)`},{offset:1,opacity:1,transform:`translate3d(${oe}, ${De.top-46}px, 0) scale(1)`}],me=de?[{offset:0,opacity:1,transform:`translate3d(${te}, ${De.top-46}px, 0) scale(1)`},{offset:.2,opacity:0,transform:`translate3d(${te}, ${De.top-41}px, 0) scale(0.6)`},{offset:1,opacity:0,transform:`translate3d(${te}, ${De.top-41}px, 0) scale(0.6)`}]:[{offset:0,opacity:0,transform:`translate3d(${te}, ${De.top-41}px, 0) scale(0.6)`},{offset:1,opacity:1,transform:`translate3d(${te}, ${De.top-46}px, 0) scale(1)`}],Ne=(0,o.c)(),_e=(0,o.c)(),we=L("ion-back-button"),Ee=v(we).querySelector(".button-text"),le=v(we).querySelector("ion-icon");we.text=K.text,we.mode=K.mode,we.icon=K.icon,we.color=K.color,we.disabled=K.disabled,we.style.setProperty("display","block"),we.style.setProperty("position","fixed"),_e.addElement(le),Ne.addElement(Ee),Ne.beforeStyles({"transform-origin":`${ge} center`}).beforeAddWrite(()=>{K.style.setProperty("display","none"),we.style.setProperty(ge,Te)}).afterAddWrite(()=>{K.style.setProperty("display",""),we.style.setProperty("display","none"),we.style.removeProperty(ge)}).keyframes(Ce),_e.beforeStyles({"transform-origin":`${xe} center`}).keyframes(me),j.addAnimation([Ne,_e])},I=(j,W,de,K,ee,De)=>{const Te=W?`calc(100% - ${ee.right}px)`:`${ee.left}px`,ce=W?"-18px":"18px",oe=W?"right":"left",xe=de?[{offset:0,opacity:0,transform:`translate3d(${ce}, ${De.top-4}px, 0) scale(0.49)`},{offset:.1,opacity:0},{offset:1,opacity:1,transform:`translate3d(0, ${ee.top-2}px, 0) scale(1)`}]:[{offset:0,opacity:.99,transform:`translate3d(0, ${ee.top-2}px, 0) scale(1)`},{offset:.6,opacity:0},{offset:1,opacity:0,transform:`translate3d(${ce}, ${De.top-4}px, 0) scale(0.5)`}],he=L("ion-title"),Le=(0,o.c)();he.innerText=K.innerText,he.size=K.size,he.color=K.color,Le.addElement(he),Le.beforeStyles({"transform-origin":`${oe} center`,height:"46px",display:"",position:"relative",[oe]:Te}).beforeAddWrite(()=>{K.style.setProperty("display","none")}).afterAddWrite(()=>{K.style.setProperty("display",""),he.style.setProperty("display","none")}).keyframes(xe),j.addAnimation(Le)},D=(j,W)=>{var de;try{const K="cubic-bezier(0.32,0.72,0,1)",ee="opacity",De="transform",Te="0%",oe="rtl"===j.ownerDocument.dir,te=oe?"-99.5%":"99.5%",ge=oe?"33%":"-33%",xe=W.enteringEl,he=W.leavingEl,Le="back"===W.direction,Ce=xe.querySelector(":scope > ion-content"),ie=xe.querySelectorAll(":scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *"),se=xe.querySelectorAll(":scope > ion-header > ion-toolbar"),me=(0,o.c)(),Ne=(0,o.c)();if(me.addElement(xe).duration((null!==(de=W.duration)&&void 0!==de?de:0)||540).easing(W.easing||K).fill("both").beforeRemoveClass("ion-page-invisible"),he&&null!=j){const le=(0,o.c)();le.addElement(j),me.addAnimation(le)}if(Ce||0!==se.length||0!==ie.length?(Ne.addElement(Ce),Ne.addElement(ie)):Ne.addElement(xe.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")),me.addAnimation(Ne),Le?Ne.beforeClearStyles([ee]).fromTo("transform",`translateX(${ge})`,`translateX(${Te})`).fromTo(ee,.8,1):Ne.beforeClearStyles([ee]).fromTo("transform",`translateX(${te})`,`translateX(${Te})`),Ce){const le=v(Ce).querySelector(".transition-effect");if(le){const Ue=le.querySelector(".transition-cover"),ke=le.querySelector(".transition-shadow"),ze=(0,o.c)(),ye=(0,o.c)(),je=(0,o.c)();ze.addElement(le).beforeStyles({opacity:"1",display:"block"}).afterStyles({opacity:"",display:""}),ye.addElement(Ue).beforeClearStyles([ee]).fromTo(ee,0,.1),je.addElement(ke).beforeClearStyles([ee]).fromTo(ee,.03,.7),ze.addAnimation([ye,je]),Ne.addAnimation([ze])}}const _e=xe.querySelector("ion-header.header-collapse-condense"),{forward:we,backward:Ee}=((j,W,de,K,ee)=>{const De=k(K,de),Te=b(ee),ce=b(K),oe=k(ee,de),te=null!==De&&null!==Te&&!de,ge=null!==ce&&null!==oe&&de;if(te){const xe=Te.getBoundingClientRect(),he=De.getBoundingClientRect();I(j,W,de,Te,xe,he),Y(j,W,de,De,xe,he)}else if(ge){const xe=ce.getBoundingClientRect(),he=oe.getBoundingClientRect();I(j,W,de,ce,xe,he),Y(j,W,de,oe,xe,he)}return{forward:te,backward:ge}})(me,oe,Le,xe,he);if(se.forEach(le=>{const Ue=(0,o.c)();Ue.addElement(le),me.addAnimation(Ue);const ke=(0,o.c)();ke.addElement(le.querySelector("ion-title"));const ze=(0,o.c)(),ye=Array.from(le.querySelectorAll("ion-buttons,[menuToggle]")),je=le.closest("ion-header"),Ze=je?.classList.contains("header-collapse-condense-inactive");let _t;_t=ye.filter(Le?xn=>{const gn=xn.classList.contains("buttons-collapse");return gn&&!Ze||!gn}:xn=>!xn.classList.contains("buttons-collapse")),ze.addElement(_t);const At=(0,o.c)();At.addElement(le.querySelectorAll(":scope > *:not(ion-title):not(ion-buttons):not([menuToggle])"));const Vt=(0,o.c)();Vt.addElement(v(le).querySelector(".toolbar-background"));const fn=(0,o.c)(),mn=le.querySelector("ion-back-button");if(mn&&fn.addElement(mn),Ue.addAnimation([ke,ze,At,Vt,fn]),ze.fromTo(ee,.01,1),At.fromTo(ee,.01,1),Le)Ze||ke.fromTo("transform",`translateX(${ge})`,`translateX(${Te})`).fromTo(ee,.01,1),At.fromTo("transform",`translateX(${ge})`,`translateX(${Te})`),fn.fromTo(ee,.01,1);else if(_e||ke.fromTo("transform",`translateX(${te})`,`translateX(${Te})`).fromTo(ee,.01,1),At.fromTo("transform",`translateX(${te})`,`translateX(${Te})`),Vt.beforeClearStyles([ee,"transform"]),je?.translucent?Vt.fromTo("transform",oe?"translateX(-100%)":"translateX(100%)","translateX(0px)"):Vt.fromTo(ee,.01,"var(--opacity)"),we||fn.fromTo(ee,.01,1),mn&&!we){const gn=(0,o.c)();gn.addElement(v(mn).querySelector(".button-text")).fromTo("transform",oe?"translateX(-100px)":"translateX(100px)","translateX(0px)"),Ue.addAnimation(gn)}}),he){const le=(0,o.c)(),Ue=he.querySelector(":scope > ion-content"),ke=he.querySelectorAll(":scope > ion-header > ion-toolbar"),ze=he.querySelectorAll(":scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *");if(Ue||0!==ke.length||0!==ze.length?(le.addElement(Ue),le.addElement(ze)):le.addElement(he.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")),me.addAnimation(le),Le){le.beforeClearStyles([ee]).fromTo("transform",`translateX(${Te})`,oe?"translateX(-100%)":"translateX(100%)");const ye=(0,a.g)(he);me.afterAddWrite(()=>{"normal"===me.getDirection()&&ye.style.setProperty("display","none")})}else le.fromTo("transform",`translateX(${Te})`,`translateX(${ge})`).fromTo(ee,1,.8);if(Ue){const ye=v(Ue).querySelector(".transition-effect");if(ye){const je=ye.querySelector(".transition-cover"),Ze=ye.querySelector(".transition-shadow"),_t=(0,o.c)(),At=(0,o.c)(),Vt=(0,o.c)();_t.addElement(ye).beforeStyles({opacity:"1",display:"block"}).afterStyles({opacity:"",display:""}),At.addElement(je).beforeClearStyles([ee]).fromTo(ee,.1,0),Vt.addElement(Ze).beforeClearStyles([ee]).fromTo(ee,.7,.03),_t.addAnimation([At,Vt]),le.addAnimation([_t])}}ke.forEach(ye=>{const je=(0,o.c)();je.addElement(ye);const Ze=(0,o.c)();Ze.addElement(ye.querySelector("ion-title"));const _t=(0,o.c)(),At=ye.querySelectorAll("ion-buttons,[menuToggle]"),Vt=ye.closest("ion-header"),fn=Vt?.classList.contains("header-collapse-condense-inactive"),mn=Array.from(At).filter(Tt=>{const en=Tt.classList.contains("buttons-collapse");return en&&!fn||!en});_t.addElement(mn);const xn=(0,o.c)(),gn=ye.querySelectorAll(":scope > *:not(ion-title):not(ion-buttons):not([menuToggle])");gn.length>0&&xn.addElement(gn);const Et=(0,o.c)();Et.addElement(v(ye).querySelector(".toolbar-background"));const cn=(0,o.c)(),ft=ye.querySelector("ion-back-button");if(ft&&cn.addElement(ft),je.addAnimation([Ze,_t,xn,cn,Et]),me.addAnimation(je),cn.fromTo(ee,.99,0),_t.fromTo(ee,.99,0),xn.fromTo(ee,.99,0),Le){if(fn||Ze.fromTo("transform",`translateX(${Te})`,oe?"translateX(-100%)":"translateX(100%)").fromTo(ee,.99,0),xn.fromTo("transform",`translateX(${Te})`,oe?"translateX(-100%)":"translateX(100%)"),Et.beforeClearStyles([ee,"transform"]),Vt?.translucent?Et.fromTo("transform","translateX(0px)",oe?"translateX(-100%)":"translateX(100%)"):Et.fromTo(ee,"var(--opacity)",0),ft&&!Ee){const en=(0,o.c)();en.addElement(v(ft).querySelector(".button-text")).fromTo("transform",`translateX(${Te})`,`translateX(${(oe?-124:124)+"px"})`),je.addAnimation(en)}}else fn||Ze.fromTo("transform",`translateX(${Te})`,`translateX(${ge})`).fromTo(ee,.99,0).afterClearStyles([De,ee]),xn.fromTo("transform",`translateX(${Te})`,`translateX(${ge})`).afterClearStyles([De,ee]),cn.afterClearStyles([ee]),Ze.afterClearStyles([ee]),_t.afterClearStyles([ee])})}return me}catch(K){throw K}}},87838:(Ge,$,f)=>{f.r($),f.d($,{mdTransitionAnimation:()=>m});var o=f(90181),a=f(1843);f(13457),f(71308);const m=(L,v)=>{var b,k,F;const D="back"===v.direction,W=v.leavingEl,de=(0,a.g)(v.enteringEl),K=de.querySelector("ion-toolbar"),ee=(0,o.c)();if(ee.addElement(de).fill("both").beforeRemoveClass("ion-page-invisible"),D?ee.duration((null!==(b=v.duration)&&void 0!==b?b:0)||200).easing("cubic-bezier(0.47,0,0.745,0.715)"):ee.duration((null!==(k=v.duration)&&void 0!==k?k:0)||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform","translateY(40px)","translateY(0px)").fromTo("opacity",.01,1),K){const De=(0,o.c)();De.addElement(K),ee.addAnimation(De)}if(W&&D){ee.duration((null!==(F=v.duration)&&void 0!==F?F:0)||200).easing("cubic-bezier(0.47,0,0.745,0.715)");const De=(0,o.c)();De.addElement((0,a.g)(W)).onFinish(Te=>{1===Te&&De.elements.length>0&&De.elements[0].style.setProperty("display","none")}).fromTo("transform","translateY(0px)","translateY(40px)").fromTo("opacity",1,0),ee.addAnimation(De)}return ee}},63539:(Ge,$,f)=>{f.d($,{B:()=>Ue,G:()=>ke,a:()=>b,b:()=>k,c:()=>D,d:()=>Le,e:()=>W,f:()=>ie,g:()=>Ne,h:()=>L,i:()=>we,j:()=>ee,k:()=>xe,l:()=>F,m:()=>Y,p:()=>I,s:()=>le,t:()=>j});var o=f(15861),a=f(35179),g=f(47593),h=f(35730);let m=0;const L=new WeakMap,v=ze=>({create:ye=>de(ze,ye),dismiss:(ye,je,Ze)=>te(document,ye,je,ze,Ze),getTop:()=>(0,o.Z)(function*(){return xe(document,ze)})()}),b=v("ion-alert"),k=v("ion-action-sheet"),F=v("ion-loading"),Y=v("ion-modal"),I=v("ion-picker"),D=v("ion-popover"),j=v("ion-toast"),W=ze=>{typeof document<"u"&&oe(document);const ye=m++;ze.overlayIndex=ye,ze.hasAttribute("id")||(ze.id=`ion-overlay-${ye}`)},de=(ze,ye)=>typeof window<"u"&&typeof window.customElements<"u"?window.customElements.whenDefined(ze).then(()=>{const je=document.createElement(ze);return je.classList.add("overlay-hidden"),Object.assign(je,Object.assign(Object.assign({},ye),{hasController:!0})),se(document).appendChild(je),new Promise(Ze=>(0,h.c)(je,Ze))}):Promise.resolve(),K='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',ee=(ze,ye)=>{let je=ze.querySelector(K);const Ze=je?.shadowRoot;Ze&&(je=Ze.querySelector(K)||je),je?(0,h.f)(je):ye.focus()},Te=(ze,ye)=>{const je=Array.from(ze.querySelectorAll(K));let Ze=je.length>0?je[je.length-1]:null;const _t=Ze?.shadowRoot;_t&&(Ze=_t.querySelector(K)||Ze),Ze?Ze.focus():ye.focus()},oe=ze=>{0===m&&(m=1,ze.addEventListener("focus",ye=>{((ze,ye)=>{const je=xe(ye,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover"),Ze=ze.target;je&&Ze&&!je.classList.contains("ion-disable-focus-trap")&&(je.shadowRoot?(()=>{if(je.contains(Ze))je.lastFocus=Ze;else{const Vt=je.lastFocus;ee(je,je),Vt===ye.activeElement&&Te(je,je),je.lastFocus=ye.activeElement}})():(()=>{if(je===Ze)je.lastFocus=void 0;else{const Vt=(0,h.g)(je);if(!Vt.contains(Ze))return;const fn=Vt.querySelector(".ion-overlay-wrapper");if(!fn)return;if(fn.contains(Ze))je.lastFocus=Ze;else{const mn=je.lastFocus;ee(fn,je),mn===ye.activeElement&&Te(fn,je),je.lastFocus=ye.activeElement}}})())})(ye,ze)},!0),ze.addEventListener("ionBackButton",ye=>{const je=xe(ze);je?.backdropDismiss&&ye.detail.register(g.OVERLAY_BACK_BUTTON_PRIORITY,()=>je.dismiss(void 0,Ue))}),ze.addEventListener("keyup",ye=>{if("Escape"===ye.key){const je=xe(ze);je?.backdropDismiss&&je.dismiss(void 0,Ue)}}))},te=(ze,ye,je,Ze,_t)=>{const At=xe(ze,Ze,_t);return At?At.dismiss(ye,je):Promise.reject("overlay does not exist")},xe=(ze,ye,je)=>{const Ze=((ze,ye)=>(void 0===ye&&(ye="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast"),Array.from(ze.querySelectorAll(ye)).filter(je=>je.overlayIndex>0)))(ze,ye).filter(_t=>!(ze=>ze.classList.contains("overlay-hidden"))(_t));return void 0===je?Ze[Ze.length-1]:Ze.find(_t=>_t.id===je)},he=(ze=!1)=>{const je=se(document).querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");!je||(ze?je.setAttribute("aria-hidden","true"):je.removeAttribute("aria-hidden"))},Le=function(){var ze=(0,o.Z)(function*(ye,je,Ze,_t,At){var Vt,fn;if(ye.presented)return;he(!0),ye.presented=!0,ye.willPresent.emit(),null===(Vt=ye.willPresentShorthand)||void 0===Vt||Vt.emit();const mn=(0,a.b)(ye),xn=ye.enterAnimation?ye.enterAnimation:a.c.get(je,"ios"===mn?Ze:_t);(yield me(ye,xn,ye.el,At))&&(ye.didPresent.emit(),null===(fn=ye.didPresentShorthand)||void 0===fn||fn.emit()),"ION-TOAST"!==ye.el.tagName&&Ce(ye.el),ye.keyboardClose&&(null===document.activeElement||!ye.el.contains(document.activeElement))&&ye.el.focus()});return function(je,Ze,_t,At,Vt){return ze.apply(this,arguments)}}(),Ce=function(){var ze=(0,o.Z)(function*(ye){let je=document.activeElement;if(!je)return;const Ze=je?.shadowRoot;Ze&&(je=Ze.querySelector(K)||je),yield ye.onDidDismiss(),je.focus()});return function(je){return ze.apply(this,arguments)}}(),ie=function(){var ze=(0,o.Z)(function*(ye,je,Ze,_t,At,Vt,fn){var mn,xn;if(!ye.presented)return!1;he(!1),ye.presented=!1;try{ye.el.style.setProperty("pointer-events","none"),ye.willDismiss.emit({data:je,role:Ze}),null===(mn=ye.willDismissShorthand)||void 0===mn||mn.emit({data:je,role:Ze});const gn=(0,a.b)(ye),Et=ye.leaveAnimation?ye.leaveAnimation:a.c.get(_t,"ios"===gn?At:Vt);Ze!==ke&&(yield me(ye,Et,ye.el,fn)),ye.didDismiss.emit({data:je,role:Ze}),null===(xn=ye.didDismissShorthand)||void 0===xn||xn.emit({data:je,role:Ze}),L.delete(ye),ye.el.classList.add("overlay-hidden"),ye.el.style.removeProperty("pointer-events"),void 0!==ye.el.lastFocus&&(ye.el.lastFocus=void 0)}catch(gn){console.error(gn)}return ye.el.remove(),!0});return function(je,Ze,_t,At,Vt,fn,mn){return ze.apply(this,arguments)}}(),se=ze=>ze.querySelector("ion-app")||ze.body,me=function(){var ze=(0,o.Z)(function*(ye,je,Ze,_t){Ze.classList.remove("overlay-hidden");const Vt=je(ye.el,_t);(!ye.animated||!a.c.getBoolean("animated",!0))&&Vt.duration(0),ye.keyboardClose&&Vt.beforeAddWrite(()=>{const mn=Ze.ownerDocument.activeElement;mn?.matches("input,ion-input, ion-textarea")&&mn.blur()});const fn=L.get(ye)||[];return L.set(ye,[...fn,Vt]),yield Vt.play(),!0});return function(je,Ze,_t,At){return ze.apply(this,arguments)}}(),Ne=(ze,ye)=>{let je;const Ze=new Promise(_t=>je=_t);return _e(ze,ye,_t=>{je(_t.detail)}),Ze},_e=(ze,ye,je)=>{const Ze=_t=>{(0,h.b)(ze,ye,Ze),je(_t)};(0,h.a)(ze,ye,Ze)},we=ze=>"cancel"===ze||ze===Ue,Ee=ze=>ze(),le=(ze,ye)=>{if("function"==typeof ze)return a.c.get("_zoneGate",Ee)(()=>{try{return ze(ye)}catch(Ze){throw Ze}})},Ue="backdrop",ke="gesture"},74524:(Ge,$,f)=>{f.d($,{Fw:()=>F,Ke:()=>L});var o=f(45449),a=f(94424),g=f.n(a),h=f(55021),m=f.n(h),L=function(){function Y(I){var D=this;this._driver=null,this._dbPromise=new Promise(function(j,W){var de,ee=Object.assign({name:"_ionicstorage",storeName:"_ionickv",driverOrder:["sqlite","indexeddb","websql","localstorage"]},I||{});g().defineDriver(m()).then(function(){de=g().createInstance(ee)}).then(function(){return de.setDriver(D._getDriverOrder(ee.driverOrder))}).then(function(){D._driver=de.driver(),j(de)}).catch(function(De){return W(De)})})}return Object.defineProperty(Y.prototype,"driver",{get:function(){return this._driver},enumerable:!0,configurable:!0}),Y.prototype.ready=function(){return this._dbPromise},Y.prototype._getDriverOrder=function(I){return I.map(function(D){switch(D){case"sqlite":return m()._driver;case"indexeddb":return g().INDEXEDDB;case"websql":return g().WEBSQL;case"localstorage":return g().LOCALSTORAGE}})},Y.prototype.get=function(I){return this._dbPromise.then(function(D){return D.getItem(I)})},Y.prototype.set=function(I,D){return this._dbPromise.then(function(j){return j.setItem(I,D)})},Y.prototype.remove=function(I){return this._dbPromise.then(function(D){return D.removeItem(I)})},Y.prototype.clear=function(){return this._dbPromise.then(function(I){return I.clear()})},Y.prototype.length=function(){return this._dbPromise.then(function(I){return I.length()})},Y.prototype.keys=function(){return this._dbPromise.then(function(I){return I.keys()})},Y.prototype.forEach=function(I){return this._dbPromise.then(function(D){return D.iterate(I)})},Y}(),b=new o.InjectionToken("STORAGE_CONFIG_TOKEN");function k(Y){return new L(Y||{name:"_ionicstorage",storeName:"_ionickv",driverOrder:["sqlite","indexeddb","websql","localstorage"]})}var F=function(){function Y(){}return Y.forRoot=function(I){return void 0===I&&(I=null),{ngModule:Y,providers:[{provide:b,useValue:I},{provide:L,useFactory:k,deps:[b]}]}},Y.ctorParameters=function(){return[]},Y.\u0275fac=function(D){return new(D||Y)},Y.\u0275mod=o.\u0275\u0275defineNgModule({type:Y}),Y.\u0275inj=o.\u0275\u0275defineInjector({}),Y}()},8782:(Ge,$,f)=>{f.d($,{n:()=>o});const o={portalParams:{portais:"VO,LG"},intervalOfTimeToRenewRequestProfile:18e5,intervalOfTimeToClearCheckinDataWcStorage:6e4,intervalOfTimeToRenewFcm:6048e5,intervalOfTimeToClearEventInResume:18e5}},35453:(Ge,$,f)=>{f.d($,{O6:()=>De,Gj:()=>ee,oT:()=>Te});var o=f(15861),a=f(591),g=f(45449);const L="hosturlApp",v="csrf",b="addXrsfHeader",k="securityDataConfig",F="checkinDataApp",Y=new a.X(""),I=new a.X(""),D=new a.X(!1),j=new a.X(null);class W{constructor(){this.subjects={[v]:Y,[L]:I,[b]:D,[k]:j}}static getInstance(){return W.instance||(W.instance=new W),W.instance}updateStorage(oe,te){localStorage.setItem(oe,JSON.stringify(te)),this.subjects[oe]?.next(te),window.dispatchEvent(new CustomEvent("storageUpdated",{detail:{key:oe,value:te}})),oe===k&&j.next(te),oe===L&&I.next(te),oe===v&&Y.next(te),oe===b&&D.next(te)}getValue(oe){try{const te=localStorage.getItem(oe);return te?JSON.parse(te):null}catch(te){return console.error("Erro ao ler storage:",te),null}}getSubject(oe){return this.subjects[oe]||null}}const de=W.getInstance();var K=f(47898);let ee=(()=>{class ce{constructor(te){this.storageService=te}initializeCheckInData(){var te=this;return(0,o.Z)(function*(){try{if(yield te.storageService.ready()){const he=(yield te.storageService.get(F))||te.defaultCheckinData;yield te.setCheckinData(he)}else console.warn("Storage service not ready, resetting check-in data."),yield te.resetCheckinData()}catch(ge){console.error("Error initializing storage:",ge)}})()}getCheckinData(){var te=this;return(0,o.Z)(function*(){return(yield te.storageService.get(F))||te.defaultCheckinData})()}setCheckinData(te){var ge=this;return(0,o.Z)(function*(){yield ge.storageService.set(F,te)})()}setSecurityDataConfig(){this.removeSecurityDataConfig();const te={urlFromApp:this.getHostUrl(),hasXrfAddHeader:this.getAddXrsfHeader(),crfsTokenStorage:this.getCsrf(),updateTimestamp:Date.now()};console.log("setSecurityDataConfig APP KEY ACCESS",te),this.setDataStorage(k,te)}removeSecurityDataConfig(){localStorage.removeItem(k)}getSecurityDataConfig(){return this.getDataStorage(k)}resetCheckinData(){var te=this;return(0,o.Z)(function*(){yield te.storageService.set(F,te.defaultCheckinData),te.clearStorage()})()}setCsrf(te){de.updateStorage(v,te)}getCsrf(){return de.getValue(v)||""}removeCsrf(){localStorage.removeItem(v)}setHostUrl(te){this.removeHostUrl(),de.updateStorage(L,te)}getHostUrl(){return de.getValue(L)||""}removeHostUrl(){localStorage.removeItem(L)}setAddXrsfHeader(te){this.removeAddXrsfHeader(),de.updateStorage(b,JSON.stringify(te))}getAddXrsfHeader(){return de.getValue(b)||!1}removeAddXrsfHeader(){localStorage.removeItem(b)}setDataStorage(te,ge){de.updateStorage(te,ge)}getDataStorage(te){return de.getValue(te)}clearStorage(){this.removeHostUrl(),this.removeAddXrsfHeader(),this.removeSecurityDataConfig(),localStorage.removeItem("checkinData")}get defaultCheckinData(){return{webToken:null,locatorType:null,companyName:null,companyInstance:null,document:null,name:null,hasLogisticModule:!1,refId:null,locator:null,deepLink:!0,rememberMe:!0,photo:null,subcategory:0,isForeign:!1,status:null,qrCodeData:null,siteLocator:null,siteInstance:null,walletQrCodes:[]}}}return ce.\u0275fac=function(te){return new(te||ce)(g.\u0275\u0275inject(K.V1))},ce.\u0275prov=g.\u0275\u0275defineInjectable({token:ce,factory:ce.\u0275fac,providedIn:"root"}),ce})(),De=(()=>{class ce{constructor(te){this.storageWcService=te,this.checkinDataSubject=new a.X(null)}getCheckinData(){return this.checkinDataSubject.getValue()}updateCheckinData(te){var ge=this;return(0,o.Z)(function*(){try{const he={...ge.checkinDataSubject.getValue()||{},...te};return yield ge.storageWcService.setCheckinData(he),ge.checkinDataSubject.next(he),he}catch(xe){console.error("Error updating check-in data:",xe)}})()}resetCheckinData(){var te=this;return(0,o.Z)(function*(){try{const ge=te.storageWcService.defaultCheckinData;return te.checkinDataSubject.next(ge),yield te.storageWcService.resetCheckinData(),ge}catch(ge){console.error("Error resetting check-in data:",ge)}})()}}return ce.\u0275fac=function(te){return new(te||ce)(g.\u0275\u0275inject(ee))},ce.\u0275prov=g.\u0275\u0275defineInjectable({token:ce,factory:ce.\u0275fac,providedIn:"root"}),ce})(),Te=(()=>{class ce{constructor(te){this.storageService=te,this.STORAGE_KEY_WALLET="wallet_qrcodes"}saveQRCodes(te){var ge=this;return(0,o.Z)(function*(){!(yield ge.storageService.ready())||(yield ge.storageService.set(ge.STORAGE_KEY_WALLET,te))})()}getQRCodes(){var te=this;return(0,o.Z)(function*(){return(yield te.storageService.ready())&&(yield te.storageService.get(te.STORAGE_KEY_WALLET))||[]})()}}return ce.\u0275fac=function(te){return new(te||ce)(g.\u0275\u0275inject(K.V1))},ce.\u0275prov=g.\u0275\u0275defineInjectable({token:ce,factory:ce.\u0275fac,providedIn:"root"}),ce})()},69270:(Ge,$,f)=>{f.d($,{I:()=>ee});var o=f(90944),g=f(92216),h=f(24006),m=f(90603),L=f(99826),v=f(15626),k=(f(2569),f(64921)),F=f(70079),Y=f(10866),D=f(3035),j=f(45449);const de=[o.CommonModule,m.IonicModule,h.ReactiveFormsModule,h.FormsModule,g.uH,F.Tx,v.K,L.aw,Y.CalendarModule,k.D,D.rK,F.Tx];let ee=(()=>{class De{}return De.\u0275fac=function(ce){return new(ce||De)},De.\u0275mod=j.\u0275\u0275defineNgModule({type:De}),De.\u0275inj=j.\u0275\u0275defineInjector({imports:[de,o.CommonModule,m.IonicModule,h.ReactiveFormsModule,h.FormsModule,g.uH,F.Tx,v.K,L.aw,Y.CalendarModule,k.D,D.rK,F.Tx]}),De})()},7415:(Ge,$,f)=>{f.d($,{Z:()=>Y});var o=f(45449),g=f(47898);function h(I,D){if(1&I&&o.\u0275\u0275element(0,"ion-icon",13),2&I){const j=o.\u0275\u0275nextContext(2);o.\u0275\u0275property("name",j.icon)}}function m(I,D){if(1&I&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,h,1,1,"ion-icon",11),o.\u0275\u0275elementStart(2,"span",12),o.\u0275\u0275text(3),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementContainerEnd()),2&I){const j=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",j.icon),o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate(j.title)}}function L(I,D){1&I&&o.\u0275\u0275element(0,"div",14)}function v(I,D){if(1&I){const j=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",15)(2,"div",16)(3,"div",17),o.\u0275\u0275element(4,"ion-icon",18),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(5,"div",19),o.\u0275\u0275text(6),o.\u0275\u0275pipe(7,"translate"),o.\u0275\u0275elementStart(8,"span"),o.\u0275\u0275text(9),o.\u0275\u0275pipe(10,"relativeDate"),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementStart(11,"div",20)(12,"ion-button",21),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(j);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.presentationReactiveOptions.emit())}),o.\u0275\u0275text(13),o.\u0275\u0275pipe(14,"translate"),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementContainerEnd()}if(2&I){const j=o.\u0275\u0275nextContext();o.\u0275\u0275advance(6),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(7,3,"CONFIGS.NOTIFICATION.AUTO_ACTIVATE_DATE")," "),o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(10,5,j.autoActivetDays.autoReactivateDate)),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(14,7,"CONFIGS.NOTIFICATION.CANCEL_AUTO_ACTIVATE_DATE")," ")}}function b(I,D){1&I&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275projection(1,1),o.\u0275\u0275elementContainerEnd())}const k=[[["","customContent",""]],[["","customHeader",""]]],F=["[customContent]","[customHeader]"];let Y=(()=>{class I{constructor(j,W){this.cdr=j,this.ngZoneService=W,this.title="",this.icon="",this.isOpenAccordion=!0,this.checked=!0,this.autoActivetDays=void 0,this.toggle=new o.EventEmitter,this.presentationReactiveOptions=new o.EventEmitter}ngOnInit(){console.log("autoActivetDays",this.autoActivetDays)}ngOnChanges(j){console.log(j),j.isOpenAccordion&&!j.isOpenAccordion.firstChange&&(this.isOpenAccordion=j.isOpenAccordion.currentValue,this.cdr.markForCheck(),console.log("AccordionComponent: isOpen mudou para",this.isOpenAccordion))}}return I.\u0275fac=function(j){return new(j||I)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(g.zf))},I.\u0275cmp=o.\u0275\u0275defineComponent({type:I,selectors:[["app-accordion"]],inputs:{title:"title",icon:"icon",customHeader:"customHeader",isOpenAccordion:"isOpenAccordion",checked:"checked",autoActivetDays:"autoActivetDays"},outputs:{toggle:"toggle",presentationReactiveOptions:"presentationReactiveOptions"},features:[o.\u0275\u0275NgOnChangesFeature],ngContentSelectors:F,decls:15,vars:10,consts:[[1,"accordion"],[1,"accordion__header"],[4,"ngIf"],[1,"notification-config__card"],["class","notification-config__card-hr",4,"ngIf"],[1,"notification-config__card-icon"],["slot","start","name","notifications-circle"],[1,"notification-config__card-label",3,"innerHTML"],[1,"notification-config__card-toggle"],["mode","ios","color","primary","slot","end",3,"checked","click"],[1,"accordion__content"],["slot","end","class","accordion__header-icon",3,"name",4,"ngIf"],[1,"accordion__title"],["slot","end",1,"accordion__header-icon",3,"name"],[1,"notification-config__card-hr"],[1,"notification-config__status"],[1,"notification-config__status-content"],[1,"notification-config__status-content-icon"],["mode","ios","slot","start","src","./assets/icon/refresh_icon.svg"],[1,"notification-config__status-content-text"],[1,"notification-config__status-cancel"],["mode","ios","expand","block","fill","clear",3,"click"]],template:function(j,W){1&j&&(o.\u0275\u0275projectionDef(k),o.\u0275\u0275elementStart(0,"div",0)(1,"div",1),o.\u0275\u0275template(2,m,4,2,"ng-container",2),o.\u0275\u0275elementStart(3,"div",3),o.\u0275\u0275template(4,L,1,0,"div",4),o.\u0275\u0275elementStart(5,"div",5),o.\u0275\u0275element(6,"ion-icon",6),o.\u0275\u0275elementEnd(),o.\u0275\u0275element(7,"div",7),o.\u0275\u0275pipe(8,"translate"),o.\u0275\u0275elementStart(9,"div",8)(10,"ion-toggle",9),o.\u0275\u0275listener("click",function(K){return W.toggle.emit(K)}),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275template(11,v,15,9,"ng-container",2),o.\u0275\u0275template(12,b,2,0,"ng-container",2),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(13,"div",10),o.\u0275\u0275projection(14),o.\u0275\u0275elementEnd()()),2&j&&(o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",!W.customHeader),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",W.isOpenAccordion),o.\u0275\u0275advance(3),o.\u0275\u0275property("innerHTML",o.\u0275\u0275pipeBind1(8,8,"CONFIGS.NOTIFICATION.ENABLE_NOTIFICATION"),o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(3),o.\u0275\u0275property("checked",W.checked),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",null==W.autoActivetDays?null:W.autoActivetDays.autoReactivateDate),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",W.customHeader),o.\u0275\u0275advance(1),o.\u0275\u0275classProp("accordion__content--open",W.isOpenAccordion))},styles:[".accordion[_ngcontent-%COMP%]{background-color:#fff;border-radius:12px;border:solid 1px #efefef;box-shadow:0 2px 6px rgba(0,0,0,.08)!important}.accordion__header[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;max-height:50px;flex-direction:column}.accordion__header-icon[_ngcontent-%COMP%]{margin-right:10px}.accordion__title[_ngcontent-%COMP%]{font-weight:500}.accordion__title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:800}.accordion__content[_ngcontent-%COMP%]{max-height:0;overflow:hidden;transition:max-height .3s ease;background-color:#fff;padding:0 10px;border-radius:0 0 12px 12px}.accordion__content--open[_ngcontent-%COMP%]{max-height:-webkit-max-content;max-height:-moz-max-content;max-height:max-content;padding:1em;position:relative}.notification-config[_ngcontent-%COMP%]{padding:1rem}.notification-config__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;margin-bottom:1rem;color:var(--ion-color-dark)}.notification-config__card[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;margin:.55em auto;z-index:111;position:relative;padding:0 1em}.notification-config__card-icon[_ngcontent-%COMP%]{align-items:center;flex-direction:column;display:flex}.notification-config__card[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:28px;color:#d9d9d9}.notification-config__card-label[_ngcontent-%COMP%]{font-size:1rem;font-weight:500;margin-left:.75rem;flex:1}.notification-config__card-hr[_ngcontent-%COMP%]{width:90%;height:2px;background-color:#f8f9fa;position:absolute;bottom:-6px}.notification-config__card-toggle[_ngcontent-%COMP%]{display:flex;flex-direction:column}.notification-config__card[_ngcontent-%COMP%] ion-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;--handle-height: 1.4em;--handle-width: 1.4em;width:2.7em;--handle-max-height: auto;contain:none;overflow:visible;--handle-spacing: 1px}.notification-config__card[_ngcontent-%COMP%] ion-toggle[_ngcontent-%COMP%]::part(track), .notification-config__card[_ngcontent-%COMP%] ion-toggle.toggle-checked[_ngcontent-%COMP%]::part(track){height:14px}.notification-config__card[_ngcontent-%COMP%] ion-toggle.toggle-checked[_ngcontent-%COMP%]::part(handle){background:var(--ion-color-primary)!important}.notification-config__card[_ngcontent-%COMP%] ion-toggle.toggle-checked[_ngcontent-%COMP%]::part(track){background-color:#c7e3af}.notification-config__status-content[_ngcontent-%COMP%]{max-width:100%;display:flex;align-items:center;background-color:#fff;margin:auto;border:none;gap:.4em;padding:.4em .6em;border-radius:0 0 8px 8px;z-index:-1;position:relative}.notification-config__status-content-icon[_ngcontent-%COMP%]{width:20px;height:20px;position:relative;display:flex;justify-content:center;align-items:center}.notification-config__status-content-text[_ngcontent-%COMP%]{font-size:.66rem}.notification-config__status-content-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:700}.notification-config__status-cancel[_ngcontent-%COMP%]{margin-top:0;cursor:pointer}.notification-config__status-cancel[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{text-align:center;font-weight:700;color:#f70b14;height:2.1em;font-size:.88em}"],changeDetection:0}),I})()},87871:(Ge,$,f)=>{f.d($,{A:()=>Y});var o=f(45449),g=f(90944),m=f(90603),L=f(31765);function v(I,D){if(1&I&&(o.\u0275\u0275elementStart(0,"ion-avatar",2),o.\u0275\u0275element(1,"ion-skeleton-text",3),o.\u0275\u0275elementEnd()),2&I){const j=o.\u0275\u0275nextContext();o.\u0275\u0275property("ngClass","avatar--"+j.size)}}function b(I,D){if(1&I){const j=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ion-avatar",4),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(j);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.photoClick.emit(de.thumbnailImage))}),o.\u0275\u0275element(1,"ion-img",5),o.\u0275\u0275elementEnd()}if(2&I){const j=o.\u0275\u0275nextContext();o.\u0275\u0275property("ngClass","avatar--"+j.size),o.\u0275\u0275advance(1),o.\u0275\u0275property("src","data:image/png;base64,"+j.thumbnailImage)}}const k=function(I){return[I,"initials"]};function F(I,D){if(1&I&&(o.\u0275\u0275elementStart(0,"ion-avatar",2)(1,"div",6),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"getInitials"),o.\u0275\u0275elementEnd()()),2&I){const j=o.\u0275\u0275nextContext();let W;o.\u0275\u0275property("ngClass",o.\u0275\u0275pureFunction1(5,k,"avatar--"+j.size)),o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind2(3,2,null!==(W=j.firstName)&&void 0!==W?W:"",null!==(W=j.lastName)&&void 0!==W?W:""))}}let Y=(()=>{class I{constructor(){this.firstName="",this.lastName="",this.thumbnailImage=null,this.size="lg",this.loading=!1,this.photoClick=new o.EventEmitter}}return I.\u0275fac=function(j){return new(j||I)},I.\u0275cmp=o.\u0275\u0275defineComponent({type:I,selectors:[["app-avatar"]],inputs:{firstName:"firstName",lastName:"lastName",thumbnailImage:"thumbnailImage",size:"size",loading:"loading"},outputs:{photoClick:"photoClick"},decls:3,vars:3,consts:[[3,"ngClass",4,"ngIf"],[3,"ngClass","click",4,"ngIf"],[3,"ngClass"],["animated",""],[3,"ngClass","click"],[3,"src"],[1,"content"]],template:function(j,W){1&j&&(o.\u0275\u0275template(0,v,2,1,"ion-avatar",0),o.\u0275\u0275template(1,b,2,2,"ion-avatar",1),o.\u0275\u0275template(2,F,4,7,"ion-avatar",0)),2&j&&(o.\u0275\u0275property("ngIf",W.loading),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!W.loading&&!!W.thumbnailImage),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!W.loading&&!W.thumbnailImage))},dependencies:[g.NgClass,g.NgIf,m.IonAvatar,m.IonImg,m.IonSkeletonText,L.I],styles:["[_nghost-%COMP%]{display:inline-block}ion-avatar[_ngcontent-%COMP%]{flex-shrink:0;display:flex;justify-content:center;align-items:center;border-radius:50%;overflow:hidden}ion-avatar[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.initials[_ngcontent-%COMP%]{background-color:#eee}.initials[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:.9em;font-weight:600;color:#333}.avatar--lg[_ngcontent-%COMP%]{width:64px;height:64px;min-width:64px}.avatar--md[_ngcontent-%COMP%]{width:40px;height:40px;min-width:40px}.avatar--sm[_ngcontent-%COMP%]{width:38px;height:38px;min-width:38px}.host[_nghost-%COMP%], .guest[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center}.host[_nghost-%COMP%] ion-avatar[_ngcontent-%COMP%], .guest[_nghost-%COMP%] ion-avatar[_ngcontent-%COMP%]{background-color:transparent;width:100%;height:100%}.host[_nghost-%COMP%] .initials[_ngcontent-%COMP%], .guest[_nghost-%COMP%] .initials[_ngcontent-%COMP%]{background-color:transparent;width:100%;height:100%}"],changeDetection:0}),I})()},37792:(Ge,$,f)=>{f.d($,{H:()=>m});var o=f(45449),g=f(90944);let m=(()=>{class L{constructor(){this.class="button-holder-success",this.type="button",this.action=new o.EventEmitter}ngOnInit(){}ngOnDestroy(){}}return L.\u0275fac=function(b){return new(b||L)},L.\u0275cmp=o.\u0275\u0275defineComponent({type:L,selectors:[["app-button-custom-component"]],inputs:{name:"name",class:"class",type:"type"},outputs:{action:"action"},decls:2,vars:3,consts:[[3,"type","ngClass","click"]],template:function(b,k){1&b&&(o.\u0275\u0275elementStart(0,"button",0),o.\u0275\u0275listener("click",function(Y){return k.action.emit(Y)}),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&b&&(o.\u0275\u0275property("type",k.type)("ngClass",k.class),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",k.name,"\n"))},dependencies:[g.NgClass],styles:[".button-holder-success[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:.75em 1.5em;border-radius:50px;background-color:var(--ion-color-base);color:#fff;font-size:1em;transition:background-color .1s ease-out}.button-holder-success[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#fff;color:var(--ion-color-base);transition:background-color .1s ease-out}.button-holder-success[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus{outline:none}.button-holder-back[_ngcontent-%COMP%]{color:#383a3e;font-weight:400;background-color:#e6e6e6;transition:background-color .1s ease-out}"]}),L})()},64245:(Ge,$,f)=>{f.d($,{e:()=>F});var o=f(45449),g=f(90944),m=f(90603),L=f(99826);function v(Y,I){if(1&Y){const D=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ion-card",11),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(D);const W=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(W.onDelete.emit(W.booking))}),o.\u0275\u0275element(1,"ion-icon",12),o.\u0275\u0275elementEnd()}}const b=function(Y){return{border_:Y}};function k(Y,I){if(1&Y){const D=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",1),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(D);const W=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(W.onSelected.emit(W.booking))}),o.\u0275\u0275elementStart(2,"div",2),o.\u0275\u0275element(3,"img",3),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"div",4)(5,"div")(6,"div",5),o.\u0275\u0275text(7),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(8,"div",6),o.\u0275\u0275text(9),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(10,"div",7)(11,"div",8),o.\u0275\u0275text(12),o.\u0275\u0275pipe(13,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(14,"div",9)(15,"span"),o.\u0275\u0275text(16),o.\u0275\u0275elementEnd()()()(),o.\u0275\u0275template(17,v,2,0,"ion-card",10),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementContainerEnd()}if(2&Y){const D=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngClass",o.\u0275\u0275pureFunction1(9,b,D.isModal)),o.\u0275\u0275advance(2),o.\u0275\u0275property("src",null!=D.booking&&D.booking.photo||null!=D.booking&&D.booking.assetPhoto?(null==D.booking?null:D.booking.photo)||(null==D.booking?null:D.booking.assetPhoto):"./assets/img/placeholder-reservations.png",o.\u0275\u0275sanitizeUrl),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",null!=D.booking&&D.booking.name?null==D.booking?null:D.booking.name:null!=D.booking&&D.booking.assetName?null==D.booking?null:D.booking.assetName:""," "),o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",null!=D.booking&&null!=D.booking.location&&D.booking.location.name?null==D.booking||null==D.booking.location?null:D.booking.location.name:null!=D.booking&&D.booking.locationName?null==D.booking?null:D.booking.locationName:""," "),o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(13,7,"CM_BOOKEI_TEXT_ACCESSORIES")),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",D.joinResoucers(null==D.booking?null:D.booking.resources)," "),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!D.isModal)}}let F=(()=>{class Y{constructor(){this.onSelected=new o.EventEmitter,this.onDelete=new o.EventEmitter,this.isModal=!1}ngOnInit(){}ngOnDestroy(){}joinResoucers(D){return D.map(j=>j.name).join(" | ")}}return Y.\u0275fac=function(D){return new(D||Y)},Y.\u0275cmp=o.\u0275\u0275defineComponent({type:Y,selectors:[["app-card-booking-component"]],inputs:{booking:"booking",isModal:"isModal"},outputs:{onSelected:"onSelected",onDelete:"onDelete"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"asset-card",3,"ngClass","click"],[1,"img-wrapper"],[3,"src"],[1,"text-wrapper"],[1,"asset-title"],[1,"asset-location"],[1,"accessory-wrapper"],[1,"accessory-title"],[1,"accessories"],["class","ion-no-padding ion-no-margin icon-asset-card","button","",3,"click",4,"ngIf"],["button","",1,"ion-no-padding","ion-no-margin","icon-asset-card",3,"click"],["mode","ios","color","light","name","trash"]],template:function(D,j){1&D&&o.\u0275\u0275template(0,k,18,11,"ng-container",0),2&D&&o.\u0275\u0275property("ngIf",j.booking)},dependencies:[g.NgClass,g.NgIf,m.IonCard,m.IonIcon,L.X$],styles:[".asset-card[_ngcontent-%COMP%]{min-height:84px;background:#fff;width:100%;margin:0 auto .8rem;border-radius:.25rem;display:flex;flex-wrap:wrap;align-items:center;padding:.5rem 1rem;cursor:pointer}.asset-card[_ngcontent-%COMP%] .img-wrapper[_ngcontent-%COMP%]{width:64px;height:64px;display:flex;border-radius:4px}.asset-card[_ngcontent-%COMP%] .img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:cover!important;border-radius:4px}.asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%]{margin-left:1rem;display:flex;flex-direction:column;justify-content:space-between;align-self:stretch;flex:1}.asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .asset-title[_ngcontent-%COMP%]{line-height:1rem;font-weight:600}.asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .asset-location[_ngcontent-%COMP%]{font-size:.8rem;line-height:1rem;color:#999}.asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .accessory-wrapper[_ngcontent-%COMP%] .accessory-title[_ngcontent-%COMP%]{font-size:.7rem;line-height:.9rem;font-weight:600}.asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .accessory-wrapper[_ngcontent-%COMP%] .accessories[_ngcontent-%COMP%]{font-size:.7rem;line-height:.8rem}.asset-card[_ngcontent-%COMP%] .icon-asset-card[_ngcontent-%COMP%]{height:30px;width:30px;background:rgb(187,82,82);display:flex;-webkit-box-pack:center;border-radius:50%;-webkit-box-align:center}.asset-card[_ngcontent-%COMP%] .icon-asset-card[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:1.4em;display:flex;align-items:center;justify-content:center;width:100%}.asset-card.border_[_ngcontent-%COMP%]{border:1px solid #ced4da}"]}),Y})()},15626:(Ge,$,f)=>{f.d($,{K:()=>oe});var o=f(90944),g=f(70079),h=f(24006),m=f(92216),L=f(90603),v=f(99826),b=f(10866),F=f(64921),Y=f(98246),I=f(3035),D=f(24889),j=f(64633),W=f(45449),K=f(69927),ee=f(90068);const Te=[o.CommonModule,L.IonicModule,h.ReactiveFormsModule,h.FormsModule,m.uH,g.Tx,v.aw,b.CalendarModule,F.D,I.rK];let oe=(()=>{class te{}return te.\u0275fac=function(xe){return new(xe||te)},te.\u0275mod=W.\u0275\u0275defineNgModule({type:te}),te.\u0275inj=W.\u0275\u0275defineInjector({imports:[Te,Y.F5]}),te})();W.\u0275\u0275setComponentScope(j.Ol,[o.NgIf,L.IonButton,L.IonCol,L.IonGrid,L.IonIcon,L.IonRow],[v.X$,K.zg]),W.\u0275\u0275setComponentScope(D.lZ,[o.NgClass,o.NgForOf,o.NgIf,L.IonCol,L.IonContent,L.IonFab,L.IonFabButton,L.IonHeader,L.IonIcon,L.IonInfiniteScroll,L.IonInfiniteScrollContent,L.IonRow,h.\u0275NgNoValidate,h.DefaultValueAccessor,h.NgControlStatus,h.NgControlStatusGroup,h.FormGroupDirective,h.FormControlName,D.N6],[v.X$]),W.\u0275\u0275setComponentScope(D.OO,[o.NgClass,o.NgForOf,o.NgIf,L.IonCol,L.IonContent,L.IonHeader,L.IonInfiniteScroll,L.IonInfiniteScrollContent,L.IonRow,h.\u0275NgNoValidate,h.DefaultValueAccessor,h.NgControlStatus,h.NgControlStatusGroup,h.FormGroupDirective,h.FormControlName,D.N6],[v.X$]),W.\u0275\u0275setComponentScope(D.rD,[o.NgClass,o.NgForOf,o.NgIf,L.IonButton,L.IonCard,L.IonCol,L.IonContent,L.IonFooter,L.IonGrid,L.IonHeader,L.IonIcon,L.IonRow,L.IonText,L.IonTitle,L.IonToolbar],[v.X$,K.zg]),W.\u0275\u0275setComponentScope(D._Z,[o.NgForOf,o.NgIf,L.IonButton,L.IonCol,L.IonIcon,L.IonItem,L.IonLabel,L.IonList,L.IonRow],[v.X$,K.Mo,K.X$]),W.\u0275\u0275setComponentScope(D.Zf,[o.NgIf,L.IonButton,L.IonIcon,L.IonToggle,L.BooleanValueAccessor],[v.X$,ee.h])},69977:(Ge,$,f)=>{f.d($,{M:()=>W});var o=f(45449),g=f(7389),h=f(90944),L=f(99826);const v=function(de){return{"small-device":de}};function b(de,K){if(1&de&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",8)(2,"div",9),o.\u0275\u0275text(3),o.\u0275\u0275elementStart(4,"span",10),o.\u0275\u0275text(5,"s"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(6,"div",11),o.\u0275\u0275text(7),o.\u0275\u0275pipe(8,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementContainerEnd()),2&de){const ee=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(2),o.\u0275\u0275property("ngClass",o.\u0275\u0275pureFunction1(6,v,ee.isSmallScreen||ee.hasBanner)),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",ee.qrCodeValidityCountDown,""),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngClass",o.\u0275\u0275pureFunction1(8,v,ee.isSmallScreen||ee.hasBanner)),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(8,4,"PG_HOME_TEXT_VALIDITY")," ")}}function k(de,K){if(1&de&&(o.\u0275\u0275namespaceSVG(),o.\u0275\u0275element(0,"circle")),2&de){const ee=o.\u0275\u0275nextContext(2);o.\u0275\u0275styleProp("animation-play-state",ee.paused?"paused":"running")("animation","circle-countdown "+ee.duration+"s linear infinite forwards, countdown-color "+ee.duration+"s ease-in infinite forwards")("stroke-dasharray",ee.circumference)("--circumference",ee.circumference+"px"),o.\u0275\u0275attribute("r",ee.radius)("cx",ee.center)("cy",ee.center)}}const F=function(de){return{hasBanner:de}};function Y(de,K){if(1&de&&(o.\u0275\u0275elementStart(0,"div",3),o.\u0275\u0275template(1,b,9,10,"ng-container",4),o.\u0275\u0275namespaceSVG(),o.\u0275\u0275elementStart(2,"svg",5),o.\u0275\u0275element(3,"circle",6),o.\u0275\u0275template(4,k,1,11,"circle",7),o.\u0275\u0275elementEnd()()),2&de){const ee=o.\u0275\u0275nextContext();o.\u0275\u0275property("className","component__countdown__circle"+(ee.isSmallScreen||ee.hasBanner?" small-device":""))("ngClass",o.\u0275\u0275pureFunction1(10,F,ee.hasBanner)),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!ee.isUltraSmallScreen&&!ee.isMediumSmallScreen),o.\u0275\u0275advance(1),o.\u0275\u0275attribute("viewBox",ee.viewBox),o.\u0275\u0275advance(1),o.\u0275\u0275styleProp("stroke-dasharray",ee.circumference),o.\u0275\u0275attribute("r",ee.radius)("cx",ee.center)("cy",ee.center),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!ee.paused)}}function I(de,K){if(1&de&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",8)(2,"div",16),o.\u0275\u0275text(3),o.\u0275\u0275elementStart(4,"span",10),o.\u0275\u0275text(5,"s"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(6,"div",17),o.\u0275\u0275text(7),o.\u0275\u0275pipe(8,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementContainerEnd()),2&de){const ee=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate1(" ",ee.qrCodeValidityCountDown,""),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(8,2,"PG_HOME_TEXT_VALIDITY")," ")}}function D(de,K){if(1&de&&(o.\u0275\u0275namespaceSVG(),o.\u0275\u0275element(0,"rect",18)),2&de){const ee=o.\u0275\u0275nextContext(2);o.\u0275\u0275styleProp("animation-play-state",ee.paused?"paused":"running")("animation","rect-countdown "+ee.duration+"s linear infinite forwards, countdown-color "+ee.duration+"s ease-in infinite forwards"),o.\u0275\u0275attribute("width","100%")("height","100%")}}function j(de,K){if(1&de&&(o.\u0275\u0275elementStart(0,"div",12),o.\u0275\u0275template(1,I,9,4,"ng-container",4),o.\u0275\u0275namespaceSVG(),o.\u0275\u0275elementStart(2,"svg",13),o.\u0275\u0275element(3,"rect",14),o.\u0275\u0275template(4,D,1,6,"rect",15),o.\u0275\u0275elementEnd()()),2&de){const ee=o.\u0275\u0275nextContext();o.\u0275\u0275property("className","component__countdown__rect"),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!ee.hasBanner),o.\u0275\u0275advance(1),o.\u0275\u0275attribute("viewBox","0 0 100 10"),o.\u0275\u0275advance(1),o.\u0275\u0275attribute("width","100%")("height","100%"),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!ee.paused)}}let W=(()=>{class de{constructor(ee){this.deviceInfo=ee,this.duration=0,this.paused=!1,this.countDown=0,this.qrCodeValidityCountDown=0,this.hasBanner=!1,this.displayCircularCountdown=!0,this.svgSize=150,this.viewBox="0 0 150 150",this.isSmallScreen=!1,this.isUltraSmallScreen=!1,this.isMediumSmallScreen=!1,this.radius=55,this.circumference=Math.PI*this.radius*2,this.center=this.radius+10,this.resizeListener=null}ngOnInit(){this.updateDeviceInfo(),this.addResizeListener()}ngOnDestroy(){this.removeResizeListener()}updateDeviceInfo(){this.isSmallScreen=this.deviceInfo.isSmallScreen(),this.isUltraSmallScreen=this.deviceInfo.isUltraSmallScreen(),this.isMediumSmallScreen=this.deviceInfo.isMediumSmallScreen(),this.updateRadiusAndCenter()}updateRadiusAndCenter(){this.radius=this.isUltraSmallScreen?35:this.isSmallScreen?45:this.isMediumSmallScreen?55:65,this.center=this.radius+10,this.circumference=Math.PI*this.radius*2,this.svgSize=2*this.center,this.viewBox=`0 0 ${this.svgSize} ${this.svgSize}`}addResizeListener(){this.resizeListener=()=>{this.updateDeviceInfo()},window.addEventListener("resize",this.resizeListener)}removeResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}}return de.\u0275fac=function(ee){return new(ee||de)(o.\u0275\u0275directiveInject(g.H))},de.\u0275cmp=o.\u0275\u0275defineComponent({type:de,selectors:[["app-countdown"]],inputs:{duration:"duration",paused:"paused",countDown:"countDown",qrCodeValidityCountDown:"qrCodeValidityCountDown",hasBanner:"hasBanner",displayCircularCountdown:"displayCircularCountdown"},decls:3,vars:2,consts:[[1,"component__countdown"],[3,"className","ngClass",4,"ngIf"],[3,"className",4,"ngIf"],[3,"className","ngClass"],[4,"ngIf"],["preserveAspectRatio","xMidYMid meet",1,"component__countdown__svg"],[1,"grey"],[3,"animation-play-state","animation","stroke-dasharray","--circumference",4,"ngIf"],[1,"component__countdown__content_validity_box"],[1,"component__countdown__content_validity_box__validity-countdown-holder","value",3,"ngClass"],[1,"seconds"],[1,"component__countdown__content_validity_box__validity-countdown-holder","validity",3,"ngClass"],[3,"className"],["preserveAspectRatio","none",1,"component__countdown__svg"],["rx","16","ry","16","x","0","y","0",1,"grey"],["rx","16","ry","16","x","0","y","0",3,"animation-play-state","animation",4,"ngIf"],[1,"component__countdown__content_validity_box__validity-countdown-holder","value","linear"],[1,"component__countdown__content_validity_box__validity-countdown-holder","validity","linear"],["rx","16","ry","16","x","0","y","0"]],template:function(ee,De){1&ee&&(o.\u0275\u0275elementStart(0,"div",0),o.\u0275\u0275template(1,Y,5,12,"div",1),o.\u0275\u0275template(2,j,5,6,"div",2),o.\u0275\u0275elementEnd()),2&ee&&(o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",De.displayCircularCountdown),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!De.displayCircularCountdown))},dependencies:[h.NgClass,h.NgIf,L.X$],styles:[".component__countdown[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column}.component__countdown__circle[_ngcontent-%COMP%]{position:relative;display:flex;aspect-ratio:1/1;margin:0 auto;container-type:inline-size;container-name:countdown-circle;width:clamp(76px,30vw,130px);max-width:130px}.component__countdown__circle.hasBanner[_ngcontent-%COMP%]{width:clamp(76px,25vw,130px)!important}.component__countdown__circle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%;transform:rotateY(-180deg) rotate(-90deg);transform-origin:50% 50%}.component__countdown__circle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke-dashoffset:0;stroke-linecap:round;stroke-width:.63em;stroke:#363636;fill:none}.component__countdown__circle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle.grey[_ngcontent-%COMP%]{stroke:#eee}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder[_ngcontent-%COMP%]{color:#333;font-family:Nunito,sans-serif;width:100%;text-align:center}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.value[_ngcontent-%COMP%]{font-size:clamp(1.8rem,9vw,2.6rem);font-weight:700}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.value[_ngcontent-%COMP%] > .seconds[_ngcontent-%COMP%]{font-size:.7em}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.validity[_ngcontent-%COMP%]{font-size:clamp(.75rem,2.9vw,.95rem);letter-spacing:1px}@supports (font-size: 1cqw){.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.value[_ngcontent-%COMP%]{font-size:clamp(1rem,29cqw,2.6rem)}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.value.small-device[_ngcontent-%COMP%]{font-size:clamp(.8rem,34cqw,2.6rem)}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.validity[_ngcontent-%COMP%]{font-size:clamp(.8rem,9cqw,.95rem)}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.validity.small-device[_ngcontent-%COMP%]{font-size:clamp(.55rem,9cqw,.95rem)}}.component__countdown__rect[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;align-items:center}.component__countdown__rect[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:10px}.component__countdown__rect[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{stroke-dashoffset:0;stroke-linecap:round;height:10px;fill:none;width:100%;stroke-width:10px}.component__countdown__rect[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] rect.grey[_ngcontent-%COMP%]{stroke-width:10px;stroke:#eee;fill:none}.component__countdown__rect[_ngcontent-%COMP%] .component__countdown__content_validity_box[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-bottom:.4rem}.component__countdown__rect[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder[_ngcontent-%COMP%]{color:#333;font-family:Nunito,sans-serif;text-align:center}.component__countdown__rect[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.value[_ngcontent-%COMP%]{font-size:clamp(1.2rem,3vw,1.8rem);font-weight:700;margin-bottom:.2rem}.component__countdown__rect[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.value[_ngcontent-%COMP%] > .seconds[_ngcontent-%COMP%]{font-size:.7em}.component__countdown__rect[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.validity[_ngcontent-%COMP%]{font-size:clamp(.7rem,1.5vw,.9rem);margin-top:0;margin-bottom:.6rem}@keyframes countdown-color{0%{stroke:#0ec254}45%{stroke:#0ec254}50%{stroke:#fcd24f}75%{stroke:#fcd24f}80%{stroke:#e40211}to{stroke:#e40211}}@keyframes circle-countdown{0%{stroke-dashoffset:0}to{stroke-dashoffset:var(--circumference)}}@keyframes rect-countdown{0%{width:100%}to{width:0}}@media (min-height: 860px) and (max-height: 1000px){.component__countdown__circle[_ngcontent-%COMP%]{width:30vw}.component__countdown__circle.small-device[_ngcontent-%COMP%]{width:clamp(76px,25vw,130px);max-width:110px}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.value[_ngcontent-%COMP%]{font-size:clamp(1.8rem,14vw,2.2rem)}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.validity[_ngcontent-%COMP%]{font-size:clamp(.75rem,4.5vw,.8rem)}}@media (min-height: 914px){.component__countdown__circle[_ngcontent-%COMP%]{width:30vw}.component__countdown__circle.small-device[_ngcontent-%COMP%]{width:clamp(76px,25vw,130px)}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.value[_ngcontent-%COMP%]{font-size:clamp(1.8rem,14vw,2.3rem)}.component__countdown__circle[_ngcontent-%COMP%] .component__countdown__content_validity_box__validity-countdown-holder.validity[_ngcontent-%COMP%]{font-size:clamp(.75rem,4.5vw,.95rem)}}.paused[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%], .paused[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{animation-play-state:paused}"]}),de})()},70713:(Ge,$,f)=>{f.d($,{E:()=>he});var o=f(45449),g=f(90603),h=f(47898),m=f(21284),L=f(90944),b=f(70079),k=f(99826);function F(Le,Ce){1&Le&&(o.\u0275\u0275elementStart(0,"div",16),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&Le&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"MD_CREATE_GUEST_TITLE")," "))}function Y(Le,Ce){1&Le&&(o.\u0275\u0275elementStart(0,"div",16),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&Le&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"MD_CREATE_GUEST_TITLE_UPDATE")," "))}function I(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",19),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&Le){const ie=Ce.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",ie," ")}}function D(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",17),o.\u0275\u0275template(1,I,2,1,"div",18),o.\u0275\u0275elementEnd()),2&Le){const ie=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",ie.getInputErrors("firstName"))}}function j(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",19),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&Le){const ie=Ce.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",ie," ")}}function W(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",17),o.\u0275\u0275template(1,j,2,1,"div",18),o.\u0275\u0275elementEnd()),2&Le){const ie=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",ie.getInputErrors("lastName"))}}function de(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",19),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&Le){const ie=Ce.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",ie," ")}}function K(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",17),o.\u0275\u0275template(1,de,2,1,"div",18),o.\u0275\u0275elementEnd()),2&Le){const ie=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",ie.getInputErrors("companyName"))}}function ee(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",19),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&Le){const ie=Ce.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",ie," ")}}function De(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",17),o.\u0275\u0275template(1,ee,2,1,"div",18),o.\u0275\u0275elementEnd()),2&Le){const ie=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",ie.getInputErrors("phoneNumber"))}}function Te(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",19),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&Le){const ie=Ce.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",ie," ")}}function ce(Le,Ce){if(1&Le&&(o.\u0275\u0275elementStart(0,"div",17),o.\u0275\u0275template(1,Te,2,1,"div",18),o.\u0275\u0275elementEnd()),2&Le){const ie=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",ie.getInputErrors("strange"))}}function oe(Le,Ce){if(1&Le){const ie=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",16)(1,"button",20),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(ie);const me=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(me.onCreateGuest())}),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd()()}if(2&Le){const ie=o.\u0275\u0275nextContext().ngIf;o.\u0275\u0275advance(1),o.\u0275\u0275property("disabled","Offline"===ie.status),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(3,2,"MD_CREATE_GUEST_BTN_CREATE")," ")}}function te(Le,Ce){if(1&Le){const ie=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",16)(1,"button",20),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(ie);const me=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(me.onEditGuest())}),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd()()}if(2&Le){const ie=o.\u0275\u0275nextContext().ngIf;o.\u0275\u0275advance(1),o.\u0275\u0275property("disabled","Offline"===ie.status),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(3,2,"MD_CREATE_GUEST_BTN_SALVE")," ")}}function ge(Le,Ce){if(1&Le&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,oe,4,4,"div",3),o.\u0275\u0275template(2,te,4,4,"div",3),o.\u0275\u0275elementContainerEnd()),2&Le){const ie=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",ie.isNew),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!ie.isNew)}}const xe=function(){return{mask:"+55 00 00000-0000",len:17}};let he=(()=>{class Le{constructor(ie,se,me,Ne,_e,we,Ee,le,Ue,ke,ze){this.modalController=ie,this.notificatorService=se,this.createEventService=me,this.loadingService=Ne,this.commonService=_e,this.navParams=we,this.companyService=Ee,this.logService=le,this.translateConfigService=Ue,this.utilsService=ke,this.stateService=ze,this.defaultFirstName="",this.defaultLastName="",this.defaultCompanyName="",this.defaultPhoneNumber="",this.defaultEmail="",this.defaultErrors=[],this.firstName=this.defaultFirstName,this.lastName=this.defaultLastName,this.companyName=this.defaultCompanyName,this.phoneNumber=this.defaultPhoneNumber,this.email=this.defaultEmail,this.errors=this.defaultErrors,this.processReceivedRouteGuest=ye=>{if(this.isNew=!ye,ye){const je=ye?.fullName?.split(" ")[0],Ze=ye?.fullName?.split(" ").slice(1).join(" ");this.firstName=ye?.fullName?je:this.processReceivedRouteGuestFirstName(ye),this.lastName=ye?.fullName?Ze:this.processReceivedRouteGuestLastName(ye),this.companyName=this.processReceivedRouteGuestCompany(ye),this.email=this.processReceivedRouteGuestEmail(ye)}},this.processReceivedRouteType=ye=>{this.type=ye||"company"},this.processReceivedRouteGuestFirstName=ye=>ye.firstName?ye.firstName:"",this.processReceivedRouteGuestLastName=ye=>ye.lastName?ye.lastName:"",this.processReceivedRouteGuestCompany=ye=>ye.company?ye.company:"",this.processReceivedRouteGuestPhone=ye=>ye.phone?ye.phone:"",this.processReceivedRouteGuestEmail=ye=>ye.email?ye.email:"",this.onClose=()=>{this.modalController.dismiss()},this.onFirstNameChange=ye=>{const{value:je}=ye.target;this.firstName=je},this.onLastNameChange=ye=>{const{value:je}=ye.target;this.lastName=je},this.onCompanyNameChange=ye=>{const{value:je}=ye.target;this.companyName=je},this.onPhoneNumberChange=ye=>{const{value:je}=ye.target;this.phoneNumber=je},this.onPhoneNumberFocus=ye=>{this.phoneNumber.trim()||(this.phoneNumber="+55")},this.onPhoneNumberBlur=ye=>{"+55"===this.phoneNumber.trim()&&(this.phoneNumber="")},this.onEmailChange=ye=>{const{value:je}=ye.target;this.email=je},this.onCreateGuest=()=>{const ye=this.validateCreateVisitor();this.thereWasErrors(ye)?(this.errors=ye,this.toastFieldsErro()):(this.errors=[],this.handleCreateVisitor())},this.handleCreateVisitor=()=>{this.loadingService.show(this.translateConfigService.translate("MD_CREATE_GUEST_LOADING_CREATING"),"create-guest");const ye=this.commonService.clearString(this.firstName),je=this.commonService.clearString(this.lastName),Ze=this.commonService.clearString(this.companyName),_t=this.commonService.clearString(this.email),At=this.commonService.clearString(this.phoneNumber),Vt={firstName:ye,lastName:je,company:Ze,email:_t.length?_t:null,phone:At.length?At.length<10?null:At.replace(/[() -]/g,""):null,image:"",imageContentType:""};console.log("handleCreateVisitor type:",this.type),"company"===this.type?this.createEventService.createGuest(Vt).then(this.handleCreateGuestSuccessResponse).catch(fn=>this.handleCreateGuestErrorResponse(fn,"createEventService_createGuest::company")):"personal"===this.type&&this.createEventService.createPrivateGuest(Vt).then(this.handleCreateGuestSuccessResponse).catch(fn=>this.handleCreateGuestErrorResponse(fn,"createEventService_createPrivateGuest::personal"))},this.handleCreateGuestSuccessResponse=ye=>{this.loadingService.hide(null,"create-guest");const je={title:this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_CREATE_TITLE"),message:this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_CREATE_MESSAGE"),type:"success"};this.notificatorService.notify(je),this.modalController.dismiss(ye)},this.handleCreateGuestErrorResponse=(ye,je)=>{console.log("handleCreateGuestErrorResponse:",ye),this.loadingService.hide(null,"create-guest");let Ze="";const _t=`http::handleCreateGuestErrorResponse::${je}`;if(ye.error&&ye.error){const Vt=ye.error.errorKey;500!==ye.error.status?Ze="documentexists"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_DOCUMENT_EXISTS"):"phoneexists"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_PHONE_EXISTS"):"emailexists"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_EMAIL_EXISTS"):"notmatched"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_NO_MATCHED"):"timeout"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_NO_TIMEOUT"):Vt:(this.logService.logError(_t,"",ye),Ze=this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_INTERNAL_SERVE_ERROR"))}else this.logService.logError(_t,"",ye),Ze=this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_NO_TIMEOUT");const At={title:this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_TITLE"),message:Ze,type:"error"};this.notificatorService.notify(At)},this.onEditGuest=()=>{const ye=this.validateCreateVisitor();this.thereWasErrors(ye)?(this.errors=ye,this.toastFieldsErro()):this.handleUpdateVisitor()},this.handleUpdateVisitor=()=>{this.loadingService.show(this.translateConfigService.translate("MD_CREATE_GUEST_LOADING_UPDATING"),"update-guest");const ye=this.commonService.clearString(this.firstName),je=this.commonService.clearString(this.lastName),Ze=this.commonService.clearString(this.companyName),_t=this.commonService.clearString(this.email),At=this.commonService.clearString(this.phoneNumber),Vt={...this.guest,firstName:ye,lastName:je,company:Ze,email:_t.length?_t:null,phone:At.length?At.length<10?null:At.replace(/[() -]/g,""):null};"company"===this.type?this.companyService.updateContact(Vt).then(fn=>this.handleUpdateGuestSuccessResponse(Vt)).catch(fn=>this.handleUpdateGuestErrorResponse(fn,"companyService_updateContact::company")):"personal"===this.type&&this.createEventService.createPrivateGuest(Vt).then(this.handleUpdateGuestSuccessResponse).catch(fn=>this.handleUpdateGuestErrorResponse(fn,"createEventService_createPrivateGuest::personal"))},this.handleUpdateGuestSuccessResponse=ye=>{this.loadingService.hide(null,"update-guest");const je={title:this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_UPDATE_TITLE"),message:"",type:"success"};this.notificatorService.notify(je),this.modalController.dismiss(ye)},this.handleUpdateGuestErrorResponse=(ye,je)=>{console.log("handleUpdateGuestErrorResponse:",ye),this.loadingService.hide(null,"update-guest");let Ze="";const _t=`http::handleUpdateGuestErrorResponse::${je}`;if(ye.error&&ye.error){const Vt=ye.error.errorKey;500!==ye.error.status?Ze="documentexists"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_DOCUMENT_EXISTS"):"phoneexists"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_PHONE_EXISTS"):"emailexists"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_EMAIL_EXISTS"):"notmatched"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_NO_MATCHED"):"timeout"===Vt?this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_NO_TIMEOUT"):Vt:(this.logService.logError(_t,"",ye),Ze=this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_SERVE_ERROR"))}else this.logService.logError(_t,"",ye),Ze=this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_NO_TIMEOUT");const At={title:this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_TITLE"),message:Ze,type:"error"};this.notificatorService.notify(At)},this.thereWasErrors=ye=>{let je=!1;return ye.forEach(Ze=>{Ze.errors.length&&(je=!0)}),je},this.thereWasErrorsAtInput=ye=>!!this.getInputErrors(ye).length,this.getInputErrors=ye=>{const je=this.errors.find(Ze=>Ze.input===ye);return je?je.errors:[]},this.validateCreateVisitor=()=>{const ye=[],je=this.commonService.clearString(this.firstName),Ze=this.commonService.clearString(this.lastName),_t=this.commonService.clearString(this.companyName),At=this.commonService.clearString(this.email),Vt=this.commonService.clearString(this.phoneNumber);return ye.push(this.validateFirstNameField({firstName:je,lastName:Ze})),ye.push(this.validateLastNameField({lastName:Ze})),ye.push(this.validateCompanyNameField({company:_t})),ye.push(this.validatePhoneNumberField({phoneNumber:Vt})),ye.push(this.validateEmailField({email:At})),console.log("results:",ye),ye},this.validateFirstNameField=ye=>{const je={input:"firstName",errors:[]};return ye.firstName?0===ye.firstName.length?je.errors.push(this.translateConfigService.translate("MD_CREATE_GUEST_TEXT_LENGTH_FIRSTNAME")):(_t=>{_t.firstName&&_t.lastName&&(_t.firstName+_t.lastName).length>40&&je.errors.push(this.translateConfigService.translate("MD_CREATE_GUEST_TEXT_LENGTH_FULLNAME"))})(ye):je.errors.push(this.translateConfigService.translate("MD_CREATE_GUEST_TEXT_FIRSTNAME_EMPTY")),je},this.validateLastNameField=ye=>{const je={input:"lastName",errors:[]};return ye.lastName?0===ye.lastName.length&&je.errors.push(this.translateConfigService.translate("MD_CREATE_GUEST_TEXT_LENGTH_LAST")):je.errors.push(this.translateConfigService.translate("MD_CREATE_GUEST_TEXT_LAST_EMPTY")),je},this.validateCompanyNameField=ye=>{const je={input:"companyName",errors:[]};return ye.company&&ye.company.length>40&&je.errors.push(this.translateConfigService.translate("MD_CREATE_GUEST_TEXT_LENGTH_COMPANY")),je},this.validatePhoneNumberField=ye=>{const je={input:"phoneNumber",errors:[]};return ye.phoneNumber&&ye.phoneNumber.length&&3!==(_t=ye.phoneNumber).length&&_t.length<13&&je.errors.push(this.translateConfigService.translate("MD_CREATE_GUEST_TEXT_INVALID_PHONENUMBER")),je;var _t},this.validateEmailField=ye=>{const je={input:"strange",errors:[]};return ye.email&&ye.email.length&&((_t=>this.utilsService.validateEmail(_t))(ye.email)||je.errors.push(this.translateConfigService.translate("MD_CREATE_GUEST_TEXT_EMAIL_INVALID"))),je},this.guest=we.get("contact"),this.type=we.get("type"),this.processReceivedRouteGuest(this.guest),this.processReceivedRouteType(this.type)}ngOnInit(){}toastFieldsErro(){const ie={title:this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_FIELD_TITLE"),message:this.translateConfigService.translate("MD_CREATE_GUEST_TOAST_FIELD_MESSAGE"),type:"error"};this.notificatorService.notify(ie)}}return Le.\u0275fac=function(ie){return new(ie||Le)(o.\u0275\u0275directiveInject(g.ModalController),o.\u0275\u0275directiveInject(h.V6),o.\u0275\u0275directiveInject(h.jc),o.\u0275\u0275directiveInject(h.bz),o.\u0275\u0275directiveInject(h.v_),o.\u0275\u0275directiveInject(g.NavParams),o.\u0275\u0275directiveInject(h.JN),o.\u0275\u0275directiveInject(h.$V),o.\u0275\u0275directiveInject(h.wK),o.\u0275\u0275directiveInject(h.FW),o.\u0275\u0275directiveInject(m.b))},Le.\u0275cmp=o.\u0275\u0275defineComponent({type:Le,selectors:[["app-create-guest"]],decls:39,vars:35,consts:[[1,"fix-header-modal-ios","ion-no-border"],[1,"centralized-content"],[1,"page-title"],["class","title",4,"ngIf"],[1,"ion-margin-vertical"],[1,"input-holder"],[1,"input"],["type","text","id","first-name","name","firstName",3,"placeholder","value","input"],["class","errors",4,"ngIf"],["type","text","id","last-name","name","lastName",3,"placeholder","value","input"],["type","text","id","company-name","name","companyName",3,"placeholder","value","input"],["type","phone","id","phoneNumber","name","phoneNumber","maxlength","17",3,"placeholder","value","brmasker","focus","blur","input"],["type","email","id","email","name","email",3,"placeholder","value","input"],[1,"button-holder"],[1,"back",3,"click"],[4,"ngIf"],[1,"title"],[1,"errors"],["class","error",4,"ngFor","ngForOf"],[1,"error"],[3,"disabled","click"]],template:function(ie,se){1&ie&&(o.\u0275\u0275element(0,"ion-header",0),o.\u0275\u0275elementStart(1,"ion-content")(2,"div",1)(3,"div",2),o.\u0275\u0275template(4,F,3,3,"div",3),o.\u0275\u0275template(5,Y,3,3,"div",3),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(6,"ion-row")(7,"ion-col",4)(8,"div",5)(9,"div",6)(10,"input",7),o.\u0275\u0275listener("input",function(Ne){return se.onFirstNameChange(Ne)}),o.\u0275\u0275pipe(11,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(12,D,2,1,"div",8),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(13,"div",5)(14,"div",6)(15,"input",9),o.\u0275\u0275listener("input",function(Ne){return se.onLastNameChange(Ne)}),o.\u0275\u0275pipe(16,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(17,W,2,1,"div",8),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(18,"div",5)(19,"div",6)(20,"input",10),o.\u0275\u0275listener("input",function(Ne){return se.onCompanyNameChange(Ne)}),o.\u0275\u0275pipe(21,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(22,K,2,1,"div",8),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(23,"div",5)(24,"div",6)(25,"input",11),o.\u0275\u0275listener("focus",function(Ne){return se.onPhoneNumberFocus(Ne)})("blur",function(Ne){return se.onPhoneNumberBlur(Ne)})("input",function(Ne){return se.onPhoneNumberChange(Ne)}),o.\u0275\u0275pipe(26,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(27,De,2,1,"div",8),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(28,"div",5)(29,"div",6)(30,"input",12),o.\u0275\u0275listener("input",function(Ne){return se.onEmailChange(Ne)}),o.\u0275\u0275pipe(31,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(32,ce,2,1,"div",8),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(33,"div",13)(34,"button",14),o.\u0275\u0275listener("click",function(){return se.onClose()}),o.\u0275\u0275text(35),o.\u0275\u0275pipe(36,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275template(37,ge,3,2,"ng-container",15),o.\u0275\u0275pipe(38,"async"),o.\u0275\u0275elementEnd()()()()()),2&ie&&(o.\u0275\u0275advance(4),o.\u0275\u0275property("ngIf",se.isNew),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!se.isNew),o.\u0275\u0275advance(5),o.\u0275\u0275property("placeholder",o.\u0275\u0275pipeBind1(11,20,"MD_CREATE_GUEST_INPUT_FIRST_NAME"))("value",se.firstName),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",se.thereWasErrorsAtInput("firstName")),o.\u0275\u0275advance(3),o.\u0275\u0275property("placeholder",o.\u0275\u0275pipeBind1(16,22,"MD_CREATE_GUEST_INPUT_LAST_NAME"))("value",se.lastName),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",se.thereWasErrorsAtInput("lastName")),o.\u0275\u0275advance(3),o.\u0275\u0275property("placeholder",o.\u0275\u0275pipeBind1(21,24,"MD_CREATE_GUEST_INPUT_COMPANY"))("value",se.companyName),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",se.thereWasErrorsAtInput("companyName")),o.\u0275\u0275advance(3),o.\u0275\u0275property("placeholder",o.\u0275\u0275pipeBind1(26,26,"MD_CREATE_GUEST_INPUT_PHONE"))("value",se.phoneNumber)("brmasker",o.\u0275\u0275pureFunction0(34,xe)),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",se.thereWasErrorsAtInput("phoneNumber")),o.\u0275\u0275advance(3),o.\u0275\u0275property("placeholder",o.\u0275\u0275pipeBind1(31,28,"MD_CREATE_GUEST_INPUT_EMAIL"))("value",se.email),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",se.thereWasErrorsAtInput("strange")),o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(36,30,"MD_CREATE_GUEST_BTN_CLOSE")," "),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",o.\u0275\u0275pipeBind1(38,32,se.stateService.getState())))},dependencies:[L.NgForOf,L.NgIf,g.IonCol,g.IonContent,g.IonHeader,g.IonRow,b.bS,L.AsyncPipe,k.X$],styles:[".centralized-content[_ngcontent-%COMP%]{height:calc(100vh - 56px);display:flex;justify-content:flex-start;flex-direction:column}.centralized-content[_ngcontent-%COMP%] .errors[_ngcontent-%COMP%]{width:80%;margin:12px 10% 0;color:#f0181b;text-align:center}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;text-align:center;margin:32px 32px 8px;font-size:initial!important}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{padding-top:1em;justify-content:center;margin:0}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:0;margin-bottom:8px}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]:first-of-type{margin-top:0}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:8px;color:#333}.centralized-content[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{display:flex;justify-content:space-around}ion-header.fix-header-modal-ios.ios[_ngcontent-%COMP%]{height:0px!important}"]}),Le})()},31044:(Ge,$,f)=>{f.d($,{P:()=>j});var o=f(45449),g=f(15439),h=f.n(g),m=f(47898),L=f(90944),b=f(90603),k=f(3035);function F(W,de){1&W&&(o.\u0275\u0275elementStart(0,"ion-button",6),o.\u0275\u0275text(1," Cancelar "),o.\u0275\u0275elementEnd())}function Y(W,de){1&W&&(o.\u0275\u0275elementStart(0,"ion-button",6),o.\u0275\u0275text(1," OK "),o.\u0275\u0275elementEnd())}const I=function(W){return{isNotificationScreen:W}},D=["*"];let j=(()=>{class W{constructor(K){this.momentService=K,this.format=24,this.valueHour=h()().format("HH:mm"),this.timeSet=new o.EventEmitter,this.isNotificationScreen=!1,this.customTheme={container:{bodyBackgroundColor:"#fff",buttonColor:"#6cb52c"},dial:{dialBackgroundColor:"#6cb52c",dialEditableActiveColor:"#6cb52c"},clockFace:{clockFaceBackgroundColor:"#f0f0f0",clockHandColor:"#6cb52c",clockFaceTimeInactiveColor:"#6cb52c"}}}ngOnInit(){console.log("valueHour:",this.valueHour)}get formattedValue(){if(!this.valueHour)return h()().format("HH:mm");try{let K=this.valueHour;if(K.includes(":")){const De=K.split(":");De.length>=2&&(K=`${De[0]}:${De[1]}`)}const ee=h()(K,"HH:mm",!0);if(ee.isValid())return ee.format("HH:mm")}catch(K){console.warn("Erro ao formatar hor\xe1rio:",this.valueHour,K)}return h()().format("HH:mm")}get displayValue(){if(this.isNotificationScreen)try{return this.valueHour?.split(":").slice(0,2).join(":")||"00:00"}catch{return"00:00"}const K=new Date,ee=new Date(K.toDateString()+" "+this.formattedValue);return this.momentService.formatAs(ee,"HH[h]mm[min]")}onTimeSet(K){console.log("Time selected:",K),this.timeSet.emit(K)}}return W.\u0275fac=function(K){return new(K||W)(o.\u0275\u0275directiveInject(m.EM))},W.\u0275cmp=o.\u0275\u0275defineComponent({type:W,selectors:[["app-custom-timepicker"]],inputs:{format:"format",valueHour:"valueHour",isNotificationScreen:"isNotificationScreen"},outputs:{timeSet:"timeSet"},ngContentSelectors:D,decls:10,vars:10,consts:[[1,"content_custom_timepicker"],["type","button",1,"hidden-input-button",2,"width","100px",3,"ngxTimepicker","format","value","ngClass"],[3,"cancelBtnTmpl","confirmBtnTmpl","theme","timeSet"],["picker",""],["cancelBtn",""],["confirmBtn",""],["fill","clear"]],template:function(K,ee){if(1&K&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275elementStart(0,"div",0)(1,"button",1),o.\u0275\u0275text(2),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(3,"ngx-material-timepicker",2,3),o.\u0275\u0275listener("timeSet",function(Te){return ee.onTimeSet(Te)}),o.\u0275\u0275elementEnd(),o.\u0275\u0275template(5,F,2,0,"ng-template",null,4,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275template(7,Y,2,0,"ng-template",null,5,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275projection(9),o.\u0275\u0275elementEnd()),2&K){const De=o.\u0275\u0275reference(4),Te=o.\u0275\u0275reference(6),ce=o.\u0275\u0275reference(8);o.\u0275\u0275advance(1),o.\u0275\u0275property("ngxTimepicker",De)("format",ee.format)("value",ee.formattedValue)("ngClass",o.\u0275\u0275pureFunction1(8,I,ee.isNotificationScreen)),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",ee.displayValue," "),o.\u0275\u0275advance(1),o.\u0275\u0275property("cancelBtnTmpl",Te)("confirmBtnTmpl",ce)("theme",ee.customTheme)}},dependencies:[L.NgClass,b.IonButton,k.ro,k.I2],styles:[".content_custom_timepicker[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;background:transparent;position:relative;left:.6em;color:#000}.content_custom_timepicker[_ngcontent-%COMP%] button.isNotificationScreen[_ngcontent-%COMP%]{width:98px!important;font-size:inherit;left:initial;color:inherit;font-weight:inherit;width:inherit;padding:inherit}"]}),W})()},38124:(Ge,$,f)=>{f.d($,{I:()=>L});var o=f(45449),g=f(90944),m=f(99826);let L=(()=>{class v{constructor(){this.reject=()=>{console.log("reject"),this.onRejectCallback()},this.accept=()=>{console.log("accept"),this.onSuccessCallback()}}ngOnInit(){}}return v.\u0275fac=function(k){return new(k||v)},v.\u0275cmp=o.\u0275\u0275defineComponent({type:v,selectors:[["app-forgot-password-modal"]],inputs:{show:"show",onRejectCallback:"onRejectCallback",onSuccessCallback:"onSuccessCallback"},decls:18,vars:13,consts:[[3,"ngClass"],[1,"content"],[1,"background"],[1,"modal-container"],[1,"modal-title"],[1,"modal-body"],[1,"topic"],[1,"modal-footer"],[1,"reject",3,"click"],[1,"accept",3,"click"]],template:function(k,F){1&k&&(o.\u0275\u0275elementStart(0,"div",0)(1,"div",1),o.\u0275\u0275element(2,"div",2),o.\u0275\u0275elementStart(3,"div",3)(4,"div",4),o.\u0275\u0275text(5),o.\u0275\u0275pipe(6,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(7,"div",5)(8,"div",6),o.\u0275\u0275text(9),o.\u0275\u0275pipe(10,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(11,"div",7)(12,"button",8),o.\u0275\u0275listener("click",function(){return F.reject()}),o.\u0275\u0275text(13),o.\u0275\u0275pipe(14,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(15,"button",9),o.\u0275\u0275listener("click",function(){return F.accept()}),o.\u0275\u0275text(16),o.\u0275\u0275pipe(17,"translate"),o.\u0275\u0275elementEnd()()()()()),2&k&&(o.\u0275\u0275property("ngClass","forgot-password-modal "+(F.show?"show":"")),o.\u0275\u0275advance(5),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(6,5,"MD_FORGOTPASSWORD_TEXT_TITLE")," "),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(10,7,"MD_FORGOTPASSWORD_TEXT_DESCRIPTION")," "),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(14,9,"MD_FORGOTPASSWORD_BTN_CANCEL")," "),o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(17,11,"MD_FORGOTPASSWORD_BTN_NEXT")," "))},dependencies:[g.NgClass,m.X$],styles:[".forgot-password-modal[_ngcontent-%COMP%]{height:0;bottom:0;position:absolute;width:100vw;transition:height .5s ease-in-out;overflow:hidden}.forgot-password-modal.show[_ngcontent-%COMP%]{height:100vh;transition:height .5s ease-out}.forgot-password-modal.show[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{opacity:.3;transition:opacity .5s ease-out}.forgot-password-modal.show[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{margin-top:35%;transition:margin-top 1s ease}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:0;top:0;transition:opacity .5s ease-out}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{min-height:60vh;background-color:#fff;width:86vw;margin:100% auto auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;transition:margin-top 1s ease}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:500;position:absolute;top:0;height:3.5em;line-height:3.5em;width:calc(100% - 48px);background-color:#fff}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 6em);width:calc(100% - 48px);top:3.5em;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .topic[_ngcontent-%COMP%]{margin-bottom:16px}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .topic[_ngcontent-%COMP%] .highlight[_ngcontent-%COMP%]{font-weight:500}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:3.5em;width:calc(100% - 48px);line-height:3.5em;display:flex;justify-content:space-between;align-items:center;overflow:hidden;background-color:#fff}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:.9em;background-color:#fff;color:#ccc;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.forgot-password-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),v})()},33159:(Ge,$,f)=>{f.d($,{R:()=>v});var o=f(45449),g=f(47898),h=f(90944);const L=function(b){return{"small-device":b}};let v=(()=>{class b{constructor(F){this.deviceInfo=F,this.tabindex=0}ngOnInit(){}}return b.\u0275fac=function(F){return new(F||b)(o.\u0275\u0275directiveInject(g.Hc))},b.\u0275cmp=o.\u0275\u0275defineComponent({type:b,selectors:[["app-full-logo"]],inputs:{tabindex:"tabindex"},decls:2,vars:4,consts:[[1,"logo-holder",3,"ngClass","tabIndex"],["src","assets/full-logo.svg","width","223","role","img","alt","Logo Key Access"]],template:function(F,Y){1&F&&(o.\u0275\u0275elementStart(0,"div",0),o.\u0275\u0275element(1,"img",1),o.\u0275\u0275elementEnd()),2&F&&o.\u0275\u0275property("ngClass",o.\u0275\u0275pureFunction1(2,L,Y.deviceInfo.isSmallScreen()))("tabIndex",Y.tabindex)},dependencies:[h.NgClass],styles:[".logo-holder[_ngcontent-%COMP%]{text-align:center;margin:8vh auto 0;width:60%}.logo-holder.small-device[_ngcontent-%COMP%]{margin:7.3vh auto 0!important}"]}),b})()},36290:(Ge,$,f)=>{f.d($,{G:()=>K});var o=f(45449),g=f(82687),h=f(47898),m=f(22255),L=f(90944),b=f(90603),k=f(99826);function F(ee,De){if(1&ee&&(o.\u0275\u0275elementStart(0,"ion-buttons",10),o.\u0275\u0275element(1,"ion-back-button",11),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&ee){const Te=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("defaultHref",Te.defaultHref)("mode",Te.isHome?"ios":"md"),o.\u0275\u0275attribute("aria-label",o.\u0275\u0275pipeBind1(2,3,"BTN_BACK"))}}function Y(ee,De){1&ee&&(o.\u0275\u0275elementStart(0,"ion-buttons",12),o.\u0275\u0275element(1,"ion-img",13),o.\u0275\u0275elementEnd())}function I(ee,De){if(1&ee){const Te=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ion-button",15),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(Te);const oe=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(oe.navigateToPendingLiberations())}),o.\u0275\u0275pipe(1,"translate"),o.\u0275\u0275elementStart(2,"div",16),o.\u0275\u0275element(3,"ion-icon",17),o.\u0275\u0275elementEnd()()}2&ee&&o.\u0275\u0275attribute("aria-label",o.\u0275\u0275pipeBind1(1,1,"ACCESSIBILITY.ARIA_LABELS.PENDING_RELEASE"))}function D(ee,De){if(1&ee&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,I,4,3,"ion-button",14),o.\u0275\u0275elementContainerEnd()),2&ee){const Te=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",Te.pendingRelease.existsPending)}}function j(ee,De){if(1&ee){const Te=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ion-button",18),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(Te);const oe=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(oe.navigateToQRCode())}),o.\u0275\u0275element(1,"ion-icon",19),o.\u0275\u0275elementEnd()}}function W(ee,De){if(1&ee){const Te=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ion-button",20),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(Te);const oe=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(oe.callRefresh.emit())}),o.\u0275\u0275element(1,"ion-icon",21),o.\u0275\u0275elementEnd()}}function de(ee,De){1&ee&&(o.\u0275\u0275elementStart(0,"ion-menu-toggle",22)(1,"ion-button"),o.\u0275\u0275element(2,"ion-icon",23),o.\u0275\u0275elementEnd()())}let K=(()=>{class ee{constructor(Te,ce,oe){this.navigationService=Te,this.pendingRelease=ce,this.managerNotificationPersistentService=oe,this.defaultHref="home",this.showBtnOnback=!0,this.menuToggle=!0,this.toQRCode=!0,this.isHome=!1,this.refresh=!0,this.showBadge=!0,this.onBack=new o.EventEmitter,this.callRefresh=new o.EventEmitter,this.faQrCodeIcon=g.rtB,this.isPending=!1}ngOnInit(){console.log()}ngOnDestroy(){console.log()}navigateToQRCode(){this.navigationService.forward(["/home"])}navigateToPendingLiberations(){this.navigationService.forward(["/push-notifications"]),this.managerNotificationPersistentService.stopContinuousVibration()}}return ee.\u0275fac=function(Te){return new(Te||ee)(o.\u0275\u0275directiveInject(h.f5),o.\u0275\u0275directiveInject(h.xJ),o.\u0275\u0275directiveInject(m._))},ee.\u0275cmp=o.\u0275\u0275defineComponent({type:ee,selectors:[["app-header"]],inputs:{title:"title",img:"img",defaultHref:"defaultHref",showBtnOnback:"showBtnOnback",menuToggle:"menuToggle",toQRCode:"toQRCode",isHome:"isHome",refresh:"refresh",showBadge:"showBadge"},outputs:{onBack:"onBack",callRefresh:"callRefresh"},decls:12,vars:9,consts:[[2,"overflow","visible",3,"mode"],["role","columnheader",3,"mode"],["toolbar",""],["slot","start",4,"ngIf"],["slot","start","class","ion-margin-start",4,"ngIf"],["slot","end",1,"ion-margin-end"],[4,"ngIf"],["aria-label","QrCode",3,"click",4,"ngIf"],[3,"click",4,"ngIf"],["auto-hide","false",4,"ngIf"],["slot","start"],["text","",3,"defaultHref","mode"],["slot","start",1,"ion-margin-start"],["alt","logo Key Access","src","./assets/toolbar-logo.png"],["color","danger","class","pulsate-fwd",3,"click",4,"ngIf"],["color","danger",1,"pulsate-fwd",3,"click"],[1,"circle"],["src","./assets/img/icon-alert-cancela.svg"],["aria-label","QrCode",3,"click"],["src","./assets/svg/faqrcode.svg",2,"color","#656768"],[3,"click"],["slot","icon-only","mode","ios","name","refresh"],["auto-hide","false"],["slot","icon-only","mode","ios","name","menu"]],template:function(Te,ce){1&Te&&(o.\u0275\u0275elementStart(0,"ion-header",0)(1,"ion-toolbar",1,2),o.\u0275\u0275template(3,F,3,5,"ion-buttons",3),o.\u0275\u0275template(4,Y,2,0,"ion-buttons",4),o.\u0275\u0275elementStart(5,"ion-title"),o.\u0275\u0275text(6),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(7,"ion-buttons",5),o.\u0275\u0275template(8,D,2,1,"ng-container",6),o.\u0275\u0275template(9,j,2,0,"ion-button",7),o.\u0275\u0275template(10,W,2,0,"ion-button",8),o.\u0275\u0275template(11,de,3,0,"ion-menu-toggle",9),o.\u0275\u0275elementEnd()()()),2&Te&&(o.\u0275\u0275property("mode",ce.isHome?"ios":"md"),o.\u0275\u0275advance(1),o.\u0275\u0275property("mode",ce.isHome?"ios":"md"),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",!ce.isHome&&ce.showBtnOnback),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",ce.isHome),o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",ce.title?ce.title:"KeyAccess"," "),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",ce.showBadge),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",ce.toQRCode&&!ce.isHome),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",ce.refresh&&!ce.isHome),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",ce.menuToggle))},dependencies:[L.NgIf,b.IonBackButton,b.IonButton,b.IonButtons,b.IonHeader,b.IonIcon,b.IonImg,b.IonMenuToggle,b.IonTitle,b.IonToolbar,b.IonBackButtonDelegate,k.X$],styles:["ion-toolbar[_ngcontent-%COMP%]{font-family:Nunito,sans-serif;--background: #fff}ion-toolbar[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%]{height:25px;width:25px}ion-toolbar[_ngcontent-%COMP%] ion-title[_ngcontent-%COMP%]{letter-spacing:1px}ion-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:24px;padding:0;width:24px;margin:0;font-size:19px;color:#656768}ion-button.hover[_ngcontent-%COMP%]{background:#fff}.circle[_ngcontent-%COMP%]{position:relative}.circle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;width:15px;height:15px;background:#6cb52d;display:flex;justify-content:center;align-items:center;border-radius:20px;left:-7px;z-index:1;color:#fff;font-weight:600;padding:2px;font-size:6px!important}.circle[_ngcontent-%COMP%] .circle_two[_ngcontent-%COMP%]{height:20px;width:20px;background:var(--ion-color-danger);overflow:visible;display:flex;align-items:center;justify-content:center;border-radius:50%}.circle[_ngcontent-%COMP%] .circle_two[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%]{position:relative;height:12px;width:12px;background:var(--ion-color-danger);border-radius:50%;border:solid 1px #fff;display:flex;align-items:center;justify-content:center;align-content:center}.circle[_ngcontent-%COMP%] .circle_two[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%] .center[_ngcontent-%COMP%]{background:#fff;width:4px;height:4px;position:relative;border-radius:50%}.pulsate-fwd[_ngcontent-%COMP%]{border-radius:50%;animation:pulsate-fwd .8s ease-in-out infinite both;outline:none}ion-button.pulsate-fwd[_ngcontent-%COMP%]{--border-radius: 50%;width:38px;height:38px}@keyframes pulsate-fwd{0%{transform:scale(1)}50%{transform:scale(1.5)}to{transform:scale(1)}}"]}),ee})()},24889:(Ge,$,f)=>{f.d($,{Zf:()=>ko.Z,_5:()=>W,Ao:()=>de.A,HS:()=>K.H,NO:()=>ee,AL:()=>De,eH:()=>Te.e,N6:()=>me,$s:()=>Ne,qk:()=>_e,Lr:()=>y,_y:()=>Vt,v_:()=>Tt,Ez:()=>en.E,PF:()=>Gt.P,xv:()=>fo,X4:()=>Hg,le:()=>Cr,R2:()=>dr.R,rD:()=>br,Gt:()=>uo.G,bn:()=>Li,_Z:()=>Fo._,lU:()=>ut,fG:()=>nt.f,nB:()=>Ot.n,cG:()=>Zt.c,G:()=>un,Mr:()=>Pn,MT:()=>On.M,Cs:()=>Ho,id:()=>Mo,Mf:()=>Zi,w9:()=>tr.w,Cu:()=>Hn,lZ:()=>gi,OO:()=>vi,xx:()=>ci.x,c7:()=>aa.c,gy:()=>qo,sX:()=>Zn,I1:()=>Xa});var o=f(15861),a=f(45449),g=f(47423),h=f(69107),m=f(90603),L=f(24006),v=f(47898),b=f(90944),k=f(99826);const F=["pinInput"];function Y(t,n){1&t&&a.\u0275\u0275element(0,"ion-icon",16)}function I(t,n){1&t&&a.\u0275\u0275element(0,"ion-icon",17)}function D(t,n){1&t&&(a.\u0275\u0275elementStart(0,"ion-label"),a.\u0275\u0275text(1),a.\u0275\u0275pipe(2,"translate"),a.\u0275\u0275elementEnd()),2&t&&(a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(2,1,"MD_DELETE_ACCOUNT.TEXT_FINGER_BIOMETRIC")," "))}function j(t,n){1&t&&(a.\u0275\u0275elementStart(0,"ion-label"),a.\u0275\u0275text(1),a.\u0275\u0275pipe(2,"translate"),a.\u0275\u0275elementEnd()),2&t&&(a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(2,1,"MD_DELETE_ACCOUNT.TEXT_FINGER_FACIAL")," "))}let W=(()=>{class t{constructor(e,r,i,s,c,l,u,d,p,M,x,R,U){var J=this;this.modalCtrl=e,this.formBuilder=r,this.keyboardService=i,this.platform=s,this.domCtrl=c,this.renderer=l,this.translateConfigService=u,this.authService=d,this.loaderService=p,this.lockService=M,this.logService=x,this.notificatorService=R,this.overlayService=U,this.authSuccess=new a.EventEmitter,this.authError=new a.EventEmitter,this.modalClosed=new a.EventEmitter,this.isFingerAvaliable=!1,this.subscription$=[],this.setFocus=()=>{this.platform.is("android")?setTimeout(()=>{this.focusInput(),this.keyboardService.show()},1e3):this.focusInput()},this.focusInput=()=>{this.pinInputElement.nativeElement.focus()},this.onPinChange=ne=>{const ue=this.pinForm.controls.pin.value;if(4===ue.length){console.log(ue);const Ie=setTimeout(()=>{this.onSubmit(),clearTimeout(Ie)},250)}},this.resetPin=()=>{this.pinForm.controls.pin.setValue("")},this.onSubmit=()=>{this.loaderService.show(this.translateConfigService.translate("LOADING_CHECKING_DATA"));let ne=null;const ue=this.pinInputElement.nativeElement,Ie=function(){var Ae=(0,o.Z)(function*(){ne&&ne.unsubscribe();const Oe=J.pinForm.controls.pin.value;try{if(yield J.authService.validatePassword(Oe))J.loaderService.hide(),J.addClassSuccess(),setTimeout(()=>{J.authSuccess.emit({success:!0}),J.close("success")},500);else{J.loaderService.hide(),J.addRemoveClass(ue,"content_modal__shake-horizontal_error",!0),setTimeout(()=>{J.addRemoveClass(ue,"content_modal__shake-horizontal_error",!1)},2e3),J.resetPin(),J.lockService.unlock("updating-pin-value");const et=J.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_INVALID_PIN_TITLE"),Ct=J.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_INVALID_PIN_MESSAGE");J.toast(et,Ct),J.logService.logEvent("insert-pin","The user entered an incorrect PIN"),J.authError.emit(Ct)}}catch(Fe){J.loaderService.hide(),J.resetPin(),J.lockService.unlock("updating-pin-value");const et=J.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_ERROR_TITLE"),Ct=J.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_ERROR_MESSAGE");J.notificatorService.notify({title:et,message:Ct,type:"error"}),J.logService.logEvent("pin::storage","An error occurred while retrieving the PIN from storage",Fe),J.authError.emit(Ct)}finally{J.loaderService.hide()}});return function(){return Ae.apply(this,arguments)}}();ne=this.keyboardService.onHideObservable?.subscribe(Ie),this.keyboardService.isVisible()?this.keyboardService.hide():Ie()}}ngOnInit(){var e=this;return(0,o.Z)(function*(){if(e.pinForm=e.formBuilder.group({pin:[""]}),"web"!==g.dV.getPlatform()){const r=yield h.Gw.checkBiometry();e.isFingerAvaliable=r.isAvailable,r.isAvailable&&e.isAvaliableFinger(r.biometryType)}})()}close(e){this.modalClosed.emit(e),this.modalCtrl.dismiss({close:!0},e)}ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe)}showFingerPrint(e){var r=this;this.platform.ready().then((0,o.Z)(function*(){const i=yield h.Gw.checkBiometry();if(r.isFingerAvaliable=i.isAvailable,i.isAvailable){r.isAvaliableFinger(i.biometryType);const s=setTimeout(()=>{r.platform.is("ios")&&"face"===r.typeFinger&&!e||(r.showFingerprintAuthentication(),clearTimeout(s))},100)}}))}showFingerprintAuthentication(){var e=this;return(0,o.Z)(function*(){const r=e.translateConfigService.translate("PG_IDENTITY_CHECK_FINGER_CANCELTITLE"),i=e.translateConfigService.translate("PG_IDENTITY_CHECK_FINGER_DESCRIPTION"),s=e.translateConfigService.translate("PG_IDENTITY_CHECK_FINGER_TITLE"),l={reason:i,androidSubtitle:e.translateConfigService.translate("PG_IDENTITY_CHECK_FINGER_SUBTITLE"),androidTitle:s,cancelTitle:r,allowDeviceCredential:!0,androidBiometryStrength:h.bO.weak,androidConfirmationRequired:!0};try{const u=yield h.Gw.authenticate(l);console.log(u),e.onSubmitFingerPrint(!0)}catch(u){throw console.log("Error authent",u),e.logService.logError("plugin_biometric::auth_verification_modal","error authenticating biometric|facial",u),e.authError.emit("Erro na autentica\xe7\xe3o biom\xe9trica"),new Error(u)}})()}onSubmitFingerPrint(e){var r=this;return(0,o.Z)(function*(){try{if(r.loaderService.show(r.translateConfigService.translate("LOADING_CHECKING_DATA")),yield r.authService.validatePassword(null,e))r.loaderService.hide(),r.authSuccess.emit({success:!0}),r.close("success");else{r.loaderService.hide(),r.lockService.unlock("updating-pin-value");const s=r.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_INVALID_PIN_TITLE"),c=r.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_INVALID_PIN_MESSAGE");r.toast(s,c),r.logService.logEvent("invalid:biometria_or_facial","Invalid biometrics or facial recognition when attempting to authenticate."),r.authError.emit(c)}}catch(i){r.loaderService.hide(),r.lockService.unlock("updating-pin-value");const s=r.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_ERROR_TITLE"),c=r.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_ERROR_MESSAGE");r.toast(s,c),r.logService.logEvent("pin::storage","An error occurred while retrieving the PIN from storage",i),r.authError.emit(c)}finally{r.loaderService.hide()}})()}isAvaliableFinger(e){switch(e){case h.dz.faceAuthentication:case h.dz.faceId:this.typeFinger="face";break;case h.dz.fingerprintAuthentication:this.typeFinger="biometric";break;case h.dz.touchId:this.typeFinger="finger";break;case h.dz.irisAuthentication:this.typeFinger="iris";break;default:this.typeFinger="biometric"}}addClassSuccess(){this.domCtrl.write(()=>{this.renderer.removeClass(this.pinInputElement.nativeElement,"content_modal__shake-horizontal_error"),this.renderer.addClass(this.pinInputElement.nativeElement,"content_modal__shake-success")})}addRemoveClass(e,r,i){this.domCtrl.write(()=>{i?this.renderer.addClass(e,r):this.renderer.removeClass(e,r)})}toast(e,r){var i=this;return(0,o.Z)(function*(s,c,l="danger"){yield i.overlayService.toast({header:s,message:c,mode:"ios",duration:5e3,color:l}).finally(()=>{})}).apply(this,arguments)}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController),a.\u0275\u0275directiveInject(L.UntypedFormBuilder),a.\u0275\u0275directiveInject(v.i8),a.\u0275\u0275directiveInject(m.Platform),a.\u0275\u0275directiveInject(m.DomController),a.\u0275\u0275directiveInject(a.Renderer2),a.\u0275\u0275directiveInject(v.wK),a.\u0275\u0275directiveInject(v.e8),a.\u0275\u0275directiveInject(v.D1),a.\u0275\u0275directiveInject(v.We),a.\u0275\u0275directiveInject(v.$V),a.\u0275\u0275directiveInject(v.V6),a.\u0275\u0275directiveInject(v.F0))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-auth-verification-modal"]],viewQuery:function(e,r){if(1&e&&a.\u0275\u0275viewQuery(F,5,a.ElementRef),2&e){let i;a.\u0275\u0275queryRefresh(i=a.\u0275\u0275loadQuery())&&(r.pinInputElement=i.first)}},outputs:{authSuccess:"authSuccess",authError:"authError",modalClosed:"modalClosed"},decls:22,vars:15,consts:[[1,"auth_verification_content_modal"],["tabindex","5",1,"auth_verification_content_modal__btn_close_icon",3,"click"],["slot","icon-only","name","close"],["tabindex","1",1,"auth_verification_content_modal__title"],[3,"innerHTML"],[1,"auth_verification_content_modal__input"],[3,"formGroup","ngSubmit"],["tabindex","2","id","pinInput","type","password","formControlName","pin","maxlength","4","pattern","[0-9]*","inputmode","numeric",3,"autofocus","placeholder","input"],["pinInput",""],[1,"auth_verification_content_modal__fingeer_btn"],["mode","ios","fill","clear","tabindex","3",3,"click"],["aria-hidden","true","name","finger-print",4,"ngIf"],["src","../../assets/icon/faceid.svg",4,"ngIf"],[4,"ngIf"],[1,"auth_verification_content_modal__btn_close",3,"click"],["mode","ios","color","primary","shape","round","tabindex","4"],["aria-hidden","true","name","finger-print"],["src","../../assets/icon/faceid.svg"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1),a.\u0275\u0275listener("click",function(){return r.close("cancel")}),a.\u0275\u0275element(2,"ion-icon",2),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(3,"div",3)(4,"ion-text"),a.\u0275\u0275element(5,"span",4),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(7,"div",5)(8,"form",6),a.\u0275\u0275listener("ngSubmit",function(){return r.onSubmit()}),a.\u0275\u0275elementStart(9,"input",7,8),a.\u0275\u0275listener("input",function(s){return r.onPinChange(s)}),a.\u0275\u0275pipe(11,"translate"),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementStart(12,"div",9)(13,"ion-button",10),a.\u0275\u0275listener("click",function(s){return r.showFingerPrint(s)}),a.\u0275\u0275template(14,Y,1,0,"ion-icon",11),a.\u0275\u0275template(15,I,1,0,"ion-icon",12),a.\u0275\u0275template(16,D,3,3,"ion-label",13),a.\u0275\u0275template(17,j,3,3,"ion-label",13),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(18,"div",14),a.\u0275\u0275listener("click",function(){return r.close("cancel")}),a.\u0275\u0275elementStart(19,"ion-button",15),a.\u0275\u0275text(20),a.\u0275\u0275pipe(21,"translate"),a.\u0275\u0275elementEnd()()()),2&e&&(a.\u0275\u0275advance(5),a.\u0275\u0275property("innerHTML",a.\u0275\u0275pipeBind1(6,9,"MD_DELETE_ACCOUNT.TITLE"),a.\u0275\u0275sanitizeHtml),a.\u0275\u0275advance(3),a.\u0275\u0275property("formGroup",r.pinForm),a.\u0275\u0275advance(1),a.\u0275\u0275property("autofocus",!0)("placeholder",a.\u0275\u0275pipeBind1(11,11,"MD_DELETE_ACCOUNT.CHECK_INPUT")),a.\u0275\u0275advance(5),a.\u0275\u0275property("ngIf","finger"===r.typeFinger||"biometric"===r.typeFinger),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","face"===r.typeFinger),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","face"!==r.typeFinger),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","face"===r.typeFinger),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(21,13,"BTN_CLOSE")," "))},dependencies:[b.NgIf,m.IonButton,m.IonIcon,m.IonLabel,m.IonText,L.\u0275NgNoValidate,L.DefaultValueAccessor,L.NgControlStatus,L.NgControlStatusGroup,L.MaxLengthValidator,L.PatternValidator,L.FormGroupDirective,L.FormControlName,k.X$],styles:[".auth_verification_content_modal[_ngcontent-%COMP%]{background:#fff;display:flex;flex-direction:column;justify-content:space-evenly;height:100%;position:relative;align-items:center;padding:1em}.auth_verification_content_modal__title[_ngcontent-%COMP%]{font-weight:400;font-size:1em;line-height:19px;text-align:center;padding-top:.5em;color:#757575;padding-inline:1em}.auth_verification_content_modal__input[_ngcontent-%COMP%]{height:50px;width:308px;text-align:center;padding:1em 0;display:flex;align-items:center;margin-top:1em;justify-content:center}.auth_verification_content_modal__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:308px;height:45px;text-align:center;background:rgba(227,226,226,.04);border:1px solid #e3e2e2;border-radius:36px}.auth_verification_content_modal__input[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]:focus{border-color:var(--ion-color-medium);caret-color:var(--ion-color-primary);border-width:1px;outline:none}.auth_verification_content_modal__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--ion-color-medium);opacity:.5}.auth_verification_content_modal__input[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]:focus::-webkit-input-placeholder{color:var(--ion-color-dark);opacity:.5}.auth_verification_content_modal__fingeer_btn[_ngcontent-%COMP%]{height:2.65em;display:flex;align-items:center}.auth_verification_content_modal__btn_close_icon[_ngcontent-%COMP%]{position:absolute;top:1em;right:1em}.auth_verification_content_modal__btn_close_icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:1.53em;color:#c5c5c5}.auth_verification_content_modal__btn_close[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:118px;height:40px}.auth_verification_content_modal__shake-horizontal_error[_ngcontent-%COMP%]{border:1px solid var(--ion-color-danger)!important;box-shadow:0 .5em red;animation:shake .2s ease-in-out 0s 2;-webkit-animation:shake .2s ease-in-out 0s 2}.auth_verification_content_modal__shake-success[_ngcontent-%COMP%]{border:1px solid var(--ion-color-primary)!important}.auth_verification_content_modal__remove_error[_ngcontent-%COMP%], .auth_verification_content_modal__remove_success[_ngcontent-%COMP%]{border:1px solid #e3e2e2}@keyframes shake{0%{margin-left:0rem}25%{margin-left:.5rem}75%{margin-left:-.5rem}to{margin-left:0rem}}"]}),t})();var de=f(87871),K=f(37792);let ee=(()=>{class t{constructor(e){this.modalController=e,this.back=()=>{this.modalController.dismiss(null)}}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-cant-create-event-from-here-modal"]],decls:15,vars:10,consts:[[3,"ngClass"],[1,"content"],[1,"background"],[1,"modal-container"],[1,"modal-title"],[1,"modal-body"],[1,"modal-footer"],[1,"reject",3,"click"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1),a.\u0275\u0275element(2,"div",2),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(7,"div",5)(8,"div"),a.\u0275\u0275text(9),a.\u0275\u0275pipe(10,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(11,"div",6)(12,"button",7),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275text(13),a.\u0275\u0275pipe(14,"translate"),a.\u0275\u0275elementEnd()()()()()),2&e&&(a.\u0275\u0275property("ngClass","cant-create-event-from-here-modal"),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(6,4,"MD_CAN_CREATE_EVENT_FROM_HERE_TITLE")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(10,6,"MD_CAN_CREATE_EVENT_FROM_HERE_DESCRIPTION")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(14,8,"MD_CAN_CREATE_EVENT_FROM_HERE_BTN_CLOSE")," "))},dependencies:[b.NgClass,k.X$],styles:[".cant-create-event-from-here-modal[_ngcontent-%COMP%]{width:100vw;transition:height .5s ease-in-out;overflow:hidden;z-index:1000;height:100vh}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:.3;top:0;transition:opacity .5s ease-out}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:60vh;background-color:#fff;width:86vw;margin:auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;margin-top:20vh;transition:margin-top 1s ease}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:500;position:absolute;top:0;height:3.5em;line-height:3.5em;width:calc(100% - 48px);background-color:#fff}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 7em);width:calc(100% - 48px);top:3.5em;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%]{padding:8px 12px;border:1px solid #eee;border-radius:4px;margin-bottom:8px}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .company-name[_ngcontent-%COMP%]{font-weight:700}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{color:#656768}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:3.5em;width:calc(100% - 48px);line-height:3.5em;display:flex;justify-content:center;align-items:center;overflow:hidden;background-color:#fff}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;background-color:#fff;color:#656768;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.cant-create-event-from-here-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),t})(),De=(()=>{class t{constructor(e,r){this.cantCreateEventModalService=e,this.ngZoneService=r,this.ok=()=>{this.cantCreateEventModalService.hideModal()}}ngOnInit(){var e=this;this.cantCreateEventModalService.observable.subscribe(function(){var r=(0,o.Z)(function*(i){yield e.ngZoneService.run(()=>{e.show=i})});return function(i){return r.apply(this,arguments)}}())}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(v._G),a.\u0275\u0275directiveInject(v.zf))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-cant-create-event-modal"]],decls:18,vars:13,consts:[[3,"ngClass"],[1,"content"],[1,"background"],[1,"modal-container"],[1,"modal-title"],[1,"modal-body"],[1,"modal-footer"],[1,"reject",3,"click"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1),a.\u0275\u0275element(2,"div",2),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(7,"div",5)(8,"div"),a.\u0275\u0275text(9),a.\u0275\u0275pipe(10,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(11,"div"),a.\u0275\u0275text(12),a.\u0275\u0275pipe(13,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(14,"div",6)(15,"button",7),a.\u0275\u0275listener("click",function(){return r.ok()}),a.\u0275\u0275text(16),a.\u0275\u0275pipe(17,"translate"),a.\u0275\u0275elementEnd()()()()()),2&e&&(a.\u0275\u0275property("ngClass","cant-create-event-modal "+(r.show?"show":"")),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(6,5,"MD_CAN_CREATE_EVENT_TITLE")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(10,7,"MD_CAN_CREATE_EVENT_TEXT_DONT_HAVE_PERMISSION")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(13,9,"MD_CAN_CREATE_EVENT_TEXT_ASK_COMPANY")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(17,11,"MD_CAN_CREATE_EVENT_BTN_CLOSE")," "))},dependencies:[b.NgClass,k.X$],styles:[".cant-create-event-modal[_ngcontent-%COMP%]{height:0;bottom:0;position:absolute;width:100vw;transition:height .5s ease-in-out;overflow:hidden;z-index:99999}.cant-create-event-modal.show[_ngcontent-%COMP%]{height:100vh;transition:height .5s ease-out;z-index:99999}.cant-create-event-modal.show[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{opacity:.3;transition:opacity .5s ease-out}.cant-create-event-modal.show[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{margin-top:35%;transition:margin-top 1s ease}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:0;top:0;transition:opacity .5s ease-out}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{min-height:60vh;background-color:#fff;width:86vw;margin:100% auto auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;transition:margin-top 1s ease}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:700;position:absolute;top:0;height:3.5em;line-height:3.5em;width:calc(100% - 48px);background-color:#fff}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 7em);width:calc(100% - 48px);top:3.5em;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff;text-align:center}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .topic[_ngcontent-%COMP%]{margin-bottom:16px}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .topic[_ngcontent-%COMP%] .highlight[_ngcontent-%COMP%]{font-weight:700}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:3.5em;width:calc(100% - 48px);line-height:3.5em;display:flex;justify-content:flex-end;align-items:center;overflow:hidden;background-color:#fff}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:.9em;background-color:#fff;color:#ccc;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.cant-create-event-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),t})();var Te=f(64245);function ce(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275text(1),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.helperService.normalizeName(e.foundUser.firstName,e.foundUser.lastName)," ")}}function oe(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275text(1),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate2(" ",e.foundUser.firstName," ",e.foundUser.lastName," ")}}function te(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",7),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(3);a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.foundUser.department," ")}}function ge(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275template(1,te,2,1,"div",6),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",null==e.foundUser?null:e.foundUser.department)}}function xe(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",9),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(3);a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.foundUser.company," ")}}function he(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275template(1,xe,2,1,"div",8),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",null==e.foundUser?null:e.foundUser.company)}}function Le(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",1),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(i.userSelect.emit(i.foundUser))}),a.\u0275\u0275element(2,"app-avatar",2),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4),a.\u0275\u0275template(5,ce,2,1,"ng-container",0),a.\u0275\u0275template(6,oe,2,2,"ng-container",0),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(7,ge,2,1,"ng-container",0),a.\u0275\u0275template(8,he,2,1,"ng-container",0),a.\u0275\u0275elementEnd(),a.\u0275\u0275element(9,"ion-ripple-effect",5),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()}if(2&t){const e=a.\u0275\u0275nextContext();let r;a.\u0275\u0275advance(2),a.\u0275\u0275property("firstName",e.foundUser.firstName)("lastName",e.foundUser.lastName)("thumbnailImage",null!==(r=null!==(r=null==e.foundUser||null==e.foundUser.photos||null==e.foundUser.photos[0]?null:e.foundUser.photos[0].faceImageThumbnail)&&void 0!==r?r:null==e.foundUser?null:e.foundUser.image)&&void 0!==r?r:null)("size","md"),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf","host"===e.typeofuser),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","guest"===e.typeofuser),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","host"===e.typeofuser),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","guest"===e.typeofuser)}}function Ce(t,n){1&t&&(a.\u0275\u0275elementStart(0,"div",18),a.\u0275\u0275element(1,"ion-skeleton-text",19),a.\u0275\u0275elementStart(2,"div",3)(3,"div",4),a.\u0275\u0275element(4,"ion-skeleton-text",20),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(5,"div",9),a.\u0275\u0275element(6,"ion-skeleton-text",21),a.\u0275\u0275elementEnd()()())}const ie=function(){return[1,2,3,4,5,6,7,8,9,10]};function se(t,n){1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",10)(2,"div",11)(3,"span",12),a.\u0275\u0275element(4,"ion-skeleton-text",13),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(5,"div",14)(6,"div",15),a.\u0275\u0275element(7,"ion-skeleton-text",16)(8,"ion-skeleton-text",13),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(9,Ce,7,0,"div",17),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()),2&t&&(a.\u0275\u0275advance(9),a.\u0275\u0275property("ngForOf",a.\u0275\u0275pureFunction0(1,ie)))}let me=(()=>{class t{constructor(e){this.helperService=e,this.skeleton=!1,this.userSelect=new a.EventEmitter}ngOnInit(){console.log(this.foundUser)}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(v.W_))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-card-founduser"]],inputs:{foundUser:"foundUser",skeleton:"skeleton",typeofuser:"typeofuser"},outputs:{userSelect:"userSelect"},decls:2,vars:2,consts:[[4,"ngIf"],[1,"result","ion-activatable",3,"click"],[3,"firstName","lastName","thumbnailImage","size"],[1,"user-info"],[1,"full-name"],["type","bounded"],["class","document",4,"ngIf"],[1,"document"],["class","company",4,"ngIf"],[1,"company"],[1,"results"],[1,"title"],[2,"display","flex","width","100%","text-align","start"],["animated","",2,"width","60%"],[1,"sub-title"],[1,"ion-text-center",2,"display","flex","flex-direction","column","align-items","center"],["animated","",2,"width","100%"],["class","result",4,"ngFor","ngForOf"],[1,"result"],["animated","",1,"avatar-skeleton"],["animated","",2,"width","85%"],["animated","",2,"width","50%"]],template:function(e,r){1&e&&(a.\u0275\u0275template(0,Le,10,8,"ng-container",0),a.\u0275\u0275template(1,se,10,2,"ng-container",0)),2&e&&(a.\u0275\u0275property("ngIf",r.foundUser&&!r.skeleton),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.skeleton))},dependencies:[b.NgForOf,b.NgIf,m.IonRippleEffect,m.IonSkeletonText,de.A],styles:[".result[_ngcontent-%COMP%]{position:relative;margin:10px 0;border:1px solid #eee;border-radius:4px;padding:6px 10px;display:flex;align-items:center;gap:10px}.result[_ngcontent-%COMP%] app-avatar[_ngcontent-%COMP%]{flex-shrink:0}.result[_ngcontent-%COMP%] .user-info[_ngcontent-%COMP%]{flex:1;min-width:0}.result[_ngcontent-%COMP%] .company[_ngcontent-%COMP%], .result[_ngcontent-%COMP%] .document[_ngcontent-%COMP%]{color:#aaa;font-size:.8em}.avatar-skeleton[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;flex-shrink:0}.results[_ngcontent-%COMP%]{padding:1em;overflow:scroll;height:100%}.results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;text-align:left;font-size:initial!important}.results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:8px;border-radius:2px;text-align:center}"]}),t})(),Ne=(()=>{class t{constructor(e){this.timeSettingsService=e}openSettingTime(){"web"!==g.dV.getPlatform()?this.timeSettingsService.open().then(r=>r).catch(r=>console.log(r)):console.log("no device found in time settings")}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(v.PV))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-clock-sync-guardian"]],decls:7,vars:3,consts:[["role","alert",1,"istautomatiTime"],["role","button",1,"error-message",3,"click"],[1,"icon"],["mode","ios","name","alert"],[1,"text",3,"innerHTML"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1),a.\u0275\u0275listener("click",function(){return r.openSettingTime()}),a.\u0275\u0275elementStart(2,"div",2),a.\u0275\u0275element(3,"ion-icon",3),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(4,"ion-text"),a.\u0275\u0275element(5,"span",4),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd()()()),2&e&&(a.\u0275\u0275advance(5),a.\u0275\u0275property("innerHTML",a.\u0275\u0275pipeBind1(6,1,"PG_HOME_BTN_NOT_AUTOMATIC_TIME"),a.\u0275\u0275sanitizeHtml))},dependencies:[m.IonIcon,m.IonText,k.X$],styles:[".istautomatiTime[_ngcontent-%COMP%]{position:fixed;display:flex;align-items:center;justify-content:center;width:100%;background:#f2f2f2}.istautomatiTime[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:2em;padding-left:.6em;padding-right:.4em}.istautomatiTime[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{color:#595959;font-size:.8rem;padding:.4em 8px .4em 0;text-align:justify;display:flex;align-items:center}.istautomatiTime[_ngcontent-%COMP%] .error-message.small-screen[_ngcontent-%COMP%]{font-size:11.8px;padding:2px 5px}"]}),t})(),_e=(()=>{class t{constructor(e){this.modalController=e,this.profileSelect=r=>{this.modalController.dismiss(r)},this.filterBadProfiles=r=>r.filter(i=>i.company&&i.company.name&&i.company.site&&i.company.site.name),this.sort=(r,i)=>r.company.namei.company.name?1:0,this.back=()=>{this.modalController.dismiss(null)},this.confirm=()=>{this.modalController.dismiss(!0)}}set profiles(e){e=this.filterBadProfiles(e),this.internalProfiles=e.sort(this.sort)}get profiles(){return this.internalProfiles}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-confirm-logout-modal"]],inputs:{profiles:"profiles"},decls:17,vars:13,consts:[[3,"ngClass"],[1,"content"],[1,"background",3,"click"],[1,"modal-container"],[1,"modal-title"],[1,"modal-body"],[1,"modal-footer"],[1,"reject",3,"click"],[1,"confirm",3,"click"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(7,"div",5),a.\u0275\u0275text(8),a.\u0275\u0275pipe(9,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(10,"div",6)(11,"button",7),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275text(12),a.\u0275\u0275pipe(13,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(14,"button",8),a.\u0275\u0275listener("click",function(){return r.confirm()}),a.\u0275\u0275text(15),a.\u0275\u0275pipe(16,"translate"),a.\u0275\u0275elementEnd()()()()()),2&e&&(a.\u0275\u0275property("ngClass","confirm-logout-modal"),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(6,5,"MD_LOGOUT_TEXT_TITLE")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(9,7,"MD_LOGOUT_TEXT_DESCRIPTION")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(13,9,"BTN_BACK")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(16,11,"MD_LOGOUT_BTN_CONFIRM")," "))},dependencies:[b.NgClass,k.X$],styles:["@media only screen and (width: 768px) and (orientation: portrait){.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:58.4vh!important;width:78vw!important;position:absolute!important;margin-top:0!important}}@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2){.confirm-logout-modal[_ngcontent-%COMP%]{position:relative!important}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{position:relative!important;height:100%!important}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{margin-top:0!important;height:100%!important;width:80%!important}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{position:relative!important;height:.5em!important;width:100%!important}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{display:flex!important;position:relative!important;height:calc(100% - 3em)!important;width:80%!important;margin:auto!important}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{position:relative!important;width:100%!important}}@media only screen and (min-width: 820px) and (orientation: portrait){.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:43.7vh!important;width:49.8vw!important;position:absolute!important;margin-top:.1em!important}}@media only screen and (width: 1024px) and (orientation: portrait){.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:44.55vh!important;width:58.6vw!important;position:absolute!important;margin-top:0!important}}@media only screen and (width: 834px) and (orientation: portrait){.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{min-height:50vh!important;width:72vw!important;position:absolute!important;margin-top:0!important}}.confirm-logout-modal[_ngcontent-%COMP%]{width:100%;transition:height .5s ease-in-out;overflow:hidden;z-index:1000;height:100vh;display:flex;align-content:center;justify-content:center;justify-items:center}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e;display:flex;justify-content:center}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:60vh;background-color:#fff;width:86vw;margin:auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;margin-top:20vh;transition:margin-top 1s ease;z-index:1}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:500;position:absolute;top:0;height:3.5em;line-height:3.5em;width:calc(100% - 48px);background-color:#fff}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 7em);width:calc(100% - 48px);top:3.5em;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%]{padding:8px 12px;border:1px solid #eee;border-radius:4px;margin-bottom:8px}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .company-name[_ngcontent-%COMP%]{font-weight:700}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{color:#656768}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:3.5em;width:calc(100% - 48px);line-height:3.5em;display:flex;justify-content:center;align-items:center;overflow:hidden;background-color:#fff}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;background-color:#fff;color:#656768;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.confirm-logout-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),t})();f(69977);var Ee=f(21284),le=f(70079);function Ue(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",16),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e," ")}}function ke(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",14),a.\u0275\u0275template(1,Ue,2,1,"div",15),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",e.getInputErrors("fullName"))}}function ze(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",16),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e," ")}}function ye(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",14),a.\u0275\u0275template(1,ze,2,1,"div",15),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",e.getInputErrors("document"))}}function je(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",14)(1,"div",16),a.\u0275\u0275text(2),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate1(" ",e.messageError," ")}}function Ze(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"button",17),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(i.onCreateGuest())}),a.\u0275\u0275text(2),a.\u0275\u0275pipe(3,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()}if(2&t){const e=n.ngIf;a.\u0275\u0275advance(1),a.\u0275\u0275property("disabled","Offline"===e.status),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(3,2,"MD_CREATE_ASSISTANT_BTN_CREATE")," ")}}const _t=function(){return{person:!0}},At=function(){return{}};let Vt=(()=>{class t{constructor(e,r,i,s,c,l,u){this.modalController=e,this.notificatorService=r,this.commonService=i,this.navParams=s,this.validateNameDocumentMatch=c,this.translateConfigService=l,this.stateService=u,this.defaultFullName="",this.defaultDocument="",this.defaultErrors=[],this.fullName=this.defaultFullName,this.document=this.defaultDocument,this.errors=this.defaultErrors,this.messageError="",this.foregin=!1,this.processReceivedRouteGuest=d=>{this.isNew=!d,d&&(this.fullName=this.processReceivedRouteGuestFullName(d),this.document=this.processReceivedRouteGuestDocument(d))},this.processReceivedRouteGuestFullName=d=>d.fullName?d.fullName:"",this.processReceivedRouteGuestDocument=d=>d.document?d.document:"",this.onClose=()=>{this.modalController.dismiss()},this.onFullNameChange=d=>{const{value:p}=d.target;this.fullName=p},this.onDocumentChange=d=>{const{value:p}=d.target;this.document=p},this.onCreateGuest=()=>{const d=this.validateCreateAssistant();if(!this.thereWasErrors(d))return this.validateNameDocumentMatch.validateNameDocumentMatch(this.fullName,this.document).then(p=>{if(p)this.errors=[],this.handleCreateVisitor();else{this.messageError=this.translateConfigService.translate("MD_CREATE_ASSISTANT_TEXT_DOCUMENT_NO_MATCH");const M={title:this.translateConfigService.translate("MD_CREATE_ASSISTANT_TOAST_FIELD_TITLE"),message:this.translateConfigService.translate("MD_CREATE_ASSISTANT_TOAST_FIELD_MESSAGE"),type:"error"};this.notificatorService.notify(M)}}).catch(p=>{});{this.errors=d;const p={title:this.translateConfigService.translate("MD_CREATE_ASSISTANT_TOAST_FIELD_TITLE"),message:this.translateConfigService.translate("MD_CREATE_ASSISTANT_TOAST_FIELD_MESSAGE"),type:"error"};this.notificatorService.notify(p)}},this.handleCreateVisitor=()=>{const d=this.commonService.clearString(this.fullName),p=this.commonService.clearString(this.document),M=d.split(" "),x=M.shift(),R=M.join(" ");this.modalController.dismiss({id:null,firstName:x,lastName:R,document:p})},this.thereWasErrors=d=>{let p=!1;return d.forEach(M=>{M.errors.length&&(p=!0)}),p},this.thereWasErrorsAtInput=d=>!!this.getInputErrors(d).length,this.getInputErrors=d=>{const p=this.errors.find(M=>M.input===d);return p?p.errors:[]},this.validateCreateAssistant=()=>{const d=[],p=this.commonService.clearString(this.fullName),M=this.commonService.clearString(this.document);return d.push(this.validateFullNameField({fullName:p})),d.push(this.validateDocumentField({document:M})),d},this.validateFullNameField=d=>{const p={input:"fullName",errors:[]};return d.fullName?0===d.fullName.length?p.errors.push(this.translateConfigService.translate("MD_CREATE_ASSISTANT_TEXT_FULLNAME")):d.fullName.length>100?p.errors.push(this.translateConfigService.translate("MD_CREATE_ASSISTANT_TEXT_FULLNAME_MAX_LENGTH")):d.fullName.split(" ").length<2&&p.errors.push(this.translateConfigService.translate("MD_CREATE_ASSISTANT_TEXT_FULLNAME")):p.errors.push(this.translateConfigService.translate("MD_CREATE_ASSISTANT_TEXT_FULLNAME")),p},this.validateDocumentField=d=>{const p={input:"document",errors:[]};return d.document?0===d.document.length?p.errors.push(this.translateConfigService.translate("MD_ASSISTANT_TEXT_DOCUMENT")):d.document.length>50?p.errors.push(this.translateConfigService.translate("MD_ASSISTANT_TEXT_DOCUMENT_MAX_LENGTH")):d.document.length<4?p.errors.push(this.translateConfigService.translate("MD_ASSISTANT_TEXT_DOCUMENT_MIN_LENGTH")):d.document&&!this.foregin&&!this.validateInput(d.document)&&p.errors.push(this.translateConfigService.translate("MD_ASSISTANT_TEXT_DOCUMENT_CPF")):p.errors.push(this.translateConfigService.translate("MD_ASSISTANT_TEXT_DOCUMENT")),p},this.guest=s.get("contact"),this.processReceivedRouteGuest(this.guest)}ngOnInit(){console.log()}toogleChangeDocument(e){e&&this.document.length>0&&(this.onDocumentChange({target:{value:""}}),this.document=""),this.foregin=e?.detail?.checked}validateInput(e){return this.validateCpfType(e)}validateCpfType(e){if(11!==(e=e.replace(/\D/g,"")).toString().length||/^(\d)\1{10}$/.test(e))return!1;let r=!0;return[9,10].forEach(i=>{let c,s=0;e.split(/(?=)/).splice(0,i).forEach((l,u)=>{s+=parseInt(l,10)*(i+2-(u+1))}),c=s%11,c=c<2?0:11-c,c!==parseInt(e.substring(i,i+1),10)&&(r=!1)}),r}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController),a.\u0275\u0275directiveInject(v.V6),a.\u0275\u0275directiveInject(v.v_),a.\u0275\u0275directiveInject(m.NavParams),a.\u0275\u0275directiveInject(v.Lk),a.\u0275\u0275directiveInject(v.wK),a.\u0275\u0275directiveInject(Ee.b))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-create-assistant"]],decls:32,vars:30,consts:[[1,"centralized-content"],[1,"page-title"],[1,"title"],[1,"ion-margin-vertical"],[1,"input-holder"],[1,"input"],["type","text","id","full-name","name","fullName",3,"placeholder","value","input"],["class","errors",4,"ngIf"],["type","text","id","document","name","document",3,"placeholder","brmasker","maxlength","value","ionChange"],["lines","none"],["slot","start","color","primary_keyaccess",3,"ngModel","ngModelChange","ionChange"],[1,"button-holder"],[1,"back",3,"click"],[4,"ngIf"],[1,"errors"],["class","error",4,"ngFor","ngForOf"],[1,"error"],[3,"disabled","click"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"ion-content")(1,"div",0)(2,"div",1)(3,"div",2),a.\u0275\u0275text(4),a.\u0275\u0275pipe(5,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(6,"ion-row")(7,"ion-col",3)(8,"div",4)(9,"div",5)(10,"input",6),a.\u0275\u0275listener("input",function(s){return r.onFullNameChange(s)}),a.\u0275\u0275pipe(11,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(12,ke,2,1,"div",7),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(13,"div",4)(14,"div",5)(15,"ion-input",8),a.\u0275\u0275listener("ionChange",function(s){return r.onDocumentChange(s)}),a.\u0275\u0275pipe(16,"translate"),a.\u0275\u0275pipe(17,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(18,ye,2,1,"div",7),a.\u0275\u0275template(19,je,3,1,"div",7),a.\u0275\u0275elementStart(20,"ion-item",9)(21,"ion-toggle",10),a.\u0275\u0275listener("ngModelChange",function(s){return r.foregin=s})("ionChange",function(s){return r.toogleChangeDocument(s)}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(22,"ion-label"),a.\u0275\u0275text(23),a.\u0275\u0275pipe(24,"translate"),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementStart(25,"div",11)(26,"button",12),a.\u0275\u0275listener("click",function(){return r.onClose()}),a.\u0275\u0275text(27),a.\u0275\u0275pipe(28,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(29,"div",2),a.\u0275\u0275template(30,Ze,4,4,"ng-container",13),a.\u0275\u0275pipe(31,"async"),a.\u0275\u0275elementEnd()()()()()()),2&e&&(a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(5,14,"MD_CREATE_ASSISTANT_TEXT_TITLE")," "),a.\u0275\u0275advance(6),a.\u0275\u0275property("placeholder",a.\u0275\u0275pipeBind1(11,16,"MD_CREATE_ASSISTANT_INPUT_FULLNAME"))("value",r.fullName),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",r.thereWasErrorsAtInput("fullName")),a.\u0275\u0275advance(3),a.\u0275\u0275property("placeholder",r.foregin?a.\u0275\u0275pipeBind1(17,20,"MD_CREATE_ASSISTANT_INPUT_DOCUMENT"):a.\u0275\u0275pipeBind1(16,18,"MD_CREATE_ASSISTANT_INPUT_DOCUMENT_CPF"))("brmasker",r.foregin?a.\u0275\u0275pureFunction0(29,At):a.\u0275\u0275pureFunction0(28,_t))("maxlength",r.foregin?50:14)("value",r.document),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf",r.thereWasErrorsAtInput("document")),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.messageError),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngModel",r.foregin),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(24,22,"MD_CREATE_ASSISTANT_IS_FOREIGNER")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(28,24,"MD_CREATE_ASSISTANT_BTN_CLOSE")," "),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf",a.\u0275\u0275pipeBind1(31,26,r.stateService.getState())))},dependencies:[b.NgForOf,b.NgIf,m.IonCol,m.IonContent,m.IonInput,m.IonItem,m.IonLabel,m.IonRow,m.IonToggle,m.BooleanValueAccessor,m.TextValueAccessor,L.NgControlStatus,L.NgModel,le.bS,b.AsyncPipe,k.X$],styles:[".centralized-content[_ngcontent-%COMP%]{height:calc(100vh - 56px);display:flex;justify-content:flex-start;flex-direction:column}.centralized-content[_ngcontent-%COMP%] .errors[_ngcontent-%COMP%]{width:80%;margin:12px 10% 0;color:#f0181b;text-align:center}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;text-align:center;margin:32px 32px 8px;font-size:initial!important}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{padding-top:1em;justify-content:center;margin:0}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:0;margin-bottom:8px}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]:first-of-type{margin-top:0}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:8px;color:#333}.centralized-content[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{display:flex;justify-content:space-around}"]}),t})();function fn(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",20),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e," ")}}function mn(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",18),a.\u0275\u0275template(1,fn,2,1,"div",19),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",e.getInputErrors("fullName"))}}function xn(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",20),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e," ")}}function gn(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",21),a.\u0275\u0275template(1,xn,2,1,"div",19),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",e.getInputErrors("document"))}}function Et(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",22)(1,"div",20),a.\u0275\u0275text(2),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate1(" ",e.messageError," ")}}const cn=function(){return{person:!0}},ft=function(){return{}};let Tt=(()=>{class t{constructor(e,r,i,s,c,l){this.modalController=e,this.notificatorService=r,this.api=i,this.commonService=s,this.validateNameDocumentMatch=c,this.translateConfigService=l,this.defaultFullName="",this.defaultDocument="",this.defaultErrors=[],this.fullName=this.defaultFullName,this.document=this.defaultDocument,this.errors=this.defaultErrors,this.messageError="",this.foregin=!1,this.onClose=()=>{this.modalController.dismiss()},this.onFullNameChange=u=>{const{value:d}=u.target;this.fullName=d},this.onDocumentChange=u=>{const{value:d}=u.target;this.document=d},this.onCreateGuest=()=>{const u=this.validateCreateDriver();if(this.thereWasErrors(u)){this.errors=u;const d={title:this.translateConfigService.translate("MD_CREATE_DRIVER_TOAST_FIELD_TITLE"),message:this.translateConfigService.translate("MD_CREATE_DRIVER_TOAST_FIELD_MESSAGE"),type:"error"};this.notificatorService.notify(d)}else this.validateNameDocumentMatch.validateNameDocumentMatch(this.fullName,this.document).then(d=>{if(d)this.errors=[],this.handleCreateVisitor();else{this.messageError=this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_DOCUMENT_NO_MATCH");const p={title:this.translateConfigService.translate("MD_CREATE_DRIVER_TOAST_FIELD_TITLE"),message:this.translateConfigService.translate("MD_CREATE_DRIVER_TOAST_FIELD_MESSAGE"),type:"error"};this.notificatorService.notify(p)}})},this.handleCreateVisitor=()=>{const u=this.commonService.clearString(this.fullName),d=this.commonService.clearString(this.document),p=u.split(" "),M=p.shift(),x=p.join(" ");this.modalController.dismiss({id:null,firstName:M,lastName:x,document:d})},this.thereWasErrors=u=>{let d=!1;return u.forEach(p=>{p.errors.length&&(d=!0)}),d},this.thereWasErrorsAtInput=u=>!!this.getInputErrors(u).length,this.getInputErrors=u=>{const d=this.errors.find(p=>p.input===u);return d?d.errors:[]},this.validateCreateDriver=()=>{const u=[],d=this.commonService.clearString(this.fullName),p=this.commonService.clearString(this.document);return u.push(this.validateFullNameField({fullName:d})),u.push(this.validateDocumentField({document:p})),u},this.validateFullNameField=u=>{const d={input:"fullName",errors:[]};return u.fullName?0===u.fullName.length?d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_FULLNAME")):u.fullName.length>100?d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_FULLNAME_MAX_LENGTH")):u.fullName.split(" ").length<2&&d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_FULLNAME")):d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_FULLNAME")),d},this.validateDocumentField=u=>{const d={input:"document",errors:[]};return u.document?0===u.document.length?d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_DOCUMENT")):u.document.length>50?d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_DOCUMENT_MAX_LENGTH")):u.document.length<4?d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_DOCUMENT_MIN_LENGTH")):u.document&&!this.foregin&&!this.validateInput(u.document)&&d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_DOCUMENT_INVALID_CPF")):d.errors.push(this.translateConfigService.translate("MD_CREATE_DRIVER_TEXT_DOCUMENT")),d}}toogleChangeDocument(e){e&&this.document.length>0&&(this.onDocumentChange({target:{value:""}}),this.document=""),this.foregin=e?.detail?.checked}validateInput(e){return this.validateCpfType(e)}validateCpfType(e){if(11!==(e=e.replace(/\D/g,"")).toString().length||/^(\d)\1{10}$/.test(e))return!1;let r=!0;return[9,10].forEach(i=>{let c,s=0;e.split(/(?=)/).splice(0,i).forEach((l,u)=>{s+=parseInt(l,10)*(i+2-(u+1))}),c=s%11,c=c<2?0:11-c,c!==parseInt(e.substring(i,i+1),10)&&(r=!1)}),r}clearDocument(e){return e.replace(/[^\w]/g,"")}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController),a.\u0275\u0275directiveInject(v.V6),a.\u0275\u0275directiveInject(v.sM),a.\u0275\u0275directiveInject(v.v_),a.\u0275\u0275directiveInject(v.Lk),a.\u0275\u0275directiveInject(v.wK))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-create-driver"]],decls:34,vars:33,consts:[[1,"centralized-content"],[1,"page-title"],["tabindex","1",1,"title"],[1,"ion-margin-vertical"],[1,"input-holder"],[1,"input"],["tabindex","2","type","text","id","full-name","name","fullName",3,"placeholder","value","input"],["class","errors",4,"ngIf"],["tabindex","3","type","text","id","document","name","document",3,"placeholder","brmasker","maxlength","value","ionChange"],["class","errors","tabindex","4",4,"ngIf"],["class","errors","tabindex","5",4,"ngIf"],["lines","none","tabindex","6"],["tabindex","7","slot","start","color","primary_keyaccess",3,"ngModel","ngModelChange","ionChange"],["tabindex","8"],[1,"button-holder"],["tabindex","8",1,"back",3,"click"],[1,"title"],["tabindex","9",3,"click"],[1,"errors"],["class","error",4,"ngFor","ngForOf"],[1,"error"],["tabindex","4",1,"errors"],["tabindex","5",1,"errors"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"ion-content")(1,"div",0)(2,"div",1)(3,"div",2),a.\u0275\u0275text(4),a.\u0275\u0275pipe(5,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(6,"ion-row")(7,"ion-col",3)(8,"div",4)(9,"div",5)(10,"input",6),a.\u0275\u0275listener("input",function(s){return r.onFullNameChange(s)}),a.\u0275\u0275pipe(11,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(12,mn,2,1,"div",7),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(13,"div",4)(14,"div",5)(15,"ion-input",8),a.\u0275\u0275listener("ionChange",function(s){return r.onDocumentChange(s)}),a.\u0275\u0275pipe(16,"translate"),a.\u0275\u0275pipe(17,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(18,gn,2,1,"div",9),a.\u0275\u0275template(19,Et,3,1,"div",10),a.\u0275\u0275elementStart(20,"ion-item",11)(21,"ion-toggle",12),a.\u0275\u0275listener("ngModelChange",function(s){return r.foregin=s})("ionChange",function(s){return r.toogleChangeDocument(s)}),a.\u0275\u0275pipe(22,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(23,"ion-label",13),a.\u0275\u0275text(24),a.\u0275\u0275pipe(25,"translate"),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementStart(26,"div",14)(27,"button",15),a.\u0275\u0275listener("click",function(){return r.onClose()}),a.\u0275\u0275text(28),a.\u0275\u0275pipe(29,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(30,"div",16)(31,"button",17),a.\u0275\u0275listener("click",function(){return r.onCreateGuest()}),a.\u0275\u0275text(32),a.\u0275\u0275pipe(33,"translate"),a.\u0275\u0275elementEnd()()()()()()()),2&e&&(a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(5,15,"MD_CREATE_DRIVER_TITLE")," "),a.\u0275\u0275advance(6),a.\u0275\u0275property("placeholder",a.\u0275\u0275pipeBind1(11,17,"MD_CREATE_DRIVER_INPUT_FULLNAME"))("value",r.fullName),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",r.thereWasErrorsAtInput("fullName")),a.\u0275\u0275advance(3),a.\u0275\u0275property("placeholder",r.foregin?a.\u0275\u0275pipeBind1(17,21,"MD_CREATE_DRIVER_INPUT_DOCUMENT"):a.\u0275\u0275pipeBind1(16,19,"MD_CREATE_DRIVER_INPUT_DOCUMENT_CPF"))("brmasker",r.foregin?a.\u0275\u0275pureFunction0(32,ft):a.\u0275\u0275pureFunction0(31,cn))("maxlength",r.foregin?50:14)("value",r.document),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf",r.thereWasErrorsAtInput("document")),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.messageError),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngModel",r.foregin),a.\u0275\u0275attribute("aria-label",a.\u0275\u0275pipeBind1(22,23,"MD_CREATE_DRIVER_IS_FOREIGNER")),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(25,25,"MD_CREATE_DRIVER_IS_FOREIGNER")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(29,27,"MD_CREATE_DRIVER_BTN_CLOSE")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(33,29,"MD_CREATE_DRIVER_BTN_CREATE")," "))},dependencies:[b.NgForOf,b.NgIf,m.IonCol,m.IonContent,m.IonInput,m.IonItem,m.IonLabel,m.IonRow,m.IonToggle,m.BooleanValueAccessor,m.TextValueAccessor,L.NgControlStatus,L.NgModel,le.bS,k.X$],styles:[".centralized-content[_ngcontent-%COMP%]{height:calc(100vh - 56px);display:flex;justify-content:flex-start;flex-direction:column}.centralized-content[_ngcontent-%COMP%] .errors[_ngcontent-%COMP%]{width:80%;margin:12px 10% 0;color:#f0181b;text-align:center}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;text-align:center;margin:32px 32px 8px;font-size:initial!important}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{padding-top:1em;justify-content:center;margin:0}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:0;margin-bottom:8px}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]:first-of-type{margin-top:0}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:8px;color:#333}.centralized-content[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{display:flex;justify-content:space-around}"]}),t})();var en=f(70713),Gt=f(31044);const or=function(t){return{"fix-ios":t}};let Cr=(()=>{class t{constructor(e,r,i,s){var c=this;this.footerLegalModalService=e,this.ngZoneService=r,this.platform=i,this.modalCtrl=s,this.ok=(0,o.Z)(function*(){yield c.modalCtrl.dismiss()}),this.isPlatformIOs=!!this.platform.is("ios")}ngOnInit(){var e=this;this.footerLegalModalService.observable.subscribe(function(){var r=(0,o.Z)(function*(i){yield e.ngZoneService.run(()=>{e.show=i})});return function(i){return r.apply(this,arguments)}}())}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(v.iE),a.\u0275\u0275directiveInject(v.zf),a.\u0275\u0275directiveInject(m.Platform),a.\u0275\u0275directiveInject(m.ModalController))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-footer-legal-modal"]],decls:38,vars:37,consts:[["role","alert","tabindex","-1",3,"ngClass"],[1,"content"],["role","alert",1,"background"],["tabindex","0",1,"modal-container"],[1,"modal-title"],[1,"modal-body",3,"ngClass"],[1,"topic",3,"innerHTML"],[1,"topic"],[1,"modal-footer"],[1,"reject",3,"click"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1),a.\u0275\u0275element(2,"div",2),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(7,"div",5),a.\u0275\u0275element(8,"div",6),a.\u0275\u0275pipe(9,"translate"),a.\u0275\u0275elementStart(10,"div",7),a.\u0275\u0275text(11),a.\u0275\u0275pipe(12,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(13,"div",7),a.\u0275\u0275text(14),a.\u0275\u0275pipe(15,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(16,"div",7),a.\u0275\u0275text(17),a.\u0275\u0275pipe(18,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(19,"div",7),a.\u0275\u0275text(20),a.\u0275\u0275pipe(21,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(22,"div",7),a.\u0275\u0275text(23),a.\u0275\u0275pipe(24,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(25,"div",7),a.\u0275\u0275text(26),a.\u0275\u0275pipe(27,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(28,"div",7),a.\u0275\u0275text(29),a.\u0275\u0275pipe(30,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(31,"div",7),a.\u0275\u0275text(32),a.\u0275\u0275pipe(33,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(34,"div",8)(35,"button",9),a.\u0275\u0275listener("click",function(){return r.ok()}),a.\u0275\u0275text(36),a.\u0275\u0275pipe(37,"translate"),a.\u0275\u0275elementEnd()()()()()),2&e&&(a.\u0275\u0275property("ngClass","footer-legal-modal "+(r.show?"show":"")),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind1(6,13,"TEXT_TERMS_OF_USE_AND_PRIVACY")),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngClass",a.\u0275\u0275pureFunction1(35,or,r.isPlatformIOs)),a.\u0275\u0275advance(1),a.\u0275\u0275property("innerHTML",a.\u0275\u0275pipeBind1(9,15,"LEGAL_TERMS_TOPIC"),a.\u0275\u0275sanitizeHtml),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(12,17,"LEGAL_TERMS_TOPIC1")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(15,19,"LEGAL_TERMS_TOPIC2")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(18,21,"LEGAL_TERMS_TOPIC3")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(21,23,"LEGAL_TERMS_TOPIC4")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(24,25,"LEGAL_TERMS_TOPIC5")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(27,27,"LEGAL_TERMS_TOPIC6")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(30,29,"LEGAL_TERMS_TOPIC7")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(33,31,"LEGAL_TERMS_TOPIC8")," "),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind1(37,33,"LEGAL_TERMS_BTN_CLOSE")))},dependencies:[b.NgClass,k.X$],styles:[".footer-legal-modal[_ngcontent-%COMP%]{height:0;bottom:0;position:absolute;width:100vw;transition:height .5s ease-in-out;overflow:hidden;z-index:99999}.footer-legal-modal.show[_ngcontent-%COMP%]{height:100vh;transition:height .5s ease-out;z-index:99999}.footer-legal-modal.show[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{opacity:.3;transition:opacity .5s ease-out}.footer-legal-modal.show[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{margin-top:35%;transition:margin-top 1s ease}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:0;top:0;transition:opacity .5s ease-out}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{min-height:60vh;background-color:#fff;width:86vw;margin:100% auto auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;transition:margin-top 1s ease}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:700;position:absolute;top:0;height:3.5em;line-height:3.5em;width:calc(100% - 48px);background-color:#fff}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 7em);width:calc(100% - 48px);top:3.5em;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body.fix-ios[_ngcontent-%COMP%]{overflow-y:scroll!important;overflow-x:hidden;-webkit-overflow-scrolling:touch;pointer-events:auto!important}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .topic[_ngcontent-%COMP%]{margin-bottom:16px}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .topic[_ngcontent-%COMP%] .highlight[_ngcontent-%COMP%]{font-weight:700}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:3.5em;width:calc(100% - 48px);line-height:3.5em;display:flex;justify-content:flex-end;align-items:center;overflow:hidden;background-color:#fff}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:.9em;background-color:#fff;color:#ccc;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.footer-legal-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),t})();f(38124);var dr=f(33159);function er(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"span",8),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.title)}}function Jn(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"ion-header",5)(1,"ion-toolbar",6)(2,"ion-title"),a.\u0275\u0275template(3,er,2,1,"span",7),a.\u0275\u0275elementEnd()()()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf",null==e.props?null:e.props.title)}}function Er(t,n){if(1&t&&a.\u0275\u0275element(0,"div",10),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275property("innerHTML",null==e.props?null:e.props.description,a.\u0275\u0275sanitizeHtml)}}function lo(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275template(1,Er,1,1,"div",9),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",null==e.props?null:e.props.description)}}function Gr(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",39)(1,"strong"),a.\u0275\u0275text(2),a.\u0275\u0275pipe(3,"datetransformcustom"),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind2(3,1,null==e.props||null==e.props.data?null:e.props.data.startAt,"dayMonth"))}}function Qn(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",40)(1,"strong"),a.\u0275\u0275text(2),a.\u0275\u0275pipe(3,"datetransformcustom"),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind2(3,1,null==e.props||null==e.props.data?null:e.props.data.startAt,"hourMinute"))}}function Pr(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",41)(1,"strong"),a.\u0275\u0275text(2),a.\u0275\u0275pipe(3,"datetransformcustom"),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind2(3,1,null==e.props||null==e.props.data?null:e.props.data.endAt,"hourMinute"))}}function jr(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div")(2,"div",11),a.\u0275\u0275text(3),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(4,"div",12)(5,"ion-grid",13)(6,"ion-row")(7,"ion-col",14)(8,"div",15),a.\u0275\u0275element(9,"ion-icon",16),a.\u0275\u0275elementStart(10,"span",17),a.\u0275\u0275text(11),a.\u0275\u0275pipe(12,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(13,Gr,4,4,"div",18),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(14,"ion-col",14)(15,"div",15),a.\u0275\u0275element(16,"ion-icon",19),a.\u0275\u0275elementStart(17,"span",17),a.\u0275\u0275text(18),a.\u0275\u0275pipe(19,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(20,Qn,4,4,"div",20),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(21,"ion-col",14)(22,"div",15),a.\u0275\u0275element(23,"ion-icon",19),a.\u0275\u0275elementStart(24,"span",17),a.\u0275\u0275text(25),a.\u0275\u0275pipe(26,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(27,Pr,4,4,"div",21),a.\u0275\u0275elementEnd()()()(),a.\u0275\u0275elementStart(28,"div",22),a.\u0275\u0275text(29),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(30,"div",23)(31,"div",24)(32,"ion-button",25),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(i.doCopyLink(null==i.props?null:i.props.data))}),a.\u0275\u0275element(33,"ion-icon",26),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(34,"div",27)(35,"ion-button",25),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(i.share(null==i.props?null:i.props.data,"whatsapp"))}),a.\u0275\u0275element(36,"ion-icon",28),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(37,"div",29)(38,"ion-button",25),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(i.share(null==i.props?null:i.props.data,"share"))}),a.\u0275\u0275element(39,"ion-icon",30),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementStart(40,"div",31),a.\u0275\u0275text(41),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(42,"div",32)(43,"ion-grid",33)(44,"ion-row",33)(45,"ion-col",34)(46,"div",35),a.\u0275\u0275element(47,"ion-icon",36),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(48,"ion-col",37)(49,"div",38),a.\u0275\u0275text(50),a.\u0275\u0275elementEnd()()()()()(),a.\u0275\u0275elementContainerEnd()}if(2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275classMap("generic-modal-component__"+e.typenameComponet.eventInstant),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.title),a.\u0275\u0275advance(8),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(12,12,"MD_RESUME_CREATE_EVENT_DAY"),""),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",null==e.props||null==e.props.data?null:e.props.data.startAt),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(19,14,"MD_RESUME_CREATE_EVENT_START"),""),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",null==e.props||null==e.props.data?null:e.props.data.startAt),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(26,16,"MD_RESUME_CREATE_EVENT_END"),""),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",null==e.props||null==e.props.data?null:e.props.data.endAt),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.description),a.\u0275\u0275advance(12),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.data.fullPathLocator),a.\u0275\u0275advance(9),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.subdescription)}}function Nr(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",15)(1,"p"),a.\u0275\u0275text(2),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.title)}}function go(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",46),a.\u0275\u0275element(1,"img",47),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275property("src",null==e.props?null:e.props.img,a.\u0275\u0275sanitizeUrl)("alt",(null==e.props?null:e.props.title)+" "+e.props.description)}}function Zr(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",48)(1,"p",49),a.\u0275\u0275text(2),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(e.props.description)}}function ro(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",42),a.\u0275\u0275template(2,Nr,3,1,"div",43),a.\u0275\u0275template(3,go,2,2,"div",44),a.\u0275\u0275template(4,Zr,3,1,"div",45),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",null==e.props?null:e.props.title),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",null==e.props?null:e.props.img),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.props.description)}}function mo(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",50)(2,"ion-text",51)(3,"h2"),a.\u0275\u0275text(4),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.description)}}function ki(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"ion-card",55),a.\u0275\u0275listener("click",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(c.selectFloor(s))}),a.\u0275\u0275elementStart(1,"div",56)(2,"div",22)(3,"p"),a.\u0275\u0275text(4),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(5,"div",57),a.\u0275\u0275element(6,"ion-icon",58),a.\u0275\u0275elementEnd()()()}if(2&t){const e=n.$implicit;a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate(e.description)}}function Yo(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div")(2,"div",11)(3,"h2"),a.\u0275\u0275text(4),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(5,"div",52)(6,"p"),a.\u0275\u0275text(7),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(8,"div",53),a.\u0275\u0275template(9,ki,7,1,"ion-card",54),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275classMap("generic-modal-component__"+e.typenameComponet.floorSelection),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.title),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate(null==e.props?null:e.props.description),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",null==e.props?null:e.props.data)}}function Ko(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"ion-button",63),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext().$implicit;return a.\u0275\u0275resetView(i.action())}),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()}if(2&t){const e=a.\u0275\u0275nextContext().$implicit;let r,i,s,c;a.\u0275\u0275property("color",null!==(r=null==e?null:e.color)&&void 0!==r?r:"primary")("size",null!==(i=e.size)&&void 0!==i?i:"small")("mode",null!==(s=null==e?null:e.mode)&&void 0!==s?s:"ios")("shape",null!==(c=e.shape)&&void 0!==c?c:"round"),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.label," ")}}function wo(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",61),a.\u0275\u0275template(1,Ko,2,5,"ion-button",62),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.enabled)}}function $r(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",59),a.\u0275\u0275template(2,wo,2,1,"div",60),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",null==e.props?null:e.props.actionsButton)}}function hi(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"button",66),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext().$implicit;return a.\u0275\u0275resetView(i.action())}),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()}if(2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275classMap(null==e?null:e.classCss),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.label," ")}}function mi(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",61),a.\u0275\u0275template(1,hi,2,3,"button",65),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.enabled)}}function vn(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",64)(2,"div",59),a.\u0275\u0275template(3,mi,2,1,"div",60),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(3),a.\u0275\u0275property("ngForOf",null==e.props?null:e.props.actionsButton)}}function Eo(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"button",66),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext().$implicit;return a.\u0275\u0275resetView(i.action())}),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()}if(2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275classMap(null==e?null:e.classCss),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.label," ")}}function Ur(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",61),a.\u0275\u0275template(1,Eo,2,3,"button",65),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.enabled)}}function vo(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",67)(2,"div",59),a.\u0275\u0275template(3,Ur,2,1,"div",60),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("ngClass",e.typenameComponet.floorSelection),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",null==e.props?null:e.props.actionsButton)}}let br=(()=>{class t{constructor(e,r,i,s,c){this.modalCtrl=e,this.socialSharingService=r,this.translateConfigService=i,this.notificatorService=s,this.clipboardService=c,this.actions=new a.EventEmitter,this.typenameComponet=Zn}dismiss(){var e=this;return(0,o.Z)(function*(){yield e.modalCtrl.dismiss({close:!0})})()}confirm(){var e=this;return(0,o.Z)(function*(){yield e.modalCtrl.dismiss({confirmed:!0})})()}selectFloor(e){this.props?.actionsButton?.[0]?.action&&this.props.actionsButton[0].action(e)}share(e,r){"whatsapp"===r?this.shareWhatsapp(e):"share"===r&&this.shareShare(e)}doCopyLink(e){this.clipboardService.copy(e.fullPathLocator).then(()=>{const r={message:"",title:this.translateConfigService.translate("PG_CREATE_TOAST_COPY_LINK"),type:"success",timeout:3e3};this.notificatorService.notify(r)})}shareWhatsapp(e){this.socialSharingService.shareEvent(e,"OTHERS","event_instant_generic_modal","whatsapp")}shareShare(e){this.socialSharingService.shareEvent(e,"OTHERS","event_instant_generic_modal",void 0)}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController),a.\u0275\u0275directiveInject(v.iX),a.\u0275\u0275directiveInject(v.wK),a.\u0275\u0275directiveInject(v.V6),a.\u0275\u0275directiveInject(v.Yv))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-generic-modal"]],inputs:{props:"props"},outputs:{actions:"actions"},decls:13,vars:9,consts:[[1,"generic-modal-component"],["mode","ios","class","ion-no-border ion-no-padding ion-no-margin",4,"ngIf"],[4,"ngIf"],[1,"ion-no-border","ion-no-padding","ion-no-margin"],[1,"generic-modal-component__toolbar-footer","ion-no-border","ion-no-padding","ion-no-margin"],["mode","ios",1,"ion-no-border","ion-no-padding","ion-no-margin"],[1,"generic-modal-component__toolbar-header","ion-paddingion-no-border","ion-no-padding","ion-no-margin"],["class","title",4,"ngIf"],[1,"title"],["class","description scale-in-bottom",3,"innerHTML",4,"ngIf"],[1,"description","scale-in-bottom",3,"innerHTML"],[1,"__title"],[1,"__dates"],["fixed","",1,"ion-text-center","event_content_grid"],["size","4"],[1,"title-generic-modal-component"],["slot","start","name","calendar-outline"],[1,"text-icon"],["class","day",4,"ngIf"],["slot","start","name","time-outline"],["class","start",4,"ngIf"],["class","end",4,"ngIf"],[1,"__description"],[1,"__shared"],[1,"copy"],["fill","clear",3,"click"],["slot","icon-only","color","primary","name","copy"],[1,"whatsapp"],["slot","icon-only","color","primary","name","logo-whatsapp"],[1,"shared"],["slot","icon-only","color","primary","name","share-social"],[1,"__locator"],[1,"__subdescription"],[1,"ion-no-padding","ion-no-margin"],["size","2",1,"ion-no-padding","ion-no-margin"],[1,"icon"],["color","primary","name","shield-checkmark"],["size","10",1,"ion-no-padding","ion-no-margin"],[1,"text"],[1,"day"],[1,"start"],[1,"end"],[1,"generic-modal-component__card"],["class","title-generic-modal-component",4,"ngIf"],["class","box_img",4,"ngIf"],["class","description_img",4,"ngIf"],[1,"box_img"],["srcset","",3,"src","alt"],[1,"description_img"],[1,"ion-text-captalize"],[1,"content","warning-delete-event"],["color","medium"],[1,"__subtitle"],[1,"__list-floors"],["button","","detail","false","class","__floor-selection-card ion-no-padding ion-no-margin",3,"click",4,"ngFor","ngForOf"],["button","","detail","false",1,"__floor-selection-card","ion-no-padding","ion-no-margin",3,"click"],[1,"ion-justify-content-between",2,"display","flex","padding","0.6em 0"],[1,"__icon"],["name","chevron-forward-circle-outline"],[1,"btns"],["class","btn",4,"ngFor","ngForOf"],[1,"btn"],[3,"color","size","mode","shape","click",4,"ngIf"],[3,"color","size","mode","shape","click"],[1,"button-holder"],["type","button",3,"class","click",4,"ngIf"],["type","button",3,"click"],[1,"button-holder",3,"ngClass"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0),a.\u0275\u0275template(1,Jn,4,1,"ion-header",1),a.\u0275\u0275elementStart(2,"ion-content"),a.\u0275\u0275template(3,lo,2,1,"ng-container",2),a.\u0275\u0275template(4,jr,51,18,"ng-container",2),a.\u0275\u0275template(5,ro,5,3,"ng-container",2),a.\u0275\u0275template(6,mo,5,1,"ng-container",2),a.\u0275\u0275template(7,Yo,10,5,"ng-container",2),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(8,"ion-footer",3)(9,"ion-toolbar",4),a.\u0275\u0275template(10,$r,3,1,"ng-container",2),a.\u0275\u0275template(11,vn,4,1,"ng-container",2),a.\u0275\u0275template(12,vo,4,2,"ng-container",2),a.\u0275\u0275elementEnd()()),2&e&&(a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!(null!=r.props&&r.props.img)&&(null==r.props?null:r.props.typename)!==r.typenameComponet.eventInstant&&(null==r.props?null:r.props.typename)!==r.typenameComponet.deleteEventVO&&(null==r.props?null:r.props.typename)!==r.typenameComponet.floorSelection),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",r.props&&"error"===(null==r.props?null:r.props.type)&&r.props.typename===r.typenameComponet.nomatchInvalidName),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.props&&"success"===(null==r.props?null:r.props.type)&&(null==r.props?null:r.props.typename)===r.typenameComponet.eventInstant),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.props&&(null==r.props?null:r.props.img)),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.props&&"info"===(null==r.props?null:r.props.type)&&(null==r.props?null:r.props.typename)===r.typenameComponet.deleteEventVO&&(null==r.props?null:r.props.typename)!==r.typenameComponet.floorSelection),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.props&&"info"===(null==r.props?null:r.props.type)&&(null==r.props?null:r.props.typename)===r.typenameComponet.floorSelection),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf",(null==r.props?null:r.props.typename)!==r.typenameComponet.deleteEventVO&&(null==r.props?null:r.props.typename)!==r.typenameComponet.floorSelection),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",(null==r.props?null:r.props.typename)===r.typenameComponet.deleteEventVO),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",(null==r.props?null:r.props.typename)===r.typenameComponet.floorSelection))},styles:[".generic-modal-component[_ngcontent-%COMP%]{display:contents;height:100vh;position:relative}.generic-modal-component[_ngcontent-%COMP%] ion-content[_ngcontent-%COMP%]{position:relative;--background: #fff}.generic-modal-component[_ngcontent-%COMP%] ion-content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{position:relative;transition:cubic-bezier(.075,.82,.165,1);top:-.2em;font-size:1em;padding:0 1.5em}.generic-modal-component__toolbar-header[_ngcontent-%COMP%]{--background: #fff;height:40px}.generic-modal-component__toolbar-footer[_ngcontent-%COMP%]{--background: #fff}.generic-modal-component__toolbar-footer[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--background: #eee;--color: var(--ion-color-primary)}.generic-modal-component__toolbar-footer[_ngcontent-%COMP%] .btns[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center;justify-content:center}.generic-modal-component__toolbar-footer[_ngcontent-%COMP%] .btns[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:1em}.generic-modal-component[_ngcontent-%COMP%] .icon-close[_ngcontent-%COMP%]{position:absolute;top:-1em;width:38px;height:38px;background:#ccc;border-radius:50%;display:flex;align-items:center;justify-content:center;z-index:20}.generic-modal-component[_ngcontent-%COMP%] .icon-close-left[_ngcontent-%COMP%]{left:0}.generic-modal-component[_ngcontent-%COMP%] .icon-close-right[_ngcontent-%COMP%]{right:-.5em}.generic-modal-component__card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;margin:1.6em}.generic-modal-component__card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.generic-modal-component__card[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .generic-modal-component__card[_ngcontent-%COMP%] .description_img[_ngcontent-%COMP%]{padding:.5em 0;font-weight:800;font-size:1em}.generic-modal-component__card[_ngcontent-%COMP%] .box_img[_ngcontent-%COMP%]{position:relative;border:1px solid #ddd;border-radius:5px;overflow:hidden;width:100%;background:transparent;display:flex;justify-content:center;align-items:center;height:50vh}.generic-modal-component__card[_ngcontent-%COMP%] .box_img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;object-fit:cover;width:100%}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%]{padding:2em;height:100%;display:flex;flex-direction:column;justify-content:space-around}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__title[_ngcontent-%COMP%]{font-weight:700;font-size:20px;line-height:24px;text-align:center;color:#1e1e1e}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__dates[_ngcontent-%COMP%]{margin:16px 0}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__description[_ngcontent-%COMP%]{font-weight:500;font-size:16px;line-height:19px;text-align:center;color:#1e1e1e}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__locator[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-around;height:auto;background:#f4f5f9;border-radius:8px;font-weight:700;font-size:.9em;line-height:19px;text-align:center;color:#1e1e1e;z-index:10;position:relative;margin:8px 0;padding:9px;clip:auto}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__locator-qrcode[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__shared[_ngcontent-%COMP%]{display:flex;height:2em;justify-content:center;align-items:center;margin:.5em 0}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__shared[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:2.4em}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__shared[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:66px;height:66px;--border-radius: 50%}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__subdescription[_ngcontent-%COMP%]{height:66px;display:flex}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__subdescription[_ngcontent-%COMP%] ion-row[_ngcontent-%COMP%] ion-col[_ngcontent-%COMP%]:first{display:flex;align-items:center}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__subdescription[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:44px;height:44px;background:#f4f5f9;border:1px solid rgba(30,30,30,.06);border-radius:50%;display:flex;justify-content:center;align-items:center}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__subdescription[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:1.6em}.generic-modal-component__EVENT_INSTANT[_ngcontent-%COMP%] .__subdescription[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-weight:800;font-size:1em;line-height:22px;color:#000;padding-left:8px}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%]{border-radius:10px;padding:1.4em 1em;background-color:#fff}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__title[_ngcontent-%COMP%], .generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__subtitle[_ngcontent-%COMP%]{text-align:center}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__title[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__subtitle[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:.5em 0;color:#999;font-weight:400;font-size:1em}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__subtitle[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:#1e1e1e;font-weight:600;font-size:1.8em!important}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__list-floors[_ngcontent-%COMP%]{margin-top:2em;gap:1em;display:flex;flex-direction:column;align-items:center;justify-content:center}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__list-floors[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%]{box-shadow:none}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__list-floors[_ngcontent-%COMP%] .__floor-selection-card[_ngcontent-%COMP%]{height:100%;background-color:#f4f5f9;display:flex;width:100%;align-items:center;justify-content:space-between;padding:0 1em}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__list-floors[_ngcontent-%COMP%] .__floor-selection-card[_ngcontent-%COMP%] .__description[_ngcontent-%COMP%]{color:#313131;font-weight:700;font-size:1em;height:auto;display:flex;align-items:center}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__list-floors[_ngcontent-%COMP%] .__floor-selection-card[_ngcontent-%COMP%] .__description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__list-floors[_ngcontent-%COMP%] .__floor-selection-card[_ngcontent-%COMP%] .__icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .__list-floors[_ngcontent-%COMP%] .__floor-selection-card[_ngcontent-%COMP%] .__icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:1.8em;color:var(--ion-color-primary)}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .list-floors[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%]{border:1px solid rgba(30,30,30,.06);margin:.5em 0;border-radius:8px}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .list-floors[_ngcontent-%COMP%] .floor-selection-title[_ngcontent-%COMP%]{text-align:center;font-size:1em;font-weight:700;color:#1e1e1e;background-color:#639}.generic-modal-component__FLOOR_SELECTION[_ngcontent-%COMP%] .list-floors[_ngcontent-%COMP%] .floor-description[_ngcontent-%COMP%]{font-size:1em;font-weight:700;color:#606165}.button-holder.FLOOR_SELECTION[_ngcontent-%COMP%] .btns[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:30px!important;padding:0 1em!important;background:#cccccc!important;color:#fff!important;font-weight:700!important;font-size:1em!important}.warning-delete-event[_ngcontent-%COMP%]{height:auto;text-align:center;margin:.1em 3em 1em;display:flex;align-items:center}.scale-in-bottom[_ngcontent-%COMP%]{animation:scale-in-bottom .5s cubic-bezier(.25,.46,.45,.94) both}@keyframes scale-in-bottom{0%{transform:scale(0);transform-origin:50% 100%;opacity:1}to{transform:scale(1);transform-origin:50% 100%;opacity:1}}"]}),t})();var Zn=(()=>{return(t=Zn||(Zn={})).eventInstant="EVENT_INSTANT",t.nomatchInvalidName="NOMATCH_INVALID_NAME",t.deleteEventVO="DELETE_EVENT_VO",t.floorSelection="FLOOR_SELECTION",Zn;var t})(),uo=f(36290),Fo=f(96893);const _i=function(t,n,e){return{"background-color":t,"height.px":n,"width.px":e}};function xr(t,n){if(1&t&&a.\u0275\u0275element(0,"span",2),2&t){const e=n.index,r=a.\u0275\u0275nextContext();a.\u0275\u0275classProp("active",e===r.activeIndex),a.\u0275\u0275property("ngStyle",a.\u0275\u0275pureFunction3(3,_i,e===r.activeIndex?r.color:r.trailColor,r.size,r.size))}}const It=function(t){return{"height.px":t}};let ut=(()=>{class t{constructor(){this.dots=3,this.size=10,this.color="#6CB52D",this.trailColor="#D9D9D9",this.dotsArray=[],this.activeIndex=0}ngOnInit(){this.dotsArray=Array(this.dots).fill(0),this.startAnimation()}startAnimation(){setInterval(()=>{this.activeIndex=(this.activeIndex+1)%this.dots},500)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-loading-dots"]],inputs:{dots:"dots",size:"size",color:"color",trailColor:"trailColor"},decls:2,vars:4,consts:[[1,"loading-dots",3,"ngStyle"],[3,"ngStyle","active",4,"ngFor","ngForOf"],[3,"ngStyle"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0),a.\u0275\u0275template(1,xr,1,7,"span",1),a.\u0275\u0275elementEnd()),2&e&&(a.\u0275\u0275property("ngStyle",a.\u0275\u0275pureFunction1(2,It,r.size)),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",r.dotsArray))},dependencies:[b.NgForOf,b.NgStyle],styles:['@charset "UTF-8";.loading-dots[_ngcontent-%COMP%]{display:flex;gap:1em;align-items:center;justify-content:center}.loading-dots[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;border-radius:50%;width:12px;height:12px;background-color:#d9d9d9;transition:background-color .3s,transform .3s}.loading-dots[_ngcontent-%COMP%] span.active[_ngcontent-%COMP%]{background-color:var(--ion-color-primary);transform:scale(1.8)}']}),t})();var nt=f(34831),Ot=f(86245),Zt=f(81838),ct=f(15439),xt=f.n(ct),rt=f(10866);function Yt(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"ion-calendar",12),a.\u0275\u0275listener("ngModelChange",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(s.dateDefault=i)})("change",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(s.change(i))}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()}if(2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275property("ngModel",e.dateDefault)("options",e.options)}}function $t(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"ion-calendar",13),a.\u0275\u0275listener("ngModelChange",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(s.selectedDates=i)})("change",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(s.change(i))}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()}if(2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275property("ngModel",e.selectedDates)("options",e.options)}}function Wt(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"ion-datetime",14),a.\u0275\u0275listener("ngModelChange",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(s.dateDefault=i)}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()}if(2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275property("ngModel",e.dateDefault)}}function dn(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",10),a.\u0275\u0275template(1,Yt,2,2,"ng-container",11),a.\u0275\u0275template(2,$t,2,2,"ng-container",11),a.\u0275\u0275template(3,Wt,2,1,"ng-container",11),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","single"===e.options.pickMode),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","multi"===e.options.pickMode),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","single"===e.options.pickMode&&e.isScreenNotification)}}let un=(()=>{class t{constructor(e,r,i){this.modalController=e,this.translateConfigService=r,this.notificatorService=i,this.selectedDates=[],this.recurrence=[],this.startDate=null,this.isScreenNotification=!1,this.options={color:"primary"},this.maxSelectableDates=null,this.processReceivedDate=()=>{if(this.recurrence.length||(this.dateDefault=[xt()(this.startDate).format("YYYY-MM-DD")]),this.recurrence.length>0){const c=this.recurrence.map(l=>xt().utc(l.happensAt).format("YYYY-MM-DD"));this.selectedDates=c}else 0===this.recurrence.length&&(this.selectedDates=[xt()(this.startDate).format("YYYY-MM-DD")])},this.back=()=>{this.modalController.dismiss({code:"BACK"})},this.ok=()=>{const s=this.selectedDates.length>0?this.orderDates(this.selectedDates):[];this.modalController.dismiss({code:"OK",data:{date:this.dateDefault instanceof Array?this.dateDefault[0]:this.dateDefault,recurrence:s,pickMode:this.options.pickMode}})},this.onDayChange=s=>{let c=parseInt(s.target.value,10);c>this.maxDay&&(c=this.maxDay),this.setDay(c)},this.setDay=s=>{this.day=0,setTimeout(()=>{this.day=s},1)},this.onMonthChange=s=>{let c=parseInt(s.target.value,10);c>12&&(c=12),this.setMonth(c),this.updateMaxDay(),this.updateDay()},this.setMonth=s=>{this.month=0,setTimeout(()=>{this.month=s},1)},this.onYearChange=s=>{let c=parseInt(s.target.value,10);c>2099&&(c=2099),this.setYear(c),this.updateMaxDay(),this.updateDay()},this.setYear=s=>{this.year=0,setTimeout(()=>{this.year=s},1)},this.lastMonthDay=()=>new Date(this.year,this.month-1+1,0).getDate(),this.updateMaxDay=()=>{this.maxDay=this.lastMonthDay()},this.updateDay=()=>{this.day>this.maxDay&&this.setDay(this.maxDay)},this.translateConfigService.getDefaultLanguage(),this.language=this.translateConfigService.getCurrentLang()}ngOnInit(){setTimeout(()=>{this.showDatetime=!0},200),this.processReceivedDate()}change(e){"single"===this.options.pickMode?this.dateDefault=e:"multi"===this.options.pickMode&&(this.maxSelectableDates&&e.length>this.maxSelectableDates?(this.selectedDates=e.slice(0,this.maxSelectableDates),this.toastShowMaxDatesRecurrence()):this.selectedDates=e)}orderDates(e){return xt().isMoment(e[0])?e.sort((r,i)=>r.diff(i)<0?-1:r.diff(i)>0?1:0):e.sort((r,i)=>r.localeCompare(i)),e}toastShowMaxDatesRecurrence(){const e={title:"",message:this.translateConfigService.translate("TOAST_MAX_RECURRENCES_DATE",{count:this.maxSelectableDates}),type:"error",timeout:1e4,cssCustom:"toast-max-dates-recurrence"};this.notificatorService.notify(e)}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController),a.\u0275\u0275directiveInject(v.wK),a.\u0275\u0275directiveInject(v.V6))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-pick-date-modal"]],inputs:{selectedDates:"selectedDates",recurrence:"recurrence",startDate:"startDate",isScreenNotification:"isScreenNotification",options:"options",maxSelectableDates:"maxSelectableDates"},decls:16,vars:8,consts:[[3,"ngClass"],[1,"content"],[1,"background"],[1,"modal-container"],[1,"modal-title"],["aria-hidden","true","color","ok","name","calendar"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],[1,"reject",3,"click"],[1,"accept",3,"click"],[1,"modal-body"],[4,"ngIf"],["type","string",2,"margin","0","padding","0",3,"ngModel","options","ngModelChange","change"],["type","moment",3,"ngModel","options","ngModelChange","change"],["presentation","date","display-format","DD/MM/YYYY",3,"ngModel","ngModelChange"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1),a.\u0275\u0275element(2,"div",2),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4)(5,"h3"),a.\u0275\u0275text(6),a.\u0275\u0275pipe(7,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275element(8,"ion-icon",5),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(9,dn,4,3,"div",6),a.\u0275\u0275elementStart(10,"div",7)(11,"button",8),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275text(12),a.\u0275\u0275pipe(13,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(14,"button",9),a.\u0275\u0275listener("click",function(){return r.ok()}),a.\u0275\u0275text(15,"Ok"),a.\u0275\u0275elementEnd()()()()()),2&e&&(a.\u0275\u0275property("ngClass","pick-date-modal"),a.\u0275\u0275advance(6),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind1(7,4,"COMPONENT_SELECT_DATE")),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf",!r.isScreenNotification),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(13,6,"COMPONENT_SELECT_BTN_BACK")," "))},dependencies:[b.NgClass,b.NgIf,m.IonDatetime,m.IonIcon,m.SelectValueAccessor,L.NgControlStatus,L.NgModel,rt.CalendarComponent,k.X$],styles:[".pick-date-modal[_ngcontent-%COMP%]{width:100vw;height:100vh;transition:height .5s ease-in-out;overflow:hidden;z-index:1000;display:flex;justify-content:center;align-items:center}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100vw;color:#383a3e}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:.3;top:0;transition:opacity .5s ease-out}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{background-color:#fff;width:86vw;margin:auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;transition:margin-top 1s ease;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:start;font-weight:500;width:100%;background-color:#fff;display:flex;justify-content:space-between;align-items:center}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{width:100%;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff;margin-top:12px}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .date-holder[_ngcontent-%COMP%]{display:flex}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .date-holder[_ngcontent-%COMP%] .date-input-holder[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:1px solid #eee;margin-right:4px;border-radius:5px;width:50px;height:50px;text-align:center}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .date-holder[_ngcontent-%COMP%] .date-input-divider-holder[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin:0 6px}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{width:100%;line-height:3.5em;display:flex;justify-content:flex-end;align-items:center;overflow:hidden;background-color:#fff;margin-top:12px}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;background-color:#fff;color:#656768;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),t})(),Pn=(()=>{class t{constructor(e){this.modalController=e,this.date=new Date,this.processReceivedDate=()=>{const r=this.date.getHours(),i=this.date.getMinutes();this.setHour(r),this.setMinute(i)},this.back=()=>{this.modalController.dismiss({code:"BACK"})},this.ok=()=>{this.date.setHours(this.hour),this.date.setMinutes(this.minute),this.modalController.dismiss({code:"OK",data:{date:this.date}})},this.onHourChange=r=>{let i=parseInt(r.target.value,10);i>23&&(i=23),this.setHour(i)},this.setHour=r=>{this.hour=0,setTimeout(()=>{this.hour=r},1)},this.onMinuteChange=r=>{let i=parseInt(r.target.value,10);i>59&&(i=59),this.setMinute(i)},this.setMinute=r=>{this.minute=0,setTimeout(()=>{this.minute=r},1)}}set startDate(e){this.date=e||new Date}ngOnInit(){this.processReceivedDate()}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-pick-datetime-modal"]],inputs:{startDate:"startDate"},decls:22,vars:9,consts:[[3,"ngClass"],[1,"content"],[1,"background"],[1,"modal-container"],[1,"modal-title"],["color","ok","name","time-outline"],[1,"modal-body"],[1,"date-holder"],[1,"date-input-holder"],["type","number","min","0","max","23",3,"value","click","input"],[1,"date-input-divider-holder"],["type","number","min","0","max","59",3,"value","click","input"],[1,"modal-footer"],[1,"reject",3,"click"],[1,"accept",3,"click"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1),a.\u0275\u0275element(2,"div",2),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275element(7,"ion-icon",5),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(8,"div",6)(9,"div",7)(10,"div",8)(11,"input",9),a.\u0275\u0275listener("click",function(s){return s.target})("input",function(s){return r.onHourChange(s)}),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(12,"div",10),a.\u0275\u0275text(13,":"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(14,"div",8)(15,"input",11),a.\u0275\u0275listener("click",function(s){return s.target})("input",function(s){return r.onMinuteChange(s)}),a.\u0275\u0275elementEnd()()()(),a.\u0275\u0275elementStart(16,"div",12)(17,"button",13),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275text(18),a.\u0275\u0275pipe(19,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(20,"button",14),a.\u0275\u0275listener("click",function(){return r.ok()}),a.\u0275\u0275text(21,"Ok"),a.\u0275\u0275elementEnd()()()()()),2&e&&(a.\u0275\u0275property("ngClass","pick-date-modal"),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(6,5,"COMPONENT_SELECT_SCHEDULE")," "),a.\u0275\u0275advance(6),a.\u0275\u0275property("value",r.hour),a.\u0275\u0275advance(4),a.\u0275\u0275property("value",r.minute),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(19,7,"COMPONENT_SELECT_BTN_BACK")," "))},dependencies:[b.NgClass,m.IonIcon,k.X$],styles:[".pick-date-modal[_ngcontent-%COMP%]{width:100vw;height:100vh;transition:height .5s ease-in-out;overflow:hidden;z-index:1000;display:flex;justify-content:center;align-items:center}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100vw;color:#383a3e}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:.3;top:0;transition:opacity .5s ease-out}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{background-color:#fff;width:86vw;margin:auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;transition:margin-top 1s ease;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:start;font-weight:500;width:100%;background-color:#fff;display:flex;justify-content:space-between;align-items:center}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{width:100%;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff;margin-top:12px}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .date-holder[_ngcontent-%COMP%]{display:flex}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .date-holder[_ngcontent-%COMP%] .date-input-holder[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:1px solid #eee;margin-right:4px;border-radius:5px;width:50px;height:50px;text-align:center}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .date-holder[_ngcontent-%COMP%] .date-input-divider-holder[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin:0 6px}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{width:100%;line-height:3.5em;display:flex;justify-content:flex-end;align-items:center;overflow:hidden;background-color:#fff;margin-top:12px}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;background-color:#fff;color:#656768;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.pick-date-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),t})();var On=f(71237);function In(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",9),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext().$implicit,r=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",r.metaParser(e.text,e.metas)," ")}}function Fn(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"li"),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.text," ")}}function Hr(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",9)(1,"ul"),a.\u0275\u0275template(2,Fn,2,1,"li",6),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",e.items)}}function xo(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",7),a.\u0275\u0275template(1,In,2,1,"div",8),a.\u0275\u0275template(2,Hr,3,1,"div",8),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","text"===e.type),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf","unordered-list"===e.type)}}function yo(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275element(1,"app-privacy-policy-chapter",10),a.\u0275\u0275elementContainerEnd()),2&t){const e=n.$implicit,r=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("chapter",e)("labels",r.getNextLabels(r.chapter))}}let Ho=(()=>{class t{constructor(){this.getNextChapters=()=>{},this.getNextLabels=e=>[...this.labels,e["position-label"]],this.metaParser=(e,r=[])=>e.replace(/###meta-\d/g,"").replace(/###/g,"")}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-privacy-policy-chapter"]],inputs:{chapter:"chapter",labels:"labels"},decls:10,vars:5,consts:[[1,"chapter"],[1,"title"],[1,"position-label"],[1,"title-value"],[1,"paragraphs"],["class","paragraph",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"paragraph"],["class","text",4,"ngIf"],[1,"text"],[3,"chapter","labels"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2),a.\u0275\u0275text(3),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(4,"div",3)(5,"span"),a.\u0275\u0275text(6),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementStart(7,"div",4),a.\u0275\u0275template(8,xo,3,2,"div",5),a.\u0275\u0275template(9,yo,2,2,"ng-container",6),a.\u0275\u0275elementEnd()()),2&e&&(a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate2(" ",r.labels.length?r.labels.join(".")+".":"","",r.chapter["position-label"]," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate(r.chapter.title),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",r.chapter.paragraphs),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",r.chapter.chapters))},dependencies:[b.NgForOf,b.NgIf,t],styles:[".chapter[_ngcontent-%COMP%]{margin-left:8px;margin-top:48px;font-size:1em}.chapter[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1em!important;display:flex;font-weight:700}.chapter[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .position-label[_ngcontent-%COMP%]{font-size:1em}.chapter[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-value[_ngcontent-%COMP%]{font-size:1em;margin-left:32px}.chapter[_ngcontent-%COMP%] .chapters[_ngcontent-%COMP%]{margin-left:16px}.chapter[_ngcontent-%COMP%] .chapters[_ngcontent-%COMP%] .chapter[_ngcontent-%COMP%]{font-size:1em}.chapter[_ngcontent-%COMP%] .chapters[_ngcontent-%COMP%] .chapter[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1em!important;display:flex}.chapter[_ngcontent-%COMP%] .chapters[_ngcontent-%COMP%] .chapter[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .position-label[_ngcontent-%COMP%], .chapter[_ngcontent-%COMP%] .chapters[_ngcontent-%COMP%] .chapter[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-value[_ngcontent-%COMP%]{font-size:1em}.chapter[_ngcontent-%COMP%] .paragraphs[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%]{margin:8px 10px 1px}"]}),t})();function io(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",10),a.\u0275\u0275listener("click",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(c.emailSelect(s))}),a.\u0275\u0275elementStart(1,"div",11),a.\u0275\u0275text(2),a.\u0275\u0275elementEnd()()}if(2&t){const e=n.$implicit;a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(e.address)}}let Mo=(()=>{class t{constructor(e){this.modalController=e,this.emailSelect=r=>{this.modalController.dismiss(r)},this.back=()=>{this.modalController.dismiss(null)}}set profiles(e){this.contact=e}get profiles(){return this.contact}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-select-contact-email-to-use"]],inputs:{profiles:"profiles"},decls:14,vars:8,consts:[[3,"ngClass"],[1,"content"],[1,"background",3,"click"],[1,"modal-container"],[1,"modal-title"],[1,"modal-body"],[1,"profiles"],["class","profile",3,"click",4,"ngFor","ngForOf"],[1,"modal-footer"],[1,"reject",3,"click"],[1,"profile",3,"click"],[1,"company-name"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(7,"div",5)(8,"div",6),a.\u0275\u0275template(9,io,3,1,"div",7),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(10,"div",8)(11,"button",9),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275text(12),a.\u0275\u0275pipe(13,"translate"),a.\u0275\u0275elementEnd()()()()()),2&e&&(a.\u0275\u0275property("ngClass","select-contact-email-to-use"),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(6,4,"MD_CONTACT_EMAIL_TO_USE_TITLE")," "),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngForOf",r.contact.emails),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind1(13,6,"BTN_BACK")))},dependencies:[b.NgClass,b.NgForOf,k.X$],styles:[".select-contact-email-to-use[_ngcontent-%COMP%]{width:100vw;transition:height .5s ease-in-out;overflow:hidden;z-index:1000;height:100vh}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:.3;top:0;transition:opacity .5s ease-out}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:60vh;background-color:#fff;width:86vw;margin:auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;margin-top:20vh;transition:margin-top 1s ease;overflow-y:scroll}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:500;width:100%;background-color:#fff}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{margin-top:32px;width:100%;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%]{padding:8px 12px;border:1px solid #eee;border-radius:4px;margin-bottom:8px}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .company-name[_ngcontent-%COMP%]{font-weight:700}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{color:#656768}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{height:3.5em;width:100%;line-height:3.5em;display:flex;justify-content:center;align-items:center;overflow:hidden;background-color:#fff;margin-top:24px}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;background-color:#fff;color:#656768;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.select-contact-email-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),t})();function bi(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",10),a.\u0275\u0275listener("click",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(c.phoneNumberSelect(s))}),a.\u0275\u0275elementStart(1,"div",11),a.\u0275\u0275text(2),a.\u0275\u0275elementEnd()()}if(2&t){const e=n.$implicit;a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(e.number)}}let Zi=(()=>{class t{constructor(e){this.modalController=e,this.phoneNumberSelect=r=>{this.modalController.dismiss(r)},this.back=()=>{this.modalController.dismiss(null)}}set profiles(e){this.contact=e}get profiles(){return this.contact}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(m.ModalController))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-select-contact-phone-number-to-use"]],inputs:{profiles:"profiles"},decls:14,vars:8,consts:[[3,"ngClass"],[1,"content"],[1,"background",3,"click"],[1,"modal-container"],[1,"modal-title"],[1,"modal-body"],[1,"profiles"],["class","profile",3,"click",4,"ngFor","ngForOf"],[1,"modal-footer"],[1,"reject",3,"click"],[1,"profile",3,"click"],[1,"company-name"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(3,"div",3)(4,"div",4),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(7,"div",5)(8,"div",6),a.\u0275\u0275template(9,bi,3,1,"div",7),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(10,"div",8)(11,"button",9),a.\u0275\u0275listener("click",function(){return r.back()}),a.\u0275\u0275text(12),a.\u0275\u0275pipe(13,"translate"),a.\u0275\u0275elementEnd()()()()()),2&e&&(a.\u0275\u0275property("ngClass","select-contact-phone-number-to-use"),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(6,4,"MD_CONTACT_PHONE_TO_USE_TITLE")," "),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngForOf",r.contact.contact.phones),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind1(13,6,"BTN_BACK")))},dependencies:[b.NgClass,b.NgForOf,k.X$],styles:[".select-contact-phone-number-to-use[_ngcontent-%COMP%]{width:100vw;transition:height .5s ease-in-out;overflow:hidden;z-index:1000;height:100vh}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:.3;top:0;transition:opacity .5s ease-out}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:60vh;background-color:#fff;width:86vw;margin:auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;margin-top:20vh;transition:margin-top 1s ease;overflow-y:scroll}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:500;width:100%;background-color:#fff}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{margin-top:32px;width:100%;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%]{padding:8px 12px;border:1px solid #eee;border-radius:4px;margin-bottom:8px}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .company-name[_ngcontent-%COMP%]{font-weight:700}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{color:#656768}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{height:3.5em;width:100%;line-height:3.5em;display:flex;justify-content:center;align-items:center;overflow:hidden;background-color:#fff;margin-top:24px}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;background-color:#fff;color:#656768;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]{color:#0ec254}.select-contact-phone-number-to-use[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),t})();var tr=f(50547),Po=f(59584),We=f(55832);function ot(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"ion-select-option",21),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275property("value",e),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",null==e?null:e.name," ")}}function Pt(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"ion-item",16)(1,"ion-select",20),a.\u0275\u0275listener("ionChange",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(s.handleChangeSite(i))})("ionBlur",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(s.handleBlurSite(i))}),a.\u0275\u0275pipe(2,"translate"),a.\u0275\u0275pipe(3,"translate"),a.\u0275\u0275pipe(4,"translate"),a.\u0275\u0275template(5,ot,2,2,"ion-select-option",18),a.\u0275\u0275elementEnd()()}if(2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275property("compareWith",e.compareWith)("placeholder",a.\u0275\u0275pipeBind1(2,5,"MD_LIST_BOOKEI_SELECT_SITE"))("okText",a.\u0275\u0275pipeBind1(3,7,"MD_LIST_BOOKEI_SELECT_OK"))("cancelText",a.\u0275\u0275pipeBind1(4,9,"MD_LIST_BOOKEI_SELECT_CANCEL")),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngForOf",e.sitesAvaliables)}}function zt(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"ion-select-option",21),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275property("value",e),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.name," ")}}function Qt(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"ion-select-option",21),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=n.$implicit;a.\u0275\u0275property("value",e),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.name," ")}}function qe(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",12),a.\u0275\u0275text(2),a.\u0275\u0275pipe(3,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(4,"form",13)(5,"div",14),a.\u0275\u0275template(6,Pt,6,11,"ion-item",15),a.\u0275\u0275elementStart(7,"ion-item",16)(8,"ion-select",17),a.\u0275\u0275listener("ionChange",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(s.handleChangeLocation(i))}),a.\u0275\u0275pipe(9,"translate"),a.\u0275\u0275pipe(10,"translate"),a.\u0275\u0275pipe(11,"translate"),a.\u0275\u0275template(12,zt,2,2,"ion-select-option",18),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(13,"ion-item",16)(14,"ion-select",19),a.\u0275\u0275listener("ionChange",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(s.handleChangeAssetsType(i))}),a.\u0275\u0275pipe(15,"translate"),a.\u0275\u0275pipe(16,"translate"),a.\u0275\u0275pipe(17,"translate"),a.\u0275\u0275template(18,Qt,2,2,"ion-select-option",18),a.\u0275\u0275elementEnd()()()(),a.\u0275\u0275elementContainerEnd()}if(2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(3,11,"MD_LIST_BOOKEI_TEXT_SUBTITLE")," "),a.\u0275\u0275advance(2),a.\u0275\u0275property("formGroup",e.bookinForm),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",(null==e.sitesAvaliables?null:e.sitesAvaliables.length)>1),a.\u0275\u0275advance(2),a.\u0275\u0275property("placeholder",a.\u0275\u0275pipeBind1(9,13,"MD_LIST_BOOKEI_SELECT_LOCAL"))("okText",a.\u0275\u0275pipeBind1(10,15,"MD_LIST_BOOKEI_SELECT_OK"))("cancelText",a.\u0275\u0275pipeBind1(11,17,"MD_LIST_BOOKEI_SELECT_CANCEL")),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngForOf",e.locations),a.\u0275\u0275advance(2),a.\u0275\u0275property("placeholder",a.\u0275\u0275pipeBind1(15,19,"MD_LIST_BOOKEI_SELECT_ASSETS"))("okText",a.\u0275\u0275pipeBind1(16,21,"MD_LIST_BOOKEI_SELECT_OK"))("cancelText",a.\u0275\u0275pipeBind1(17,23,"MD_LIST_BOOKEI_SELECT_CANCEL")),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngForOf",e.assetsTypes)}}function wt(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"app-card-booking-component",24),a.\u0275\u0275listener("onSelected",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(c.onBookingSelect(s))}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()}if(2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("isModal",!0)("booking",e)}}function Ht(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"ion-row")(1,"ion-col")(2,"div",22)(3,"div",8),a.\u0275\u0275text(4),a.\u0275\u0275pipe(5,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(6,wt,2,2,"ng-container",23),a.\u0275\u0275elementEnd()()()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(5,2,"MD_LIST_BOOKEI_TEXT_AVAILABLE_ASSETS")," "),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",e.foundBookings)}}function Kt(t,n){1&t&&(a.\u0275\u0275elementStart(0,"ion-row")(1,"ion-col")(2,"div",22)(3,"div",25),a.\u0275\u0275text(4),a.\u0275\u0275pipe(5,"translate"),a.\u0275\u0275elementEnd()()()()),2&t&&(a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(5,1,"MD_LIST_BOOKEI_TEXT_NO_AVAILABLE_ASSETS")," "))}function on(t,n){1&t&&(a.\u0275\u0275elementStart(0,"ion-row")(1,"ion-col")(2,"div",22)(3,"div",26),a.\u0275\u0275text(4),a.\u0275\u0275pipe(5,"translate"),a.\u0275\u0275elementEnd()()()()),2&t&&(a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(5,1,"MD_LIST_BOOKEI_TEXT_NO_USER_ALLOWED")," "))}function Mn(t,n){1&t&&(a.\u0275\u0275elementStart(0,"ion-row")(1,"ion-col")(2,"div",22)(3,"div",26),a.\u0275\u0275text(4),a.\u0275\u0275pipe(5,"translate"),a.\u0275\u0275elementEnd()()()()),2&t&&(a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(5,1,"MD_LIST_BOOKEI_TEXT_CONTACT_COMPANY_ADMINSTRATOR")," "))}function Yn(t,n){if(1&t&&(a.\u0275\u0275template(0,on,6,3,"ion-row",10),a.\u0275\u0275template(1,Mn,6,3,"ion-row",10)),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275property("ngIf",e.user_not_allowed&&e.requestFinish),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!e.user_not_allowed&&e.requestFinish)}}let Hn=(()=>{class t{constructor(e,r,i,s,c,l,u,d){this.formBuilder=e,this.modalController=r,this.helperService=i,this.loaderService=s,this.profileManagerService=c,this.bookeiService=l,this.createEventService=u,this.translateConfigService=d,this.foundBookings=[],this.locations=[],this.sitesAvaliables=[],this.assetsTypes=[],this.page=0,this.size=10,this.requestFinish=!1,this.user_not_allowed=!1,this.onClose=()=>{this.modalController.dismiss()},this.onBookingSelect=p=>{this.modalController.dismiss(p)},this.handleGetBookingsSuccessResponse=p=>{this.setFoundBookings(p),this.loaderService.hide()},this.handleGetSitesBookingsSuccessResponse=p=>{if(p instanceof Po.HttpErrorResponse)return this.loaderService.hide(),this.handleGetSitesBookingsErrorResponse(p);this.setSitesFoundBookings(p),this.setInitialValueForSites(),this.loaderService.hide()},this.handleGetSitesBookingsErrorResponse=p=>{this.notFountBookins=!0,this.requestFinish=!0,this.foundBookings=[],this.locations=[],this.assetsTypes=[],this.sitesAvaliables=[],this.erroKeyStatus(p)},this.handleGetBookingsErrorResponse=p=>{},this.setFoundBookings=p=>{this.foundBookings=p.content},this.site=()=>{this.loaderService.show(this.translateConfigService.translate("MD_LIST_BOOKEI_LOADING_DATA"),null),this.bookeiService.selectService("site").then(this.handleGetSitesBookingsSuccessResponse).catch(this.handleGetSitesBookingsErrorResponse).finally(()=>{this.loaderService.hide(),this.requestFinish=!0})},this.setInitialValueForSites=()=>{this.sitesAvaliables&&this.sitesAvaliables.length>0?setTimeout(()=>{this.siteSelected=this.sitesAvaliables[0]?this.sitesAvaliables[0]:null,this.locations=this.props.initialRequest?this.sitesAvaliables[0].locations:[],this.assetsTypes=this.props.initialRequest?this.sitesAvaliables[0].assetsType:[],this.bookinForm.controls.sites.setValue(this.siteSelected),this.getBookinsFilter(this.siteSelected,this.locations[0],this.assetsTypes[0],!0)}):this.sitesAvaliables=[]},this.setInitialValueForLocations=p=>{this.bookinForm.controls.locations.setValue(p||null)},this.setInitialValueForAssetsType=p=>{this.bookinForm.controls.assetsTypes.setValue(p||null)},this.sitesAvaliables=[],this.foundBookings=[]}ionViewWillEnter(){this.profileCurrent=this.getProfileCurrent}ngOnInit(){this.initial=!0,this.site(),this.initForm()}handleBlurSite(e){}setSitesFoundBookings(e){this.sitesAvaliables=e}joinResoucers(e){return e.map(r=>r.name).join(" | ")}compareWith(e,r){return e&&r?e.id===r.id:e===r}compareWithLocations(e,r){return e&&r?e.id===r.id:e===r}handleChangeSite(e){const{value:r}=e.detail,i=r;this.siteSelected=i,this.locations=[],this.assetsTypes=[],this.foundBookings=[],i&&i.locations.length>0?setTimeout(()=>{this.locations=i.locations,this.assetsTypes=i.assetsType},80):(this.locations=[],this.assetsTypes=[],this.foundBookings=[],this.notFountBookins=!0,this.requestFinish=!0),this.initial=!1}handleChangeLocation(e){const{value:r}=e.detail,i=r;this.locationSelected=null,this.assetsTypesSelected=null,this.initial=!0,i&&(this.foundBookings=[],this.locationSelected=i,this.requestFinish=!1,this.getBookinsFilter(this.siteSelected,i,null,!1))}handleChangeAssetsType(e){this.loaderService.show(this.translateConfigService.translate("MD_LIST_BOOKEI_LOADING_ASSETS"));const{value:r}=e.detail,i=r;this.assetsTypesSelected=null,i&&(this.requestFinish=!1,this.foundBookings=[],this.assetsTypesSelected=i,this.getBookinsFilter(this.siteSelected,this.locationSelected,this.assetsTypesSelected,!1))}getBookinsFilter(e,r,i,s){const c=this.createEventService.getStartDate();let l=null;return l={"date.in":xt()(c).toISOString(),"duration.equals":this.durationDateIn,"locationId.equals":r&&r.id?r.id:1,"siteId.equals":e&&e.id?e.id:1,"typeId.equals":i&&i.id?i.id:1,page:this.page,size:this.size},this.props&&this.props.initialRequest&&s&&(delete l["locationId.equals"],delete l["typeId.equals"]),this.bookeiService.selectService("by_criteria_filter",l).then(this.handleGetBookingsSuccessResponse).catch(this.handleGetBookingsErrorResponse).finally(()=>{this.loaderService.hide(),this.requestFinish=!0})}get getProfileCurrent(){return this.profileManagerService.getProfile()}initForm(){this.bookinForm=this.formBuilder.group({sites:[""],locations:[""],assetsTypes:[""]})}erroKeyStatus(e){if("user_not_allowed"===e.error.errorKey)return this.user_not_allowed=!0}get durationDateIn(){const e=xt()(this.createEventService.getStartDate());return xt()(this.createEventService.getEndDate()).diff(e,"minutes")}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(L.UntypedFormBuilder),a.\u0275\u0275directiveInject(m.ModalController),a.\u0275\u0275directiveInject(v.W_),a.\u0275\u0275directiveInject(v.D1),a.\u0275\u0275directiveInject(v.v4),a.\u0275\u0275directiveInject(We.l),a.\u0275\u0275directiveInject(v.jc),a.\u0275\u0275directiveInject(v.wK))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-selector-for-bookings-to-add-to-event"]],inputs:{props:"props"},decls:19,vars:10,consts:[[1,"fix-header-modal-ios","ion-no-border"],[1,"content"],[1,"modal-container"],[1,"button-holder"],[1,"button-holder-back",3,"name","action"],[1,"line"],[1,"modal-body"],[1,"filters"],[1,"title"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["notSiteFount",""],[1,"subtitle"],[3,"formGroup"],[1,"filters__select"],["lines","none",4,"ngIf"],["lines","none"],["formControlName","locations",3,"placeholder","okText","cancelText","ionChange"],[3,"value",4,"ngFor","ngForOf"],["formControlName","assetsTypes",3,"placeholder","okText","cancelText","ionChange"],["formControlName","sites",3,"compareWith","placeholder","okText","cancelText","ionChange","ionBlur"],[3,"value"],[1,"results"],[4,"ngFor","ngForOf"],[3,"isModal","booking","onSelected"],[1,"title","ion-text-center"],[1,"title","ion-text-center",2,"font-size","16px","font-weight","300","color","#656768"]],template:function(e,r){if(1&e&&(a.\u0275\u0275element(0,"ion-header",0),a.\u0275\u0275elementStart(1,"div",1)(2,"div",2)(3,"div",3)(4,"app-button-custom-component",4),a.\u0275\u0275listener("action",function(){return r.onClose()}),a.\u0275\u0275pipe(5,"translate"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275element(6,"div",5),a.\u0275\u0275elementStart(7,"div",6)(8,"ion-row")(9,"ion-col")(10,"div",7)(11,"div",8),a.\u0275\u0275text(12),a.\u0275\u0275pipe(13,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(14,qe,19,25,"ng-container",9),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275template(15,Ht,7,4,"ion-row",10),a.\u0275\u0275template(16,Kt,6,3,"ion-row",10),a.\u0275\u0275template(17,Yn,2,2,"ng-template",null,11,a.\u0275\u0275templateRefExtractor),a.\u0275\u0275elementEnd()()()),2&e){const i=a.\u0275\u0275reference(18);a.\u0275\u0275advance(4),a.\u0275\u0275property("name",a.\u0275\u0275pipeBind1(5,6,"MD_LIST_BOOKEI_BTN_CLOSE")),a.\u0275\u0275advance(8),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(13,8,"MD_LIST_BOOKEI_TITLE")," "),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",(null==r.sitesAvaliables?null:r.sitesAvaliables.length)>0)("ngIfElse",i),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!!r.foundBookings.length&&!r.notFountBookins&&r.requestFinish&&!r.user_not_allowed),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",(!(null!=r.foundBookings&&r.foundBookings.length)||r.notFountBookins)&&r.requestFinish&&!r.user_not_allowed&&(null==r.sitesAvaliables?null:r.sitesAvaliables.length)>0)}},dependencies:[b.NgForOf,b.NgIf,m.IonCol,m.IonHeader,m.IonItem,m.IonRow,m.IonSelect,m.IonSelectOption,m.SelectValueAccessor,L.\u0275NgNoValidate,L.NgControlStatus,L.NgControlStatusGroup,L.FormGroupDirective,L.FormControlName,Te.e,K.H,k.X$],styles:[".line[_ngcontent-%COMP%]{height:1px;background:#e6e6e6;width:90%;margin:0 auto}.filters[_ngcontent-%COMP%]{padding:18px}.filters[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:600;line-height:30px;font-size:1.2em!important;padding-bottom:12px;color:#424242}.filters[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{padding-bottom:18px}.filters__select[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%]{--border-radius: 32px !important;border:1px solid #e6e6e6;border-radius:32px;margin-bottom:16px}.filters__select[_ngcontent-%COMP%] ion-select[_ngcontent-%COMP%]{width:100%;max-width:100%!important;padding:12px}.button-holder[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-bottom:18px;background:#fff;width:100%}ion-header.fix-header-modal-ios.ios[_ngcontent-%COMP%]{height:0px!important}.content[_ngcontent-%COMP%]{height:100vh;background-color:#fff}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{padding:0 18px!important;padding:1em 0;overflow:scroll;height:100%;margin:0 auto}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;line-height:30px!important;font-size:1.2em!important;padding-bottom:12px}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:0 0 11px;font-size:.9em;background-color:#eee;padding:4px 8px;border-radius:2px}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%]{margin:0 10% 4px;border:1px solid #eee;border-radius:4px;padding:4px 8px}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] > .asset-card[_ngcontent-%COMP%]{width:100%;margin:0 auto .8rem;border:1px solid #ced4da;border-radius:.25rem;display:flex;flex-wrap:wrap;align-items:center;padding:.5rem 1rem;cursor:pointer}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] > .asset-card[_ngcontent-%COMP%] .img-wrapper[_ngcontent-%COMP%]{width:64px;height:64px;display:flex}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] > .asset-card[_ngcontent-%COMP%] .img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:cover!important}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] > .asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%]{margin-left:1rem;display:flex;flex-direction:column;justify-content:space-between;align-self:stretch;flex:1}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] > .asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .asset-title[_ngcontent-%COMP%]{line-height:1rem}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] > .asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .asset-location[_ngcontent-%COMP%]{font-size:.8rem;line-height:1rem;color:#999}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] > .asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .accessory-wrapper[_ngcontent-%COMP%] .accessory-title[_ngcontent-%COMP%]{font-size:.7rem;line-height:.9rem;font-weight:600}.content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] > .asset-card[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .accessory-wrapper[_ngcontent-%COMP%] .accessories[_ngcontent-%COMP%]{font-size:.7rem;line-height:.8rem}"]}),t})();function Sr(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"app-card-founduser",25),a.\u0275\u0275listener("userSelect",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(c.onUserSelect(s))}),a.\u0275\u0275elementEnd()}2&t&&a.\u0275\u0275property("foundUser",n.$implicit)}function Co(t,n){if(1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"div",22)(2,"div",23),a.\u0275\u0275text(3),a.\u0275\u0275pipe(4,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(5,Sr,1,1,"app-card-founduser",24),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(4,2,"MD_GUEST_TAP_ITEM_EDIT")," "),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",e.foundUsers)}}function bo(t,n){}function Jr(t,n){1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275element(1,"app-card-founduser",26),a.\u0275\u0275elementContainerEnd()),2&t&&(a.\u0275\u0275advance(1),a.\u0275\u0275property("skeleton",!0))}let gi=(()=>{class t{constructor(e,r,i,s,c,l){var u=this;this.createEventService=e,this.formBuilder=r,this.modalController=s,this.changeDetectorRef=c,this.logService=l,this.isLoading=!1,this.isNewContact=!1,this.page=0,this.size=15,this.onClose=()=>{this.modalController.dismiss()},this.onUserSelect=d=>{setTimeout(()=>{this.modalController.dismiss(d)},750)},this.onCreateGuest=(0,o.Z)(function*(){const d=yield u.modalController.create({component:en.E});d.onDidDismiss().then(u.onModalDismissCallback),yield d.present()}),this.onModalDismissCallback=d=>{d&&d.data&&this.onUserSelect(d.data)},this.onUpdateContactInfoSuccessResponse=()=>{},this.onUpdateContactInfoErrorResponse=()=>{},this.onInputChange=d=>{const{value:p}=d.target;this.infiniteScroll.disabled=!1,this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{p.length>1&&(this.foundUsers=[],this.page=0),this.doSearch(p)},750)},this.doSearch=d=>{const p={searchTerm:d=d.trim()};this.dataTerms=p,this.createEventService.getCompanyGuests(p,this.page,this.size).then(this.handleGetGuestsSuccessResponse).catch(this.handleGetCompanyGuestsErrorResponse).finally(()=>this.isLoading=!0)},this.handleGetGuestsSuccessResponse=d=>{console.log("handleGetGuestsSuccessResponse"),console.log("response:",d),this.setFoundUsers(d)},this.handleGetCompanyGuestsErrorResponse=d=>{console.log("handleGetGuestsErrorResponse"),console.log("error:",d),this.logService.logError("http::handleGetCompanyGuestsErrorResponse","",d)},this.setFoundUsers=d=>{this.foundUsers=d,this.changeDetectorRef.detectChanges(),scrollBy(0,1)},this.isNewContact=i.get("isNewContact"),this.isNewContact&&this.onCreateGuest()}ngOnInit(){this.foundUsers=[],this.searchTimeout=null,this.userForm=this.formBuilder.group({searchTerm:[""]})}ionViewWillEnter(){this.onInputChange({target:{value:""}})}loadData(e){this.page+=1,this.loadMore(this.page,e)}loadMore(e,r){this.createEventService.getCompanyGuests(this.dataTerms,e,this.size,!!r).then(i=>{this.isLoading=!0,i.length>0?(this.handleGetGuestsSuccessResponse(this.foundUsers.concat(i)),this.size>0&&r.target.complete()):r.target.disabled=!0}).catch(i=>{this.handleGetCompanyGuestsErrorResponse(i),r.target.complete(),r.target.disabled=!0})}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(v.jc),a.\u0275\u0275directiveInject(L.UntypedFormBuilder),a.\u0275\u0275directiveInject(m.NavParams),a.\u0275\u0275directiveInject(m.ModalController),a.\u0275\u0275directiveInject(a.ChangeDetectorRef),a.\u0275\u0275directiveInject(v.$V))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-selector-for-guests-to-add-to-event"]],viewQuery:function(e,r){if(1&e&&a.\u0275\u0275viewQuery(m.IonInfiniteScroll,5),2&e){let i;a.\u0275\u0275queryRefresh(i=a.\u0275\u0275loadQuery())&&(r.infiniteScroll=i.first)}},decls:31,vars:11,consts:[[1,"fix-header-modal-ios","ion-no-border"],[3,"ngClass"],["horizontal","center","slot","fixed",1,"fab",3,"click"],["color","medium"],["name","close"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"modal-body"],[3,"formGroup"],[1,"input-holder"],[1,"upper-options"],["id","name","type","text","formControlName","searchTerm",3,"placeholder","keyup"],[1,"new-holder"],[1,"button-holder"],["type","button",3,"click"],[4,"ngIf","ngIfElse"],["notResult",""],[4,"ngIf"],[1,"modal-footer"],["threshold","15%","position","bottom",3,"ionInfinite"],["IonInfiniteScroll",""],[1,"results"],[1,"sub-title"],["typeofuser","guest",3,"foundUser","userSelect",4,"ngFor","ngForOf"],["typeofuser","guest",3,"foundUser","userSelect"],[3,"skeleton"]],template:function(e,r){if(1&e&&(a.\u0275\u0275element(0,"ion-header",0),a.\u0275\u0275elementStart(1,"ion-content",1)(2,"ion-fab",2),a.\u0275\u0275listener("click",function(){return r.onClose()}),a.\u0275\u0275elementStart(3,"ion-fab-button",3),a.\u0275\u0275element(4,"ion-icon",4),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(5,"div",5)(6,"div",6),a.\u0275\u0275element(7,"div",7),a.\u0275\u0275elementStart(8,"div",8)(9,"ion-row")(10,"ion-col")(11,"form",9)(12,"div",10)(13,"div",11)(14,"input",12),a.\u0275\u0275listener("keyup",function(s){return r.onInputChange(s)}),a.\u0275\u0275pipe(15,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(16,"div",13)(17,"div",14)(18,"button",15),a.\u0275\u0275listener("click",function(){return r.onCreateGuest()}),a.\u0275\u0275text(19),a.\u0275\u0275pipe(20,"translate"),a.\u0275\u0275elementEnd()()()()()()()(),a.\u0275\u0275elementStart(21,"ion-row")(22,"ion-col"),a.\u0275\u0275template(23,Co,6,4,"ng-container",16),a.\u0275\u0275template(24,bo,0,0,"ng-template",null,17,a.\u0275\u0275templateRefExtractor),a.\u0275\u0275template(26,Jr,2,1,"ng-container",18),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275element(27,"div",19),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(28,"ion-infinite-scroll",20,21),a.\u0275\u0275listener("ionInfinite",function(s){return r.loadData(s)}),a.\u0275\u0275element(30,"ion-infinite-scroll-content"),a.\u0275\u0275elementEnd()()),2&e){const i=a.\u0275\u0275reference(25);a.\u0275\u0275advance(1),a.\u0275\u0275property("ngClass","selector"),a.\u0275\u0275advance(10),a.\u0275\u0275property("formGroup",r.userForm),a.\u0275\u0275advance(3),a.\u0275\u0275property("placeholder",a.\u0275\u0275pipeBind1(15,7,"MD_GUEST_INPUT")),a.\u0275\u0275advance(5),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(20,9,"MD_GUEST_BTN_NEW")," "),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngIf",!!r.foundUsers.length&&r.isLoading)("ngIfElse",i),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf",!r.isLoading)}},styles:["ion-content.selector.ios[_ngcontent-%COMP%]{--offset-top: 0px !important}ion-content.selector.ios[_ngcontent-%COMP%] ion-fab.fab[_ngcontent-%COMP%]{position:fixed;margin-top:10px}ion-header.fix-header-modal-ios.ios[_ngcontent-%COMP%]{height:0px!important}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:3.5em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{padding:1em;overflow:scroll;height:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{width:80%;margin:0 10% 2px;font-weight:700;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:8px;border-radius:2px;text-align:center}"]}),t})();function Ri(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"app-card-founduser",21),a.\u0275\u0275listener("click",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(c.onUserSelect(s))}),a.\u0275\u0275elementEnd()}2&t&&a.\u0275\u0275property("foundUser",n.$implicit)}function Qr(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",17)(1,"div",18),a.\u0275\u0275text(2),a.\u0275\u0275pipe(3,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(4,"div",19),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(7,Ri,1,1,"app-card-founduser",20),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(3,3,"MD_HOSTS_TEXT_FOUND_HOSTS")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(6,5,"MD_HOSTS_STEP_TEXT_TAP_ITEM_EDIT")," "),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",e.foundUsers)}}function Bo(t,n){1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275element(1,"app-card-founduser",22),a.\u0275\u0275elementContainerEnd()),2&t&&(a.\u0275\u0275advance(1),a.\u0275\u0275property("skeleton",!0))}function _a(t,n){1&t&&(a.\u0275\u0275elementStart(0,"div",24),a.\u0275\u0275text(1),a.\u0275\u0275pipe(2,"translate"),a.\u0275\u0275elementEnd()),2&t&&(a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(2,1,"MD_HOSTS_TEXT_NO_FOUND_HOSTS")," "))}function Di(t,n){if(1&t&&a.\u0275\u0275template(0,_a,3,3,"div",23),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275property("ngIf",!e.foundUsers.length&&e.loaded)}}let vi=(()=>{class t{constructor(e,r,i,s,c,l){this.createEventService=e,this.formBuilder=r,this.modalController=i,this.changeDetectorRef=s,this.helperService=c,this.logService=l,this.loaded=!1,this.page=0,this.size=15,this.onClose=()=>{this.modalController.dismiss()},this.onUserSelect=u=>{this.modalController.dismiss(u)},this.onInputChange=u=>{const{value:d}=u.target;this.infiniteScroll.disabled=!1,this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{d.length>1&&(this.foundUsers=[],this.page=0),this.doSearch(d)},750)},this.doSearch=u=>{const d={searchTerm:u};this.dataTerms=d,this.createEventService.getCompanyHosts(d,this.page,this.size).then(this.handleGetHostsSuccessResponse).catch(this.handleGetHostsErrorResponse).finally(()=>this.isLoading=!0)},this.handleGetHostsSuccessResponse=u=>{console.log("handleGetHostsSuccessResponse"),console.log("response:",u),this.setFoundUsers(u)},this.handleGetHostsErrorResponse=u=>{console.log("handleGetHostsErrorResponse"),this.logService.logError("http::handleGetHostsErrorResponse","",u),console.log("error:",u),this.loaded=!0},this.setFoundUsers=u=>{this.foundUsers=u,this.changeDetectorRef.detectChanges(),scrollBy(0,1),this.loaded=!0}}ngOnInit(){this.foundUsers=[],this.searchTimeout=null,this.userForm=this.formBuilder.group({searchTerm:[""]})}ionViewWillEnter(){this.onInputChange({target:{value:""}})}loadData(e){this.page+=1,this.loadMore(this.page,e)}loadMore(e,r){this.createEventService.getCompanyHosts(this.dataTerms,e,this.size,!!r).then(i=>{this.isLoading=!0,i.length>0?(this.handleGetHostsSuccessResponse(this.foundUsers.concat(i)),this.size>0&&r.target.complete()):r.target.disabled=!0}).catch(i=>{this.handleGetHostsErrorResponse(i),r.target.complete(),r.target.disabled=!0})}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(v.jc),a.\u0275\u0275directiveInject(L.UntypedFormBuilder),a.\u0275\u0275directiveInject(m.ModalController),a.\u0275\u0275directiveInject(a.ChangeDetectorRef),a.\u0275\u0275directiveInject(v.W_),a.\u0275\u0275directiveInject(v.$V))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-selector-for-hosts-to-add-to-event"]],viewQuery:function(e,r){if(1&e&&a.\u0275\u0275viewQuery(m.IonInfiniteScroll,5),2&e){let i;a.\u0275\u0275queryRefresh(i=a.\u0275\u0275loadQuery())&&(r.infiniteScroll=i.first)}},decls:26,vars:11,consts:[[1,"fix-header-modal-ios","ion-no-border"],[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"modal-body"],[3,"formGroup"],[1,"input-holder"],["id","name","type","text","formControlName","searchTerm",3,"placeholder","keyup"],["class","results",4,"ngIf","ngIfElse"],[4,"ngIf"],["notFoundUsers",""],[1,"modal-footer"],["threshold","25%","position","bottom",3,"ionInfinite"],["IonInfiniteScroll",""],[1,"results"],[1,"title"],[1,"sub-title"],["typeofuser","host",3,"foundUser","click",4,"ngFor","ngForOf"],["typeofuser","host",3,"foundUser","click"],[3,"skeleton"],["class","notfoundusers",4,"ngIf"],[1,"notfoundusers"]],template:function(e,r){if(1&e&&(a.\u0275\u0275element(0,"ion-header",0),a.\u0275\u0275elementStart(1,"ion-content",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"button",6),a.\u0275\u0275listener("click",function(){return r.onClose()}),a.\u0275\u0275text(7),a.\u0275\u0275pipe(8,"translate"),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementStart(9,"div",7)(10,"ion-row")(11,"ion-col")(12,"form",8)(13,"div",9)(14,"input",10),a.\u0275\u0275listener("keyup",function(s){return r.onInputChange(s)}),a.\u0275\u0275pipe(15,"translate"),a.\u0275\u0275elementEnd()()()()(),a.\u0275\u0275elementStart(16,"ion-row")(17,"ion-col"),a.\u0275\u0275template(18,Qr,8,7,"div",11),a.\u0275\u0275template(19,Bo,2,1,"ng-container",12),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(20,Di,1,1,"ng-template",null,13,a.\u0275\u0275templateRefExtractor),a.\u0275\u0275elementEnd(),a.\u0275\u0275element(22,"div",14),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(23,"ion-infinite-scroll",15,16),a.\u0275\u0275listener("ionInfinite",function(s){return r.loadData(s)}),a.\u0275\u0275element(25,"ion-infinite-scroll-content"),a.\u0275\u0275elementEnd()()),2&e){const i=a.\u0275\u0275reference(21);a.\u0275\u0275advance(1),a.\u0275\u0275property("ngClass","selector"),a.\u0275\u0275advance(6),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(8,7,"MD_HOSTS_FORM_BTN_CLOSE")," "),a.\u0275\u0275advance(5),a.\u0275\u0275property("formGroup",r.userForm),a.\u0275\u0275advance(2),a.\u0275\u0275property("placeholder",a.\u0275\u0275pipeBind1(15,9,"MD_HOSTS_INPUT")),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngIf",!!r.foundUsers.length&&r.isLoading)("ngIfElse",i),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!r.isLoading)}},styles:["ion-header.fix-header-modal-ios.ios[_ngcontent-%COMP%]{height:0px!important}.modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center}.modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{width:100%;margin:8px 0 20px;padding:0 18px}.modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{overflow:scroll;height:100%;padding:1em}.modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700!important;font-size:initial!important}.modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:5px 8px;border-radius:2px}.notfoundusers[_ngcontent-%COMP%]{position:relative;text-align:center}"]}),t})();f(202);var ci=f(58517),aa=f(17029);function sa(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"ion-item",2),a.\u0275\u0275listener("click",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(c.select(s))}),a.\u0275\u0275element(1,"ion-img",3),a.\u0275\u0275elementStart(2,"ion-label",4),a.\u0275\u0275text(3),a.\u0275\u0275elementEnd()()}if(2&t){const e=n.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("src",e.flag),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(e.description)}}let qo=(()=>{class t{constructor(e,r,i,s,c,l){this.translateConfigService=e,this.popoverCtrl=r,this.authLoginToken=i,this.apiService=s,this.notificatorService=c,this.showToastModalErroCodeZero=l,this.resources=[],this.resources=e.resources}ngOnInit(){console.log(this.translateConfigService.getCurrentLang())}select(e){var r=this;return(0,o.Z)(function*(){console.log(e);const i=yield r.translateConfigService.setLanguage(e.lang);r.popoverCtrl.dismiss(e),r.setLanguageAccountUser(i)})()}setLanguageAccountUser(e){var r=this;this.authLoginToken.getToken().then(function(){var i=(0,o.Z)(function*(s){try{yield r.apiService.setLangulageAccount(e,s).toPromise()}catch(c){r.handleErrorSettingLanguage(c)}});return function(s){return i.apply(this,arguments)}}()).catch(i=>console.log(i))}handleErrorSettingLanguage(e){const r=e.error;if(e&&0===e?.status)this.showToastModalErroCodeZero.showToast();else if(r&&"language_not_suported"===r.errorKey){const i=`${this.translateConfigService.translate("TOAST_LANGUAGE_NOT_SUPPORTED_MESSAGE")}`,{title:s}=this.getTitleAndMessage(e);this.toastNotificationError(s,i,1e4)}else if(r&&"missing_data"===r.errorKey){const i=`${this.translateConfigService.translate("TOAST_LANGUAGE_MISSING_DATA")}`,{title:s}=this.getTitleAndMessage(e);this.toastNotificationError(s,i,1e4)}else{const{title:i,message:s}=this.getTitleAndMessage(e);this.toastNotificationError(i,s,1e4)}}getTitleAndMessage(e){const r=e?.status?`(cod. ${e.status})`:"";return{title:this.translateConfigService.translate("TOAST_TITLE_ERROR"),message:`${this.translateConfigService.translate("TOAST_SERVICE_TEMPORARILY_UNAVAILABLE_MESSAGE")} ${r}`}}toastNotificationError(e,r,i){this.notificatorService.notify({title:e,message:r,type:"error",timeout:i})}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(v.wK),a.\u0275\u0275directiveInject(m.PopoverController),a.\u0275\u0275directiveInject(v.i_),a.\u0275\u0275directiveInject(v.sM),a.\u0275\u0275directiveInject(v.V6),a.\u0275\u0275directiveInject(v.ME))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-translate-change"]],decls:3,vars:1,consts:[["lines","none"],["role","button","button","","detail","false",3,"click",4,"ngFor","ngForOf"],["role","button","button","","detail","false",3,"click"],[1,"img-flag",3,"src"],[1,"ion-padding-horizontal"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"ion-content")(1,"ion-list",0),a.\u0275\u0275template(2,sa,4,2,"ion-item",1),a.\u0275\u0275elementEnd()()),2&e&&(a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",r.resources))},dependencies:[b.NgForOf,m.IonContent,m.IonImg,m.IonItem,m.IonLabel,m.IonList],styles:["ion-img.img-flag[_ngcontent-%COMP%]{width:1.3em}"]}),t})();var Li=(()=>{return(t=Li||(Li={})).pt="pt",t.en="en",t.es="es",Li;var t})();function qr(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",18),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext().$implicit,r=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",r.helperService.normalizeName(e.firstName,e.lastName)," ")}}function ga(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",18)(1,"span",19),a.\u0275\u0275text(2),a.\u0275\u0275elementEnd()()),2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(e.fullName)}}function Fa(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"span"),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(2).$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1("",null==e?null:e.email," ")}}function va(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",20),a.\u0275\u0275template(1,Fa,2,1,"span",21),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",null==e?null:e.email)}}function ya(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"span"),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(2).$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",null==e?null:e.department,"")}}function Ha(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",22),a.\u0275\u0275template(1,ya,2,1,"span",21),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",null==e?null:e.department)}}function ii(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",8),a.\u0275\u0275listener("click",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(c.onGuestSelect(s))}),a.\u0275\u0275template(1,qr,2,1,"div",15),a.\u0275\u0275template(2,ga,3,1,"div",15),a.\u0275\u0275template(3,va,2,1,"div",16),a.\u0275\u0275template(4,Ha,2,1,"div",17),a.\u0275\u0275elementEnd()}if(2&t){const e=n.$implicit,r=a.\u0275\u0275nextContext(2);a.\u0275\u0275property("ngClass","result "+(r.hasEmail(e)?"email-is-present":"missing-email")),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.firstName&&e.lastName),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!e.firstName&&!e.lastName),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.hasEmail(e)),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.hasDepartment(e))}}function Fi(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",11)(1,"div",12),a.\u0275\u0275text(2),a.\u0275\u0275pipe(3,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(4,"div",13),a.\u0275\u0275text(5),a.\u0275\u0275pipe(6,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(7,ii,5,5,"div",14),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(3,3,"MD_UPDATE_USER_EMAIL_TITLE")," "),a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(6,5,"MD_UPDATE_USER_EMAIL_TEXT_TAP_ITEM_EDIT")," "),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngForOf",e.guests)}}function Go(t,n){1&t&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275text(1),a.\u0275\u0275pipe(2,"translate"),a.\u0275\u0275elementContainerEnd()),2&t&&(a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(2,1,"MD_UPDATE_USER_EMAIL_BTN_PROCEED_ANYWAY")," "))}function Xo(t,n){1&t&&(a.\u0275\u0275text(0),a.\u0275\u0275pipe(1,"translate")),2&t&&a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(1,1,"MD_UPDATE_USER_EMAIL_BTN_NEXT")," ")}let Xa=(()=>{class t{constructor(e,r){var i=this;this.helperService=e,this.modalController=r,this.onGuestSelect=function(){var s=(0,o.Z)(function*(c){const l=yield i.modalController.create({component:en.E,componentProps:{contact:c}});l.onDidDismiss().then(i.onModalDismissCallback),yield l.present()});return function(c){return s.apply(this,arguments)}}(),this.onModalDismissCallback=s=>{if(console.log("onModalDismissCallback:",s),!s?.data)return;const c=s.data,l=this.guests.map(u=>u.id===c.id?c:u);console.log("updatedGuests:",l),this.guests=l},this.hasEmail=s=>!!s.email,this.hasDepartment=s=>!!s.department,this.isMissingEmail=()=>!!this.guests.find(s=>!s.email),this.onCancel=()=>{this.modalController.dismiss({share:!1,guests:this.guests},"cancel")},this.onContinue=()=>{this.modalController.dismiss({share:!0,guests:this.guests},"cancel")},this.guests=new Array}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(v.W_),a.\u0275\u0275directiveInject(m.ModalController))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-update-user-email"]],inputs:{guests:"guests"},decls:16,vars:8,consts:[[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-body"],["class","results",4,"ngIf"],[1,"modal-footer"],[1,"button-holder"],[1,"cancel",3,"click"],[3,"ngClass","click"],[4,"ngIf","ngIfElse"],["isNotMissingEmail",""],[1,"results"],[1,"title"],[1,"sub-title"],[3,"ngClass","click",4,"ngFor","ngForOf"],["class","full-name",4,"ngIf"],["class","email",4,"ngIf"],["class","department",4,"ngIf"],[1,"full-name"],[1,"ion-text-capitalize"],[1,"email"],[4,"ngIf"],[1,"department"]],template:function(e,r){if(1&e&&(a.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"ion-row")(5,"ion-col"),a.\u0275\u0275template(6,Fi,8,7,"div",4),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementStart(7,"div",5)(8,"div",6)(9,"button",7),a.\u0275\u0275listener("click",function(){return r.onCancel()}),a.\u0275\u0275text(10),a.\u0275\u0275pipe(11,"translate"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(12,"button",8),a.\u0275\u0275listener("click",function(){return r.onContinue()}),a.\u0275\u0275template(13,Go,3,3,"ng-container",9),a.\u0275\u0275template(14,Xo,2,3,"ng-template",null,10,a.\u0275\u0275templateRefExtractor),a.\u0275\u0275elementEnd()()()()()()),2&e){const i=a.\u0275\u0275reference(15);a.\u0275\u0275property("ngClass","update-user-email"),a.\u0275\u0275advance(6),a.\u0275\u0275property("ngIf",!!r.guests.length),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",a.\u0275\u0275pipeBind1(11,6,"MD_UPDATE_USER_EMAIL_BTN_CANCEL")," "),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngClass","continue "+(r.isMissingEmail()?"missing-email":"")),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",r.isMissingEmail())("ngIfElse",i)}},dependencies:[b.NgClass,b.NgForOf,b.NgIf,m.IonCol,m.IonRow,k.X$],styles:[".update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);padding-top:3em;transition:margin-top 1s ease;background-color:#fff;height:90%;margin:5% 8px;overflow:scroll;border-radius:8px}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{padding-bottom:1em;overflow:scroll;height:100%}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{width:80%;margin:0 10% 2px;font-weight:700!important;font-size:initial!important}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{width:80%;margin:4px 10% 11px;font-size:.9em;background-color:#eee;padding:4px 8px;border-radius:2px}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%]{width:80%;margin:0 10% 4px;border:1px solid #eee;border-radius:4px;padding:8px 12px}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] .email[_ngcontent-%COMP%], .update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] .department[_ngcontent-%COMP%]{font-size:.8em;color:#aaa}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result.email-is-present[_ngcontent-%COMP%]{border-color:#0ec254}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result.missing-email[_ngcontent-%COMP%]{border-color:#f25454}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-direction:column}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:.75em 1em;border-radius:50px;color:#333;font-size:1em;transition:background-color .1s ease-out}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#eee}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%] button.continue[_ngcontent-%COMP%]{background-color:#0ec254;color:#fff;margin-top:8px}.update-user-email[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%] button.continue.missing-email[_ngcontent-%COMP%]{background-color:#f25454}"]}),t})();f(97842);var Ji=f(29946),Wi=f(35929);function Za(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"span",10),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(3);a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate(e.logs.length)}}function fe(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"span",11),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(3);a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate(e.errorCount)}}function lt(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",6),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(i.toggleConsole())}),a.\u0275\u0275element(1,"ion-icon",7),a.\u0275\u0275template(2,Za,2,1,"span",8),a.\u0275\u0275template(3,fe,2,1,"span",9),a.\u0275\u0275elementEnd()}if(2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",e.logs.length>0),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.errorCount>0)}}function P(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",12),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(i.toggleErrorModal())}),a.\u0275\u0275element(1,"ion-icon",13),a.\u0275\u0275elementStart(2,"span",14),a.\u0275\u0275text(3),a.\u0275\u0275elementEnd()()}if(2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate(e.errorCount)}}function Q(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"ion-button",42),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(4);return a.\u0275\u0275resetView(i.toggleErrorModal())}),a.\u0275\u0275element(1,"ion-icon",43),a.\u0275\u0275elementStart(2,"ion-label"),a.\u0275\u0275text(3),a.\u0275\u0275elementEnd()()}if(2&t){const e=a.\u0275\u0275nextContext(4);a.\u0275\u0275advance(3),a.\u0275\u0275textInterpolate2("",e.errorCount," Erro",e.errorCount>1?"s":""," HTTP")}}function Pe(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",25)(1,"div",26)(2,"ion-chip",27),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.toggleFilter("log"))}),a.\u0275\u0275element(3,"ion-icon",21),a.\u0275\u0275elementStart(4,"ion-label"),a.\u0275\u0275text(5,"Log"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(6,"ion-chip",28),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.toggleFilter("info"))}),a.\u0275\u0275element(7,"ion-icon",21),a.\u0275\u0275elementStart(8,"ion-label"),a.\u0275\u0275text(9,"Info"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(10,"ion-chip",29),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.toggleFilter("warn"))}),a.\u0275\u0275element(11,"ion-icon",21),a.\u0275\u0275elementStart(12,"ion-label"),a.\u0275\u0275text(13,"Warn"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(14,"ion-chip",30),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.toggleFilter("error"))}),a.\u0275\u0275element(15,"ion-icon",21),a.\u0275\u0275elementStart(16,"ion-label"),a.\u0275\u0275text(17,"Error"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(18,"ion-chip",31),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.toggleFilter("http"))}),a.\u0275\u0275element(19,"ion-icon",21),a.\u0275\u0275elementStart(20,"ion-label"),a.\u0275\u0275text(21,"HTTP"),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275elementStart(22,"div",32),a.\u0275\u0275template(23,Q,4,2,"ion-button",33),a.\u0275\u0275elementStart(24,"ion-searchbar",34),a.\u0275\u0275listener("ngModelChange",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(s.searchTerm=i)})("ionInput",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.filterLogs())}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(25,"ion-button",35),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.clearLogs())}),a.\u0275\u0275element(26,"ion-icon",36),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(27,"ion-button",37),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.exportLogs())}),a.\u0275\u0275element(28,"ion-icon",38),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(29,"ion-button",39),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(i.toggleDebugConsole())}),a.\u0275\u0275element(30,"ion-icon",40),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(31,"ion-toggle",41),a.\u0275\u0275listener("ngModelChange",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(s.autoScroll=i)}),a.\u0275\u0275text(32," Auto-scroll "),a.\u0275\u0275elementEnd()()()}if(2&t){const e=a.\u0275\u0275nextContext(3);a.\u0275\u0275advance(2),a.\u0275\u0275classProp("filter-active",e.selectedFilters.has("log"))("filter-inactive",!e.selectedFilters.has("log")),a.\u0275\u0275advance(1),a.\u0275\u0275property("name",e.selectedFilters.has("log")?"checkmark-circle":"close-circle"),a.\u0275\u0275advance(3),a.\u0275\u0275classProp("filter-active",e.selectedFilters.has("info"))("filter-inactive",!e.selectedFilters.has("info")),a.\u0275\u0275advance(1),a.\u0275\u0275property("name",e.selectedFilters.has("info")?"checkmark-circle":"close-circle"),a.\u0275\u0275advance(3),a.\u0275\u0275classProp("filter-active",e.selectedFilters.has("warn"))("filter-inactive",!e.selectedFilters.has("warn")),a.\u0275\u0275advance(1),a.\u0275\u0275property("name",e.selectedFilters.has("warn")?"checkmark-circle":"close-circle"),a.\u0275\u0275advance(3),a.\u0275\u0275classProp("filter-active",e.selectedFilters.has("error"))("filter-inactive",!e.selectedFilters.has("error")),a.\u0275\u0275advance(1),a.\u0275\u0275property("name",e.selectedFilters.has("error")?"checkmark-circle":"close-circle"),a.\u0275\u0275advance(3),a.\u0275\u0275classProp("filter-active",e.selectedFilters.has("http"))("filter-inactive",!e.selectedFilters.has("http")),a.\u0275\u0275advance(1),a.\u0275\u0275property("name",e.selectedFilters.has("http")?"checkmark-circle":"close-circle"),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngIf",e.errorCount>0),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngModel",e.searchTerm),a.\u0275\u0275advance(7),a.\u0275\u0275property("ngModel",e.autoScroll)}}function Ve(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"span",61),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate(e.method)}}function Z(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"span",62),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275classProp("error",e.status>=400),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",e.status," ")}}function re(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"span",63),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1("",e.duration,"ms")}}function Xe(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",64)(1,"div",65)(2,"span"),a.\u0275\u0275text(3,"Request/Response Data"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(4,"ion-button",66),a.\u0275\u0275listener("click",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext().$implicit,c=a.\u0275\u0275nextContext(4);return a.\u0275\u0275resetView(c.copyData(s.data,i))}),a.\u0275\u0275element(5,"ion-icon",57),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(6,"pre"),a.\u0275\u0275text(7),a.\u0275\u0275pipe(8,"json"),a.\u0275\u0275elementEnd()()}if(2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(7),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind1(8,1,e.data))}}function it(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",67)(1,"div",68)(2,"span"),a.\u0275\u0275text(3,"Stack Trace"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(4,"ion-button",69),a.\u0275\u0275listener("click",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext().$implicit,c=a.\u0275\u0275nextContext(4);return a.\u0275\u0275resetView(c.copyStack(s.stack,i))}),a.\u0275\u0275element(5,"ion-icon",57),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(6,"pre"),a.\u0275\u0275text(7),a.\u0275\u0275elementEnd()()}if(2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(7),a.\u0275\u0275textInterpolate(e.stack)}}function bt(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",47)(1,"div",48)(2,"div",49),a.\u0275\u0275element(3,"ion-icon",50),a.\u0275\u0275elementStart(4,"span",51),a.\u0275\u0275text(5),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(6,"span",52),a.\u0275\u0275text(7),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(8,Ve,2,1,"span",53),a.\u0275\u0275template(9,Z,2,3,"span",54),a.\u0275\u0275template(10,re,2,1,"span",55),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(11,"ion-button",56),a.\u0275\u0275listener("click",function(i){const c=a.\u0275\u0275restoreView(e).$implicit,l=a.\u0275\u0275nextContext(4);return a.\u0275\u0275resetView(l.copyLog(c,i))}),a.\u0275\u0275element(12,"ion-icon",57),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(13,"div",58),a.\u0275\u0275text(14),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(15,Xe,9,3,"div",59),a.\u0275\u0275template(16,it,8,1,"div",60),a.\u0275\u0275elementEnd()}if(2&t){const e=n.$implicit,r=a.\u0275\u0275nextContext(4);a.\u0275\u0275classMap("debug-console__log--"+e.level),a.\u0275\u0275advance(3),a.\u0275\u0275property("name",r.getLogIcon(e.level))("color",r.getLogColor(e.level)),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(r.formatTime(e.timestamp)),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(e.level.toUpperCase()),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.method),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.status),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.duration),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate(e.message),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.data),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.stack)}}function mt(t,n){1&t&&(a.\u0275\u0275elementStart(0,"div",70),a.\u0275\u0275element(1,"ion-icon",71),a.\u0275\u0275elementStart(2,"p"),a.\u0275\u0275text(3,"Nenhum log encontrado"),a.\u0275\u0275elementEnd()())}function Rt(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",44),a.\u0275\u0275template(1,bt,17,12,"div",45),a.\u0275\u0275template(2,mt,4,0,"div",46),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext(3);a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",e.filteredLogs),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",0===e.filteredLogs.length)}}function Xt(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",15)(1,"div",16)(2,"div",17),a.\u0275\u0275element(3,"ion-icon",7),a.\u0275\u0275elementStart(4,"span"),a.\u0275\u0275text(5,"Debug Console"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(6,"span",18),a.\u0275\u0275text(7),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(8,"div",19)(9,"ion-button",20),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(i.toggleMinimize())}),a.\u0275\u0275element(10,"ion-icon",21),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(11,"ion-button",20),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(i.toggleConsole())}),a.\u0275\u0275element(12,"ion-icon",22),a.\u0275\u0275elementEnd()()(),a.\u0275\u0275template(13,Pe,33,28,"div",23),a.\u0275\u0275template(14,Rt,3,2,"div",24),a.\u0275\u0275elementEnd()}if(2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275classProp("minimized",e.isMinimized),a.\u0275\u0275advance(7),a.\u0275\u0275textInterpolate2("(",e.filteredLogs.length,"/",e.logs.length,")"),a.\u0275\u0275advance(3),a.\u0275\u0275property("name",e.isMinimized?"chevron-up":"chevron-down"),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngIf",!e.isMinimized),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!e.isMinimized)}}function qt(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",92)(1,"div",93),a.\u0275\u0275element(2,"ion-icon",97),a.\u0275\u0275elementStart(3,"span"),a.\u0275\u0275text(4,"Request"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(5,"ion-button",20),a.\u0275\u0275listener("click",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2).$implicit,c=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(c.copyData(s.data.request,i))}),a.\u0275\u0275element(6,"ion-icon",57),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(7,"div",95)(8,"pre"),a.\u0275\u0275text(9),a.\u0275\u0275pipe(10,"json"),a.\u0275\u0275elementEnd()()()}if(2&t){const e=a.\u0275\u0275nextContext(2).$implicit;a.\u0275\u0275advance(9),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind1(10,1,e.data.request))}}function Sn(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",92)(1,"div",93),a.\u0275\u0275element(2,"ion-icon",98),a.\u0275\u0275elementStart(3,"span"),a.\u0275\u0275text(4,"Error Response"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(5,"ion-button",20),a.\u0275\u0275listener("click",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2).$implicit,c=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(c.copyData(s.data.error,i))}),a.\u0275\u0275element(6,"ion-icon",57),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(7,"div",95)(8,"pre"),a.\u0275\u0275text(9),a.\u0275\u0275pipe(10,"json"),a.\u0275\u0275elementEnd()()()}if(2&t){const e=a.\u0275\u0275nextContext(2).$implicit;a.\u0275\u0275advance(9),a.\u0275\u0275textInterpolate(a.\u0275\u0275pipeBind1(10,1,e.data.error))}}function Wn(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",92)(1,"div",93),a.\u0275\u0275element(2,"ion-icon",99),a.\u0275\u0275elementStart(3,"span"),a.\u0275\u0275text(4,"Stack Trace"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(5,"ion-button",20),a.\u0275\u0275listener("click",function(i){a.\u0275\u0275restoreView(e);const s=a.\u0275\u0275nextContext(2).$implicit,c=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(c.copyStack(s.stack,i))}),a.\u0275\u0275element(6,"ion-icon",57),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(7,"div",95)(8,"pre"),a.\u0275\u0275text(9),a.\u0275\u0275elementEnd()()()}if(2&t){const e=a.\u0275\u0275nextContext(2).$implicit;a.\u0275\u0275advance(9),a.\u0275\u0275textInterpolate(e.stack)}}function Un(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",91)(1,"div",92)(2,"div",93),a.\u0275\u0275element(3,"ion-icon",94),a.\u0275\u0275elementStart(4,"span"),a.\u0275\u0275text(5,"Mensagem"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(6,"div",95),a.\u0275\u0275text(7),a.\u0275\u0275elementEnd()(),a.\u0275\u0275template(8,qt,11,3,"div",96),a.\u0275\u0275template(9,Sn,11,3,"div",96),a.\u0275\u0275template(10,Wn,10,1,"div",96),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext().$implicit;a.\u0275\u0275advance(7),a.\u0275\u0275textInterpolate1(" ",e.message," "),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",null==e.data?null:e.data.request),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",null==e.data?null:e.data.error),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.stack)}}function sr(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",82)(1,"div",83),a.\u0275\u0275listener("click",function(){const s=a.\u0275\u0275restoreView(e).$implicit,c=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(c.toggleErrorCard(s))}),a.\u0275\u0275elementStart(2,"div",84),a.\u0275\u0275element(3,"ion-icon",21),a.\u0275\u0275elementStart(4,"span",85),a.\u0275\u0275text(5),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(6,"span",86),a.\u0275\u0275text(7),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(8,"span",87),a.\u0275\u0275text(9),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(10,"ion-button",88),a.\u0275\u0275listener("click",function(i){const c=a.\u0275\u0275restoreView(e).$implicit,l=a.\u0275\u0275nextContext(3);return a.\u0275\u0275resetView(l.copyLog(c,i))}),a.\u0275\u0275element(11,"ion-icon",57),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(12,"div",89),a.\u0275\u0275text(13),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(14,Un,11,4,"div",90),a.\u0275\u0275elementEnd()}if(2&t){const e=n.$implicit,r=a.\u0275\u0275nextContext(3);a.\u0275\u0275classMap(r.getErrorStatusClass(null==e?null:e.status)),a.\u0275\u0275advance(3),a.\u0275\u0275property("name",e.expanded?"chevron-down":"chevron-forward"),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(e.status),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(e.method),a.\u0275\u0275advance(2),a.\u0275\u0275textInterpolate(r.formatTime(e.timestamp)),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(" ",e.url," "),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.expanded)}}function hr(t,n){1&t&&(a.\u0275\u0275elementStart(0,"div",100),a.\u0275\u0275element(1,"ion-icon",101),a.\u0275\u0275elementStart(2,"p"),a.\u0275\u0275text(3,"Nenhum erro HTTP registrado"),a.\u0275\u0275elementEnd()())}function Ar(t,n){if(1&t){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",72)(1,"div",73),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(i.toggleErrorModal())}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(2,"div",74)(3,"div",75)(4,"div",76),a.\u0275\u0275element(5,"ion-icon",77),a.\u0275\u0275elementStart(6,"span"),a.\u0275\u0275text(7,"Erros HTTP"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(8,"span",78),a.\u0275\u0275text(9),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(10,"ion-button",20),a.\u0275\u0275listener("click",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(i.toggleErrorModal())}),a.\u0275\u0275element(11,"ion-icon",22),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(12,"div",79),a.\u0275\u0275template(13,sr,15,8,"div",80),a.\u0275\u0275template(14,hr,4,0,"div",81),a.\u0275\u0275elementEnd()()()}if(2&t){const e=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(9),a.\u0275\u0275textInterpolate2("",e.errorCount," erro",e.errorCount>1?"s":"",""),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngForOf",e.httpErrors),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",0===e.httpErrors.length)}}function eo(t,n){if(1&t&&(a.\u0275\u0275elementStart(0,"div",1),a.\u0275\u0275template(1,lt,4,2,"div",2),a.\u0275\u0275template(2,P,4,1,"div",3),a.\u0275\u0275template(3,Xt,15,7,"div",4),a.\u0275\u0275template(4,Ar,15,4,"div",5),a.\u0275\u0275elementEnd()),2&t){const e=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!e.isOpen),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!e.isOpen&&e.errorCount>0),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.isOpen),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",e.isErrorModalOpen)}}let fo=(()=>{class t{constructor(e,r){this.debugConsole=e,this.environmentSwitcher=r,this.isOpen=!1,this.isMinimized=!1,this.logs=[],this.filteredLogs=[],this.selectedFilters=new Set(["log","info","warn","error","http"]),this.searchTerm="",this.autoScroll=!0,this.isVisible=!1,this.isDebugEnabled=!0,this.isErrorModalOpen=!1,this.httpErrors=[],this.errorCount=0,this.DEBUG_ENABLED_KEY="ka_debug_console_enabled"}ngOnInit(){if(this.checkEnvironmentAndVisibility(),this.environmentSubscription=this.environmentSwitcher.environment$.subscribe(r=>{r&&(console.log("[DebugConsole] Ambiente mudou para:",r.type),setTimeout(()=>{this.checkEnvironmentAndVisibility()},2))}),!this.isVisible)return;const e=localStorage.getItem(this.DEBUG_ENABLED_KEY);this.isDebugEnabled="false"!==e,this.subscription=this.debugConsole.logs$.subscribe(r=>{this.logs=r,this.filterLogs(),this.updateHttpErrors(),this.autoScroll&&setTimeout(()=>this.scrollToBottom(),100)})}checkEnvironmentAndVisibility(){"prod"===this.environmentSwitcher.getCurrentEnvironment().type?(this.isVisible=!1,this.isDebugEnabled=!1,this.isOpen=!1,localStorage.setItem(this.DEBUG_ENABLED_KEY,"false"),console.log("[DebugConsole] Bloqueado em produ\xe7\xe3o")):this.isVisible=!0}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe(),this.environmentSubscription&&this.environmentSubscription.unsubscribe()}toggleConsole(){this.isOpen=!this.isOpen,this.isOpen&&(this.isMinimized=!1)}toggleMinimize(){this.isMinimized=!this.isMinimized}toggleDebugConsole(){this.isDebugEnabled=!this.isDebugEnabled,localStorage.setItem(this.DEBUG_ENABLED_KEY,String(this.isDebugEnabled)),this.isDebugEnabled||(this.isOpen=!1)}toggleFilter(e){this.selectedFilters.has(e)?this.selectedFilters.delete(e):this.selectedFilters.add(e),this.filterLogs()}clearLogs(){this.debugConsole.clearLogs(),this.httpErrors=[],this.errorCount=0}toggleErrorModal(){this.isErrorModalOpen=!this.isErrorModalOpen}toggleErrorCard(e){e.expanded=!e.expanded}getErrorStatusClass(e){return e>=500?"error-5xx":e>=400?"error-4xx":"error-other"}updateHttpErrors(){this.httpErrors=this.logs.filter(e=>"http"===e.level&&e.status&&e.status>=400),this.errorCount=this.httpErrors.length}exportLogs(){const e=this.debugConsole.exportLogs(),r=new Blob([e],{type:"application/json"}),i=window.URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=`debug-logs-${(new Date).toISOString()}.json`,s.click(),window.URL.revokeObjectURL(i)}copyLog(e,r){r&&r.stopPropagation();const i=JSON.stringify(e,null,2);this.copyToClipboard(i,"Log copiado!")}copyData(e,r){r.stopPropagation();const i=JSON.stringify(e,null,2);this.copyToClipboard(i,"Dados copiados!")}copyStack(e,r){r.stopPropagation(),this.copyToClipboard(e,"Stack trace copiado!")}copyToClipboard(e,r){navigator.clipboard.writeText(e).then(()=>{this.showCopyFeedback(r)},i=>{console.error("Erro ao copiar:",i),this.showCopyFeedback("Erro ao copiar!")})}showCopyFeedback(e){const r=document.createElement("div");r.className="debug-console__copy-feedback",r.textContent=e,document.body.appendChild(r),setTimeout(()=>{r.remove()},2e3)}filterLogs(){this.filteredLogs=this.logs.filter(e=>{const r=this.selectedFilters.has(e.level),i=!this.searchTerm||e.message.toLowerCase().includes(this.searchTerm.toLowerCase())||e.url&&e.url.toLowerCase().includes(this.searchTerm.toLowerCase());return r&&i})}getLogIcon(e){switch(e){case"log":return"terminal";case"info":return"information-circle";case"warn":return"warning";case"error":return"close-circle";case"http":return"globe";default:return"document"}}getLogColor(e){switch(e){case"log":default:return"medium";case"info":return"primary";case"warn":return"warning";case"error":return"danger";case"http":return"success"}}formatTime(e){return new Date(e).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}scrollToBottom(){const e=document.querySelector(".debug-console__logs");e&&(e.scrollTop=e.scrollHeight)}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(Ji.N),a.\u0275\u0275directiveInject(Wi.V))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-debug-console"]],decls:1,vars:1,consts:[["class","debug-console",4,"ngIf"],[1,"debug-console"],["class","debug-console__fab",3,"click",4,"ngIf"],["class","debug-console__error-fab",3,"click",4,"ngIf"],["class","debug-console__panel",3,"minimized",4,"ngIf"],["class","debug-console__error-modal",4,"ngIf"],[1,"debug-console__fab",3,"click"],["name","bug"],["class","debug-console__fab-badge",4,"ngIf"],["class","debug-console__fab-error-badge",4,"ngIf"],[1,"debug-console__fab-badge"],[1,"debug-console__fab-error-badge"],[1,"debug-console__error-fab",3,"click"],["name","alert-circle"],[1,"debug-console__error-fab-badge"],[1,"debug-console__panel"],[1,"debug-console__header"],[1,"debug-console__header-left"],[1,"debug-console__count"],[1,"debug-console__header-right"],["fill","clear","size","small",3,"click"],[3,"name"],["name","close"],["class","debug-console__toolbar",4,"ngIf"],["class","debug-console__logs",4,"ngIf"],[1,"debug-console__toolbar"],[1,"debug-console__filters"],["color","medium",3,"click"],["color","primary",3,"click"],["color","warning",3,"click"],["color","danger",3,"click"],["color","success",3,"click"],[1,"debug-console__actions"],["fill","solid","size","small","color","danger","title","Ver resumo de erros HTTP",3,"click",4,"ngIf"],["placeholder","Buscar...","debounce","300",3,"ngModel","ngModelChange","ionInput"],["fill","clear","size","small","title","Limpar logs",3,"click"],["name","trash"],["fill","clear","size","small","title","Exportar logs",3,"click"],["name","download"],["fill","clear","size","small","title","Ocultar debug console","color","danger",3,"click"],["name","eye-off"],["labelPlacement","start",3,"ngModel","ngModelChange"],["fill","solid","size","small","color","danger","title","Ver resumo de erros HTTP",3,"click"],["name","alert-circle","slot","start"],[1,"debug-console__logs"],["class","debug-console__log",3,"class",4,"ngFor","ngForOf"],["class","debug-console__empty",4,"ngIf"],[1,"debug-console__log"],[1,"debug-console__log-header"],[1,"debug-console__log-header-left"],[3,"name","color"],[1,"debug-console__log-time"],[1,"debug-console__log-level"],["class","debug-console__log-method",4,"ngIf"],["class","debug-console__log-status",3,"error",4,"ngIf"],["class","debug-console__log-duration",4,"ngIf"],["fill","clear","size","small","title","Copiar log",1,"debug-console__log-copy",3,"click"],["name","copy-outline"],[1,"debug-console__log-message"],["class","debug-console__log-data",4,"ngIf"],["class","debug-console__log-stack",4,"ngIf"],[1,"debug-console__log-method"],[1,"debug-console__log-status"],[1,"debug-console__log-duration"],[1,"debug-console__log-data"],[1,"debug-console__log-data-header"],["fill","clear","size","small","title","Copiar dados",3,"click"],[1,"debug-console__log-stack"],[1,"debug-console__log-stack-header"],["fill","clear","size","small","title","Copiar stack trace",3,"click"],[1,"debug-console__empty"],["name","document-text-outline"],[1,"debug-console__error-modal"],[1,"debug-console__error-modal-overlay",3,"click"],[1,"debug-console__error-modal-content"],[1,"debug-console__error-modal-header"],[1,"debug-console__error-modal-header-left"],["name","alert-circle","color","danger"],[1,"debug-console__error-modal-count"],[1,"debug-console__error-modal-body"],["class","debug-console__error-card",3,"class",4,"ngFor","ngForOf"],["class","debug-console__error-modal-empty",4,"ngIf"],[1,"debug-console__error-card"],[1,"debug-console__error-card-header",3,"click"],[1,"debug-console__error-card-header-left"],[1,"debug-console__error-card-status"],[1,"debug-console__error-card-method"],[1,"debug-console__error-card-time"],["fill","clear","size","small","title","Copiar erro",3,"click"],[1,"debug-console__error-card-url"],["class","debug-console__error-card-details",4,"ngIf"],[1,"debug-console__error-card-details"],[1,"debug-console__error-card-section"],[1,"debug-console__error-card-section-title"],["name","information-circle"],[1,"debug-console__error-card-section-content"],["class","debug-console__error-card-section",4,"ngIf"],["name","arrow-up-circle"],["name","close-circle"],["name","list"],[1,"debug-console__error-modal-empty"],["name","checkmark-circle-outline"]],template:function(e,r){1&e&&a.\u0275\u0275template(0,eo,5,4,"div",0),2&e&&a.\u0275\u0275property("ngIf",r.isVisible&&r.isDebugEnabled)},dependencies:[b.NgForOf,b.NgIf,m.IonButton,m.IonChip,m.IonIcon,m.IonLabel,m.IonSearchbar,m.IonToggle,m.BooleanValueAccessor,m.TextValueAccessor,L.NgControlStatus,L.NgModel,b.JsonPipe],styles:[".debug-console[_ngcontent-%COMP%]{position:fixed;z-index:99999}.debug-console__fab[_ngcontent-%COMP%]{position:fixed;bottom:80px;right:16px;width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.3);cursor:pointer;transition:all .3s ease}.debug-console__fab[_ngcontent-%COMP%]:hover{transform:scale(1.1);box-shadow:0 6px 16px rgba(0,0,0,.4)}.debug-console__fab[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:28px}.debug-console__fab-badge[_ngcontent-%COMP%]{position:absolute;top:-4px;right:-4px;background:#f44336;color:#fff;border-radius:12px;padding:2px 6px;font-size:10px;font-weight:700;min-width:20px;text-align:center}.debug-console__fab-error-badge[_ngcontent-%COMP%]{position:absolute;bottom:-4px;right:-4px;background:#ff5722;color:#fff;border-radius:12px;padding:2px 6px;font-size:10px;font-weight:700;min-width:20px;text-align:center;animation:pulse 2s infinite}.debug-console__error-fab[_ngcontent-%COMP%]{position:fixed;bottom:80px;right:80px;width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#f44336 0%,#d32f2f 100%);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(244,67,54,.5);cursor:pointer;transition:all .3s ease;animation:pulse 2s infinite}.debug-console__error-fab[_ngcontent-%COMP%]:hover{transform:scale(1.1);box-shadow:0 6px 16px rgba(244,67,54,.7)}.debug-console__error-fab[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:28px}.debug-console__error-fab-badge[_ngcontent-%COMP%]{position:absolute;top:-4px;right:-4px;background:#fff;color:#f44336;border-radius:12px;padding:2px 6px;font-size:10px;font-weight:700;min-width:20px;text-align:center}.debug-console__panel[_ngcontent-%COMP%]{position:fixed;bottom:16px;right:16px;width:90vw;max-width:800px;height:70vh;background:#1e1e1e;border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.5);display:flex;flex-direction:column;overflow:hidden;animation:slideUp .3s ease}.debug-console__panel.minimized[_ngcontent-%COMP%]{height:auto}@media (max-width: 768px){.debug-console__panel[_ngcontent-%COMP%]{width:95vw;height:60vh;bottom:8px;right:8px}}.debug-console__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#2d2d2d;border-bottom:1px solid #3d3d3d}.debug-console__header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#fff;font-weight:600}.debug-console__header-left[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px;color:#667eea}.debug-console__header-right[_ngcontent-%COMP%]{display:flex;gap:4px}.debug-console__header-right[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--color: #fff}.debug-console__count[_ngcontent-%COMP%]{font-size:12px;color:#999;font-weight:400}.debug-console__toolbar[_ngcontent-%COMP%]{padding:12px 16px;background:#252525;border-bottom:1px solid #3d3d3d;display:flex;flex-direction:column;gap:12px}.debug-console__filters[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap}.debug-console__filters[_ngcontent-%COMP%] ion-chip[_ngcontent-%COMP%]{cursor:pointer;transition:all .2s ease;font-weight:600;border:2px solid transparent}.debug-console__filters[_ngcontent-%COMP%] ion-chip[_ngcontent-%COMP%]:hover{transform:scale(1.05)}.debug-console__filters[_ngcontent-%COMP%] ion-chip.filter-active[_ngcontent-%COMP%]{opacity:1;border-color:currentColor}.debug-console__filters[_ngcontent-%COMP%] ion-chip.filter-active[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:inherit}.debug-console__filters[_ngcontent-%COMP%] ion-chip.filter-inactive[_ngcontent-%COMP%]{opacity:.4;background:#3d3d3d!important;color:#999!important;border-color:#555}.debug-console__filters[_ngcontent-%COMP%] ion-chip.filter-inactive[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:#999!important}.debug-console__filters[_ngcontent-%COMP%] ion-chip.filter-inactive[_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%]{color:#999!important}.debug-console__filters[_ngcontent-%COMP%] ion-chip.filter-inactive[_ngcontent-%COMP%]:hover{opacity:.6}.debug-console__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.debug-console__actions[_ngcontent-%COMP%] ion-searchbar[_ngcontent-%COMP%]{flex:1;--background: #1e1e1e;--color: #fff;--placeholder-color: #999;--icon-color: #999}.debug-console__actions[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--color: #fff}.debug-console__actions[_ngcontent-%COMP%] ion-toggle[_ngcontent-%COMP%]{--background: #3d3d3d;--background-checked: #667eea;color:#fff;font-size:12px}.debug-console__logs[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:8px;background:#1e1e1e}.debug-console__logs[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.debug-console__logs[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#2d2d2d}.debug-console__logs[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#667eea;border-radius:4px}.debug-console__log[_ngcontent-%COMP%]{padding:12px;margin-bottom:8px;background:#252525;border-radius:8px;border-left:4px solid #667eea;cursor:pointer;transition:all .2s ease}.debug-console__log[_ngcontent-%COMP%]:hover{background:#2d2d2d;transform:translate(4px)}.debug-console__log--log[_ngcontent-%COMP%]{border-left-color:#9e9e9e}.debug-console__log--info[_ngcontent-%COMP%]{border-left-color:#2196f3}.debug-console__log--warn[_ngcontent-%COMP%]{border-left-color:#ff9800}.debug-console__log--error[_ngcontent-%COMP%]{border-left-color:#f44336}.debug-console__log--http[_ngcontent-%COMP%]{border-left-color:#4caf50}.debug-console__log-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.debug-console__log-header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:1}.debug-console__log-header[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:16px}.debug-console__log-copy[_ngcontent-%COMP%]{--color: #999;--padding-start: 8px;--padding-end: 8px;min-width:auto;height:28px;transition:all .2s ease}.debug-console__log-copy[_ngcontent-%COMP%]:hover{--color: #fff}.debug-console__log-copy[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:16px}.debug-console__log-time[_ngcontent-%COMP%]{font-size:11px;color:#999;font-family:Courier New,monospace}.debug-console__log-level[_ngcontent-%COMP%]{font-size:10px;font-weight:700;padding:2px 6px;border-radius:4px;background:#3d3d3d;color:#fff}.debug-console__log-method[_ngcontent-%COMP%]{font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px;background:#667eea;color:#fff}.debug-console__log-status[_ngcontent-%COMP%]{font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px;background:#4caf50;color:#fff}.debug-console__log-status.error[_ngcontent-%COMP%]{background:#f44336}.debug-console__log-duration[_ngcontent-%COMP%]{font-size:11px;color:#999}.debug-console__log-message[_ngcontent-%COMP%]{color:#fff;font-size:13px;line-height:1.5;word-break:break-word;font-family:Courier New,monospace}.debug-console__log-data[_ngcontent-%COMP%], .debug-console__log-stack[_ngcontent-%COMP%]{margin-top:8px;padding:8px;background:#1e1e1e;border-radius:4px;overflow-x:auto}.debug-console__log-data-header[_ngcontent-%COMP%], .debug-console__log-stack-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #3d3d3d}.debug-console__log-data-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .debug-console__log-stack-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:#999;text-transform:uppercase}.debug-console__log-data-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%], .debug-console__log-stack-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--color: #999;--padding-start: 4px;--padding-end: 4px;min-width:auto;height:24px}.debug-console__log-data-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:hover, .debug-console__log-stack-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:hover{--color: #fff}.debug-console__log-data-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%], .debug-console__log-stack-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:14px}.debug-console__log-data[_ngcontent-%COMP%] pre[_ngcontent-%COMP%], .debug-console__log-stack[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;color:#a9b7c6;font-size:11px;line-height:1.4;font-family:Courier New,monospace}.debug-console__log-stack[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{color:#f44336}.debug-console__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#666}.debug-console__empty[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:64px;margin-bottom:16px}.debug-console__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14px}.debug-console__copy-feedback[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(102,126,234,.95);color:#fff;padding:16px 24px;border-radius:8px;font-size:14px;font-weight:600;box-shadow:0 4px 16px rgba(0,0,0,.3);z-index:999999;animation:copyFeedback 2s ease;pointer-events:none}.debug-console__error-modal[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:100000;display:flex;align-items:center;justify-content:center;animation:fadeIn .3s ease}.debug-console__error-modal-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.debug-console__error-modal-content[_ngcontent-%COMP%]{position:relative;width:90vw;max-width:900px;height:80vh;background:#1e1e1e;border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.5);display:flex;flex-direction:column;overflow:hidden;animation:slideUp .3s ease}@media (max-width: 768px){.debug-console__error-modal-content[_ngcontent-%COMP%]{width:95vw;height:85vh}}.debug-console__error-modal-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;background:#2d2d2d;border-bottom:2px solid #f44336}.debug-console__error-modal-header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;color:#fff;font-weight:600;font-size:18px}.debug-console__error-modal-header-left[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:24px}.debug-console__error-modal-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--color: #fff}.debug-console__error-modal-count[_ngcontent-%COMP%]{font-size:14px;color:#f44336;font-weight:700;background:rgba(244,67,54,.2);padding:4px 12px;border-radius:12px}.debug-console__error-modal-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:16px;background:#1e1e1e}.debug-console__error-modal-body[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.debug-console__error-modal-body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#2d2d2d}.debug-console__error-modal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#f44336;border-radius:4px}.debug-console__error-modal-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#666}.debug-console__error-modal-empty[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:64px;margin-bottom:16px;color:#4caf50}.debug-console__error-modal-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px}.debug-console__error-card[_ngcontent-%COMP%]{background:#252525;border-radius:8px;margin-bottom:12px;overflow:hidden;border-left:4px solid #f44336;transition:all .2s ease}.debug-console__error-card[_ngcontent-%COMP%]:hover{background:#2d2d2d;transform:translate(4px)}.debug-console__error-card.error-5xx[_ngcontent-%COMP%]{border-left-color:#d32f2f}.debug-console__error-card.error-4xx[_ngcontent-%COMP%]{border-left-color:#ff9800}.debug-console__error-card.error-other[_ngcontent-%COMP%]{border-left-color:#9e9e9e}.debug-console__error-card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;cursor:pointer;transition:background .2s ease}.debug-console__error-card-header[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.05)}.debug-console__error-card-header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex:1}.debug-console__error-card-header-left[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px;color:#999;transition:transform .2s ease}.debug-console__error-card-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--color: #999;--padding-start: 8px;--padding-end: 8px}.debug-console__error-card-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:hover{--color: #fff}.debug-console__error-card-status[_ngcontent-%COMP%]{font-size:14px;font-weight:700;padding:4px 12px;border-radius:6px;background:#f44336;color:#fff}.debug-console__error-card-method[_ngcontent-%COMP%]{font-size:12px;font-weight:700;padding:4px 10px;border-radius:6px;background:#667eea;color:#fff}.debug-console__error-card-time[_ngcontent-%COMP%]{font-size:11px;color:#999;font-family:Courier New,monospace}.debug-console__error-card-url[_ngcontent-%COMP%]{padding:8px 16px 12px 52px;color:#a9b7c6;font-size:12px;font-family:Courier New,monospace;word-break:break-all}.debug-console__error-card-details[_ngcontent-%COMP%]{padding:0 16px 16px;border-top:1px solid #3d3d3d;animation:expandDown .3s ease}.debug-console__error-card-section[_ngcontent-%COMP%]{margin-top:16px}.debug-console__error-card-section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid #3d3d3d}.debug-console__error-card-section-title[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:16px;color:#667eea}.debug-console__error-card-section-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;font-weight:700;color:#999;text-transform:uppercase;flex:1}.debug-console__error-card-section-title[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--color: #999;--padding-start: 4px;--padding-end: 4px;min-width:auto;height:24px}.debug-console__error-card-section-title[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:hover{--color: #fff}.debug-console__error-card-section-title[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:14px}.debug-console__error-card-section-content[_ngcontent-%COMP%]{padding:12px;background:#1e1e1e;border-radius:6px;overflow-x:auto;max-height:300px;overflow-y:auto}.debug-console__error-card-section-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px;height:6px}.debug-console__error-card-section-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#2d2d2d}.debug-console__error-card-section-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#667eea;border-radius:3px}.debug-console__error-card-section-content[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;color:#a9b7c6;font-size:11px;line-height:1.5;font-family:Courier New,monospace}@keyframes copyFeedback{0%{opacity:0;transform:translate(-50%,-50%) scale(.8)}10%{opacity:1;transform:translate(-50%,-50%) scale(1)}90%{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-50%) scale(.8)}}@keyframes slideUp{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes pulse{0%,to{box-shadow:0 4px 12px rgba(244,67,54,.5)}50%{box-shadow:0 4px 20px rgba(244,67,54,.8)}}@keyframes expandDown{0%{opacity:0;max-height:0}to{opacity:1;max-height:2000px}}"],changeDetection:0}),t})();var ko=f(7415);let y=(()=>{class t{constructor(e){this.cdr=e,this.stepMs=700,this.size=120,this.strokeWidth=10,this.one=new a.EventEmitter,this.done=new a.EventEmitter,this.count=3,this.dashOffset=0,this.rafId=null,this.startTime=null,this.doneFired=!1}get radius(){return(this.size-this.strokeWidth)/2}get circumference(){return 2*Math.PI*this.radius}get fontSize(){return Math.round(.5*this.size)}ngOnInit(){this.startTime=Date.now(),this.tick()}tick(){const e=3*this.stepMs,r=Date.now()-this.startTime,i=Math.min(r/e,1);this.dashOffset=-i*this.circumference,this.count=Math.max(3-Math.floor(r/this.stepMs),1),this.cdr.markForCheck(),rthis.tick()):this.doneFired||(this.doneFired=!0,this.one.emit(),this.done.emit())}ngOnDestroy(){null!==this.rafId&&cancelAnimationFrame(this.rafId)}}return t.\u0275fac=function(e){return new(e||t)(a.\u0275\u0275directiveInject(a.ChangeDetectorRef))},t.\u0275cmp=a.\u0275\u0275defineComponent({type:t,selectors:[["app-countdown-circle"]],inputs:{stepMs:"stepMs",size:"size",strokeWidth:"strokeWidth"},outputs:{one:"one",done:"done"},decls:5,vars:15,consts:[[1,"countdown-circle"],["stroke","#fff","fill","none"],[1,"countdown-number"]],template:function(e,r){1&e&&(a.\u0275\u0275elementStart(0,"div",0),a.\u0275\u0275namespaceSVG(),a.\u0275\u0275elementStart(1,"svg"),a.\u0275\u0275element(2,"circle",1),a.\u0275\u0275elementEnd(),a.\u0275\u0275namespaceHTML(),a.\u0275\u0275elementStart(3,"span",2),a.\u0275\u0275text(4),a.\u0275\u0275elementEnd()()),2&e&&(a.\u0275\u0275styleProp("width",r.size,"px")("height",r.size,"px"),a.\u0275\u0275advance(1),a.\u0275\u0275attribute("width",r.size)("height",r.size),a.\u0275\u0275advance(1),a.\u0275\u0275attribute("cx",r.size/2)("cy",r.size/2)("r",r.radius)("stroke-width",r.strokeWidth)("stroke-dasharray",r.circumference)("stroke-dashoffset",r.dashOffset),a.\u0275\u0275advance(1),a.\u0275\u0275styleProp("font-size",r.fontSize,"px"),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate(r.count))},styles:[".countdown-circle[_ngcontent-%COMP%]{display:grid;place-items:center;opacity:.7}.countdown-circle[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{grid-area:1/1}.countdown-circle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:block}.countdown-circle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{transform:rotate(-90deg);transform-origin:50% 50%}.countdown-circle[_ngcontent-%COMP%] .countdown-number[_ngcontent-%COMP%]{font-weight:700;color:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1}"],changeDetection:0}),t})();var G=f(8162),Je=function(t,n){return(Je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])})(t,n)};function dt(t,n){function e(){this.constructor=t}Je(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}function st(t,n,e,r){return new(e||(e=Promise))(function(i,s){function c(d){try{u(r.next(d))}catch(p){s(p)}}function l(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?i(d.value):new e(function(p){p(d.value)}).then(c,l)}u((r=r.apply(t,n||[])).next())})}function Ln(t,n){var e,r,i,s,c={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(d){return function(p){if(e)throw new TypeError("Generator is already executing.");for(;c;)try{if(e=1,r&&(i=2&p[0]?r.return:p[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,p[1])).done)return i;switch(r=0,i&&(p=[2&p[0],i.value]),p[0]){case 0:case 1:i=p;break;case 4:return c.label++,{value:p[1],done:!1};case 5:c.label++,r=p[1],p=[0];continue;case 7:p=c.ops.pop(),c.trys.pop();continue;default:if(!(i=(i=c.trys).length>0&&i[i.length-1])&&(6===p[0]||2===p[0])){c=0;continue}if(3===p[0]&&(!i||p[1]>i[0]&&p[1]0;)r=Math.random()*n|0,e=t[--n],t[n]=t[r],t[r]=e}function oo(t,n,e){return Math.max(t,Math.min(n,e))}function As(t){return t%2==0?t:t+1}function bs(t){for(var n=0,e=0;e=e?i():setTimeout(c,l)}};c()})}function n1(t,n){for(var e=1,r=-1,i=0;i=0)e*=t[i];else if(-1===t[i]){if(-1!==r)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+i);r=i}else if(t[i]<0)throw Error("Shapes can not be < 0. Found "+t[i]+" at dim "+i);if(-1===r){if(n>0&&n!==e)throw Error("Size("+n+") must match the product of shape "+t);return t}if(0===e)throw Error("Cannot infer the missing size in ["+t+"] when there are 0 elements");if(n%e!=0)throw Error("The implicit shape can't be a fractional number. Got "+n+" / "+e);var s=t.slice();return s[r]=n/e,s}function Ti(t,n){var e=n.length;return at((t=null==t?n.map(function(r,i){return i}):[].concat(t)).every(function(r){return r>=-e&&rl)&&1===t[l]&&(e.push(t[l]),r.push(l)),s[c]<=l&&c++}1!==t[l]&&(e.push(t[l]),r.push(l))}return{newShape:e,keptDims:r}}function Ba(t,n){var e=null;if(null==t||"float32"===t)e=new Float32Array(n);else if("int32"===t)e=new Int32Array(n);else{if("bool"!==t)throw new Error("Unknown data type "+t);e=new Uint8Array(n)}return e}function Ea(t,n){var e=null;if(null==t||"float32"===t)e=new Float32Array(n);else if("int32"===t)e=new Int32Array(n);else if("bool"===t)e=new Uint8Array(n);else{if("string"!==t)throw new Error("Unknown data type "+t);e=new Array(n)}return e}function Ns(t,n){for(var e=0;e=0;--r)e[r]=e[r+1]*t[r+1];return e}function ei(t,n,e){if("string"===n)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(t)&&(t=Ja(t)),e&&Ns(t,n),c=n,(s=t)instanceof Float32Array&&"float32"===c||s instanceof Int32Array&&"int32"===c||s instanceof Uint8Array&&"bool"===c)return t;var s,c;if(null==n||"float32"===n||"complex64"===n)return new Float32Array(t);if("int32"===n)return new Int32Array(t);if("bool"===n){for(var r=new Uint8Array(t.length),i=0;i=0,function(){return"Tensor must have a shape comprised of positive integers but got shape ["+t+"]."})})}function So(t,n){return void 0===n&&(n="utf-8"),n=n||"utf-8",X().platform.encode(t,n)}function o1(t,n){return void 0===n&&(n="utf-8"),n=n||"utf-8",X().platform.decode(t,n)}function rc(t,n,e){if(0===n)return 0;if(1===n)return t[0];for(var r=t[t.length-1],i=0;i0?U:"")+" "}console.log("%c"+u+"\t%c"+l+"\t%c"+d+"D "+M+"\t%c"+p+"\t%c"+x+"\t%c"+c,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")},t}();function pc(t,n,e){return us(Array.isArray(t)?parseFloat(t[0].toFixed(7))+" + "+parseFloat(t[1].toFixed(7))+"j":Bi(t)?"'"+t+"'":"bool"===e?C1(t):parseFloat(t.toFixed(7)).toString(),n)}function C1(t){return 0===t?"false":"true"}function oc(t){for(var n=[],e=0;e=this.shape[r]){var l="Requested out of range element at "+n+". Buffer shape="+this.shape;throw new Error(l)}r++}for(var u=n[n.length-1],d=0;d1)for(var Ie=0;Ie20){var Oe=Array.from(p.slice(0,3*ne)),Fe=Array.from(p.slice((ue-3)*ne,ue*ne));return"complex64"===x&&(Oe=oc(Oe),Fe=oc(Fe)),["["+Oe.map(function(_n,Dn){return pc(_n,U[Dn],x)}).join(", ")+", ..., "+Fe.map(function(_n,Dn){return pc(_n,U[ue-3+Dn],x)}).join(", ")+"]"]}return["["+("complex64"===x?oc(p):Array.from(p)).map(function(_n,Dn){return pc(_n,U[Dn],x)}).join(", ")+"]"]}var et=M.slice(1),Ct=R.slice(1),yt=R[0]*ne,pt=[];if(ue>20){for(var gt=0;gt<3;gt++){var Bt=(Ft=gt*yt)+yt;pt.push.apply(pt,d(p.slice(Ft,Bt),et,x,Ct,U,!1))}for(pt.push("..."),gt=ue-3;gt0)throw new Error("Backend '"+this.backendName+"' has an internal memory leak ("+l+" data ids) after running '"+n+"'")},t.prototype.runKernelFunc=function(n,e,r,i,s,c,l){var u,d=this;void 0===c&&(c=[]),void 0===l&&(l=[]);var p=[],M=this.isTapeOn();null==i&&(i=null!=this.state.activeScope?this.state.activeScope.name:"");var x,R=function(Ie){M&&(p=Ie.map(function(Ae){return d.keep(d.clone(Ae))}))},U=this.state.numBytes,J=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);var ne,ue=ve(i,this.backendName);return x=null!=ue?function(){var Ie=d.backend.numDataIds();ne=ue.kernelFunc({inputs:e,attrs:s,backend:d.backend});var Ae=Array.isArray(ne)?ne:[ne];d.shouldCheckForMemLeaks()&&d.checkKernelForMemLeak(i,Ie,Ae);var Oe=Ae.map(function(et){return d.makeTensorFromDataId(et.dataId,et.shape,et.dtype)}),Fe=Oe.filter(function(et,Ct){return l[Ct]});return R((c||[]).slice().concat(Fe)),Oe}:function(){var Ie=d.backend.numDataIds();ne=d.tidy(function(){return n(d.backend,R)});var Ae=Array.isArray(ne)?ne:[ne];return d.shouldCheckForMemLeaks()&&d.checkKernelForMemLeak(i,Ie,Ae),Ae},this.scopedRun(function(){return d.state.kernelDepth++},function(){return d.state.kernelDepth--},function(){u=d.ENV.getBool("DEBUG")?d.profiler.profileKernel(i,e,function(){return x()}):x()}),M&&this.addTapeNode(i,e,u,r,p),this.state.profiling&&this.state.activeProfile.kernels.push({name:i,bytesAdded:this.state.numBytes-U,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-J,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(e).map(function(Ie){return e[Ie].shape}),outputShapes:u.map(function(Ie){return Ie.shape})}),Array.isArray(ne)?u:u[0]},t.prototype.makeTensor=function(n,e,r,i){if(null==n)throw new Error("Values passed to engine.makeTensor() are null");i=i||this.backend;var s=n;"string"===(r=r||"float32")&&Bi(n[0])&&(s=n.map(function(p){return So(p)}));var c=i.write(s,e,r),l=new Ao(e,r,c,this.nextTensorId());if(this.incRef(l,i),"string"===r){var u=this.state.tensorInfo.get(c),d=r1(s);this.state.numBytes+=d-u.bytes,u.bytes=d}return l},t.prototype.makeTensorFromDataId=function(n,e,r,i){var s=new Ao(e,r=r||"float32",n,this.nextTensorId());return this.incRef(s,i),s},t.prototype.makeVariable=function(n,e,r,i){void 0===e&&(e=!0),r=r||this.nextVariableId().toString(),null!=i&&i!==n.dtype&&(n=n.asType(i));var s=new ac(n,e,r,this.nextTensorId());if(null!=this.state.registeredVariables[s.name])throw new Error("Variable with name "+s.name+" was already registered");return this.state.registeredVariables[s.name]=s,this.incRef(s,this.backend),s},t.prototype.incRef=function(n,e){var r=this.state.tensorInfo.has(n.dataId)?this.state.tensorInfo.get(n.dataId).refCount:0;if(this.state.numTensors++,"string"===n.dtype&&this.state.numStringTensors++,0===r){this.state.numDataBuffers++;var i=0;"complex64"!==n.dtype&&"string"!==n.dtype&&(i=n.size*ds(n.dtype)),this.state.tensorInfo.set(n.dataId,{backend:e||this.backend,dtype:n.dtype,shape:n.shape,bytes:i,refCount:0}),this.state.numBytes+=i}this.state.tensorInfo.get(n.dataId).refCount++,n instanceof ac||this.track(n)},t.prototype.disposeTensor=function(n){if(this.state.tensorInfo.has(n.dataId)){this.state.numTensors--,"string"===n.dtype&&this.state.numStringTensors--;var e=this.state.tensorInfo.get(n.dataId);e.refCount<=1?("complex64"!==n.dtype&&(this.state.numBytes-=e.bytes),this.state.numDataBuffers--,e.backend.disposeData(n.dataId),this.state.tensorInfo.delete(n.dataId)):this.state.tensorInfo.get(n.dataId).refCount--}},t.prototype.disposeVariables=function(){for(var n in this.state.registeredVariables)this.disposeVariable(this.state.registeredVariables[n])},t.prototype.disposeVariable=function(n){this.disposeTensor(n),null!=this.state.registeredVariables[n.name]&&delete this.state.registeredVariables[n.name]},t.prototype.memory=function(){var n=this.backend.memory();return n.numTensors=this.state.numTensors,n.numDataBuffers=this.state.numDataBuffers,n.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(n.unreliable=!0,null==n.reasons&&(n.reasons=[]),n.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),n},t.prototype.profile=function(n){return st(this,void 0,void 0,function(){var e,r;return Ln(this,function(i){return this.state.profiling=!0,e=this.state.numBytes,r=this.state.numTensors,this.state.activeProfile.kernels=[],this.state.activeProfile.result=n(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max.apply(Math,this.state.activeProfile.kernels.map(function(s){return s.totalBytesSnapshot})),this.state.activeProfile.newBytes=this.state.numBytes-e,this.state.activeProfile.newTensors=this.state.numTensors-r,[2,this.state.activeProfile]})})},t.prototype.isTapeOn=function(){return this.state.gradientDepth>0&&0===this.state.kernelDepth},t.prototype.addTapeNode=function(n,e,r,i,s){var c=this,l={id:this.state.nextTapeNodeId++,kernelName:n,inputs:e,outputs:r,saved:s},u=function Lt(t){return O.get(t)}(n);null!=u&&(i=u.gradFunc),null!=i&&(l.gradient=function(d){return d=d.map(function(p,M){if(null==p){var x=r[M],R=Js(x.size,x.dtype);return c.makeTensor(R,x.shape,x.dtype)}return p}),i(d.length>1?d:d[0],s)}),this.state.activeTape.push(l)},t.prototype.keep=function(n){return n.kept=!0,n},t.prototype.startTape=function(){0===this.state.gradientDepth&&(this.state.activeTape=[]),this.state.gradientDepth++},t.prototype.endTape=function(){this.state.gradientDepth--},t.prototype.startScope=function(n){var e={track:[],name:"unnamed scope",id:this.state.nextScopeId++};n&&(e.name=n),this.state.scopeStack.push(e),this.state.activeScope=e},t.prototype.endScope=function(n){for(var e=this,r=be(n),i=new Set(r.map(function(u){return u.id})),s=0;s0,function(){return"gradients() received an empty list of xs."}),null!=r&&"float32"!==r.dtype)throw new Error("dy must have 'float32' dtype, but has '"+r.dtype+"'");var c=this.scopedRun(function(){return s.startTape()},function(){return s.endTape()},function(){return s.tidy("forward",n)});at(c instanceof Ao,function(){return"The result y returned by f() must be a tensor."});var l=function(u,d,p){for(var M={},x={},R=0;R=0;R--)for(U=(et=u[R]).inputs,Ie=0;Ie0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",function(){var u,d,p={};p[c.id]=r??(d=ja(rr(u=c.shape),"float32"),Ye.makeTensor(d,u,"float32")),function(x,R,U){for(var J=function(ue){var Ie=R[ue],Ae=[];if(Ie.outputs.forEach(function(Ct){var yt=x[Ct.id];Ae.push(null!=yt?yt:null)}),null==Ie.gradient)throw new Error("Cannot compute gradient: gradient function not found for "+Ie.kernelName+".");var Oe=Ie.gradient(Ae),Fe=function(Ct){if(!(Ct in Oe))throw new Error("Cannot backprop through input "+Ct+". Available gradients found: "+Object.keys(Oe)+".");var yt=s.tidy(function(){return Oe[Ct]()});if("float32"!==yt.dtype)throw new Error("Error in gradient for op "+Ie.kernelName+". The gradient of input "+Ct+" must have 'float32' dtype, but has '"+yt.dtype+"'");var pt=Ie.inputs[Ct];if(!yi(yt.shape,pt.shape))throw new Error("Error in gradient for op "+Ie.kernelName+". The gradient of input '"+Ct+"' has shape '"+yt.shape+"', which does not match the shape of the input '"+pt.shape+"'");if(null==x[pt.id])x[pt.id]=yt;else{var gt=x[pt.id];x[pt.id]=gt.add(yt),gt.dispose()}};for(var et in Ie.inputs)Fe(et)},ne=R.length-1;ne>=0;ne--)J(ne)}(p,l);var M=e.map(function(x){return p[x.id]});return 0===s.state.gradientDepth&&(s.state.activeTape.forEach(function(x){for(var R=0,U=x.saved;R"u")throw new Error("Could not find a global object");e=self}Re=e}return Re}();if(null==t._tfengine){var n=new Rr(t);t._tfengine=new vt(n)}return _=t._tfengine.ENV,hs=function(){return t._tfengine},t._tfengine}();function sn(){return typeof window<"u"&&null!=window.document||typeof WorkerGlobalScope<"u"}var Tn=X();Tn.registerFlag("DEBUG",function(){return!1},function(t){t&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")}),Tn.registerFlag("IS_BROWSER",function(){return sn()}),Tn.registerFlag("IS_NODE",function(){return typeof process<"u"&&void 0!==process.versions&&void 0!==process.versions.node}),Tn.registerFlag("IS_CHROME",function(){return typeof navigator<"u"&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}),Tn.registerFlag("PROD",function(){return!1}),Tn.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",function(){return Tn.getBool("DEBUG")}),Tn.registerFlag("DEPRECATION_WARNINGS_ENABLED",function(){return!0}),Tn.registerFlag("IS_TEST",function(){return!1});var cr,Kn,ar,ao={},_o={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function $i(t,n){ao[t]=n}function Ii(t){t in ao||(ao[t]=function(e){if(1!==e&&2!==e)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var r=function(i){if(typeof OffscreenCanvas<"u"&&2===i)return new OffscreenCanvas(300,150);if(typeof document<"u")return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e);return r.addEventListener("webglcontextlost",function(i){i.preventDefault(),delete ao[e]},!1),1===e?r.getContext("webgl",_o)||r.getContext("experimental-webgl",_o):r.getContext("webgl2",_o)}(t));var n=ao[t];return n.isContextLost()?(delete ao[t],Ii(t)):(n.disable(n.DEPTH_TEST),n.disable(n.STENCIL_TEST),n.disable(n.BLEND),n.disable(n.DITHER),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SAMPLE_COVERAGE),n.enable(n.SCISSOR_TEST),n.enable(n.CULL_FACE),n.cullFace(n.BACK),ao[t])}function Qa(t,n){return[n,t]}function ca(t){var n=rr(t);return Xs(Math.ceil(n/4))}function Ca(t,n){return[Math.max(1,Math.ceil(n/2)),Math.max(1,Math.ceil(t/2))]}function qi(t,n){var e,r,i,s,c,l,u,d,p,M=t;return 2===X().getNumber("WEBGL_VERSION")?(e=M.R32F,r=M.R16F,i=M.RGBA16F,s=M.RGBA32F,c=M.RED,l=4,u=1,d=M.HALF_FLOAT,p=M.FLOAT):(e=t.RGBA,r=t.RGBA,i=t.RGBA,s=M.RGBA,c=t.RGBA,l=4,u=4,d=null!=n?n.HALF_FLOAT_OES:null,p=t.FLOAT),{internalFormatFloat:e,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:i,internalFormatPackedFloat:s,textureFormatFloat:c,downloadTextureFormat:t.RGBA,downloadUnpackNumChannels:l,defaultNumChannels:u,textureTypeHalfFloat:d,textureTypeFloat:p}}function Vn(t,n,e){var r=e();return n&&function(i){var s=i.getError();if(s!==i.NO_ERROR)throw new Error("WebGL Error: "+V(i,s))}(t),r}function E(t){return!!(X().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||0===t||5.96e-8e||n>e)throw r="["+t+"x"+n+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU ["+e+"x"+e+"].")}function $o(t,n){return ka(t,n,function(){return t.createFramebuffer()},"Unable to create WebGLFramebuffer.")}function Ci(t,n,e,r,i,s,c,l){var u=t.getAttribLocation(e,r);return-1!==u&&(Vn(t,n,function(){return t.bindBuffer(t.ARRAY_BUFFER,i)}),Vn(t,n,function(){return t.vertexAttribPointer(u,s,t.FLOAT,!1,c,l)}),Vn(t,n,function(){return t.enableVertexAttribArray(u)}),!0)}function ea(t,n,e,r){Da(t,r),Vn(t,n,function(){return t.activeTexture(t.TEXTURE0+r)}),Vn(t,n,function(){return t.bindTexture(t.TEXTURE_2D,e)})}function ji(t,n,e,r){return ka(t,n,function(){return t.getUniformLocation(e,r)},'uniform "'+r+'" not present in program.')}function Ts(t,n,e){return t.getUniformLocation(n,e)}function ws(t,n,e,r,i,s){Vn(t,n,function(){return ea(t,n,r,s)}),Vn(t,n,function(){return t.uniform1i(i,s)})}function Ki(t,n,e,r){Vn(t,n,function(){return t.bindFramebuffer(t.FRAMEBUFFER,r)}),Vn(t,n,function(){return t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0)})}function wi(t,n,e){Vn(t,n,function(){return t.bindFramebuffer(t.FRAMEBUFFER,e)}),Vn(t,n,function(){return t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0)})}function ps(t){var n=t.checkFramebufferStatus(t.FRAMEBUFFER);if(n!==t.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+Ua(t,n))}function Ua(t,n){switch(n){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case t.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+n}}function ka(t,n,e,r){var i=Vn(t,n,function(){return e()});if(null==i)throw new Error(r);return i}function Da(t,n){var e=t.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=n+t.TEXTURE0;if(re)throw new Error("textureUnit must be in [gl.TEXTURE0, gl.TEXTURE"+e+"].")}function _s(t,n){return void 0===n&&(n=2),rr(t.slice(0,t.length-n))}function gs(t){if(0===t.length)throw Error("Cannot get rows and columns of an empty shape array.");return[t.length>1?t[t.length-2]:1,t[t.length-1]]}function sc(t){var n=[1,1,1];return 0===t.length||1===t.length&&1===t[0]||(n=[_s(t)].concat(gs(t))),n}function lr(t,n){var e;void 0===n&&(n=!1);var r=X().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(n&&(r*=2,1===(t=t.map(function(d,p){return p>=t.length-2?As(t[p]):t[p]})).length&&(t=[2,t[0]])),2!==t.length){var i=Pi(t);t=i.newShape}var s=rr(t);if(t.length<=1&&s<=r)return[1,s];if(2===t.length&&t[0]<=r&&t[1]<=r)return t;if(3===t.length&&t[0]*t[1]<=r&&t[2]<=r)return[t[0]*t[1],t[2]];if(3===t.length&&t[0]<=r&&t[1]*t[2]<=r)return[t[0],t[1]*t[2]];if(4===t.length&&t[0]*t[1]*t[2]<=r&&t[3]<=r)return[t[0]*t[1]*t[2],t[3]];if(4===t.length&&t[0]<=r&&t[1]*t[2]*t[3]<=r)return[t[0],t[1]*t[2]*t[3]];if(n){var c=_s(t),l=2,u=2;return t.length&&(l=(e=gs(t))[0],u=e[1]),Xs(s=c*(l/2)*(u/2)).map(function(d){return 2*d})}return Xs(s)}function Jt(t){return t%2==0}function pr(t,n){if(yi(t=t.slice(-2),n=n.slice(-2))||!t.length||!n.length||0===t[0]||0===t[1]||0===n[0]||0===n[1])return!0;if(t.length!==n.length){var e=t.slice(-1)[0],r=n.slice(-1)[0];if(e===r||Jt(e)&&Jt(r)&&(1===t[0]||1===n[0]))return!0}return t[1]===n[1]&&Jt(t[0])&&Jt(n[0])}function so(t){if(null==Mt){var n=Ii(t);Mt=n.getParameter(n.MAX_TEXTURE_SIZE)}return Mt}function Cn(t){if(null==jt){var n=Ii(t);jt=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,jt)}function hn(t){if(0===t)return 0;var n=Ii(t);return Gn(n,"EXT_disjoint_timer_query_webgl2")&&2===t?2:Gn(n,"EXT_disjoint_timer_query")?1:0}function Gn(t,n){return null!=t.getExtension(n)}function po(t){try{if(null!=Ii(t))return!0}catch{return!1}return!1}function Wr(t){if(0===t)return!1;var n=Ii(t);if(1===t){if(!Gn(n,"OES_texture_float"))return!1}else if(!Gn(n,"EXT_color_buffer_float"))return!1;return c1(n)}function cc(t){if(0===t)return!1;var n=Ii(t);if(1!==t){if(Gn(n,"EXT_color_buffer_float"))return c1(n);if(Gn(n,"EXT_color_buffer_half_float")){var e=n.getExtension("EXT_color_buffer_half_float");return function(r,i){var s=qi(r,i),c=r.createTexture();r.bindTexture(r.TEXTURE_2D,c),r.texImage2D(r.TEXTURE_2D,0,s.internalFormatHalfFloat,1,1,0,s.textureFormatFloat,s.textureTypeHalfFloat,null);var l=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,l),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,c,0);var u=r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE;return r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteTexture(c),r.deleteFramebuffer(l),u}(n,e)}return!1}return!!Gn(n,"OES_texture_float")&&!!Gn(n,"WEBGL_color_buffer_float")&&c1(n)}function c1(t){var n=qi(t),e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,n.internalFormatFloat,1,1,0,n.textureFormatFloat,n.textureTypeFloat,null);var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0);var i=t.checkFramebufferStatus(t.FRAMEBUFFER)===t.FRAMEBUFFER_COMPLETE;return t.bindTexture(t.TEXTURE_2D,null),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteTexture(e),t.deleteFramebuffer(r),i}function ba(t){return 2===t&&null!=Ii(t).fenceSync}var Vc=Object.freeze({callAndCheck:Vn,canBeRepresented:E,getWebGLErrorMessage:V,getExtensionOrThrow:Me,createVertexShader:Be,createFragmentShader:ht,createProgram:Bn,linkProgram:Xn,validateProgram:Yr,createStaticVertexBuffer:vr,createStaticIndexBuffer:mr,getNumChannels:function(){return 2===X().getNumber("WEBGL_VERSION")?1:4},createTexture:zr,validateTextureSize:No,createFramebuffer:$o,bindVertexBufferToProgramAttribute:Ci,bindTextureUnit:ea,unbindTextureUnit:function(t,n,e){Da(t,e),Vn(t,n,function(){return t.activeTexture(t.TEXTURE0+e)}),Vn(t,n,function(){return t.bindTexture(t.TEXTURE_2D,null)})},getProgramUniformLocationOrThrow:ji,getProgramUniformLocation:Ts,bindTextureToProgramUniformSampler:ws,bindCanvasToFramebuffer:function(t,n){Vn(t,n,function(){return t.bindFramebuffer(t.FRAMEBUFFER,null)}),Vn(t,n,function(){return t.viewport(0,0,t.canvas.width,t.canvas.height)}),Vn(t,n,function(){return t.scissor(0,0,t.canvas.width,t.canvas.height)})},bindColorTextureToFramebuffer:Ki,unbindColorTextureFromFramebuffer:wi,validateFramebuffer:ps,getFramebufferErrorMessage:Ua,getBatchDim:_s,getRowsCols:gs,getShapeAs3D:sc,getTextureShapeFromLogicalShape:lr,isReshapeFree:pr,getWebGLMaxTextureSize:so,resetMaxTextureSize:function(){Mt=null},resetMaxTexturesInShader:function(){jt=null},getMaxTexturesInShader:Cn,getWebGLDisjointQueryTimerVersion:hn,hasExtension:Gn,isWebGLVersionEnabled:po,isCapableOfRenderingToFloatTexture:Wr,isDownloadFloatTextureEnabled:cc,isWebGLFenceEnabled:ba}),_r=X();function b0(t){X().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(t+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function ir(t,n){return Ye.tidy(t,n)}function Es(t){be(t).forEach(function(n){return n.dispose()})}function V1(){for(var t=[],n=0;n0,function(){return"Element arr["+l.join("][")+"] should be a primitive, but is an array of "+s.length+" elements"}),at(s.length===c[0],function(){return"Element arr["+l.join("][")+"] should have "+c[0]+" elements, but has "+s.length+" elements"});for(var u=c.slice(1),d=0;d=0&&(i=r),Mc(r,i,n,e),null==t||!Hi(t)&&!Array.isArray(t)&&"number"!=typeof t&&"boolean"!=typeof t&&"string"!=typeof t)throw new Error("Argument '"+n+"' passed to '"+e+"' must be a Tensor or TensorLike, but got '"+(null==t?"null":t.constructor.name)+"'");var c=qa(t,i);Hi(t)||Array.isArray(t)||(t=[t]);var l="string"!==i?ei(t,i,X().getBool("DEBUG")):Ja(t,[],!0);return Ye.makeTensor(l,c,i)}function G1(t,n,e,r){if(void 0===r&&(r="numeric"),!Array.isArray(t))throw new Error("Argument "+n+" passed to "+e+" must be a `Tensor[]` or `TensorLike[]`");return t.map(function(i,s){return Qe(i,n+"["+s+"]",e)},r)}function W2(t,n){for(var e=0;e=0&&n0}),_r.registerFlag("WEBGL_VERSION",function(){return po(2)?2:po(1)?1:0}),_r.registerFlag("WEBGL_BUFFER_SUPPORTED",function(){return 2===_r.get("WEBGL_VERSION")}),_r.registerFlag("WEBGL_CPU_FORWARD",function(){return!0}),_r.registerFlag("WEBGL_FORCE_F16_TEXTURES",function(){return!1}),_r.registerFlag("WEBGL_PACK",function(){return _r.getBool("HAS_WEBGL")}),_r.registerFlag("WEBGL_PACK_NORMALIZATION",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_PACK_CLIP",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_PACK_DEPTHWISECONV",function(){return!1}),_r.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_PACK_REDUCE",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_LAZILY_UNPACK",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_CONV_IM2COL",function(){return _r.getBool("WEBGL_PACK")}),_r.registerFlag("WEBGL_MAX_TEXTURE_SIZE",function(){return so(_r.getNumber("WEBGL_VERSION"))}),_r.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",function(){return Cn(_r.getNumber("WEBGL_VERSION"))}),_r.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",function(){var t=_r.getNumber("WEBGL_VERSION");return 0===t?0:hn(t)}),_r.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",function(){return _r.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&(t=navigator.userAgent||navigator.vendor||window.opera,!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))));var t}),_r.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",function(){return Wr(_r.getNumber("WEBGL_VERSION"))}),_r.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",function(){return!_r.getBool("WEBGL_FORCE_F16_TEXTURES")&&_r.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")}),_r.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",function(){return cc(_r.getNumber("WEBGL_VERSION"))}),_r.registerFlag("WEBGL_FENCE_API_ENABLED",function(){return ba(_r.getNumber("WEBGL_VERSION"))}),_r.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",function(){return _r.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0}),b1=b0;var Oa=kt({complex_:function(t,n){var e=Qe(t,"real","complex"),r=Qe(n,"imag","complex");return ho(e.shape,r.shape,"real and imag shapes, "+e.shape+" and "+r.shape+", must match in call to tf.complex()."),Ye.runKernelFunc(function(i){return i.complex(e,r)},{$real:e,$imag:r})}}),Fs=kt({real_:function(t){var n=Qe(t,"input","real");return Ye.runKernelFunc(function(e){return e.real(n)},{$input:n})}}),Hs=kt({imag_:function(t){var n=Qe(t,"input","imag");return Ye.runKernelFunc(function(e){return e.imag(n)},{$input:n})}});function xi(t,n,e){return Ga(t,n,qa(t,e),e)}function Ga(t,n,e,r){if(null==r&&(r=Ls(t)),"complex64"===r)throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!Hi(t)&&!Array.isArray(t)&&"number"!=typeof t&&"boolean"!=typeof t&&"string"!=typeof t)throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(null!=n){zs(n);var i=rr(n),s=rr(e);at(i===s,function(){return"Based on the provided shape, ["+n+"], the tensor should have "+i+" values but has "+s});for(var c=0;c1)return $n([0],r);var i=Js(Math.abs(Math.ceil((n-t)/e)),r);n=1,function(){return"Pass at least one tensor to concat"});var e=G1(t,"tensors","concat");"complex64"===e[0].dtype&&e.forEach(function(l){if("complex64"!==l.dtype)throw new Error("Cannot concatenate complex64 tensors with a tensor\n with dtype "+l.dtype+". ")}),n=Ti(n,e[0].shape)[0];var r=Gc(e.map(function(l){return l.shape}),n);if(0===rr(r))return xi([],r);if(1===(e=e.filter(function(l){return l.size>0})).length)return e[0];var i=e.map(function(l){return l.shape});return bl(i,n),Ye.runKernelFunc(function(l){return l.concat(e,n)},e,function(l){var u=i.map(function(d){return d[n]});return N3(l,u,n).map(function(d){return function(){return d}})},"Concat",{axis:n})}}),j4=kt({concat1d_:function(t){return Ia(t,0)}}),Xh=kt({concat2d_:function(t,n){return Ia(t,n)}}),Zh=kt({concat3d_:function(t,n){return Ia(t,n)}}),Jh=kt({concat4d_:function(t,n){return Ia(t,n)}}),N3=kt({split_:function(t,n,e){void 0===e&&(e=0);var r,i=Qe(t,"x","split");return e=Ti(e,i.shape)[0],"number"==typeof n?(at(i.shape[e]%n==0,function(){return"Number of splits must evenly divide the axis."}),r=new Array(n).fill(i.shape[e]/n)):(at(i.shape[e]===n.reduce(function(s,c){return s+c}),function(){return"The sum of sizes must match the size of the axis dimension."}),r=n),Ye.runKernelFunc(function(s){return s.split(i,r,e)},{$x:i},function(s){return{$x:function(){return Ia(s,e)}}})}});function h2(t,n){return t(n={exports:{}},n.exports),n.exports}typeof globalThis<"u"||typeof window<"u"||typeof global<"u"&&global;var W4=h2(function(t){!function(n,e,r){function i(l){var u,d=this,p=(u=4022871197,function(M){M=M.toString();for(var x=0;x>>0,u=(R*=u)>>>0,u+=4294967296*(R-=u)}return 2.3283064365386963e-10*(u>>>0)});d.next=function(){var M=2091639*d.s0+2.3283064365386963e-10*d.c;return d.s0=d.s1,d.s1=d.s2,d.s2=M-(d.c=0|M)},d.c=1,d.s0=p(" "),d.s1=p(" "),d.s2=p(" "),d.s0-=p(l),d.s0<0&&(d.s0+=1),d.s1-=p(l),d.s1<0&&(d.s1+=1),d.s2-=p(l),d.s2<0&&(d.s2+=1),p=null}function s(l,u){return u.c=l.c,u.s0=l.s0,u.s1=l.s1,u.s2=l.s2,u}function c(l,u){var d=new i(l),p=u&&u.state,M=d.next;return M.int32=function(){return 4294967296*d.next()|0},M.double=function(){return M()+11102230246251565e-32*(2097152*M()|0)},M.quick=M,p&&("object"==typeof p&&s(p,d),M.state=function(){return s(d,{})}),M}e&&e.exports?e.exports=c:this.alea=c}(0,t)}),z=h2(function(t){!function(n,e,r){function i(l){var u=this,d="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var M=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^M^M>>>8},l===(0|l)?u.x=l:d+=l;for(var p=0;p>>0)/4294967296};return M.double=function(){do{var x=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152}while(0===x);return x},M.int32=d.next,M.quick=M,p&&("object"==typeof p&&s(p,d),M.state=function(){return s(d,{})}),M}e&&e.exports?e.exports=c:this.xor128=c}(0,t)}),w=h2(function(t){!function(n,e,r){function i(l){var u=this,d="";u.next=function(){var M=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^M^M<<1)|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,l===(0|l)?u.x=l:d+=l;for(var p=0;p>>4),u.next()}function s(l,u){return u.x=l.x,u.y=l.y,u.z=l.z,u.w=l.w,u.v=l.v,u.d=l.d,u}function c(l,u){var d=new i(l),p=u&&u.state,M=function(){return(d.next()>>>0)/4294967296};return M.double=function(){do{var x=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152}while(0===x);return x},M.int32=d.next,M.quick=M,p&&("object"==typeof p&&s(p,d),M.state=function(){return s(d,{})}),M}e&&e.exports?e.exports=c:this.xorwow=c}(0,t)}),S=h2(function(t){!function(n,e,r){function i(l){var u=this;u.next=function(){var d,p,M=u.x,x=u.i;return d=M[x],p=(d^=d>>>7)^d<<24,p^=(d=M[x+1&7])^d>>>10,p^=(d=M[x+3&7])^d>>>3,p^=(d=M[x+4&7])^d<<7,d=M[x+7&7],p^=(d^=d<<13)^d<<9,M[x]=p,u.i=x+1&7,p},function(d,p){var M,x=[];if(p===(0|p))x[0]=p;else for(p=""+p,M=0;M0;--M)d.next()}(u,l)}function s(l,u){return u.x=l.x.slice(),u.i=l.i,u}function c(l,u){null==l&&(l=+new Date);var d=new i(l),p=u&&u.state,M=function(){return(d.next()>>>0)/4294967296};return M.double=function(){do{var x=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152}while(0===x);return x},M.int32=d.next,M.quick=M,p&&(p.x&&s(p,d),M.state=function(){return s(d,{})}),M}e&&e.exports?e.exports=c:this.xorshift7=c}(0,t)}),H=h2(function(t){!function(n,e,r){function i(l){var u=this;u.next=function(){var d,p,M=u.w,x=u.X,R=u.i;return u.w=M=M+1640531527|0,p=x[R+34&127],d=x[R=R+1&127],p^=p<<13,d^=d<<17,p=x[R]=(p^=p>>>15)^(d^=d>>>12),u.i=R,p+(M^M>>>16)|0},function(d,p){var M,x,R,U,J,ne=[],ue=128;for(p===(0|p)?(x=p,p=null):(p+="\0",x=0,ue=Math.max(ue,p.length)),R=0,U=-32;U>>15,x^=x<<4,x^=x>>>13,U>=0&&(R=0==(M=ne[127&U]^=x+(J=J+1640531527|0))?R+1:0);for(R>=128&&(ne[127&(p&&p.length||0)]=-1),R=127,U=512;U>0;--U)x=ne[R+34&127],M=ne[R=R+1&127],x^=x<<13,M^=M<<17,ne[R]=(x^=x>>>15)^(M^=M>>>12);d.w=J,d.X=ne,d.i=R}(u,l)}function s(l,u){return u.i=l.i,u.w=l.w,u.X=l.X.slice(),u}function c(l,u){null==l&&(l=+new Date);var d=new i(l),p=u&&u.state,M=function(){return(d.next()>>>0)/4294967296};return M.double=function(){do{var x=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152}while(0===x);return x},M.int32=d.next,M.quick=M,p&&(p.X&&s(p,d),M.state=function(){return s(d,{})}),M}e&&e.exports?e.exports=c:this.xor4096=c}(0,t)}),pe=h2(function(t){!function(n,e,r){function i(l){var u=this,d="";u.next=function(){var M=u.b,x=u.c,R=u.d,U=u.a;return M=M<<25^M>>>7^x,x=x-R|0,R=R<<24^R>>>8^U,U=U-M|0,u.b=M=M<<20^M>>>12^x,u.c=x=x-R|0,u.d=R<<16^x>>>16^U,u.a=U-M|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,l===Math.floor(l)?(u.a=l/4294967296|0,u.b=0|l):d+=l;for(var p=0;p>>0)/4294967296};return M.double=function(){do{var x=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152}while(0===x);return x},M.int32=d.next,M.quick=M,p&&("object"==typeof p&&s(p,d),M.state=function(){return s(d,{})}),M}e&&e.exports?e.exports=c:this.tychei=c}(0,t)}),He=h2(function(t){!function(n,e){var r,i=this,s=256,l="random",u=e.pow(s,6),d=e.pow(2,52),p=2*d,M=255;function x(ue,Ie,Ae){var Oe=[],Fe=J(function yt(pt,gt){var Bt,Ft=[],yn=typeof pt;if(gt&&"object"==yn)for(Bt in pt)try{Ft.push(yt(pt[Bt],gt-1))}catch{}return Ft.length?Ft:"string"==yn?pt:pt+"\0"}((Ie=1==Ie?{entropy:!0}:Ie||{}).entropy?[ue,ne(n)]:ue??function(){try{var yt;return r&&(yt=r.randomBytes)?yt=yt(s):(yt=new Uint8Array(s),(i.crypto||i.msCrypto).getRandomValues(yt)),ne(yt)}catch{var pt=i.navigator,gt=pt&&pt.plugins;return[+new Date,i,gt,i.screen,ne(n)]}}(),3),Oe),et=new R(Oe),Ct=function(){for(var yt=et.g(6),pt=u,gt=0;yt=p;)yt/=2,pt/=2,gt>>>=1;return(yt+gt)/pt};return Ct.int32=function(){return 0|et.g(4)},Ct.quick=function(){return et.g(4)/4294967296},Ct.double=Ct,J(ne(et.S),n),(Ie.pass||Ae||function(yt,pt,gt,Bt){return Bt&&(Bt.S&&U(Bt,et),yt.state=function(){return U(et,{})}),gt?(e[l]=yt,pt):yt})(Ct,Fe,"global"in Ie?Ie.global:this==e,Ie.state)}function R(ue){var Ie,Ae=ue.length,Oe=this,Fe=0,et=Oe.i=Oe.j=0,Ct=Oe.S=[];for(Ae||(ue=[Ae++]);Fe=1||0===l);var u=Math.sqrt(-2*Math.log(l)/l);e=this.mean+this.stdDev*s*u,r=this.mean+this.stdDev*c*u,this.truncated&&!this.isValidTruncated(e)||(i=!0)}return this.truncated&&!this.isValidTruncated(r)||(this.nextVal=this.convertValue(r)),this.convertValue(e)},t.prototype.convertValue=function(n){return null==this.dtype||"float32"===this.dtype?n:Math.round(n)},t.prototype.isValidTruncated=function(n){return n<=this.upper&&n>=this.lower},t}(),Ut=function(){function t(n,e,r,i){this.alpha=n,this.beta=1/e,this.dtype=r;var s=i||Math.random();this.randu=St(s.toString()),this.randn=new Nt(0,1,r,!1,this.randu()),this.d=n<1?n+2/3:n-1/3,this.c=1/Math.sqrt(9*this.d)}return t.prototype.nextValue=function(){for(var n,e,r,i,s,c;;){do{i=this.randn.nextValue(),c=1+this.c*i}while(c<=0);if(e=1-.331*(n=i*i)*n,r=.5*n+this.d*(1-(c*=c*c)+Math.log(c)),(s=this.randu())=1+n.length,function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+n.length}),at(e.length===n.length,function(){return"crops.length is "+e.length+" but should be equal to blockShape.length "+n.length}),at(r.shape[0]%i==0,function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+n.join(" * ")+" === "+i}),Ye.runKernelFunc(function(s){return s.batchToSpaceND(r,n,e)},{$x:r},function(s){return{$x:function(){return s.spaceToBatchND(n,e)}}})}}),Fr=kt({broadcastTo_:function(t,n){var e=Qe(t,"broadcastTo","x"),r=e.shape;if(n.some(function(u){return!(u>0)||u%1!=0}))throw new Error("broadcastTo(): Invalid broadcast shape ["+n+"].");if(n.lengthe.rank){for(var i=e.shape.slice();i.length=0;c--)if(e.shape[c]===n[c])s[c]=1;else if(1!==e.shape[c])throw new Error("broadcastTo(): ["+r+"] cannot be broadcast to ["+n+"].");var l=s.map(function(u,d){return u>1?d:-1}).filter(function(u){return u>=0});return 0===l.length?e.clone():Ye.runKernelFunc(function(u){return u.tile(e,s)},{input:e},function(u){return{input:function(){return u.sum(l,!0)}}})}}),la=kt({cast_:function(t,n){var e=Qe(t,"x","cast");if(!xa(n))throw new Error("Failed to cast to unknown dtype "+n);if("string"===n&&"string"!==e.dtype||"string"!==n&&"string"===e.dtype)throw new Error("Only strings can be casted to strings");return Ye.runKernelFunc(function(i){return i.cast(e,n)},{x:e},function(i){return{x:function(){return i.clone()}}},"Cast",{dtype:n})}}),bc=kt({clone_:function(t){var n=Qe(t,"x","clone",null);return Ye.runKernelFunc(function(){return Ye.makeTensorFromDataId(n.dataId,n.shape,n.dtype)},{$x:n},function(e){return{$x:function(){return e.toFloat()}}})}}),$c=kt({cumsum_:function(t,n,e,r){void 0===n&&(n=0),void 0===e&&(e=!1),void 0===r&&(r=!1);var i=Qe(t,"x","cumsum"),s=Qs([n|=0],i.rank),c=i;null!=s&&(c=i.transpose(s));var l=La(1,i.rank)[0],u=Ye.runKernelFunc(function(d){return d.cumsum(c,l,e,r)},{permutedX:c},function(d){return{permutedX:function(){return d.cumsum(n,e,!r)}}});return null!=s&&(u=u.transpose(s)),u}}),m2=kt({depthToSpace_:function(t,n,e){void 0===e&&(e="NHWC");var r=Qe(t,"x","depthToSpace"),i="NHWC"===e?r.shape[1]:r.shape[2],s="NHWC"===e?r.shape[2]:r.shape[3],c="NHWC"===e?r.shape[3]:r.shape[1];return at(i*n>=0,function(){return"Negative dimension size caused by overflow when multiplying\n "+i+" and "+n+" for depthToSpace with input shape\n "+r.shape}),at(s*n>=0,function(){return"Negative dimension size caused by overflow when multiplying\n "+s+" and "+n+" for depthToSpace with input shape\n "+r.shape}),at(c%(n*n)==0,function(){return"Dimension size must be evenly divisible by "+n*n+" but is "+c+" for depthToSpace with input shape "+r.shape}),Ye.runKernelFunc(function(l){return l.depthToSpace(r,n,e)},{$x:r})}}),Ms=kt({expandDims_:function(t,n){void 0===n&&(n=0);var e=Qe(t,"x","expandDims",null);at(n<=e.rank,function(){return"Axis must be <= rank of the tensor"});var r=e.shape.slice();return n<0&&(at(-(e.rank+1)<=n,function(){return"Axis must be in the interval ["+-(e.rank+1)+", "+e.rank+"]"}),n=e.rank+n+1),r.splice(n,0,1),l1(e,r)}}),T0=kt({eye_:function(t,n,e,r){void 0===r&&(r="float32"),null==n&&(n=t);for(var i=zn([t,n],r),s=t<=n?t:n,c=0;c2)throw new Error("Rank of probabilities must be 1 or 2, but is "+c);e=e||Math.random();var l=1===c?i.as2D(1,-1):i,u=Ye.runKernelFunc(function(d){return d.multinomial(l,r,n,e)},{logits2D:l});return 1===c?u.as1D():u}}),U2=kt({oneHot_:function(t,n,e,r){if(void 0===e&&(e=1),void 0===r&&(r=0),n<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+n);var i=Qe(t,"indices","oneHot","int32"),s=i.shape.concat([n]);return i=i.flatten(),Ye.runKernelFunc(function(c){return c.oneHot(i,n,e,r)},{$indices:i},function(c){return{$indices:function(){return $n(i.shape,"float32")}}}).reshape(s)}}),$1=kt({pad_:function(t,n,e){void 0===e&&(e=0);var r=Qe(t,"x","pad");if(0===r.rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");return Ye.runKernelFunc(function(s){return s.pad(r,n,e)},{x:r},function(s){var c=n.map(function(l){return l[0]});return{x:function(){return s.slice(c,r.shape)}}},"PadV2",{paddings:n,constantValue:e})}}),z3=kt({pad1d_:function(t,n,e){return void 0===e&&(e=0),at(2===n.length,function(){return"Invalid number of paddings. Must be length of 2."}),$1(t,[n],e)}}),V4=kt({pad2d_:function(t,n,e){return void 0===e&&(e=0),at(2===n.length&&2===n[0].length&&2===n[1].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),$1(t,n,e)}}),V2=kt({pad3d_:function(t,n,e){return void 0===e&&(e=0),at(3===n.length&&2===n[0].length&&2===n[1].length&&2===n[2].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),$1(t,n,e)}}),p2=kt({pad4d_:function(t,n,e){return void 0===e&&(e=0),at(4===n.length&&2===n[0].length&&2===n[1].length&&2===n[2].length&&2===n[3].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),$1(t,n,e)}}),G4=kt({rand_:function(t,n,e){var r=rr(t),i=null;if(null==e||"float32"===e)i=new Float32Array(r);else if("int32"===e)i=new Int32Array(r);else{if("bool"!==e)throw new Error("Unknown data type "+e);i=new Uint8Array(r)}for(var s=0;s=1+n.length,function(){return"input rank "+r.rank+" should be > than [blockShape] "+n.length}),at(e.length===n.length,function(){return"paddings.shape[0] "+e.length+" must be equal to [blockShape] "+n.length}),at(r.shape.reduce(function(i,s,c){return c>0&&c<=n.length?i&&(s+e[c-1][0]+e[c-1][1])%n[c-1]==0:i},!0),function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+e.toString()+" must be divisible by blockShapes "+n.toString()}),Ye.runKernelFunc(function(i){return i.spaceToBatchND(r,n,e)},{$x:r},function(i){return{$x:function(){return i.batchToSpaceND(n,e)}}})}}),em=kt({squeeze_:function(t,n){var e=Qe(t,"x","squeeze");return l1(e,Pi(e.shape,n).newShape)}}),Lc=kt({stack_:function(t,n){void 0===n&&(n=0);var e=G1(t,"tensors","stack");if(at(e.length>=1,function(){return"Pass at least one tensor to tf.stack"}),1===e.length)return e[0].expandDims(n);var i=e[0].shape,s=e[0].dtype;at(n<=e[0].rank,function(){return"Axis must be <= rank of the tensor"}),e.forEach(function(l){ho(i,l.shape,"All tensors passed to stack must have matching shapes")}),e.forEach(function(l){at(s===l.dtype,function(){return"All tensors passed to stack must have matching dtypes"})});var c=e.map(function(l){return l.expandDims(n)});return Ia(c,n)}}),Ll=kt({tile_:function(t,n){var e=Qe(t,"x","tile",null);return at(e.rank===n.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of reps "+n+"."}),Ye.runKernelFunc(function(s,c){var l=s.tile(e,n);return c([e]),l},{x:e},function(s,c){var l=c[0];return{x:function(){var u=Zo(l);if(1===l.rank)for(var d=0;d=-e.shape.length&&n=2*n+1||i%2==1?c.push(i):s.push(i);r.push.apply(r,s),r.push(0),r.push.apply(r,c)}return r}function w0(t,n,e,r){void 0===r&&(r=!0);var i=[];i.push(r?t[0]/e:t[0]*e);for(var s=1;st.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+n.shape[n.rank-1]+" vs. "+t.rank);if(0===t.size)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+t.shape+".");for(var e=n.shape,r=e[e.length-1],i=1,s=0;s1?n.shape[n.rank-1]:1,i=n.rank>1?n.rank-1:1,s="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+e.shape+", indices.shape: "+n.shape+", shape: "+t+", sliceDim: "+r+", and batchDim: "+i+".";if(e.rank1?n.shape[r-1]:1,s=e.length,c=1,l=i;l0;)1&t&&n.push(e),t/=2,e++;return n}function H3(t,n,e){for(var r=[],i=0;i0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var l=r[i];return s<0&&(s+=l),oo(0,s,l-1)}function im(t,n,e,r,i){var s=n[i],c=e[i]||1;(t&1<0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var l=r[i];return s<0&&(s+=l),c>0?oo(0,s,l):oo(-1,s,l-1)}function q4(t,n,e){for(var r=e.length,i=0;i1){r=i;break}for(i=r+1;i0||e[i]!==t[i])return!1;return!0}function ed(t,n){for(var e=t.length>0?t[t.length-1]:1,r=0;r1&&1===(t[s]||1)&&r.unshift(s)}return r}function Aa(t,n){for(var e=[],r=0;r1)&&e.unshift(s)}return e}function zo(t,n){for(var e=[],r=Math.max(t.length,n.length),i=0;i>>1)]);J>0?M=R+1:(x=R,U=!J)}return U?M:-M-1}(t,n,e||t9);t.splice(r<0?-(r+1):r,0,n)}function t9(t,n){return t>n?1:ti}).sort(lm),d=s>0?-.5/s:0,p=[],M=[];p.length0;){var x=u.pop(),R=x.score,U=x.boxIndex,J=x.suppressBeginIndex;if(R=J;--ue){var Ie=n9(t,U,p[ue]);if(Ie>=r){ne=!0;break}if(x.score=x.score*r9(r,d,Ie),x.score<=i)break}x.suppressBeginIndex=p.length,ne||(x.score===R?(p.push(U),M.push(x.score)):x.score>i&&e9(u,x,lm))}var Ae=p.length;return l&&(p.fill(0,Ae),M.fill(0,Ae)),{selectedIndices:C(p,"int32"),selectedScores:C(M,"float32"),numValidOutputs:wn(Ae,"int32")}}function n9(t,n,e){var r=t.subarray(4*n,4*n+4),i=t.subarray(4*e,4*e+4),s=Math.min(r[0],r[2]),c=Math.min(r[1],r[3]),l=Math.max(r[0],r[2]),u=Math.max(r[1],r[3]),d=Math.min(i[0],i[2]),p=Math.min(i[1],i[3]),M=Math.max(i[0],i[2]),x=Math.max(i[1],i[3]),R=(l-s)*(u-c),U=(M-d)*(x-p);if(R<=0||U<=0)return 0;var J=Math.max(s,d),ne=Math.max(c,p),ue=Math.min(l,M),Ie=Math.min(u,x),Ae=Math.max(ue-J,0)*Math.max(Ie-ne,0);return Ae/(R+U-Ae)}function r9(t,n,e){var r=Math.exp(n*e*e);return e<=t?r:0}function lm(t,n){return t.score-n.score||t.score===n.score&&n.boxIndex-t.boxIndex}function um(t,n,e){var r=new Array(t.rank).fill(0),i=t.shape.slice();return n.map(function(s){i[e]=s;var c=t.slice(r,i);return r[e]+=s,c})}function dm(t,n){for(var e=new Array(t.rank),r=0;r":"<")+" bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n "};function pm(t,n){return["x","y","z","w","u","v"].slice(0,n).map(function(e){return t+"."+e})}function uc(t,n){return 1===n?[t]:pm(t,n)}function Bs(){var t,n,e,r,i,s,c,l,u,d;return 2===X().getNumber("WEBGL_VERSION")?(t="#version 300 es",n="in",e="out",r="in",i="texture",s="outputColor",c="out vec4 outputColor;",l="\n bool isnan_custom(float val) {\n return (val > 0.0 || val < 0.0) ? false : val != 0.0;\n }\n\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan_custom(val.x),\n isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n }\n\n #define isnan(value) isnan_custom(value)\n ",u="",d="\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "):(t="",n="attribute",e="varying",r="varying",i="texture2D",s="gl_FragColor",c="",l="\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n ",u="\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n ",d="\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "),{version:t,attribute:n,varyingVs:e,varyingFs:r,texture2D:i,output:s,defineOutput:c,defineSpecialNaN:l,defineSpecialInf:u,defineRound:d}}function v2(t,n,e){void 0===e&&(e="index");var r=Qi(n);return r.map(function(i,s){return"int "+t[s]+" = "+e+" / "+i+"; "+(s===r.length-1?"int "+t[s+1]+" = "+e+" - "+t[s]+" * "+i:"index -= "+t[s]+" * "+i)+";"}).join("")}function cd(t){var n=Qi(t).map(function(e){return e.toString()});return"\n int getFlatIndex(ivec3 coords) {\n return coords.x * "+n[0]+" + coords.y * "+n[1]+" + coords.z;\n }\n"}var $3="\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n";function i9(t,n,e,r){var i=[];t.forEach(function(R){var U=rr(R.shapeInfo.logicalShape);R.shapeInfo.isUniform?i.push("uniform float "+R.name+(U>1?"["+U+"]":"")+";"):(i.push("uniform sampler2D "+R.name+";"),i.push("uniform int offset"+R.name+";"))});var s,c,R,l=i.join("\n"),u=t.map(function(R){return function(U,J,ne){void 0===ne&&(ne=!1);var ue="";return ue+=ne?ld(U):El(U),U.shapeInfo.logicalShape.length<=J.logicalShape.length&&(ue+=ne?function(Oe,Fe){var et,Dn,Ct=Oe.name,yt=Ct.charAt(0).toUpperCase()+Ct.slice(1),pt="get"+yt+"AtOutCoords",gt=Oe.shapeInfo.logicalShape.length,Bt=Fe.logicalShape.length,Ft=X1(Oe.shapeInfo.logicalShape,Fe.logicalShape),yn=Gi(Bt),pn=Bt-gt,_n=["x","y","z","w","u","v"];et=0===gt?"":Bt<2&&Ft.length>=1?"coords = 0;":Ft.map(function(Tr){return"coords."+_n[Tr+pn]+" = 0;"}).join("\n"),Dn=Bt<2&>>0?"coords":Oe.shapeInfo.logicalShape.map(function(Tr,Br){return"coords."+_n[Br+pn]}).join(", ");var En="return outputValue;",bn=1===rr(Oe.shapeInfo.logicalShape),Nn=1===rr(Fe.logicalShape);if(1!==gt||bn||Nn){if(bn&&!Nn)En=1===Bt?"\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n ":"\n return vec4(outputValue.x);\n ";else if(Ft.length){var Rn=gt-2,ur=gt-1;Ft.indexOf(Rn)>-1&&Ft.indexOf(ur)>-1?En="return vec4(outputValue.x);":Ft.indexOf(Rn)>-1?En="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":Ft.indexOf(ur)>-1&&(En="return vec4(outputValue.xx, outputValue.zz);")}}else En="\n return vec4(outputValue.xy, outputValue.xy);\n ";return"\n vec4 "+pt+"() {\n "+yn+" coords = getOutputCoords();\n "+et+"\n vec4 outputValue = get"+yt+"("+Dn+");\n "+En+"\n }\n "}(U,J):function(Oe,Fe){var et=Oe.name,Ct=et.charAt(0).toUpperCase()+et.slice(1),yt="get"+Ct+"AtOutCoords",Bt=Oe.shapeInfo.logicalShape.length,Ft=Fe.logicalShape.length;if(!Oe.shapeInfo.isUniform&&Bt===Ft&&null==Oe.shapeInfo.flatOffset&&yi(Oe.shapeInfo.texShape,Fe.texShape))return"\n float "+yt+"() {\n return sampleTexture("+et+", resultUV);\n }\n ";var pn=Gi(Ft),_n=X1(Oe.shapeInfo.logicalShape,Fe.logicalShape),Dn=Ft-Bt,En=["x","y","z","w","u","v"];return"\n float "+yt+"() {\n "+pn+" coords = getOutputCoords();\n "+(0===Bt?"":Ft<2&&_n.length>=1?"coords = 0;":_n.map(function(Nn){return"coords."+En[Nn+Dn]+" = 0;"}).join("\n"))+"\n return get"+Ct+"("+(Ft<2&&Bt>0?"coords":Oe.shapeInfo.logicalShape.map(function(Nn,Rn){return"coords."+En[Rn+Dn]}).join(", "))+");\n }\n "}(U,J)),ue}(R,n,r)}).join("\n"),d=n.texShape,p=Bs(),M="\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return "+p.texture2D+"(textureSampler, uv).r;\n }\n ",x=(R=p).version+"\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n "+R.varyingFs+" vec2 resultUV;\n "+R.defineOutput+"\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n uniform float NAN;\n "+R.defineSpecialNaN+"\n "+R.defineSpecialInf+"\n "+R.defineRound+"\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n int idiv(int a, int b, float sign) {\n int res = a / b;\n int mod = imod(a, b);\n if (sign < 0. && mod != 0) {\n res -= 1;\n }\n return res;\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n "+a9+"\n "+s9+"\n "+_m+"\n ";return n.isPacked?(s=function(R,U){switch(R.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return Fe=U,1===(et=[Math.ceil(Fe[0]/2),Math.ceil(Fe[1]/2)])[0]?"\n int getOutputCoords() {\n return 2 * int(resultUV.x * "+et[1]+".0);\n }\n ":1===et[1]?"\n int getOutputCoords() {\n return 2 * int(resultUV.y * "+et[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+et[0]+", "+et[1]+"));\n return 2 * (resTexRC.x * "+et[1]+" + resTexRC.y);\n }\n ";case 2:return function(Oe,Fe){var et=[Math.ceil(Fe[0]/2),Math.ceil(Fe[1]/2)];if(yi(Oe,Fe))return"\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2("+et[0]+", "+et[1]+"));\n }\n ";var Ct=Math.ceil(Oe[1]/2);return"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+et[0]+", "+et[1]+"));\n\n int index = resTexRC.x * "+et[1]+" + resTexRC.y;\n int r = 2 * (index / "+Ct+");\n int c = imod(index, "+Ct+") * 2;\n\n return ivec2(r, c);\n }\n "}(R,U);case 3:return J=R,ne=U,ue=[Math.ceil(ne[0]/2),Math.ceil(ne[1]/2)],Ae=(Ie=Math.ceil(J[2]/2))*Math.ceil(J[1]/2),"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+ue[0]+", "+ue[1]+"));\n int index = resTexRC.x * "+ue[1]+" + resTexRC.y;\n\n int b = index / "+Ae+";\n index -= b * "+Ae+";\n\n int r = 2 * (index / "+Ie+");\n int c = imod(index, "+Ie+") * 2;\n\n return ivec3(b, r, c);\n }\n ";default:return function(Oe,Fe){for(var et=[Math.ceil(Fe[0]/2),Math.ceil(Fe[1]/2)],Ct=Math.ceil(Oe[Oe.length-1]/2),yt=Ct*Math.ceil(Oe[Oe.length-2]/2),pt=yt,gt="",Bt="b, r, c",Ft=2;Ft2,function(){return"Packed arg"+(e.charAt(0).toUpperCase()+e.slice(1))+" supports only inputs with rank above 2."});var s=Math.ceil(t[t.length-1]/n);this.outputShape=t.slice(0,-1),s>1&&this.outputShape.push(s),r||this.variableNames.push("bestIndicesA");var c,l,u=this.outputShape,d=u.length,p=Gi(d),M=uc("coords",d);if(1===s){var x=Gi(l=d+1);c="\n "+x+" sourceLocR = "+x+"("+M.join()+", 0);\n ++"+M[d-1]+";\n "+x+" sourceLocG = "+x+"("+M.join()+", 0);\n ++"+M[d-2]+";\n "+x+" sourceLocA = "+x+"("+M.join()+", 0);\n --"+M[d-1]+";\n "+x+" sourceLocB = "+x+"("+M.join()+", 0);\n --"+M[d-2]+";"}else l=d,c="\n "+p+" sourceLocR = coords;\n ++"+M[d-1]+";\n "+p+" sourceLocG = coords;\n ++"+M[d-2]+";\n "+p+" sourceLocA = coords;\n --"+M[d-1]+";\n "+p+" sourceLocB = coords;\n --"+M[d-2]+";";var R=["x","y","z","w","u","v"].slice(0,l),U="."+R[l-1],J=R.map(function(yt){return"int "+yt}),ne=uc("sourceLocR",l-1).concat("inIdx.r"),ue=uc("sourceLocG",l-1).concat("inIdx.g"),Ie=uc("sourceLocB",l-1).concat("inIdx.b"),Ae=uc("sourceLocA",l-1).concat("inIdx.a"),Oe="max"===e?"greaterThan":"lessThan",Fe=r?"":"\n inIdx = round(vec4(getBestIndicesAChannel("+ne.join()+"),\n getBestIndicesAChannel("+ue.join()+"),\n getBestIndicesAChannel("+Ie.join()+"),\n getBestIndicesAChannel("+Ae.join()+")));",et="vec4(\n getAChannel("+ne.join()+"),\n hasNextCol ? getAChannel("+ue.join()+") : 0.,\n hasNextRow ? getAChannel("+Ie.join()+") : 0.,\n hasNextRow && hasNextCol ? getAChannel("+Ae.join()+") : 0.)",Ct=r?"":"\n float getBestIndicesAChannel("+J.join()+") {\n return getChannel(getBestIndicesA("+R.join()+"),\n vec2("+R.slice(-2).join()+"));\n }";this.userCode="\n float getAChannel("+J.join()+") {\n return getChannel(getA("+R.join()+"),\n vec2("+R.slice(-2).join()+"));\n }\n "+Ct+"\n void main() {\n "+p+" coords = getOutputCoords();\n bool hasNextCol = "+M[d-1]+" < "+(u[d-1]-1)+";\n bool hasNextRow = "+M[d-2]+" < "+(u[d-2]-1)+";\n "+c+"\n ivec4 srcIdx = ivec4(sourceLocR"+U+", sourceLocG"+U+",\n sourceLocB"+U+", sourceLocA"+U+") * "+n+";\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = "+et+";\n\n for (int i = 0; i < "+n+"; i++) {\n inIdx = srcIdx;\n "+Fe+"\n vec4 candidate = "+et+";\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4("+Oe+"(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n "},u9=function(t){this.variableNames=["dy"],this.outputShape=t.inShape;var l=t.effectiveFilterHeight,u=t.effectiveFilterWidth;this.userCode="\n const ivec2 pads = ivec2("+(l-1-t.padInfo.top)+", "+(u-1-t.padInfo.left)+");\n const float avgMultiplier = float("+1/(t.filterHeight*t.filterWidth)+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+l+";\n wR += "+t.dilationHeight+") {\n float dyR = float(dyRCorner + wR) / "+t.strideHeight+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+u+";\n wC+= "+t.dilationWidth+") {\n float dyC = float(dyCCorner + wC) / "+t.strideWidth+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n "},gm=function(t){this.variableNames=["dy"],this.outputShape=t.inShape;var p=t.effectiveFilterDepth,M=t.effectiveFilterHeight,x=t.effectiveFilterWidth;this.userCode="\n const ivec3 pads = ivec3("+(p-1-t.padInfo.front)+", "+(M-1-t.padInfo.top)+", "+(x-1-t.padInfo.left)+");\n const float avgMultiplier = float("+1/(t.filterDepth*t.filterHeight*t.filterWidth)+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < "+p+";\n wD += "+t.dilationDepth+") {\n float dyD = float(dyDCorner + wD) / "+t.strideDepth+".0;\n\n if (dyD < 0.0 || dyD >= "+t.outDepth+".0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < "+M+";\n wR += "+t.dilationHeight+") {\n float dyR = float(dyRCorner + wR) / "+t.strideHeight+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+x+";\n wC += "+t.dilationWidth+") {\n float dyC = float(dyCCorner + wC) / "+t.strideWidth+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n }\n setOutput(dotProd);\n }\n "},d9=function(t,n,e,r,i,s){this.outputShape=[],this.variableNames=["x","mean","variance"],zo(t,n),zo(t,e);var c="0.0";null!=r&&(zo(t,r),this.variableNames.push("offset"),c="getOffsetAtOutCoords()");var l="1.0";null!=i&&(zo(t,i),this.variableNames.push("scale"),l="getScaleAtOutCoords()"),this.outputShape=t,this.userCode="\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = "+c+";\n float scale = "+l+";\n float inv = scale * inversesqrt(variance + float("+s+"));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n "},vm=function(t,n,e,r,i,s){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],zo(t,n),zo(t,e);var c="vec4(0.0)";null!=r&&(zo(t,r),this.variableNames.push("offset"),c="getOffsetAtOutCoords()");var l="vec4(1.0)";null!=i&&(zo(t,i),this.variableNames.push("scale"),l="getScaleAtOutCoords()"),this.outputShape=t,this.userCode="\n void main() {\n vec4 offset = "+c+";\n vec4 scale = "+l+";\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4("+s+"));\n\n setOutput((x - mean) * inv + offset);\n }\n "},ud=function(t,n,e){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=zo(n,e),this.userCode="\n float binaryOpComplex(\n float areal, float aimag, float breal, float bimag) {\n "+t+"\n }\n\n void main() {\n float areal = getARealAtOutCoords();\n float aimag = getAImagAtOutCoords();\n float breal = getBRealAtOutCoords();\n float bimag = getBImagAtOutCoords();\n setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n }\n "},dd="return a + b;",fd="return a - b;",hd="return a * b;",ym="return (a < 0.) ? b * a : a;",Sa=function(t,n,e){this.variableNames=["A","B"],this.outputShape=zo(n,e),this.userCode="\n float binaryOperation(float a, float b) {\n "+t+"\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n "},Mm="\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n",Z1=function(t,n,e,r){void 0===r&&(r=!1),this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=zo(n,e);var i=this.outputShape.length,s="";if(r)if(0===i||1===rr(this.outputShape))s="\n result.y = 0.;\n result.z = 0.;\n result.w = 0.;\n ";else if(s="\n "+Gi(i)+" coords = getOutputCoords();\n ",1===i)s+="\n result.y = (coords + 1) >= "+this.outputShape[0]+" ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n ";else{var c=uc("coords",i);s+="\n bool nextRowOutOfBounds =\n ("+c[i-2]+" + 1) >= "+this.outputShape[i-2]+";\n bool nextColOutOfBounds =\n ("+c[i-1]+" + 1) >= "+this.outputShape[i-1]+";\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n "}this.userCode="\n vec4 binaryOperation(vec4 a, vec4 b) {\n "+t+"\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n\n vec4 result = binaryOperation(a, b);\n "+s+"\n\n setOutput(result);\n }\n "},m9=function(){function t(n){this.variableNames=["A"],this.outputShape=n,this.userCode="\n uniform float minVal;\n uniform float maxVal;\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, minVal, maxVal));\n }\n "}return t.prototype.getCustomSetupFunc=function(n,e){var r=this;return function(i,s){null==r.minLoc&&(r.minLoc=i.getUniformLocationNoThrow(s,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(s,"maxVal")),i.gl.uniform1f(r.minLoc,n),i.gl.uniform1f(r.maxLoc,e)}},t}(),p9=function(){function t(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.userCode="\n uniform float minVal;\n uniform float maxVal;\n\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n }\n "}return t.prototype.getCustomSetupFunc=function(n,e){var r=this;return function(i,s){null==r.minLoc&&(r.minLoc=i.getUniformLocationNoThrow(s,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(s,"maxVal")),i.gl.uniform1f(r.minLoc,n),i.gl.uniform1f(r.maxLoc,e)}},t}(),_9=function(t){this.variableNames=["real","imag"],this.outputShape=t,this.userCode="\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n "},g9=function(t){this.outputShape=[],this.outputShape=Gc(t,1),this.variableNames=t.map(function(l,u){return"T"+u});var n=new Array(t.length-1);n[0]=t[0][1];for(var e=1;e= "+l[u-1]+") {\n return getChannel(\n getT"+u+"("+K3(c,d,R)+"),\n vec2("+K3(p,d,R)+"));\n }"}var J=l[l.length-1];x+="\n return getChannel(\n getT"+l.length+"("+K3(c,d,J)+"),\n vec2("+K3(p,d,J)+"));",this.userCode="\n float getValue("+c.map(function(ne){return"int "+ne})+") {\n "+x+"\n }\n\n void main() {\n "+i+" coords = getOutputCoords();\n vec4 result = vec4(getValue("+s+"), 0., 0., 0.);\n\n "+s[r-1]+" = "+s[r-1]+" + 1;\n if ("+s[r-1]+" < "+e[r-1]+") {\n result.g = getValue("+s+");\n }\n\n "+s[r-2]+" = "+s[r-2]+" + 1;\n if ("+s[r-2]+" < "+e[r-2]+") {\n result.a = getValue("+s+");\n }\n\n "+s[r-1]+" = "+s[r-1]+" - 1;\n if ("+s[r-2]+" < "+e[r-2]+" &&\n "+s[r-1]+" < "+e[r-1]+") {\n result.b = getValue("+s+");\n }\n setOutput(result);\n }\n "};function K3(t,n,e){var r=t.indexOf(n);return t.map(function(i,s){return s===r?i+" - "+e:i}).join()}var bm=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+t.strideHeight+" - "+t.padInfo.top+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+t.strideWidth+" - "+t.padInfo.left+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n if ("+("channelsLast"===t.dataFormat)+") {\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n } else {\n float dyValue = getDy(b, d2, yR, yC);\n float xValue = getX(b, d1, xR, xC);\n dotProd += (xValue * dyValue);\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n "},v9=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var n=t.filterHeight,e=t.filterWidth,s="channelsLast"===t.dataFormat;this.userCode="\n const ivec2 pads = ivec2("+(n-1-t.padInfo.top)+", "+(e-1-t.padInfo.left)+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords["+(s?3:1)+"];\n\n ivec2 dyCorner = ivec2(coords["+(s?1:2)+"], coords["+(s?2:3)+"]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+n+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+t.strideHeight+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+n+" - 1 - wR;\n\n for (int wC = 0; wC < "+e+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+t.strideWidth+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+e+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+t.outChannels+"; d2++) {\n\n if ("+s+") {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n } else {\n float xValue = getDy(batch, d2, idyR, idyC);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n "},Lm=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape,this.userCode="\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yF = 0; yF < "+t.outDepth+"; yF++) {\n int xF = wF + yF * "+t.strideDepth+" - "+t.padInfo.front+";\n\n if (xF < 0 || xF >= "+t.inDepth+") {\n continue;\n }\n\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+t.strideHeight+" - "+t.padInfo.top+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+t.strideWidth+" - "+t.padInfo.left+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},y9=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var n=t.filterDepth,e=t.filterHeight,r=t.filterWidth;this.userCode="\n const ivec3 pads = ivec3("+(n-1-t.padInfo.front)+", "+(e-1-t.padInfo.top)+", "+(r-1-t.padInfo.left)+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < "+n+"; wF++) {\n float dyF = float(dyFCorner + wF) / "+t.strideDepth+".0;\n\n if (dyF < 0.0 || dyF >= "+t.outDepth+".0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = "+n+" - 1 - wF;\n\n for (int wR = 0; wR < "+e+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+t.strideHeight+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+e+" - 1 - wR;\n\n for (int wC = 0; wC < "+r+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+t.strideWidth+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+r+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+t.outChannels+"; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},M9=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * "+t.outChannels/t.inChannels+" + dm;\n\n float dotProd = 0.0;\n\n // TO DO: Vec4 over the batch size\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+t.strideHeight+" - "+t.padInfo.top+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+t.strideWidth+" - "+t.padInfo.left+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n "},Sm=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var n=t.filterHeight,e=t.filterWidth,l=t.outChannels/t.inChannels;this.userCode="\n const ivec2 pads = ivec2("+(n-1-t.padInfo.top)+", "+(e-1-t.padInfo.left)+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < "+n+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+t.strideHeight+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+n+" - 1 - wR;\n\n for (int wC = 0; wC < "+e+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+t.strideWidth+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+e+" - 1 - wC;\n\n // TO DO: Vec4 over the channelMul\n for (int dm = 0; dm < "+l+"; dm++) {\n int d2 = d1 * "+l+" + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n "},Tm=function(t,n,e,r){void 0===n&&(n=!1),void 0===e&&(e=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.outputShape=t.outShape;var i=t.padInfo.top,s=t.padInfo.left,c=t.strideHeight,l=t.strideWidth,u=t.dilationHeight,d=t.dilationWidth,p=t.filterHeight,M=t.filterWidth,x=4*Math.floor(t.inChannels/4),R=t.inChannels%4,U="channelsLast"===t.dataFormat,J=U?1:2,ne=U?2:3,ue=U?3:1,Ie="",Ae="";e&&(Ie=r?"float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n "+e+"\n }":"\n float activation(float x) {\n "+e+"\n }\n ",Ae="result = activation(result);");var Oe=n?"result += getBiasAtOutCoords();":"";n&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+Ie+"\n\n const ivec2 strides = ivec2("+c+", "+l+");\n const ivec2 pads = ivec2("+i+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords["+ue+"];\n\n ivec2 xRCCorner =\n ivec2(coords["+J+"], coords["+ne+"]) * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+p+"; wR++) {\n int xR = xRCorner + wR * "+u+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+M+"; wC++) {\n int xC = xCCorner + wC * "+d+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+x+"; d1 += 4) {\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n if ("+U+") {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec4 xValues = vec4(\n getX(batch, d1, xR, xC),\n getX(batch, d1 + 1, xR, xC),\n getX(batch, d1 + 2, xR, xC),\n getX(batch, d1 + 3, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n\n if ("+(1===R)+") {\n\n if ("+U+") {\n dotProd +=\n getX(batch, xR, xC, "+x+") *\n getW(wR, wC, "+x+", d2);\n } else {\n dotProd +=\n getX(batch, "+x+", xR, xC) *\n getW(wR, wC, "+x+", d2);\n }\n\n } else if ("+(2===R)+") {\n vec2 wValues = vec2(\n getW(wR, wC, "+x+", d2),\n getW(wR, wC, "+x+" + 1, d2)\n );\n\n if ("+U+") {\n vec2 xValues = vec2(\n getX(batch, xR, xC, "+x+"),\n getX(batch, xR, xC, "+x+" + 1)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec2 xValues = vec2(\n getX(batch, "+x+", xR, xC),\n getX(batch, "+x+" + 1, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n } else if ("+(3===R)+") {\n vec3 wValues = vec3(\n getW(wR, wC, "+x+", d2),\n getW(wR, wC, "+x+" + 1, d2),\n getW(wR, wC, "+x+" + 2, d2)\n );\n\n if ("+U+") {\n vec3 xValues = vec3(\n getX(batch, xR, xC, "+x+"),\n getX(batch, xR, xC, "+x+" + 1),\n getX(batch, xR, xC, "+x+" + 2)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec3 xValues = vec3(\n getX(batch, "+x+", xR, xC),\n getX(batch, "+x+" + 1, xR, xC),\n getX(batch, "+x+" + 2, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n }\n }\n }\n\n float result = dotProd;\n "+Oe+"\n "+Ae+"\n setOutput(result);\n }\n "},wm=function(t){this.variableNames=["x","W"],this.outputShape=t.outShape;var n=t.padInfo.front,e=t.padInfo.top,r=t.padInfo.left,i=t.strideDepth,s=t.strideHeight,c=t.strideWidth,l=t.dilationDepth,u=t.dilationHeight,d=t.dilationWidth,p=t.filterDepth,M=t.filterHeight,x=t.filterWidth,R=4*Math.floor(t.inChannels/4),U=t.inChannels%4;this.userCode="\n const ivec3 strides = ivec3("+i+", "+s+", "+c+");\n const ivec3 pads = ivec3("+n+", "+e+", "+r+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < "+p+"; wF++) {\n int xF = xFCorner + wF * "+l+";\n\n if (xF < 0 || xF >= "+t.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+M+"; wR++) {\n int xR = xRCorner + wR * "+u+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+x+"; wC++) {\n int xC = xCCorner + wC * "+d+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+R+"; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if ("+(1===U)+") {\n dotProd +=\n getX(batch, xF, xR, xC, "+R+") *\n getW(wF, wR, wC, "+R+", d2);\n } else if ("+(2===U)+") {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, "+R+"),\n getX(batch, xF, xR, xC, "+R+" + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, "+R+", d2),\n getW(wF, wR, wC, "+R+" + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if ("+(3===U)+") {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, "+R+"),\n getX(batch, xF, xR, xC, "+R+" + 1),\n getX(batch, xF, xR, xC, "+R+" + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, "+R+", d2),\n getW(wF, wR, wC, "+R+" + 1, d2),\n getW(wF, wR, wC, "+R+" + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},Em=function(t,n,e,r){void 0===n&&(n=!1),void 0===e&&(e=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.outputShape=t.outShape;var i=t.inHeight,s=t.inWidth,c=t.padInfo.top,l=t.padInfo.left,u=t.strideHeight,d=t.strideWidth,p=t.dilationHeight,M=t.dilationWidth,x=t.filterHeight,R=t.filterWidth,U=t.outChannels/t.inChannels,J="",ne="";e&&(J=r?"float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n "+e+"\n }":"\n float activation(float x) {\n "+e+"\n }\n ",ne="result = activation(result);");var ue=n?"result += getBiasAtOutCoords();":"";n&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+J+"\n\n const ivec2 strides = ivec2("+u+", "+d+");\n const ivec2 pads = ivec2("+c+", "+l+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / "+U+";\n int q = d2 - d1 * "+U+";\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < "+x+"; wR++) {\n int xR = xRCorner + wR * "+p+";\n\n if (xR < 0 || xR >= "+i+") {\n continue;\n }\n\n for (int wC = 0; wC < "+R+"; wC++) {\n int xC = xCCorner + wC * "+M+";\n\n if (xC < 0 || xC >= "+s+") {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n\n float result = dotProd;\n "+ue+"\n "+ne+"\n setOutput(result);\n }\n "},xm=function(t,n,e,r){void 0===n&&(n=!1),void 0===e&&(e=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.outShape;for(var i=t.inHeight,s=t.inWidth,c=t.padInfo.top,l=t.padInfo.left,u=t.strideHeight,d=t.strideWidth,p=t.dilationHeight,M=t.dilationWidth,x=t.filterHeight,R=t.filterWidth,U=R,J="int xR; int xC; int xCOffset;",ne=0;ne= 0 && xR < "+i+" && xCOffset >= 0 && xCOffset < "+s+") {\n xTexelR"+ne+"C"+ue+" = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if(xCOffset + 1 >= "+s+") {\n xTexelR"+ne+"C"+ue+".zw = vec2(0.);\n }\n } else {\n xTexelR"+ne+"C"+ue+" = vec4(0.);\n }\n\n xCOffset = xC + 1 - 2;\n if(xR >= 0 && xR < "+i+" && xCOffset >= 0 && xCOffset < "+s+") {\n vec4 previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if(xCOffset + 1 >= "+s+") {\n previous.zw = vec2(0.);\n }\n\n xR"+ne+"C"+ue+" = vec4(previous.zw, xTexelR"+ne+"C"+ue+".xy);\n } else {\n xR"+ne+"C"+ue+" = vec4(0, 0, xTexelR"+ne+"C"+ue+".xy);\n }\n ":"\n if(xR >= 0 && xR < "+i+" && xC >= 0 && xC < "+s+") {\n xTexelR"+ne+"C"+ue+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+ne+"C"+ue+" = vec4(0.);\n }\n\n xR"+ne+"C"+ue+" = xTexelR"+ne+"C"+ue+";\n ",ue+1= 0 && xR < "+i+" &&\n xCOffset >= 0 && xCOffset < "+s+") {\n xTexelR"+ne+"C"+(ue+2)+" = getX(batch, xR, xCOffset, d1);\n }\n ",M>1&&(J+="\n xCOffset -= 2;\n if(xR >= 0 && xR < "+i+" &&\n xCOffset >= 0 && xCOffset < "+s+") {\n xTexelR"+ne+"C"+ue+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+ne+"C"+ue+" = vec4(0.);\n }\n "),J+="\n xR"+ne+"C"+(ue+1)+" = vec4(\n xTexelR"+ne+"C"+ue+".zw, xTexelR"+ne+"C"+(ue+2)+".xy);\n "):J+="\n xCOffset = xC + "+Ae+";\n\n if(xR >= 0 && xR < "+i+" &&\n xCOffset >= 0 && xCOffset < "+s+") {\n xTexelR"+ne+"C"+(ue+2)+" = getX(batch, xR, xCOffset, d1);\n }\n\n xR"+ne+"C"+(ue+1)+" = xTexelR"+ne+"C"+(ue+2)+";\n "}}else ue= 0 && xR < "+i+") {\n ",l%2==1?(J+="\n xCOffset = xC + 1 - "+d+";\n if(xCOffset >= 0 && xCOffset < "+s+") {\n xTexelR"+ne+"C"+ue+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+ne+"C"+ue+" = vec4(0.);\n }\n\n if(xC + 1 >= 0 && xC + 1 < "+s+") {\n xTexelR"+ne+"C"+(ue+2)+" = getX(batch, xR, xC + 1, d1);\n } else {\n xTexelR"+ne+"C"+(ue+2)+" = vec4(0.);\n }\n\n xR"+ne+"C"+ue+" = vec4(\n xTexelR"+ne+"C"+ue+".zw, xTexelR"+ne+"C"+(ue+2)+".zw);\n ",ue+1= 0 && xCOffset < "+s+") {\n final = getX(batch, xR, xCOffset, d1);\n }\n xR"+ne+"C"+(ue+1)+" = vec4(xTexelR"+ne+"C"+(ue+2)+".xy, final.xy);\n ")):(J+="\n if(xC >= 0 && xC < "+s+") {\n xTexelR"+ne+"C"+ue+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+ne+"C"+ue+" = vec4(0.);\n }\n\n xCOffset = xC + "+d+";\n if(xCOffset >= 0 && xCOffset < "+s+") {\n xTexelR"+ne+"C"+(ue+2)+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+ne+"C"+(ue+2)+" = vec4(0.);\n }\n\n xR"+ne+"C"+ue+" = vec4(\n xTexelR"+ne+"C"+ue+".xy, xTexelR"+ne+"C"+(ue+2)+".xy);\n ",ue+11?[""+(c-1)/(p-1),"(y2-y1) * height_ratio","y1*"+U+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+U],Oe=M>1?[""+(l-1)/(M-1),"(x2-x1) * width_ratio","x1*"+J+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+J];this.userCode="\n const float height_ratio = float("+ne[0]+");\n const float width_ratio = float("+Oe[0]+");\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= "+s+") {\n return;\n }\n\n float height_scale = "+ne[1]+";\n float width_scale = "+Oe[1]+";\n\n float in_y = "+ne[2]+";\n if( in_y < 0.0 || in_y > "+U+" ) {\n setOutput(float("+i+"));\n return;\n }\n float in_x = "+Oe[2]+";\n if( in_x < 0.0 || in_x > "+J+" ) {\n setOutput(float("+i+"));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if("+("bilinear"===r?1:0)+" == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n "},km=function(t,n,e){this.variableNames=["x"],this.outputShape=t;var r=t.length,i=t[t.length-1],s=e?"<":">";this.userCode="\n int getIndex(int i) {\n "+(e?"return "+i+" -i - 1;":"return i;")+"\n }\n\n void main() {\n "+Gi(r)+" coords = getOutputCoords();\n int end = "+Dm(r,"coords")+";\n float val = 0.0;\n for (int i = "+i+" - 1; i >= 0; i -= 1) {\n int idx = getIndex(i);\n if (idx "+s+" end) {\n continue;\n }\n if (idx == end && "+n+") {\n continue;\n }\n "+Dm(r,"coords")+" = idx;\n val += getX("+function(c,l){if(1===c)return""+l;if(2===c)return l+".x, "+l+".y";if(3===c)return l+".x, "+l+".y, "+l+".z";if(4===c)return l+".x, "+l+".y, "+l+".z, "+l+".w";throw Error("Cumulative sum for rank "+c+" is not yet supported")}(r,"coords")+");\n }\n setOutput(val);\n }\n "};function Dm(t,n){if(1===t)return""+n;if(2===t)return n+".y";if(3===t)return n+".z";if(4===t)return n+".w";throw Error("Cumulative sum for rank "+t+" is not yet supported")}var b9=function(t){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=cr.DENSE;var n=ca(t),e=Bs();this.outputShape=t,this.userCode="\n ivec3 outCoordsFromFlatIndex(int index) {\n "+v2(["r","c","d"],t)+"\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = 4 * (resTexRC.x * "+n[1]+" + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getA(rc.x, rc.y, rc.z);\n }\n\n "+e.output+" = result;\n }\n "},L9=function(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=cr.DENSE;var n=ca(t),e=Bs();this.outputShape=t,this.userCode="\n ivec3 outCoordsFromFlatIndex(int index) {\n "+v2(["r","c","d"],t)+"\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = 4 * (resTexRC.x * "+n[1]+" + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n }\n\n "+e.output+" = result;\n }\n "},S9=function(){function t(n,e,r){this.variableNames=["x"],this.outputShape=[],this.outputShape=n,this.blockSize=e,this.dataFormat=r,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = "+this.getHeightCoordString()+";\n int w = "+this.getWidthCoordString()+";\n int d = "+this.getDepthCoordString()+";\n\n int in_h = h / "+e+";\n int offset_h = imod(h, "+e+");\n int in_w = w / "+e+";\n int offset_w = imod(w, "+e+");\n int offset_d = (offset_h * "+e+" + offset_w) *\n "+this.getOutputDepthSize()+";\n int in_d = d + offset_d;\n\n float result = "+this.getInputSamplingString()+";\n setOutput(result);\n }\n "}return t.prototype.getHeightCoordString=function(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"},t.prototype.getWidthCoordString=function(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"},t.prototype.getDepthCoordString=function(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"},t.prototype.getOutputDepthSize=function(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]},t.prototype.getInputSamplingString=function(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},t}(),Pm=function(t){this.variableNames=["X"],this.outputShape=[t,t],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n setOutput(val);\n }\n "},T9=function(t){this.variableNames=["A"],this.outTexUsage=Kn.DOWNLOAD;var n=Bs();this.outputShape=t,this.userCode="\n "+$3+"\n\n void main() {\n float x = getAAtOutCoords();\n "+n.output+" = encode_float(x);\n }\n "},w9=function(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=Kn.DOWNLOAD;var n=Bs();this.outputShape=t,this.userCode="\n "+$3+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n "+n.output+" = encode_float(x);\n }\n "},E9=function(t,n,e){void 0===e&&(e=!1),this.variableNames=["A"];var r=Bs(),i=n[0],s=n[1];this.outputShape=t;var c="result";e&&(c="floor(result * 255. + 0.5)"),this.userCode="\n "+cd(t)+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n int flatIndex = getFlatIndex(coords);\n int offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n \n int r = flatIndex / "+s+";\n int c = imod(flatIndex, "+s+");\n vec2 uv = (vec2(c, r) + halfCR) / vec2("+s+".0, "+i+".0);\n vec4 values = "+r.texture2D+"(A, uv);\n\n float result;\n\n if(offset == 0) {\n result = values[0];\n } else if(offset == 1) {\n result = values[1];\n } else if(offset == 2) {\n result = values[2];\n } else {\n result = values[3];\n }\n\n "+r.output+" = vec4("+c+", 0., 0., 0.);\n }\n "},x9=function(t,n,e){void 0===e&&(e=!1),this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var r=Bs(),i=n[0],s=n[1];this.outputShape=t;var c="",l="result";e&&(l="floor(result * 255. + 0.5)");for(var u=0;u<=1;u++)for(var d=0;d<=1;d++){var p=2*u+d;c+="\n localCoords = coords;\n if(localCoords[2] + "+d+" < "+t[2]+") {\n localCoords[2] += "+d+";\n if(localCoords[1] + "+u+" < "+t[1]+") {\n localCoords[1] += "+u+";\n\n flatIndex = getFlatIndex(localCoords);\n offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n\n r = flatIndex / "+s+";\n c = imod(flatIndex, "+s+");\n uv = (vec2(c, r) + halfCR) / vec2("+s+".0, "+i+".0);\n values = "+r.texture2D+"(A, uv);\n\n if(offset == 0) {\n result["+p+"] = values[0];\n } else if(offset == 1) {\n result["+p+"] = values[1];\n } else if(offset == 2) {\n result["+p+"] = values[2];\n } else {\n result["+p+"] = values[3];\n }\n }\n }\n "}this.userCode="\n "+cd(t)+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n vec4 result = vec4(0.);\n int flatIndex, r, c, offset;\n ivec3 localCoords;\n vec2 uv;\n vec4 values;\n\n "+c+"\n\n "+r.output+" = "+l+";\n }\n "},Om=function(t,n,e){this.variableNames=["real","imag"];var r=n[1];this.outputShape=n;var i=e?"2.0 * "+Math.PI:"-2.0 * "+Math.PI;this.userCode="\n const float exponentMultiplier = "+i+";\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n "+t+"\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float("+r+");\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < "+r+"; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / "+(e?r+".0":"1.0")+";\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n "},P9=function(){function t(n,e){this.outputShape=[],this.variableNames=["x"],this.outputShape=n,this.userCode="\n uniform float value;\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n "}return t.prototype.getCustomSetupFunc=function(n){var e=this;return function(r,i){null==e.valueLoc&&(e.valueLoc=r.getUniformLocationNoThrow(i,"value")),r.gl.uniform1f(e.valueLoc,n)}},t}(),O9=function(t,n,e){this.variableNames=["A","indices"];var r=t.slice();r[e]=n,this.outputShape=r,this.rank=r.length;var i=Gi(this.rank),s=function(c,l){var u=c.length;if(u>4)throw Error("Gather for rank "+u+" is not yet supported");if(1===u)return"int(getIndices(resRC))";for(var d=["resRC.x","resRC.y","resRC.z","resRC.w"],p=[],M=0;M1?"strides[j]":"strides")+";\n }\n setOutput(getX(flattenIndex, coords[1]));\n }\n "};function Im(t,n){var e=Bs();return Be(t,n,e.version+"\n precision highp float;\n "+e.attribute+" vec3 clipSpacePos;\n "+e.attribute+" vec2 uv;\n "+e.varyingVs+" vec2 resultUV;\n\n void main() {\n gl_Position = vec4(clipSpacePos, 1);\n resultUV = uv;\n }")}function Am(t,n){return vr(t,n,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function Nm(t,n){return mr(t,n,new Uint16Array([0,1,2,2,1,3]))}function Pl(t,n,e,r,i,s,c){No(e,r);var l=zr(t,n),u=t.TEXTURE_2D;return Vn(t,n,function(){return t.bindTexture(u,l)}),Vn(t,n,function(){return t.texParameteri(u,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE)}),Vn(t,n,function(){return t.texParameteri(u,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)}),Vn(t,n,function(){return t.texParameteri(u,t.TEXTURE_MIN_FILTER,t.NEAREST)}),Vn(t,n,function(){return t.texParameteri(u,t.TEXTURE_MAG_FILTER,t.NEAREST)}),Vn(t,n,function(){return t.texImage2D(u,0,i,e,r,0,s,c,null)}),Vn(t,n,function(){return t.bindTexture(t.TEXTURE_2D,null)}),l}function zm(t,n,e,r,i){var s=Qa(e,r);return Pl(t,n,s[0],s[1],i.internalFormatFloat,i.textureFormatFloat,t.FLOAT)}function Rm(t,n,e,r,i){var s=Qa(e,r);return Pl(t,n,s[0],s[1],i.internalFormatHalfFloat,i.textureFormatFloat,i.textureTypeHalfFloat)}function D0(t,n,e,r,i){var s=Qa(e,r);return Pl(t,n,s[0],s[1],t.RGBA,t.RGBA,t.UNSIGNED_BYTE)}function Ym(t,n,e,r,i){var s=Ca(e,r);return Pl(t,n,s[0],s[1],i.internalFormatPackedFloat,t.RGBA,t.FLOAT)}function Fm(t,n,e,r,i){var s=Ca(e,r);return Pl(t,n,s[0],s[1],i.internalFormatPackedHalfFloat,t.RGBA,i.textureTypeHalfFloat)}function Hm(t,n,e,r){return Vn(t,n,function(){return t.bindBuffer(t.ARRAY_BUFFER,r)}),Ci(t,n,e,"clipSpacePos",r,3,20,0)&&Ci(t,n,e,"uv",r,2,20,12)}function md(t,n,e,r,i,s,c){var l,u,d;Vn(t,n,function(){return t.bindTexture(t.TEXTURE_2D,e)}),s instanceof Uint8Array?(l=new Uint8Array(r*i*4),u=t.UNSIGNED_BYTE,d=t.RGBA):(l=new Float32Array(r*i*4),u=t.FLOAT,d=c.internalFormatPackedFloat),l.set(s),Vn(t,n,function(){return t.texImage2D(t.TEXTURE_2D,0,d,r,i,0,t.RGBA,u,l)}),Vn(t,n,function(){return t.bindTexture(t.TEXTURE_2D,null)})}function Bm(t,n,e,r){Vn(t,n,function(){return t.bindTexture(t.TEXTURE_2D,e)}),r.data instanceof Uint8Array?Vn(t,n,function(){return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,r.width,r.height,0,t.RGBA,t.UNSIGNED_BYTE,r.data)}):Vn(t,n,function(){return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r)}),Vn(t,n,function(){return t.bindTexture(t.TEXTURE_2D,null)})}function jm(t,n,e,r,i){var s=t.createBuffer();Vn(t,n,function(){return t.bindBuffer(t.PIXEL_PACK_BUFFER,s)});var c=16*e*r;return Vn(t,n,function(){return t.bufferData(t.PIXEL_PACK_BUFFER,c,t.STREAM_READ)}),Vn(t,n,function(){return t.readPixels(0,0,r,e,t.RGBA,t.FLOAT,0)}),Vn(t,n,function(){return t.bindBuffer(t.PIXEL_PACK_BUFFER,null)}),s}function Wm(t,n,e){var r=t,i=new Float32Array(e);return r.bindBuffer(r.PIXEL_PACK_BUFFER,n),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,i),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),i}function Um(t,n,e,r,i){var s=Qa(e,r),c=s[0],l=s[1],u=new Uint8Array(e*r*4);return Vn(t,n,function(){return t.readPixels(0,0,c,l,i.downloadTextureFormat,t.UNSIGNED_BYTE,u)}),new Float32Array(u.buffer)}function Vm(t,n,e,r,i,s,c,l){var x,u=t,d=new Float32Array((x=Ca(s,c))[0]*x[1]*4);return u.bindBuffer(u.PIXEL_PACK_BUFFER,n),u.getBufferSubData(u.PIXEL_PACK_BUFFER,0,d),u.bindBuffer(u.PIXEL_PACK_BUFFER,null),d}function pd(t,n,e,r){var i=new Float32Array(e*r*4);return Vn(t,n,function(){return t.readPixels(0,0,r,e,t.RGBA,t.FLOAT,i)}),i}var A9=Object.freeze({createVertexShader:Im,createVertexBuffer:Am,createIndexBuffer:Nm,createFloat32MatrixTexture:zm,createFloat16MatrixTexture:Rm,createUnsignedBytesMatrixTexture:D0,createPackedMatrixTexture:Ym,createFloat16PackedMatrixTexture:Fm,bindVertexProgramAttributeStreams:Hm,uploadDenseMatrixToTexture:md,uploadPixelDataToTexture:Bm,createBufferFromOutputTexture:jm,downloadFloat32MatrixFromBuffer:Wm,downloadByteEncodedFloatMatrixFromOutputTexture:Um,downloadPackedMatrixFromBuffer:Vm,downloadMatrixFromPackedOutputTexture:pd}),Gm=function(){function t(n){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var e=X().getNumber("WEBGL_VERSION");null!=n?(this.gl=n,$i(e,n)):this.gl=Ii(e);var r="WEBGL_color_buffer_float";if(1===X().getNumber("WEBGL_VERSION")){if(this.textureFloatExtension=Me(this.gl,this.debug,"OES_texture_float"),Gn(this.gl,"OES_texture_half_float"))this.textureHalfFloatExtension=Me(this.gl,this.debug,"OES_texture_half_float");else if(X().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(r),Gn(this.gl,"EXT_color_buffer_half_float"))this.colorBufferHalfFloatExtension=Me(this.gl,this.debug,"EXT_color_buffer_half_float");else if(X().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(Gn(this.gl,r="EXT_color_buffer_float"))this.colorBufferFloatExtension=this.gl.getExtension(r);else{if(!Gn(this.gl,"EXT_color_buffer_half_float"))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float")}this.vertexBuffer=Am(this.gl,this.debug),this.indexBuffer=Nm(this.gl,this.debug),this.framebuffer=$o(this.gl,this.debug),this.textureConfig=qi(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(t.prototype,"debug",{get:function(){return X().getBool("DEBUG")},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){var n=this;if(!this.disposed){null!=this.program&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),null!=this.outputTexture&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");var e=this.gl;Vn(e,this.debug,function(){return e.finish()}),Vn(e,this.debug,function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)}),Vn(e,this.debug,function(){return e.deleteFramebuffer(n.framebuffer)}),Vn(e,this.debug,function(){return e.bindBuffer(e.ARRAY_BUFFER,null)}),Vn(e,this.debug,function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}),Vn(e,this.debug,function(){return e.deleteBuffer(n.indexBuffer)}),this.disposed=!0}},t.prototype.createFloat32MatrixTexture=function(n,e){return this.throwIfDisposed(),zm(this.gl,this.debug,n,e,this.textureConfig)},t.prototype.createFloat16MatrixTexture=function(n,e){return this.throwIfDisposed(),Rm(this.gl,this.debug,n,e,this.textureConfig)},t.prototype.createUnsignedBytesMatrixTexture=function(n,e){return this.throwIfDisposed(),D0(this.gl,this.debug,n,e)},t.prototype.uploadPixelDataToTexture=function(n,e){this.throwIfDisposed(),Bm(this.gl,this.debug,n,e)},t.prototype.uploadDenseMatrixToTexture=function(n,e,r,i){this.throwIfDisposed(),md(this.gl,this.debug,n,e,r,i,this.textureConfig)},t.prototype.createFloat16PackedMatrixTexture=function(n,e){return this.throwIfDisposed(),Fm(this.gl,this.debug,n,e,this.textureConfig)},t.prototype.createPackedMatrixTexture=function(n,e){return this.throwIfDisposed(),Ym(this.gl,this.debug,n,e,this.textureConfig)},t.prototype.deleteMatrixTexture=function(n){var e=this;this.throwIfDisposed(),this.outputTexture===n&&(wi(this.gl,this.debug,this.framebuffer),this.outputTexture=null),Vn(this.gl,this.debug,function(){return e.gl.deleteTexture(n)})},t.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(n,e,r){var i=this;return this.downloadMatrixDriver(n,function(){return Um(i.gl,i.debug,e,r,i.textureConfig)})},t.prototype.downloadPackedMatrixFromBuffer=function(n,e,r,i,s,c){return Vm(this.gl,n,0,0,0,s,c)},t.prototype.downloadFloat32MatrixFromBuffer=function(n,e){return Wm(this.gl,n,e)},t.prototype.createBufferFromTexture=function(n,e,r){this.bindTextureToFrameBuffer(n);var i=jm(this.gl,this.debug,e,r);return this.unbindTextureToFrameBuffer(),i},t.prototype.createAndWaitForFence=function(){var n=this.createFence(this.gl);return this.pollFence(n)},t.prototype.createFence=function(n){var e,r,i=this;if(X().getBool("WEBGL_FENCE_API_ENABLED")){var s=n,c=s.fenceSync(s.SYNC_GPU_COMMANDS_COMPLETE,0);n.flush(),r=function(){var l=s.clientWaitSync(c,0,0);return l===s.ALREADY_SIGNALED||l===s.CONDITION_SATISFIED},e=c}else X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(e=this.beginQuery(),this.endQuery(),r=function(){return i.isQueryAvailable(e,X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):r=function(){return!0};return{query:e,isFencePassed:r}},t.prototype.downloadMatrixFromPackedTexture=function(n,e,r){var i=this;return this.downloadMatrixDriver(n,function(){return pd(i.gl,i.debug,e,r)})},t.prototype.createProgram=function(n){this.throwIfDisposed();var e=this.gl,r=ht(e,this.debug,n),i=Im(e,this.debug),s=Bn(e,this.debug);return Vn(e,this.debug,function(){return e.attachShader(s,i)}),Vn(e,this.debug,function(){return e.attachShader(s,r)}),Xn(e,this.debug,s),this.debug&&Yr(e,this.debug,s),this.vertexAttrsAreBound||(this.setProgram(s),this.vertexAttrsAreBound=Hm(e,this.debug,this.program,this.vertexBuffer)),s},t.prototype.deleteProgram=function(n){var e=this;this.throwIfDisposed(),n===this.program&&(this.program=null),null!=n&&Vn(this.gl,this.debug,function(){return e.gl.deleteProgram(n)})},t.prototype.setProgram=function(n){var e=this;this.throwIfDisposed(),this.program=n,null!=this.program&&this.debug&&Yr(this.gl,this.debug,this.program),Vn(this.gl,this.debug,function(){return e.gl.useProgram(n)})},t.prototype.getUniformLocation=function(n,e,r){return void 0===r&&(r=!0),this.throwIfDisposed(),r?ji(this.gl,this.debug,n,e):Ts(this.gl,n,e)},t.prototype.getAttributeLocation=function(n,e){var r=this;return this.throwIfDisposed(),Vn(this.gl,this.debug,function(){return r.gl.getAttribLocation(n,e)})},t.prototype.getUniformLocationNoThrow=function(n,e){return this.throwIfDisposed(),this.gl.getUniformLocation(n,e)},t.prototype.setInputMatrixTexture=function(n,e,r){this.throwIfDisposed(),this.throwIfNoProgram(),ws(this.gl,this.debug,0,n,e,r)},t.prototype.setOutputMatrixTexture=function(n,e,r){this.setOutputMatrixTextureDriver(n,r,e)},t.prototype.setOutputPackedMatrixTexture=function(n,e,r){this.throwIfDisposed();var i=Ca(e,r);this.setOutputMatrixTextureDriver(n,i[0],i[1])},t.prototype.setOutputMatrixWriteRegion=function(n,e,r,i){this.setOutputMatrixWriteRegionDriver(r,n,i,e)},t.prototype.setOutputPackedMatrixWriteRegion=function(n,e,r,i){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},t.prototype.debugValidate=function(){null!=this.program&&Yr(this.gl,this.debug,this.program),ps(this.gl)},t.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var n=this.gl;this.debug&&this.debugValidate(),Vn(n,this.debug,function(){return n.drawElements(n.TRIANGLES,6,n.UNSIGNED_SHORT,0)})},t.prototype.blockUntilAllProgramsCompleted=function(){var n=this;this.throwIfDisposed(),Vn(this.gl,this.debug,function(){return n.gl.finish()})},t.prototype.getQueryTimerExtension=function(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=Me(this.gl,this.debug,2===X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},t.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},t.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},t.prototype.beginQuery=function(){if(2===X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var n=this.gl,e=this.getQueryTimerExtensionWebGL2(),r=n.createQuery();return n.beginQuery(e.TIME_ELAPSED_EXT,r),r}var i=this.getQueryTimerExtensionWebGL1(),s=i.createQueryEXT();return i.beginQueryEXT(i.TIME_ELAPSED_EXT,s),s},t.prototype.endQuery=function(){if(2!==X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var n=this.getQueryTimerExtensionWebGL1();n.endQueryEXT(n.TIME_ELAPSED_EXT)}else{var e=this.gl,r=this.getQueryTimerExtensionWebGL2();e.endQuery(r.TIME_ELAPSED_EXT)}},t.prototype.waitForQueryAndGetTime=function(n){return st(this,void 0,void 0,function(){var e=this;return Ln(this,function(r){switch(r.label){case 0:return[4,nc(function(){return e.disposed||e.isQueryAvailable(n,X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))})];case 1:return r.sent(),[2,this.getQueryTime(n,X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}})})},t.prototype.getQueryTime=function(n,e){if(0===e)return null;if(2===e){var r=this.gl;return r.getQueryParameter(n,r.QUERY_RESULT)/1e6}var i=this.getQueryTimerExtensionWebGL1();return i.getQueryObjectEXT(n,i.QUERY_RESULT_EXT)/1e6},t.prototype.isQueryAvailable=function(n,e){if(0===e)return!0;if(2===e){var r=this.gl,i=this.getQueryTimerExtensionWebGL2(),s=r.getQueryParameter(n,r.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),s&&!this.disjoint}return s=(i=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(n,i.QUERY_RESULT_AVAILABLE_EXT),null==this.disjoint&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),s&&!this.disjoint},t.prototype.pollFence=function(n){var e=this;return new Promise(function(r){e.addItemToPoll(function(){return n.isFencePassed()},function(){return r()})})},t.prototype.pollItems=function(){for(var n=function(r){for(var i=0;i1||nc(function(){return r.pollItems(),0===r.itemsToPoll.length})},t.prototype.bindTextureToFrameBuffer=function(n){this.throwIfDisposed(),Ki(this.gl,this.debug,n,this.framebuffer),this.debug&&ps(this.gl)},t.prototype.unbindTextureToFrameBuffer=function(){null!=this.outputTexture?(Ki(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&ps(this.gl)):wi(this.gl,this.debug,this.framebuffer)},t.prototype.downloadMatrixDriver=function(n,e){this.bindTextureToFrameBuffer(n);var r=e();return this.unbindTextureToFrameBuffer(),r},t.prototype.setOutputMatrixTextureDriver=function(n,e,r){this.throwIfDisposed();var i=this.gl;Ki(i,this.debug,n,this.framebuffer),this.debug&&ps(i),this.outputTexture=n,Vn(i,this.debug,function(){return i.viewport(0,0,e,r)}),Vn(i,this.debug,function(){return i.scissor(0,0,e,r)})},t.prototype.setOutputMatrixWriteRegionDriver=function(n,e,r,i){var s=this;this.throwIfDisposed(),Vn(this.gl,this.debug,function(){return s.gl.scissor(n,e,r,i)})},t.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},t.prototype.throwIfNoProgram=function(){if(null==this.program)throw new Error("No GPU program is currently set.")},t}();function _d(t,n){if(t.length!==n.length)throw Error("Binary was compiled with "+t.length+" inputs, but was executed with "+n.length+" inputs");t.forEach(function(e,r){var i=e.logicalShape,s=n[r],c=s.shape;if(!yi(i,c))throw Error("Binary was compiled with different shapes than the current args. Shapes "+i+" and "+c+" must match");if(!e.isUniform||!s.isUniform){var l=e.texShape,u=s.isUniform?null:s.texData.texShape;if(!yi(l,u))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+l+" and "+u+" must match")}})}var N9=function(t,n,e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t;for(var i=e.inChannels,s=e.strideWidth,c=e.strideHeight,l=e.padInfo,u=e.outWidth,d=e.dilationWidth,p=e.dilationHeight,M=e.dataFormat,x=l.left,R=l.top,U=i*e.filterWidth,J=Bs(),ne="channelsLast"===M,ue=ne?0:1,Ie=ne?1:2,Ae="",Oe=0;Oe<=1;Oe++)for(var Fe=0;Fe<=1;Fe++)Ae+="\n blockIndex = rc.y + "+Fe+";\n pos = rc.x + "+Oe+";\n\n if(blockIndex < "+t[1]+" && pos < "+t[0]+") {\n offsetY = int(blockIndex / ("+u+")) * "+c+" - "+R+";\n d0 = offsetY + "+p+" * (pos / "+U+");\n\n if(d0 < "+n[ue]+" && d0 >= 0) {\n\n offsetX = int(mod(float(blockIndex), "+u+".) * "+s+". - "+x+".);\n d1 = offsetX + "+d+" * (int(mod(float(pos), "+U+".) / "+i+".));\n\n if(d1 < "+n[Ie]+" && d1 >= 0) {\n\n ch = int(mod(float(pos), "+i+".));\n\n if ("+ne+") {\n innerDims = vec2(d1, ch);\n result["+(2*Oe+Fe)+"] = getChannel(\n getA(d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n } else {\n innerDims = vec2(d0, d1);\n result["+(2*Oe+Fe)+"] = getChannel(\n getA(ch, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n }\n }\n ";this.userCode="\n void main() {\n ivec2 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n vec2 innerDims;\n\n "+Ae+"\n\n "+J.output+" = result;\n }\n "},z9=function(t,n,e,r,i){this.variableNames=["x"],this.outputShape=[];var c=n,l=t[3]-1;this.outputShape=t;var u="float("+e+") + float("+r+") * sum";this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -"+c+"; j <= "+c+"; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= "+l+") {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * "+(.5===i?"inversesqrt("+u+")":1===i?"1.0/("+u+")":"exp(log("+u+") * float(-"+i+"));")+";\n setOutput(val);\n }\n "},R9=function(t,n,e,r,i){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=t,this.depth=t[3],this.depthRadius=n,this.bias=e,this.alpha=r,this.beta=i,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < "+this.depth+"; ++d) {\n int depthBegin = int(max(0.0, float(d - "+n+")));\n int depthEnd = int(min(float("+this.depth+"),\n float(d + "+n+" + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = "+this.depth+";\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float("+r+") * norm + float("+e+");\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float("+r+")\n * float("+i+")\n * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * "+i+");\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n "},$m=function(t,n,e,r,i){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;var c=n,l=t[3]-1;this.outputShape=t;var u="float("+e+") + float("+r+") * sum";this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords.x;\n int r = coords.y;\n int c = coords.z;\n int d = coords.w;\n\n bool hasNextCol = d < "+this.outputShape[3]+";\n bool hasNextRow = c < "+this.outputShape[2]+";\n\n vec4 sum = vec4(0.);\n vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n vec4 xAtOutputCoords = vec4(\n getChannel(xFragAtOutputCoords, vec2(c, d)),\n hasNextCol ?\n getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n hasNextRow ?\n getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n (hasNextRow && hasNextCol) ?\n getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n );\n\n int firstChannel = d - "+c+";\n vec2 cache = vec2(0.);\n if(firstChannel >= 0){\n vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n if(hasNextRow){\n cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n }\n }\n\n ivec2 depth = ivec2(d, d + 1);\n for (int j = - "+c+"; j <= "+c+"; j++) {\n ivec2 idx = depth + j;\n bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n bvec2 belowUpperBound = lessThanEqual(idx, ivec2("+l+"));\n\n bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n if(depthInRange || depthPlusOneInRange){\n vec4 z = vec4(0.);\n vec4 xFragAtCurrentDepth;\n z.xz = cache.xy;\n if(depthPlusOneInRange && hasNextCol){\n xFragAtCurrentDepth = idx.y != d ?\n getX(b, r, c, idx.y) : xFragAtOutputCoords;\n z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n if(hasNextRow){\n z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n }\n }\n cache.xy = z.yw;\n sum += z * z;\n }\n }\n vec4 result = xAtOutputCoords * "+(.5===i?"inversesqrt("+u+")":1===i?"1.0/("+u+")":"exp(log("+u+") * float(-"+i+"));")+";\n setOutput(result);\n }\n "},Y9=function(t){this.variableNames=["dy","maxPos"],this.outputShape=t.inShape;var i=t.effectiveFilterHeight,s=t.effectiveFilterWidth;this.userCode="\n const ivec2 pads = ivec2("+(i-1-t.padInfo.top)+", "+(s-1-t.padInfo.left)+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+i+";\n wR += "+t.dilationHeight+") {\n float dyR = float(dyRCorner + wR) / "+t.strideHeight+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+s+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+t.strideWidth+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = "+(i*s-1)+" - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * "+s+" + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n "},F9=function(t){this.variableNames=["dy","maxPos"],this.outputShape=t.inShape;var l=t.effectiveFilterDepth,u=t.effectiveFilterHeight,d=t.effectiveFilterWidth;this.userCode="\n const ivec3 pads = ivec3("+(l-1-t.padInfo.front)+", "+(u-1-t.padInfo.top)+", "+(d-1-t.padInfo.left)+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < "+l+";\n wD += "+t.dilationDepth+") {\n float dyD = float(dyDCorner + wD) / "+t.strideDepth+".0;\n\n if (dyD < 0.0 || dyD >= "+t.outDepth+".0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < "+u+";\n wR += "+t.dilationHeight+") {\n float dyR = float(dyRCorner + wR) / "+t.strideHeight+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+d+";\n wC += "+t.dilationWidth+") {\n float dyC = float(dyCCorner + wC) / "+t.strideWidth+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n int maxPosValue = "+(l*u*d-1)+" -\n int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue =\n wD * "+u+" * "+d+" +\n wR * "+d+" + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n }\n setOutput(dotProd);\n }\n "},X3=function(t,n,e,r,i,s,c){void 0===e&&(e=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===c&&(c=!1),this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;var u=Math.ceil((e?t[1]:t[2])/2),d=e?"i * 2, rc.y":"rc.y, i * 2",p=r?"rc.z, i * 2":"i * 2, rc.z",M=e?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],x=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],R="",U="";s&&(R=c?"vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n "+s+"\n }":"vec4 activation(vec4 x) {\n "+s+"\n }",U="result = activation(result);");var J=i?"result += getBiasAtOutCoords();":"";i&&this.variableNames.push("bias"),c&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+R+"\n\n const float sharedDimension = "+u+".0;\n\n vec4 dot2x2ARowBCol(ivec3 rc) {\n vec4 result = vec4(0);\n for (int i = 0; i < "+u+"; i++) {\n vec4 a = getMatrixA(rc.x, "+d+");\n vec4 b = getMatrixB(rc.x, "+p+");\n\n // These swizzled products need to be separately added.\n // See: https://github.com/tensorflow/tfjs/issues/1735\n result += ("+M[0]+" * "+x[0]+");\n result += ("+M[1]+" * "+x[1]+");\n }\n return result;\n }\n\n void main() {\n ivec3 rc = getOutputCoords();\n vec4 result = dot2x2ARowBCol(rc);\n\n "+J+"\n\n "+U+"\n\n setOutput(result);\n }\n "},H9=function(){function t(n,e,r){this.variableNames=["probs"],this.outputShape=[n,r],this.userCode="\n uniform float seed;\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < "+(e-1)+"; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float("+(e-1)+"));\n }\n "}return t.prototype.getCustomSetupFunc=function(n){var e=this;return function(r,i){null==e.seedLoc&&(e.seedLoc=r.getUniformLocation(i,"seed")),r.gl.uniform1f(e.seedLoc,n)}},t}(),B9=function(t,n,e,r){this.variableNames=["indices"],this.outputShape=[t,n],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float("+r+"), float("+e+"),\n float(index == coords.y)));\n }\n "},j9=function(t){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=t;var l,d,p,n=t.length;if(0===n)this.userCode="\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n ";else{var e=uc("rc",n),r=Gi(n),i=function(l,u,d){if(1===l)return"rc > "+u[0];for(var p="",M=l-2;M= "+u[M],M= "+u+";\n bool rEdge = rp1 >= "+d+";\n "}(n,t[t.length-1],t[t.length-2],e),c=(p=function(M,x){for(var R=[],U=0;U<=1;U++)for(var J=0;J<=1;J++){for(var ne=(0===U?"r":"rp1")+", "+(0===J?"c":"cp1"),ue=2;ue= "+l[0]+" ? 0. : getA(rc + 1),\n 0, 0":"getA("+p[0]+"),\n cEdge ? 0. : getA("+p[1]+"),\n rEdge ? 0. : getA("+p[2]+"),\n rEdge || cEdge ? 0. : getA("+p[3]+")");this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n\n if("+i+") {\n setOutput(vec4(0));\n } else {\n "+s+"\n\n setOutput(vec4("+c+"));\n }\n }\n "}},gd=function(t,n,e){this.variableNames=["x"],this.outputShape=n.map(function(u,d){return u[0]+t[d]+u[1]});var r=t.length,i=Gi(r),s=n.map(function(u){return u[0]}).join(","),c=n.map(function(u,d){return u[0]+t[d]}).join(","),l=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=1!==r?"\n "+i+" start = "+i+"("+s+");\n "+i+" end = "+i+"("+c+");\n\n void main() {\n "+i+" outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(float("+e+"));\n } else {\n "+i+" coords = outC - start;\n setOutput(getX("+l+"));\n }\n }\n ":"\n int start = "+s+";\n int end = "+c+";\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(float("+e+"));\n } else {\n setOutput(getX(outC - start));\n }\n }\n "},W9=function(t,n,e){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n.map(function(ne,ue){return ne[0]+t[ue]+ne[1]});for(var r=t.length,i=Gi(r),s=n.map(function(ne){return ne[0]}).join(","),c=n.map(function(ne,ue){return ne[0]+t[ue]}).join(","),l=uc("rc",r),u=uc("source",r),d=l[r-1]+" < "+this.outputShape[r-1],p=1===r?"source":"vec2("+u.slice(-2).join()+")",M=[i+" rc = outputLoc;",l[r-1]+" += 1;\n if("+d+") {\n ",1===r?"":"}\n rc = outputLoc;\n "+l[r-2]+" += 1;\n if("+l[r-2]+" < "+this.outputShape[r-2]+") {",1===r?"":" "+l[r-1]+" += 1;\n if("+d+") {"],x=1===r?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",R="",U=0,J=1===r?2:4;U= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+d+";\n wC += "+l+") {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value >= currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = wR * "+d+" + wC;\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n ";else{var U=n+"("+n+"("+n+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"avg"===n&&(U="avgValue / count");var J=4*Math.floor(r/4),ne=r%4,ue="\n if ("+x+") {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n ";this.userCode="\n const ivec2 strides = ivec2("+i+", "+s+");\n const ivec2 pads = ivec2("+p+", "+M+");\n const float initializationValue = "+R+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= "+t.inWidth+") {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4("+R+");\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < "+u+";\n wR += "+c+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+J+"; wC += 4) {\n int xC = xCCorner + wC * "+l+";\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+l+", d),\n getValue(batch, xR, xC + 2 * "+l+", d),\n getValue(batch, xR, xC + 3 * "+l+", d)\n );\n\n "+ue+"\n }\n\n int xC = xCCorner + "+J+";\n if ("+(1===ne)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+ue+"\n } else if ("+(2===ne)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+l+", d),\n initializationValue,\n initializationValue\n );\n\n "+ue+"\n } else if ("+(3===ne)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+l+", d),\n getValue(batch, xR, xC + 2 * "+l+", d),\n initializationValue\n );\n\n "+ue+"\n }\n }\n setOutput("+U+");\n }\n "}},yd=function(t,n,e){if(this.variableNames=["x"],"avg"===n&&e)throw new Error("Cannot compute positions for average pool.");var r=t.filterWidth,i=t.strideDepth,s=t.strideHeight,c=t.strideWidth,l=t.dilationDepth,u=t.dilationHeight,d=t.dilationWidth,p=t.effectiveFilterDepth,M=t.effectiveFilterHeight,x=t.effectiveFilterWidth,R=t.padInfo.front,U=t.padInfo.top,J=t.padInfo.left;this.outputShape=t.outShape;var ne="avg"===n,ue="0.0";if(ne||(ue="-1.0 / 1e-20"),e)this.userCode="\n const ivec3 strides =\n ivec3("+i+", "+s+", "+c+");\n const ivec3 pads = ivec3("+R+", "+U+", "+J+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n\n for (int wD = 0; wD < "+p+";\n wD += "+l+") {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= "+t.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+M+";\n wR += "+u+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+x+";\n wC += "+d+") {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float value = getX(batch, xD, xR, xC, ch);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value >= currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition =\n wD * "+M+" * "+x+" +\n wR * "+x+" + wC;;\n }\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n ";else{var Ie=n+"("+n+"("+n+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"avg"===n&&(Ie="avgValue / count");var Ae=4*Math.floor(r/4),Oe=r%4,Fe="\n if ("+ne+") {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n ";this.userCode="\n const ivec3 strides =\n ivec3("+i+", "+s+", "+c+");\n const ivec3 pads = ivec3("+R+", "+U+", "+J+");\n const float initializationValue = "+ue+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xD, int xR, int xC, int ch) {\n if (xC < 0 || xC >= "+t.inWidth+") {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xD, xR, xC, ch);\n }\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n // ? = to be determined\n vec4 minMaxValue = vec4("+ue+");\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wD = 0; wD < "+p+";\n wD += "+l+") {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= "+t.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+M+";\n wR += "+u+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+Ae+"; wC += 4) {\n int xC = xCCorner + wC * "+d+";\n\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+d+", ch),\n getValue(batch, xD, xR, xC + 2 * "+d+", ch),\n getValue(batch, xD, xR, xC + 3 * "+d+", ch)\n );\n\n "+Fe+"\n }\n\n int xC = xCCorner + "+Ae+";\n if ("+(1===Oe)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+Fe+"\n } else if ("+(2===Oe)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+d+", ch),\n initializationValue,\n initializationValue\n );\n\n "+Fe+"\n } else if ("+(3===Oe)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+d+", ch),\n getValue(batch, xD, xR, xC + 2 * "+d+", ch),\n initializationValue\n );\n\n "+Fe+"\n }\n }\n setOutput("+Ie+");\n }\n }\n "}},Km=function(t,n){this.variableNames=["x"];var e=t.windowSize,r=t.batchSize,i=t.inSize,s=Math.ceil(i/e);this.outputShape=[r,s];var c="0.0",l="";"prod"===n?c="1.0":"min"===n?(c="1.0 / 1e-20",l="min"):"max"===n&&(c="-1.0 / 1e-20",l="max");var u=n+"("+n+"("+n+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"sum"===n?u="sumValue":"prod"===n?u="prodValue":"all"===n?u="allValue":"any"===n&&(u="anyValue");var d=4*Math.floor(e/4),p=e%4,M="\n if ("+("sum"===n)+") {\n sumValue += dot(values, ones);\n } else if ("+("prod"===n)+") {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = "+l+"(values, minMaxValue);\n }\n ",x="vec4";"all"===n?(c="1.0",M="\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n ",x="bvec4"):"any"===n&&(c="0.0",M="\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n ",x="bvec4");var R="";i%e>0&&(R="\n if (inIdx < 0 || inIdx >= "+i+") {\n return initializationValue;\n }\n "),this.userCode="\n const float initializationValue = "+c+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n "+R+"\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+e+";\n\n vec4 minMaxValue = vec4("+c+");\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < "+d+"; i += 4) {\n int inIdx = inOffset + i;\n "+x+" values = "+x+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n "+M+"\n }\n\n int inIdx = inOffset + "+d+";\n if ("+(1===p)+") {\n "+x+" values = "+x+"(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+M+"\n } else if ("+(2===p)+") {\n "+x+" values = "+x+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n "+M+"\n } else if ("+(3===p)+") {\n "+x+" values = "+x+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n "+M+"\n }\n setOutput("+u+");\n }\n "},U9=function(t,n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t;for(var e="",r=0;r<4;r++){var i="thisRC = rc;";r%2==1&&(i+="thisRC.z += 1;"),r>1&&(i+="thisRC.y += 1;"),e+="\n "+i+"\n "+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+"\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result["+r+"] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n "+(r>0?"}":"")+"\n "}this.userCode="\n \n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n "+v2(["r","c","d"],n)+"\n return ivec3(r, c, d);\n }\n \n "+cd(t)+"\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = "+t[1]+";\n int cols = "+t[2]+";\n\n "+e+"\n\n setOutput(result);\n }\n "},Xm=function(t,n,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=n.shape;var r=n.shape,i=r[1],s=r[2],c=t.shape,l=c[1],u=c[2],d=[e&&l>1?i-1:i,e&&u>1?s-1:s],p=[e&&l>1?l-1:l,e&&u>1?u-1:u],M=d[0]/p[0],x=d[1]/p[1],R=1/M,U=1/x,J=2*Math.ceil(R)+2,ne=2*Math.ceil(U)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+M+");\n const float widthScale = float("+x+");\n\n const float invHeightScale = float("+R+");\n const float invWidthScale = float("+U+");\n\n const int winHeight = int("+J+");\n const int winWidth = int("+ne+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+l+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+u+") {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), "+(i-1)+".0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), "+(s-1)+".0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},V9=function(t,n,e,r){this.variableNames=["A"],this.outputShape=[];var s=t[1],c=t[2];this.outputShape=[t[0],n,e,t[3]];var u=[r&&n>1?s-1:s,r&&e>1?c-1:c],d=[r&&n>1?n-1:n,r&&e>1?e-1:e];this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+u[0]/d[0]+",\n "+u[1]/d[1]+");\n const vec2 inputShapeRC = vec2("+s+".0, "+c+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n "},Zm=function(t,n,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var s=t[1],c=t[2],l=t[3];this.outputShape=[t[0],n,e,l];var u=[r&&n>1?s-1:s,r&&e>1?c-1:c],d=[r&&n>1?n-1:n,r&&e>1?e-1:e];this.userCode="\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n "+u[0]/d[0]+",\n "+u[1]/d[1]+",\n "+u[1]/d[1]+");\n const vec3 inputShapeRC = vec3("+s+".0, "+c+".0,\n "+c+".0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < "+(l-1)+";\n bool hasNextRow = coords.z < "+(e-1)+";\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n "},G9=function(t,n,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=n.shape;var r=n.shape,i=r[1],s=r[2],c=t.shape,l=c[1],u=c[2],d=[e&&l>1?i-1:i,e&&u>1?s-1:s],p=[e&&l>1?l-1:l,e&&u>1?u-1:u],M=d[0]/p[0],x=d[1]/p[1],R=1/M,U=1/x,J=2*Math.ceil(R)+2,ne=2*Math.ceil(U)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+M+");\n const float widthScale = float("+x+");\n\n const float invHeightScale = float("+R+");\n const float invWidthScale = float("+U+");\n\n const int winHeight = int("+J+");\n const int winWidth = int("+ne+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+l+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+u+") {\n continue;\n }\n\n float sourceFracRow =\n float("+d[0]+") *\n (float(dyR) / float("+p[0]+"));\n\n float sourceFracCol =\n float("+d[1]+") *\n (float(dyC) / float("+p[1]+"));\n\n int sourceNearestRow = int(min(\n float(int("+i+") - 1),\n "+e+" ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int("+s+") - 1),\n "+e+" ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},$9=function(t,n,e,r){this.variableNames=["A"],this.outputShape=[];var s=t[1],c=t[2];this.outputShape=[t[0],n,e,t[3]];var u=[r&&n>1?s-1:s,r&&e>1?c-1:c],d=[r&&n>1?n-1:n,r&&e>1?e-1:e];this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+u[0]/d[0]+",\n "+u[1]/d[1]+");\n const vec2 inputShapeRC = vec2("+s+".0, "+c+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + "+(r?"0.5":"0.0")+")));\n\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n "},K9=function(t,n){this.variableNames=["x"];var e=t.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");if(this.outputShape=t,1!==e){var r=t.map(function(s,c){return-1!==n.indexOf(l=c)&&1!==t[l]?t[l]+" - coords["+l+"] - 1":"coords["+l+"]";var l}).join(","),i=Gi(e);this.userCode="\n void main() {\n "+i+" coords = getOutputCoords();\n setOutput(getX("+r+"));\n }\n "}else this.userCode="\n void main() {\n int coord = getOutputCoords();\n setOutput(getX("+t[0]+" - coord - 1));\n }\n "},X9=function(t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;var e=t.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");this.outputShape=t;var u,r=uc("rc",e),i=r[e-1]+" + 1 < "+this.outputShape[e-1],s=r[e-2]+" + 1 < "+this.outputShape[e-2],c=Gi(e);function l(u){var d=t.map(function(p,M){return R=u,-1!==n.indexOf(x=M)&&1!==t[x]?t[x]+" - "+R[x]+" - 1":""+R[x];var x,R});return"getChannel(getX("+d.join(",")+"), vec2("+d.slice(-2).join(",")+"))"}this.userCode=1===e?"\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX("+t[0]+" - rc - 1),\n "+t[0]+" - rc - 1);\n if("+i+"){\n result.g = getChannel(getX("+t[0]+" - (rc + 1) - 1),\n "+t[0]+" - (rc + 1) - 1);\n }\n setOutput(result);\n }\n ":"\n void main() {\n "+c+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = "+l(r.slice())+";\n if("+i+"){\n result.g = "+((u=r.slice())[e-1]="("+u[e-1]+" + 1)",l(u)+";\n }\n if(")+s+") {\n result.b = "+function(u){return u[e-2]="("+u[e-2]+" + 1)",l(u)}(r.slice())+";\n if("+i+") {\n result.a = "+function(u){return u[e-1]="("+u[e-1]+" + 1)",u[e-2]="("+u[e-2]+" + 1)",l(u)}(r.slice())+";\n }\n }\n setOutput(result);\n }\n "},Jm=function(t,n,e,r,i,s,c){void 0===c&&(c=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=s;var l=Gi(i.length),u=Gi(s.length),d="";1===e?d="i":2===e&&(d="i, j");var M="";1===r?M="i":2===r&&(M="i, coords[1]"),this.userCode="\n "+l+" strides = "+l+"("+i+");\n\n void main() {\n "+u+" coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < "+t+"; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < "+n+"; j++) {\n int index = round(getIndices("+d+"));\n flattenedIndex += index * "+(n>1?"strides[j]":"strides")+";\n }\n if (flattenedIndex == coords[0]) {\n sum += getUpdates("+M+");\n found = true;\n }\n }\n setOutput(mix(getDefaultValue(), sum, float(found)));\n }\n "},Z9=function(t,n){this.variableNames=["x","segmentIds"];var e=t.windowSize,r=t.batchSize,i=t.inSize,s=t.numSegments,c=s*Math.ceil(i/e);this.outputShape=[r,c];var l=4*Math.floor(e/4),u=e%4,d="\n sumValue += dot(values, segFilter);\n ",p="";i%e>0&&(p="\n if (inIdx < 0 || inIdx >= "+i+") {\n return initializationValue;\n }\n ");var M="";i%e>0&&(M="\n if (inIdx < 0 || inIdx >= "+i+") {\n return -1.0;\n }\n "),this.userCode="\n const float initializationValue = 0.0;\n\n float getValue(int batch, int inIdx) {\n "+p+"\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n "+M+"\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n "+s+")) * float("+e+"));\n int currentSeg = int(mod(float(outIdx), float("+s+")));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < "+l+"; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n "+d+"\n }\n\n int inIdx = inOffset + "+l+";\n if ("+(1===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n "+d+"\n } else if ("+(2===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n "+d+"\n } else if ("+(3===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n "+d+"\n }\n setOutput(sumValue);\n }\n "},J9=function(t,n,e){var r,i;if(this.variableNames=["c","a","b"],this.outputShape=n,e>4)throw Error("Where for rank "+e+" is not yet supported");if(1===e)i="resRC",r="resRC";else{for(var s=["resRC.x","resRC.y","resRC.z","resRC.w"],c=[],l=[],u=0;u= 1.0) {\n setOutput(getA("+i+"));\n } else {\n setOutput(getB("+i+"));\n }\n }\n "},Qm=function(){function t(n){this.variableNames=["source"],this.outputShape=n,this.rank=n.length;var e,r=Gi(this.rank),i="uniform int start["+this.rank+"];",s=function(c){if(1===c)return"sourceLoc";if(c<=6)return Md.slice(0,c).map(function(l){return"sourceLoc."+l}).join(",");throw Error("Slicing for rank "+c+" is not yet supported")}(this.rank);e="\n "+r+" sourceLoc;\n "+r+" coords = getOutputCoords();\n "+n.map(function(c,l){return"sourceLoc."+Md[l]+" = start["+l+"] + coords."+Md[l]+";"}).join("\n")+"\n ",this.userCode="\n "+i+"\n void main() {\n "+e+"\n setOutput(getSource("+s+"));\n }\n "}return t.prototype.getCustomSetupFunc=function(n){var e=this;if(n.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+n.length+")");return function(r,i){null==e.startLoc&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),null==e.startLoc)||r.gl.uniform1iv(e.startLoc,n)}},t}(),Md=["x","y","z","w","u","v"],Q9=function(){function t(n){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.rank=n.length;var e=Gi(this.rank),r=uc("coords",this.rank),i=uc("sourceLoc",this.rank),s=1===this.rank?"sourceLoc":"vec2("+i.slice(-2).join()+")",c="getChannel(getSource("+i.join()+"), "+s+")",l="\n result.x = "+c+";\n if (++"+r[this.rank-1]+" < "+n[this.rank-1]+") {\n ++"+i[this.rank-1]+";\n result.y = "+c+";\n --"+i[this.rank-1]+";\n }\n ",u=1===this.rank?"":"\n --"+r[this.rank-1]+";\n if (++"+r[this.rank-2]+" < "+n[this.rank-2]+") {\n ++"+i[this.rank-2]+";\n result.z = "+c+";\n if (++"+r[this.rank-1]+" < "+n[this.rank-1]+") {\n ++"+i[this.rank-1]+";\n result.w = "+c+";\n }\n }\n ",d=this.rank<=4?"sourceLoc = coords +\n "+e+"("+n.map(function(p,M){return"start["+M+"]"}).join()+");":n.map(function(p,M){return i[M]+" = "+r[M]+" + start["+M+"];"}).join("\n");this.userCode="\n uniform int start["+this.rank+"];\n void main() {\n "+e+" coords = getOutputCoords();\n "+e+" sourceLoc;\n "+d+"\n vec4 result = vec4(0.);\n "+l+"\n "+u+"\n setOutput(result);\n }\n "}return t.prototype.getCustomSetupFunc=function(n){var e=this;if(n.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+n.length+")");return function(r,i){null==e.startLoc&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),null==e.startLoc)||r.gl.uniform1iv(e.startLoc,n)}},t}(),q9=function(t,n,e){this.variableNames=["x"],this.outputShape=e;var r=e.length,i=Gi(e.length),s=Gi(e.length),c="";if(1===r)c="coords * strides + begin";else{var l=0;c=e.map(function(u,d){return l++,1===e.length?"coords * strides["+d+"] + begin["+d+"]":"coords["+(l-1)+"] * strides["+d+"] + begin["+d+"]"}).join(",")}this.userCode="\n "+i+" begin = "+i+"("+t+");\n "+i+" strides = "+i+"("+n+");\n\n void main() {\n "+s+" coords = getOutputCoords();\n setOutput(getX("+c+"));\n }\n "},qm=function(){function t(n){this.gpgpu=n,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return t.prototype.acquireTexture=function(n,e,r){var i,s=ep(e,r),c=tp(n,s,r);if(c in this.freeTextures||(this.freeTextures[c]=[]),c in this.usedTextures||(this.usedTextures[c]=[]),this.freeTextures[c].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var l=this.freeTextures[c].shift();return this.usedTextures[c].push(l),l}return this.numUsedTextures++,this.log(),s===ar.PACKED_2X2_FLOAT32?i=this.gpgpu.createPackedMatrixTexture(n[0],n[1]):s===ar.PACKED_2X2_FLOAT16?i=this.gpgpu.createFloat16PackedMatrixTexture(n[0],n[1]):s===ar.UNPACKED_FLOAT32?i=this.gpgpu.createFloat32MatrixTexture(n[0],n[1]):s===ar.UNPACKED_FLOAT16?i=this.gpgpu.createFloat16MatrixTexture(n[0],n[1]):s===ar.PACKED_4X1_UNSIGNED_BYTE&&(i=this.gpgpu.createUnsignedBytesMatrixTexture(n[0],n[1])),this.usedTextures[c].push(i),i},t.prototype.releaseTexture=function(n,e,r,i){if(null!=this.freeTextures){var s=tp(e,ep(r,i),i);s in this.freeTextures||(this.freeTextures[s]=[]),this.freeTextures[s].push(n),this.numFreeTextures++,this.numUsedTextures--;var c=this.usedTextures[s],l=c.indexOf(n);if(l<0)throw new Error("Cannot release a texture that was never provided by this texture manager");c.splice(l,1),this.log()}},t.prototype.log=function(){this.logEnabled&&console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+(this.numFreeTextures+this.numUsedTextures)+")")},t.prototype.getNumUsedTextures=function(){return this.numUsedTextures},t.prototype.getNumFreeTextures=function(){return this.numFreeTextures},t.prototype.dispose=function(){var n=this;if(null!=this.freeTextures){for(var e in this.freeTextures)this.freeTextures[e].forEach(function(r){n.gpgpu.deleteMatrixTexture(r)});for(var e in this.usedTextures)this.usedTextures[e].forEach(function(i){n.gpgpu.deleteMatrixTexture(i)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},t}();function ep(t,n){if(t===Kn.UPLOAD)return ar.PACKED_2X2_FLOAT32;if(t===Kn.RENDER||null==t)return e=n,X().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?ar.PACKED_2X2_FLOAT32:ar.UNPACKED_FLOAT32:e?ar.PACKED_2X2_FLOAT16:ar.UNPACKED_FLOAT16;var e;if(t===Kn.DOWNLOAD||t===Kn.PIXELS)return ar.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+t)}function tp(t,n,e){return t[0]+"_"+t[1]+"_"+n+"_"+e}var ev=function(t,n){this.variableNames=["A"];for(var e=new Array(t.length),r=0;r5)throw Error("Tile for rank "+l+" is not yet supported");if(1===l)return"imod(resRC, "+c[0]+")";for(var u=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],d=[],p=0;p6)throw Error("Transpose for rank "+l+" is not yet supported");for(var u=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],d=new Array(l),p=0;p6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var i=Gi(this.rank),s=pm("rc",this.rank),c=new Array(this.rank);for(r=0;r0?[4,Promise.all(c)]:[3,2];case 1:return d=p.sent(),u.kernelMs=bs(d),u.getExtraProfileInfo=function(){return d.map(function(M,x){return{name:l[x],ms:M}}).map(function(M){return M.name+": "+M.ms}).join(", ")},[3,3];case 2:u.kernelMs={error:"WebGL query timers are not supported in this environment."},p.label=3;case 3:return this.uploadWaitMs=0,this.downloadWaitMs=0,[2,u]}})})},n.prototype.memory=function(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU}},n.prototype.startTimer=function(){return X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:Wa(),endMs:null}},n.prototype.endTimer=function(e){return X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=Wa(),e)},n.prototype.getQueryTime=function(e){return st(this,void 0,void 0,function(){var r;return Ln(this,function(i){return X().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[2,this.gpgpu.waitForQueryAndGetTime(e)]:[2,(r=e).endMs-r.startMs]})})},n.prototype.disposeData=function(e){if(!this.pendingDisposal.has(e)){if(this.pendingRead.has(e))return this.pendingDisposal.add(e),void this.pendingDeletes++;if(this.texData.has(e)){this.releaseGPUData(e);var r=this.texData.get(e).complexTensors;null!=r&&(r.real.dispose(),r.imag.dispose()),this.texData.delete(e)}}},n.prototype.releaseGPUData=function(e){var r=this.texData.get(e),i=r.texture,s=r.dtype,c=r.texShape,l=r.usage,u=r.isPacked,d=r.slice,p=d&&d.origDataId||e,M=this.dataRefCount.get(p);M>1?this.dataRefCount.set(p,M-1):(this.dataRefCount.delete(p),null!=i&&(this.numBytesInGPU-=this.computeBytes(c,s),this.textureManager.releaseTexture(i,c,l,u)));var x=this.texData.get(e);x.texture=null,x.texShape=null,x.isPacked=!1,x.slice=null},n.prototype.getTexture=function(e){return this.uploadToGPU(e),this.texData.get(e).texture},n.prototype.getDataInfo=function(e){return this.texData.get(e)},n.prototype.getCPUBackend=function(){return X().getBool("WEBGL_CPU_FORWARD")?(null==this.cpuBackend&&(this.cpuBackend=Ye.findBackend("cpu")),this.cpuBackend):null},n.prototype.shouldExecuteOnCPU=function(e,r){var i=this;return void 0===r&&(r=128),null!=this.getCPUBackend()&&e.every(function(s){return null==i.texData.get(s.dataId).texture&&s.sizeX().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){var c=Math.floor(e.length/2),l=this.concat(e.slice(0,c),r),u=this.concat(e.slice(c),r);return this.concat([l,u],r)}if(X().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&e[0].rank>1){var d=new Cm(e.map(function(R){return R.shape}),r);return this.compileAndRun(d,e)}var p=Gc(e.map(function(R){return R.shape}),r),M=e.map(function(R){return R.as2D(-1,rr(R.shape.slice(r)))}),x=new g9(M.map(function(R){return R.shape}));return this.compileAndRun(x,M).reshape(p)},n.prototype.neg=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.neg(e);if(X().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,ap,e.dtype);var r=new To(e.shape,ap);return this.compileAndRun(r,[e])},n.prototype.batchMatMul=function(e,r,i,s){var c=i?e.shape[2]:e.shape[1],l=s?r.shape[1]:r.shape[2],u=i?e.shape[1]:e.shape[2],d=e.shape[0];if((1===c||1===l)&&u>1e3){i&&(e=e.transpose([0,2,1])),s&&(r=r.transpose([0,2,1]));var p=1===l?e:e.as3D(d,u,1),M=1===l?2:1,x=1===l?r.as3D(d,1,u):r;return this.multiply(p,x).sum(M,!0)}var R=Oi(e.dtype,r.dtype),U=new X3(e.shape,[d,c,l],i,s);return this.compileAndRun(U,[e,r],R)},n.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,s=e.transposeA,c=e.transposeB,l=e.bias,u=e.activation,d=e.preluActivationWeights,p=s?r.shape[2]:r.shape[1],M=c?i.shape[1]:i.shape[2],x=r.shape[0],R=Oi(r.dtype,i.dtype),U=null!=l,J=null!=d,ne=u?q3(u,!0):null,ue=new X3(r.shape,[x,p,M],s,c,U,ne,J),Ie=[r,i];return l&&Ie.push(l),d&&Ie.push(d),this.compileAndRun(ue,Ie,R)},n.prototype.multiply=function(e,r){if("complex64"===e.dtype){var i=this.texData.get(e.dataId),s=this.texData.get(r.dataId),c=new ud("return areal * breal - aimag * bimag;",e.shape,r.shape),l=new ud("return areal * bimag + aimag * breal;",e.shape,r.shape),u=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag),this.makeComplexComponentTensorInfo(r,s.complexTensors.real),this.makeComplexComponentTensorInfo(r,s.complexTensors.imag)],d=this.compileAndRun(c,u),p=this.compileAndRun(l,u),M=this.complex(d,p);return d.dispose(),p.dispose(),M}if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.multiply(e,r);if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,hd,e.dtype);var x=new Sa(hd,e.shape,r.shape);return this.compileAndRun(x,[e,r],e.dtype)},n.prototype.batchNormalization=function(e,r,i,s,c,l){var u=[e,r,i],d=null;null!=l&&(d=l.shape,u.push(l));var p=null;if(null!=c&&(p=c.shape,u.push(c)),X().getBool("WEBGL_PACK_NORMALIZATION")){var M=new vm(e.shape,r.shape,i.shape,d,p,s);return this.compileAndRun(M,u)}var x=new d9(e.shape,r.shape,i.shape,d,p,s);return this.compileAndRun(x,u)},n.prototype.localResponseNormalization4D=function(e,r,i,s,c){var l=X().getBool("WEBGL_PACK_NORMALIZATION")?new $m(e.shape,r,i,s,c):new z9(e.shape,r,i,s,c);return this.compileAndRun(l,[e])},n.prototype.LRNGrad=function(e,r,i,s,c,l,u){var d=new R9(r.shape,s,c,l,u);return this.compileAndRun(d,[r,i,e])},n.prototype.tile=function(e,r){if("string"===e.dtype){var i=this.readSync(e.dataId).map(function(c){return o1(c)});return dm(zn(e.shape,e.dtype,i),r)}var s=new ev(e.shape,r);return this.compileAndRun(s,[e])},n.prototype.pad=function(e,r,i){var s=X().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new W9(e.shape,r,i):new gd(e.shape,r,i);return this.compileAndRun(s,[e])},n.prototype.transpose=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.transpose(e,r);var i=X().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Cd(e.shape,r):new tv(e.shape,r);return this.compileAndRun(i,[e])},n.prototype.gather=function(e,r,i){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.gather(e,r,i);var s=new O9(e.shape,r.size,i);return this.compileAndRun(s,[e,r])},n.prototype.batchToSpaceND=function(e,r,i){at(e.rank<=4,function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"});var s=r.reduce(function(M,x){return M*x}),c=R3(e.shape,r,s),l=Y3(c.length,r.length),u=w0(e.shape,r,s),d=tm(i,r.length),p=K4(u,i,r.length);return e.reshape(c).transpose(l).reshape(u).slice(d,p)},n.prototype.spaceToBatchND=function(e,r,i){at(e.rank<=4,function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"});var s=r.reduce(function(x,R){return x*R}),c=[[0,0]];c.push.apply(c,i);for(var l=1+r.length;lR||U===x?J=!0:U=Mi(x,U+1);return U}(u,c),p=new Z9({windowSize:d,inSize:u,batchSize:l,numSegments:c},r),M=this.compileAndRun(p,[e,i],s);return M.shape[1]===c?M:(i=ks(0,c).tile([u/d]),this.segOpCompute(M,r,i,s,c))},n.prototype.argMinMaxReduce=function(e,r,i){var s=[r];if(ys("arg"+i.charAt(0).toUpperCase()+i.slice(1),s,e.rank),!X().getBool("WEBGL_PACK_REDUCE")||e.rank<=2){var c=ta(e.shape,s),l=c[0],u=rr(c[1]),d=e.as2D(-1,u);return this.argReduce(d,i).reshape(l)}return this.argReducePacked(e,i)},n.prototype.argMin=function(e,r){return this.argMinMaxReduce(e,r,"min")},n.prototype.argMax=function(e,r){return this.argMinMaxReduce(e,r,"max")},n.prototype.cumsum=function(e,r,i,s){if(r!==e.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(e.rank-1)+" but got axis="+r);var c=new km(e.shape,i,s);return this.compileAndRun(c,[e])},n.prototype.equal=function(e,r){if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n return vec4(equal(a, b));\n","bool");var i=new Sa("return float(a == b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},n.prototype.notEqual=function(e,r){if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n return vec4(notEqual(a, b));\n","bool");var i=new Sa("return float(a != b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},n.prototype.less=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.less(e,r);if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n return vec4(lessThan(a, b));\n","bool");var i=new Sa("return float(a < b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},n.prototype.lessEqual=function(e,r){if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n return vec4(lessThanEqual(a, b));\n","bool");var i=new Sa("return float(a <= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},n.prototype.greater=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.greater(e,r);if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n return vec4(greaterThan(a, b));\n","bool");var i=new Sa("return float(a > b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},n.prototype.greaterEqual=function(e,r){if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n return vec4(greaterThanEqual(a, b));\n","bool");var i=new Sa("return float(a >= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},n.prototype.logicalNot=function(e){var r=new To(e.shape,"return float(!(x >= 1.0));");return this.compileAndRun(r,[e])},n.prototype.logicalAnd=function(e,r){if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n","bool");var i=new Sa("return float(a >= 1.0 && b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},n.prototype.logicalOr=function(e,r){if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n","bool");var i=new Sa("return float(a >= 1.0 || b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},n.prototype.select=function(e,r,i){var s=new J9(e.rank,r.shape,r.rank);return this.compileAndRun(s,[e,r,i],Oi(r.dtype,i.dtype))},n.prototype.where=function(e){V1("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var r=e.dataSync();return sd(e.shape,r)},n.prototype.topk=function(e,r,i){return fm(e.dataSync(),e.shape,e.dtype,r)},n.prototype.min=function(e,r){ys("min",r,e.rank);var i=ta(e.shape,r),s=i[0],c=rr(i[1]),l=e.as2D(-1,c);return this.reduce(l,"min",l.dtype).reshape(s)},n.prototype.minimum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.minimum(e,r);var i=X().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Z1("\n vec4 result = vec4(min(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,r.shape):new Sa("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return min(a, b);\n",e.shape,r.shape);return this.compileAndRun(i,[e,r])},n.prototype.mod=function(e,r){var i=X().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Z1("\n vec4 result = mod(a, b);\n vec4 isNaN = vec4(equal(b, vec4(0.0)));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,r.shape):new Sa("if (b == 0.0) return NAN;\n return mod(a, b);",e.shape,r.shape);return this.compileAndRun(i,[e,r])},n.prototype.max=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.max(e,r);ys("max",r,e.rank);var i=ta(e.shape,r),s=i[0],c=rr(i[1]),l=e.as2D(-1,c);return this.reduce(l,"max",l.dtype).reshape(s)},n.prototype.maximum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.maximum(e,r);var i=X().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Z1("\n vec4 result = vec4(max(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,r.shape):new Sa("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return max(a, b);\n",e.shape,r.shape);return this.compileAndRun(i,[e,r])},n.prototype.all=function(e,r){ys("all",r,e.rank);var i=ta(e.shape,r),s=i[0],c=rr(i[1]),l=e.as2D(-1,c);return this.reduce(l,"all",l.dtype).reshape(s)},n.prototype.any=function(e,r){ys("any",r,e.rank);var i=ta(e.shape,r),s=i[0],c=rr(i[1]),l=e.as2D(-1,c);return this.reduce(l,"any",l.dtype).reshape(s)},n.prototype.realDivide=function(e,r){if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n // vec4 one = vec4(equal(a, b));\n // return one + (vec4(1.0) - one) * a / b;\n vec4 result = a / b;\n if(a.x == b.x) {\n result.x = 1.;\n }\n if(a.y == b.y) {\n result.y = 1.;\n }\n if(a.z == b.z) {\n result.z = 1.;\n }\n if(a.w == b.w) {\n result.w = 1.;\n }\n\n return result;\n","float32",!0);var i=new Sa("\nif (a == b) {\n return 1.0;\n};\nreturn a / b;",e.shape,r.shape);return this.compileAndRun(i,[e,r],"float32")},n.prototype.floorDiv=function(e,r){if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,"\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n bvec4 cond = notEqual(ib, ivec4(0));\n ivec4 result = ivec4(0);\n vec4 s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n result[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n result[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n result[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n result[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(result);\n","int32");var i=new Sa("\n float s = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n if (ib != 0) {\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n return float(idiv(ia, ib, s));\n } else {\n return NAN;\n }\n",e.shape,r.shape);return this.compileAndRun(i,[e,r],"int32")},n.prototype.add=function(e,r){if("complex64"===e.dtype&&"complex64"===r.dtype)return this.complexSeparableBinaryOp(e,r,dd);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.add(e,r);var i=Oi(e.dtype,r.dtype);if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,dd,i);var s=new Sa(dd,e.shape,r.shape);return this.compileAndRun(s,[e,r],i)},n.prototype.packedUnaryOp=function(e,r,i){var s=new P0(e.shape,r);return this.compileAndRun(s,[e],i)},n.prototype.packedBinaryOp=function(e,r,i,s,c){void 0===c&&(c=!1);var l=new Z1(i,e.shape,r.shape,c);return this.compileAndRun(l,[e,r],s)},n.prototype.complexSeparableBinaryOp=function(e,r,i){var s=this,c=this.texData.get(e.dataId),l=this.texData.get(r.dataId),u=[[c.complexTensors.real,l.complexTensors.real],[c.complexTensors.imag,l.complexTensors.imag]].map(function(x){var R=x[0],U=x[1],J=s.makeComplexComponentTensorInfo(e,R),ne=s.makeComplexComponentTensorInfo(r,U),ue=new Sa(i,e.shape,r.shape);return s.compileAndRun(ue,[J,ne],Oi(R.dtype,U.dtype))}),d=u[0],p=u[1],M=this.complex(d,p);return d.dispose(),p.dispose(),M},n.prototype.makeComplexComponentTensorInfo=function(e,r){return{dataId:r.dataId,dtype:r.dtype,shape:e.shape}},n.prototype.addN=function(e){if(1===e.length)return e[0];if(e.length>X().get("WEBGL_MAX_TEXTURES_IN_SHADER")){var r=Math.floor(e.length/2),i=this.addN(e.slice(0,r)),s=this.addN(e.slice(r));return this.addN([i,s])}var c=e.map(function(d){return d.dtype}).reduce(function(d,p){return Oi(d,p)}),l=e.map(function(d){return d.shape}),u=X().getBool("WEBGL_PACK")?new o9(e[0].shape,l):new hm(e[0].shape,l);return this.compileAndRun(u,e,c)},n.prototype.subtract=function(e,r){if("complex64"===e.dtype&&"complex64"===r.dtype)return this.complexSeparableBinaryOp(e,r,fd);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.subtract(e,r);var i=Oi(e.dtype,r.dtype);if(X().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,fd,e.dtype);var s=new Sa(fd,e.shape,r.shape);return this.compileAndRun(s,[e,r],i)},n.prototype.pow=function(e,r){var i=X().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Z1("\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n bvec4 isExpZero = equal(b, vec4(0.0));\n result.r = isExpZero.r ? 1.0 : result.r;\n result.g = isExpZero.g ? 1.0 : result.g;\n result.b = isExpZero.b ? 1.0 : result.b;\n result.a = isExpZero.a ? 1.0 : result.a;\n\n vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,r.shape):new Sa("\nif(a < 0.0 && floor(b) < b){\n return NAN;\n}\nif (b == 0.0) {\n return 1.0;\n}\nreturn (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",e.shape,r.shape),s=Oi(e.dtype,r.dtype);return this.compileAndRun(i,[e,r],s)},n.prototype.ceil=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.ceil(e);if(X().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,sp,e.dtype);var r=new To(e.shape,sp);return this.compileAndRun(r,[e])},n.prototype.floor=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.floor(e);if(X().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Td,e.dtype);var r=new To(e.shape,Td);return this.compileAndRun(r,[e])},n.prototype.sign=function(e){var r=new To(e.shape,"\n if (isnan(x)) { return 0.0; }\n return sign(x);\n");return this.compileAndRun(r,[e])},n.prototype.isNaN=function(e){var r=new To(e.shape,"return float(isnan(x));");return this.compileAndRun(r,[e],"bool")},n.prototype.isInf=function(e){var r=new To(e.shape,"return float(isinf(x));");return this.compileAndRun(r,[e],"bool")},n.prototype.isFinite=function(e){var r=new To(e.shape,"return float(!isnan(x) && !isinf(x));");return this.compileAndRun(r,[e],"bool")},n.prototype.round=function(e){var r=new To(e.shape,"\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n");return this.compileAndRun(r,[e])},n.prototype.exp=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.exp(e);if(X().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,cp,e.dtype);var r=new To(e.shape,cp);return this.compileAndRun(r,[e])},n.prototype.expm1=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.expm1(e);if(X().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,wd,e.dtype);var r=new To(e.shape,wd);return this.compileAndRun(r,[e])},n.prototype.softmax=function(e,r){var i=Ti([r],e.shape),s=this.max(e,i),c=Va(s.shape,i),l=this.subtract(e,s.reshape(c)),u=this.exp(l),d=this.sum(u,i).reshape(c);return this.realDivide(u,d)},n.prototype.log=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.log(e);if(X().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,"\n vec4 result = log(x);\n vec4 isNaN = vec4(lessThan(x, vec4(0.0)));\n result.r = isNaN.r == 1.0 ? NAN : result.r;\n result.g = isNaN.g == 1.0 ? NAN : result.g;\n result.b = isNaN.b == 1.0 ? NAN : result.b;\n result.a = isNaN.a == 1.0 ? NAN : result.a;\n\n return result;\n",e.dtype);var r=new To(e.shape,"if (x < 0.0) return NAN;\n return log(x);");return this.compileAndRun(r,[e])},n.prototype.log1p=function(e){var r=new To(e.shape,"return log(1.0 + x);");return this.compileAndRun(r,[e])},n.prototype.sqrt=function(e){var r=new To(e.shape,"return sqrt(x);");return this.compileAndRun(r,[e])},n.prototype.rsqrt=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.rsqrt(e);var r=new To(e.shape,"return inversesqrt(x);");return this.compileAndRun(r,[e])},n.prototype.reciprocal=function(e){var r=new To(e.shape,"return 1.0 / x;");return this.compileAndRun(r,[e])},n.prototype.relu=function(e){var r;return r=X().getBool("WEBGL_PACK")?new P0(e.shape,fp):new To(e.shape,np),this.compileAndRun(r,[e])},n.prototype.relu6=function(e){var r;return r=X().getBool("WEBGL_PACK")?new P0(e.shape,hp):new To(e.shape,rp),this.compileAndRun(r,[e])},n.prototype.prelu=function(e,r){var i=X().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Z1(Mm,e.shape,r.shape):new Sa(ym,e.shape,r.shape);return this.compileAndRun(i,[e,r])},n.prototype.elu=function(e){if(X().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,mp,e.dtype);var r=new To(e.shape,op);return this.compileAndRun(r,[e])},n.prototype.eluDer=function(e,r){var i=X().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Z1("\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",e.shape,r.shape):new Sa("return (b >= 1.0) ? a : a * (b + 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r])},n.prototype.selu=function(e){var r=new To(e.shape,"\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = 1.7580993408473768;\n float scale = 1.0507009873554805;\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n");return this.compileAndRun(r,[e])},n.prototype.int=function(e){var r=new To(e.shape,"return float(int(x));");return this.compileAndRun(r,[e],"int32")},n.prototype.clip=function(e,r,i){var s,c=(s=X().getBool("WEBGL_PACK_CLIP")?new p9(e.shape):new m9(e.shape)).getCustomSetupFunc(r,i);return this.compileAndRun(s,[e],null,c)},n.prototype.abs=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.abs(e);if(X().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Sd,e.dtype);var r=new To(e.shape,Sd);return this.compileAndRun(r,[e])},n.prototype.complexAbs=function(e){var r=this.texData.get(e.dataId),i=new _9(e.shape),s=[this.makeComplexComponentTensorInfo(e,r.complexTensors.real),this.makeComplexComponentTensorInfo(e,r.complexTensors.imag)];return this.compileAndRun(i,s)},n.prototype.sigmoid=function(e){var r=new To(e.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(r,[e])},n.prototype.softplus=function(e){var r=new To(e.shape,"\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n");return this.compileAndRun(r,[e])},n.prototype.sin=function(e){var r=new To(e.shape,"if (isnan(x)) return x;\n return sin(x);\n");return this.compileAndRun(r,[e])},n.prototype.cos=function(e){var r=new To(e.shape,"if (isnan(x)) return x;\n return cos(x);\n");return this.compileAndRun(r,[e])},n.prototype.tan=function(e){var r=new To(e.shape,"return tan(x);");return this.compileAndRun(r,[e])},n.prototype.asin=function(e){var r=new To(e.shape,"if (isnan(x)) return x;\n if (abs(x) > 1.) {\n return NAN;\n }\n return asin(x);\n");return this.compileAndRun(r,[e])},n.prototype.acos=function(e){var r=new To(e.shape,"if (isnan(x)) return x;\n if (abs(x) > 1.) {\n return NAN;\n }\n return acos(x);\n");return this.compileAndRun(r,[e])},n.prototype.atan=function(e){var r=new To(e.shape,"if (isnan(x)) return x;\n return atan(x);\n");return this.compileAndRun(r,[e])},n.prototype.atan2=function(e,r){var i=X().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Z1("\n vec4 result = atan(a, b);\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,r.shape):new Sa("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return atan(a, b);\n",e.shape,r.shape);return this.compileAndRun(i,[e,r])},n.prototype.sinh=function(e){var r=new To(e.shape,"\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n");return this.compileAndRun(r,[e])},n.prototype.cosh=function(e){var r=new To(e.shape,"\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n");return this.compileAndRun(r,[e])},n.prototype.tanh=function(e){var r=new To(e.shape,"\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n");return this.compileAndRun(r,[e])},n.prototype.asinh=function(e){var r=new To(e.shape,"if (isnan(x)) return x;return log(x + sqrt(x * x + 1.0));");return this.compileAndRun(r,[e])},n.prototype.acosh=function(e){var r=new To(e.shape,"if (isnan(x)) return x;\n if (x < 1.0) return NAN;\n return log(x + sqrt(x * x - 1.0));");return this.compileAndRun(r,[e])},n.prototype.atanh=function(e){var r=new To(e.shape,"if (isnan(x)) return x;\n if ((x < -1.0) || (x > 1.0)) return NAN;\n return (log(1.0 + x) - log(1.0 - x)) / 2.0;");return this.compileAndRun(r,[e])},n.prototype.erf=function(e){var r=new To(e.shape,'\n // Error function is calculated approximately with elementary function.\n // See "Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n float p = 0.3275911;\n float a1 = 0.254829592;\n float a2 = -0.284496736;\n float a3 = 1.421413741;\n float a4 = -1.453152027;\n float a5 = 1.061405429;\n\n float sign = sign(x);\n x = abs(x);\n float t = 1.0 / (1.0 + p * x);\n return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n');return this.compileAndRun(r,[e])},n.prototype.step=function(e,r){var s,i=new To(e.shape,(void 0===(s=r)&&(s=0),u1+"\n return x > 0.0 ? 1.0 : float("+s+");\n "));return this.compileAndRun(i,[e])},n.prototype.conv2dByMatMul=function(e,r,i,s,c,l){var u=e.shape,d=this.texData.get(e.dataId),R="channelsLast"===i.dataFormat,J=u[2]%2!=0&&!!d.isPacked;if((1==u[0]*u[1]*u[2]||1===i.outChannels)&&i.inChannels>1e3||!X().getBool("WEBGL_LAZILY_UNPACK")||!X().getBool("WEBGL_PACK_BINARY_OPERATIONS")||!J){var ue=this.reshape(e,[1,R?u[0]*u[1]*u[2]:u[0]*u[2]*u[3],i.inChannels]),Ie=this.reshape(r,[1,i.inChannels,i.outChannels]);return this.reshape(this.fusedBatchMatMul({a:ue,b:Ie,transposeA:!1,transposeB:!1,bias:s,activation:c,preluActivationWeights:l}),i.outShape)}var Oe={dataId:e.dataId,shape:[1,R?u[0]*u[1]*(u[2]+1):u[0]*u[2]*(u[3]+1),i.inChannels],dtype:e.dtype},Fe=d.shape;d.shape=d.shape.slice(),d.shape[d.shape.length-2]++,at(pr(d.shape,Oe.shape),function(){return"packed reshape "+d.shape+" to "+Oe.shape+" isn't free"});var et=this.reshape(r,[1,i.inChannels,i.outChannels]),Ct=this.fusedBatchMatMul({a:Oe,b:et,transposeA:!1,transposeB:!1,bias:s,activation:c,preluActivationWeights:l}),yt=this.texData.get(Ct.dataId);return at(yt.isPacked,function(){return"batchMatMul result is expected to be packed"}),d.shape=Fe,yt.shape=i.outShape,Ye.makeTensorFromDataId(Ct.dataId,i.outShape,Ct.dtype)},n.prototype.conv2dWithIm2Row=function(e,r,i,s,c,l){var M=i.outWidth,x=i.outHeight,R="channelsLast"===i.dataFormat,U=i.filterWidth*i.filterHeight*i.inChannels,J=x*M,ne=[U,J],ue=e.squeeze([0]),Ie=r.reshape([1,U,-1]),Ae=new N9(ne,ue.shape,i),Oe=this.compileAndRun(Ae,[ue]).reshape([1,ne[0],ne[1]]),Fe=null!=s,et=null!=l,Ct=c?q3(c,!0):null,yt=new X3(Oe.shape,[1,J,i.outChannels],!0,!1,Fe,Ct,et),pt=[Oe,Ie];return s&&pt.push(s),et&&pt.push(l),this.compileAndRun(yt,pt).reshape(R?[1,x,M,i.outChannels]:[1,i.outChannels,x,M])},n.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,s=e.convInfo,c=e.bias,l=e.activation,u=e.preluActivationWeights;if(1===s.filterHeight&&1===s.filterWidth&&1===s.dilationHeight&&1===s.dilationWidth&&1===s.strideHeight&&1===s.strideWidth&&("SAME"===s.padInfo.type||"VALID"===s.padInfo.type))return this.conv2dByMatMul(r,i,s,c,l,u);if(X().getBool("WEBGL_CONV_IM2COL")&&1===r.shape[0])return this.conv2dWithIm2Row(r,i,s,c,l,u);var d=null!=c,p=null!=u,M=l?q3(l,!1):null,x=new Tm(s,d,M,p),R=[r,i];return c&&R.push(c),u&&R.push(u),this.compileAndRun(x,R)},n.prototype.conv2d=function(e,r,i){if(1===i.filterHeight&&1===i.filterWidth&&1===i.dilationHeight&&1===i.dilationWidth&&1===i.strideHeight&&1===i.strideWidth&&("SAME"===i.padInfo.type||"VALID"===i.padInfo.type))return this.conv2dByMatMul(e,r,i);if(X().getBool("WEBGL_CONV_IM2COL")&&1===e.shape[0])return this.conv2dWithIm2Row(e,r,i);var s=new Tm(i);return this.compileAndRun(s,[e,r])},n.prototype.conv2dDerInput=function(e,r,i){var s=new v9(i);return this.compileAndRun(s,[e,r])},n.prototype.conv2dDerFilter=function(e,r,i){var s=new bm(i);return this.compileAndRun(s,[e,r])},n.prototype.fusedDepthwiseConv2D=function(e){var r,i=e.input,s=e.filter,c=e.convInfo,l=e.bias,u=e.activation,d=e.preluActivationWeights,p=X().getBool("WEBGL_PACK_DEPTHWISECONV")&&c.strideWidth<=2&&c.outChannels/c.inChannels==1,M=u?q3(u,p):null,x=[i,s],R=null!=l,U=null!=d;return R&&x.push(l),U&&x.push(d),p?(r=new xm(c,R,M,U),this.compileAndRun(r,x)):(r=new Em(c,R,M,U),this.compileAndRun(r,x))},n.prototype.depthwiseConv2D=function(e,r,i){var s;return X().getBool("WEBGL_PACK_DEPTHWISECONV")&&i.strideWidth<=2&&i.outChannels/i.inChannels==1?(s=new xm(i),this.compileAndRun(s,[e,r])):(s=new Em(i),this.compileAndRun(s,[e,r]))},n.prototype.depthwiseConv2DDerInput=function(e,r,i){var s=new Sm(i);return this.compileAndRun(s,[e,r])},n.prototype.depthwiseConv2DDerFilter=function(e,r,i){var s=new M9(i);return this.compileAndRun(s,[e,r])},n.prototype.conv3d=function(e,r,i){var s=new wm(i);return this.compileAndRun(s,[e,r])},n.prototype.conv3dDerInput=function(e,r,i){var s=new y9(i);return this.compileAndRun(s,[e,r])},n.prototype.conv3dDerFilter=function(e,r,i){var s=new Lm(i);return this.compileAndRun(s,[e,r])},n.prototype.maxPool=function(e,r){var i=new vd(r,"max",!1);return this.compileAndRun(i,[e])},n.prototype.avgPool=function(e,r){var i=new vd(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},n.prototype.maxPoolBackprop=function(e,r,i,s){var c=new vd(s,"max",!0),l=this.compileAndRun(c,[r]),u=new Y9(s),d=this.compileAndRun(u,[e,l],r.dtype);return l.dispose(),d},n.prototype.avgPoolBackprop=function(e,r,i){var s=new u9(i);return this.compileAndRun(s,[e],r.dtype)},n.prototype.cast=function(e,r){return nd(e,r,this)},n.prototype.unstack=function(e,r){for(var i=e.shape[r],s=new Array(e.rank-1),c=0,l=0;l1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});var s=e.shape[0],d=("NHWC"===i?e.shape[1]:e.shape[2])*r,p=("NHWC"===i?e.shape[2]:e.shape[3])*r,M=("NHWC"===i?e.shape[3]:e.shape[1])/(r*r),x=new S9("NHWC"===i?[s,d,p,M]:[s,M,d,p],r,i);return this.compileAndRun(x,[e])},n.prototype.split=function(e,r,i){return um(e,r,i)},n.prototype.scatterND=function(e,r,i){var s=Sl(0,e,i),c=s.sliceRank,l=s.numUpdates,u=s.sliceSize,d=s.strides,p=s.outputSize,M=[p/u,u],x=e.reshape([l,c]),R=r.reshape([l,u]);if(0===p)return k0(xi([]),i);var U=wn(0),J=new Jm(l,c,x.rank,R.rank,d,M);return this.compileAndRun(J,[R,x,U]).reshape(i)},n.prototype.sparseToDense=function(e,r,i,s){var c=Sl(0,e,i),M=new Jm(c.numUpdates,c.sliceRank,e.rank,r.rank,c.strides,[c.outputSize,1],!1);return this.compileAndRun(M,[r,e,s]).reshape(i)},n.prototype.fft=function(e){return this.fftImpl(e,!1)},n.prototype.ifft=function(e){return this.fftImpl(e,!0)},n.prototype.fftImpl=function(e,r){var i=this.texData.get(e.dataId),s=new Om("return real * expR - imag * expI;",e.shape,r),c=new Om("return real * expI + imag * expR;",e.shape,r),l=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag)],u=this.compileAndRun(s,l),d=this.compileAndRun(c,l),p=this.complex(u,d).as2D(e.shape[0],e.shape[1]);return u.dispose(),d.dispose(),p},n.prototype.gatherND=function(e,r){var i=r.shape,s=i[i.length-1],c=X4(e,r),l=c[0],u=c[1],d=c[2],p=c[3],M=r.reshape([u,s]),x=e.reshape([e.size/d,d]),R=new I9(s,p,[u,d]);return this.compileAndRun(R,[x,M]).reshape(l)},n.prototype.fill=function(e,r,i){if("string"===(i=i||Ls(r))){var s=Ea(i,rr(e));return s.fill(r),Ye.makeTensor(s,e,i,this)}var c=new P9(e,r),l=c.getCustomSetupFunc(r);return this.compileAndRun(c,[],i,l)},n.prototype.onesLike=function(e){if("string"===e.dtype)throw new Error("onesLike is not supported under string dtype");return this.fill(e.shape,1,e.dtype)},n.prototype.zerosLike=function(e){return this.fill(e.shape,"string"===e.dtype?"":0,e.dtype)},n.prototype.linspace=function(e,r,i){return rd(e,r,i)},n.prototype.makeTensorInfo=function(e,r){var i=this.write(null,e,r);return this.texData.get(i).usage=null,{dataId:i,shape:e,dtype:r}},n.prototype.makeOutput=function(e,r){var i=this.makeTensorInfo(e,r).dataId;return Ye.makeTensorFromDataId(i,e,r,this)},n.prototype.unpackTensor=function(e){var r=new J3(e.shape);return this.runWebGLProgram(r,[e],e.dtype)},n.prototype.packTensor=function(e){var r=new j9(e.shape);return this.runWebGLProgram(r,[e],e.dtype,null,!0)},n.prototype.packedReshape=function(e,r){var i=[_s(e.shape)].concat(gs(e.shape)),s={dtype:e.dtype,shape:i,dataId:e.dataId},c=[_s(r)].concat(gs(r)),l=new U9(c,i),u=this.runWebGLProgram(l,[s],e.dtype,null,!0);return{dataId:u.dataId,shape:r,dtype:u.dtype}},n.prototype.decode=function(e){var r,i=this.texData.get(e),s=i.isPacked,c=i.shape,l=i.dtype,u=sc(c);return r=s?new L9(u):new b9(u),{dtype:l,shape:c,dataId:this.runWebGLProgram(r,[{shape:u,dtype:l,dataId:e}],l,null,!0).dataId}},n.prototype.runWebGLProgram=function(e,r,i,s,c){var l=this;void 0===c&&(c=!1);var u=this.makeTensorInfo(e.outputShape,i),d=this.texData.get(u.dataId);if(e.packedOutput&&(d.isPacked=!0),e.outPackingScheme===cr.DENSE){var p=ca(e.outputShape);d.texShape=p.map(function(Ae){return 2*Ae})}if(null!=e.outTexUsage&&(d.usage=e.outTexUsage),0===rr(u.shape))return d.values=Ba(u.dtype,0),u;var M=[],x=r.map(function(Ae){if("complex64"===Ae.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var Oe=l.texData.get(Ae.dataId);if(null==Oe.texture){if(!e.packedInputs&&rr(Ae.shape)<=X().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:Ae.shape,texData:null,isUniform:!0,uniformValues:Oe.values};e.packedInputs&&(Oe.isPacked=!0,Oe.shape=Ae.shape)}else if(!!Oe.isPacked!=!!e.packedInputs)Ae=Oe.isPacked?l.unpackTensor(Ae):l.packTensor(Ae),M.push(Ae),Oe=l.texData.get(Ae.dataId);else if(Oe.isPacked&&!pr(Oe.shape,Ae.shape)){var Fe=Ae,et=Ae.shape;Ae.shape=Oe.shape,Ae=l.packedReshape(Ae,et),M.push(Ae),Oe=l.texData.get(Ae.dataId),Fe.shape=et}return l.uploadToGPU(Ae.dataId),{shape:Ae.shape,texData:Oe,isUniform:!1}});this.uploadToGPU(u.dataId);var R,Ae,et,U={shape:u.shape,texData:d,isUniform:!1},J=(Ae=e,et="",x.concat(U).forEach(function(pt){et+=pt.shape+"_"+(pt.isUniform?"uniform":pt.texData.texShape)+"_"+(null!=pt.texData&&null!=pt.texData.slice&&pt.texData.slice.flatOffset>0)}),Ae.constructor.name+"_"+et+"_"+Ae.userCode),ne=this.getAndSaveBinary(J,function(){return function(Ae,Oe,Fe,et){var Ct=Oe.userCode,yt=Fe.map(function(bn,Nn){var Rn={logicalShape:bn.shape,texShape:bn.isUniform?null:bn.texData.texShape,isUniform:bn.isUniform,isPacked:!bn.isUniform&&bn.texData.isPacked,flatOffset:null};return null!=bn.texData&&null!=bn.texData.slice&&bn.texData.slice.flatOffset>0&&(Rn.flatOffset=bn.texData.slice.flatOffset),{name:Oe.variableNames[Nn],shapeInfo:Rn}}),pt=yt.map(function(bn){return bn.shapeInfo}),gt={logicalShape:et.shape,texShape:et.texData.texShape,isUniform:!1,isPacked:et.texData.isPacked,flatOffset:null},Bt=i9(yt,gt,Ct,Oe.packedInputs),Ft=Ae.createProgram(Bt),yn=null,pn=Ae.getUniformLocation(Ft,"NAN",!1);1===X().getNumber("WEBGL_VERSION")&&(yn=Ae.getUniformLocation(Ft,"INFINITY",!1));for(var _n={},Dn=0;Dn0)return 32}return 16})),this.floatPrecisionValue},n.prototype.epsilon=function(){return 32===this.floatPrecision()?1e-7:1e-4},n.prototype.uploadToGPU=function(e){var r,i=this.texData.get(e),s=i.shape,c=i.dtype,l=i.values,d=i.usage,p=i.isPacked;if(null==i.texture){var M,x=null!=this.activeTimers;x&&(M=Wa());var R=i.texShape;if(null==R&&(R=lr(s,p),i.texShape=R),null!=l){var U=sc(s),J=void 0,ne=R[1],ue=R[0],Ie=l instanceof Uint8Array;p?(ne=(r=Ca(R[0],R[1]))[0],J=new x9(U,[ue=r[1],ne],Ie)):J=new E9(U,[ue,ne],Ie);var Ae=this.makeTensorInfo([ue,ne],c);this.texData.get(Ae.dataId).usage=Ie?Kn.PIXELS:Kn.UPLOAD,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(Ae.dataId),ne,ue,l);var Oe=this.runWebGLProgram(J,[Ae],c,null,!0),Fe=this.texData.get(Oe.dataId);i.texture=Fe.texture,i.texShape=Fe.texShape,i.isPacked=Fe.isPacked,i.usage=Fe.usage,this.disposeData(Ae.dataId),this.texData.delete(Oe.dataId),i.values=null,x&&(this.uploadWaitMs+=Wa()-M)}else{var et=this.acquireTexture(R,d,c,p);i.texture=et}}},n.prototype.convertAndCacheOnCPU=function(e,r){var i=this.texData.get(e),s=i.dtype;return this.releaseGPUData(e),null!=r&&(i.values=function(c,l){if("float32"===l||"complex64"===l)return c;if("int32"===l||"bool"===l){for(var u="int32"===l?new Int32Array(c.length):new Uint8Array(c.length),d=0;d1024*this.numMBBeforeWarning*1024){var c=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn("High memory usage in GPU: "+c+" MB, most likely due to a memory leak")}return this.textureManager.acquireTexture(e,r,s)},n.prototype.computeBytes=function(e,r){return e[0]*e[1]*ds(r)},n}(sm);sn()&&Ye.registerBackend("webgl",function(){return new pp},2);var uv=kt({square_:function(t){var n=Qe(t,"x","square");return Ye.runKernelFunc(function(r,i){return i([n]),r.square(n)},{x:n},null,"Square",{},[n],[])}}),K2="SquaredDifference",_p=kt({squaredDifference_:function(t,n){var e,r=Qe(t,"a","squaredDifference"),i=Qe(n,"b","squaredDifference");return e=ti(r,i),zo((r=e[0]).shape,(i=e[1]).shape),Ye.runKernelFunc(function(l,u){var d=l.squaredDifference(r,i);return u([r,i]),d},{a:r,b:i},function(l,u){var d=u[0],p=u[1],M=wn(2);return{a:function(){return l.mul(d.sub(p).mul(M))},b:function(){return l.mul(p.sub(d).mul(M))}}},K2,{},[r,i],[])}}),dv=kt({abs_:function(t){var n=Qe(t,"x","abs");return"complex64"===n.dtype?Ye.runKernelFunc(function(e){return e.complexAbs(n)},{$x:n}):Ye.runKernelFunc(function(e,r){var i=e.abs(n);return r([n]),i},{x:n},function(e,r){var i=r[0];return{x:function(){return e.mul(i.toFloat().step(-1))}}},"Abs")}}),gp=kt({acos_:function(t){var n=Qe(t,"x","acos");return Ye.runKernelFunc(function(e,r){var i=e.acos(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(wn(1).sub(i.toFloat().square()).sqrt()).neg()}}})}}),fv=kt({acosh_:function(t){var n=Qe(t,"x","acosh");return Ye.runKernelFunc(function(e,r){var i=e.acosh(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(i.toFloat().square().sub(1).sqrt())}}})}}),hv=kt({asin_:function(t){var n=Qe(t,"x","asin");return Ye.runKernelFunc(function(e,r){var i=e.asin(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(wn(1).sub(i.toFloat().square()).sqrt())}}})}}),vp=kt({asinh_:function(t){var n=Qe(t,"x","asinh");return Ye.runKernelFunc(function(e,r){var i=e.asinh(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(wn(1).add(i.toFloat().square()).sqrt())}}})}}),mv=kt({atan_:function(t){var n=Qe(t,"x","atan");return Ye.runKernelFunc(function(e,r){var i=e.atan(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().square().add(1))}}})}}),pv=kt({atanh_:function(t){var n=Qe(t,"x","atanh");return Ye.runKernelFunc(function(e,r){var i=e.atanh(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.div(wn(1).sub(i.toFloat().square()))}}})}}),yp=kt({ceil_:function(t){var n=Qe(t,"x","ceil");return Ye.runKernelFunc(function(e){return e.ceil(n)},{$x:n},function(e){return{$x:function(){return Zo(e)}}})}}),Ed=kt({clipByValue_:function(t,n,e){var r=Qe(t,"x","clipByValue");return at(n<=e,function(){return"Error in clip: min ("+n+") must be less than or equal to max ("+e+")."}),Ye.runKernelFunc(function(c,l){var u=c.clip(r,n,e);return l([r]),u},{x:r},function(c,l){var u=l[0];return{x:function(){return c.where(u.greaterEqual(n).logicalAnd(u.lessEqual(e)),Zo(c))}}},"ClipByValue",{min:n,max:e},[r])}}),Mp=kt({cos_:function(t){var n=Qe(t,"x","cos");return Ye.runKernelFunc(function(r,i){var s=r.cos(n);return i([n]),s},{x:n},function(r,i){var s=i[0];return{x:function(){return s.toFloat().sin().neg().mul(r)}}},"Cos",{},[n])}}),_v=kt({cosh_:function(t){var n=Qe(t,"x","cosh");return Ye.runKernelFunc(function(e,r){var i=e.cosh(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().sinh().mulStrict(e)}}})}}),gv=kt({erf_:function(t){var n=Qe(t,"x","erf");return at("int32"===n.dtype||"float32"===n.dtype,function(){return"Input dtype must be `int32` or `float32`."}),"int32"===n.dtype&&(n=n.toFloat()),Ye.runKernelFunc(function(e,r){var i=e.erf(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}})}}),xd=kt({exp_:function(t){var n=Qe(t,"x","exp");return Ye.runKernelFunc(function(e,r){var i=e.exp(n);return r([i]),i},{x:n},function(e,r){return{x:function(){return e.mulStrict(r[0])}}},"Exp",{},[],[!0])}}),vv=kt({expm1_:function(t){var n=Qe(t,"x","expm1");return Ye.runKernelFunc(function(e,r){var i=e.expm1(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.exp())}}})}}),kd=kt({floor_:function(t){var n=Qe(t,"x","floor");return Ye.runKernelFunc(function(e){return e.floor(n)},{$x:n},function(e){return{$x:function(){return Zo(e)}}})}}),yv=kt({log_:function(t){var n=Qe(t,"x","log");return Ye.runKernelFunc(function(r,i){var s=r.log(n);return i([n]),s},{x:n},function(r,i){var s=i[0];return{x:function(){return r.div(s.toFloat())}}},"Log",{},[n])}}),Mv=kt({log1p_:function(t){var n=Qe(t,"x","log1p");return Ye.runKernelFunc(function(e,r){var i=e.log1p(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.div(i.add(1))}}})}}),Dd=kt({logSigmoid_:function(t){var n=Qe(t,"x","logSigmoid");return Ye.runKernelFunc(function(e,r){var i=e.softplus(n.neg()).neg();return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.neg().sigmoid())}}})}}),eu=kt({neg_:function(t){var n=Qe(t,"x","neg");return Ye.runKernelFunc(function(r){return r.neg(n)},{x:n},function(r){return{x:function(){return r.neg()}}},"Neg",{},[n])}}),Cv=kt({reciprocal_:function(t){var n=Qe(t,"x","reciprocal");return Ye.runKernelFunc(function(e,r){var i=e.reciprocal(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.div(i.square().neg())}}})}}),bv=kt({round_:function(t){var n=Qe(t,"x","round");return Ye.runKernelFunc(function(e){return e.round(n)},{$x:n},function(e){return{$x:function(){return Zo(e)}}})}}),Cp=kt({rsqrt_:function(t){var n=Qe(t,"x","rsqrt");return Ye.runKernelFunc(function(r,i){var s=r.rsqrt(n);return i([n]),s},{x:n},function(r,i){var s=i[0];return{x:function(){return r.div(s.pow(1.5).mul(2)).neg()}}},"Rsqrt",{},[n])}}),bp=kt({sigmoid_:function(t){var n=Qe(t,"x","sigmoid");return Ye.runKernelFunc(function(e,r){var i=e.sigmoid(n);return r([i]),i},{x:n},function(e,r){var i=r[0];return{x:function(){return e.mul(i.mul(wn(1).sub(i)))}}},"Sigmoid")}}),Lv=kt({sign_:function(t){var n=Qe(t,"x","sign");return Ye.runKernelFunc(function(e){return e.sign(n)},{$x:n},function(e){return{$x:function(){return Zo(e)}}})}}),Sv=kt({isNaN_:function(t){var n=Qe(t,"x","isNaN");return Ye.runKernelFunc(function(e){return e.isNaN(n)},{$x:n},function(e){return{$x:function(){return Zo(e)}}})}}),Lp=kt({isInf_:function(t){var n=Qe(t,"x","isInf");return Ye.runKernelFunc(function(e){return e.isInf(n)},{$x:n},function(e){return{$x:function(){return Zo(e)}}})}}),Tv=kt({isFinite_:function(t){var n=Qe(t,"x","isFinite");return Ye.runKernelFunc(function(e){return e.isFinite(n)},{$x:n},function(e){return{$x:function(){return Zo(e)}}})}}),Sp=kt({sin_:function(t){var n=Qe(t,"x","sin");return Ye.runKernelFunc(function(r,i){var s=r.sin(n);return i([n]),s},{x:n},function(r,i){var s=i[0];return{x:function(){return s.toFloat().cos().mul(r)}}},"Sin",{},[n])}}),wv=kt({sinh_:function(t){var n=Qe(t,"x","sinh");return Ye.runKernelFunc(function(e,r){var i=e.sinh(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().cosh().mulStrict(e)}}})}}),Ev=kt({softplus_:function(t){var n=Qe(t,"x","softplus");return Ye.runKernelFunc(function(e,r){var i=e.softplus(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.sigmoid())}}})}}),Tp=kt({sqrt_:function(t){var n=Qe(t,"x","sqrt");return Ye.runKernelFunc(function(e,r){var i=e.sqrt(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().sqrt().mul(2))}}})}}),xv=kt({step_:function(t,n){void 0===n&&(n=0);var e=Qe(t,"x","step");return Ye.runKernelFunc(function(r){return r.step(e,n)},{$x:e},function(r){return{$x:function(){return Zo(r)}}})}}),kv=kt({tan_:function(t){var n=Qe(t,"x","tan");return Ye.runKernelFunc(function(e,r){var i=e.tan(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){return e.div(i.cos().square())}}})}}),Dv=kt({tanh_:function(t){var n=Qe(t,"x","tanh");return Ye.runKernelFunc(function(e,r){var i=e.tanh(n);return r([i]),i},{x:n},function(e,r){var i=r[0];return{x:function(){return wn(1).sub(i.square()).mulStrict(e)}}},"Tanh",{},null,[!0])}});function wp(t,n,e,r,i,s){var c,l,u=Qe(t,"x","batchNorm"),d=Qe(n,"mean","batchNorm"),p=Qe(e,"variance","batchNorm");return null!=i&&(c=Qe(i,"scale","batchNorm")),null!=r&&(l=Qe(r,"offset","batchNorm")),at(2===u.rank,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+u.rank+"."}),at(2===d.rank||1===d.rank,function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+d.rank+"."}),at(2===p.rank||1===p.rank,function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+p.rank+"."}),null!=c&&at(2===c.rank||1===c.rank,function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+c.rank+"."}),null!=l&&at(2===l.rank||1===l.rank,function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+l.rank+"."}),O0(u,d,p,l,c,s)}function tu(t,n,e,r,i,s){var c,l,u=Qe(t,"x","batchNorm"),d=Qe(n,"mean","batchNorm"),p=Qe(e,"variance","batchNorm");return null!=i&&(c=Qe(i,"scale","batchNorm")),null!=r&&(l=Qe(r,"offset","batchNorm")),at(3===u.rank,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+u.rank+"."}),at(3===d.rank||1===d.rank,function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+d.rank+"."}),at(3===p.rank||1===p.rank,function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+p.rank+"."}),null!=c&&at(3===c.rank||1===c.rank,function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+c.rank+"."}),null!=l&&at(3===l.rank||1===l.rank,function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+l.rank+"."}),O0(u,d,p,l,c,s)}function Ep(t,n,e,r,i,s){var c,l,u=Qe(t,"x","batchNorm"),d=Qe(n,"mean","batchNorm"),p=Qe(e,"variance","batchNorm");return null!=i&&(c=Qe(i,"scale","batchNorm")),null!=r&&(l=Qe(r,"offset","batchNorm")),at(4===u.rank,function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+u.rank+"."}),at(4===d.rank||1===d.rank,function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+d.rank+"."}),at(4===p.rank||1===p.rank,function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+p.rank+"."}),null!=c&&at(4===c.rank||1===c.rank,function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+c.rank+"."}),null!=l&&at(4===l.rank||1===l.rank,function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+l.rank+"."}),O0(u,d,p,l,c,s)}function O0(t,n,e,r,i,s){null==s&&(s=.001);var c,l,u,d=Qe(t,"x","batchNorm"),p=Qe(n,"mean","batchNorm"),M=Qe(e,"variance","batchNorm");return null!=i&&(c=Qe(i,"scale","batchNorm")),null!=r&&(l=Qe(r,"offset","batchNorm")),at(p.rank===M.rank,function(){return"Batch normalization gradient requires mean and variance to have equal ranks."}),at(null==l||p.rank===l.rank,function(){return"Batch normalization gradient requires mean and offset to have equal ranks."}),at(null==c||p.rank===c.rank,function(){return"Batch normalization gradient requires mean and scale to have equal ranks."}),u=0===d.rank||1===d.rank?d.as4D(1,1,1,d.size):2===d.rank?d.as4D(1,1,d.shape[0],d.shape[1]):3===d.rank?d.as4D(1,d.shape[0],d.shape[1],d.shape[2]):d,Ye.runKernelFunc(function(R,U){var J=R.batchNormalization(u,I0(p),I0(M),s,I0(c),I0(l));return U([d,p,M,c]),J},{x:d,mean:p,variance:M,scale:c,offset:l},function(R,U){var ne=U[0],ue=U[1],Ie=U[2],Oe=U[3]??wn(1),Fe=Aa(ue.shape,u.shape),et=[];if(1===ue.rank){for(var Ct=0;Ct0&&(l=l.sum(u)),l.reshape(r.shape)},b:function(){var l=c,u=Aa(i.shape,s);return u.length>0&&(l=l.sum(u)),l.reshape(i.shape)}}},"Add")}}),Ip=kt({addN_:function(t){at(Array.isArray(t),function(){return"The argument passed to tf.addN() must be a list of tensors"}),at(t.length>=1,function(){return"Must pass at least one tensor to tf.addN(), but got "+t.length});var n=t.map(function(i,s){return Qe(i,"tensors"+s,"addN")}),e=n[0];return n.forEach(function(i){if(i.dtype!==e.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),n.forEach(function(i){if(!yi(i.shape,e.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")}),Ye.runKernelFunc(function(i){return i.addN(n)},n,function(i){var s={};return n.forEach(function(c,l){s[l]=function(){return i.clone()}}),s},"AddN")}}),zv=kt({addStrict_:function(t,n){var e=Qe(t,"a","addStrict"),r=Qe(n,"b","addStrict");return ho(e.shape,r.shape,"Error in addStrict: "),e.add(r)}}),Rv=kt({atan2_:function(t,n){var e,r=Qe(t,"a","atan2"),i=Qe(n,"b","atan2");e=ti(r,i);var s=zo((r=e[0]).shape,(i=e[1]).shape);return Ye.runKernelFunc(function(c,l){var u=c.atan2(r,i);return l([r,i]),u},{$a:r,$b:i},function(c,l){var u=l[0],d=l[1];return{$a:function(){var p=Ro(u.square(),d.square()),M=c.mul(d.div(p)),x=Aa(u.shape,s);return x.length>0&&(M=M.sum(x)),M.reshape(u.shape)},$b:function(){var p=Ro(u.square(),d.square()),M=eu(c.mul(u.div(p))),x=Aa(d.shape,s);return x.length>0&&(M=M.sum(x)),M.reshape(d.shape)}}})}}),Kc=kt({div_:function(t,n){var e,r=Qe(t,"a","div"),i=Qe(n,"b","div");if(e=ti(r,i),i=e[1],"int32"===(r=e[0]).dtype&&"int32"===i.dtype)return Ap(r,i);var s=zo(r.shape,i.shape);return Ye.runKernelFunc(function(c,l){var u=c.realDivide(r,i);return l([r,i]),u},{a:r,b:i},function(c,l){var u=l[0],d=l[1];return{a:function(){var p=c.div(d.toFloat()),M=Aa(u.shape,s);return M.length>0?p.sum(M).reshape(u.shape):p},b:function(){var p=c.mul(u.toFloat()),M=Aa(d.shape,s);M.length>0&&(p=p.sum(M).reshape(d.shape));var x=d.square();return p.div(x.toFloat()).neg()}}},"Div")}}),Yv=kt({divNoNan_:function(t,n){var e,r=Qe(t,"a","div"),i=Qe(n,"b","div");r=(e=ti(r,i))[0];var s=Kc(r,i=e[1]),c=Zo(s),l=i.equal(c);return X2(l,c,s)}}),Fv=kt({divStrict_:function(t,n){var e=Qe(t,"a","div"),r=Qe(n,"b","div");return ho(e.shape,r.shape,"Error in divideStrict: "),e.div(r)}}),Ap=kt({floorDiv_:function(t,n){var e,r=Qe(t,"a","floorDiv"),i=Qe(n,"b","floorDiv");e=ti(r,i);var s=zo((r=e[0]).shape,(i=e[1]).shape);return Ye.runKernelFunc(function(c,l){var u=c.floorDiv(r,i);return l([r,i]),u},{a:r,b:i},function(c,l){var u=l[0],d=l[1];return{a:function(){var p=c.div(d.toFloat()),M=Aa(u.shape,s);return M.length>0?p.sum(M).reshape(u.shape):p},b:function(){var p=c.mul(u.toFloat()),M=Aa(d.shape,s);M.length>0&&(p=p.sum(M).reshape(d.shape));var x=d.square();return p.div(x.toFloat()).neg()}}},"FloorDiv")}}),A0=kt({maximum_:function(t,n){var e,r=Qe(t,"a","maximum"),i=Qe(n,"b","maximum");return e=ti(r,i),i=e[1],"bool"===(r=e[0]).dtype&&(r=r.toInt(),i=i.toInt()),zo(r.shape,i.shape),Ye.runKernelFunc(function(s,c){var l=s.maximum(r,i);return c([r,i]),l},{a:r,b:i},function(s,c){var l=c[0],u=c[1];return{a:function(){return s.mul(l.greaterEqual(u).toFloat())},b:function(){return s.mul(l.less(u).toFloat())}}},"Maximum")}}),Hv=kt({maximumStrict_:function(t,n){var e=Qe(t,"a","maximumStrict"),r=Qe(n,"b","maximumStrict");return ho(e.shape,r.shape,"Error in maximumStrict: "),e.maximum(r)}}),Np=kt({minimum_:function(t,n){var e,r=Qe(t,"a","minimum"),i=Qe(n,"b","minimum");return e=ti(r,i),i=e[1],"bool"===(r=e[0]).dtype&&(r=r.toInt(),i=i.toInt()),zo(r.shape,i.shape),Ye.runKernelFunc(function(s,c){var l=s.minimum(r,i);return c([r,i]),l},{a:r,b:i},function(s,c){var l=c[0],u=c[1];return{a:function(){return s.mul(l.lessEqual(u).toFloat())},b:function(){return s.mul(l.greater(u).toFloat())}}},"Minimum")}}),Bv=kt({minimumStrict_:function(t,n){var e=Qe(t,"a","minimumStrict"),r=Qe(n,"b","minimumStrict");return ho(e.shape,r.shape,"Error in minimumStrict: "),e.minimum(r)}}),jv=kt({mod_:function(t,n){var e,r=Qe(t,"a","mod"),i=Qe(n,"b","mod");e=ti(r,i);var s=zo((r=e[0]).shape,(i=e[1]).shape);return Ye.runKernelFunc(function(c,l){var u=c.mod(r,i);return l([r,i]),u},{$a:r,$b:i},function(c,l){var u=l[0],d=l[1];return{$a:function(){var p=Aa(u.shape,s);return p.length>0?c.sum(p).reshape(u.shape):c},$b:function(){var p=c.mul(u.div(d).floor().neg()),M=Aa(d.shape,s);return M.length>0?p.sum(M).reshape(d.shape):p}}})}}),Wv=kt({modStrict_:function(t,n){var e=Qe(t,"a","modStrict"),r=Qe(n,"b","modStrict");return ho(e.shape,r.shape,"Error in modStrict: "),e.mod(r)}}),Ds=kt({mul_:function(t,n){var e,r=Qe(t,"a","mul"),i=Qe(n,"b","mul");e=ti(r,i);var s=zo((r=e[0]).shape,(i=e[1]).shape);return Ye.runKernelFunc(function(c,l){var u=c.multiply(r,i);return l([r,i]),u},{a:r,b:i},function(c,l){var u=l[0],d=l[1];return{a:function(){var p=c.mul(d.toFloat()),M=Aa(u.shape,s);return M.length>0?p.sum(M).reshape(u.shape):p},b:function(){var p=c.mul(u.toFloat()),M=Aa(d.shape,s);return M.length>0?p.sum(M).reshape(d.shape):p}}},"Mul")}}),Uv=kt({mulStrict_:function(t,n){var e=Qe(t,"a","mul"),r=Qe(n,"b","mul");return ho(e.shape,r.shape,"Error in multiplyStrict: "),e.mul(r)}}),N0=kt({pow_:function(t,n){var e,r=Qe(t,"base","pow"),i=Qe(n,"exp","pow");e=ti(r,i);var s=zo((r=e[0]).shape,(i=e[1]).shape);return Ye.runKernelFunc(function(l,u){var d=l.pow(r,i);return u([r,i,d]),d},{a:r,b:i},function(l,u){var d=u[0],p=u[1],M=u[2];return{a:function(){var x=p.toFloat(),R=l.mul(x.mul(d.pow(x.sub(wn(1))))),U=Aa(d.shape,s);return U.length>0&&(R=R.sum(U)),R.reshape(d.shape)},b:function(){var x=d.greater(0),R=d.log().where(x,Zo(d)),U=l.mul(M.mul(R)),J=Aa(p.shape,s);return J.length>0&&(U=U.sum(J)),U.reshape(p.shape)}}},"Pow",{},[r,i],[!0])}}),Vv=kt({powStrict_:function(t,n){return ho(t.shape,n.shape,"Error in powStrict: "),t.pow(n)}}),Gv=kt({squaredDifferenceStrict_:function(t,n){var e=Qe(t,"a","squaredDifferenceStrict"),r=Qe(n,"b","squaredDifferenceStrict");return ho(e.shape,r.shape,"Error in squaredDifferenceStrict: "),e.squaredDifference(r)}}),ns=kt({sub_:function(t,n){var e,r=Qe(t,"a","sub"),i=Qe(n,"b","sub");e=ti(r,i);var s=zo((r=e[0]).shape,(i=e[1]).shape);return Ye.runKernelFunc(function(c){return c.subtract(r,i)},{a:r,b:i},function(c){return{a:function(){var l=c,u=Aa(r.shape,s);return u.length>0&&(l=l.sum(u)),l.reshape(r.shape)},b:function(){var l=c,u=Aa(i.shape,s);return u.length>0&&(l=l.sum(u)),l.neg().reshape(i.shape)}}},"Sub")}}),$v=kt({subStrict_:function(t,n){var e=Qe(t,"a","subStrict"),r=Qe(n,"b","subStrict");return ho(e.shape,r.shape,"Error in subStrict: "),e.sub(r)}}),zp=kt({equal_:function(t,n){var e,r=Qe(t,"a","equal"),i=Qe(n,"b","equal");return e=ti(r,i),zo((r=e[0]).shape,(i=e[1]).shape),Ye.runKernelFunc(function(s){return s.equal(r,i)},{$a:r,$b:i})}}),Kv=kt({equalStrict_:function(t,n){var e=Qe(t,"a","equalStrict"),r=Qe(n,"b","equalStrict");return ho(e.shape,r.shape,"Error in equalStrict: "),e.equal(r)}}),Xv=kt({greater_:function(t,n){var e,r=Qe(t,"a","greater"),i=Qe(n,"b","greater");return e=ti(r,i),zo((r=e[0]).shape,(i=e[1]).shape),Ye.runKernelFunc(function(s){return s.greater(r,i)},{a:r,b:i},null,"Greater")}}),Id=kt({greaterEqual_:function(t,n){var e,r=Qe(t,"a","greaterEqual"),i=Qe(n,"b","greaterEqual");return e=ti(r,i),zo((r=e[0]).shape,(i=e[1]).shape),Ye.runKernelFunc(function(s,c){var l=s.greaterEqual(r,i);return c([r,i]),l},{a:r,b:i},function(s,c){var l=c[0],u=c[1];return{a:function(){return Zo(l)},b:function(){return Zo(u)}}},"GreaterEqual")}}),Zv=kt({greaterEqualStrict_:function(t,n){var e=Qe(t,"a","greaterEqualStrict"),r=Qe(n,"b","greaterEqualStrict");return ho(e.shape,r.shape,"Error in greaterEqualStrict: "),e.greaterEqual(r)}}),Rp=kt({greaterStrict_:function(t,n){var e=Qe(t,"a","greaterStrict"),r=Qe(n,"b","greaterStrict");return ho(e.shape,r.shape,"Error in greaterStrict: "),e.greater(r)}}),Jv=kt({less_:function(t,n){var e,r=Qe(t,"a","less"),i=Qe(n,"b","less");return e=ti(r,i),zo((r=e[0]).shape,(i=e[1]).shape),Ye.runKernelFunc(function(s){return s.less(r,i)},{a:r,b:i},null,"Less")}}),Qv=kt({lessEqual_:function(t,n){var e,r=Qe(t,"a","lessEqual"),i=Qe(n,"b","lessEqual");return e=ti(r,i),zo((r=e[0]).shape,(i=e[1]).shape),Ye.runKernelFunc(function(s,c){var l=s.lessEqual(r,i);return c([r,i]),l},{a:r,b:i},null,"LessEqual")}}),Yp=kt({lessEqualStrict_:function(t,n){var e=Qe(t,"a","lessEqualStrict"),r=Qe(n,"b","lessEqualStrict");return ho(e.shape,r.shape,"Error in lessEqualStrict: "),e.lessEqual(r)}}),qv=kt({lessStrict_:function(t,n){var e=Qe(t,"a","lessStrict"),r=Qe(n,"b","lessStrict");return ho(e.shape,r.shape,"Error in lessStrict: "),e.less(r)}}),ey=kt({notEqual_:function(t,n){var e,r=Qe(t,"a","notEqual"),i=Qe(n,"b","notEqual");return e=ti(r,i),zo((r=e[0]).shape,(i=e[1]).shape),Ye.runKernelFunc(function(s){return s.notEqual(r,i)},{a:r,b:i},null,"NotEqual")}}),ty=kt({notEqualStrict_:function(t,n){var e=Qe(t,"a","notEqualStrict"),r=Qe(n,"b","notEqualStrict");return ho(e.shape,r.shape,"Error in notEqualStrict: "),e.notEqual(r)}});function Fp(t,n){for(var e=[],r=t;r=2&&c.rank>=2&&s.rank===c.rank,function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+s.rank+" and "+c.rank+"."}),at(yi(M,x),function(){return"Error in matMul: outer dimensions ("+M+") and ("+x+") of Tensors with shapes "+s.shape+" and "+c.shape+" must match."}),at(l===u,function(){return"Error in matMul: inner shapes ("+l+") and ("+u+") of Tensors with shapes "+s.shape+" and "+c.shape+" and transposeA="+e+" and transposeB="+r+" must match."});var J=s.shape.slice(0,-2).concat([d,p]),ne=e?s.as3D(R,l,d):s.as3D(R,d,l),ue=r?c.as3D(U,p,u):c.as3D(U,u,p);return Ye.runKernelFunc(function(Ae,Oe){var Fe=Ae.batchMatMul(ne,ue,e,r);return Oe([ne,ue]),Fe},{a:ne,b:ue},function(Ae,Oe){var et=Oe[0],Ct=Oe[1];return e||r?!e&&r?{a:function(){return Ae.matMul(Ct,!1,!1)},b:function(){return Ae.matMul(et,!0,!1)}}:e&&!r?{a:function(){return Ct.matMul(Ae,!1,!0)},b:function(){return et.matMul(Ae,!1,!1)}}:{a:function(){return Ct.matMul(Ae,!0,!0)},b:function(){return Ae.matMul(et,!0,!0)}}:{a:function(){return Ae.matMul(Ct,!1,!0)},b:function(){return et.matMul(Ae,!0,!1)}}},"BatchMatMul",{transposeA:e,transposeB:r}).reshape(J)}}),iy=kt({dot_:function(t,n){var e=Qe(t,"t1","dot"),r=Qe(n,"t2","dot");at(!(1!==e.rank&&2!==e.rank||1!==r.rank&&2!==r.rank),function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+e.rank+" and "+r.rank+"."});var i=1===e.rank?e.size:e.shape[1],s=1===r.rank?r.size:r.shape[0];return at(i===s,function(){return"Error in dot: inner dimensions of inputs must match, but got "+i+" and "+s+"."}),1===e.rank&&1===r.rank?e.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():1===e.rank&&2===r.rank?e.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():2===e.rank&&1===r.rank?e.matMul(r.as2D(-1,1)).as1D():e.matMul(r.as2D(r.shape[0],r.shape[1]))}}),ay=kt({outerProduct_:function(t,n){var e=Qe(t,"v1","outerProduct"),r=Qe(n,"v2","outerProduct");return at(1===e.rank&&1===r.rank,function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+e.rank+" and "+r.rank+"."}),e.as2D(-1,1).matMul(r.as2D(1,-1))}}),R0=kt({reverse_:function(t,n){var e=Qe(t,"x","reverse");if(0===e.rank)return e.clone();var r=Ti(n,e.shape);return Ye.runKernelFunc(function(i){return i.reverse(e,r)},{$x:e},function(i){return{$x:function(){return i.reverse(r)}}}).reshapeAs(e)}}),Kp=kt({reverse1d_:function(t){var n=Qe(t,"x","reverse");return at(1===n.rank,function(){return"Error in reverse1D: x must be rank 1 but got rank "+n.rank+"."}),R0(n,0)}}),sy=kt({reverse2d_:function(t,n){var e=Qe(t,"x","reverse");return at(2===e.rank,function(){return"Error in reverse2D: x must be rank 2 but got rank "+e.rank+"."}),R0(e,n)}}),Yd=kt({reverse3d_:function(t,n){var e=Qe(t,"x","reverse");return at(3===e.rank,function(){return"Error in reverse3D: x must be rank 3 but got rank "+e.rank+"."}),R0(e,n)}}),cy=kt({reverse4d_:function(t,n){var e=Qe(t,"x","reverse");return at(4===e.rank,function(){return"Error in reverse4D: x must be rank 4 but got rank "+e.rank+"."}),R0(e,n)}});function Xp(t,n,e,r,i,s){var c=Qe(t,"x","maxPool"),l=c,u=!1;3===c.rank&&(u=!0,l=c.as4D(1,c.shape[0],c.shape[1],c.shape[2])),null==r&&(r=[1,1]),at(4===l.rank,function(){return"Error in maxPool: input must be rank 4 but got rank "+l.rank+"."}),at(qs(e,r),function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"}),null!=s&&at(ai(i),function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var d=G2(l.shape,n,e,r,i,s);if(1===d.filterWidth&&1===d.filterHeight&&yi(d.inShape,d.outShape))return c.clone();var M=Ye.runKernelFunc(function(x,R){var U=x.maxPool(l,d);return R([l,U]),U},{x:l},function(x,R){var U=R[0],J=R[1];return{x:function(){return function(ne,ue,Ie,Ae,Oe,Fe,et,Ct){var yt=Qe(ne,"dy","maxPoolBackprop"),pt=Qe(ue,"input","maxPoolBackprop"),gt=Qe(Ie,"output","maxPoolBackprop");at(pt.rank===yt.rank,function(){return"Rank of input ("+pt.rank+") does not match rank of dy ("+yt.rank+")"}),null==Fe&&(Fe=[1,1]),at(qs(Oe,Fe),function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+Oe+" and dilations '"+Fe+"'"}),at(4===yt.rank,function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+yt.rank+"."}),at(4===pt.rank,function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+pt.rank+"."});var Bt=G2(pt.shape,Ae,Oe,Fe,et,void 0);return Ye.runKernelFunc(function(Ft){return Ft.maxPoolBackprop(yt,pt,gt,Bt)},{$dy:yt,$input:pt})}(x,U,J,n,e,r,i)}}},"MaxPool",d,[l]);return u?M.as3D(M.shape[1],M.shape[2],M.shape[3]):M}function Zp(t,n,e,r,i,s){var c=Qe(t,"x","avgPool","float32");null==r&&(r=[1,1]),at(qs(e,r),function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"});var l=c,u=!1;3===c.rank&&(u=!0,l=c.as4D(1,c.shape[0],c.shape[1],c.shape[2])),at(4===l.rank,function(){return"Error in avgPool: x must be rank 4 but got rank "+l.rank+"."}),null!=s&&at(ai(i),function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var d=G2(l.shape,n,e,r,i,s);if(1===d.filterWidth&&1===d.filterHeight&&yi(d.inShape,d.outShape))return c.clone();var p=Ye.runKernelFunc(function(M){return M.avgPool(l,d)},{x:l},function(M){return{x:function(){return function(x,R,U,J,ne,ue){var Ie=Qe(x,"dy","avgPoolBackprop"),Ae=Qe(R,"input","avgPoolBackprop");at(Ae.rank===Ie.rank,function(){return"Rank of input ("+Ae.rank+") does not match rank of dy ("+Ie.rank+")"}),null==ne&&(ne=[1,1]),at(qs(J,ne),function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+J+" and dilations '"+ne+"'"});var Oe=Ae,Fe=Ie,et=!1;3===Ae.rank&&(et=!0,Oe=Ae.as4D(1,Ae.shape[0],Ae.shape[1],Ae.shape[2]),Fe=Ie.as4D(1,Ie.shape[0],Ie.shape[1],Ie.shape[2])),at(4===Fe.rank,function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+Fe.rank+"."}),at(4===Oe.rank,function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+Oe.rank+"."});var Ct=G2(Oe.shape,U,J,ne,ue),yt=Ye.runKernelFunc(function(pt){return pt.avgPoolBackprop(Fe,Oe,Ct)},{dy4D:Fe,input4D:Oe});return et?yt.as3D(yt.shape[1],yt.shape[2],yt.shape[3]):yt}(M,l,n,e,r,i)}}},"AvgPool",d);return p=p.cast(c.dtype),u?p.as3D(p.shape[1],p.shape[2],p.shape[3]):p}var rs=kt({maxPool_:function(t,n,e,r,i){return Xp(t,n,e,1,r,i)}}),Y0=kt({avgPool_:function(t,n,e,r,i){return Zp(t,n,e,1,r,i)}}),ly=kt({pool_:function(t,n,e,r,i,s){null==i&&(i=[1,1]),null==s&&(s=1),0===r&&(r="valid");var c=Qe(t,"x","maxPool"),l=c,u=!1;3===c.rank&&(u=!0,l=c.as4D(1,c.shape[0],c.shape[1],c.shape[2])),at(qs(s,i),function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+s+" and dilations '"+i+"'"});var d,Fe,et,Ct,yt,p=G2(l.shape,n,s,i,r),M=[p.dilationHeight,p.dilationWidth];d="same"===r?(Fe=M,et=[p.filterHeight,p.filterWidth].map(function(pt,gt){return pt+(pt-1)*(Fe[gt]-1)}).map(function(pt){return pt-1}),Ct=et.map(function(pt){return Math.floor(pt/2)}),yt=et.map(function(pt,gt){return pt-Ct[gt]}),et.map(function(pt,gt){return[Ct[gt],yt[gt]]})):[[0,0],[0,0]];var x=1===M[0]&&1===M[1],R=function(Oe,Fe,et){var Ct=et.map(function(pn){return pn[0]}),yt=et.map(function(pn){return pn[1]}),pt=Oe.concat(Ct,yt),gt=Fe.map(function(pn,_n){return(pn-pt[_n]%pn)%pn}),Bt=yt.map(function(pn,_n){return pn+gt[_n]});return[Fe.map(function(pn,_n){return[Ct[_n],Bt[_n]]}),Fe.map(function(pn,_n){return[0,gt[_n]]})]}([p.inHeight,p.inWidth],M,d),J=R[1],ne=x?r:"valid",ue=x?l:qh(l,M,R[0]),Ie=("avg"===e?function(){return Zp(ue,n,s,1,ne)}:function(){return Xp(ue,n,s,1,ne)})(),Ae=x?Ie:jo(Ie,M,J);return u?Ae.as3D(Ae.shape[1],Ae.shape[2],Ae.shape[3]):Ae}}),uy=kt({maxPool3d_:function(t,n,e,r,i,s,c){void 0===s&&(s="NDHWC");var l=Qe(t,"x","maxPool3d"),u=l,d=!1;4===l.rank&&(d=!0,u=l.as5D(1,l.shape[0],l.shape[1],l.shape[2],l.shape[3])),null==c&&(c=[1,1,1]),at(5===u.rank,function(){return"Error in maxPool3d: x must be rank 5 but got rank "+u.rank+"."}),at("NDHWC"===s,function(){return"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+s}),at(qs(e,c),function(){return"Error in maxPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+c+"'"}),null!=i&&at(ai(r),function(){return"Error in maxPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var p=E0(u.shape,n,e,c,r,i,s),M=Ye.runKernelFunc(function(x,R){var U=x.maxPool3d(u,p);return R([u,U]),U},{x:u},function(x,R){var U=R[0],J=R[1];return{x:function(){return function(ne,ue,Ie,Ae,Oe,Fe,et,Ct){var yt=Qe(ne,"dy","maxPool3dBackprop"),pt=Qe(ue,"input","maxPool3dBackprop"),gt=Qe(Ie,"output","maxPool3dBackprop"),Bt=yt,Ft=pt,yn=gt,pn=!1;4===pt.rank&&(pn=!0,Bt=yt.as5D(1,yt.shape[0],yt.shape[1],yt.shape[2],yt.shape[3]),Ft=pt.as5D(1,pt.shape[0],pt.shape[1],pt.shape[2],pt.shape[3]),yn=gt.as5D(1,gt.shape[0],gt.shape[1],gt.shape[2],gt.shape[3])),at(5===Bt.rank,function(){return"Error in maxPool3dBackprop: dy must be rank 5 but got rank "+Bt.rank+"."}),at(5===Ft.rank,function(){return"Error in maxPool3dBackprop: input must be rank 5 but got rank "+Ft.rank+"."}),at(5===yn.rank,function(){return"Error in maxPool3dBackprop: output must be rank 5 but got rank "+yn.rank+"."}),null==Fe&&(Fe=[1,1,1]),at(qs(Oe,Fe),function(){return"Error in maxPool3dBackprop: Either strides or dilations must be 1. Got strides "+Oe+" and dilations '"+Fe+"'"}),null!=Ct&&at(ai(et),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+Ct+" but got pad "+et+"."});var _n=E0(Ft.shape,Ae,Oe,Fe,et,Ct),Dn=Ye.runKernelFunc(function(En){return En.maxPool3dBackprop(Bt,Ft,yn,_n)},{dy5D:Bt,input5D:Ft});return pn?Dn.as4D(Dn.shape[1],Dn.shape[2],Dn.shape[3],Dn.shape[4]):Dn}(x,U,J,n,e,c,r,i)}}});return d?M.as4D(M.shape[1],M.shape[2],M.shape[3],M.shape[4]):M}}),dy=kt({avgPool3d_:function(t,n,e,r,i,s,c){void 0===s&&(s="NDHWC");var l=Qe(t,"x","avgPool3d","float32"),u=l,d=!1;4===l.rank&&(d=!0,u=l.as5D(1,l.shape[0],l.shape[1],l.shape[2],l.shape[3])),null==c&&(c=[1,1,1]),at(5===u.rank,function(){return"Error in avgPool3d: x must be rank 5 but got rank "+u.rank+"."}),at("NDHWC"===s,function(){return"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+s}),at(qs(e,c),function(){return"Error in avgPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+c+"'"}),null!=i&&at(ai(r),function(){return"Error in avgPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var p=E0(u.shape,n,e,c,r,i,s),M=Ye.runKernelFunc(function(x){return x.avgPool3d(u,p)},{x:u},function(x){return{x:function(){return function(R,U,J,ne,ue,Ie,Ae){var Oe=Qe(R,"dy","avgPool3dBackprop"),Fe=Qe(U,"input","avgPool3dBackprop"),et=Oe,Ct=Fe,yt=!1;4===Fe.rank&&(yt=!0,et=Oe.as5D(1,Oe.shape[0],Oe.shape[1],Oe.shape[2],Oe.shape[3]),Ct=Fe.as5D(1,Fe.shape[0],Fe.shape[1],Fe.shape[2],Fe.shape[3])),at(5===et.rank,function(){return"Error in avgPool3dBackprop: dy must be rank 5 but got rank "+et.rank+"."}),at(5===Ct.rank,function(){return"Error in avgPool3dBackprop: input must be rank 5 but got rank "+Ct.rank+"."}),null==ue&&(ue=[1,1,1]),at(qs(ne,ue),function(){return"Error in avgPool3dBackprop: Either strides or dilations must be 1. Got strides "+ne+" and dilations '"+ue+"'"}),null!=Ae&&at(ai(Ie),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+Ae+" but got pad "+Ie+"."});var pt=E0(Ct.shape,J,ne,ue,Ie,Ae),gt=Ye.runKernelFunc(function(Bt){return Bt.avgPool3dBackprop(et,Ct,pt)},{dy5D:et,input5D:Ct});return yt?gt.as4D(gt.shape[1],gt.shape[2],gt.shape[3],gt.shape[4]):gt}(x,u,n,e,c,r,i)}}});return M=M.cast(u.dtype),d?M.as4D(M.shape[1],M.shape[2],M.shape[3],M.shape[4]):M}}),d1=kt({slice_:function(t,n,e){var r,i,s=Qe(t,"x","slice");if(0===s.rank)throw new Error("Slicing scalar is not possible");(r="number"==typeof n?[n].concat(new Array(s.rank-1).fill(0)):n.length=0?u:(at(-1===u,function(){return"Negative size values should be exactly -1 but got "+u+" for the slice() size at index "+d+"."}),s.shape[d]-r[d])}),om(s,r,i);var c=s.shape;return Ye.runKernelFunc(function(u){return u.slice(s,r,i)},{x:s},function(u){for(var d=[],p=0;p0&&(d=d.sum(p)),d.reshape(l.shape)}}},"Prelu")}}),ua=kt({relu_:function(t){var n=Qe(t,"x","relu");return"bool"===n.dtype?n.toInt():Ye.runKernelFunc(function(e,r){var i=e.relu(n);return r([n]),i},{x:n},function(e,r){var i=r[0];return{x:function(){return e.mulStrict(i.step().toFloat())}}},"Relu")}}),au=kt({relu6_:function(t){var n=Qe(t,"x","relu6");return"bool"===n.dtype?n.toInt():Ye.runKernelFunc(function(e,r){var i=e.relu6(n);return r([n]),i},{x:n},function(e,r){var i=r[0],s=i.lessEqual(6).mul(i.step());return{x:function(){return e.mulStrict(s.toFloat())}}},"Relu6")}}),Ly=kt({selu_:function(t){var n=Qe(t,"x","selu");return Ye.runKernelFunc(function(e,r){var i=e.selu(n);return r([n]),i},{$x:n},function(e,r){var i=r[0];return{$x:function(){var s=i.greater(wn(0)),c=wn(1.7580993408473768),l=wn(1.0507009873554805),u=e.mul(l),d=e.mul(c).mul(i.toFloat().exp());return X2(s,u,d)}}})}}),y2=kt({transpose_:function(t,n){var e=Qe(t,"x","transpose");return null==n&&(n=e.shape.map(function(i,s){return s}).reverse()),at(e.rank===n.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of perm "+n+"."}),n.forEach(function(i){at(i>=0&&ii)throw new Error("'k' passed to topk() must be <= the last dimension ("+i+") but got "+n);var s=Ye.runKernelFunc(function(c){return c.topk(r,n,e)},{$x:r});return{values:s[0],indices:s[1]}}}),ky=kt({scatterND_:function(t,n,e){var r=Qe(t,"indices","scatterND","int32"),i=Qe(n,"updates","scatterND");return rm(i,r,e),Ye.runKernelFunc(function(s){return s.scatterND(r,i,e)},{indices:r,updates:i},null,"ScatterNd",{shape:e})}}),su=kt({fft_:function(t){at("complex64"===t.dtype,function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+t.dtype+"."});var n=t.shape[t.shape.length-1],r=t.as2D(t.size/n,n);return Ye.runKernelFunc(function(i){return i.fft(r)},{input:t}).reshape(t.shape)}}),cu=kt({ifft_:function(t){at("complex64"===t.dtype,function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+t.dtype+"."});var n=t.shape[t.shape.length-1],r=t.as2D(t.size/n,n);return Ye.runKernelFunc(function(i){return i.ifft(r)},{input:t}).reshape(t.shape)}}),Hd=kt({rfft_:function(t,n){at("float32"===t.dtype,function(){return"The dtype for rfft() must be real value but got "+t.dtype});var e,r=t.shape[t.shape.length-1],i=t.size/r;if(null!=n&&nr){var l=t.shape.map(function(ue){return ue});l[t.shape.length-1]=n-r,e=t.concat($n(l),t.shape.length-1),r=n}else e=t;var u=e.zerosLike(),d=Oa(e,u).as2D(i,r),p=su(d),M=Math.floor(r/2)+1,x=Fs(p),R=Hs(p),U=x.split([M,r-M],x.shape.length-1),J=R.split([M,r-M],R.shape.length-1),ne=e.shape.slice();return ne[e.shape.length-1]=M,Oa(U[0],J[0]).reshape(ne)}}),i8=kt({irfft_:function(t){var n=t.shape[t.shape.length-1],e=t.size/n;if(n<=2){var r=t.as2D(e,n),i=cu(r);return Fs(i)}var s=[e,2*(n-1)],c=Fs(t).as2D(e,n),l=Hs(t).as2D(e,n),u=c.slice([0,1],[e,n-2]).reverse(1),d=l.slice([0,1],[e,n-2]).reverse(1).mul(wn(-1)),p=c.concat(u,1),M=l.concat(d,1);return r=Oa(p,M).as2D(s[0],s[1]),i=cu(r),Fs(i)}}),Dy=Object.freeze({fft:su,ifft:cu,rfft:Hd,irfft:i8}),Py=kt({sparseToDense_:function(t,n,e,r){void 0===r&&(r=0);var i=Qe(t,"sparseIndices","sparseToDense","int32"),s=Qe(n,"sparseValues","sparseToDense"),c=Qe(r,"defaultValue","sparseToDense",s.dtype);return function(l,u,d,p){if("int32"!==l.dtype)throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+l.dtype+".");if(l.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+l.shape+".");var M=l.rank>0?l.shape[0]:1,x=l.rank>1?l.shape[1]:1;if(d.length!==x)throw new Error("outputShape has incorrect number of elements:, "+d.length+", should be: "+x+".");if(0!==u.rank&&(1!==u.rank||u.size!==M))throw new Error("sparseValues has incorrect shape "+u.shape+", should be [] or ["+M+"]");if(u.dtype!==p.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(i,s,e,c),Ye.runKernelFunc(function(l){return l.sparseToDense(i,s,e,c)},{$sparseIndices:i,$sparseValues:s,$defaultValue:c})}}),Oy=kt({gatherND_:function(t,n){var e=Qe(n,"indices","gatherND","int32"),r=Qe(t,"x","gatherND");return Ye.runKernelFunc(function(i){return i.gatherND(r,e)},{x:r,indices:e},null,"GatherNd")}}),Iy=kt({diag_:function(t){var n=Qe(t,"x","diag").flatten(),e=t.shape.concat(t.shape);return Ye.runKernelFunc(function(r){return r.diag(n)},{$x:n}).reshape(e)}}),a8=kt({dropout_:function(t,n,e,r){var i=Qe(t,"x","dropout");if(at("float32"===i.dtype,function(){return"x has to be a floating point tensor since it's going to be scaled, but got a "+i.dtype+" tensor instead."}),at(n>=0&&n<1,function(){return"rate must be a float in the range [0, 1), but got "+n+"."}),0===n)return t instanceof Ao?i.clone():i;var s=function(u,d){if(null==d)return u.shape.slice();if(yi(u.shape,d))return d;if(u.shape.length===d.length){for(var p=[],M=0;M1?l.div(wn(c)):l}if(e===js.SUM_BY_NONZERO_WEIGHTS){if(null==i)return s.sum().div(wn(r.size));var u=i.mul(qn(r.shape)).notEqual(wn(0)).sum().toFloat();return s.sum().div(u)}throw Error("Unknown reduction: "+e)}}),zy=kt({cosineDistance_:function(t,n,e,r,i){void 0===i&&(i=js.SUM_BY_NONZERO_WEIGHTS);var s=Qe(t,"labels","cosineDistance"),c=Qe(n,"predictions","cosineDistance"),l=null;null!=r&&(l=Qe(r,"weights","cosineDistance")),ho(s.shape,c.shape,"Error in cosineDistance: ");var u=wn(1).sub(s.mul(c).sum(e,!0));return J1(u,l,i)}}),u8=kt({hingeLoss_:function(t,n,e,r){void 0===r&&(r=js.SUM_BY_NONZERO_WEIGHTS);var i=Qe(t,"labels","hingeLoss"),s=Qe(n,"predictions","hingeLoss"),c=null;null!=e&&(c=Qe(e,"weights","hingeLoss")),ho(i.shape,s.shape,"Error in hingeLoss: ");var l=wn(1);i=wn(2).mul(i).sub(l);var u=l.sub(i.mul(s)).relu();return J1(u,c,r)}}),Ry=kt({huberLoss_:function(t,n,e,r,i){void 0===r&&(r=1),void 0===i&&(i=js.SUM_BY_NONZERO_WEIGHTS);var s=Qe(t,"labels","huberLoss"),c=Qe(n,"predictions","huberLoss"),l=null;null!=e&&(l=Qe(e,"weights","huberLoss")),ho(s.shape,c.shape,"Error in huberLoss: ");var u=wn(r),d=c.sub(s).abs(),p=Np(d,u),M=d.sub(p),x=wn(.5).mul(p.square()).add(u.mul(M));return J1(x,l,i)}}),Yy=kt({logLoss_:function(t,n,e,r,i){void 0===r&&(r=1e-7),void 0===i&&(i=js.SUM_BY_NONZERO_WEIGHTS);var s=Qe(t,"labels","logLoss"),c=Qe(n,"predictions","logLoss"),l=null;null!=e&&(l=Qe(e,"weights","logLoss")),ho(s.shape,c.shape,"Error in logLoss: ");var u=wn(1),d=wn(r),p=s.mul(c.add(d).log()).neg().sub(u.sub(s).mul(u.sub(c).add(d).log()));return J1(p,l,i)}}),d8=kt({meanSquaredError_:function(t,n,e,r){void 0===r&&(r=js.SUM_BY_NONZERO_WEIGHTS);var i=Qe(t,"labels","meanSquaredError"),s=Qe(n,"predictions","meanSquaredError"),c=null;null!=e&&(c=Qe(e,"weights","meanSquaredError")),ho(i.shape,s.shape,"Error in meanSquaredError: ");var l=i.squaredDifference(s);return J1(l,c,r)}}),Fy=kt({sigmoidCrossEntropy_:function(t,n,e,r,i){void 0===r&&(r=0),void 0===i&&(i=js.SUM_BY_NONZERO_WEIGHTS);var s=Qe(t,"multiClassLabels","sigmoidCrossEntropy"),c=Qe(n,"logits","sigmoidCrossEntropy"),l=null;if(null!=e&&(l=Qe(e,"weights","sigmoidCrossEntropy")),ho(s.shape,c.shape,"Error in sigmoidCrossEntropy: "),r>0){var u=wn(r),d=wn(1),p=wn(.5);s=s.mul(d.sub(u)).add(p.mul(u))}var M=function(x,R){var U=Qe(x,"labels","sigmoidCrossEntropyWithLogits"),J=Qe(R,"logits","sigmoidCrossEntropyWithLogits");ho(U.shape,J.shape,"Error in sigmoidCrossEntropyWithLogits: ");var ne=J.relu(),ue=J.mul(U),Ie=J.abs().neg().exp().log1p();return ne.sub(ue).add(Ie)}(s,c);return J1(M,l,i)}}),Hy=kt({softmaxCrossEntropy_:function(t,n,e,r,i){void 0===r&&(r=0),void 0===i&&(i=js.SUM_BY_NONZERO_WEIGHTS);var s=Qe(t,"onehotLabels","softmaxCrossEntropy"),c=Qe(n,"logits","softmaxCrossEntropy"),l=null;if(null!=e&&(l=Qe(e,"weights","softmaxCrossEntropy")),ho(s.shape,c.shape,"Error in softmaxCrossEntropy: "),r>0){var u=wn(r),d=wn(1),p=wn(s.shape[1]);s=s.mul(d.sub(u)).add(u.div(p))}var M=function(x,R,U){if(void 0===U&&(U=-1),-1===U&&(U=R.rank-1),U!==R.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+R.rank+" and dim was "+U);return B3(function(J,ne,ue){var Ie=ne.logSumExp([U],!0),Ae=ne.toFloat().sub(Ie);return ue([J,Ae]),{value:Ae.mul(J).neg().sum([U]),gradFunc:function(Oe,Fe){var et=Fe[0],Ct=Fe[1],yt=Va(Oe.shape,[U]);return[Oe.reshape(yt).mul(et.toFloat().sub(Ct.exp())),Oe.reshape(yt).mul(Ct.exp().sub(et.toFloat()))]}}})(x,R)}(s,c);return J1(M,l,i)}}),f8=Object.freeze({get Reduction(){return js},absoluteDifference:Ny,computeWeightedLoss:J1,cosineDistance:zy,hingeLoss:u8,huberLoss:Ry,logLoss:Yy,meanSquaredError:d8,sigmoidCrossEntropy:Fy,softmaxCrossEntropy:Hy});function h8(t,n){return void 0===n&&(n=!1),Ye.tidy(function(){if(2!==t.shape.length)throw new Error("qr2d() requires a 2D Tensor, but got a "+t.shape.length+"D Tensor.");for(var e=t.shape[0],r=t.shape[1],i=T0(e),s=t.clone(),c=B([[1]],[1,1]),l=c.clone(),u=e>=r?r:e,d=function(M){var x,R=s,U=l,J=i;x=Ye.tidy(function(){var ne=s.slice([M,M],[e-M,1]),ue=ne.norm(),Ie=s.slice([M,M],[1,1]),Ae=B([[-1]]).where(Ie.greater(0),B([[1]])),Oe=Ie.sub(Ae.mul(ue)),Fe=ne.div(Oe);l=1===Fe.shape[0]?c.clone():c.concat(Fe.slice([1,0],[Fe.shape[0]-1,Fe.shape[1]]),0);var et=Ae.matMul(Oe).div(ue).neg(),Ct=s.slice([M,0],[e-M,r]),yt=et.mul(l);if(0===M)s=Ct.sub(yt.matMul(l.transpose().matMul(Ct)));else{var pt=Ct.sub(yt.matMul(l.transpose().matMul(Ct)));s=s.slice([0,0],[M,r]).concat(pt,0)}var gt=i.slice([0,M],[e,i.shape[1]-M]);if(0===M)i=gt.sub(gt.matMul(l).matMul(yt.transpose()));else{var Bt=gt.sub(gt.matMul(l).matMul(yt.transpose()));i=i.slice([0,0],[e,M]).concat(Bt,1)}return[l,s,i]}),l=x[0],s=x[1],i=x[2],Es([R,U,J])},p=0;pr&&(i=i.slice([0,0],[e,r]),s=s.slice([0,0],[r,r])),[i,s]})}var By=kt({bandPart_:function(t,n,e){if(n%1!=0)throw new Error("bandPart(): numLower must be an integer, got "+n+".");if(e%1!=0)throw new Error("bandPart(): numUpper must be an integer, got "+e+".");var r=Qe(t,"a","bandPart");if(r.rank<2)throw new Error("bandPart(): Rank must be at least 2, got "+r.rank+".");var i=r.shape,s=r.shape.slice(-2),c=s[0],l=s[1];if(!(n<=c))throw new Error("bandPart(): numLower ("+n+") must not be greater than the number of rows ("+c+").");if(!(e<=l))throw new Error("bandPart(): numUpper ("+e+") must not be greater than the number of columns ("+l+").");n<0&&(n=c),e<0&&(e=l);var u=ks(0,c,1,"int32").reshape([-1,1]),d=ks(0,l,1,"int32"),p=ns(u,d),M=ru(p.lessEqual(wn(+n,"int32")),p.greaterEqual(wn(-e,"int32"))),x=$n([c,l],r.dtype);return Lc(ts(r.reshape([-1,c,l])).map(function(R){return X2(M,R,x)})).reshape(i)}}),jy=kt({gramSchmidt_:function(t){var n;if(Array.isArray(t)){n=!1,at(null!=t&&t.length>0,function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"});for(var e=t[0].shape[0],r=function(u){at(t[u].shape[0]===e,function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+t[u].shape[0]+" vs. "+e+")"})},i=1;i0)for(var p=0;p= 2, but got rank "+t.rank);if(2===t.rank)return h8(t,n);var e=t.shape.slice(0,t.shape.length-2).reduce(function(c,l){return c*l}),r=ts(t.reshape([e,t.shape[t.shape.length-2],t.shape[t.shape.length-1]]),0),i=[],s=[];return r.forEach(function(c){var l=h8(c,n),d=l[1];i.push(l[0]),s.push(d)}),[Lc(i,0).reshape(t.shape),Lc(s,0).reshape(t.shape)]}}),Wy=Object.freeze({bandPart:By,gramSchmidt:jy,qr:m8});function uu(t,n,e,r,i,s){null==r&&(r=.5),null==i&&(i=Number.NEGATIVE_INFINITY),null==s&&(s=0);var c=t.shape[0];return e=Math.min(e,c),at(0<=r&&r<=1,function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"}),at(2===t.rank,function(){return"boxes must be a 2D tensor, but was of rank '"+t.rank+"'"}),at(4===t.shape[1],function(){return"boxes must have 4 columns, but 2nd dimension was "+t.shape[1]}),at(1===n.rank,function(){return"scores must be a 1D tensor"}),at(n.shape[0]===c,function(){return"scores has incompatible shape with boxes. Expected "+c+", but was "+n.shape[0]}),at(0<=s&&s<=1,function(){return"softNmsSigma must be in [0, 1], but was '"+s+"'"}),{maxOutputSize:e,iouThreshold:r,scoreThreshold:i,softNmsSigma:s}}var Uy=kt({resizeBilinear_:function(t,n,e){void 0===e&&(e=!1);var r=Qe(t,"images","resizeBilinear");at(3===r.rank||4===r.rank,function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."}),at(2===n.length,function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+n+"."});var i=r,s=!1;3===r.rank&&(s=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var c=n[0],l=n[1],u=Ye.runKernelFunc(function(d,p){return p([i]),d.resizeBilinear(i,c,l,e)},{x:i},function(d,p){return{x:function(){return Ye.runKernelFunc(function(M){return M.resizeBilinearBackprop(d,p[0],e)},{})}}},"ResizeBilinear",{alignCorners:e,newHeight:c,newWidth:l});return s?u.as3D(u.shape[1],u.shape[2],u.shape[3]):u}}),Vy=kt({resizeNearestNeighbor_:function(t,n,e){void 0===e&&(e=!1);var r=Qe(t,"images","resizeNearestNeighbor");at(3===r.rank||4===r.rank,function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."}),at(2===n.length,function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+n+"."}),at("float32"===r.dtype||"int32"===r.dtype,function(){return"`images` must have `int32` or `float32` as dtype"});var i=r,s=!1;3===r.rank&&(s=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var c=n[0],l=n[1],u=Ye.runKernelFunc(function(d,p){return p([i]),d.resizeNearestNeighbor(i,c,l,e)},{batchImages:i},function(d,p){return{batchImages:function(){return Ye.runKernelFunc(function(M){return M.resizeNearestNeighborBackprop(d,p[0],e)},{})}}});return s?u.as3D(u.shape[1],u.shape[2],u.shape[3]):u}}),Gy=kt({nonMaxSuppression_:function(t,n,e,r,i){void 0===r&&(r=.5),void 0===i&&(i=Number.NEGATIVE_INFINITY);var s=Qe(t,"boxes","nonMaxSuppression"),c=Qe(n,"scores","nonMaxSuppression"),l=uu(s,c,e,r,i);return Ye.runKernelFunc(function(d){return d.nonMaxSuppression(s,c,e,r,i)},{boxes:s,scores:c},null,"NonMaxSuppressionV3",{maxOutputSize:e=l.maxOutputSize,iouThreshold:r=l.iouThreshold,scoreThreshold:i=l.scoreThreshold})}}),$y=kt({nonMaxSuppressionWithScore_:function(t,n,e,r,i,s){void 0===r&&(r=.5),void 0===i&&(i=Number.NEGATIVE_INFINITY),void 0===s&&(s=0);var c=Qe(t,"boxes","nonMaxSuppression"),l=Qe(n,"scores","nonMaxSuppression"),u=uu(c,l,e,r,i,s),d={maxOutputSize:e=u.maxOutputSize,iouThreshold:r=u.iouThreshold,scoreThreshold:i=u.scoreThreshold,softNmsSigma:s=u.softNmsSigma},p=Ye.runKernel("NonMaxSuppressionV5",{boxes:c,scores:l},d);return{selectedIndices:p[0],selectedScores:p[1]}}}),Xy=kt({cropAndResize_:function(t,n,e,r,i,s){var c=Qe(t,"image","cropAndResize"),l=Qe(n,"boxes","cropAndResize","float32"),u=Qe(e,"boxInd","cropAndResize","int32");i=i||"bilinear",s=s||0;var d=l.shape[0];return at(4===c.rank,function(){return"Error in cropAndResize: image must be rank 4,but got rank "+c.rank+"."}),at(2===l.rank&&4===l.shape[1],function(){return"Error in cropAndResize: boxes must be have size ["+d+",4] but had shape "+l.shape+"."}),at(1===u.rank&&u.shape[0]===d,function(){return"Error in cropAndResize: boxInd must be have size ["+d+"] but had shape "+l.shape+"."}),at(2===r.length,function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."}),at(r[0]>=1&&r[1]>=1,function(){return"cropSize must be atleast [1,1], but was "+r}),at("bilinear"===i||"nearest"===i,function(){return"method must be bilinear or nearest, but was "+i}),Ye.runKernelFunc(function(p,M){return p.cropAndResize(c,l,u,r,i,s)},{images:c,boxes:l,boxInd:u},null,"CropAndResize",{method:i,extrapolationValue:s,cropSize:r})}}),Wd=Object.freeze({resizeBilinear:Uy,resizeNearestNeighbor:Vy,nonMaxSuppression:Gy,nonMaxSuppressionAsync:function(t,n,e,r,i){return void 0===r&&(r=.5),void 0===i&&(i=Number.NEGATIVE_INFINITY),st(this,void 0,void 0,function(){var s,c,l,u,M;return Ln(this,function(x){switch(x.label){case 0:return s=Qe(t,"boxes","nonMaxSuppressionAsync"),c=Qe(n,"scores","nonMaxSuppressionAsync"),l=uu(s,c,e,r,i),e=l.maxOutputSize,r=l.iouThreshold,i=l.scoreThreshold,[4,Promise.all([s.data(),c.data()])];case 1:return u=x.sent(),M=ad(u[0],u[1],e,r,i),s!==t&&s.dispose(),c!==n&&c.dispose(),[2,M]}})})},nonMaxSuppressionWithScore:$y,nonMaxSuppressionWithScoreAsync:function(t,n,e,r,i,s){return void 0===r&&(r=.5),void 0===i&&(i=Number.NEGATIVE_INFINITY),void 0===s&&(s=0),st(this,void 0,void 0,function(){var c,l,u,d,x;return Ln(this,function(R){switch(R.label){case 0:return c=Qe(t,"boxes","nonMaxSuppressionAsync"),l=Qe(n,"scores","nonMaxSuppressionAsync"),u=uu(c,l,e,r,i,s),e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold,s=u.softNmsSigma,[4,Promise.all([c.data(),l.data()])];case 1:return d=R.sent(),x=G3(d[0],d[1],e,r,i,s),c!==t&&c.dispose(),l!==n&&l.dispose(),[2,x]}})})},cropAndResize:Xy}),Ud=function(t,n){return!(t>0)||"linear"===n},du=function(t,n,e){if(null==e||"linear"===e)return t;if("relu"===e)return t.mul(n.step());throw new Error("Gradient for activation "+e+" has not been implemented yet.")},Vd=function(t,n){var e=n,r=Aa(t.shape,n.shape);return r.length>0&&(e=e.sum(r)),e.reshape(t.shape)},Gd=function(t,n,e){if("linear"===n)return t;if("relu"===n)return ua(t);if("elu"===n)return e8(t);if("relu6"===n)return au(t);if("prelu"===n)return n8(t,e);throw new Error("Unknown fused activation "+n+".")},Zy=kt({fusedMatMul_:function(t){var n,e=t.a,r=t.b,i=t.transposeA,s=void 0!==i&&i,c=t.transposeB,l=void 0!==c&&c,u=t.bias,d=t.activation,p=void 0===d?"linear":d,M=t.preluActivationWeights;if(!1===Ud(Ye.state.gradientDepth,p)){var x=z0(e,r,s,l);return null!=u&&(x=Ro(x,u)),Gd(x,p,M)}var R=Qe(e,"a","fused matMul"),U=Qe(r,"b","fused matMul");n=ti(R,U),R=n[0],U=n[1];var J=s?R.shape[R.rank-2]:R.shape[R.rank-1],ne=l?U.shape[U.rank-1]:U.shape[U.rank-2],ue=s?R.shape[R.rank-1]:R.shape[R.rank-2],Ie=l?U.shape[U.rank-2]:U.shape[U.rank-1],Ae=R.shape.slice(0,-2),Oe=U.shape.slice(0,-2),Fe=rr(Ae),et=rr(Oe);at(R.rank>=2&&U.rank>=2&&R.rank===U.rank,function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+R.rank+" and "+U.rank+"."}),at(yi(Ae,Oe),function(){return"Error in fused matMul: outer dimensions ("+Ae+") and ("+Oe+") of Tensors with shapes "+R.shape+" and "+U.shape+" must match."}),at(J===ne,function(){return"Error in fused matMul: inner shapes ("+J+") and ("+ne+") of Tensors with shapes "+R.shape+" and "+U.shape+" and transposeA="+s+" and transposeB="+l+" must match."});var Ct,yt,pt=R.shape.slice(0,-2).concat([ue,Ie]),gt=s?R.as3D(Fe,J,ue):R.as3D(Fe,ue,J),Bt=l?U.as3D(et,Ie,ne):U.as3D(et,ne,Ie);null!=u&&zo(pt,(Ct=ti(Ct=Qe(u,"bias","fused matMul"),R)[0]).shape),null!=M&&(yt=Qe(M,"prelu weights","fused matMul"));var Ft={a:gt,b:Bt};return null!=u&&(Ft.bias=Ct),null!=M&&(Ft.preluActivationWeights=yt),Ye.runKernelFunc(function(pn,_n){var Dn=pn.fusedBatchMatMul({a:gt,b:Bt,transposeA:s,transposeB:l,bias:Ct,activation:p,preluActivationWeights:yt});return _n([gt,Bt,Dn]),Dn},Ft,function(pn,_n){var Dn=_n[0],En=_n[1],Nn=du(pn,_n[2],p),Rn={};return null!=u&&(Rn={bias:function(){return Vd(Ct,Nn)}}),Object.assign(s||l?!s&&l?{a:function(){return Nn.matMul(En,!1,!1)},b:function(){return Nn.matMul(Dn,!0,!1)}}:s&&!l?{a:function(){return En.matMul(Nn,!1,!0)},b:function(){return Dn.matMul(Nn,!1,!1)}}:{a:function(){return En.matMul(Nn,!0,!0)},b:function(){return Nn.matMul(Dn,!0,!0)}}:{a:function(){return Nn.matMul(En,!1,!0)},b:function(){return Dn.matMul(Nn,!0,!1)}},Rn)},"_FusedMatMul",{transposeA:s,transposeB:l,activation:p},[gt,Bt],[!0]).reshape(pt)}}),_8=kt({fusedConv2d_:function(t){var n=t.x,e=t.filter,r=t.strides,i=t.pad,s=t.dataFormat,c=void 0===s?"NHWC":s,l=t.dilations,u=void 0===l?[1,1]:l,d=t.dimRoundingMode,p=t.bias,M=t.activation,x=void 0===M?"linear":M,R=t.preluActivationWeights;if(!1===Ud(Ye.state.gradientDepth,x=x||"linear")){var U=Xc(n,e,r,i,c,u,d);return null!=p&&(U=Ro(U,p)),Gd(U,x,R)}var J=Qe(n,"x","conv2d"),ne=Qe(e,"filter","conv2d"),ue=J,Ie=!1;3===J.rank&&(Ie=!0,ue=J.as4D(1,J.shape[0],J.shape[1],J.shape[2])),at(4===ue.rank,function(){return"Error in fused conv2d: input must be rank 4, but got rank "+ue.rank+"."}),at(4===ne.rank,function(){return"Error in fused conv2d: filter must be rank 4, but got rank "+ne.rank+"."}),null!=d&&at(ai(i),function(){return"Error in fused conv2d: pad must be an integer when using, dimRoundingMode "+d+" but got pad "+i+"."}),at(ue.shape[3]===ne.shape[2],function(){return"Error in conv2d: depth of input ("+ue.shape[3]+") must match input depth for filter "+ne.shape[2]+"."}),at(qs(r,u),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+u+"'"}),at("NHWC"===c,function(){return"Error in conv2d: got dataFormat of "+c+" but only NHWC is currently supported."});var Ae,Oe,Fe=_2(ue.shape,ne.shape,r,u,i,d);null!=p&&(Ae=ti(Ae=Qe(p,"bias","fused conv2d"),J)[0],zo(Fe.outShape,Ae.shape)),null!=R&&(Oe=Qe(R,"prelu weights","fused conv2d"));var et={x:ue,filter:ne};null!=p&&(et.bias=Ae),null!=R&&(et.preluActivationWeights=Oe);var yt=Ye.runKernelFunc(function(pt,gt){var Bt=pt.fusedConv2d({input:ue,filter:ne,convInfo:Fe,bias:Ae,activation:x,preluActivationWeights:Oe});return gt([ne,ue,Bt]),Bt},et,function(pt,gt){var Ft=gt[0],yn=gt[1],_n=du(pt,gt[2],x);at(g2(u),function(){return"Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+u+"'"});var Dn={};return null!=p&&(Dn={bias:function(){return Vd(Ae,_n)}}),Object.assign({x:function(){return zd(yn.shape,_n,Ft,r,i)},filter:function(){return Nd(yn,_n,Ft.shape,r,i)}},Dn)},"FusedConv2D",{convInfo:Fe,activation:x},[ne,ue],[!0]);return Ie?yt.as3D(yt.shape[1],yt.shape[2],yt.shape[3]):yt}}),Jy=kt({fusedDepthwiseConv2d_:function(t){var n=t.x,e=t.filter,r=t.strides,i=t.pad,s=t.dataFormat,c=void 0===s?"NHWC":s,l=t.dilations,u=void 0===l?[1,1]:l,d=t.dimRoundingMode,p=t.bias,M=t.activation,x=void 0===M?"linear":M,R=t.preluActivationWeights;if(!1===Ud(Ye.state.gradientDepth,x)){var U=iu(n,e,r,i,c,u,d);return null!=p&&(U=Ro(U,p)),Gd(U,x,R)}var J=Qe(n,"x","depthwiseConv2d"),ne=Qe(e,"filter","depthwiseConv2d"),ue=J,Ie=!1;3===J.rank&&(Ie=!0,ue=J.as4D(1,J.shape[0],J.shape[1],J.shape[2])),at(4===ue.rank,function(){return"Error in fused depthwiseConv2d: input must be rank 4, but got rank "+ue.rank+"."}),at(4===ne.rank,function(){return"Error in fused depthwiseConv2d: filter must be rank 4, but got rank "+ne.rank+"."}),at(ue.shape[3]===ne.shape[2],function(){return"Error in fused depthwiseConv2d: number of input channels ("+ue.shape[3]+") must match the inChannels dimension in filter "+ne.shape[2]+"."}),null==u&&(u=[1,1]),at(qs(r,u),function(){return"Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+u+"'"}),null!=d&&at(ai(i),function(){return"Error in fused depthwiseConv2d: pad must be an integer when using dimRoundingMode "+d+" but got pad "+i+"."});var Ae,Oe,Fe=_2(ue.shape,ne.shape,r,u,i,d,!0);null!=p&&(Ae=ti(Ae=Qe(p,"bias","fused conv2d"),J)[0],zo(Fe.outShape,Ae.shape)),null!=R&&(Oe=Qe(R,"prelu weights","fused depthwiseConv2d"));var et={x:ue,filter:ne};null!=p&&(et.bias=Ae),null!=R&&(et.preluActivationWeights=Oe);var yt=Ye.runKernelFunc(function(pt,gt){var Bt=pt.fusedDepthwiseConv2D({input:ue,filter:ne,convInfo:Fe,bias:Ae,activation:x,preluActivationWeights:Oe});return gt([ne,ue,Bt]),Bt},et,function(pt,gt){at(g2(u),function(){return"Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+u+"'"});var Bt=gt[0],Ft=gt[1],pn=du(pt,gt[2],x),_n={};return null!=p&&(_n={bias:function(){return Vd(Ae,pn)}}),Object.assign({x:function(){return Vp(Ft.shape,pn,Bt,Fe)},filter:function(){return Gp(Ft,pn,Bt.shape,Fe)}},_n)},"FusedDepthwiseConv2D",{convInfo:Fe,activation:x},[ne,ue],[!0]);return Ie?yt.as3D(yt.shape[1],yt.shape[2],yt.shape[3]):yt}}),g8=Object.freeze({matMul:Zy,conv2d:_8,depthwiseConv2d:Jy}),Qy=Object.freeze({image:Wd,linalg:Wy,losses:f8,spectral:Dy,fused:g8,signal:Ay,square:uv,squaredDifference:_p,conv1d:ry,conv2d:Xc,conv3d:Up,depthwiseConv2d:iu,separableConv2d:Rd,conv2dTranspose:$p,conv3dTranspose:oy,op:kt,batchNormalization2d:xp,batchNormalization3d:Pv,batchNormalization4d:kp,batchNormalization:Ov,batchNorm:Dp,batchNorm2d:Iv,batchNorm3d:Pp,batchNorm4d:Av,booleanMaskAsync:function(t,n,e){return st(this,void 0,void 0,function(){var r,i,s,c,l,u,d,p,M,x,R,U,J;return Ln(this,function(ne){switch(ne.label){case 0:for(r=Qe(t,"tensor","boolMask"),i=Qe(n,"mask","boolMask","bool"),s=e??0,l=r.shape,at((c=i.rank)>0,function(){return"mask cannot be scalar"}),ho(l.slice(s,s+c),i.shape,"mask's shape must match the first K dimensions of tensor's shape,"),u=1,d=s;d1,function(){return"inTopK() expects the predictions to be of rank 2 or higher, but got "+r.rank}),at(r.rank-1===i.rank,function(){return"predictions rank should be 1 larger than targets rank, but got predictions rank "+r.rank+" and targets rank "+i.rank}),ho(r.shape.slice(0,r.shape.length-1),i.shape,"predictions's shape should be align with the targets' shape, except the last dimension."),s=r.shape[r.shape.length-1],at(e>0&&e<=s,function(){return"'k' passed to inTopK() must be > 0 && <= the predictions last dimension ("+s+"), but got "+e}),[4,r.data()];case 1:return c=ue.sent(),[4,i.data()];case 2:for(l=ue.sent(),p=(u=[c.length/s,s])[1],M=Ba("bool",d=u[0]),x=0;xU&&(U=ue,J=ne)}p[x]=J}return u},n.prototype.cumsum=function(e,r,i,s){if(kn(e,"cumsum"),r!==e.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(e.rank-1)+" but got axis="+r);for(var c=Oi(e.dtype,"int32"),l=$n(e.shape,c),u=this.readSync(l.dataId),d=this.readSync(e.dataId),p=e.shape[e.rank-1],M=s?function(ne,ue){return ne+p-ue-1}:function(ne,ue){return ne+ue},x=0;xs?1:0})},n.prototype.greaterEqual=function(e,r){return kn([e,r],"greaterEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,s){return i>=s?1:0})},n.prototype.logicalNot=function(e){kn(e,"logicalNot");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),s=0;s1||1===r.rank?1:rr(r.shape.slice(1)),x=0;x=0&&s>=0?c:(c+s)%s})},n.prototype.max=function(e,r){kn(e,"max"),ys("max",r,e.rank);for(var i=ta(e.shape,r),c=i[1],l=$n(i[0],e.dtype),u=rr(c),d=this.readSync(l.dataId),p=this.readSync(e.dataId),M=0;MR&&(R=J)}d[M]=R}return l},n.prototype.maximum=function(e,r){return kn([e,r],"maximum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,s){return Math.max(i,s)})},n.prototype.all=function(e,r){kn(e,"all"),ys("all",r,e.rank);for(var i=ta(e.shape,r),c=i[1],l=$n(i[0],e.dtype),u=rr(c),d=this.readSync(l.dataId),p=this.readSync(e.dataId),M=0;M0?1:0;return this.makeOutput(i,e.shape,"float32")},n.prototype.isNaN=function(e){kn(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),s=0;s.5?Math.ceil(r[s]):c%2==0?c:c+1}return this.makeOutput(i,e.shape,"float32")},n.prototype.exp=function(e){kn(e,"exp");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),s=0;s=0?c:Math.exp(c)-1}return this.makeOutput(r,e.shape,"float32")},n.prototype.eluDer=function(e,r){kn([e,r],"eluDer");for(var i=new Float32Array(r.size),s=this.readSync(r.dataId),c=this.readSync(e.dataId),l=0;l=1?c[l]:c[l]*(u+1)}return this.makeOutput(i,r.shape,"float32")},n.prototype.selu=function(e){kn(e,"selu");for(var s=new Float32Array(e.size),c=this.readSync(e.dataId),l=0;l=0?1.0507009873554805*u:1.7580993408473768*(Math.exp(u)-1)}return this.makeOutput(s,e.shape,"float32")},n.prototype.clip=function(e,r,i){kn(e,"clip");for(var s=new Float32Array(e.size),c=this.readSync(e.dataId),l=0;li?i:u-r,u=s[c]0?1:r}return this.makeOutput(i,e.shape,"float32")},n.prototype.fusedConv2d=function(e){var c=e.bias,l=e.activation,u=e.preluActivationWeights,d=this.conv2d(e.input,e.filter,e.convInfo);return c&&(d=this.add(d,c)),l&&(d=fu(this,d,l,u)),d},n.prototype.conv2d=function(e,r,i){kn([e,r],"conv2d");for(var s=i.filterHeight,c=i.filterWidth,l=i.dilationHeight,u=i.dilationWidth,d=i.padInfo.left,p=i.padInfo.top,M="channelsLast"===i.dataFormat,x=zn(i.outShape,e.dtype),R=e.strides[0],U=M?e.strides[1]:e.strides[2],J=M?e.strides[2]:1,ne=M?1:e.strides[1],ue=x.strides[0],Ie=M?x.strides[1]:x.strides[2],Ae=M?x.strides[2]:1,Oe=M?1:x.strides[1],Fe=this.readSync(e.dataId),et=this.readSync(r.dataId),Ct=x.values,yt=0;yt=i.inHeight))for(var Dn=pn*r.strides[0],En=pt+_n*U,bn=0;bn=i.inWidth))for(var Br=En+Tr*J,Oo=Dn+ur*r.strides[1],Do=0;Do=i.inDepth))for(var gt=yt*r.strides[0],Bt=Ae+pt*e.strides[1],Ft=0;Ft=i.inHeight))for(var En=gt+_n*r.strides[1],bn=Bt+Dn*e.strides[2],Nn=0;Nn=i.inWidth))for(var Do=bn+Br*i.inChannels,Wo=En+Tr*r.strides[2],ri=0;ri=i.inHeight))for(var yt=et*r.strides[0],pt=ue+Ct*e.strides[1],gt=0;gt=i.inWidth))for(var Dn=pt+pn*i.inChannels,En=Bt,bn=yt+yn*r.strides[1],Nn=0;NnEn?En=Br:"avg"===i&&(bn+=Br,Nn++)}if(isNaN(En))break}ne[Ft+yn*Ae+Ct]="avg"===i?bn/Nn:En}return J.toTensor()},n.prototype.maxPool=function(e,r){return this.pool(e,r,"max")},n.prototype.maxPoolPositions=function(e,r){for(var i=zn(r.outShape,"int32"),s=r.strideHeight,c=r.strideWidth,l=r.dilationHeight,u=r.dilationWidth,d=r.effectiveFilterHeight,p=r.effectiveFilterWidth,M=r.padInfo.top,x=r.padInfo.left,R=this.bufferSync(e),U=0;Uyt&&(yt=pn,pt=Bt*p+yn)}i.set(pt,U,ne,Oe,J)}}return i.toTensor()},n.prototype.maxPoolBackprop=function(e,r,i,s){kn([r,i],"maxPoolBackprop");for(var c=this.maxPoolPositions(r,s),l=s.strideHeight,u=s.strideWidth,d=s.dilationHeight,p=s.dilationWidth,M=s.effectiveFilterHeight,x=s.effectiveFilterWidth,R=x-1-s.padInfo.left,U=M-1-s.padInfo.top,J=zn(r.shape,"float32"),ne=this.bufferSync(c),ue=this.bufferSync(e),Ie=0;Ie=s.outHeight||Math.floor(gt)!==gt))for(var Bt=0;Bt=s.outWidth||Math.floor(Ft)!==Ft)){var yn=M*x-1-ne.get(Ie,gt,Ft,Ae)===pt*x+Bt?1:0;0!==yn&&(yt+=ue.get(Ie,gt,Ft,Ae)*yn)}}}J.set(yt,Ie,Oe,Fe,Ae)}return J.toTensor()},n.prototype.avgPoolBackprop=function(e,r,i){kn([e,r],"avgPoolBackprop");for(var s=i.strideHeight,c=i.strideWidth,l=i.filterHeight,u=i.filterWidth,d=i.dilationHeight,p=i.dilationWidth,M=i.effectiveFilterHeight,x=i.effectiveFilterWidth,R=x-1-i.padInfo.left,U=M-1-i.padInfo.top,J=zn(r.shape,"float32"),ne=1/(l*u),ue=this.bufferSync(e),Ie=0;Ie=i.outHeight||Math.floor(gt)!==gt))for(var Bt=0;Bt=i.outWidth||Math.floor(Ft)!==Ft||(yt+=ue.get(Ie,gt,Ft,Ae))}}J.set(yt*ne,Ie,Oe,Fe,Ae)}return J.toTensor()},n.prototype.pool3d=function(e,r,i){kn(e,"pool3d");for(var s=r.strideDepth,c=r.strideHeight,l=r.strideWidth,u=r.dilationDepth,d=r.dilationHeight,p=r.dilationWidth,M=r.effectiveFilterDepth,x=r.effectiveFilterHeight,R=r.effectiveFilterWidth,U=r.padInfo.front,J=r.padInfo.top,ne=r.padInfo.left,ue="max"===i?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,Ie=this.readSync(e.dataId),Ae=zn(r.outShape,e.dtype),Oe=Ae.values,Fe=r.outShape[1]*r.outShape[2]*r.outShape[3]*r.outShape[4],et=r.outShape[2]*r.outShape[3]*r.outShape[4],Ct=r.outShape[3]*r.outShape[4],yt=r.outShape[4],pt=0;ptUo?Uo=pa:"avg"===i&&(oi+=pa,Ya++),isNaN(Uo))break}if(isNaN(Uo))break}if(isNaN(Uo))break}Oe[ri+Ft]="avg"===i?oi/Ya:Uo}}}return Ae.toTensor()},n.prototype.avgPool3d=function(e,r){return kn(e,"avgPool3d"),this.pool3d(e,r,"avg").toFloat()},n.prototype.avgPool3dBackprop=function(e,r,i){kn([e,r],"avgPool3dBackprop");for(var s=i.strideDepth,c=i.strideHeight,l=i.strideWidth,u=i.filterDepth,d=i.filterHeight,p=i.filterWidth,M=i.dilationDepth,x=i.dilationHeight,R=i.dilationWidth,U=i.effectiveFilterDepth,J=i.effectiveFilterHeight,ne=i.effectiveFilterWidth,ue=U-1-i.padInfo.front,Ie=ne-1-i.padInfo.left,Ae=J-1-i.padInfo.top,Oe=zn(r.shape,"float32"),Fe=1/(u*d*p),et=this.bufferSync(e),Ct=0;Ct=i.outDepth||Math.floor(En)!==En))for(var bn=0;bn=i.outHeight||Math.floor(Nn)!==Nn))for(var Rn=0;Rn=i.outWidth||Math.floor(ur)!==ur||(_n+=et.get(Ct,En,Nn,ur,yt))}}}Oe.set(_n*Fe,Ct,pt,gt,Bt,yt)}return Oe.toTensor()},n.prototype.maxPool3d=function(e,r){return kn(e,"maxPool3d"),this.pool3d(e,r,"max").toFloat()},n.prototype.maxPool3dPositions=function(e,r){for(var i=zn(r.outShape,"int32"),s=r.strideDepth,c=r.strideHeight,l=r.strideWidth,u=r.dilationDepth,d=r.dilationHeight,p=r.dilationWidth,M=r.effectiveFilterDepth,x=r.effectiveFilterHeight,R=r.effectiveFilterWidth,U=r.padInfo.front,J=r.padInfo.top,ne=r.padInfo.left,ue=this.bufferSync(e),Ie=0;Ie=Dn&&(Dn=Oo,En=Nn*x*R+ur*x+Br)}i.set(En,Ie,Oe,yt,Ft,Ae)}}}return i.toTensor()},n.prototype.maxPool3dBackprop=function(e,r,i,s){kn([r,i],"maxPool3dBackprop");for(var c=this.maxPool3dPositions(r,s),l=s.strideDepth,u=s.strideHeight,d=s.strideWidth,p=s.dilationDepth,M=s.dilationHeight,x=s.dilationWidth,R=s.effectiveFilterDepth,U=s.effectiveFilterHeight,J=s.effectiveFilterWidth,ne=R-1-s.padInfo.front,ue=J-1-s.padInfo.left,Ie=U-1-s.padInfo.top,Ae=zn(r.shape,"float32"),Oe=this.bufferSync(c),Fe=this.bufferSync(e),et=0;et=s.outDepth||Math.floor(Dn)!==Dn))for(var En=0;En=s.outHeight||Math.floor(bn)!==bn))for(var Nn=0;Nn=s.outWidth||Math.floor(Rn)!==Rn)){var ur=R*U*J-1-Oe.get(et,Dn,bn,Rn,Ct)===_n*U*J+En*J+Nn?1:0;0!==ur&&(pn+=Fe.get(et,Dn,bn,Rn,Ct)*ur)}}}}Ae.set(pn,et,yt,pt,gt,Ct)}return Ae.toTensor()},n.prototype.cast=function(e,r){return nd(e,r,this)},n.prototype.reshape=function(e,r){return k0(e,r)},n.prototype.avgPool=function(e,r){return kn(e,"avgPool"),this.pool(e,r,"avg").toFloat()},n.prototype.resizeBilinear=function(e,r,i,s){kn(e,"resizeBilinear");for(var c=e.shape,l=c[0],u=c[1],d=c[2],p=c[3],M=this.readSync(e.dataId),x=new Float32Array(rr([l,r,i,p])),R=[s&&r>1?u-1:u,s&&i>1?d-1:d],U=[s&&r>1?r-1:r,s&&i>1?i-1:i],J=0,ne=R[0]/U[0],ue=R[1]/U[1],Ie=0;Ie1?l-1:l,i&&x>1?u-1:u],J=[i&&M>1?M-1:M,i&&x>1?x-1:x],ne=U[0]/J[0],ue=U[1]/J[1],Ie=this.readSync(e.dataId),Ae=0,Oe=0;Oe1?u-1:u,s&&i>1?d-1:d],U=[s&&r>1?r-1:r,s&&i>1?i-1:i],J=R[0]/U[0],ne=R[1]/U[1],ue=0,Ie=0;Ie1?l-1:l,i&&x>1?u-1:u],ne=[i&&M>1?M-1:M,i&&x>1?x-1:x],ue=J[0]/ne[0],Ie=J[1]/ne[1],Ae=1/ue,Oe=1/Ie,Fe=2*Math.ceil(Ae)+2,et=2*Math.ceil(Oe)+2,Ct=0;Ct=M)){var ur=yt+Rn*e.strides[1],Tr=Rn*ue;if(pt===Math.min(l-1,i?Math.round(Tr):Math.floor(Tr)))for(var Br=0;Br=x)){var Do=ur+Oo*e.strides[2],Wo=Oo*Ie;yn===Math.min(u-1,i?Math.round(Wo):Math.floor(Wo))&&(bn+=U[Do+En])}}}}R[pn+En]=bn}return Se(R,r.shape,r.dtype)},n.prototype.batchNormalization=function(e,r,i,s,c,l){kn([e,r,i,c,l],"batchNorm");for(var u=this.readSync(e.dataId),d=this.readSync(r.dataId),p=this.readSync(i.dataId),M=c?this.readSync(c.dataId):new Float32Array([1]),x=l?this.readSync(l.dataId):new Float32Array([0]),R=new Float32Array(u.length),U=x.length,J=M.length,ne=p.length,ue=d.length,Ie=0,Ae=0,Oe=0,Fe=0,et=0;et=U&&(Ie=0),Ae>=ue&&(Ae=0),Oe>=J&&(Oe=0),Fe>=ne&&(Fe=0);return Se(R,e.shape)},n.prototype.localResponseNormalization4D=function(e,r,i,s,c){kn(e,"localResponseNormalization4D");var l=e.shape[3],u=l-1,d=this.readSync(e.dataId),p=e.size,M=new Float32Array(p);function x(ne){for(var ue=ne%l,Ie=ne-ue+Math.max(0,ue-r),Ae=ne-ue+Math.min(ue+r,u),Oe=0;Ie<=Ae;Ie++){var Fe=d[Ie];Oe+=Fe*Fe}return Oe}for(var R=0;R=0&&l[u]1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});for(var s=e.shape[0],c=e.shape[1],l=e.shape[2],u=e.shape[3],d=c*r,p=l*r,M=u/(r*r),x=this.readSync(e.dataId),R=new Float32Array(s*d*p*M),U=0,J=0;J=d))for(var yn=U>1?(gt-yt)*(p-1)/(U-1):0,pn=J>1?(Bt-pt)*(M-1)/(J-1):0,_n=0;_n1?yt*(p-1)+_n*yn:.5*(yt+gt)*(p-1);if(Dn<0||Dn>p-1)for(var En=0;En1?pt*(M-1)+En*pn:.5*(pt+Bt)*(M-1))<0||Qo>M-1)for(bn=0;bn1?pt*(M-1)+En*pn:.5*(pt+Bt)*(M-1))<0||Qo>M-1)for(bn=0;bn=e.size/d)throw new Error("Invalid indices: "+J+" does not index into "+e.shape);for(var Ae=0;Ae=s/c)throw new Error("Invalid indices: "+ue+" does not index into "+i);for(var Fe=0;Fe"u"||typeof atob>"u"||typeof btoa>"u");function qd(t){return Qd?Buffer.byteLength(t):new Blob([t]).size}function e6(t){var n=0;t.forEach(function(i){n+=i.byteLength});var e=new Uint8Array(n),r=0;return t.forEach(function(i){e.set(new Uint8Array(i),r),r+=i.byteLength}),e.buffer}function C8(t){for(t=t.trim();t.endsWith("/");)t=t.slice(0,t.length-1);var n=t.split("/");return n[n.length-1]}function Al(t){if(t.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:null==t.modelTopology?0:qd(JSON.stringify(t.modelTopology)),weightSpecsBytes:null==t.weightSpecs?0:qd(JSON.stringify(t.weightSpecs)),weightDataBytes:null==t.weightData?0:t.weightData.byteLength}}var Sc=function(){function t(){this.saveRouters=[],this.loadRouters=[]}return t.getInstance=function(){return null==t.instance&&(t.instance=new t),t.instance},t.registerSaveRouter=function(n){t.getInstance().saveRouters.push(n)},t.registerLoadRouter=function(n){t.getInstance().loadRouters.push(n)},t.getSaveHandlers=function(n){return t.getHandlers(n,"save")},t.getLoadHandlers=function(n,e){return t.getHandlers(n,"load",e)},t.getHandlers=function(n,e,r){var i=[];return("load"===e?t.getInstance().loadRouters:t.getInstance().saveRouters).forEach(function(s){var c=s(n,r);null!==c&&i.push(c)}),i},t}(),Nl="://",M2=function(){function t(){this.managers={}}return t.getInstance=function(){return null==t.instance&&(t.instance=new t),t.instance},t.registerManager=function(n,e){at(null!=n,function(){return"scheme must not be undefined or null."}),n.endsWith(Nl)&&(n=n.slice(0,n.indexOf(Nl))),at(n.length>0,function(){return"scheme must not be an empty string."});var r=t.getInstance();at(null==r.managers[n],function(){return"A model store manager is already registered for scheme '"+n+"'."}),r.managers[n]=e},t.getManager=function(n){var e=this.getInstance().managers[n];if(null==e)throw new Error("Cannot find model manager for scheme '"+n+"'");return e},t.getSchemes=function(){return Object.keys(this.getInstance().managers)},t}();function mu(t){if(-1===t.indexOf(Nl))throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+M2.getSchemes().join(","));return{scheme:t.split(Nl)[0],path:t.split(Nl)[1]}}function b8(t,n,e){return void 0===e&&(e=!1),st(this,void 0,void 0,function(){var r,i,s,c,l,u,d,p,M;return Ln(this,function(x){switch(x.label){case 0:return at(t!==n,function(){return"Old path and new path are the same: '"+t+"'"}),at((r=Sc.getLoadHandlers(t)).length>0,function(){return"Copying failed because no load handler is found for source URL "+t+"."}),at(r.length<2,function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+t+"."}),i=r[0],at((s=Sc.getSaveHandlers(n)).length>0,function(){return"Copying failed because no save handler is found for destination URL "+n+"."}),at(s.length<2,function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+n+"."}),c=s[0],l=mu(t).scheme,u=mu(t).path,d=l===mu(t).scheme,[4,i.load()];case 1:return p=x.sent(),e&&d?[4,M2.getManager(l).removeModel(u)]:[3,3];case 2:x.sent(),x.label=3;case 3:return[4,c.save(p)];case 4:return M=x.sent(),!e||d?[3,6]:[4,M2.getManager(l).removeModel(u)];case 5:x.sent(),x.label=6;case 6:return[2,M.modelArtifactsInfo]}})})}var C2="models_store",b2="model_info_store";function L8(){if(!X().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var t=window||self,n=t.indexedDB||t.mozIndexedDB||t.webkitIndexedDB||t.msIndexedDB||t.shimIndexedDB;if(null==n)throw new Error("The current browser does not appear to support IndexedDB.");return n}function pu(t){var n=t.result;n.createObjectStore(C2,{keyPath:"modelPath"}),n.createObjectStore(b2,{keyPath:"modelPath"})}var zl=function(){function t(n){if(this.indexedDB=L8(),null==n||!n)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=n}return t.prototype.save=function(n){return st(this,void 0,void 0,function(){return Ln(this,function(e){if(n.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,n)]})})},t.prototype.load=function(){return st(this,void 0,void 0,function(){return Ln(this,function(n){return[2,this.databaseAction(this.modelPath)]})})},t.prototype.databaseAction=function(n,e){var r=this;return new Promise(function(i,s){var c=r.indexedDB.open("tensorflowjs",1);c.onupgradeneeded=function(){return pu(c)},c.onsuccess=function(){var l=c.result;if(null==e){var u=l.transaction(C2,"readonly"),d=u.objectStore(C2).get(r.modelPath);d.onsuccess=function(){if(null==d.result)return l.close(),s(new Error("Cannot find model with path '"+r.modelPath+"' in IndexedDB."));i(d.result.modelArtifacts)},d.onerror=function(J){return l.close(),s(d.error)},u.oncomplete=function(){return l.close()}}else{var p,M=Al(e),x=l.transaction(b2,"readwrite"),R=x.objectStore(b2),U=R.put({modelPath:r.modelPath,modelArtifactsInfo:M});U.onsuccess=function(){var J=(p=l.transaction(C2,"readwrite")).objectStore(C2).put({modelPath:r.modelPath,modelArtifacts:e,modelArtifactsInfo:M});J.onsuccess=function(){return i({modelArtifactsInfo:M})},J.onerror=function(ne){var ue=(R=x.objectStore(b2)).delete(r.modelPath);ue.onsuccess=function(){return l.close(),s(J.error)},ue.onerror=function(Ie){return l.close(),s(J.error)}}},U.onerror=function(J){return l.close(),s(U.error)},x.oncomplete=function(){null==p?l.close():p.oncomplete=function(){return l.close()}}}},c.onerror=function(l){return s(c.error)}})},t.URL_SCHEME="indexeddb://",t}(),t6=function(t){return X().getBool("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(zl.URL_SCHEME)?(n=t.slice(zl.URL_SCHEME.length),new zl(n)):null;var n};Sc.registerSaveRouter(t6),Sc.registerLoadRouter(t6);var aM=function(){function t(){this.indexedDB=L8()}return t.prototype.listModels=function(){return st(this,void 0,void 0,function(){var n=this;return Ln(this,function(e){return[2,new Promise(function(r,i){var s=n.indexedDB.open("tensorflowjs",1);s.onupgradeneeded=function(){return pu(s)},s.onsuccess=function(){var c=s.result,l=c.transaction(b2,"readonly"),u=l.objectStore(b2).getAll();u.onsuccess=function(){for(var d={},p=0,M=u.result;p"u"||void 0===window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==n||!n)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=n,this.keys=w8(this.modelPath)}return t.prototype.save=function(n){return st(this,void 0,void 0,function(){var e,r,i;return Ln(this,function(s){if(n.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");e=JSON.stringify(n.modelTopology),r=JSON.stringify(n.weightSpecs),i=Al(n);try{return this.LS.setItem(this.keys.info,JSON.stringify(i)),this.LS.setItem(this.keys.topology,e),this.LS.setItem(this.keys.weightSpecs,r),this.LS.setItem(this.keys.weightData,function(c){if(Qd)return Buffer.from(c).toString("base64");for(var l=new Uint8Array(c),u="",d=0,p=l.length;d"u"||void 0!==window.localStorage,function(){return"Current browser does not appear to support localStorage"}),this.LS=window.localStorage}return t.prototype.listModels=function(){return st(this,void 0,void 0,function(){var n,e,r,i,s,c;return Ln(this,function(l){for(n={},e=Rl+S1,r=S1+S8,i=0;i"u")throw new Error("Browser downloads are not supported in this environment since `document` is not present");if(e=window.URL.createObjectURL(new Blob([n.weightData],{type:"application/octet-stream"})),!(n.modelTopology instanceof ArrayBuffer))return[3,1];throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");case 1:return s=window.URL.createObjectURL(new Blob([JSON.stringify({modelTopology:n.modelTopology,format:n.format,generatedBy:n.generatedBy,convertedBy:n.convertedBy,weightsManifest:[{paths:["./"+this.weightDataFileName],weights:n.weightSpecs}]})],{type:"application/json"})),(c=this.jsonAnchor??document.createElement("a")).download=this.modelTopologyFileName,c.href=s,[4,x8(function(){return c.dispatchEvent(new MouseEvent("click"))})];case 2:return u.sent(),null==n.weightData?[3,4]:((l=this.weightDataAnchor??document.createElement("a")).download=this.weightDataFileName,l.href=e,[4,x8(function(){return l.dispatchEvent(new MouseEvent("click"))})]);case 3:u.sent(),u.label=4;case 4:return[2,{modelArtifactsInfo:Al(n)}]}})})},t.URL_SCHEME="downloads://",t}(),mM=function(){function t(n){if(null==n||n.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+n);this.files=n}return t.prototype.load=function(){return st(this,void 0,void 0,function(){var n,e,r=this;return Ln(this,function(i){return n=this.files[0],e=this.files.slice(1),[2,new Promise(function(s,c){var l=new FileReader;l.onload=function(u){var d=JSON.parse(u.target.result),p=d.modelTopology;if(null!=p){0===e.length&&s({modelTopology:p});var M=d.weightsManifest;if(null!=M){var x;try{x=r.checkManifestAndWeightFiles(M,e)}catch(ne){return void c(ne)}var R=[],U=[],J=[];M.forEach(function(ne){ne.paths.forEach(function(ue){U.push(ue),J.push(null)}),R.push.apply(R,ne.weights)}),M.forEach(function(ne){ne.paths.forEach(function(ue){var Ie=new FileReader;Ie.onload=function(Ae){var Oe=Ae.target.result,Fe=U.indexOf(ue);J[Fe]=Oe,-1===J.indexOf(null)&&s({modelTopology:p,weightSpecs:R,weightData:e6(J),format:d.format,generatedBy:d.generatedBy,convertedBy:d.convertedBy,userDefinedMetadata:d.userDefinedMetadata})},Ie.onerror=function(Ae){return c("Failed to weights data from file of path '"+ue+"'.")},Ie.readAsArrayBuffer(x[ue])})})}else c(new Error("weightManifest field is missing from file "+n.name))}else c(new Error("modelTopology field is missing from file "+n.name))},l.onerror=function(u){return c("Failed to read model topology and weights manifest JSON from file '"+n.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},l.readAsText(n)})]})})},t.prototype.checkManifestAndWeightFiles=function(n,e){for(var r=[],i=e.map(function(u){return C8(u.name)}),s={},c=0,l=n;c0,function(){return"promises must be a none empty array"}),function(s,c){at(s>=0&&s<=1,function(){return"Progress fraction must be in range [0, 1], but got startFraction "+s}),at(c>=0&&c<=1,function(){return"Progress fraction must be in range [0, 1], but got endFraction "+c}),at(c>=s,function(){return"startFraction must be no more than endFraction, but got startFraction "+s+" and endFraction "+c})}(e=e??0,r=r??1);var i=0;return Promise.all(t.map(function(s){return s.then(function(c){var l=e+ ++i/t.length*(r-e);return n(l),c}),s}))}function D8(t,n){return st(this,void 0,void 0,function(){var e,r,i,s,c,l,u,d,p;return Ln(this,function(M){switch(M.label){case 0:return null==n&&(n={}),e=n.fetchFunc??X().platform.fetch,r=t.map(function(x){return e(x,n.requestInit,{isBinary:!0})}),i=0,s=.5,null!=n.onProgress?[3,2]:[4,Promise.all(r)];case 1:return c=M.sent(),[3,4];case 2:return[4,k8(r,n.onProgress,i,s)];case 3:c=M.sent(),M.label=4;case 4:return l=c.map(function(x){return x.arrayBuffer()}),u=.5,d=1,null!=n.onProgress?[3,6]:[4,Promise.all(l)];case 5:return p=M.sent(),[3,8];case 6:return[4,k8(l,n.onProgress,u,d)];case 7:p=M.sent(),M.label=8;case 8:return[2,p]}})})}function P8(t){var n=this;return function(e,r,i){return void 0===r&&(r=""),st(n,void 0,void 0,function(){var s,c,l,u,d,p,M,x,R,U;return Ln(this,function(J){switch(J.label){case 0:if(s=e.map(function(){return!1}),c={},l=null!=i?i.map(function(){return!1}):[],u=[],e.forEach(function(ne,ue){var Ie=0;ne.weights.forEach(function(Ae){var Fe=Jd["quantization"in Ae?Ae.quantization.dtype:Ae.dtype]*rr(Ae.shape),et=function(){s[ue]=!0,null==c[ue]&&(c[ue]=[]),c[ue].push({manifestEntry:Ae,groupOffset:Ie,sizeBytes:Fe})};null!=i?i.forEach(function(Ct,yt){Ct===Ae.name&&(et(),l[yt]=!0)}):et(),u.push(Ae.name),Ie+=Fe})}),!l.every(function(ne){return ne}))throw d=i.filter(function(ne,ue){return!l[ue]}),new Error("Could not find weights in manifest with names: "+d.join(", ")+". \nManifest JSON has weights with names: "+u.join(", ")+".");return p=s.reduce(function(ne,ue,Ie){return ue&&ne.push(Ie),ne},[]),M=[],p.forEach(function(ne){e[ne].paths.forEach(function(ue){var Ie=r+(r.endsWith("/")?"":"/")+ue;M.push(Ie)})}),[4,t(M)];case 1:return x=J.sent(),R={},U=0,p.forEach(function(ne){for(var ue=e[ne].paths.length,Ie=0,Ae=0;Ae0,function(){return"URL path for http must not be null, undefined or empty."}),Array.isArray(n)&&at(2===n.length,function(){return"URL paths for http must have a length of 2, (actual length is "+n.length+")."}),this.path=n,null!=e.requestInit&&null!=e.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=e.requestInit||{}}return t.prototype.save=function(n){return st(this,void 0,void 0,function(){var e,s;return Ln(this,function(c){switch(c.label){case 0:if(n.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(e=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,e.body.append("model.json",new Blob([JSON.stringify({modelTopology:n.modelTopology,format:n.format,generatedBy:n.generatedBy,convertedBy:n.convertedBy,userDefinedMetadata:n.userDefinedMetadata,weightsManifest:[{paths:["./model.weights.bin"],weights:n.weightSpecs}]})],{type:"application/json"}),"model.json"),null!=n.weightData&&e.body.append("model.weights.bin",new Blob([n.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.fetch(this.path,e)];case 1:if((s=c.sent()).ok)return[2,{modelArtifactsInfo:Al(n),responses:[s]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+s.status+".")}})})},t.prototype.load=function(){return st(this,void 0,void 0,function(){var n,e,r,i,s,c,l,u,d,p,M,x;return Ln(this,function(R){switch(R.label){case 0:return[4,this.fetch(this.path,this.requestInit)];case 1:if(!(n=R.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+n.status+". Please verify this URL points to the model JSON of the model to load.");R.label=2;case 2:return R.trys.push([2,4,,5]),[4,n.json()];case 3:return e=R.sent(),[3,5];case 4:throw R.sent(),r="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?r+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":r+=" Please make sure the server is serving valid JSON for this request.",new Error(r);case 5:if(s=e.weightsManifest,c=e.generatedBy,l=e.convertedBy,u=e.format,d=e.userDefinedMetadata,null==(i=e.modelTopology)&&null==s)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return null==s?[3,7]:[4,this.loadWeights(s)];case 6:x=R.sent(),p=x[0],M=x[1],R.label=7;case 7:return[2,{modelTopology:i,weightSpecs:p,weightData:M,userDefinedMetadata:d,generatedBy:c,convertedBy:l,format:u}]}})})},t.prototype.loadWeights=function(n){return st(this,void 0,void 0,function(){var r,i,s,c,l,u,d,M,x;return Ln(this,function(R){switch(R.label){case 0:for(void 0,void 0,J=(U=Array.isArray(this.path)?this.path[1]:this.path).lastIndexOf("/"),ne=U.lastIndexOf("?"),r=[U.substring(0,J)+"/",ne>J?U.substring(ne):""],i=r[0],s=r[1],c=this.weightPathPrefix||i,l=[],u=0,d=n;u"u"?null:(Array.isArray(t)?t.every(function(e){return i6(e)}):i6(t))?a6(t,{onProgress:n}):null};function a6(t,n){return new o6(t,n)}Sc.registerSaveRouter(O8),Sc.registerLoadRouter(O8);var Fl,s6=function(){function t(n){this.modelArtifacts=n}return t.prototype.load=function(){return st(this,void 0,void 0,function(){return Ln(this,function(n){return[2,this.modelArtifacts]})})},t}(),pM=function(){function t(n){this.saveHandler=n}return t.prototype.save=function(n){return st(this,void 0,void 0,function(){return Ln(this,function(e){return[2,this.saveHandler(n)]})})},t}(),I8=Object.freeze({browserFiles:function(t){return new mM(t)},browserHTTPRequest:function(t,n){return a6(t,n)},concatenateArrayBuffers:e6,decodeWeights:M8,encodeWeights:function(t,n){return st(this,void 0,void 0,function(){var e,r,i,s,c,l=this;return Ln(this,function(u){switch(u.label){case 0:for(e=[],r=[],i=Array.isArray(t)?t.map(function(d){return d.name}):Object.keys(t),s=function(d){var p=i[d],M=Array.isArray(t)?t[d].tensor:t[p];if("float32"!==M.dtype&&"int32"!==M.dtype&&"bool"!==M.dtype&&"string"!==M.dtype)throw new Error("Unsupported dtype in weight '"+p+"': "+M.dtype);var x={name:p,shape:M.shape,dtype:M.dtype};if("string"===M.dtype){var R=new Promise(function(U){return st(l,void 0,void 0,function(){var J,ne,ue,Ie,Ae,Oe,Fe;return Ln(this,function(et){switch(et.label){case 0:return[4,M.bytes()];case 1:for(J=et.sent(),ne=J.reduce(function(Ct,yt){return Ct+yt.length},0)+4*J.length,ue=new Uint8Array(ne),Ie=0,Ae=0;Ae0&&Number.isInteger(e),function(){return"If provided, numClasses must be a positive integer, but got "+e}),at(1===r.rank,function(){return"Expected the rank of labels to be 1, but got "+r.rank}),at(1===i.rank,function(){return"Expected the rank of predictions to be 1, but got "+i.rank}),at(r.shape[0]===i.shape[0],function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+i.shape[0]+". Labels and predictions should have the same number of elements."}),at(e>0&&Number.isInteger(e),function(){return"numClasses is required to be a positive integer, but got "+e});var s=U2(r.asType("int32"),e),c=U2(i.asType("int32"),e);return s.transpose().matMul(c).asType("int32")}}),gM=(Object.freeze({confusionMatrix:_M}),kt({fromPixels_:function(t,n){if(void 0===n&&(n=3),n>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(null==t)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var e=!1,r=!1,i=!1,s=!1,c=!1;if(t.data instanceof Uint8Array)e=!0;else if(typeof ImageData<"u"&&t instanceof ImageData)r=!0;else if(typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement)i=!0;else if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement)s=!0;else{if(null==t.getContext)throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was "+t.constructor.name);c=!0}if(i&&i&&t.readyState<2)throw new Error("The video element has not loaded data yet. Please wait for `loadeddata` event on the