PageSourceSearch

https://finder-portal.com/chunk-PUWHD6CR.js

js finder-portal.com collected 2026-09-24 10:57:27 UTC 17,761 bytes, 3 lines download raw bytes

1import{a as Je,b as pt}from"./chunk-MZJOT3Q6.js";import{c as We,d as ut}from"./chunk-BUFIZXYT.js";import"./chunk-F5ICM6P2.js";import{a as Ne,b as ct}from"./chunk-7V7OKS23.js";import{g as Fe,h as rt,i as ze,j as st,m as V,n as at,s as Ae,t as lt}from"./chunk-UCRE7VJE.js";import"./chunk-QX6D7U2V.js";import{a as je,b as tt}from"./chunk-7QCIFJDI.js";import"./chunk-K472227L.js";import{k as De,l as ot}from"./chunk-SV32WEPI.js";import{H as it,K as z,c as F,d as Ee,ea as nt,g as R}from"./chunk-42MIACKS.js";import"./chunk-5K3A57UB.js";import"./chunk-IYJZESTO.js";import"./chunk-E5HGGHEO.js";import"./chunk-NEEOJL3M.js";import{ja as Ve,ka as et}from"./chunk-FY4IBSQO.js";import"./chunk-KZUOINYQ.js";import"./chunk-RD2LRSAN.js";import{a as M,b as Ze}from"./chunk-2CATILMX.js";import"./chunk-YUBSPJX3.js";import{$ as ue,B as Ke,D as re,Ga as we,Ha as be,Ja as ve,L as se,Qa as Se,R as ae,S as le,Xa as Pe,Za as ke,_ as ce,_a as Ie,ab as Me,fa as pe,ga as me,ha as de,la as he,lb as Re,mb as xe,na as ge,pb as Oe,qb as Te,rb as Le,ta as fe,ua as _e,wa as ye,xa as Ce,z as oe}from"./chunk-QVLDMLPS.js";import{$c as E,Ab as b,Bb as a,Cb as u,Db as f,Ea as qe,Ed as D,Kb as k,Ld as te,Mb as w,Ob as I,Od as ie,Sb as $,Tb as U,Ub as q,X as S,Xa as y,bb as C,bc as v,cc as j,de as ne,ea as P,ee as Xe,fb as G,gb as Q,gd as X,kb as T,kd as K,la as H,ma as B,oa as Y,ta as h,td as Z,ua as g,wc as L,xd as ee}from"./chunk-3KX4LBJN.js";import"./chunk-B27SDSG7.js";import"./chunk-YBXOT2WZ.js";import"./chunk-NVEPDQDW.js";import"./chunk-OKH3L4DQ.js";import"./chunk-GIKYXDVH.js";import"./chunk-UJNK332F.js";import"./chunk-E6UODTAO.js";import"./chunk-BLSZNL7K.js";import"./chunk-ZSTZF65Z.js";import"./chunk-FNO7OHIB.js";import"./chunk-DZOG4SVA.js";import"./chunk-6EGJHES6.js";import"./chunk-QIKVV5CC.js";import"./chunk-ZT3AQWXI.js";import"./chunk-CBVZKFDS.js";import"./chunk-YIOOVINN.js";import"./chunk-VWNYMNNC.js";import"./chunk-6JKTSOOY.js";import"./chunk-BYBWREZ2.js";import"./chunk-GTMHY7ZS.js";import"./chunk-C5QNYLS5.js";import"./chunk-XM4PXXZP.js";import"./chunk-BTGHHJ3X.js";import"./chunk-SVNUBTGG.js";import{f as O,m}from"./chunk-X3LTYLB7.js";var He,Ye,Ge=O(()=>{ie();qe();Ze();E();ie();He="pk.eyJ1IjoiYWFyb25saWRtYW4iLCJhIjoiNTVucTd0TSJ9.wVh5WkYXWJSBgwnScLupiQ",Ye=(()=>{let r=class r{constructor(e){this.httpClient=e,this.apiPath="https://api.mapbox.com/geocoding/v5/mapbox.places/"}getPlaces(e){let i=new D().set("Accept","application/json");return this.httpClient.get(this.apiPath+e+".json?access_token="+He,{headers:i}).pipe(S(3),P(t=>t,t=>t))}navigate(e){let i=new D().set("Accept","application/json");return this.httpClient.get(e+He,{headers:i}).pipe(S(3),P(t=>t,t=>t))}getLatLng(e){return this.httpClient.post(M.ROUTE+M.API_VERSION+"valhalla/route",e).pipe(S(1),P(i=>i,i=>i))}getAllLastPositions(e){let i={deviceIDs:e};return this.httpClient.post(M.ROUTE+M.API_VERSION+"trackerdata/getalllastpositions",i).pipe(S(1),P(t=>t,t=>t))}};r.\u0275fac=function(i){return new(i||r)(Y(te))},r.\u0275prov=H({token:r,factory:r.\u0275fac,providedIn:"root"});let l=r;return l})()});function ht(l,r){if(l&1){let p=k();a(0,"ion-item",33)(1,"ion-input",34),w("ionChange",function(i){let t=h(p).index,n=I();return g(n.searchPlace(i,t))}),u(),a(2,"ion-reorder",18),f(3,"ion-icon",14),u(),a(4,"ion-buttons",15)(5,"ion-button",7),w("click",function(){let i=h(p).index,t=I();return g(t.removeInput(i))}),f(6,"ion-icon",35),u()()()}if(l&2){let p=r.$implicit,e=r.index;y(),b("value",p==null?null:p.name)("placeholder",p==null?null:p.placeholder),y(3),b("ngStyle",L(3,A,e>1?"":"none"))}}function gt(l,r){if(l&1){let p=k();a(0,"ion-item",17),w("click",function(){let i=h(p).index,t=I();return g(t.selectPlace(i))}),f(1,"ion-icon",36),a(2,"ion-label")(3,"p"),v(4),u()()()}if(l&2){let p=r.$implicit;y(4),j(p==null?null:p.place_name)}}function ft(l,r){if(l&1){let p=k();a(0,"ion-item",17),w("click",function(){let i=h(p).index,t=I();return g(t.mapSearchClick(i))}),f(1,"ion-icon",36),a(2,"ion-label")(3,"p"),v(4),u()()()}if(l&2){let p=r.$implicit;y(4),j(p==null?null:p.place_name)}}var dt,A,Qe,$e=O(()=>{at();it();nt();rt();st();E();Le();Ge();et();pt();tt();ot();ut();ee();lt();dt=["routePlan"],A=l=>({display:l});Qe=(()=>
1{let r=class r{constructor(e,i,t,n,o,c,_,s,d,x){this.modalController=e,this.menuController=i,this.routePlannerService=t,this.toastController=n,this.platform=o,this.authService=c,this.devicesLoc=_,this.geolocationService=s,this.imageService=d,this.dashFunc=x,this.mapOpts={pitch:0,bearing:0,zoom:12},this.originMarker=null,this.destinationMarker=null,this.destinations=[{name:"",placeholder:"Choose Destination..",lat:null,lng:null}],this.newDestinationObj={name:"",placeholder:"Add Destination..",lat:null,lng:null},this.currentIndex=null,this.mapSearchResults=[],this.dataSource=null,this.markersLayer=null,this.currentLocation=[75.563018,12.113779],this.lastAtRestaurant=0,this.keepTrack=[],this.pointHopper={},this.dropoffs=R([]),this.nothing=R([]),this.devices=[]}ngOnInit(){return m(this,null,function*(){this.platform.ready().then(()=>m(this,null,function*(){yield this.getCurrentLocation()}))})}ngAfterViewInit(){return m(this,null,function*(){yield this.devicesLoc.initialize(),this.userId=yield this.dashFunc.getUserId(),console.log("user id",this.userId);let e=this.devicesLoc.devicesReady.subscribe(i=>{console.log("devicesReady",i),this.devices=this.devicesLoc.onlyDevices,this.routeMap.mapLoaded.subscribe(()=>{console.log("map loaded"),this.markDevices(),this.routeSource=this.routeMap.createDataSource("routePlannerSource"),this.routeLayer=this.routeMap.createLayer("routeLine","routePlannerSource")})})})}markDevices(){return m(this,null,function*(){let e=[];yield this.devicesLoc.onlyDevices.forEach(i=>{this.addMarker(this.devicesLoc.devices[i.id]);let t=this.devicesLoc.devices[i.id];if(t.lastPoint){let n=t.lastPoint.lat,o=t.lastPoint.lng;e.push([o,n])}}),this.routeMap.fitBounds(e,100)})}addMarker(e=null){return m(this,null,function*(){e&&this.imageService.getImage(e,this.userId).subscribe(i=>m(this,null,function*(){if(i!=this.imageService.whitePicture){i.endsWith(".svg")?i=yield z(i,122,170,"white",!1):i=yield z(i,170,170,"white",!1,!0);let t=e.lastPoint?e.lastPoint.lat:null,n=e.lastPoint?e.lastPoint.lng:null;if(t&&n){if(!this.routeMap.map)return;this.routeMap.addLayerMarker("d"+e.id,n,t,i,.25,"",{type:"device",data:e},"viewport","bottom"),this.routeMap.addCircle([n,t],"c"+e.id,e.spurfarbe,7),e.online&&this.routeMap.addEffectMarker(t,n,"def"+e.id,e.name,"#ff00ff",e.spurfarbe,{type:"device",data:e},new Fe().PulseShadow(this.routeMap.map,e.spurfarbe,e.spurfarbe))}}}))})}clickLayer(e){console.log("clickLayer",e)}clickMap(e){console.log("clickMap",e)}mapClickRoute(){console.log("mapClickRoute")}getCurrentLocation(){return m(this,null,function*(){let e={enableHighAccuracy:!0,timeout:5e3},i=yield this.geolocationService.getCurrentPosition(e);this.currentLocation=[i.coords.longitude,i.coords.latitude],console.log("currentLocation",this.currentLocation)})}searchPlace(e,i){this.currentIndex=i;let t=e.detail.value;t!=null?this.routePlannerService.getPlaces(t).subscribe({next:n=>{console.log("getPlaces",n),this.searchResults=n.features},error:n=>console.error(n),complete:()=>console.info("complete")}):this.searchResults=[]}selectPlace(e){return m(this,null,function*(){let i={name:this.searchResults[e].place_name,placeholder:null,lat:this.searchResults[e].geometry.coordinates[1],lng:this.searchResults[e].geometry.coordinates[0]};this.destinations.splice(this.currentIndex,1,i),console.log("selectPlace",this.searchResults[e]),this.getRoutes()})}getRoutes(){return m(this,null,function*(){let e=yield fetch(this.assembleResult(),{method:"GET"});console.log("query",e);let i=yield e.json();if(console.log("response",i),i.code!=="Ok")return;let t=R([F(i.trips[0].geometry)]);console.log("routeGeoJSON",t),V(this.routeMap.map,"routePlannerSource")||(this.routeMap.map.addSource("routePlannerSource",this.routeSource),this.routeMap.map.addLayer(this.routeLayer));let n=V(this.routeMap.map,"routePlannerSource");console.log("source",n),console.log(" line",this.routeMap.map.getLayer("routeLine")),n&&(console.log("adding soure"),V(this.routeMap.map,"routePlannerSource").setData(t)),this.devicesLoc.getMultipleRoutes([this.destinations[0].lat,this.destinations[0].lng]).subscribe({next:o=>m(this,null,function*(){if(console.log("getRoutes with respect ot devices",o),o.success){let _=[];
1yield Object.keys(o.success).forEach(s=>{if(o.success[s]!=null&&o.success[s].trip){let d=new ze(null).stringToCoordinates(o.success[s].trip.legs[0].shape,6);_[s]={points:d,response:o.success[s]}}}),console.log("returnData",_);var c=[];Object.keys(o).forEach(s=>{c.push({device:this.devicesLoc.devices[s],route:o[s]})}),c.sort((s,d)=>s.route.response&&d.route.response?s.route.response.trip.summary.length-d.route.response.trip.summary.length:-1),this.showAllRoutes(c)}}),error:o=>console.error(o),complete:()=>console.info("complete")})})}showAllRoutes(e){console.log("showAllRoutes",e),this.routeMap.removePolylines();let i=[];e.forEach(t=>{t.route&&t.route.response&&(console.log("addPolylines",t.route.points),this.routeMap.addPolylines(t.route.points,!1,16,1,t.device.spurfarbe,5),i.push(t.route.points[0]),i.push(t.route.points[t.route.points.length-1]))}),this.routeMap.fitBounds(i,100)}newDropoff(e){return m(this,null,function*(){console.log("newDropoff",e);let i=Ee([e.lng,e.lat],{orderTime:Date.now(),key:Math.random()});this.dropoffs.features.push(i),this.pointHopper[i.properties.key]=i;let t=yield fetch(this.assembleQueryURL(),{method:"GET"});console.log("query",t);let n=yield t.json();if(n.code!=="Ok"){let c=n.code==="InvalidInput"?"Refresh to start a new route. For more information: https://docs.mapbox.com/api/navigation/optimization/#optimization-api-errors":"Try a different point.";alert(`${n.code} - ${n.message}
2
3${c}`),this.dropoffs.features.pop(),delete this.pointHopper[i.properties.key];return}console.log("response.trips[0].geometry",n.trips[0].geometry);let o=R([F(n.trips[0].geometry)]);console.log("routeGeoJSON",o)})}assembleResult(){var e=[];for(let i of this.destinations)e.push([i.lng,i.lat]);return this.routeMap.fitBounds(e,100),console.log("coordinates",e),`https://api.mapbox.com/optimized-trips/v1/mapbox/driving/${e.join(";")}?overview=full&steps=true&geometries=geojson&source=first&access_token=pk.eyJ1IjoiYWFyb25saWRtYW4iLCJhIjoiNTVucTd0TSJ9.wVh5WkYXWJSBgwnScLupiQ`}assembleQueryURL(){let e=[],i=[],t;this.keepTrack=[this.currentLocation];let n=Object.keys(this.pointHopper).map(o=>this.pointHopper[o]);if(n.length>0){n.filter(c=>c.properties.orderTime>this.lastAtRestaurant).length>0&&(t=e.length,e.push(this.currentLocation),this.keepTrack.push(this.pointHopper.warehouse));for(let c of n)this.keepTrack.push(c),e.push(c.geometry.coordinates)}return console.log("coordinates",e),`https://api.mapbox.com/optimized-trips/v1/mapbox/driving/${e.join(";")}?overview=full&steps=true&geometries=geojson&source=first&access_token=pk.eyJ1IjoiYWFyb25saWRtYW4iLCJhIjoiNTVucTd0TSJ9.wVh5WkYXWJSBgwnScLupiQ`}searchMapPlace(e){let i=e.detail.value;i?this.routePlannerService.getPlaces(i).subscribe({next:t=>m(this,null,function*(){console.log(t),this.mapSearchResults=t.features}),error:t=>console.error(t),complete:()=>console.info("complete")}):this.mapSearchResults=[]}mapSearchClick(e){return m(this,null,function*(){})}closeMenu(){this.menuController.close()}toggleMenu(){return m(this,null,function*(){yield this.menuController.enable(!0,"routeMenu"),yield this.menuController.toggle("routeMenu")})}removeInput(e){console.log("removeInput"),this.destinations.splice(e,1),this.getRoutes()}addNewDestination(){this.destinations.push(this.newDestinationObj),this.newDestinationObj.name=""}doReorder(e){this.destinations=e.detail.complete(this.destinations),this.getRoutes()}presentToast(e){return m(this,null,function*(){(yield this.toastController.create({message:e,duration:2e3})).present()})}ionViewWillLeave(){this.watchPositionId&&navigator.geolocation.clearWatch(this.watchPositionId)}stringToCoordinates(e,i){let t=0,n=0,o=0,c=[],_=0,s=0,d=null,x,N,W=Math.pow(10,i||6),J=[];for(;t<e.length;){d=null,_=0,s=0;do d=e.charCodeAt(t++)-63,s|=(d&31)<<_,_+=5;while(d>=32);x=s&1?~(s>>1):s>>1,_=s=0;do d=e.charCodeAt(t++)-63,s|=(d&31)<<_,_+=5;while(d>=32);N=s&1?~(s>>1):s>>1,n+=x,o+=N,c=[o/W,n/W],J.push(c)}return J}onClick(){}};r.\u0275fac=function(i){return new(i||r)(C(xe),C(Re),C(Ye),C(Oe),C(re),C(Ve),C(Je),C(je),C(De),C(We))},r.\u0275cmp=G({type:r,selectors:[["app-route-plan"]],viewQuery:function(i,t){if(i&1&&$(dt,5),i&2){let n;U(n=q())&&(t.routeMap=n.first)}},standalone:!1,decls:52,vars:12,consts:[["routePlan",""],["when","lg","contentId","main"],["contentId","main","menuId","routeMenu"],["color","primary"],["mode","md","slot","start",2,"margin","auto"],["autoHide","false","menu","routeMenu"],["slot","end",2,"margin","auto"],[3,"click"],["slot","icon-only","name","close"],["disabled","false",3,"ionItemReorder"],["lines","none","color","primary",4,"ngFor","ngForOf"],["lines","none","color","primary",3,"click"],["slot","start","name","add-circle"],["slot","end"],["name","ellipsis-vertical"],["slot","end",3,"ngStyle"],["name","swap-vert
3ical"],["lines","none",3,"click"],["slot","start"],["color","dark","size","small"],["name","locate"],["lines","none",3,"click",4,"ngFor","ngForOf"],["id","main"],["id","main",1,"ion-page"],["color","dark"],["color","light","autoHide","false","defaultHref","/v2","back-locale",""],["slot","end",1,"ion-hide-lg-up"],["color","medium",3,"click"],["src","../../../assets/directions.svg"],[1,"grid"],["size","12"],[1,"absolute",3,"ngStyle"],["id","mini-map","mapStyle","paj",3,"onClickLayer","onClickMap","onClickRoute","height","pitch","useDefinedStyle"],["lines","none","color","primary"],["debounce","500","type","text",3,"ionChange","value","placeholder"],["slot","start","name","close-circle"],["color","medium","slot","start","name","time"]],template:function(i,t){if(i&1){let n=k();a(0,"ion-split-pane",1)(1,"ion-menu",2)(2,"ion-header")(3,"ion-toolbar",3)(4,"ion-buttons",4),f(5,"ion-menu-button",5),u(),a(6,"ion-buttons",6)(7,"ion-button",7),w("click",function(){return h(n),g(t.closeMenu())}),f(8,"ion-icon",8),u()()(),a(9,"ion-toolbar",3)(10,"ion-reorder-group",9),w("ionItemReorder",function(c){return h(n),g(t.doReorder(c))}),T(11,ht,7,5,"ion-item",10),u(),a(12,"ion-item",11),w("click",function(){return h(n),g(t.addNewDestination())}),f(13,"ion-icon",12),a(14,"ion-label")(15,"h6"),v(16,"Add destination"),u()(),a(17,"ion-reorder",13),f(18,"ion-icon",14),u()(),a(19,"ion-buttons",15)(20,"ion-button"),f(21,"ion-icon",16),u()()()(),a(22,"ion-content")(23,"ion-list")(24,"ion-item",17),w("click",function(){return h(n),g(t.getCurrentLocation())}),a(25,"ion-buttons",18)(26,"ion-button",19),f(27,"ion-icon",20),u()(),a(28,"ion-label")(29,"h6"),v(30,"Your location"),u()()()(),a(31,"ion-list"),T(32,gt,5,1,"ion-item",21),u()()(),a(33,"ion-router-outlet",22)(34,"div",23)(35,"ion-header")(36,"ion-toolbar",24)(37,"ion-buttons",18),f(38,"ion-back-button",25),u(),a(39,"ion-title"),v(40,"Main View"),u(),a(41,"ion-buttons",26)(42,"ion-button",27),w("click",function(){return h(n),g(t.toggleMenu())}),f(43,"ion-icon",28),u()()()(),a(44,"ion-content")(45,"ion-grid",29)(46,"ion-row")(47,"ion-col",30)(48,"ion-list",31),T(49,ft,5,1,"ion-item",21),u(),a(50,"app-map-min",32,0),w("onClickLayer",function(c){return h(n),g(t.clickLayer(c))})("onClickMap",function(c){return h(n),g(t.clickMap(c))})("onClickRoute",function(){return h(n),g(t.mapClickRoute())}),u()()()()()()()()}i&2&&(y(11),b("ngForOf",t.destinations),y(8),b("ngStyle",L(8,A,(t.destinations==null?null:t.destinations.length)>2?"none":"")),y(13),b("ngForOf",t.searchResults),y(16),b("ngStyle",L(10,A,t.mapSearchResults!=null&&t.mapSearchResults.length?"":"none")),y(),b("ngForOf",t.mapSearchResults),y(),b("height","100%")("pitch",0)("useDefinedStyle",!0))},dependencies:[X,K,ae,le,ce,ue,pe,me,de,he,ge,fe,_e,ye,Ce,we,be,ve,Se,Pe,ke,se,Ie,Me,Ae],styles:["#route-map[_ngcontent-%COMP%]{z-index:999;height:100%;width:100%}.rotate[_ngcontent-%COMP%]{transform:rotate(90deg)}.custom-menu[_ngcontent-%COMP%]{--width: 460px}@media only screen and (max-width: 768px){.custom-menu[_ngcontent-%COMP%]{--width: 100% !important}}.box-shadow[_ngcontent-%COMP%]{border-radius:8px;box-shadow:0 2px 4px #0003,0 -1px #00000005}ion-input[_ngcontent-%COMP%]{font-size:12px}[_nghost-%COMP%]     ion-searchbar .searchbar-input-container{border-radius:8px!important}[_nghost-%COMP%]     ion-searchbar .searchbar-input-container input{box-shadow:none!important}[_nghost-%COMP%]     ion-searchbar .searchbar-input-container .searchbar-search-icon.sc-ion-searchbar-md{color:#000!important}[_nghost-%COMP%]     .mapboxgl-canvas{height:100%;width:100%}.grid[_ngcontent-%COMP%]{height:100%;margin:0;padding:0}.grid[_ngcontent-%COMP%]   ion-row[_ngcontent-%COMP%], .grid[_ngcontent-%COMP%]   ion-col[_ngcontent-%COMP%]{height:100%;margin:0;padding:0}.header[_ngcontent-%COMP%]{margin-top:var(--ion-safe-area-top);position:absolute;z-index:99999}.header[_ngcontent-%COMP%]   ion-toolbar[_ngcontent-%COMP%]{--border-width: 0px !important;--border-radius: 8px !important;padding:5px!important;overflow:hidden!important}.absolute[_ngcontent-%COMP%]{position:absolute;top:80px;z-index:99999;
3left:0;right:0}.absolute-btn[_ngcontent-%COMP%]{position:absolute;bottom:0;z-index:999;right:0;left:0}"]});let l=r;return l})()});var Ue=O(()=>{});var _t,Qt,yt=O(()=>{ee();Ke();Xe();Le();$e();Ue();ct();E();_t=[{path:"",component:Qe}],Qt=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=Q({type:r}),r.\u0275inj=B({imports:[Z,oe,Te,Ne,ne.forChild(_t)]});let l=r;return l})()});yt();export{Qt as RoutePlanPageModule};

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.