"use strict";(self.webpackChunkapp_container=self.webpackChunkapp_container||[]).push([[1139],{1139:(e,i,t)=>{async function n(e,i,t,n,o){var l,s,d,u,c;let r=null===(l=window)||void 0===l||null===(l=l.flitsThemeAppExtensionObjects)||void 0===l?void 0:l.shop_id;const p=null===(s=window)||void 0===s||null===(s=s.flitsThemeAppExtensionObjects)||void 0===s?void 0:s.proxy_name;let v={action:"update_notification_customer_data",merchant_id:"".concat({FlitsDev1:"dev1_app_",FlitsDev2:"dev2_app_",FlitsDev3:"dev3_app_",FlitsDev4:"dev4_app_",FlitsTesting:"testing_app_",flits:"shopify_app_"}[p]).concat(r),flits_user_id:null==n?void 0:n.userId,customer_id:null===(d=window)||void 0===d||null===(d=d.flitsThemeAppExtensionObjects)||void 0===d||null===(d=d.customer)||void 0===d?void 0:d.customer_id,token:null===(u=window)||void 0===u||null===(u=u.flitsThemeAppExtensionObjects)||void 0===u?void 0:u.shop_token,customer_hash:null===(c=window)||void 0===c||null===(c=c.flitsThemeAppExtensionObjects)||void 0===c||null===(c=c.customer)||void 0===c?void 0:c.customer_hash},a=0,_=1e3;async function m(e,i){return t.notification.linkUser(e,i)}m(v,o).then((t=>{var l,s;if("user updated"===(null==t||null===(l=t.result)||void 0===l?void 0:l.data)){var d,u;let o={...i,[null===(d=window)||void 0===d||null===(d=d.flitsThemeAppExtensionObjects)||void 0===d||null===(d=d.customer)||void 0===d?void 0:d.customer_id]:{...n,customerId:null===(u=window)||void 0===u||null===(u=u.flitsThemeAppExtensionObjects)||void 0===u||null===(u=u.customer)||void 0===u?void 0:u.customer_id}};return delete o[""],delete o[-1],e("Notification",o),t}if(a<10)return a++,_*=2,(s=_,new Promise((e=>{setTimeout(e,s)}))).then((()=>m(v,o)));throw new Error("Max retries exceeded")})).catch((e=>{}))}t.r(i),t.d(i,{LinkUser:()=>n})}}]);