1"use strict";(self.webpackChunkroot=self.webpackChunkroot||[]).push([[780],{98996:(E,u,n)=>{n.r(u),n.d(u,{NativeModule:()=>T});var d=n(69808),m=n(30874),f=n(35555),D=n(70396),v=n(85542),P=n(36495),g=n(97582),e=n(47423);const a=(0,e.fo)("PushNotifications",{}),s=(0,e.fo)("FCM",{web:()=>n.e(8542).then(n.bind(n,48542)).then(r=>new r.FCMWeb)});var o=n(5e3),h=n(57690),A=n(45485);let I=(()=>{class r{constructor(t,i,c,C,N){this.ngZone=t,this.context=i,this.dataService=c,this.configService=C,this.platformService=N,this.doneSetup=!1,console.log("NativeNotificationService constructor"),this.getAppInfo()}getAppInfo(){return(0,g.mG)(this,void 0,void 0,function*(){const t=yield this.platformService.getAppInfo();console.log("getAppInfo:",t),this.appInfo=t})}openNotification(t,i){this.openNotification=t,this.openActionCb=i}register(t,i,c){this.tokenCb=t,this.notificationCb=i,this.actionCb=c,this.doneSetup?a.register():this.setup()}subscribeTopic(t){!t||s.subscribeTo({topic:t}).then(i=>{console.log("subscribed to topic "+t)}).catch(i=>console.log(i))}subscribeGlobalTopic(t){if(t){var i="B"+t;this.configService.isPrd()||(i+="-test"),console.log("try subscribe topic",i),this.subscribeTopic(i)}}hasPermission(t){e.dV.isNativePlatform()?a.requestPermissions().then(i=>{t&&t("granted"==(null==i?void 0:i.receive))}):t&&t(!1)}setup(){return(0,g.mG)(this,void 0,void 0,function*(){console.log("notification setup called");let t=yield a.checkPermissions();"prompt"===t.receive&&(t=yield a.requestPermissions()),"granted"===t.receive?(this.doneSetup=!0,yield a.register(),"ios"===e.dV.getPlatform()?s.getToken().then(i=>{this.tokenCb&&this.ngZone.run(()=>{this.tokenCb(i.token)})}).catch(i=>console.log(i)):"android"===e.dV.getPlatform()&&a.addListener("registration",i=>{console.log("Push registration success, token: "+i.value),this.tokenCb&&this.ngZone.run(()=>{this.tokenCb(i.value)})}),a.addListener("registrationError",i=>{console.log("Error on registration: "+JSON.stringify(i))}),a.addListener("pushNotificationReceived",i=>{console.log("Push received: "+JSON.stringify(i)),this.notificationCb&&this.ngZone.run(()=>{var c;this.notificationCb(i),null===(c=this.openNotificationCb)||void 0===c||c.call(this,i)})}),a.addListener("pushNotificationActionPerformed",i=>{console.log("Push action performed: "+JSON.stringify(i)),this.actionCb&&this.ngZone.run(()=>{var c;this.actionCb(i.notification),null===(c=this.openActionCb)||void 0===c||c.call(this,i.notification)})})):console.warn("User denied permissions!")})}registerPushToken(t){var i,c,C;return(0,g.mG)(this,void 0,void 0,function*(){if(!e.dV.isNativePlatform())return;if(!this.appInfo){const l=yield this.platformService.getAppInfo();this.appInfo=l}const N=null===(i=this.appInfo)||void 0===i?void 0:i.id;(null===(c=this.context)||void 0===c?void 0:c.brandId)&&(null===(C=this.context)||void 0===C?void 0:C.member)&&N?this.dataService.postWithParams("/api/v1/crm/pushregister.json",{brandId:this.context.brandId,token:t,app:N}).subscribe(l=>{console.log("Reged push to server",l),l&&this.configService.setLocal("lastRegToken",t)},l=>{console.log("registerPushToken err:",l)}):console.log("missing something")})}}return r.\u0275fac=function(t){return new(t||r)(o.LFG(o.R0b),o.LFG(h._y),o.LFG(h.Do),o.LFG(h.E4),o.LFG(A.m))},r.\u0275prov=o.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"}),r})();var O=n(58789),R=n(60040);let T=(()=>{class r{constructor(t,i){console.log("Native Module constructor"),i.setService("CameraService",t.get(f.m)),i.setService("ContainerService",t.get(D.Z)),i.setService("LocationService",t.get(v.N)),i.setService("NotificationService",t.get(I)),i.setService("PlatformService",t.get(P.z)),i.setService("RoutingService",t.get(m.j)),i.setService("ShareService",t.get(O.r))}}return r.\u0275fac=function(t){return new(t||r)(o.LFG(o.zs3),o.LFG(R.D))},r.\u0275mod=o.oAB({type:r}),r.\u0275inj=o.cJS({imports:[[d.ez]]}),r})()},35555:(E,u,n)=>{n.d(u,{m:()=>g});var d=n(47423);const m=(0,d.fo)("Scan",{web:()=>n.e(9808).then(n.bind(n,25164)).then(e=>new e.ScanWeb)});var f=(()=>{return(e=f||(f={})).UPC_A="UPC_A",e.UPC_E="UPC_E",e.UPC_EAN_EXTENSION="UPC_EAN_EXTENSION",e.EAN_8="EAN_8",e.EAN_13="EAN_13",e.CODE_39="CODE_39",e.CODE_39_MOD_43="CODE_39_MOD_43",e.CODE_93="CODE_93",e.CODE_128="CODE_128",e.CODABAR="CODABAR",e.ITF="ITF",e.ITF_14="ITF_14",e.AZTEC="AZTEC",e.DATA_MATRIX="DATA_MATRIX",e.MAXICODE="MAXICODE",e.PDF_417="PDF_417",e.QR_CODE="QR_CODE",e.RSS_14="RSS_14",e.RSS_EXPANDED="RSS_EXPANDED",f;var e})();const v=(0,d.fo)("BarcodeScanner",{web:()=>n.e(8524).then(n.bind(n,18524)).then(e=>new e.BarcodeScannerWeb)});var P=n(5e3);let g=(()=>{class e{constructor(){this.havePermission=!1}static cameraServiceFactory(){return d.dV.isNativePlatform(),new e}isAvailable(){return!0}checkPermission(s){v.checkPermission({force:!0}).then(o=>{console.log("checkPermission Result",o),o.granted&&(console.log("GRANTED"),this.havePermission=!0),s(o)})}scan(s,o={}){m.scan(o).then(h=>{s(h)})}startScan(s,o){this.havePermission?this.scanRaw(s):this.checkPermission(h=>{console.log(h),this.havePermission?this.scanRaw(s):o&&o()})}
1stopScan(){v.showBackground(),v.stopScan()}scanRaw(s){console.log("Scanning"),v.hideBackground(),v.startScan({targetedFormats:[f.QR_CODE]}).then(o=>{console.log("Result",o),o.hasContent&&(console.log(o.content),v.stopScan(),s(o))})}}return e.\u0275fac=function(s){return new(s||e)},e.\u0275prov=P.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.