"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[692],{692:(t,e,i)=>{i.d(e,{unregisterPushOnLogout:()=>p,z:()=>l});var n=i(94927),a=i(24717),o=i(81887),s=i(62805);function r(t){return"ios"===t?"ios":"android"===t?"android":null}let u=!1;async function c(t,e){await (0,s.XP)(e),await n.uE.post("/devices/register",{platform:t,app:o.fk,push_token:e})}async function l(){if((0,o.oX)()){u||(u=!0,await (0,a.K)("ulti://push-token",t=>{let e="string"==typeof t?t:null,i=r((navigator?.platform||"").toLowerCase().includes("android")?"android":"ios");e&&i&&c(i,e)}));try{let t=await (0,a.l)("plugin:ulti-core|push_register");if(!t)return;let e=r(t.platform);e&&t.token&&await c(e,t.token)}catch{}}}async function p(){if((0,o.oX)())try{let t=await (0,s.gm)();t&&await n.uE.post("/devices/unregister",{push_token:t})}catch{}}}}]);