@heycar/heycars-map 0.7.11 → 0.8.1

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/index.cjs CHANGED
@@ -9,7 +9,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
9
9
  const Vue = require("vue");
10
10
  const style = "";
11
11
  const name = "@heycar/heycars-map";
12
- const version = "0.7.11";
12
+ const version = "0.8.1";
13
13
  const type = "module";
14
14
  const scripts = {
15
15
  dev: "vite -c vite.config.dev.ts",
@@ -655,15 +655,85 @@ function defineLagecySetup(setup) {
655
655
  const createElement = Vue.h;
656
656
  const LANGUAGE = "zh-CN";
657
657
  const AbsoluteAddressBox_css_ts_vanilla = "";
658
+ function _defineProperty(obj, key, value) {
659
+ if (key in obj) {
660
+ Object.defineProperty(obj, key, {
661
+ value,
662
+ enumerable: true,
663
+ configurable: true,
664
+ writable: true
665
+ });
666
+ } else {
667
+ obj[key] = value;
668
+ }
669
+ return obj;
670
+ }
671
+ function ownKeys(object, enumerableOnly) {
672
+ var keys2 = Object.keys(object);
673
+ if (Object.getOwnPropertySymbols) {
674
+ var symbols = Object.getOwnPropertySymbols(object);
675
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
676
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
677
+ })), keys2.push.apply(keys2, symbols);
678
+ }
679
+ return keys2;
680
+ }
681
+ function _objectSpread2(target) {
682
+ for (var i = 1; i < arguments.length; i++) {
683
+ var source = null != arguments[i] ? arguments[i] : {};
684
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
685
+ _defineProperty(target, key, source[key]);
686
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
687
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
688
+ });
689
+ }
690
+ return target;
691
+ }
692
+ var shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {
693
+ for (var key of Object.keys(compoundCheck)) {
694
+ var _selections$key;
695
+ if (compoundCheck[key] !== ((_selections$key = selections[key]) !== null && _selections$key !== void 0 ? _selections$key : defaultVariants[key])) {
696
+ return false;
697
+ }
698
+ }
699
+ return true;
700
+ };
701
+ var createRuntimeFn = (config) => (options) => {
702
+ var className = config.defaultClassName;
703
+ var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
704
+ for (var variantName in selections) {
705
+ var _selections$variantNa;
706
+ var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
707
+ if (variantSelection != null) {
708
+ var selection = variantSelection;
709
+ if (typeof selection === "boolean") {
710
+ selection = selection === true ? "true" : "false";
711
+ }
712
+ var selectionClassName = (
713
+ // @ts-expect-error
714
+ config.variantClassNames[variantName][selection]
715
+ );
716
+ if (selectionClassName) {
717
+ className += " " + selectionClassName;
718
+ }
719
+ }
720
+ }
721
+ for (var [compoundCheck, compoundClassName] of config.compoundVariants) {
722
+ if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) {
723
+ className += " " + compoundClassName;
724
+ }
725
+ }
726
+ return className;
727
+ };
658
728
  var absoluteAddressBox = "n8tgem1";
659
729
  var absoluteAddressBoxLayout = "n8tgem0";
660
- var arrowRight = "n8tgem6";
661
- var boxDescription = "n8tgem4";
662
- var boxTextLayout = "n8tgem2";
663
- var boxTitle = "n8tgem3";
664
- var imgDotLoading = "n8tgem5";
665
- var locatorIcon = "n8tgem8";
666
- var straightLine = "n8tgem7";
730
+ var arrowRight$1 = "n8tgem8";
731
+ var boxDescription = "n8tgem6";
732
+ var boxTextLayout = createRuntimeFn({ defaultClassName: "n8tgem2", variantClassNames: { withArrow: { true: "n8tgem3", false: "n8tgem4" } }, defaultVariants: {}, compoundVariants: [] });
733
+ var boxTitle = "n8tgem5";
734
+ var imgDotLoading = "n8tgem7";
735
+ var locatorIcon = "n8tgema";
736
+ var straightLine = "n8tgem9";
667
737
  const MultilineTitle = defineSetup(function MultilineTitle2(props) {
668
738
  const linesRef = Vue.computed(() => {
669
739
  var _a;
@@ -679,7 +749,8 @@ const AbsoluteAddressBox = defineSetup(function AbsoluteAddressBox2(props, {
679
749
  const {
680
750
  type: type2,
681
751
  title,
682
- description
752
+ description,
753
+ withArrow = false
683
754
  } = props;
684
755
  if (type2 === "locator")
685
756
  return Vue.h("div", {
@@ -714,7 +785,9 @@ const AbsoluteAddressBox = defineSetup(function AbsoluteAddressBox2(props, {
714
785
  "click": handleClick
715
786
  }
716
787
  }, [Vue.h("div", {
717
- "class": boxTextLayout
788
+ "class": boxTextLayout({
789
+ withArrow
790
+ })
718
791
  }, [Vue.h(MultilineTitle, {
719
792
  "class": boxTitle,
720
793
  "attrs": {
@@ -722,8 +795,8 @@ const AbsoluteAddressBox = defineSetup(function AbsoluteAddressBox2(props, {
722
795
  }
723
796
  }), !!description && Vue.h("div", {
724
797
  "class": boxDescription
725
- }, [description])]), Vue.h("img", {
726
- "class": arrowRight,
798
+ }, [description])]), withArrow && Vue.h("img", {
799
+ "class": arrowRight$1,
727
800
  "attrs": {
728
801
  "src": imgArrowRight
729
802
  }
@@ -1250,6 +1323,9 @@ function watchPostEffectForGMapEvent(targetRef, props, emit, propertyNames) {
1250
1323
  });
1251
1324
  });
1252
1325
  }
1326
+ const watchPostEffectOnce = (callback) => {
1327
+ Vue.watch(() => 0, callback, { immediate: true, flush: "post" });
1328
+ };
1253
1329
  const AmapMarker = defineSetup(function AmapMarker2(props, { emit }) {
1254
1330
  const { registerOverlay } = props;
1255
1331
  const markerRef = Vue.shallowRef();
@@ -2350,76 +2426,6 @@ const useResizeObserver = (props) => {
2350
2426
  });
2351
2427
  };
2352
2428
  const Gmap_css_ts_vanilla = "";
2353
- function _defineProperty(obj, key, value) {
2354
- if (key in obj) {
2355
- Object.defineProperty(obj, key, {
2356
- value,
2357
- enumerable: true,
2358
- configurable: true,
2359
- writable: true
2360
- });
2361
- } else {
2362
- obj[key] = value;
2363
- }
2364
- return obj;
2365
- }
2366
- function ownKeys(object, enumerableOnly) {
2367
- var keys2 = Object.keys(object);
2368
- if (Object.getOwnPropertySymbols) {
2369
- var symbols = Object.getOwnPropertySymbols(object);
2370
- enumerableOnly && (symbols = symbols.filter(function(sym) {
2371
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2372
- })), keys2.push.apply(keys2, symbols);
2373
- }
2374
- return keys2;
2375
- }
2376
- function _objectSpread2(target) {
2377
- for (var i = 1; i < arguments.length; i++) {
2378
- var source = null != arguments[i] ? arguments[i] : {};
2379
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
2380
- _defineProperty(target, key, source[key]);
2381
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
2382
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2383
- });
2384
- }
2385
- return target;
2386
- }
2387
- var shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {
2388
- for (var key of Object.keys(compoundCheck)) {
2389
- var _selections$key;
2390
- if (compoundCheck[key] !== ((_selections$key = selections[key]) !== null && _selections$key !== void 0 ? _selections$key : defaultVariants[key])) {
2391
- return false;
2392
- }
2393
- }
2394
- return true;
2395
- };
2396
- var createRuntimeFn = (config) => (options) => {
2397
- var className = config.defaultClassName;
2398
- var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
2399
- for (var variantName in selections) {
2400
- var _selections$variantNa;
2401
- var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
2402
- if (variantSelection != null) {
2403
- var selection = variantSelection;
2404
- if (typeof selection === "boolean") {
2405
- selection = selection === true ? "true" : "false";
2406
- }
2407
- var selectionClassName = (
2408
- // @ts-expect-error
2409
- config.variantClassNames[variantName][selection]
2410
- );
2411
- if (selectionClassName) {
2412
- className += " " + selectionClassName;
2413
- }
2414
- }
2415
- }
2416
- for (var [compoundCheck, compoundClassName] of config.compoundVariants) {
2417
- if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) {
2418
- className += " " + compoundClassName;
2419
- }
2420
- }
2421
- return className;
2422
- };
2423
2429
  var gmap = "_7anfuo0";
2424
2430
  const Gmap = defineSetup(function Gmap2(props, { slots, emit }) {
2425
2431
  const setMap = props.mapRef;
@@ -3203,6 +3209,7 @@ const KeyedFitView = defineSetup(function KeyedFitView2(props, {
3203
3209
  const imgEndPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI3Mi4zMzklIiB5MT0iNTAlIiB4Mj0iMCUiIHkyPSI1MCUiIGlkPSJwcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9IiNGRjg0NDciIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkY4QjRBIiBvZmZzZXQ9IjUwLjU5NiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZBOTVBIiBvZmZzZXQ9IjEwMCUiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiAzMC4yMTVjMi4xMzQgMCAzLjg2My0uODkzIDMuODYzLTEuOTk1IDAtMS4xLTEuNzMtMS45OTQtMy44NjMtMS45OTQtMi4xMzQgMC0zLjg2My44OTMtMy44NjMgMS45OTQgMCAxLjEwMiAxLjczIDEuOTk1IDMuODYzIDEuOTk1eiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0iIzQzNDg1QSIvPjxwYXRoIGQ9Ik0xMSAyNy4wMDZjMi4xMjggMC0uOS0zLjc0MyA1LjYyMS02LjY0M0MxOS44NDIgMTguNDUzIDIyIDE0Ljk1MyAyMiAxMC45NSAyMiA0LjkwMiAxNy4wNzUgMCAxMSAwUzAgNC45MDIgMCAxMC45NWMwIDMuOTE4IDIuMDY4IDcuMzU2IDUuMTc3IDkuMjlDMTEuNzUgMjMuMjg0IDkuMDYgMjcuMDA3IDExIDI3LjAwN3oiIHN0cm9rZT0iI0ZGRiIgZmlsbD0idXJsKCNwcmVmaXhfX2EpIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSIvPjx0ZXh0IGZvbnQtZmFtaWx5PSJQaW5nRmFuZ1NDLVNlbWlib2xkLCBQaW5nRmFuZyBTQyIgZm9udC1zaXplPSIxMiIgZm9udC13ZWlnaHQ9IjUwMCIgZmlsbD0iI0ZGRiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxLjIxNSkiPjx0c3BhbiB4PSI1IiB5PSIxNS40NDkiPue7iDwvdHNwYW4+PC90ZXh0PjwvZz48L3N2Zz4=";
3204
3210
  const imgStartPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjUwJSIgeDI9IjEyOS41OTklIiB5Mj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjMzZBOEZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ4NzFGMSIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTIgMzAuMjE1YzEuOTUgMCAzLjUzMi0uODE2IDMuNTMyLTEuODIzIDAtMS4wMDctMS41ODEtMS44MjMtMy41MzItMS44MjMtMS45NSAwLTMuNTMyLjgxNi0zLjUzMiAxLjgyMyAwIDEuMDA3IDEuNTgxIDEuODIzIDMuNTMyIDEuODIzeiIgZmlsbC1vcGFjaXR5PSIuNSIgZmlsbD0iIzQzNDg1QSIvPjxwYXRoIGQ9Ik0xMSAyN2MyLjEyOCAwLS45LTMuNzQyIDUuNjIxLTYuNjQxIDMuMjIxLTEuOTEgNS4zNzktNS40MSA1LjM3OS05LjQxMkMyMiA0LjkwMSAxNy4wNzUgMCAxMSAwUzAgNC45MDEgMCAxMC45NDdjMCAzLjkxOCAyLjA2OCA3LjM1NSA1LjE3NyA5LjI5QzExLjc1IDIzLjI3NyA5LjA2IDI3IDExIDI3eiIgc3Ryb2tlPSIjRkZGIiBmaWxsPSJ1cmwoI3ByZWZpeF9fYSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMS4yMTUpIi8+PHRleHQgZm9udC1mYW1pbHk9IlBpbmdGYW5nU0MtU2VtaWJvbGQsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIiBmaWxsPSIjRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";
3205
3211
  const StartEndPoint_css_ts_vanilla = "";
3212
+ var arrowRight = createRuntimeFn({ defaultClassName: "_4a4ovka", variantClassNames: { withArrow: { true: "_4a4ovkb", false: "_4a4ovkc" } }, defaultVariants: {}, compoundVariants: [] });
3206
3213
  var pointIcon = createRuntimeFn({ defaultClassName: "", variantClassNames: { type: { start: "_4a4ovk6", end: "_4a4ovk7" } }, defaultVariants: {}, compoundVariants: [] });
3207
3214
  var pointInfoBox = "_4a4ovk1";
3208
3215
  var pointInfoBoxDescription = "_4a4ovk4";
@@ -3210,38 +3217,61 @@ var pointInfoBoxEmphasize$1 = "_4a4ovk5";
3210
3217
  var pointInfoBoxTitle = "_4a4ovk3";
3211
3218
  var pointLayout$1 = "_4a4ovk0";
3212
3219
  var pointSingleInfoBox$1 = "_4a4ovk2";
3213
- const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
3220
+ var textLayout = createRuntimeFn({ defaultClassName: "", variantClassNames: { withArrow: { true: "_4a4ovk8", false: "_4a4ovk9" } }, defaultVariants: {}, compoundVariants: [] });
3221
+ const AStartEndPoint = defineSetup(function AStartEndPoint2(props, {
3222
+ emit
3223
+ }) {
3214
3224
  const contentRef = Vue.computed(() => {
3215
- var _a;
3216
- const icon = props.type === "start" ? imgStartPoint : imgEndPoint;
3217
- const descriptionRow = !props.description ? "" : decodeAsterisk(props.description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
3218
- if (!props.description && !props.title)
3225
+ const {
3226
+ withArrow = false,
3227
+ title,
3228
+ description,
3229
+ type: type2
3230
+ } = props;
3231
+ const icon = type2 === "start" ? imgStartPoint : imgEndPoint;
3232
+ const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
3233
+ if (!description && !title)
3219
3234
  return `<img class="AStartEndPoint ${pointIcon({
3220
- type: props.type
3235
+ type: type2
3221
3236
  })}" src="${icon}">`;
3222
- if (!props.description)
3237
+ if (!description)
3223
3238
  return `
3224
3239
  <div class="AStartEndPoint ${pointLayout$1}">
3225
3240
  <div class="${pointSingleInfoBox$1}">
3226
- <div class="${pointInfoBoxTitle}">${props.title}</div>
3241
+ <div class="${pointInfoBoxTitle} ${textLayout({
3242
+ withArrow
3243
+ })}">${title}</div>
3244
+ <img class="${arrowRight({
3245
+ withArrow
3246
+ })}" src="${imgArrowRight}" />
3227
3247
  </div>
3228
3248
  <img src="${icon}" class="${pointIcon({
3229
- type: props.type
3249
+ type: type2
3230
3250
  })}">
3231
3251
  </div>
3232
3252
  `;
3233
3253
  return `
3234
3254
  <div class="AStartEndPoint ${pointLayout$1}">
3235
3255
  <div class="${pointInfoBox}">
3236
- <div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
3237
- <div class="${pointInfoBoxDescription}">${descriptionRow}</div>
3256
+ <div class="${textLayout({
3257
+ withArrow
3258
+ })}">
3259
+ <div class="${pointInfoBoxTitle}">${title != null ? title : ""}</div>
3260
+ <div class="${pointInfoBoxDescription}">${descriptionRow}</div>
3261
+ </div>
3262
+ <img class="${arrowRight({
3263
+ withArrow
3264
+ })}" src="${imgArrowRight}" />
3238
3265
  </div>
3239
3266
  <img src="${icon}" class="${pointIcon({
3240
- type: props.type
3267
+ type: type2
3241
3268
  })}">
3242
3269
  </div>
3243
3270
  `;
3244
3271
  });
3272
+ const handleClick = () => {
3273
+ emit("click", props.position);
3274
+ };
3245
3275
  return () => Vue.h(AmapMarker, {
3246
3276
  "attrs": {
3247
3277
  "registerOverlay": props.registerOverlay,
@@ -3249,44 +3279,69 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
3249
3279
  "content": contentRef.value,
3250
3280
  "anchor": "bottom-center",
3251
3281
  "zIndex": ZINDEX_START_END_LOGO_LAYER
3282
+ },
3283
+ "on": {
3284
+ "click": handleClick
3252
3285
  }
3253
3286
  });
3254
3287
  });
3255
- const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
3288
+ const GStartEndPoint = defineSetup(function GStartEndPoint2(props, {
3289
+ emit
3290
+ }) {
3256
3291
  const contentRef = Vue.computed(() => {
3257
- var _a;
3258
- const icon = props.type === "start" ? imgStartPoint : imgEndPoint;
3259
- const descriptionRow = !props.description ? "" : decodeAsterisk(props.description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
3260
- if (!props.description && !props.title)
3292
+ const {
3293
+ withArrow = false,
3294
+ title,
3295
+ description,
3296
+ type: type2
3297
+ } = props;
3298
+ const icon = type2 === "start" ? imgStartPoint : imgEndPoint;
3299
+ const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
3300
+ if (!description && !title)
3261
3301
  return createDom("img", {
3262
3302
  class: `GStartEndPoint ${pointIcon({
3263
- type: props.type
3303
+ type: type2
3264
3304
  })}`,
3265
3305
  src: icon
3266
3306
  });
3267
- if (!props.description)
3307
+ if (!description)
3268
3308
  return createDom("div", {
3269
3309
  class: `GStartEndPoint ${pointLayout$1}`
3270
3310
  }, `
3271
3311
  <div class="${pointSingleInfoBox$1}">
3272
- <div class="${pointInfoBoxTitle}">${props.title}</div>
3312
+ <div class="${pointInfoBoxTitle} ${textLayout({
3313
+ withArrow
3314
+ })}">${title}</div>
3315
+ <img class="${arrowRight({
3316
+ withArrow
3317
+ })}" src="${imgArrowRight}" />
3273
3318
  </div>
3274
3319
  <img src="${icon}" class="${pointIcon({
3275
- type: props.type
3320
+ type: type2
3276
3321
  })}">
3277
3322
  `);
3278
3323
  return createDom("div", {
3279
3324
  class: `GStartEndPoint ${pointLayout$1}`
3280
3325
  }, `
3281
3326
  <div class="${pointInfoBox}">
3282
- <div class="${pointInfoBoxTitle}">${(_a = props.title) != null ? _a : ""}</div>
3283
- <div class="${pointInfoBoxDescription}">${descriptionRow}</div>
3327
+ <div class="${textLayout({
3328
+ withArrow
3329
+ })}">
3330
+ <div class="${pointInfoBoxTitle}">${title != null ? title : ""}</div>
3331
+ <div class="${pointInfoBoxDescription}">${descriptionRow}</div>
3332
+ </div>
3333
+ <img class="${arrowRight({
3334
+ withArrow
3335
+ })}" src="${imgArrowRight}" />
3284
3336
  </div>
3285
3337
  <img src="${icon}" class="${pointIcon({
3286
- type: props.type
3338
+ type: type2
3287
3339
  })}">
3288
3340
  `);
3289
3341
  });
3342
+ const handleClick = () => {
3343
+ emit("click", props.position);
3344
+ };
3290
3345
  return () => {
3291
3346
  return Vue.h(GmapAdvancedMarkerView, {
3292
3347
  "attrs": {
@@ -3294,19 +3349,29 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
3294
3349
  "position": vec2lnglat(props.position),
3295
3350
  "content": contentRef.value,
3296
3351
  "zIndex": ZINDEX_START_END_LOGO_LAYER
3352
+ },
3353
+ "on": {
3354
+ "click": handleClick
3297
3355
  }
3298
3356
  });
3299
3357
  };
3300
3358
  });
3301
- const StartEndPoint = defineSetup(function StartEndPoint2(props) {
3359
+ const StartEndPoint = defineSetup(function StartEndPoint2(props, {
3360
+ emit
3361
+ }) {
3302
3362
  const payload = useMapSupplier();
3303
3363
  return () => {
3304
3364
  return createElement(payload.supplier === "gmap" ? GStartEndPoint : AStartEndPoint, {
3305
- attrs: props
3365
+ attrs: props,
3366
+ on: {
3367
+ click: (value) => emit("click", value)
3368
+ }
3306
3369
  });
3307
3370
  };
3308
3371
  });
3309
- const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props) {
3372
+ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props, {
3373
+ emit
3374
+ }) {
3310
3375
  const {
3311
3376
  registerOverlay,
3312
3377
  mapRef,
@@ -3339,7 +3404,11 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props)
3339
3404
  "registerOverlay": registerOverlay,
3340
3405
  "position": from,
3341
3406
  "title": fromPlace.displayName,
3342
- "description": fromDescription
3407
+ "description": fromDescription,
3408
+ "withArrow": true
3409
+ },
3410
+ "on": {
3411
+ "click": () => emit("clickStartPoint", fromPlace)
3343
3412
  }
3344
3413
  }), Vue.h(DrivingRoute, {
3345
3414
  "attrs": {
@@ -3362,7 +3431,11 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props)
3362
3431
  "description": renderDescription({
3363
3432
  distance,
3364
3433
  duration
3365
- })
3434
+ }),
3435
+ "withArrow": true
3436
+ },
3437
+ "on": {
3438
+ "click": () => emit("clickEndPoint", toPlace)
3366
3439
  }
3367
3440
  })]
3368
3441
  }
@@ -3435,6 +3508,10 @@ function compatibaleAddEventListenerDeviceOrientation(handler) {
3435
3508
  addEventListener("touchend", handleTouchEnd);
3436
3509
  return;
3437
3510
  }
3511
+ if (typeof DeviceOrientationEvent === "undefined") {
3512
+ console.warn("My Warning: ios not support DeviceOrientationEvent");
3513
+ return;
3514
+ }
3438
3515
  DeviceOrientationEvent == null ? void 0 : DeviceOrientationEvent.requestPermission().then((permissionState) => {
3439
3516
  if (permissionState === "granted") {
3440
3517
  isIOSDeviceOrientationPermissionGranted = true;
@@ -6083,8 +6160,7 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
6083
6160
  textAlign: textAlignRef.value
6084
6161
  })}" src="${imgPlaceCircle}">`;
6085
6162
  });
6086
- const handleClick = (e) => {
6087
- console.log("AmapMarker click e = ", e);
6163
+ const handleClick = () => {
6088
6164
  emit("click", props.position);
6089
6165
  };
6090
6166
  return () => {
@@ -6320,9 +6396,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
6320
6396
  }
6321
6397
  },
6322
6398
  onChange: (v) => emit("changeGeoLocation", v),
6323
- onError: (e) => {
6324
- emit("geoError", e);
6325
- }
6399
+ onError: (e) => emit("geoError", e)
6326
6400
  });
6327
6401
  mapContext.setCenterPlaceByUserSpecified = setCenterPlaceByUserSpecified;
6328
6402
  mapContext.setCenterPlaceByUserSpecifiedInZone = setCenterPlaceByUserSpecifiedInZone;
@@ -6392,14 +6466,6 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
6392
6466
  });
6393
6467
  }
6394
6468
  });
6395
- Vue.watchEffect(() => {
6396
- mapContext.onChangeCenterPlace({
6397
- ...centerPlace
6398
- });
6399
- });
6400
- Vue.watchEffect(() => {
6401
- mapContext.onChangeRecomendPlaces([...placeCandidates.value]);
6402
- });
6403
6469
  return () => {
6404
6470
  var _a2, _b2;
6405
6471
  const {
@@ -6439,7 +6505,8 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
6439
6505
  "attrs": {
6440
6506
  "title": title,
6441
6507
  "description": description,
6442
- "type": isDragging.value ? "locator" : "box"
6508
+ "type": isDragging.value ? "locator" : "box",
6509
+ "withArrow": true
6443
6510
  },
6444
6511
  "on": {
6445
6512
  "click": () => emit("clickLocator")
@@ -6447,6 +6514,220 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
6447
6514
  })]);
6448
6515
  };
6449
6516
  }).props(["log", "geoLoadingTitle", "unavailableTitle", "recomendDescription", "fallback", "geoDefaultPosition", "getRecomendPlace", "getDefaultCenterPlace", "loading", "mapContext"]);
6517
+ const emptyPlace = {
6518
+ lng: 0,
6519
+ lat: 0,
6520
+ name: "",
6521
+ displayName: ""
6522
+ };
6523
+ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlaceMap2(props, {
6524
+ emit,
6525
+ slots
6526
+ }) {
6527
+ const {
6528
+ getRecomendPlace,
6529
+ mapContext,
6530
+ defaultPlace = {
6531
+ ...emptyPlace
6532
+ }
6533
+ } = props;
6534
+ const pipedGetRecomendPlace = pipeOnlyLastEffect(getRecomendPlace);
6535
+ const {
6536
+ mapRef,
6537
+ mapElementRef,
6538
+ setMap,
6539
+ panTo
6540
+ } = useHeycarMap();
6541
+ const {
6542
+ zoomRef
6543
+ } = useMapZoom({
6544
+ mapRef,
6545
+ defaultValue: DEFAULT_ZOOM
6546
+ });
6547
+ const centerPlace = Vue.reactive({
6548
+ lng: defaultPlace.lng,
6549
+ lat: defaultPlace.lat,
6550
+ name: defaultPlace.name,
6551
+ displayName: defaultPlace.displayName
6552
+ });
6553
+ const centerPoint = Vue.computed(() => [centerPlace.lng, centerPlace.lat]);
6554
+ const centerSource = {
6555
+ source: "default"
6556
+ };
6557
+ const updateCenterPlaceByPoint = (point) => {
6558
+ centerSource.source = "api";
6559
+ updatePlace(point);
6560
+ };
6561
+ const setCenterPlaceByUserSpecified = async (input) => {
6562
+ centerSource.source = "api";
6563
+ const place = toPlaceType(input);
6564
+ centerPlace.lng = place.lng;
6565
+ centerPlace.lat = place.lat;
6566
+ centerPlace.name = place.name;
6567
+ centerPlace.displayName = place.displayName;
6568
+ emit("changePlace", {
6569
+ ...place
6570
+ });
6571
+ updateRecommendPlace(place);
6572
+ };
6573
+ const setCenterPlaceByUserSpecifiedInZone = ({
6574
+ place,
6575
+ recommends
6576
+ }) => {
6577
+ centerPlace.lng = place.lng;
6578
+ centerPlace.lat = place.lat;
6579
+ centerPlace.name = place.name;
6580
+ centerPlace.displayName = place.displayName;
6581
+ setPlaceCandidatesAndZone(recommends);
6582
+ emit("changePlace", {
6583
+ ...place
6584
+ });
6585
+ };
6586
+ const panToCenterByPlace = async (place) => {
6587
+ centerSource.source = "api";
6588
+ await panTo(place2point(place));
6589
+ centerPlace.lng = place.lng;
6590
+ centerPlace.lat = place.lat;
6591
+ centerPlace.name = place.name;
6592
+ centerPlace.displayName = place.displayName;
6593
+ emit("changePlace", {
6594
+ ...place
6595
+ });
6596
+ emit("changeRecomandPlace", {
6597
+ place: {
6598
+ ...place
6599
+ },
6600
+ inputPlace: {
6601
+ ...place
6602
+ },
6603
+ isInZone: !!zoneRef.value
6604
+ });
6605
+ };
6606
+ const {
6607
+ orientation
6608
+ } = useDeviceOrientation({
6609
+ elementRef: mapElementRef
6610
+ });
6611
+ const {
6612
+ geoPosition,
6613
+ geoError,
6614
+ geoLoading
6615
+ } = useGeoLocation({
6616
+ geoDefaultPosition: place2point(defaultPlace),
6617
+ onError: (e) => emit("geoError", e)
6618
+ });
6619
+ mapContext.setCenterPlaceByUserSpecified = setCenterPlaceByUserSpecified;
6620
+ mapContext.setCenterPlaceByUserSpecifiedInZone = setCenterPlaceByUserSpecifiedInZone;
6621
+ mapContext.panToGeoPositionByRecomend = () => {
6622
+ if (geoError.value)
6623
+ return false;
6624
+ updateCenterPlaceByPoint(geoPosition.value);
6625
+ return true;
6626
+ };
6627
+ const {
6628
+ isDragging
6629
+ } = useMapDrag({
6630
+ mapRef,
6631
+ onChange: (point) => {
6632
+ centerSource.source = "drag";
6633
+ updatePlace(point);
6634
+ }
6635
+ });
6636
+ const {
6637
+ updatePlace,
6638
+ updateRecommendPlace,
6639
+ updatePlaceCandidates,
6640
+ setPlaceCandidatesAndZone,
6641
+ placeCandidates,
6642
+ zoneRef,
6643
+ availableRef,
6644
+ isElectedRef
6645
+ } = useMapRecomendPlace({
6646
+ pointRef: centerPoint,
6647
+ emptyPlaceName: DEFAULT_PLACE_NAME,
6648
+ context: centerSource,
6649
+ getRecomendPlace: pipedGetRecomendPlace,
6650
+ getLimit: (context2) => {
6651
+ const source = context2 == null ? void 0 : context2.source;
6652
+ switch (source) {
6653
+ case "drag":
6654
+ return RECOMMEND_PLACE_DRAG_LIMIT;
6655
+ case "api":
6656
+ case "geo":
6657
+ case "default":
6658
+ return RECOMMEND_PLACE_LARGE_LIMIT;
6659
+ default:
6660
+ throw new Error(`MyError: should not call getLimit on source: ${source}`);
6661
+ }
6662
+ },
6663
+ onChangePlace: (place) => {
6664
+ if (centerSource.source !== "recomend") {
6665
+ updateRecommendPlace(place);
6666
+ }
6667
+ emit("changePlace", place);
6668
+ },
6669
+ onChange: async ({
6670
+ place,
6671
+ inputPlace,
6672
+ isInZone
6673
+ }) => {
6674
+ centerSource.source = "recomend";
6675
+ if (isPlaceEqual(place, centerPlace))
6676
+ panTo(place2point(place));
6677
+ Object.assign(centerPlace, {
6678
+ ...place
6679
+ });
6680
+ emit("changeRecomandPlace", {
6681
+ place,
6682
+ inputPlace,
6683
+ isInZone
6684
+ });
6685
+ }
6686
+ });
6687
+ watchPostEffectOnce(() => updatePlaceCandidates(defaultPlace));
6688
+ return () => {
6689
+ var _a, _b;
6690
+ const {
6691
+ recomendDescription,
6692
+ unavailableTitle
6693
+ } = props;
6694
+ const title = !availableRef.value ? unavailableTitle : centerPlace.displayName;
6695
+ const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
6696
+ return Vue.h(HeycarMap, {
6697
+ "attrs": {
6698
+ "center": centerPoint.value,
6699
+ "zoom": zoomRef.value,
6700
+ "touchZoomCenter": true,
6701
+ "mapRef": setMap,
6702
+ "fallback": slots.fallback,
6703
+ "loading": slots.loading
6704
+ }
6705
+ }, [((_a = zoneRef.value) == null ? void 0 : _a.path.length) && Vue.h(GreenZone, {
6706
+ "attrs": {
6707
+ "path": (_b = zoneRef.value) == null ? void 0 : _b.path
6708
+ }
6709
+ }), !geoLoading.value && !geoError.value && Vue.h(PassengerCircle, {
6710
+ "attrs": {
6711
+ "position": geoPosition.value,
6712
+ "angle": orientation.cssRotationVariableName
6713
+ }
6714
+ }), zoomRef.value >= RECOMMEND_PLACE_ZOOM_MIN && Vue.h(PickupPoints, {
6715
+ "attrs": {
6716
+ "places": placeCandidates.value,
6717
+ "renderLabel": (place) => isPlaceEqual(place, centerPlace) ? void 0 : place.displayName
6718
+ },
6719
+ "on": {
6720
+ "click": panToCenterByPlace
6721
+ }
6722
+ }), geoLoading.value ? null : Vue.h(AbsoluteAddressBox, {
6723
+ "attrs": {
6724
+ "title": title,
6725
+ "description": description,
6726
+ "type": isDragging.value ? "locator" : "box"
6727
+ }
6728
+ })]);
6729
+ };
6730
+ }).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "recomendDescription", "getRecomendPlace", "mapContext"]);
6450
6731
  const useAmapGeometry = () => {
6451
6732
  const payload = useMapSupplier();
6452
6733
  const apiMapDistance = (from, to) => {
@@ -7579,12 +7860,6 @@ const useBusinessRecomendPlaceMap = () => {
7579
7860
  },
7580
7861
  setCenterPlaceByUserSpecifiedInZone: () => {
7581
7862
  throw new Error("MyError: setCenterPlaceByUserSpecifiedInZone used before assigned");
7582
- },
7583
- onChangeCenterPlace: (place) => {
7584
- Object.assign(centerPlace, { ...place });
7585
- },
7586
- onChangeRecomendPlaces: (places) => {
7587
- placeCandidates.value = [...places];
7588
7863
  }
7589
7864
  };
7590
7865
  return {
@@ -7598,6 +7873,9 @@ const useBusinessRecomendPlaceMap = () => {
7598
7873
  apiMapInChina: inChina
7599
7874
  };
7600
7875
  };
7876
+ const useBusinessReselectPlaceMap = () => {
7877
+ return useBusinessRecomendPlaceMap();
7878
+ };
7601
7879
  const useBusinessTaxiServiceMap = () => {
7602
7880
  const { mapRef, setMap } = useHeycarMap();
7603
7881
  const { registerFitVeiw, setFitView } = useMapFitView({
@@ -7612,6 +7890,7 @@ exports.AbsoluteAddressBox = AbsoluteAddressBox;
7612
7890
  exports.AddressBox = AddressBox;
7613
7891
  exports.BusinessQuotingMap = BusinessQuotingMap;
7614
7892
  exports.BusinessRecomendPlaceMap = BusinessRecomendPlaceMap;
7893
+ exports.BusinessReselectPlaceMap = BusinessReselectPlaceMap;
7615
7894
  exports.BusinessTaxiEndMap = BusinessTaxiEndMap;
7616
7895
  exports.BusinessTaxiServiceMap = BusinessTaxiServiceMap;
7617
7896
  exports.DrivingLine = DrivingLine;
@@ -7632,6 +7911,7 @@ exports.patchMiniprogramRedirectTo = patchMiniprogramRedirectTo;
7632
7911
  exports.useBusinessAlarm = useBusinessAlarm;
7633
7912
  exports.useBusinessQuotingMap = useBusinessQuotingMap;
7634
7913
  exports.useBusinessRecomendPlaceMap = useBusinessRecomendPlaceMap;
7914
+ exports.useBusinessReselectPlaceMap = useBusinessReselectPlaceMap;
7635
7915
  exports.useBusinessTaxiServiceMap = useBusinessTaxiServiceMap;
7636
7916
  exports.useDrivingRoute = useDrivingRoute;
7637
7917
  exports.useGeoLocation = useGeoLocation;