@heycar/heycars-map 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Gmap/Gmap.css.d.ts +1 -0
- package/dist/components/Gmap/Gmap.d.ts +2 -0
- package/dist/components/MapProvider/MapProvider.d.ts +2 -0
- package/dist/hooks/useMapPlace.d.ts +2 -1
- package/dist/hooks/useMapRecomendPlace.d.ts +1 -1
- package/dist/index.cjs +43 -43
- package/dist/index.js +860 -841
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.tsx +1 -1
- package/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.tsx +27 -9
- package/src/components/Gmap/Gmap.css.ts +5 -0
- package/src/components/Gmap/Gmap.ts +8 -10
- package/src/components/MapProvider/MapProvider.tsx +4 -2
- package/src/hooks/useMapPlace.ts +15 -7
package/dist/index.cjs
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue");s.util.warn;const
|
|
2
|
-
`).flatMap((a,o)=>o===0?a:[s.h("br"),a])});return()=>s.h("div",[n.value])}),
|
|
3
|
-
<img src="${
|
|
4
|
-
`);return()=>s.h(
|
|
5
|
-
<div class="${
|
|
6
|
-
<div class="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue");s.util.warn;const Te="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSItMzkuNzE5JSIgeTE9IjUwJSIgeDI9IjEyNi4wOTMlIiB5Mj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjNzlBRkZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzVDOERGRiIgb2Zmc2V0PSIzMi4zNDIlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzUwN0ZGRiIgb2Zmc2V0PSI3NC44NTMlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ0NzFGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNSAyNGgzdjE0LjVhMS41IDEuNSAwIDAxLTMgMFYyNHoiIGZpbGw9IiM0QzgwRkYiLz48Zz48Y2lyY2xlIGZpbGw9InVybCgjcHJlZml4X19hKSIgY3g9IjEzIiBjeT0iMTMiIHI9IjEzIi8+PGNpcmNsZSBmaWxsPSIjRkZGIiBjeD0iMTMiIGN5PSIxMyIgcj0iNCIvPjwvZz48L2c+PC9zdmc+",Re="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIxMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMSAxbDQgNC00IDQiIHN0cm9rZT0iI0ZGRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG9wYWNpdHk9Ii44Ii8+PC9zdmc+";var Pn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},bn=typeof global=="object"&&global&&global.Object===Object&&global;const Tn=bn;var Rn=typeof self=="object"&&self&&self.Object===Object&&self,En=Tn||Rn||Function("return this")();const mt=En;var zn=mt.Symbol;const H=zn;var It=Object.prototype,Zn=It.hasOwnProperty,On=It.toString,_=H?H.toStringTag:void 0;function kn(t){var e=Zn.call(t,_),n=t[_];try{t[_]=void 0;var i=!0}catch{}var a=On.call(t);return i&&(e?t[_]=n:delete t[_]),a}var Gn=Object.prototype,Wn=Gn.toString;function Un(t){return Wn.call(t)}var Bn="[object Null]",Vn="[object Undefined]",Be=H?H.toStringTag:void 0;function Yn(t){return t==null?t===void 0?Vn:Bn:Be&&Be in Object(t)?kn(t):Un(t)}function Hn(t){return t!=null&&typeof t=="object"}var Qn="[object Symbol]";function ft(t){return typeof t=="symbol"||Hn(t)&&Yn(t)==Qn}function Jn(t,e){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=e(t[n],n,t);return a}var Fn=Array.isArray;const Xn=Fn;var $n=1/0,Ve=H?H.prototype:void 0,Ye=Ve?Ve.toString:void 0;function vt(t){if(typeof t=="string")return t;if(Xn(t))return Jn(t,vt)+"";if(ft(t))return Ye?Ye.call(t):"";var e=t+"";return e=="0"&&1/t==-$n?"-0":e}var _n=/\s/;function Kn(t){for(var e=t.length;e--&&_n.test(t.charAt(e)););return e}var qn=/^\s+/;function ei(t){return t&&t.slice(0,Kn(t)+1).replace(qn,"")}function De(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var He=0/0,ti=/^[-+]0x[0-9a-f]+$/i,ni=/^0b[01]+$/i,ii=/^0o[0-7]+$/i,ai=parseInt;function Qe(t){if(typeof t=="number")return t;if(ft(t))return He;if(De(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=De(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ei(t);var n=ni.test(t);return n||ii.test(t)?ai(t.slice(2),n?2:8):ti.test(t)?He:+t}function pt(t){return t==null?"":vt(t)}function oi(t,e,n,i){var a=-1,o=t==null?0:t.length;for(i&&o&&(n=t[++a]);++a<o;)n=e(n,t[a],a,t);return n}function ri(t){return function(e){return t==null?void 0:t[e]}}var si={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í: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ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ci=ri(si);const ui=ci;var li=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,di="\\u0300-\\u036f",gi="\\ufe20-\\ufe2f",Mi="\\u20d0-\\u20ff",mi=di+gi+Mi,Ii="["+mi+"]",fi=RegExp(Ii,"g");function vi(t){return t=pt(t),t&&t.replace(li,ui).replace(fi,"")}var pi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function yi(t){return t.match(pi)||[]}var hi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function ji(t){return hi.test(t)}var yt="\\ud800-\\udfff",Ai="\\u0300-\\u036f",Li="\\ufe20-\\ufe2f",Si="\\u20d0-\\u20ff",Ni=Ai+Li+Si,ht="\\u2700-\\u27bf",jt="a-z\\xdf-\\xf6\\xf8-\\xff",wi="\\xac\\xb1\\xd7\\xf7",Di="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ci="\\u2000-\\u206f",xi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",At="A-Z\\xc0-\\xd6\\xd8-\\xde",Pi="\\ufe0e\\ufe0f",Lt=wi+Di+Ci+xi,St="['’]",Je="["+Lt+"]",bi="["+Ni+"]",Nt="\\d+",Ti="["+ht+"]",wt="["+jt+"]",Dt="[^"+yt+Lt+Nt+ht+jt+At+"]",Ri="\\ud83c[\\udffb-\\udfff]",Ei="(?:"+bi+"|"+Ri+")",zi="[^"+yt+"]",Ct="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",B="["+At+"]",Zi="\\u200d",Fe="(?:"+wt+"|"+Dt+")",Oi="(?:"+B+"|"+Dt+")",Xe="(?:"+St+"(?:d|ll|m|re|s|t|ve))?",$e="(?:"+St+"(?:D|LL|M|RE|S|T|VE))?",Pt=Ei+"?",bt="["+Pi+"]?",ki="(?:"+Zi+"(?:"+[zi,Ct,xt].join("|")+")"+bt+Pt+")*",Gi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wi="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ui=bt+Pt+ki,Bi="(?:"+[Ti,Ct,xt].join("|")+")"+Ui,Vi=RegExp([B+"?"+wt+"+"+Xe+"(?="+[Je,B,"$"].join("|")+")",Oi+"+"+$e+"(?="+[Je,B+Fe,"$"].join("|")+")",B+"?"+Fe+"+"+Xe,B+"+"+$e,Wi,Gi,Nt,Bi].join("|"),"g");function Yi(t){return t.match(Vi)||[]}function Hi(t,e,n){return t=pt(t),e=n?void 0:e,e===void 0?ji(t)?Yi(t):yi(t):t.match(e)||[]}var Qi="['’]",Ji=RegExp(Qi,"g");function Fi(t){return function(e){return oi(Hi(vi(e).replace(Ji,"")),t,"")}}var Xi=function(){return mt.Date.now()};const we=Xi;var $i="Expected a function",_i=Math.max,Ki=Math.min;function qi(t,e,n){var i,a,o,r,c,l,g=0,m=!1,u=!1,d=!0;if(typeof t!="function")throw new TypeError($i);e=Qe(e)||0,De(n)&&(m=!!n.leading,u="maxWait"in n,o=u?_i(Qe(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d);function M(w){var C=i,R=a;return i=a=void 0,g=w,r=t.apply(R,C),r}function I(w){return g=w,c=setTimeout(p,e),m?M(w):r}function f(w){var C=w-l,R=w-g,Z=e-C;return u?Ki(Z,o-R):Z}function y(w){var C=w-l,R=w-g;return l===void 0||C>=e||C<0||u&&R>=o}function p(){var w=we();if(y(w))return v(w);c=setTimeout(p,f(w))}function v(w){return c=void 0,d&&i?M(w):(i=a=void 0,r)}function j(){c!==void 0&&clearTimeout(c),g=0,i=l=a=c=void 0}function N(){return c===void 0?r:v(we())}function x(){var w=we(),C=y(w);if(i=arguments,a=this,l=w,C){if(c===void 0)return I(l);if(u)return clearTimeout(c),c=setTimeout(p,e),M(l)}return c===void 0&&(c=setTimeout(p,e)),r}return x.cancel=j,x.flush=N,x}var ea=Fi(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});const Tt=ea;function h(t){return s.defineComponent({name:t.name,inheritAttrs:!1,setup(e,n){const{attrs:i,slots:a,emit:o}=n,r=i,c=o,l=(m,u)=>{const d=Tt(m);c(m,u),m!==d&&c(d,u)},g=new Proxy(a,{get(m,u,d){var M;return(M=Reflect.get(m,u,d))!=null?M:Reflect.get(r,u)}});return t(r,{...n,slots:g,emit:l})}})}function ne(t){return{props:e=>s.defineComponent({name:t.name,inheritAttrs:!1,props:e,setup(n,i){const a=n,{slots:o,emit:r}=i,c=r,l=(m,u)=>{const d=Tt(m);c(m,u),m!==d&&c(d,u)},g=new Proxy(o,{get(m,u,d){var M;return(M=Reflect.get(m,u,d))!=null?M:Reflect.get(a,u)}});return t(a,{...i,slots:g,emit:l})}})}}const z=s.h,q="zh-CN";var ta="n8tgem1",_e="n8tgem0",na="n8tgem5",ia="n8tgem4",aa="n8tgem2",oa="n8tgem3",ra="n8tgem7",sa="n8tgem6";const ca=h(function(e){const n=s.computed(()=>{var i;return(i=e.value)==null?void 0:i.split(`
|
|
2
|
+
`).flatMap((a,o)=>o===0?a:[s.h("br"),a])});return()=>s.h("div",[n.value])}),Ce=h(function(e,{emit:n}){const i=()=>n("click");return()=>{const{type:a,title:o,description:r}=e;return a==="locator"?s.h("div",{class:_e},[s.h("img",{class:ra,attrs:{src:Te}})]):s.h("div",{class:_e},[s.h("div",{class:ta,on:{click:i}},[s.h("div",{class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CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=",Rt=Symbol(),L=()=>{const t=s.inject(Rt);if(!t)throw new Error("MyError: useMapSupplier should be under MapProvider");return t},ua=t=>s.provide(Rt,t),Et=Symbol("amap"),ie=()=>s.inject(Et),la=t=>s.provide(Et,t),zt=Symbol("gmap"),ae=()=>s.inject(zt),da=t=>s.provide(zt,t),Zt=()=>{const{supplier:t}=L();return t==="gmap"?ae():ie()},W=t=>{const e=Zt();s.watch(()=>e.value,n=>{n&&Promise.resolve().then(t)})},Ot=t=>{const{registerOverlay:e,overlayRef:n}=t;s.watch(()=>n.value,(i,a)=>{e&&(a&&e.remove(a),i&&e.add(i))})},Ke=t=>t!=null&&typeof t=="object"&&Number.isFinite(t.lat)&&Number.isFinite(t.lng);var ga=typeof WeakMap=="function",qe=Object.keys;function fe(t,e){return t===e||t!==t&&e!==e}function et(t){return t.constructor===Object||t.constructor==null}function tt(t){return!!t&&typeof t.then=="function"}function nt(t){return!!(t&&t.$$typeof)}function Ma(){var t=[];return{delete:function(e){for(var n=0;n<t.length;++n)if(t[n][0]===e){t.splice(n,1);return}},get:function(e){for(var n=0;n<t.length;++n)if(t[n][0]===e)return t[n][1]},set:function(e,n){for(var i=0;i<t.length;++i)if(t[i][0]===e){t[i][1]=n;return}t.push([e,n])}}}var ma=function(t){return t?function(){return new WeakMap}:Ma}(ga);function kt(t){return function(n){var i=t||n;return function(o,r,c,l,g,m,u){u===void 0&&(u=ma());var d=!!o&&typeof o=="object",M=!!r&&typeof r=="object";if(d!==M)return!1;if(!d&&!M)return i(o,r,u);var I=u.get(o);if(I&&u.get(r))return I===r;u.set(o,r),u.set(r,o);var f=i(o,r,u);return u.delete(o),u.delete(r),f}}}function Ia(t,e,n,i){var a=t.length;if(e.length!==a)return!1;for(;a-- >0;)if(!n(t[a],e[a],a,a,t,e,i))return!1;return!0}function fa(t,e,n,i){var a=t.size===e.size;if(a&&t.size){var o={},r=0;t.forEach(function(c,l){if(a){var g=!1,m=0;e.forEach(function(u,d){!g&&!o[m]&&(g=n(l,d,r,m,t,e,i)&&n(c,u,l,d,t,e,i),g&&(o[m]=!0)),m++}),r++,a=g}})}return a}var va="_owner",pa=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function it(t,e,n,i){var a=qe(t),o=a.length;if(qe(e).length!==o)return!1;if(o)for(var r=void 0;o-- >0;){if(r=a[o],r===va){var c=nt(t),l=nt(e);if((c||l)&&c!==l)return!1}if(!pa(e,r)||!n(t[r],e[r],r,r,t,e,i))return!1}return!0}var ya=function(){return/foo/g.flags==="g"?function(e,n){return e.source===n.source&&e.flags===n.flags}:function(e,n){return e.source===n.source&&e.global===n.global&&e.ignoreCase===n.ignoreCase&&e.multiline===n.multiline&&e.unicode===n.unicode&&e.sticky===n.sticky&&e.lastIndex===n.lastIndex}}();function ha(t,e,n,i){var a=t.size===e.size;if(a&&t.size){var o={};t.forEach(function(r,c){if(a){var l=!1,g=0;e.forEach(function(m,u){!l&&!o[g]&&(l=n(r,m,c,u,t,e,i),l&&(o[g]=!0)),g++}),a=l}})}return a}var ja=typeof Map=="function",Aa=typeof Set=="function",at=Object.prototype.valueOf;function oe(t){var e=typeof t=="function"?t(n):function(i,a,o,r,c,l,g){return n(i,a,g)};function n(i,a,o){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){if(et(i)&&et(a))return it(i,a,e,o);var r=Array.isArray(i),c=Array.isArray(a);return r||c?r===c&&Ia(i,a,e,o):(r=i instanceof Date,c=a instanceof Date,r||c?r===c&&fe(i.getTime(),a.getTime()):(r=i instanceof RegExp,c=a instanceof RegExp,r||c?r===c&&ya(i,a):tt(i)||tt(a)?i===a:ja&&(r=i instanceof Map,c=a instanceof Map,r||c)?r===c&&fa(i,a,e,o):Aa&&(r=i instanceof Set,c=a instanceof Set,r||c)?r===c&&ha(i,a,e,o):i.valueOf!==at||a.valueOf!==at?fe(i.valueOf(),a.valueOf()):it(i,a,e,o)))}return i!==i&&a!==a}return n}oe();oe(function(){return fe});oe(kt());oe(kt(fe));const P=([t,e])=>({lng:t,lat:e}),Le=t=>{const e=[],n=t.split("*");for(const[i,a]of n.entries())a&&e.push({value:a,type:i%2===0?"normal":"emphasize"});return e},Gt=t=>`${t.charAt(2).toLocaleLowerCase()}${t.slice(3)}`,Wt=t=>t.slice(2).toLowerCase(),La=t=>{switch(t){case"en":return"style_en";case"zh":return"style_zh_cn"}},D=t=>[t.lng,t.lat],Ut=t=>(...e)=>{setTimeout(()=>t==null?void 0:t(...e))},ot=t=>{const{address_components:e}=t,n=e.find(a=>a.types[0]==="administrative_area_level_1"||a.types[0]==="administrative_area_level_2");if(n)return n.long_name;const i=e.findIndex(a=>a.types[0]==="country");if(i>0)return e[i-1].long_name},Sa=(t,e)=>t.lng===(e==null?void 0:e.lng)&&t.lat===(e==null?void 0:e.lat),Bt=(t,e)=>t[0]===(e==null?void 0:e[0])&&t[1]===(e==null?void 0:e[1]),Vt=oe(t=>(e,n)=>Ke(e)||Ke(n)?new google.maps.LatLng(e).equals(new google.maps.LatLng(n)):t(e,n));function Ee(){let t;return function(n){return Vt(n,t)||(t=n),t}}function re(t,e,n){const i=Ee();return s.watch(()=>i(t()),e,{immediate:!1,flush:"post",...n})}function J(t,e,n){const i=Ee();return s.watch(()=>i(t()),e,{immediate:!0,flush:"post",...n})}function Na(t,e,n){const i=Ee();return s.watch(()=>i(t()),e,{immediate:!0,...n})}function wa(t){return`set${t.charAt(0).toUpperCase()}${t.slice(1)}`}function Da(t,e,n,i){const a=n.map(({name:o})=>()=>e[o]);s.watch(a,(o,r)=>{const c=t.value;if(c)for(const[l,g]of o.entries()){const{name:m,defaultValue:u}=n[l],d=r[l];Vt(g,d)||c[wa(m)](g!=null?g:u)}},{immediate:!0,flush:"post",...i})}function ze(t,e,n,i){return Da(t,e,n,{immediate:!1,...i})}function ee(t,e,n,i){s.watchPostEffect(a=>{const o=t==null?void 0:t.value;if(!o)return;const r=[];for(const c of i){const l=Gt(c),g=Wt(c),m=u=>n(l,u);o.on(g,m),r.push(()=>o==null?void 0:o.off(g,m))}a(()=>{for(const c of r)c()})})}function Q(t,e,n,i){s.watchPostEffect(a=>{const o=t==null?void 0:t.value;if(!o)return;const r=[];for(const c of i){const l=Gt(c),g=Wt(c),m=d=>n(l,d),u=o.addListener(g,m);r.push(()=>google.maps.event.removeListener(u))}a(()=>{for(const c of r)c()})})}const k=h(function(e,{emit:n}){const{registerOverlay:i}=e,a=s.shallowRef(),o=ie();return s.onMounted(()=>{a.value=new AMap.Marker({...e})}),s.onUnmounted(()=>{var r;(r=a.value)==null||r.setMap(null)}),Ot({registerOverlay:i,overlayRef:a}),s.watchPostEffect(()=>{var c;const r=o==null?void 0:o.value;r&&((c=a.value)==null||c.setMap(r))}),ze(a,e,[{name:"anchor",defaultValue:""},{name:"offset",defaultValue:[0,0]},{name:"clickable",defaultValue:!1},{name:"position",defaultValue:[0,0]},{name:"angle",defaultValue:0},{name:"label",defaultValue:void 0},{name:"zIndex",defaultValue:0},{name:"icon",defaultValue:""},{name:"draggable",defaultValue:!1},{name:"cursor",defaultValue:""},{name:"content",defaultValue:""},{name:"title",defaultValue:""},{name:"extData",defaultValue:""}]),ee(a,e,n,["onClick"]),()=>null}),G=h(function(e,{emit:n}){const{registerOverlay:i}=e,a=s.shallowRef(),o=ae(),r=c=>n(c,{target:a.value});return Ot({registerOverlay:i,overlayRef:a}),s.onMounted(()=>{const{registerOverlay:c,...l}=e;a.value=new google.maps.marker.AdvancedMarkerView({...l}),a.value.addListener}),s.onUnmounted(()=>{a.value&&(a.value.map=null)}),s.watchPostEffect(()=>{const c=o==null?void 0:o.value;!c||!a.value||(a.value.map=c)}),re(()=>{const{content:c,registerOverlay:l,...g}=e;return g},c=>{a.value&&Object.assign(a.value,c)}),s.watch(()=>e.content,c=>{a.value&&(a.value.content=c)},{flush:"post"}),Q(a,e,r,["onClick"]),()=>null}),S=(t,e)=>{s.watchEffect(()=>{t.log&&console.log(`log ${e} props = `,{...t})})},Ca=(t,e,n,i)=>{s.watchEffect(()=>{t.log&&console.log(`log ${e} ${i} = `,{...n})})},b=(t,e,n)=>{const{class:i,...a}=e!=null?e:{},o=document.createElement(t);return i&&(o.className=i),Object.assign(o,a),n&&(o.innerHTML=n),o};var Yt="rgf09w0";const Ht=h(function(e){const n=s.computed(()=>`
|
|
3
|
+
<img src="${Te}" class="${Yt}">
|
|
4
|
+
`);return()=>s.h(k,{attrs:{position:e.position,content:n.value,anchor:"bottom-center"}})}),Qt=h(function(e){const n=s.computed(()=>b("img",{class:Yt,src:Te}));return()=>s.h(G,{attrs:{position:P(e.position),content:n.value}})});h(function(e){const n=L();return()=>z(n.supplier==="gmap"?Qt:Ht,{attrs:e})});var Jt="_15rq2xn1",Ft="_15rq2xn0",Xt="_15rq2xn3",$t="_15rq2xn2",_t="_15rq2xn4",Kt="_15rq2xn6",qt="_15rq2xn5";const xa=h(function(e){S(e,"AAddressBox");const n=s.computed(()=>{var i;return`
|
|
5
|
+
<div class="${Ft}">
|
|
6
|
+
<div class="${Jt}">
|
|
7
7
|
<div>
|
|
8
|
-
<div class="${
|
|
9
|
-
<div class="${
|
|
8
|
+
<div class="${$t}">${e.title}</div>
|
|
9
|
+
<div class="${Xt}">${(i=e.description)!=null?i:""}</div>
|
|
10
10
|
</div>
|
|
11
|
-
<img class="${
|
|
11
|
+
<img class="${_t}" src="${Re}" >
|
|
12
12
|
</div>
|
|
13
|
-
<div class="${
|
|
14
|
-
<img src="${O}" class="${
|
|
13
|
+
<div class="${qt}"></div>
|
|
14
|
+
<img src="${O}" class="${Kt}">
|
|
15
15
|
</div>
|
|
16
|
-
`});return()=>e.type==="locator"?s.h(
|
|
17
|
-
<div class="${
|
|
16
|
+
`});return()=>e.type==="locator"?s.h(Ht,{attrs:{position:e.position}}):s.h(k,{attrs:{position:e.position,content:n.value,anchor:"bottom-center"}})}),Pa=h(function(e){S(e,"GAddressBox");const n=s.computed(()=>{var i;return b("div",{class:Ft},`
|
|
17
|
+
<div class="${Jt}">
|
|
18
18
|
<div>
|
|
19
|
-
<div class="${
|
|
20
|
-
<div class="${
|
|
19
|
+
<div class="${$t}">${e.title}</div>
|
|
20
|
+
<div class="${Xt}">${(i=e.description)!=null?i:""}</div>
|
|
21
21
|
</div>
|
|
22
|
-
<img class="${
|
|
22
|
+
<img class="${_t}" src="${Re}" >
|
|
23
23
|
</div>
|
|
24
|
-
<div class="${
|
|
25
|
-
<img src="${O}" class="${
|
|
26
|
-
`)});return()=>e.type==="locator"?s.h(Ht,{attrs:{position:e.position}}):s.h(k,{attrs:{position:x(e.position),content:n.value}})}),Pa=h(function(e){const n=A();return()=>z(n.supplier==="gmap"?xa:Ca,{attrs:e})});var Ce={},ba={get exports(){return Ce},set exports(t){Ce=t}};(function(t,e){(function(n,i){t.exports=i()})(xn,function(){function n(u){var d=[];return u.AMapUI&&d.push(i(u.AMapUI)),u.Loca&&d.push(a(u.Loca)),Promise.all(d)}function i(u){return new Promise(function(d,I){var m=[];if(u.plugins)for(var f=0;f<u.plugins.length;f+=1)r.AMapUI.plugins.indexOf(u.plugins[f])==-1&&m.push(u.plugins[f]);if(c.AMapUI===o.failed)I("前次请求 AMapUI 失败");else if(c.AMapUI===o.notload){c.AMapUI=o.loading,r.AMapUI.version=u.version||r.AMapUI.version,f=r.AMapUI.version;var p=document.body||document.head,y=document.createElement("script");y.type="text/javascript",y.src="https://webapi.amap.com/ui/"+f+"/main.js",y.onerror=function(v){c.AMapUI=o.failed,I("请求 AMapUI 失败")},y.onload=function(){if(c.AMapUI=o.loaded,m.length)window.AMapUI.loadUI(m,function(){for(var v=0,j=m.length;v<j;v++){var N=m[v].split("/").slice(-1)[0];window.AMapUI[N]=arguments[v]}for(d();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()});else for(d();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()},p.appendChild(y)}else c.AMapUI===o.loaded?u.version&&u.version!==r.AMapUI.version?I("不允许多个版本 AMapUI 混用"):m.length?window.AMapUI.loadUI(m,function(){for(var v=0,j=m.length;v<j;v++){var N=m[v].split("/").slice(-1)[0];window.AMapUI[N]=arguments[v]}d()}):d():u.version&&u.version!==r.AMapUI.version?I("不允许多个版本 AMapUI 混用"):l.AMapUI.push(function(v){v?I(v):m.length?window.AMapUI.loadUI(m,function(){for(var j=0,N=m.length;j<N;j++){var P=m[j].split("/").slice(-1)[0];window.AMapUI[P]=arguments[j]}d()}):d()})})}function a(u){return new Promise(function(d,I){if(c.Loca===o.failed)I("前次请求 Loca 失败");else if(c.Loca===o.notload){c.Loca=o.loading,r.Loca.version=u.version||r.Loca.version;var m=r.Loca.version,f=r.AMap.version.startsWith("2"),p=m.startsWith("2");if(f&&!p||!f&&p)I("JSAPI 与 Loca 版本不对应!!");else{f=r.key,p=document.body||document.head;var y=document.createElement("script");y.type="text/javascript",y.src="https://webapi.amap.com/loca?v="+m+"&key="+f,y.onerror=function(v){c.Loca=o.failed,I("请求 AMapUI 失败")},y.onload=function(){for(c.Loca=o.loaded,d();l.Loca.length;)l.Loca.splice(0,1)[0]()},p.appendChild(y)}}else c.Loca===o.loaded?u.version&&u.version!==r.Loca.version?I("不允许多个版本 Loca 混用"):d():u.version&&u.version!==r.Loca.version?I("不允许多个版本 Loca 混用"):l.Loca.push(function(v){v?I(v):I()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var o;(function(u){u.notload="notload",u.loading="loading",u.loaded="loaded",u.failed="failed"})(o||(o={}));var r={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},c={AMap:o.notload,AMapUI:o.notload,Loca:o.notload},l={AMap:[],AMapUI:[],Loca:[]},g=[],M=function(u){typeof u=="function"&&(c.AMap===o.loaded?u(window.AMap):g.push(u))};return{load:function(u){return new Promise(function(d,I){if(c.AMap==o.failed)I("");else if(c.AMap==o.notload){var m=u.key,f=u.version,p=u.plugins;m?(window.AMap&&location.host!=="lbs.amap.com"&&I("禁止多种API加载方式混用"),r.key=m,r.AMap.version=f||r.AMap.version,r.AMap.plugins=p||r.AMap.plugins,c.AMap=o.loading,f=document.body||document.head,window.___onAPILoaded=function(v){if(delete window.___onAPILoaded,v)c.AMap=o.failed,I(v);else for(c.AMap=o.loaded,n(u).then(function(){d(window.AMap)}).catch(I);g.length;)g.splice(0,1)[0]()},p=document.createElement("script"),p.type="text/javascript",p.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+r.AMap.version+"&key="+m+"&plugin="+r.AMap.plugins.join(","),p.onerror=function(v){c.AMap=o.failed,I(v)},f.appendChild(p)):I("请填写key")}else if(c.AMap==o.loaded)if(u.key&&u.key!==r.key)I("多个不一致的 key");else if(u.version&&u.version!==r.AMap.version)I("不允许多个版本 JSAPI 混用");else{if(m=[],u.plugins)for(f=0;f<u.plugins.length;f+=1)r.AMap.plugins.indexOf(u.plugins[f])==-1&&m.push(u.plugins[f]);m.length?window.AMap.plugin(m,function(){n(u).then(function(){d(window.AMap)}).catch(I)}):n(u).then(function(){d(window.AMap)}).catch(I)}else if(u.key&&u.key!==r.key)I("多个不一致的 key");else if(u.version&&u.version!==r.AMap.version)I("不允许多个版本 JSAPI 混用");else{var y=[];if(u.plugins)for(f=0;f<u.plugins.length;f+=1)r.AMap.plugins.indexOf(u.plugins[f])==-1&&y.push(u.plugins[f]);M(function(){y.length?window.AMap.plugin(y,function(){n(u).then(function(){d(window.AMap)}).catch(I)}):n(u).then(function(){d(window.AMap)}).catch(I)})}})},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,r={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},c={AMap:o.notload,AMapUI:o.notload,Loca:o.notload},l={AMap:[],AMapUI:[],Loca:[]}}}})})(ba);var Ta=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,a,o;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(a=i;a--!==0;)if(!t(e[a],n[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(n).length)return!1;for(a=i;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=i;a--!==0;){var r=o[a];if(!t(e[r],n[r]))return!1}return!0}return e!==e&&n!==n};const at="__googleMapsScriptId";var V;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(V||(V={}));class U{constructor({apiKey:e,authReferrerPolicy:n,channel:i,client:a,id:o=at,language:r,libraries:c=[],mapIds:l,nonce:g,region:M,retries:u=3,url:d="https://maps.googleapis.com/maps/api/js",version:I}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=n,this.channel=i,this.client=a,this.id=o||at,this.language=r,this.libraries=c,this.mapIds=l,this.nonce=g,this.region=M,this.retries=u,this.url=d,this.version=I,U.instance){if(!Ta(this.options,U.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(U.instance.options)}`);return U.instance}U.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?V.FAILURE:this.done?V.SUCCESS:this.loading?V.LOADING:V.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+=`?callback=${this.CALLBACK}`,this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,n)=>{this.loadCallback(i=>{i?n(i.error):e(window.google)})})}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}const e=this.createUrl(),n=document.createElement("script");n.id=this.id,n.type="text/javascript",n.src=e,n.onerror=this.loadErrorCallback.bind(this),n.defer=!0,n.async=!0,this.nonce&&(n.nonce=this.nonce),document.head.appendChild(n)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const n=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${n} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},n)}else this.onerrorEvent=e,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}const Ra=["AMap.Geolocation","AMap.Geocoder","AMap.PlaceSearch","AMap.Driving","AMap.Walking"],Ea=["marker","places","geometry"];var ee=(t=>(t.LOADING="LOADING",t.FAILURE="FAILURE",t.SUCCESS="SUCCESS",t))(ee||{});const za=t=>{const{onChange:e}=t;let n,i;const a=new Promise((c,l)=>{n=c,i=l}),o=s.shallowRef("LOADING"),r=s.computed(()=>{const{onChange:c,loading:l,fallback:g,apiKey:M,apiSecret:u,apiServiceHost:d,version:I,...m}=t;return{...m,key:M,version:I!=null?I:"2.0.5.16"}});return J(()=>r.value,c=>{const l=g=>{o.value=g,g==="SUCCESS"&&n(),g==="FAILURE"&&i(),e==null||e(o.value)};l("LOADING"),window._AMapSecurityConfig=t.apiServiceHost?{serviceHost:t.apiServiceHost}:{securityJsCode:t.apiSecret},Ce.load(c).then(()=>l("SUCCESS"),()=>l("FAILURE"))}),{statusRef:o,readyPromise:a}},Za=t=>{const{onChange:e}=t;let n,i;const a=new Promise((c,l)=>{n=c,i=l}),o=s.shallowRef("LOADING"),r=s.computed(()=>{const{onChange:c,fallback:l,loading:g,...M}=t;return M});return J(()=>r.value,c=>{const l=new U(c),g=M=>{o.value=M,M==="SUCCESS"&&n(),M==="FAILURE"&&i(),e==null||e(o.value)};g("LOADING"),l.load().then(()=>g("SUCCESS"),()=>g("FAILURE"))}),{statusRef:o,readyPromise:a}},Oa=t=>{const{gmapKey:e,amapKey:n,amapSecret:i,amapServiceHost:a,supplier:o,language:r,onChange:c}=t;return o==="gmap"?Za({apiKey:e,language:r,version:"beta",libraries:Ea,onChange:c}):za({apiKey:n,apiSecret:i,apiServiceHost:a,plugins:Ra,onChange:c})};var Ga="_1d8ur7t0";const ka=h(function(e,{slots:n,emit:i}){const{onDragStart:a,onDragEnd:o,mapRef:r,vectorMapForeign:c="style_zh_cn",...l}=e,g=s.computed(()=>({dragEnable:!!e.dragEnable,zoomEnable:!!e.zoomEnable,jogEnable:!!e.jogEnable,pitchEnable:!!e.pitchEnable,rotateEnable:!!e.rotateEnable,animateEnable:!!e.animateEnable,keyboardEnable:!!e.keyboardEnable})),M=s.shallowRef(),u=s.shallowRef();return ua(u),s.watchPostEffect(()=>{if(u.value||!M.value)return;const d=new AMap.Map(M.value,{...l,vectorMapForeign:c,mapStyle:"amap://styles/95498a904992a4c0b866a3e4d7729682"});u.value=d,r==null||r(d)}),oe(()=>g.value,d=>{var I;(I=u.value)==null||I.setStatus(d)}),Ee(u,e,[{name:"center",defaultValue:[0,0]},{name:"zooms",defaultValue:[0,0]},{name:"zoom",defaultValue:0},{name:"layers",defaultValue:[]},{name:"limitBounds",defaultValue:[]},{name:"rotation",defaultValue:0},{name:"defaultCursor",defaultValue:""},{name:"mapStyle",defaultValue:""},{name:"features",defaultValue:[]},{name:"pitch",defaultValue:0},{name:"mask",defaultValue:[]},{name:"labelRejectMask",defaultValue:!1}]),q(u,e,i,["onDragStart","onDragEnd"]),()=>{var d;return s.h("div",{ref:M,class:Ga},(d=n.default)==null?void 0:d.call(n))}});let Ie="user";const Wa=()=>Ie,qt=()=>({executeMapApi:e=>{Ie="api";try{e(),setTimeout(()=>{Ie="user"},100)}catch(n){throw Ie="user",n}}});var Ua="_7anfuo0";const Ba=h(function(e,{slots:n,emit:i}){const a=e.mapRef,o=s.computed(()=>{const{mapRef:u,onDragStart:d,onDragEnd:I,...m}=e;return m}),r=o.value,c=s.shallowRef(),l=s.shallowRef(),{executeMapApi:g}=qt(),M=u=>i(u,{target:l.value});return la(l),s.watchPostEffect(()=>{if(l.value||!c.value)return;let u;g(()=>{u=new google.maps.Map(c.value,{...r})}),l.value=u,a==null||a(u)}),oe(()=>o.value,u=>{g(()=>{var d;return(d=l.value)==null?void 0:d.setOptions({...u})})}),Q(l,e,M,["onDragStart","onDragEnd"]),()=>{var u;return s.h("div",{ref:c,class:Ua},(u=n.default)==null?void 0:u.call(n))}}),Va=te(function(e,{slots:n}){const{statusRef:i,readyPromise:a}=Oa(e),o=new Proxy(e,{get(r,c,l){return c==="status"?i.value:c==="readyPromise"?a:Reflect.get(r,c,l)}});return ca(o),()=>{var r;return s.h("div",[(r=n.default)==null?void 0:r.call(n)])}}).props(["amapKey","amapSecret","amapServiceHost","gmapId","gmapKey","supplier","language"]),re=te(function(e,{slots:n,emit:i}){S(e,"HeycarMap");const a=A(),o=({target:c})=>{const{lng:l,lat:g}=c.getCenter();i("dragEnd",[l(),g()])},r=({target:c})=>{const{lng:l,lat:g}=c.getCenter();i("dragEnd",[l,g])};return()=>{var f,p,y;const{supplier:c,gmapId:l,language:g="zh",status:M}=a,{mapRef:u,center:d,zoom:I}=e;if(M===ee.LOADING)return(f=n.loading)==null?void 0:f.call(n);if(M===ee.FAILURE)return(p=n.fallback)==null?void 0:p.call(n);const m=(y=n.default)==null?void 0:y.call(n);switch(c){case"gmap":return s.h(Ba,{attrs:{mapRef:u,mapId:l,center:d?x(d):void 0,zoom:I},on:{dragEnd:o}},[m]);default:return s.h(ka,{attrs:{mapRef:u,vectorMapForeign:Aa(g),center:d,zoom:I},on:{dragEnd:r}},[m])}}}).props(["center","fallback","loading","mapRef","zoom"]),_=h(function(e){const n=s.shallowRef(),i=ne();return s.onMounted(()=>{n.value=new AMap.Polyline({...e})}),s.onUnmounted(()=>{var a;(a=n.value)==null||a.setMap(null)}),s.watchPostEffect(()=>{var o;const a=i==null?void 0:i.value;a&&((o=n.value)==null||o.setMap(a))}),Ee(n,e,[{name:"path",defaultValue:[[0,0]]},{name:"extData",defaultValue:void 0},{name:"draggable",defaultValue:!1}]),oe(()=>{const{path:a,extData:o,draggable:r,...c}=e;return c},a=>{var o;(o=n.value)==null||o.setOptions({...a})}),()=>null}),me=h(function(e){const n=s.shallowRef(),i=ie();return s.onMounted(()=>{n.value=new google.maps.Polyline({...e})}),s.onUnmounted(()=>{var a;(a=n.value)==null||a.setMap(null)}),s.watchPostEffect(()=>{var o;const a=i==null?void 0:i.value;a&&((o=n.value)==null||o.setMap(a))}),oe(()=>({...e}),a=>{var o;(o=n.value)==null||o.setOptions({...a})}),()=>null}),Ya=h(function(e){return S(e,"ADrivingLine"),()=>{const n=window.innerWidth*.01,i=2.5*n,a=.35*n,o=.6*n,r=1*n,c=.75*n,l=e.done?"#96B2CA":"#487BF4",g=e.done?"#7693AF":"#4175F1",M=e.done?"#7693AF":"#6C95F5";return s.h("div",[s.h(_,{attrs:{path:e.path,strokeWeight:i+2*a+2*r,strokeOpacity:1,strokeColor:g,lineJoin:"round",lineCap:"round"}}),s.h(_,{attrs:{path:e.path,strokeWeight:i+2*a,strokeOpacity:1,strokeColor:M,lineJoin:"round",lineCap:"round",strokeStyle:"dashed",strokeDasharray:[c,c*.5]}}),s.h(_,{attrs:{path:e.path,strokeWeight:i,strokeOpacity:1,strokeColor:l,lineJoin:"round",lineCap:"round"}}),s.h(_,{attrs:{showDir:!0,path:e.path,strokeWeight:i+2*o,strokeOpacity:1,strokeColor:"transparent",lineJoin:"round",lineCap:"round"}})])}}),Ha=h(function(e){S(e,"ADrivingLine");const n=s.computed(()=>e.path.map(x));return()=>{const i=window.innerWidth*.01,a=10*i,o=2.5*i,r=.35*i,c=.75*i,l=1*i,g=e.done?"#96B2CA":"#487BF4",M=e.done?"#7693AF":"#4175F1",u=e.done?"#7693AF":"#6C95F5";return s.h("div",[s.h(me,{attrs:{path:n.value,strokeWeight:o+2*r+2*l,strokeOpacity:1,strokeColor:M}}),s.h(me,{attrs:{path:n.value,icons:[{icon:{path:"M 0,-0.5 0,0.5",strokeWeight:o+2*r,strokeColor:u,fillColor:u,scale:1},repeat:`${o}px`,offset:`${o/2}px`}]}}),s.h(me,{attrs:{path:n.value,strokeWeight:o,strokeOpacity:1,strokeColor:g,icons:[{icon:{path:google.maps.SymbolPath.FORWARD_OPEN_ARROW,strokeColor:"white",strokeWeight:c,scale:3},repeat:`${a}px`}]}})])}}),se=h(function(e){const n=A();return()=>e.path.length?z(n.supplier==="gmap"?Ha:Ya,{attrs:e}):null}),en=t=>{const e=s.reactive({path:[],distance:0,duration:0}),n=new AMap.Driving({});return J(()=>({...t}),({from:i,to:a})=>{n.search(AMap.LngLat.from(i),AMap.LngLat.from(a),{waypoints:[]},(o,r)=>{switch(o){case"complete":{let c=[];const g=r.routes[0];for(const M of g.steps){const d=M.path.map(({lng:I,lat:m})=>[I,m]);c=c.concat(d)}e.path=c,e.distance=g.distance,e.duration=g.time;return}case"no_data":e.path=[],e.distance=0,e.duration=0;return;default:throw r}})}),e},tn=t=>{const e=s.reactive({path:[],distance:0,duration:0}),n=new google.maps.DirectionsService;return J(()=>({...t}),({from:i,to:a})=>{n.route({origin:{lng:i[0],lat:i[1]},destination:{lng:a[0],lat:a[1]},travelMode:google.maps.TravelMode.DRIVING},(o,r)=>{var c,l,g,M;switch(r){case google.maps.DirectionsStatus.OK:{let u=[],d=0,I=0;const m=o.routes[0],f=m.overview_path.map(p=>[p.lng(),p.lat()]);u=u.concat(f);for(const p of m.legs)d+=(l=(c=p.distance)==null?void 0:c.value)!=null?l:0,I+=(M=(g=p.duration)==null?void 0:g.value)!=null?M:0;e.path=u,e.distance=d,e.duration=I;return}case google.maps.DirectionsStatus.ZERO_RESULTS:case google.maps.DirectionsStatus.NOT_FOUND:e.path=[],e.distance=0,e.duration=0;return;default:throw new Error(r)}})}),e},Qa=t=>{const{supplier:e}=A();return e==="gmap"?tn(t):en(t)},Ja=(t,e,n)=>{if(!n)return 0;const{x:i,y:a}=n.lngLatToContainer(t),{x:o,y:r}=n.lngLatToContainer(e),c=Math.atan2(a-r,o-i);return(Math.PI/2-c)/Math.PI*180},nn=t=>s.computed(()=>{const{map:e,path:n}=t,[i,a]=n;if(!(!i||!a||!e))return Ja(i,a,e)}),an=t=>s.computed(()=>{const{path:e}=t,[n,i]=e;if(!(!n||!i))return google.maps.geometry.spherical.computeHeading(x(n),x(i))}),Fa=t=>{const{supplier:e}=A();return e==="gmap"?an(t):nn(t)},Xa=h(function(e,{slots:n}){S(e,"ADrivingRoute");const i=ne(),{path:a,distance:o,duration:r}=s.toRefs(en(e)),c=nn(s.reactive({path:a,map:i}));return()=>{var l;return s.h("div",[(l=n.render)==null?void 0:l.call(n,s.reactive({path:a,angle:c,distance:o,duration:r}))])}}),$a=h(function(e,{slots:n}){S(e,"GDrivingRoute");const i=ie(),{path:a,distance:o,duration:r}=s.toRefs(tn(e)),c=an(s.reactive({path:a,map:i}));return()=>{var l;return s.h("div",[(l=n.render)==null?void 0:l.call(n,s.reactive({path:a,angle:c,distance:o,duration:r}))])}}),ce=h(function(e,{slots:n}){const{supplier:i}=A();return()=>z(i==="gmap"?$a:Xa,{attrs:e,scopedSlots:n})}),_a=20,Ka=t=>{const{mapRef:e,autoFitTimeout:n}=t,i=new Set;let a;const o=()=>{var m;const l=e.value;if(!l)return;const g=window.innerWidth/100,[M,u,d,I]=(m=t.padding)!=null?m:[0,0,0,0];l.setFitView([...i],!1,[M*g,d*g,I*g,u*g])},r={add:l=>{i.add(l)},remove:l=>{i.delete(l)},setFitView:o};return q(e,{},()=>{n&&(a&&clearTimeout(a),a=setTimeout(()=>{a=void 0,o()},n))},["onDragEnd"]),{registerFitVeiw:r,setFitView:o}};class qa extends Set{getBound(){const e=new google.maps.LatLngBounds;for(const n of this.values()){const i=n instanceof google.maps.Marker?n.getPosition():n.position;i&&e.extend(i)}return e}}const eo=t=>{const{mapRef:e,autoFitTimeout:n}=t,{executeMapApi:i}=qt(),a=new qa;let o;const r=()=>{var p;const M=e.value;if(!M)return;const u=window.innerWidth/100,[d,I,m,f]=(p=t.padding)!=null?p:[0,0,0,0];i(()=>M.fitBounds(a.getBound(),{top:d*u,right:I*u,bottom:m*u,left:f*u}))},c={add:M=>{a.add(M)},remove:M=>{a.delete(M)},setFitView:r},l=M=>{const u=Wa();console.log("handleMoveEndOrZomEnd name, eventSource = ",M,u),!(!n||u!=="user")&&(o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,r()},n))},g=Ki(l,_a);return Q(e,{},l,["onDragEnd"]),Q(e,{},g,["onZoom_changed"]),{registerFitVeiw:c,setFitView:r}},ue=t=>{const{supplier:e}=A();return e==="gmap"?eo(t):Ka(t)};h(function(e,{slots:n}){const i=zt(),a=ue({...e,mapRef:i});return()=>{var o;return s.h("div",[(o=n.render)==null?void 0:o.call(n,a)])}});const to=h(function(e,{slots:n}){const{registerOverlay:i}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AgNC45MDEgMCAxMC45NDdjMCAzLjkxOCAyLjA2OCA3LjM1NSA1LjE3NyA5LjI5QzExLjc1IDIzLjI3NyA5LjA2IDI3IDExIDI3eiIgc3Ryb2tlPSIjRkZGIiBmaWxsPSJ1cmwoI3ByZWZpeF9fYSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMS4yMTUpIi8+PHRleHQgZm9udC1mYW1pbHk9IlBpbmdGYW5nU0MtU2VtaWJvbGQsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIiBmaWxsPSIjRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";function no(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function rt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ot(Object(n),!0).forEach(function(i){no(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}var io=(t,e,n)=>{for(var i of Object.keys(t)){var a;if(t[i]!==((a=e[i])!==null&&a!==void 0?a:n[i]))return!1}return!0},F=t=>e=>{var n=t.defaultClassName,i=rt(rt({},t.defaultVariants),e);for(var a in i){var o,r=(o=i[a])!==null&&o!==void 0?o:t.defaultVariants[a];if(r!=null){var c=r;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[a][c];l&&(n+=" "+l)}}for(var[g,M]of t.compoundVariants)io(g,i,t.defaultVariants)&&(n+=" "+M);return n},Y=F({defaultClassName:"",variantClassNames:{type:{start:"_4a4ovk6",end:"_4a4ovk7"}},defaultVariants:{},compoundVariants:[]}),sn="_4a4ovk1",cn="_4a4ovk4",un="_4a4ovk5",ln="_4a4ovk3",ve="_4a4ovk0",dn="_4a4ovk2";const ao=h(function(e){S(e,"AStartEndPoint");const n=s.computed(()=>{var o;const i=e.type==="start"?rn:on,a=e.description?Le(e.description).map(r=>r.type==="normal"?r.value:`<span class="${un}">${r.value}</span>`).join(""):"";return!e.description&&!e.title?`<img src="${i}" class="${Y({type:e.type})}">`:e.description?`
|
|
24
|
+
<div class="${qt}"></div>
|
|
25
|
+
<img src="${O}" class="${Kt}">
|
|
26
|
+
`)});return()=>e.type==="locator"?s.h(Qt,{attrs:{position:e.position}}):s.h(G,{attrs:{position:P(e.position),content:n.value}})}),ba=h(function(e){const n=L();return()=>z(n.supplier==="gmap"?Pa:xa,{attrs:e})});var xe={},Ta={get exports(){return xe},set exports(t){xe=t}};(function(t,e){(function(n,i){t.exports=i()})(Pn,function(){function n(u){var d=[];return u.AMapUI&&d.push(i(u.AMapUI)),u.Loca&&d.push(a(u.Loca)),Promise.all(d)}function i(u){return new Promise(function(d,M){var I=[];if(u.plugins)for(var f=0;f<u.plugins.length;f+=1)r.AMapUI.plugins.indexOf(u.plugins[f])==-1&&I.push(u.plugins[f]);if(c.AMapUI===o.failed)M("前次请求 AMapUI 失败");else if(c.AMapUI===o.notload){c.AMapUI=o.loading,r.AMapUI.version=u.version||r.AMapUI.version,f=r.AMapUI.version;var y=document.body||document.head,p=document.createElement("script");p.type="text/javascript",p.src="https://webapi.amap.com/ui/"+f+"/main.js",p.onerror=function(v){c.AMapUI=o.failed,M("请求 AMapUI 失败")},p.onload=function(){if(c.AMapUI=o.loaded,I.length)window.AMapUI.loadUI(I,function(){for(var v=0,j=I.length;v<j;v++){var N=I[v].split("/").slice(-1)[0];window.AMapUI[N]=arguments[v]}for(d();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()});else for(d();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()},y.appendChild(p)}else c.AMapUI===o.loaded?u.version&&u.version!==r.AMapUI.version?M("不允许多个版本 AMapUI 混用"):I.length?window.AMapUI.loadUI(I,function(){for(var v=0,j=I.length;v<j;v++){var N=I[v].split("/").slice(-1)[0];window.AMapUI[N]=arguments[v]}d()}):d():u.version&&u.version!==r.AMapUI.version?M("不允许多个版本 AMapUI 混用"):l.AMapUI.push(function(v){v?M(v):I.length?window.AMapUI.loadUI(I,function(){for(var j=0,N=I.length;j<N;j++){var x=I[j].split("/").slice(-1)[0];window.AMapUI[x]=arguments[j]}d()}):d()})})}function a(u){return new Promise(function(d,M){if(c.Loca===o.failed)M("前次请求 Loca 失败");else if(c.Loca===o.notload){c.Loca=o.loading,r.Loca.version=u.version||r.Loca.version;var I=r.Loca.version,f=r.AMap.version.startsWith("2"),y=I.startsWith("2");if(f&&!y||!f&&y)M("JSAPI 与 Loca 版本不对应!!");else{f=r.key,y=document.body||document.head;var p=document.createElement("script");p.type="text/javascript",p.src="https://webapi.amap.com/loca?v="+I+"&key="+f,p.onerror=function(v){c.Loca=o.failed,M("请求 AMapUI 失败")},p.onload=function(){for(c.Loca=o.loaded,d();l.Loca.length;)l.Loca.splice(0,1)[0]()},y.appendChild(p)}}else c.Loca===o.loaded?u.version&&u.version!==r.Loca.version?M("不允许多个版本 Loca 混用"):d():u.version&&u.version!==r.Loca.version?M("不允许多个版本 Loca 混用"):l.Loca.push(function(v){v?M(v):M()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var o;(function(u){u.notload="notload",u.loading="loading",u.loaded="loaded",u.failed="failed"})(o||(o={}));var r={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},c={AMap:o.notload,AMapUI:o.notload,Loca:o.notload},l={AMap:[],AMapUI:[],Loca:[]},g=[],m=function(u){typeof u=="function"&&(c.AMap===o.loaded?u(window.AMap):g.push(u))};return{load:function(u){return new Promise(function(d,M){if(c.AMap==o.failed)M("");else if(c.AMap==o.notload){var I=u.key,f=u.version,y=u.plugins;I?(window.AMap&&location.host!=="lbs.amap.com"&&M("禁止多种API加载方式混用"),r.key=I,r.AMap.version=f||r.AMap.version,r.AMap.plugins=y||r.AMap.plugins,c.AMap=o.loading,f=document.body||document.head,window.___onAPILoaded=function(v){if(delete window.___onAPILoaded,v)c.AMap=o.failed,M(v);else for(c.AMap=o.loaded,n(u).then(function(){d(window.AMap)}).catch(M);g.length;)g.splice(0,1)[0]()},y=document.createElement("script"),y.type="text/javascript",y.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+r.AMap.version+"&key="+I+"&plugin="+r.AMap.plugins.join(","),y.onerror=function(v){c.AMap=o.failed,M(v)},f.appendChild(y)):M("请填写key")}else if(c.AMap==o.loaded)if(u.key&&u.key!==r.key)M("多个不一致的 key");else if(u.version&&u.version!==r.AMap.version)M("不允许多个版本 JSAPI 混用");else{if(I=[],u.plugins)for(f=0;f<u.plugins.length;f+=1)r.AMap.plugins.indexOf(u.plugins[f])==-1&&I.push(u.plugins[f]);I.length?window.AMap.plugin(I,function(){n(u).then(function(){d(window.AMap)}).catch(M)}):n(u).then(function(){d(window.AMap)}).catch(M)}else if(u.key&&u.key!==r.key)M("多个不一致的 key");else if(u.version&&u.version!==r.AMap.version)M("不允许多个版本 JSAPI 混用");else{var p=[];if(u.plugins)for(f=0;f<u.plugins.length;f+=1)r.AMap.plugins.indexOf(u.plugins[f])==-1&&p.push(u.plugins[f]);m(function(){p.length?window.AMap.plugin(p,function(){n(u).then(function(){d(window.AMap)}).catch(M)}):n(u).then(function(){d(window.AMap)}).catch(M)})}})},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,r={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},c={AMap:o.notload,AMapUI:o.notload,Loca:o.notload},l={AMap:[],AMapUI:[],Loca:[]}}}})})(Ta);var Ra=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,a,o;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(a=i;a--!==0;)if(!t(e[a],n[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(n).length)return!1;for(a=i;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=i;a--!==0;){var r=o[a];if(!t(e[r],n[r]))return!1}return!0}return e!==e&&n!==n};const rt="__googleMapsScriptId";var V;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(V||(V={}));class U{constructor({apiKey:e,authReferrerPolicy:n,channel:i,client:a,id:o=rt,language:r,libraries:c=[],mapIds:l,nonce:g,region:m,retries:u=3,url:d="https://maps.googleapis.com/maps/api/js",version:M}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=n,this.channel=i,this.client=a,this.id=o||rt,this.language=r,this.libraries=c,this.mapIds=l,this.nonce=g,this.region=m,this.retries=u,this.url=d,this.version=M,U.instance){if(!Ra(this.options,U.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(U.instance.options)}`);return U.instance}U.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?V.FAILURE:this.done?V.SUCCESS:this.loading?V.LOADING:V.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+=`?callback=${this.CALLBACK}`,this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,n)=>{this.loadCallback(i=>{i?n(i.error):e(window.google)})})}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}const e=this.createUrl(),n=document.createElement("script");n.id=this.id,n.type="text/javascript",n.src=e,n.onerror=this.loadErrorCallback.bind(this),n.defer=!0,n.async=!0,this.nonce&&(n.nonce=this.nonce),document.head.appendChild(n)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const n=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${n} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},n)}else this.onerrorEvent=e,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}const Ea=["AMap.Geolocation","AMap.Geocoder","AMap.PlaceSearch","AMap.Driving","AMap.Walking"],za=["marker","places","geometry"];var te=(t=>(t.LOADING="LOADING",t.FAILURE="FAILURE",t.SUCCESS="SUCCESS",t))(te||{});const Za=t=>{const{onChange:e}=t;let n,i;const a=new Promise((c,l)=>{n=c,i=l}),o=s.shallowRef("LOADING"),r=s.computed(()=>{const{onChange:c,loading:l,fallback:g,apiKey:m,apiSecret:u,apiServiceHost:d,version:M,...I}=t;return{...I,key:m,version:M!=null?M:"2.0.5.16"}});return J(()=>r.value,c=>{const l=g=>{o.value=g,g==="SUCCESS"&&n(),g==="FAILURE"&&i(),e==null||e(o.value)};l("LOADING"),window._AMapSecurityConfig=t.apiServiceHost?{serviceHost:t.apiServiceHost}:{securityJsCode:t.apiSecret},xe.load(c).then(()=>l("SUCCESS"),()=>l("FAILURE"))}),{statusRef:o,readyPromise:a}},Oa=t=>{const{onChange:e}=t;let n,i;const a=new Promise((c,l)=>{n=c,i=l}),o=s.shallowRef("LOADING"),r=s.computed(()=>{const{onChange:c,fallback:l,loading:g,...m}=t;return m});return J(()=>r.value,c=>{const l=new U(c),g=m=>{o.value=m,m==="SUCCESS"&&n(),m==="FAILURE"&&i(),e==null||e(o.value)};g("LOADING"),l.load().then(()=>g("SUCCESS"),()=>g("FAILURE"))}),{statusRef:o,readyPromise:a}},ka=t=>{const{gmapKey:e,amapKey:n,amapSecret:i,amapServiceHost:a,supplier:o,language:r,onChange:c}=t;return o==="gmap"?Oa({apiKey:e,language:r,version:"beta",libraries:za,onChange:c}):Za({apiKey:n,apiSecret:i,apiServiceHost:a,plugins:Ea,onChange:c})};var Ga="_1d8ur7t0";const Wa=h(function(e,{slots:n,emit:i}){const{onDragStart:a,onDragEnd:o,mapRef:r,vectorMapForeign:c="style_zh_cn",...l}=e,g=s.computed(()=>({dragEnable:!!e.dragEnable,zoomEnable:!!e.zoomEnable,jogEnable:!!e.jogEnable,pitchEnable:!!e.pitchEnable,rotateEnable:!!e.rotateEnable,animateEnable:!!e.animateEnable,keyboardEnable:!!e.keyboardEnable})),m=s.shallowRef(),u=s.shallowRef();return la(u),s.watchPostEffect(()=>{if(u.value||!m.value)return;const d=new AMap.Map(m.value,{...l,vectorMapForeign:c,mapStyle:"amap://styles/95498a904992a4c0b866a3e4d7729682"});u.value=d,r==null||r(d)}),re(()=>g.value,d=>{var M;(M=u.value)==null||M.setStatus(d)}),ze(u,e,[{name:"center",defaultValue:[0,0]},{name:"zooms",defaultValue:[0,0]},{name:"zoom",defaultValue:0},{name:"layers",defaultValue:[]},{name:"limitBounds",defaultValue:[]},{name:"rotation",defaultValue:0},{name:"defaultCursor",defaultValue:""},{name:"mapStyle",defaultValue:""},{name:"features",defaultValue:[]},{name:"pitch",defaultValue:0},{name:"mask",defaultValue:[]},{name:"labelRejectMask",defaultValue:!1}]),ee(u,e,i,["onDragStart","onDragEnd"]),()=>{var d;return s.h("div",{ref:m,class:Ga},(d=n.default)==null?void 0:d.call(n))}});let me="user";const Ua=()=>me,en=()=>({executeMapApi:e=>{me="api";try{e(),setTimeout(()=>{me="user"},100)}catch(n){throw me="user",n}}});var Ba="_7anfuo0",Va="_7anfuo1";const Ya=h(function(e,{slots:n,emit:i}){const a=e.mapRef,o=s.computed(()=>{const{renderOverlay:u,mapRef:d,onDragStart:M,onDragEnd:I,...f}=e;return f}),r=o.value,c=s.shallowRef(),l=s.shallowRef(),{executeMapApi:g}=en(),m=u=>i(u,{target:l.value});return da(l),s.watchPostEffect(()=>{if(l.value||!c.value)return;let u;g(()=>{u=new google.maps.Map(c.value,{...r})}),l.value=u,a==null||a(u)}),re(()=>o.value,u=>{g(()=>{var d;return(d=l.value)==null?void 0:d.setOptions({...u})})}),Q(l,e,m,["onDragStart","onDragEnd"]),()=>{var u,d;return s.h("div",{class:Va},[(u=e.renderOverlay)==null?void 0:u.call(e),s.h("div",{ref:c,class:Ba},(d=n.default)==null?void 0:d.call(n))])}}),Ha=ne(function(e,{slots:n}){const{statusRef:i,readyPromise:a}=ka(e),o=new Proxy(e,{get(r,c,l){return c==="status"?i.value:c==="readyPromise"?a:Reflect.get(r,c,l)}});return ua(o),()=>{var r;return s.h("div",[(r=n.default)==null?void 0:r.call(n)])}}).props(["amapKey","amapSecret","amapServiceHost","gmapId","gmapKey","supplier","language"]),se=ne(function(e,{slots:n,emit:i}){S(e,"HeycarMap");const a=L(),o=({target:c})=>{const{lng:l,lat:g}=c.getCenter();i("dragEnd",[l(),g()])},r=({target:c})=>{const{lng:l,lat:g}=c.getCenter();i("dragEnd",[l,g])};return()=>{var y,p,v;const{supplier:c,gmapId:l,language:g="zh",status:m}=a,{mapRef:u,center:d,zoom:M,renderOverlay:I}=e;if(m===te.LOADING)return(y=n.loading)==null?void 0:y.call(n);if(m===te.FAILURE)return(p=n.fallback)==null?void 0:p.call(n);const f=(v=n.default)==null?void 0:v.call(n);switch(c){case"gmap":return s.h(Ya,{attrs:{mapRef:u,mapId:l,center:d?P(d):void 0,zoom:M,renderOverlay:I},on:{dragEnd:o}},[f]);default:return s.h(Wa,{attrs:{mapRef:u,vectorMapForeign:La(g),center:d,zoom:M},on:{dragEnd:r}},[f])}}}).props(["center","fallback","loading","mapRef","zoom","renderOverlay"]),K=h(function(e){const n=s.shallowRef(),i=ie();return s.onMounted(()=>{n.value=new AMap.Polyline({...e})}),s.onUnmounted(()=>{var a;(a=n.value)==null||a.setMap(null)}),s.watchPostEffect(()=>{var o;const a=i==null?void 0:i.value;a&&((o=n.value)==null||o.setMap(a))}),ze(n,e,[{name:"path",defaultValue:[[0,0]]},{name:"extData",defaultValue:void 0},{name:"draggable",defaultValue:!1}]),re(()=>{const{path:a,extData:o,draggable:r,...c}=e;return c},a=>{var o;(o=n.value)==null||o.setOptions({...a})}),()=>null}),Ie=h(function(e){const n=s.shallowRef(),i=ae();return s.onMounted(()=>{n.value=new google.maps.Polyline({...e})}),s.onUnmounted(()=>{var a;(a=n.value)==null||a.setMap(null)}),s.watchPostEffect(()=>{var o;const a=i==null?void 0:i.value;a&&((o=n.value)==null||o.setMap(a))}),re(()=>({...e}),a=>{var o;(o=n.value)==null||o.setOptions({...a})}),()=>null}),Qa=h(function(e){return S(e,"ADrivingLine"),()=>{const n=window.innerWidth*.01,i=2.5*n,a=.35*n,o=.6*n,r=1*n,c=.75*n,l=e.done?"#96B2CA":"#487BF4",g=e.done?"#7693AF":"#4175F1",m=e.done?"#7693AF":"#6C95F5";return s.h("div",[s.h(K,{attrs:{path:e.path,strokeWeight:i+2*a+2*r,strokeOpacity:1,strokeColor:g,lineJoin:"round",lineCap:"round"}}),s.h(K,{attrs:{path:e.path,strokeWeight:i+2*a,strokeOpacity:1,strokeColor:m,lineJoin:"round",lineCap:"round",strokeStyle:"dashed",strokeDasharray:[c,c*.5]}}),s.h(K,{attrs:{path:e.path,strokeWeight:i,strokeOpacity:1,strokeColor:l,lineJoin:"round",lineCap:"round"}}),s.h(K,{attrs:{showDir:!0,path:e.path,strokeWeight:i+2*o,strokeOpacity:1,strokeColor:"transparent",lineJoin:"round",lineCap:"round"}})])}}),Ja=h(function(e){S(e,"ADrivingLine");const n=s.computed(()=>e.path.map(P));return()=>{const i=window.innerWidth*.01,a=10*i,o=2.5*i,r=.35*i,c=.75*i,l=1*i,g=e.done?"#96B2CA":"#487BF4",m=e.done?"#7693AF":"#4175F1",u=e.done?"#7693AF":"#6C95F5";return s.h("div",[s.h(Ie,{attrs:{path:n.value,strokeWeight:o+2*r+2*l,strokeOpacity:1,strokeColor:m}}),s.h(Ie,{attrs:{path:n.value,icons:[{icon:{path:"M 0,-0.5 0,0.5",strokeWeight:o+2*r,strokeColor:u,fillColor:u,scale:1},repeat:`${o}px`,offset:`${o/2}px`}]}}),s.h(Ie,{attrs:{path:n.value,strokeWeight:o,strokeOpacity:1,strokeColor:g,icons:[{icon:{path:google.maps.SymbolPath.FORWARD_OPEN_ARROW,strokeColor:"white",strokeWeight:c,scale:3},repeat:`${a}px`}]}})])}}),ce=h(function(e){const n=L();return()=>e.path.length?z(n.supplier==="gmap"?Ja:Qa,{attrs:e}):null}),tn=t=>{const e=s.reactive({path:[],distance:0,duration:0}),n=new AMap.Driving({});return J(()=>({...t}),({from:i,to:a})=>{n.search(AMap.LngLat.from(i),AMap.LngLat.from(a),{waypoints:[]},(o,r)=>{switch(o){case"complete":{let c=[];const g=r.routes[0];for(const m of g.steps){const d=m.path.map(({lng:M,lat:I})=>[M,I]);c=c.concat(d)}e.path=c,e.distance=g.distance,e.duration=g.time;return}case"no_data":e.path=[],e.distance=0,e.duration=0;return;default:throw r}})}),e},nn=t=>{const e=s.reactive({path:[],distance:0,duration:0}),n=new google.maps.DirectionsService;return J(()=>({...t}),({from:i,to:a})=>{n.route({origin:{lng:i[0],lat:i[1]},destination:{lng:a[0],lat:a[1]},travelMode:google.maps.TravelMode.DRIVING},(o,r)=>{var c,l,g,m;switch(r){case google.maps.DirectionsStatus.OK:{let u=[],d=0,M=0;const I=o.routes[0],f=I.overview_path.map(y=>[y.lng(),y.lat()]);u=u.concat(f);for(const y of I.legs)d+=(l=(c=y.distance)==null?void 0:c.value)!=null?l:0,M+=(m=(g=y.duration)==null?void 0:g.value)!=null?m:0;e.path=u,e.distance=d,e.duration=M;return}case google.maps.DirectionsStatus.ZERO_RESULTS:case google.maps.DirectionsStatus.NOT_FOUND:e.path=[],e.distance=0,e.duration=0;return;default:throw new Error(r)}})}),e},Fa=t=>{const{supplier:e}=L();return e==="gmap"?nn(t):tn(t)},Xa=(t,e,n)=>{if(!n)return 0;const{x:i,y:a}=n.lngLatToContainer(t),{x:o,y:r}=n.lngLatToContainer(e),c=Math.atan2(a-r,o-i);return(Math.PI/2-c)/Math.PI*180},an=t=>s.computed(()=>{const{map:e,path:n}=t,[i,a]=n;if(!(!i||!a||!e))return Xa(i,a,e)}),on=t=>s.computed(()=>{const{path:e}=t,[n,i]=e;if(!(!n||!i))return google.maps.geometry.spherical.computeHeading(P(n),P(i))}),$a=t=>{const{supplier:e}=L();return e==="gmap"?on(t):an(t)},_a=h(function(e,{slots:n}){S(e,"ADrivingRoute");const i=ie(),{path:a,distance:o,duration:r}=s.toRefs(tn(e)),c=an(s.reactive({path:a,map:i}));return()=>{var l;return s.h("div",[(l=n.render)==null?void 0:l.call(n,s.reactive({path:a,angle:c,distance:o,duration:r}))])}}),Ka=h(function(e,{slots:n}){S(e,"GDrivingRoute");const i=ae(),{path:a,distance:o,duration:r}=s.toRefs(nn(e)),c=on(s.reactive({path:a,map:i}));return()=>{var l;return s.h("div",[(l=n.render)==null?void 0:l.call(n,s.reactive({path:a,angle:c,distance:o,duration:r}))])}}),ue=h(function(e,{slots:n}){const{supplier:i}=L();return()=>z(i==="gmap"?Ka:_a,{attrs:e,scopedSlots:n})}),qa=20,eo=t=>{const{mapRef:e,autoFitTimeout:n}=t,i=new Set;let a;const o=()=>{var I;const l=e.value;if(!l)return;const g=window.innerWidth/100,[m,u,d,M]=(I=t.padding)!=null?I:[0,0,0,0];l.setFitView([...i],!1,[m*g,d*g,M*g,u*g])},r={add:l=>{i.add(l)},remove:l=>{i.delete(l)},setFitView:o};return ee(e,{},()=>{n&&(a&&clearTimeout(a),a=setTimeout(()=>{a=void 0,o()},n))},["onDragEnd"]),{registerFitVeiw:r,setFitView:o}};class to extends Set{getBound(){const e=new google.maps.LatLngBounds;for(const n of this.values()){const i=n instanceof google.maps.Marker?n.getPosition():n.position;i&&e.extend(i)}return e}}const no=t=>{const{mapRef:e,autoFitTimeout:n}=t,{executeMapApi:i}=en(),a=new to;let o;const r=()=>{var y;const m=e.value;if(!m)return;const u=window.innerWidth/100,[d,M,I,f]=(y=t.padding)!=null?y:[0,0,0,0];i(()=>m.fitBounds(a.getBound(),{top:d*u,right:M*u,bottom:I*u,left:f*u}))},c={add:m=>{a.add(m)},remove:m=>{a.delete(m)},setFitView:r},l=m=>{const u=Ua();console.log("handleMoveEndOrZomEnd name, eventSource = ",m,u),!(!n||u!=="user")&&(o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,r()},n))},g=qi(l,qa);return Q(e,{},l,["onDragEnd"]),Q(e,{},g,["onZoom_changed"]),{registerFitVeiw:c,setFitView:r}},le=t=>{const{supplier:e}=L();return e==="gmap"?no(t):eo(t)};h(function(e,{slots:n}){const i=Zt(),a=le({...e,mapRef:i});return()=>{var o;return s.h("div",[(o=n.render)==null?void 0:o.call(n,a)])}});const io=h(function(e,{slots:n}){const{registerOverlay:i}=e,{setFitView:a}=i;return W(a),()=>{var o;return s.h("div",[(o=n.default)==null?void 0:o.call(n)])}}),rn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI3Mi4zMzklIiB5MT0iNTAlIiB4Mj0iMCUiIHkyPSI1MCUiIGlkPSJwcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9IiNGRjg0NDciIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkY4QjRBIiBvZmZzZXQ9IjUwLjU5NiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZBOTVBIiBvZmZzZXQ9IjEwMCUiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiAzMC4yMTVjMi4xMzQgMCAzLjg2My0uODkzIDMuODYzLTEuOTk1IDAtMS4xLTEuNzMtMS45OTQtMy44NjMtMS45OTQtMi4xMzQgMC0zLjg2My44OTMtMy44NjMgMS45OTQgMCAxLjEwMiAxLjczIDEuOTk1IDMuODYzIDEuOTk1eiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0iIzQzNDg1QSIvPjxwYXRoIGQ9Ik0xMSAyNy4wMDZjMi4xMjggMC0uOS0zLjc0MyA1LjYyMS02LjY0M0MxOS44NDIgMTguNDUzIDIy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3IDEuNTgxIDEuODIzIDMuNTMyIDEuODIzeiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0iIzQzNDg1QSIvPjxwYXRoIGQ9Ik0xMSAyN2MyLjEyOCAwLS45LTMuNzQyIDUuNjIxLTYuNjQxIDMuMjIxLTEuOTEgNS4zNzktNS40MSA1LjM3OS05LjQxMkMyMiA0LjkwMSAxNy4wNzUgMCAxMSAwUzAgNC45MDEgMCAxMC45NDdjMCAzLjkxOCAyLjA2OCA3LjM1NSA1LjE3NyA5LjI5QzExLjc1IDIzLjI3NyA5LjA2IDI3IDExIDI3eiIgc3Ryb2tlPSIjRkZGIiBmaWxsPSJ1cmwoI3ByZWZpeF9fYSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMS4yMTUpIi8+PHRleHQgZm9udC1mYW1pbHk9IlBpbmdGYW5nU0MtU2VtaWJvbGQsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIiBmaWxsPSIjRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";function ao(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function st(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?st(Object(n),!0).forEach(function(i){ao(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}var oo=(t,e,n)=>{for(var i of Object.keys(t)){var a;if(t[i]!==((a=e[i])!==null&&a!==void 0?a:n[i]))return!1}return!0},F=t=>e=>{var n=t.defaultClassName,i=ct(ct({},t.defaultVariants),e);for(var a in i){var o,r=(o=i[a])!==null&&o!==void 0?o:t.defaultVariants[a];if(r!=null){var c=r;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[a][c];l&&(n+=" "+l)}}for(var[g,m]of t.compoundVariants)oo(g,i,t.defaultVariants)&&(n+=" "+m);return n},Y=F({defaultClassName:"",variantClassNames:{type:{start:"_4a4ovk6",end:"_4a4ovk7"}},defaultVariants:{},compoundVariants:[]}),cn="_4a4ovk1",un="_4a4ovk4",ln="_4a4ovk5",dn="_4a4ovk3",ve="_4a4ovk0",gn="_4a4ovk2";const ro=h(function(e){S(e,"AStartEndPoint");const n=s.computed(()=>{var o;const i=e.type==="start"?sn:rn,a=e.description?Le(e.description).map(r=>r.type==="normal"?r.value:`<span class="${ln}">${r.value}</span>`).join(""):"";return!e.description&&!e.title?`<img src="${i}" class="${Y({type:e.type})}">`:e.description?`
|
|
27
27
|
<div class="${ve}">
|
|
28
|
-
<div class="${
|
|
29
|
-
<div class="${
|
|
30
|
-
<div class="${
|
|
28
|
+
<div class="${cn}">
|
|
29
|
+
<div class="${dn}">${(o=e.title)!=null?o:""}</div>
|
|
30
|
+
<div class="${un}">${a}</div>
|
|
31
31
|
</div>
|
|
32
32
|
<img src="${i}" class="${Y({type:e.type})}">
|
|
33
33
|
</div>
|
|
34
34
|
`:`
|
|
35
35
|
<div class="${ve}">
|
|
36
|
-
<div class="${
|
|
36
|
+
<div class="${gn}">${e.title}</div>
|
|
37
37
|
<img src="${i}" class="${Y({type:e.type})}">
|
|
38
38
|
</div>
|
|
39
|
-
`});return()=>s.h(
|
|
40
|
-
<div class="${
|
|
41
|
-
<div class="${
|
|
42
|
-
<div class="${
|
|
39
|
+
`});return()=>s.h(k,{attrs:{registerOverlay:e.registerOverlay,position:e.position,content:n.value,anchor:"bottom-center"}})}),so=h(function(e){S(e,"GStartEndPoint");const n=s.computed(()=>{var o;const i=e.type==="start"?sn:rn,a=e.description?Le(e.description).map(r=>r.type==="normal"?r.value:`<span class="${ln}">${r.value}</span>`).join(""):"";return!e.description&&!e.title?b("img",{class:Y({type:e.type}),src:i}):e.description?b("div",{class:ve},`
|
|
40
|
+
<div class="${cn}">
|
|
41
|
+
<div class="${dn}">${(o=e.title)!=null?o:""}</div>
|
|
42
|
+
<div class="${un}">${a}</div>
|
|
43
43
|
</div>
|
|
44
44
|
<img src="${i}" class="${Y({type:e.type})}">
|
|
45
45
|
`):b("div",{class:ve},`
|
|
46
|
-
<div class="${
|
|
46
|
+
<div class="${gn}">${e.title}</div>
|
|
47
47
|
<img src="${i}" class="${Y({type:e.type})}">
|
|
48
|
-
`)});return()=>s.h(
|
|
49
|
-
<img src="${i==="large"?
|
|
50
|
-
`});return()=>s.h(
|
|
51
|
-
<div class="${
|
|
52
|
-
<img class="${pe({hideIcon:c})} ${
|
|
53
|
-
<div class="${
|
|
48
|
+
`)});return()=>s.h(G,{attrs:{registerOverlay:e.registerOverlay,position:P(e.position),content:n.value}})}),T=h(function(e){const n=L();return()=>z(n.supplier==="gmap"?so:ro,{attrs:e})}),co=ne(t=>{const{registerOverlay:e,mapRef:n,renderDescription:i}=t;return()=>{const{from:a,to:o}=t,r=D(a),c=D(o);return s.h(se,{attrs:{mapRef:n,center:r,zoom:13}},[s.h(T,{attrs:{type:"start",registerOverlay:e,position:r,title:a.name}}),s.h(ue,{attrs:{to:c,from:r,render:({path:l,distance:g,duration:m})=>[s.h(ce,{attrs:{path:l}}),s.h(T,{attrs:{type:"end",registerOverlay:e,position:c,title:o.name,description:i({distance:g,duration:m})}})]}}),s.h(io,{attrs:{registerOverlay:e}})])}}).props(["fallback","from","loading","mapRef","registerOverlay","renderDescription","to"]),uo=5e3,de=t=>{var d,M;const{onChange:e,onLoad:n,onLoadDefault:i,onError:a,geoDefaultPosition:o}=t!=null?t:{};let r=!1;const c=s.ref(!1),l=s.ref(!1),g=s.ref(),m=s.ref({accuracy:0,altitude:0,altitudeAccuracy:0,heading:0,latitude:(d=o==null?void 0:o[1])!=null?d:0,longitude:(M=o==null?void 0:o[0])!=null?M:0,speed:0}),u=s.ref([m.value.longitude,m.value.latitude]);return s.watch(()=>!0,(I,f,y)=>{c.value=!0;const p=navigator.geolocation.watchPosition(v=>{const j=v.coords,N=[v.coords.longitude,v.coords.latitude];m.value=j,u.value=N,c.value&&(c.value=!1,l.value=!0,n==null||n({position:N,coordinate:j})),e==null||e({position:N,coordinate:j})},v=>{c.value=!1,g.value=v;const j=t==null?void 0:t.geoDefaultPosition;j&&!r&&(r=!0,i==null||i({position:j})),a==null||a(v),console.log("errorRef = ",g)},{timeout:uo,maximumAge:0,enableHighAccuracy:!1});y(()=>navigator.geolocation.clearWatch(p))},{immediate:!0}),{geoError:g,geoPosition:u,geoCoordinate:m,geoLoading:c,geoReady:l}},lo=()=>{const t=s.shallowRef();return{mapRef:t,panTo:i=>{var a;return(a=t==null?void 0:t.value)==null?void 0:a.panTo(i)},setMap:i=>{t.value=i}}},go=()=>{const t=s.shallowRef();return{mapRef:t,panTo:i=>{var a;return(a=t==null?void 0:t.value)==null?void 0:a.panTo(P(i))},setMap:i=>{t.value=i}}},ge=()=>{const{supplier:t}=L();return t==="gmap"?go():lo()},Mo=t=>{const{mapRef:e,onChange:n}=t,i=s.ref([0,0]),a=s.ref(!1),o=()=>{},r=(c,{target:l})=>{var u;a.value=!1;const{lng:g,lat:m}=l.getCenter();i.value=[g,m],(u=Ut(n))==null||u([g,m])};return ee(e,{},o,["onDragStart"]),ee(e,{},r,["onDragEnd"]),{centerRef:i,isDragging:a}},mo=t=>{const{mapRef:e,onChange:n}=t,i=s.ref([0,0]),a=s.ref(!1),o=()=>{},r=async()=>{var m,u;a.value=!1;const c=(m=e.value)==null?void 0:m.getCenter(),l=c==null?void 0:c.lng(),g=c==null?void 0:c.lat();i.value=[l,g],(u=Ut(n))==null||u([l,g])};return Q(e,{},o,["onDragStart"]),Q(e,{},r,["onDragEnd"]),{centerRef:i,isDragging:a}},Mn=t=>{const{supplier:e}=L();return e==="gmap"?mo(t):Mo(t)},X=()=>{const t=s.ref(0);return{idx:t,update:()=>{t.value+=1}}},mn=t=>{const{onChange:e,onChangeCity:n}=t,i=[...t.pointRef.value],a=s.ref(i),{readyPromise:o}=L(),r=s.reactive({lng:a.value[0],lat:a.value[1],name:""}),{idx:c,update:l}=X(),g=d=>{const M=new AMap.Geocoder({lang:q}),{lng:I,lat:f}=d;M.getAddress(new AMap.LngLat(I,f),(y,p)=>{if(y!=="complete")return;const{addressComponent:v}=p.regeocode,j=v.city?v.city:v.province,N=v.province;n==null||n({cityName:j,cityParentName:N,countryName:""})})},m=d=>{a.value=d,l()},u=d=>{r.lng=d.lng,r.lat=d.lat,r.name=d.name};return s.watch(()=>c.value,async()=>{await o;const d=new AMap.Geocoder({lang:q}),[M,I]=a.value;d.getAddress(new AMap.LngLat(M,I),(f,y)=>{switch(f){case"complete":{const{formattedAddress:p,addressComponent:v}=y.regeocode,j=v.city?v.city:v.province,N=v.province;r.name=p,r.lng=M,r.lat=I,e==null||e({lng:M,lat:I,name:p}),n==null||n({cityName:j,cityParentName:N,countryName:""});return}case"no_data":r.name="",e==null||e({lng:M,lat:I,name:""});return;case"error":throw y}})}),{place:r,updatePlace:m,setPlace:u,updateCity:g}},In=t=>{const{onChange:e,onChangeCity:n}=t,i=[...t.pointRef.value],a=s.ref(i),{readyPromise:o}=L(),{idx:r,update:c}=X(),l=s.reactive({lng:a.value[0],lat:a.value[1],name:""}),g=d=>{a.value=d,c()},m=d=>{l.lng=d.lng,l.lat=d.lat,l.name=d.name},u=async d=>{const M=new google.maps.Geocoder,{lng:I,lat:f}=d,{results:y}=await M.geocode({language:q,location:{lng:I,lat:f}}),p=ot(y[0]),v=y.slice(-2)[0].address_components[0].long_name,j=y.slice(-1)[0].address_components[0].long_name;n==null||n({cityName:p,cityParentName:v,countryName:j})};return s.watch(()=>r.value,async()=>{await o;const d=new google.maps.Geocoder,[M,I]=a.value,{results:f}=await d.geocode({language:q,location:{lng:M,lat:I}}),y=f[0].formatted_address,p=ot(f[0]),v=f.slice(-2)[0].address_components[0].long_name,j=f.slice(-1)[0].address_components[0].long_name;l.lng=M,l.lat=I,l.name=y,e==null||e({lng:M,lat:I,name:y}),n==null||n({cityName:p,cityParentName:v,countryName:j})}),{place:l,updatePlace:g,setPlace:m,updateCity:u}},Io=t=>{const{supplier:e}=L();return e==="gmap"?In(t):mn(t)},fo=(t,e)=>{let n=1/0,i=t;for(const a of e){const o=AMap.GeometryUtil.distance(D(t),D(a));o>=n||(i=a,n=o)}return{shortestPlace:i,shortestDistance:n}},vo=(t,e)=>{let n=1/0,i=t;for(const a of e){const o=google.maps.geometry.spherical.computeDistanceBetween(t,a);o>=n||(i=a,n=o)}return{shortestPlace:i,shortestDistance:n}},po=t=>{const{pointRef:e,getRecomendPlace:n,getLimit:i,context:a,onChange:o,onChangePlace:r,onChangeCity:c}=t,l=s.ref(!0),g=s.ref([]),{idx:m,update:u}=X(),{readyPromise:d}=L(),{place:M,updatePlace:I,setPlace:f,updateCity:y}=mn({pointRef:e,onChange:r,onChangeCity:c}),p=s.reactive({...M}),v=s.computed(()=>{const j=e.value;return g.value.some(N=>Bt(D(N),j))});return s.watch(()=>m.value,async()=>{await d;const j=await n({...M},a);if(j===void 0){l.value=!1,g.value=[],Object.assign(p,{...M}),o==null||o({...M});return}const{shortestPlace:N,shortestDistance:x}=fo(M,j),w=i(a),C=x>w?M:N;l.value=!0,g.value=j,Object.assign(p,{...C}),o==null||o({...C})}),{recomendPlace:p,placeCandidates:g,availableRef:l,isElectedRef:v,updateRecomandPlace:u,updatePlace:I,setPlace:f,updateCity:y}},yo=t=>{const{pointRef:e,getRecomendPlace:n,getLimit:i,context:a,onChange:o,onChangePlace:r,onChangeCity:c}=t,l=s.ref(!0),g=s.ref([]),{idx:m,update:u}=X(),{readyPromise:d}=L(),{place:M,updatePlace:I,setPlace:f,updateCity:y}=In({pointRef:e,onChange:r,onChangeCity:c}),p=s.reactive({...M}),v=s.computed(()=>{const j=e.value;return g.value.some(N=>Bt(D(N),j))});return s.watch(()=>m.value,async()=>{await d;const j=await n({...M},a);if(j===void 0){l.value=!1,g.value=[],Object.assign(p,{...M}),o==null||o({...M});return}const{shortestPlace:N,shortestDistance:x}=vo(M,j),w=i(a),C=x>w?M:N;l.value=!0,g.value=j,Object.assign(p,{...C}),o==null||o({...C})}),{recomendPlace:p,placeCandidates:g,availableRef:l,isElectedRef:v,updateRecomandPlace:u,updatePlace:I,setPlace:f,updateCity:y}},fn=t=>{const{supplier:e}=L();return e==="gmap"?yo(t):po(t)},ho=t=>{const{interval:e}=t;let n;const i={promise:Promise.resolve(),resolve:void 0};return{timerStart:()=>{var o;n&&clearTimeout(n),(o=i.resolve)==null||o.call(i),i.promise=new Promise(r=>{i.resolve=r,n=setTimeout(r,e)})},timerStop:i}},vn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjEiIGhlaWdodD0iNjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxmaWx0ZXIgeD0iLTcuMSUiIHk9Ii03LjElIiB3aWR0aD0iMTE0LjMlIiBoZWlnaHQ9IjExNC4zJSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19hIj48ZmVPZmZzZXQgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249Ii41IiBpbj0ic2hhZG93T2Zmc2V0T3V0ZXIxIiByZXN1bHQ9InNoYWRvd0JsdXJPdXRlcjEiLz48ZmVDb21wb3NpdGUgaW49InNoYWRvd0JsdXJPdXRlcjEiIGluMj0iU291cmNlQWxwaGEiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIvPjxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNzc0NTMwMTYgMCIgaW49InNoYWRvd0JsdXJPdXRlcjEiLz48L2ZpbHRlcj48Y2lyY2xlIGlkPSJwcmVmaXhfX2IiIGN4PSIzMCIgY3k9IjMwIiByPSIxMC41Ii8+PC9kZWZzPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC40MDUgLjI2NCkiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGNpcmNsZSBzdHJva2Utb3BhY2l0eT0iLjEiIHN0cm9rZT0iIzAwM0RGRiIgZmlsbC1vcGFjaXR5PSIuMTUiIGZpbGw9IiM0ODczRkUiIGN4PSIzMCIgY3k9IjMwIiByPSIyOS41Ii8+PHVzZSBmaWxsPSIjMDAwIiBmaWx0ZXI9InVybCgjcHJlZml4X19hKSIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjxjaXJjbGUgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIuNCIgc3Ryb2tlLWxpbmVqb2luPSJzcXVhcmUiIGZpbGw9IiM0ODcxRjEiIGN4PSIzMCIgY3k9IjMwIiByPSI5LjMiLz48L2c+PC9zdmc+";var pn=F({defaultClassName:"_1l6offo0",variantClassNames:{size:{small:"_1l6offo1",large:"_1l6offo2"}},defaultVariants:{},compoundVariants:[]});const jo=h(function(e){S(e,"APassengerCircle");const n=s.computed(()=>{const{size:i="large"}=e;return`
|
|
49
|
+
<img src="${i==="large"?vn:O}" class="${pn({size:i})}">
|
|
50
|
+
`});return()=>s.h(k,{attrs:{position:e.position,content:n.value,anchor:"bottom-center",registerOverlay:e.registerOverlay}})}),Ao=h(function(e){S(e,"GPassengerCircle");const n=s.computed(()=>{const{size:i="large"}=e,a=i==="large"?vn:O;return b("img",{class:pn({size:i}),src:a})});return()=>s.h(G,{attrs:{position:P(e.position),content:n.value,registerOverlay:e.registerOverlay}})}),Me=h(function(e){const n=L();return()=>z(n.supplier==="gmap"?Ao:jo,{attrs:e})}),Lo=()=>{const t=ie();return{apiMapLngLatToVw:n=>{var i;return(i=t==null?void 0:t.value)==null?void 0:i.lngLatToContainer(n).toArray()}}},So=()=>{const t=ae();return{apiMapLngLatToVw:n=>{var u,d,M,I,f;const[i,a]=n,o=(u=t==null?void 0:t.value)==null?void 0:u.getProjection(),r=o==null?void 0:o.fromLatLngToPoint({lng:i,lat:a}),c=(d=r==null?void 0:r.x)!=null?d:0,l=(M=r==null?void 0:r.y)!=null?M:0,m=2**((f=(I=t==null?void 0:t.value)==null?void 0:I.getZoom())!=null?f:0);return[c*m,l*m]}}},No=()=>{const{supplier:t}=L();return t==="gmap"?So():Lo()},ut=t=>t==="left"?"right":"left",wo=t=>{const{widthLimit:e,heightLimit:n}=t,{apiMapLngLatToVw:i}=No(),a=(r,c)=>{const l=100/window.innerWidth,[g,m]=i(r),[u,d]=i(c);return[(u-g)*l,(d-m)*l]},o=s.ref(Array(t.places.length).fill("right"));return Na(()=>t.places.map(D),r=>{const c=r.map((d,M)=>({point:d,index:M})).sort(({point:[,d]},{point:[,M]})=>d<M?1:d>M?-1:0),l=r.length,g=Array(l);let m="right",u=!1;for(let d=0;d<l;d++){const{index:M}=c[d];if(d===l-1){g[M]=u?ut(m):"right";continue}if(d===0){const[p,v]=a(c[d].point,c[d+1].point);u=p>-e&&p<e&&v>-n&&v<n;const j=u&&p>0?"left":"right";g[M]=j,m=j;continue}const[I,f]=a(c[d].point,c[d+1].point),y=u?ut(m):"right";g[M]=y,m=y,u=I>-e&&I<e&&f>-n&&f<n}o.value=g}),o};var Pe=(t=>(t.topLeft="top-left",t.topCenter="top-center",t.topRight="top-right",t.middleLeft="middle-left",t.center="center",t.middleRight="middle-right",t.bottomLeft="bottom-left",t.bottomCenter="bottom-center",t.bottomRight="bottom-right",t))(Pe||{});var lt=F({defaultClassName:"",variantClassNames:{textAlign:{left:"fhyw83",right:"fhyw84"}},defaultVariants:{},compoundVariants:[]}),dt=F({defaultClassName:"fhyw85",variantClassNames:{textAlign:{left:"fhyw86",right:"fhyw87"}},defaultVariants:{},compoundVariants:[]}),yn="fhyw8b",hn=F({defaultClassName:"fhyw80",variantClassNames:{textAlign:{left:"fhyw81",right:"fhyw82"}},defaultVariants:{},compoundVariants:[]}),pe=F({defaultClassName:"fhyw88",variantClassNames:{hideIcon:{true:"fhyw89",false:"fhyw8a"}},defaultVariants:{},compoundVariants:[]});const Do=h(function(e,{emit:n}){S(e,"APlaceCircle");const i=s.computed(()=>{var c;return(c=e.textAlign)!=null?c:"right"}),a=s.computed(()=>{const{hideIcon:c=!1}=e;return`
|
|
51
|
+
<div class="${hn({textAlign:i.value})}">
|
|
52
|
+
<img class="${pe({hideIcon:c})} ${lt({textAlign:i.value})}" src="${O}">
|
|
53
|
+
<div class="${yn}">${e.label}</div>
|
|
54
54
|
</div>
|
|
55
|
-
`}),o=s.computed(()=>{const{hideIcon:c=!1}=e;return`<img class="${pe({hideIcon:c})} ${
|
|
55
|
+
`}),o=s.computed(()=>{const{hideIcon:c=!1}=e;return`<img class="${pe({hideIcon:c})} ${lt({textAlign:i.value})}" src="${O}">`}),r=c=>{console.log("on amap marker e = ",c),n("click",e.position)};return()=>s.h(k,{attrs:{position:e.position,content:e.label?a.value:o.value,anchor:i.value==="left"?Pe.middleRight:Pe.middleLeft},on:{click:r}})}),Co=h(function(e,{emit:n}){S(e,"GPlaceCircle");const i=s.computed(()=>{var c;return(c=e.textAlign)!=null?c:"right"}),a=s.computed(()=>{const{hideIcon:c=!1}=e;return b("div",{class:`${hn({textAlign:i.value})} ${dt({textAlign:i.value})}`},`
|
|
56
56
|
<img class="${pe({hideIcon:c})}" src="${O}">
|
|
57
|
-
<div class="${
|
|
58
|
-
`)}),o=s.computed(()=>{const{hideIcon:c=!1}=e;return b("img",{class:`${pe({hideIcon:c})} ${ut({textAlign:i.value})}`,src:O})}),r=c=>{console.log("on gmap advanced marker view e = ",c),n("click",e.position)};return()=>s.h(k,{attrs:{position:x(e.position),content:e.label?a.value:o.value},on:{click:r}})}),E=h(function(e,{emit:n}){const i=A();return()=>z(i.supplier==="gmap"?wo:No,{attrs:e,on:{click:a=>n("click",a)}})}),hn=h(function(e,{emit:n}){S(e,"PickupPoints");const{renderLabel:i}=e,a=So(s.reactive({places:s.toRef(e,"places"),heightLimit:9,widthLimit:32}));return()=>s.h("div",[e.places.map((o,r)=>{const c=a.value[r],l=i?i(o):o.name;return s.h(E,{attrs:{position:D(o),label:l,textAlign:c},on:{click:()=>n("click",o)}})})])}),Do=30,Co=500,xo=te((t,{emit:e})=>{var Oe,Ge;S(t,"BusinessRecomendPlaceMap");const{geoDefaultPosition:n,getRecomendPlace:i,mapContext:a}=t,{mapRef:o,setMap:r}=de(),{readyPromise:c}=A(),{timerStart:l,timerStop:g}=po({interval:Co}),M=s.reactive({lng:(Oe=n==null?void 0:n[0])!=null?Oe:0,lat:(Ge=n==null?void 0:n[1])!=null?Ge:0,name:""}),u=s.computed(()=>[M.lng,M.lat]),d={source:"geo"},I=L=>{d.source="api",N(L)},m=L=>{d.source="api",P(L),w(L),C()},f=L=>{d.source="api",M.lng=L.lng,M.lat=L.lat,M.name=L.name},{geoPosition:p,geoError:y,geoLoading:v}=le({geoDefaultPosition:n,onLoad:async L=>{await c,d.source="geo",N(L.position),e("loadGeoLocation",L)},onLoadDefault:async L=>{await c,d.source="geo",N(L.position),e("loadDefaultGeoLocation",L)},onChange:L=>e("changeGeoLocation",L),onError:L=>e("geoError",L)});a.setCenterPlaceByUserSpecified=m,a.panToGeoPositionByRecomend=()=>y.value?!1:(I(p.value),!0);const{isDragging:j}=gn({mapRef:o,onChange:L=>{d.source="drag",l(),N(L),e("changeByDrag",L)}}),{updatePlace:N,setPlace:P,updateCity:w,updateRecomandPlace:C,placeCandidates:R,availableRef:Z,isElectedRef:Cn}=mn({pointRef:u,context:d,getRecomendPlace:i,getLimit:L=>{const Me=L==null?void 0:L.source;switch(Me){case"drag":case"api":return Do;case"geo":case"default":return 1/0;default:throw new Error(`MyError: should not call getLimit on source: ${Me}`)}},onChangePlace:L=>{d.source!=="recomend"&&C(),e("changePlace",L)},onChange:async L=>{await g.promise,d.source="recomend",Object.assign(M,{...L}),e("changeRecomandPlace",L)},onChangeCity:L=>{e("changeCity",L)}});return s.watchEffect(()=>{a.onChangeCenterPlace({...M})}),s.watchEffect(()=>{a.onChangeRecomendPlaces([...R.value])}),()=>{const L=v.value?t.geoLoadingTitle:Z.value?M.name:t.unavailableTitle,Me=!Z.value||v.value?void 0:Cn.value?t.recomendDescription:t.noRecomendDescription;return s.h(re,{attrs:{center:u.value,zoom:18,mapRef:r,log:t.log}},[!y.value&&s.h(ge,{attrs:{position:p.value}}),s.h(hn,{attrs:{places:R.value,renderLabel:ke=>La(ke,M)?void 0:ke.name,log:t.log},on:{click:f}}),s.h(bt,{attrs:{title:L,description:Me,type:j.value?"locator":"box",log:t.log},on:{click:()=>e("clickLocator")}})])}}).props(["log","geoLoadingTitle","unavailableTitle","recomendDescription","noRecomendDescription","fallback","geoDefaultPosition","getRecomendPlace","loading","mapContext"]),Po=[116.2317,39.5427],lt=t=>t.lng!==void 0&&t.lat!==void 0,ye="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0zNC4wODcgMTAuOTZjMCAyLjM2OS0uMDU0IDIuOTgtLjc4MiAzLjcwNC0uNzkzLjc5LTUuMjM2LjgzMy01LjIzNi44MzNsLTQuMTE2LjE5Mi05Ljg5Ni0uMTQ0cy03Ljc5LS4wMjYtOS4xMzEtLjAy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yLjY3MyAyMi42NzMgMCAwMC0uMzAzIDIuNTJjLS4xNDcgMi44ODQuMDIgMy4zMTQuMjMyIDUuMDQ4LjAwNi4wNTcuMDI2LjE1Mi4wNTYuMjc0LTEuNTEzLjI3OC0zIC41NC00LjkxMi41NC0xLjg0NyAwLTMuMjg5LS4yNS00Ljc1LS41MTF2LS4wMDhjLjAzLS4xMzEuMDU1LS4yMzMuMDYtLjI5LjIxOC0xLjc0NC4zOC0yLjE3My4yMzMtNS4wNTN6IiBmaWxsPSIjRjJGQUZGIi8+PHBhdGggZD0iTTEyLjA2NyAxOS43MTZsLTQuNjQ1LjY5MmMtLjQzMS0yLjkyLS44MzItNC4zNi0xLjIwMi00LjMyNGwtLjIxLTEuMjk3YTExLjczMiAxMS43MzIgMCAwMTYuMDI2LTEuNjczYy4zODYgMC0uMTM3LjA1LTEuNTY5LjE0N2wxLjYgNi40NTV6IiBmaWxsPSIjMTYxNjE2Ii8+PC9nPjwvZz48L3N2Zz4=";var he="_65j3sr1",jn="_4a4ovk5",An="_4a4ovk0",Ln="_4a4ovk2";const bo=h(function(e){S(e,"ATaxiCar");const n=s.computed(()=>{var o;const i=e.title?Le(e.title).map(r=>r.type==="normal"?r.value:`<span class="${jn}">${r.value}</span>`).join(""):"",a=`transform:rotate(${(o=e.angle)!=null?o:0}deg)`;return e.title?`
|
|
59
|
-
<div class="${
|
|
60
|
-
<div class="${
|
|
57
|
+
<div class="${yn}">${e.label}</div>
|
|
58
|
+
`)}),o=s.computed(()=>{const{hideIcon:c=!1}=e;return b("img",{class:`${pe({hideIcon:c})} ${dt({textAlign:i.value})}`,src:O})}),r=c=>{console.log("on gmap advanced marker view e = ",c),n("click",e.position)};return()=>s.h(G,{attrs:{position:P(e.position),content:e.label?a.value:o.value},on:{click:r}})}),E=h(function(e,{emit:n}){const i=L();return()=>z(i.supplier==="gmap"?Co:Do,{attrs:e,on:{click:a=>n("click",a)}})}),jn=h(function(e,{emit:n}){S(e,"PickupPoints");const{renderLabel:i}=e,a=wo(s.reactive({places:s.toRef(e,"places"),heightLimit:9,widthLimit:32}));return()=>s.h("div",[e.places.map((o,r)=>{const c=a.value[r],l=i?i(o):o.name;return s.h(E,{attrs:{position:D(o),label:l,textAlign:c},on:{click:()=>n("click",o)}})})])}),xo=30,Po=500,bo=ne((t,{emit:e})=>{var Ge,We;S(t,"BusinessRecomendPlaceMap");const{geoDefaultPosition:n,getRecomendPlace:i,mapContext:a}=t,{mapRef:o,setMap:r}=ge(),{readyPromise:c,supplier:l}=L(),{timerStart:g,timerStop:m}=ho({interval:Po}),u=s.reactive({lng:(Ge=n==null?void 0:n[0])!=null?Ge:0,lat:(We=n==null?void 0:n[1])!=null?We:0,name:""}),d=s.computed(()=>[u.lng,u.lat]),M={source:"geo"},I=A=>{M.source="api",x(A)},f=A=>{M.source="api",w(A),C(A),R()},y=A=>{M.source="api",u.lng=A.lng,u.lat=A.lat,u.name=A.name},{geoPosition:p,geoError:v,geoLoading:j}=de({geoDefaultPosition:n,onLoad:async A=>{await c,M.source="geo",x(A.position),e("loadGeoLocation",A)},onLoadDefault:async A=>{await c,M.source="geo",x(A.position),e("loadDefaultGeoLocation",A)},onChange:A=>e("changeGeoLocation",A),onError:A=>e("geoError",A)});a.setCenterPlaceByUserSpecified=f,a.panToGeoPositionByRecomend=()=>v.value?!1:(I(p.value),!0);const{isDragging:N}=Mn({mapRef:o,onChange:A=>{M.source="drag",g(),x(A),e("changeByDrag",A)}}),{updatePlace:x,setPlace:w,updateCity:C,updateRecomandPlace:R,placeCandidates:Z,availableRef:ke,isElectedRef:xn}=fn({pointRef:d,context:M,getRecomendPlace:i,getLimit:A=>{const $=A==null?void 0:A.source;switch($){case"drag":case"api":return xo;case"geo":case"default":return 1/0;default:throw new Error(`MyError: should not call getLimit on source: ${$}`)}},onChangePlace:A=>{M.source!=="recomend"&&R(),e("changePlace",A)},onChange:async A=>{await m.promise,M.source="recomend",Object.assign(u,{...A}),e("changeRecomandPlace",A)},onChangeCity:A=>{e("changeCity",A)}});return s.watchEffect(()=>{a.onChangeCenterPlace({...u})}),s.watchEffect(()=>{a.onChangeRecomendPlaces([...Z.value])}),()=>{const A=j.value?t.geoLoadingTitle:ke.value?u.name:t.unavailableTitle,$=!ke.value||j.value?void 0:xn.value?t.recomendDescription:t.noRecomendDescription;return s.h(se,{attrs:{center:d.value,zoom:18,mapRef:r,renderOverlay:()=>l==="gmap"?s.h(Ce,{attrs:{title:A,description:$,type:N.value?"locator":"box",log:t.log},on:{click:()=>e("clickLocator")}}):null,log:t.log}},[!v.value&&s.h(Me,{attrs:{position:p.value}}),s.h(jn,{attrs:{places:Z.value,renderLabel:Ue=>Sa(Ue,u)?void 0:Ue.name,log:t.log},on:{click:y}}),l==="amap"&&s.h(Ce,{attrs:{title:A,description:$,type:N.value?"locator":"box",log:t.log},on:{click:()=>e("clickLocator")}})])}}).props(["log","geoLoadingTitle","unavailableTitle","recomendDescription","noRecomendDescription","fallback","geoDefaultPosition","getRecomendPlace","loading","mapContext"]),To=[116.2317,39.5427],gt=t=>t.lng!==void 0&&t.lat!==void 0,ye="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0zNC4wODcgMTAuOTZjMCAyLjM2OS0uMDU0IDIuOTgtLjc4MiAzLjcwNC0uNzkzLjc5LTUuMjM2LjgzMy01LjIzNi44MzNsLTQuMTE2LjE5Mi05Ljg5Ni0uMTQ0cy03Ljc5LS4wMjYtOS4xMzEtLjAyNmMtMS4zNDIgMC0yLjQwNi0uODQ3LTIuNDA2LS44NDdDLjE0IDEyLjkzMiAwIDExLjA5IDAgMTEuMDlWNS44NnMuMTQtMS44NDIgMi41Mi0zLjU4M2MwIDAgMS4wNjQtLjg0NiAyLjQwNi0uODQ2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g0NyAwLTMuMjg5LS4yNS00Ljc1LS41MTF2LS4wMDhjLjAzLS4xMzEuMDU1LS4yMzMuMDYtLjI5LjIxOC0xLjc0NC4zOC0yLjE3My4yMzMtNS4wNTN6IiBmaWxsPSIjRjJGQUZGIi8+PHBhdGggZD0iTTEyLjA2NyAxOS43MTZsLTQuNjQ1LjY5MmMtLjQzMS0yLjkyLS44MzItNC4zNi0xLjIwMi00LjMyNGwtLjIxLTEuMjk3YTExLjczMiAxMS43MzIgMCAwMTYuMDI2LTEuNjczYy4zODYgMC0uMTM3LjA1LTEuNTY5LjE0N2wxLjYgNi40NTV6IiBmaWxsPSIjMTYxNjE2Ii8+PC9nPjwvZz48L3N2Zz4=";var he="_65j3sr1",An="_4a4ovk5",Ln="_4a4ovk0",Sn="_4a4ovk2";const Ro=h(function(e){S(e,"ATaxiCar");const n=s.computed(()=>{var o;const i=e.title?Le(e.title).map(r=>r.type==="normal"?r.value:`<span class="${An}">${r.value}</span>`).join(""):"",a=`transform:rotate(${(o=e.angle)!=null?o:0}deg)`;return e.title?`
|
|
59
|
+
<div class="${Ln}">
|
|
60
|
+
<div class="${Sn}">${i}</div>
|
|
61
61
|
<img src="${ye}" class="${he}" style="${a}">
|
|
62
62
|
</div>
|
|
63
|
-
`:`<img src="${ye}" class="${he}" style="${a}">`});return()=>s.h(
|
|
64
|
-
<div class="${
|
|
63
|
+
`:`<img src="${ye}" class="${he}" style="${a}">`});return()=>s.h(k,{attrs:{position:e.position,content:n.value,anchor:"bottom-center",registerOverlay:e.registerOverlay}})}),Eo=h(function(e){S(e,"GTaxiCar");const n=s.computed(()=>{var o;const i=e.title?Le(e.title).map(r=>r.type==="normal"?r.value:`<span class="${An}">${r.value}</span>`).join(""):"",a=`transform:rotate(${(o=e.angle)!=null?o:0}deg)`;return e.title?b("div",{class:Ln},`
|
|
64
|
+
<div class="${Sn}">${i}</div>
|
|
65
65
|
<img src="${ye}" class="${he}" style="${a}">
|
|
66
|
-
`):b("img",{class:he,src:ye,style:a})});return()=>s.h(
|
|
66
|
+
`):b("img",{class:he,src:ye,style:a})});return()=>s.h(G,{attrs:{position:P(e.position),content:n.value,registerOverlay:e.registerOverlay}})}),Se=h(function(e){const n=L();return()=>z(n.supplier==="gmap"?Eo:Ro,{attrs:e})}),zo=h(function(e){return S(e,"AWalkingLine"),()=>{const{path:n}=e;if(n.length===0)return null;const a=2*(window.innerWidth*.01);return s.h(K,{attrs:{path:n,strokeWeight:a,strokeOpacity:1,strokeColor:"#38A3FE",strokeStyle:"dashed",strokeDasharray:[a,a*1.5],lineJoin:"round",lineCap:"round"}})}}),Zo=h(function(e){S(e,"GWalkingLine");const n=s.computed(()=>e.path.map(P));return()=>{const i=n.value;if(i.length===0)return null;const o=2*(window.innerWidth*.01),r=o/4;return s.h(Ie,{attrs:{path:i,strokeWeight:o,strokeOpacity:1,strokeColor:"transparent",icons:[{icon:{path:`
|
|
67
67
|
M ${r}, ${r}
|
|
68
68
|
m -${r}, 0
|
|
69
69
|
a ${r},${r} 0 1,0 ${2*r},0
|
|
70
70
|
a ${r},${r} 0 1,0 -${2*r},0
|
|
71
|
-
`,strokeColor:"#38A3FE",fillColor:"#38A3FE",fillOpacity:1,strokeOpacity:1,strokeWeight:o/2,scale:1},repeat:`${o*2}px`}]}})}}),ze=h(function(e){const n=A();return()=>z(n.supplier==="gmap"?Eo:Ro,{attrs:e})}),Sn=t=>{const e=s.shallowRef([]),n=new AMap.Walking({});return J(()=>({...t}),({from:i,to:a})=>{n.search(AMap.LngLat.from(i),AMap.LngLat.from(a),(o,r)=>{switch(o){case"complete":{let c=[];const l=r;if(!l.routes)return;const g=l.routes[0];for(const M of g.steps){const u=M.path.map(({lng:d,lat:I})=>[d,I]);c=c.concat(u)}e.value=c;return}case"no_data":e.value=[];return;default:throw r}})}),e},Nn=t=>{const e=s.shallowRef([]),n=new google.maps.DirectionsService;return J(()=>({...t}),({from:i,to:a})=>{n.route({origin:{lng:i[0],lat:i[1]},destination:{lng:a[0],lat:a[1]},travelMode:google.maps.TravelMode.WALKING},(o,r)=>{switch(r){case google.maps.DirectionsStatus.OK:{let c=[];const g=o.routes[0].overview_path.map(M=>[M.lng(),M.lat()]);c=c.concat(g),e.value=c;return}case google.maps.DirectionsStatus.ZERO_RESULTS:case google.maps.DirectionsStatus.NOT_FOUND:e.value=[];return;default:throw new Error(r)}})}),e},zo=t=>{const{supplier:e}=A();return e==="gmap"?Nn(t):Sn(t)},Zo=h(function(e,{slots:n}){S(e,"AWalkingRoute");const i=Sn(e);return()=>{var a;return s.h("div",[(a=n.render)==null?void 0:a.call(n,s.reactive({path:i}))])}}),Oo=h(function(e,{slots:n}){S(e,"GWalkingRoute");const i=Nn(e);return()=>{var a;return s.h("div",[(a=n.render)==null?void 0:a.call(n,s.reactive({path:i}))])}}),Ze=h(function(e,{slots:n}){const{supplier:i}=A();return()=>z(i==="gmap"?Oo:Zo,{attrs:e,scopedSlots:n})}),je="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTE5IiBoZWlnaHQ9IjExOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cmFkaWFsR3JhZGllbnQgY3g9IjUwJSIgY3k9IjUwJSIgZng9IjUwJSIgZnk9IjUwJSIgcj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ0NzFGRiIgb2Zmc2V0PSIxMDAlIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PGNpcmNsZSBjeD0iMTkxLjM5NCIgY3k9IjIzOCIgcj0iNTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzIgLTE3OSkiIGZpbGw9InVybCgjcHJlZml4X19hKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvcGFjaXR5PSIuMiIvPjwvc3ZnPg==";var wn="rrvp0y3",Ae="rrvp0y2";const Go=h(function(e){S(e,"AWaveCircle");const n=s.computed(()=>`<img src="${je}" class="${Ae}">`),i=s.computed(()=>`<img src="${je}" class="${Ae} ${wn}">`);return()=>s.h("div",[s.h(G,{attrs:{position:e.position,anchor:"bottom-center",content:n.value}}),s.h(G,{attrs:{position:e.position,anchor:"bottom-center",content:i.value}})])}),ko=h(function(e){S(e,"GWaveCircle");const n=s.computed(()=>b("img",{class:Ae,src:je})),i=s.computed(()=>b("img",{class:`${Ae} ${wn}`,src:je}));return()=>{const a=x(e.position);return s.h("div",[s.h(k,{attrs:{position:a,content:n.value}}),s.h(k,{attrs:{position:a,content:i.value}})])}}),Dn=h(function(e){const n=A();return()=>z(n.supplier==="gmap"?ko:Go,{attrs:e})}),Wo=["book-driverStartService","dispatched","driverStartService","inService","driverArrived"],dt=h((t,{emit:e})=>(S(t,"SectionDispatching"),W(()=>e("mapMounted")),()=>{const{from:n,title:i,registerOverlay:a}=t,o=D(n);return s.h("div",[s.h(T,{attrs:{type:"start",position:o,title:i,registerOverlay:a,log:t.log}}),s.h(Dn,{attrs:{position:o,log:t.log}}),s.h(E,{attrs:{position:o,label:n.name,hideIcon:!0,log:t.log}})])})),Uo=h((t,{emit:e})=>(S(t,"SectionDriverStartService"),W(()=>e("mapMounted")),()=>{const{from:n,carPosition:i,passengerPosition:a,renderTitle:o,registerOverlay:r}=t,c=D(n);return s.h("div",[s.h(T,{attrs:{type:"start",position:c,registerOverlay:r,log:t.log}}),s.h(E,{attrs:{position:c,label:n.name,hideIcon:!0,log:t.log}}),s.h(ce,{attrs:{from:i,to:c,log:t.log,render:({path:l,distance:g,duration:M})=>[s.h(se,{attrs:{path:l,log:t.log}}),s.h(Se,{attrs:{position:i,title:o({distance:g,duration:M}),log:t.log}})]}}),s.h(Ze,{attrs:{from:a,to:c,log:t.log,render:({path:l})=>s.h(ze,{attrs:{path:l,log:t.log}})}}),s.h(ge,{attrs:{position:a,registerOverlay:r,log:t.log}})])})),Bo=h((t,{emit:e})=>(S(t,"SectionBookDispatched"),W(()=>e("mapMounted")),()=>{const{from:n,passengerPosition:i,title:a,registerOverlay:o}=t,r=D(n);return s.h("div",[s.h(T,{attrs:{type:"start",position:r,title:a,registerOverlay:o,log:t.log}}),s.h(E,{attrs:{position:r,label:n.name,hideIcon:!0,log:t.log}}),s.h(ge,{attrs:{position:i,registerOverlay:o,log:t.log}})])})),Vo=h((t,{emit:e})=>(S(t,"SectionDriverArrived"),W(()=>e("mapMounted")),()=>{const{from:n,carPosition:i,passengerPosition:a,title:o,registerOverlay:r}=t,c=D(n);return s.h("div",[s.h(Se,{attrs:{position:i,title:o,registerOverlay:r,log:t.log}}),s.h(T,{attrs:{type:"start",position:c,registerOverlay:r,log:t.log}}),s.h(E,{attrs:{position:c,label:n.name,hideIcon:!0,log:t.log}}),s.h(Ze,{attrs:{from:a,to:c,log:t.log,render:({path:l})=>s.h(ze,{attrs:{path:l}})}}),s.h(ge,{attrs:{position:a,size:"small",registerOverlay:r,log:t.log}})])})),Yo=h((t,{emit:e})=>(S(t,"SectionInService"),W(()=>e("mapMounted")),()=>{const{to:n,carPosition:i,renderTitle:a,registerOverlay:o}=t,r=D(n);return s.h("div",[s.h(T,{attrs:{type:"end",position:r,registerOverlay:o,log:t.log}}),s.h(E,{attrs:{position:i,label:"'WebSter Dental Plaza'",hideIcon:!0,log:t.log}}),s.h(ce,{attrs:{from:i,to:r,log:t.log,render:({path:c,distance:l,duration:g})=>[s.h(se,{attrs:{path:c,log:t.log}}),s.h(Se,{attrs:{position:i,title:a({distance:l,duration:g}),registerOverlay:o,log:t.log}})]}})])})),Ho=h((t,{emit:e})=>(S(t,"SectionCanceled"),W(()=>e("mapMounted")),()=>{const{from:n,to:i,registerOverlay:a}=t,o=D(n),r=D(i);return s.h("div",[s.h(T,{attrs:{type:"start",position:o,registerOverlay:a,log:t.log}}),s.h(T,{attrs:{type:"end",position:r,registerOverlay:a,log:t.log}}),s.h(E,{attrs:{position:o,label:n.name,hideIcon:!0,log:t.log}}),s.h(E,{attrs:{position:r,label:i.name,hideIcon:!0,log:t.log}})])})),Pe=h((t,{emit:e})=>(S(t,"SectionEndService"),W(()=>e("mapMounted")),()=>{const{from:n,to:i,registerOverlay:a}=t,o=D(n),r=D(i);return s.h("div",[s.h(T,{attrs:{type:"start",position:o,registerOverlay:a,log:t.log}}),s.h(T,{attrs:{type:"end",position:r,registerOverlay:a,log:t.log}}),s.h(E,{attrs:{position:o,label:n.name,hideIcon:!0,log:t.log}}),s.h(E,{attrs:{position:r,label:i.name,hideIcon:!0,log:t.log}}),s.h(ce,{attrs:{from:o,to:r,render:({path:c})=>s.h(se,{attrs:{path:c,done:!0,log:t.log}}),log:t.log}})])})),Qo=te(t=>{S(t,"BusinessTaxiServiceMap");const{from:e,interval:n,registerOverlay:i,mapRef:a,getDriverPosition:o,renderStartSerivceTitle:r,renderInServiceTitle:c}=t,{setFitView:l}=i,{geoPosition:g}=le({geoDefaultPosition:D(e)}),M=s.ref(D(t.from));return s.watch(()=>t.driverStatus,(u,d,I)=>{if(!Wo.includes(u))return;const m=setInterval(()=>{o().then(f=>M.value=f)},n);I(()=>clearInterval(m))},{immediate:!0}),()=>{const{driverStatus:u,from:d,to:I,dispatchingTitle:m,bookDispatchingTitle:f,bookDispatchedTitle:p,driverArrivedTitle:y}=t,v=M.value;return s.h(re,{attrs:{center:D(d),zoom:13,mapRef:a,log:t.log}},[u==="dispatching"?s.h(dt,{attrs:{from:d,title:m,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="book-dispatching"?s.h(dt,{attrs:{from:d,title:f,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="dispatched"||u==="driverStartService"||u==="book-driverStartService"?s.h(Uo,{attrs:{from:d,carPosition:v,passengerPosition:g.value,renderTitle:r,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="book-dispatched"?s.h(Bo,{attrs:{from:d,passengerPosition:g.value,title:p,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="inService"?s.h(Yo,{attrs:{to:I,carPosition:v,renderTitle:c,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="driverArrived"?s.h(Vo,{attrs:{from:d,carPosition:v,passengerPosition:g.value,title:y,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="canceled"||u==="canceling"?s.h(Ho,{attrs:{from:d,to:I,registerOverlay:i,log:t.log}}):u==="endService"||u==="completed"||u==="banlanceRefund"||u==="waitBanlanceRefund"||u==="rechargePayed"||u==="waitRechargePay"||u==="payed"||u==="waitpay"||u==="refund"||u==="confirmed"?s.h(Pe,{attrs:{from:d,to:I,registerOverlay:i,log:t.log},on:{mapMounted:l}}):s.h(Pe,{attrs:{from:d,to:I,registerOverlay:i,log:t.log},on:{mapMounted:l}})])}}).props(["log","bookDispatchedTitle","bookDispatchingTitle","dispatchingTitle","driverArrivedTitle","driverStatus","fallback","from","getDriverPosition","interval","loading","mapRef","renderInServiceTitle","renderStartSerivceTitle","to","registerOverlay"]),Jo=h(t=>{S(t,"BusinessTaxiEndMap");const{mapRef:e,setMap:n}=de(),{registerFitVeiw:i,setFitView:a}=ue({mapRef:e,autoFitTimeout:5e3,padding:[25,20,15,15]});return()=>{const{from:o,to:r}=t,c=lt(o)&<(r),l=c?D(o):[...Po],g=c?13:3;return s.h(re,{attrs:{center:l,zoom:g,mapRef:n,log:t.log}},[c&&s.h(Pe,{attrs:{from:o,to:r,registerOverlay:i,log:t.log},on:{mapMounted:a}})])}}),Fo=()=>{const t=A();return{apiMapDistance:(n,i)=>{if(t.status===ee.SUCCESS)return AMap.GeometryUtil.distance(n,i)}}},Xo=()=>{const t=A();return{apiMapDistance:(n,i)=>{if(t.status===ee.SUCCESS)return google.maps.geometry.spherical.computeDistanceBetween(x(n),x(i))}}},Ne=()=>{const{supplier:t}=A();return t==="gmap"?Xo():Fo()},$o=t=>{const{city:e}=t,n=s.ref(e);Da(t,"useAmapAutoComplete",n,"cityRef");const{readyPromise:i}=A(),{apiMapDistance:a}=Ne(),{geoPosition:o}=le(),r=s.ref(""),c=s.ref([]),{update:l,idx:g}=X(),M=d=>{n.value=d,l()},u=d=>{r.value=d,l()};return s.watch(()=>g.value,async()=>{if(!r.value)return;await i,new AMap.PlaceSearch({city:n.value.name}).search(r.value,(I,m)=>{const f=o.value;switch(I){case"complete":{c.value=m.poiList.pois.map(p=>{const{lat:y,lng:v}=p.location;return{lat:y,lng:v,name:p.name,description:p.address,distance:f?a(f,[v,y]):void 0}});return}case"no_data":c.value=[];return;default:throw m}})},{immediate:!0}),{setKeyword:u,setCity:M,autoCompletePlaces:c}},_o=t=>{const{city:e}=t,n=s.ref({...e}),{readyPromise:i}=A(),{apiMapDistance:a}=Ne(),{geoPosition:o}=le(),r=s.ref(""),c=s.ref([]),{update:l,idx:g}=X(),M=I=>{n.value=I,l()},u=I=>{r.value=I,l()},d=document.createElement("div");return s.watch(()=>g.value,async()=>{if(!r.value)return;await i,new google.maps.places.PlacesService(d).textSearch({query:r.value,bounds:n.value.bound},(m,f)=>{const p=o.value;switch(f){case google.maps.places.PlacesServiceStatus.OK:c.value=m.map(({geometry:y,name:v,formatted_address:j})=>{var w,C,R,Z;const N=(C=(w=y==null?void 0:y.location)==null?void 0:w.lng())!=null?C:0,P=(Z=(R=y==null?void 0:y.location)==null?void 0:R.lat())!=null?Z:0;return{lng:N,lat:P,name:v!=null?v:"",description:j!=null?j:"",distance:p?a(p,[N,P]):void 0}});return;case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:case google.maps.places.PlacesServiceStatus.NOT_FOUND:c.value=[];return}})}),{setKeyword:u,setCity:M,autoCompletePlaces:c}},Ko=t=>{const{supplier:e}=A();return e==="gmap"?_o(t):$o(t)},qo=t=>{var a;const{cityNameRef:e,onChange:n}=t,i=s.reactive({name:(a=e.value)!=null?a:""});return s.watch(()=>e.value,o=>{const r=o!=null?o:"";i.name=r,n==null||n({name:r})}),i},er=t=>{var o;const{cityNameRef:e,onChange:n}=t,{readyPromise:i}=A(),a=s.reactive({name:(o=e.value)!=null?o:"",bound:{east:0,north:0,south:0,west:0}});return s.watchEffect(async()=>{var u,d;const r=e.value;if(!r)return;await i;const c=new google.maps.Geocoder,{results:l}=await c.geocode({address:r,componentRestrictions:{administrativeArea:"administrative_area_level_1"},language:K});if(l.length!==1)throw new Error("MyError: multiple city found");const{geometry:g}=l[0],M=(d=(u=g.bounds)==null?void 0:u.toJSON())!=null?d:g.viewport.toJSON();a.name=r,a.bound=M,n==null||n({name:r,bound:M})}),a},tr=t=>{const{supplier:e}=A();return e==="gmap"?er(t):qo(t)},nr=t=>{const{cityNameRef:e}=t,n=tr({cityNameRef:e,onChange:c=>o(c)}),{autoCompletePlaces:i,setKeyword:a,setCity:o}=Ko({city:n,log:t.log});return{autoCompletePlaces:i,setKeyword:a,setCity:o,handleKeywordInput:c=>{const l=c.target;a(l.value)}}},ir=()=>{const{setMap:t,mapRef:e}=de(),{registerFitVeiw:n,setFitView:i}=ue({mapRef:e,padding:[25,20,15,15]});return{setMap:t,registerFitVeiw:n,setFitView:i}},ar=()=>{const t=s.reactive({lng:0,lat:0,name:""}),e=s.ref([]),{apiMapDistance:n}=Ne(),i=r=>o.panToGeoPositionByRecomend(r),a=r=>o.setCenterPlaceByUserSpecified(r),o={panToGeoPositionByRecomend:()=>{throw new Error("MyError: panToGeoPositionByRecomend used before assigned")},setCenterPlaceByUserSpecified:()=>{throw new Error("MyError: setCenterPlaceByRecomand used before assigned")},onChangeCenterPlace:r=>{Object.assign(t,{...r})},onChangeRecomendPlaces:r=>{e.value=[...r]}};return{mapContext:o,centerPlace:t,placeCandidates:e,panToGeoPositionByRecomend:i,setCenterPlaceByUserSpecified:a,apiMapDistance:n}},or=()=>{const{mapRef:t,setMap:e}=de(),{registerFitVeiw:n,setFitView:i}=ue({mapRef:t,autoFitTimeout:5e3,padding:[25,20,15,15]});return{setMap:e,registerFitVeiw:n,setFitView:i}};exports.AbsoluteAddressBox=bt;exports.AddressBox=Pa;exports.BusinessQuotingMap=ro;exports.BusinessRecomendPlaceMap=xo;exports.BusinessTaxiEndMap=Jo;exports.BusinessTaxiServiceMap=Qo;exports.DrivingLine=se;exports.DrivingRoute=ce;exports.HeycarMap=re;exports.MapProvider=Va;exports.PassengerCircle=ge;exports.PickupPoints=hn;exports.PlaceCircle=E;exports.StartEndPoint=T;exports.TaxiCar=Se;exports.WalkingLine=ze;exports.WalkingRoute=Ze;exports.WaveCircle=Dn;exports.useBusinessMapAutoComplete=nr;exports.useBusinessQuotingMap=ir;exports.useBusinessRecomendPlaceMap=ar;exports.useBusinessTaxiServiceMap=or;exports.useDrivingRoute=Qa;exports.useGeoLocation=le;exports.useHeycarMap=de;exports.useMapAngle=Fa;exports.useMapDrag=gn;exports.useMapFitView=ue;exports.useMapGeometry=Ne;exports.useMapPlace=Mo;exports.useMapRecomendPlace=mn;exports.useWalkingRoute=zo;
|
|
71
|
+
`,strokeColor:"#38A3FE",fillColor:"#38A3FE",fillOpacity:1,strokeOpacity:1,strokeWeight:o/2,scale:1},repeat:`${o*2}px`}]}})}}),Ze=h(function(e){const n=L();return()=>z(n.supplier==="gmap"?Zo:zo,{attrs:e})}),Nn=t=>{const e=s.shallowRef([]),n=new AMap.Walking({});return J(()=>({...t}),({from:i,to:a})=>{n.search(AMap.LngLat.from(i),AMap.LngLat.from(a),(o,r)=>{switch(o){case"complete":{let c=[];const l=r;if(!l.routes)return;const g=l.routes[0];for(const m of g.steps){const u=m.path.map(({lng:d,lat:M})=>[d,M]);c=c.concat(u)}e.value=c;return}case"no_data":e.value=[];return;default:throw r}})}),e},wn=t=>{const e=s.shallowRef([]),n=new google.maps.DirectionsService;return J(()=>({...t}),({from:i,to:a})=>{n.route({origin:{lng:i[0],lat:i[1]},destination:{lng:a[0],lat:a[1]},travelMode:google.maps.TravelMode.WALKING},(o,r)=>{switch(r){case google.maps.DirectionsStatus.OK:{let c=[];const g=o.routes[0].overview_path.map(m=>[m.lng(),m.lat()]);c=c.concat(g),e.value=c;return}case google.maps.DirectionsStatus.ZERO_RESULTS:case google.maps.DirectionsStatus.NOT_FOUND:e.value=[];return;default:throw new Error(r)}})}),e},Oo=t=>{const{supplier:e}=L();return e==="gmap"?wn(t):Nn(t)},ko=h(function(e,{slots:n}){S(e,"AWalkingRoute");const i=Nn(e);return()=>{var a;return s.h("div",[(a=n.render)==null?void 0:a.call(n,s.reactive({path:i}))])}}),Go=h(function(e,{slots:n}){S(e,"GWalkingRoute");const i=wn(e);return()=>{var a;return s.h("div",[(a=n.render)==null?void 0:a.call(n,s.reactive({path:i}))])}}),Oe=h(function(e,{slots:n}){const{supplier:i}=L();return()=>z(i==="gmap"?Go:ko,{attrs:e,scopedSlots:n})}),je="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTE5IiBoZWlnaHQ9IjExOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cmFkaWFsR3JhZGllbnQgY3g9IjUwJSIgY3k9IjUwJSIgZng9IjUwJSIgZnk9IjUwJSIgcj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ0NzFGRiIgb2Zmc2V0PSIxMDAlIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PGNpcmNsZSBjeD0iMTkxLjM5NCIgY3k9IjIzOCIgcj0iNTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzIgLTE3OSkiIGZpbGw9InVybCgjcHJlZml4X19hKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvcGFjaXR5PSIuMiIvPjwvc3ZnPg==";var Dn="rrvp0y3",Ae="rrvp0y2";const Wo=h(function(e){S(e,"AWaveCircle");const n=s.computed(()=>`<img src="${je}" class="${Ae}">`),i=s.computed(()=>`<img src="${je}" class="${Ae} ${Dn}">`);return()=>s.h("div",[s.h(k,{attrs:{position:e.position,anchor:"bottom-center",content:n.value}}),s.h(k,{attrs:{position:e.position,anchor:"bottom-center",content:i.value}})])}),Uo=h(function(e){S(e,"GWaveCircle");const n=s.computed(()=>b("img",{class:Ae,src:je})),i=s.computed(()=>b("img",{class:`${Ae} ${Dn}`,src:je}));return()=>{const a=P(e.position);return s.h("div",[s.h(G,{attrs:{position:a,content:n.value}}),s.h(G,{attrs:{position:a,content:i.value}})])}}),Cn=h(function(e){const n=L();return()=>z(n.supplier==="gmap"?Uo:Wo,{attrs:e})}),Bo=["book-driverStartService","dispatched","driverStartService","inService","driverArrived"],Mt=h((t,{emit:e})=>(S(t,"SectionDispatching"),W(()=>e("mapMounted")),()=>{const{from:n,title:i,registerOverlay:a}=t,o=D(n);return s.h("div",[s.h(T,{attrs:{type:"start",position:o,title:i,registerOverlay:a,log:t.log}}),s.h(Cn,{attrs:{position:o,log:t.log}}),s.h(E,{attrs:{position:o,label:n.name,hideIcon:!0,log:t.log}})])})),Vo=h((t,{emit:e})=>(S(t,"SectionDriverStartService"),W(()=>e("mapMounted")),()=>{const{from:n,carPosition:i,passengerPosition:a,renderTitle:o,registerOverlay:r}=t,c=D(n);return s.h("div",[s.h(T,{attrs:{type:"start",position:c,registerOverlay:r,log:t.log}}),s.h(E,{attrs:{position:c,label:n.name,hideIcon:!0,log:t.log}}),s.h(ue,{attrs:{from:i,to:c,log:t.log,render:({path:l,distance:g,duration:m})=>[s.h(ce,{attrs:{path:l,log:t.log}}),s.h(Se,{attrs:{position:i,title:o({distance:g,duration:m}),log:t.log}})]}}),s.h(Oe,{attrs:{from:a,to:c,log:t.log,render:({path:l})=>s.h(Ze,{attrs:{path:l,log:t.log}})}}),s.h(Me,{attrs:{position:a,registerOverlay:r,log:t.log}})])})),Yo=h((t,{emit:e})=>(S(t,"SectionBookDispatched"),W(()=>e("mapMounted")),()=>{const{from:n,passengerPosition:i,title:a,registerOverlay:o}=t,r=D(n);return s.h("div",[s.h(T,{attrs:{type:"start",position:r,title:a,registerOverlay:o,log:t.log}}),s.h(E,{attrs:{position:r,label:n.name,hideIcon:!0,log:t.log}}),s.h(Me,{attrs:{position:i,registerOverlay:o,log:t.log}})])})),Ho=h((t,{emit:e})=>(S(t,"SectionDriverArrived"),W(()=>e("mapMounted")),()=>{const{from:n,carPosition:i,passengerPosition:a,title:o,registerOverlay:r}=t,c=D(n);return s.h("div",[s.h(Se,{attrs:{position:i,title:o,registerOverlay:r,log:t.log}}),s.h(T,{attrs:{type:"start",position:c,registerOverlay:r,log:t.log}}),s.h(E,{attrs:{position:c,label:n.name,hideIcon:!0,log:t.log}}),s.h(Oe,{attrs:{from:a,to:c,log:t.log,render:({path:l})=>s.h(Ze,{attrs:{path:l}})}}),s.h(Me,{attrs:{position:a,size:"small",registerOverlay:r,log:t.log}})])})),Qo=h((t,{emit:e})=>(S(t,"SectionInService"),W(()=>e("mapMounted")),()=>{const{to:n,carPosition:i,renderTitle:a,registerOverlay:o}=t,r=D(n);return s.h("div",[s.h(T,{attrs:{type:"end",position:r,registerOverlay:o,log:t.log}}),s.h(E,{attrs:{position:i,label:"'WebSter Dental Plaza'",hideIcon:!0,log:t.log}}),s.h(ue,{attrs:{from:i,to:r,log:t.log,render:({path:c,distance:l,duration:g})=>[s.h(ce,{attrs:{path:c,log:t.log}}),s.h(Se,{attrs:{position:i,title:a({distance:l,duration:g}),registerOverlay:o,log:t.log}})]}})])})),Jo=h((t,{emit:e})=>(S(t,"SectionCanceled"),W(()=>e("mapMounted")),()=>{const{from:n,to:i,registerOverlay:a}=t,o=D(n),r=D(i);return s.h("div",[s.h(T,{attrs:{type:"start",position:o,registerOverlay:a,log:t.log}}),s.h(T,{attrs:{type:"end",position:r,registerOverlay:a,log:t.log}}),s.h(E,{attrs:{position:o,label:n.name,hideIcon:!0,log:t.log}}),s.h(E,{attrs:{position:r,label:i.name,hideIcon:!0,log:t.log}})])})),be=h((t,{emit:e})=>(S(t,"SectionEndService"),W(()=>e("mapMounted")),()=>{const{from:n,to:i,registerOverlay:a}=t,o=D(n),r=D(i);return s.h("div",[s.h(T,{attrs:{type:"start",position:o,registerOverlay:a,log:t.log}}),s.h(T,{attrs:{type:"end",position:r,registerOverlay:a,log:t.log}}),s.h(E,{attrs:{position:o,label:n.name,hideIcon:!0,log:t.log}}),s.h(E,{attrs:{position:r,label:i.name,hideIcon:!0,log:t.log}}),s.h(ue,{attrs:{from:o,to:r,render:({path:c})=>s.h(ce,{attrs:{path:c,done:!0,log:t.log}}),log:t.log}})])})),Fo=ne(t=>{S(t,"BusinessTaxiServiceMap");const{from:e,interval:n,registerOverlay:i,mapRef:a,getDriverPosition:o,renderStartSerivceTitle:r,renderInServiceTitle:c}=t,{setFitView:l}=i,{geoPosition:g}=de({geoDefaultPosition:D(e)}),m=s.ref(D(t.from));return s.watch(()=>t.driverStatus,(u,d,M)=>{if(!Bo.includes(u))return;const I=setInterval(()=>{o().then(f=>m.value=f)},n);M(()=>clearInterval(I))},{immediate:!0}),()=>{const{driverStatus:u,from:d,to:M,dispatchingTitle:I,bookDispatchingTitle:f,bookDispatchedTitle:y,driverArrivedTitle:p}=t,v=m.value;return s.h(se,{attrs:{center:D(d),zoom:13,mapRef:a,log:t.log}},[u==="dispatching"?s.h(Mt,{attrs:{from:d,title:I,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="book-dispatching"?s.h(Mt,{attrs:{from:d,title:f,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="dispatched"||u==="driverStartService"||u==="book-driverStartService"?s.h(Vo,{attrs:{from:d,carPosition:v,passengerPosition:g.value,renderTitle:r,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="book-dispatched"?s.h(Yo,{attrs:{from:d,passengerPosition:g.value,title:y,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="inService"?s.h(Qo,{attrs:{to:M,carPosition:v,renderTitle:c,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="driverArrived"?s.h(Ho,{attrs:{from:d,carPosition:v,passengerPosition:g.value,title:p,registerOverlay:i,log:t.log},on:{mapMounted:l}}):u==="canceled"||u==="canceling"?s.h(Jo,{attrs:{from:d,to:M,registerOverlay:i,log:t.log}}):u==="endService"||u==="completed"||u==="banlanceRefund"||u==="waitBanlanceRefund"||u==="rechargePayed"||u==="waitRechargePay"||u==="payed"||u==="waitpay"||u==="refund"||u==="confirmed"?s.h(be,{attrs:{from:d,to:M,registerOverlay:i,log:t.log},on:{mapMounted:l}}):s.h(be,{attrs:{from:d,to:M,registerOverlay:i,log:t.log},on:{mapMounted:l}})])}}).props(["log","bookDispatchedTitle","bookDispatchingTitle","dispatchingTitle","driverArrivedTitle","driverStatus","fallback","from","getDriverPosition","interval","loading","mapRef","renderInServiceTitle","renderStartSerivceTitle","to","registerOverlay"]),Xo=h(t=>{S(t,"BusinessTaxiEndMap");const{mapRef:e,setMap:n}=ge(),{registerFitVeiw:i,setFitView:a}=le({mapRef:e,autoFitTimeout:5e3,padding:[25,20,15,15]});return()=>{const{from:o,to:r}=t,c=gt(o)&>(r),l=c?D(o):[...To],g=c?13:3;return s.h(se,{attrs:{center:l,zoom:g,mapRef:n,log:t.log}},[c&&s.h(be,{attrs:{from:o,to:r,registerOverlay:i,log:t.log},on:{mapMounted:a}})])}}),$o=()=>{const t=L();return{apiMapDistance:(n,i)=>{if(t.status===te.SUCCESS)return AMap.GeometryUtil.distance(n,i)}}},_o=()=>{const t=L();return{apiMapDistance:(n,i)=>{if(t.status===te.SUCCESS)return google.maps.geometry.spherical.computeDistanceBetween(P(n),P(i))}}},Ne=()=>{const{supplier:t}=L();return t==="gmap"?_o():$o()},Ko=t=>{const{city:e}=t,n=s.ref(e);Ca(t,"useAmapAutoComplete",n,"cityRef");const{readyPromise:i}=L(),{apiMapDistance:a}=Ne(),{geoPosition:o}=de(),r=s.ref(""),c=s.ref([]),{update:l,idx:g}=X(),m=d=>{n.value=d,l()},u=d=>{r.value=d,l()};return s.watch(()=>g.value,async()=>{if(!r.value)return;await i,new AMap.PlaceSearch({city:n.value.name}).search(r.value,(M,I)=>{const f=o.value;switch(M){case"complete":{c.value=I.poiList.pois.map(y=>{const{lat:p,lng:v}=y.location;return{lat:p,lng:v,name:y.name,description:y.address,distance:f?a(f,[v,p]):void 0}});return}case"no_data":c.value=[];return;default:throw I}})},{immediate:!0}),{setKeyword:u,setCity:m,autoCompletePlaces:c}},qo=t=>{const{city:e}=t,n=s.ref({...e}),{readyPromise:i}=L(),{apiMapDistance:a}=Ne(),{geoPosition:o}=de(),r=s.ref(""),c=s.ref([]),{update:l,idx:g}=X(),m=M=>{n.value=M,l()},u=M=>{r.value=M,l()},d=document.createElement("div");return s.watch(()=>g.value,async()=>{if(!r.value)return;await i,new google.maps.places.PlacesService(d).textSearch({query:r.value,bounds:n.value.bound},(I,f)=>{const y=o.value;switch(f){case google.maps.places.PlacesServiceStatus.OK:c.value=I.map(({geometry:p,name:v,formatted_address:j})=>{var w,C,R,Z;const N=(C=(w=p==null?void 0:p.location)==null?void 0:w.lng())!=null?C:0,x=(Z=(R=p==null?void 0:p.location)==null?void 0:R.lat())!=null?Z:0;return{lng:N,lat:x,name:v!=null?v:"",description:j!=null?j:"",distance:y?a(y,[N,x]):void 0}});return;case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:case google.maps.places.PlacesServiceStatus.NOT_FOUND:c.value=[];return}})}),{setKeyword:u,setCity:m,autoCompletePlaces:c}},er=t=>{const{supplier:e}=L();return e==="gmap"?qo(t):Ko(t)},tr=t=>{var a;const{cityNameRef:e,onChange:n}=t,i=s.reactive({name:(a=e.value)!=null?a:""});return s.watch(()=>e.value,o=>{const r=o!=null?o:"";i.name=r,n==null||n({name:r})}),i},nr=t=>{var o;const{cityNameRef:e,onChange:n}=t,{readyPromise:i}=L(),a=s.reactive({name:(o=e.value)!=null?o:"",bound:{east:0,north:0,south:0,west:0}});return s.watchEffect(async()=>{var u,d;const r=e.value;if(!r)return;await i;const c=new google.maps.Geocoder,{results:l}=await c.geocode({address:r,componentRestrictions:{administrativeArea:"administrative_area_level_1"},language:q});if(l.length!==1)throw new Error("MyError: multiple city found");const{geometry:g}=l[0],m=(d=(u=g.bounds)==null?void 0:u.toJSON())!=null?d:g.viewport.toJSON();a.name=r,a.bound=m,n==null||n({name:r,bound:m})}),a},ir=t=>{const{supplier:e}=L();return e==="gmap"?nr(t):tr(t)},ar=t=>{const{cityNameRef:e}=t,n=ir({cityNameRef:e,onChange:c=>o(c)}),{autoCompletePlaces:i,setKeyword:a,setCity:o}=er({city:n,log:t.log});return{autoCompletePlaces:i,setKeyword:a,setCity:o,handleKeywordInput:c=>{const l=c.target;a(l.value)}}},or=()=>{const{setMap:t,mapRef:e}=ge(),{registerFitVeiw:n,setFitView:i}=le({mapRef:e,padding:[25,20,15,15]});return{setMap:t,registerFitVeiw:n,setFitView:i}},rr=()=>{const t=s.reactive({lng:0,lat:0,name:""}),e=s.ref([]),{apiMapDistance:n}=Ne(),i=r=>o.panToGeoPositionByRecomend(r),a=r=>o.setCenterPlaceByUserSpecified(r),o={panToGeoPositionByRecomend:()=>{throw new Error("MyError: panToGeoPositionByRecomend used before assigned")},setCenterPlaceByUserSpecified:()=>{throw new Error("MyError: setCenterPlaceByRecomand used before assigned")},onChangeCenterPlace:r=>{Object.assign(t,{...r})},onChangeRecomendPlaces:r=>{e.value=[...r]}};return{mapContext:o,centerPlace:t,placeCandidates:e,panToGeoPositionByRecomend:i,setCenterPlaceByUserSpecified:a,apiMapDistance:n}},sr=()=>{const{mapRef:t,setMap:e}=ge(),{registerFitVeiw:n,setFitView:i}=le({mapRef:t,autoFitTimeout:5e3,padding:[25,20,15,15]});return{setMap:e,registerFitVeiw:n,setFitView:i}};exports.AbsoluteAddressBox=Ce;exports.AddressBox=ba;exports.BusinessQuotingMap=co;exports.BusinessRecomendPlaceMap=bo;exports.BusinessTaxiEndMap=Xo;exports.BusinessTaxiServiceMap=Fo;exports.DrivingLine=ce;exports.DrivingRoute=ue;exports.HeycarMap=se;exports.MapProvider=Ha;exports.PassengerCircle=Me;exports.PickupPoints=jn;exports.PlaceCircle=E;exports.StartEndPoint=T;exports.TaxiCar=Se;exports.WalkingLine=Ze;exports.WalkingRoute=Oe;exports.WaveCircle=Cn;exports.useBusinessMapAutoComplete=ar;exports.useBusinessQuotingMap=or;exports.useBusinessRecomendPlaceMap=rr;exports.useBusinessTaxiServiceMap=sr;exports.useDrivingRoute=Fa;exports.useGeoLocation=de;exports.useHeycarMap=ge;exports.useMapAngle=$a;exports.useMapDrag=Mn;exports.useMapFitView=le;exports.useMapGeometry=Ne;exports.useMapPlace=Io;exports.useMapRecomendPlace=fn;exports.useWalkingRoute=Oo;
|