UNPKG

@eotl/core

Version:

Assortment of data structures, Vue.js components, and utilities across EOTL apps and sites.

1,517 lines 471 kB
import { A } from "./AccountNew-C3Kon05d.js"; import { A as A2 } from "./AccountRestore-D7BfWASB.js"; import { reactive, provide, inject, ref, onMounted, onBeforeMount, onActivated, onDeactivated, watchEffect, openBlock, createElementBlock, unref, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, withModifiers, createTextVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, vModelCheckbox, createStaticVNode, defineComponent, markRaw, nextTick, h as h$1, computed, onBeforeUnmount, watch, onUnmounted, render, createVNode, withCtx, createBlock, pushScopeId, popScopeId } from "vue"; import { useEotlCore } from "./store.js"; import { D } from "./Daemon-C64IN2y0.js"; import $ from "jquery"; import { ssrFetcher } from "@eotl/simple-signed-records"; import { c as currency, s as sizes, w as weights } from "./Weights-DpFDKgkK.js"; import { t as tallyFee } from "./slugify-BUtGJjMG.js"; import "./authSsr-BedulHkH.js"; import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js"; import { storeToRefs } from "pinia"; import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.js"; function _mergeNamespaces(n, m2) { for (var i = 0; i < m2.length; i++) { const e = m2[i]; if (typeof e !== "string" && !Array.isArray(e)) { for (const k2 in e) { if (k2 !== "default" && !(k2 in n)) { const d = Object.getOwnPropertyDescriptor(e, k2); if (d) { Object.defineProperty(n, k2, d.get ? d : { enumerable: true, get: () => e[k2] }); } } } } } return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" })); } const _hoisted_1$6 = { class: "mb-0" }; const ALERT_CONTEXT_KEY = Symbol("eotl-core-alert"); const DEFAULT_CONTEXT = reactive({ childAlertRoots: 0 }); function createAlertContext() { provide(ALERT_CONTEXT_KEY, reactive({ // a counter to record whether there are <Alert> components deeper in the tree // which should be used instead of the current one childAlertRoots: 0 })); const parent = inject(ALERT_CONTEXT_KEY, DEFAULT_CONTEXT); const isMounted = ref(false); const isActivated = ref(true); onMounted(() => isMounted.value = true); onBeforeMount(() => isMounted.value = false); onActivated(() => isActivated.value = true); onDeactivated(() => isActivated.value = false); watchEffect((onCleanup) => { if (!isActivated.value || !isMounted.value) return; parent.childAlertRoots++; useEotlCore().alert.show = false; onCleanup(() => { parent.childAlertRoots--; useEotlCore().alert.show = false; }); }); } const _sfc_main$7 = { __name: "Alert", setup(__props) { const eotlStore = useEotlCore(); const alertRoot = inject(ALERT_CONTEXT_KEY, DEFAULT_CONTEXT); return (_ctx, _cache) => { var _a; return openBlock(), createElementBlock("div", null, [ unref(eotlStore).alert.show && !((_a = unref(alertRoot)) == null ? void 0 : _a.childAlertRoots) ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass("mb-3 alert alert-dismissable alert-" + unref(eotlStore).alert.style), role: "alert" }, [ createElementVNode("button", { type: "button", class: "close", "data-dismiss": "alert", onClick: _cache[0] || (_cache[0] = () => unref(eotlStore).alertReset()), "aria-label": "Close" }, " × "), createElementVNode("h4", null, toDisplayString(unref(eotlStore).alert.title), 1), createElementVNode("p", _hoisted_1$6, toDisplayString(unref(eotlStore).alert.message), 1) ], 2)) : createCommentVNode("", true) ]); }; } }; const _sfc_main$6 = { data() { const store = useEotlCore(); return { store, currency: currency.eur, sizing: sizes.md, sizes, weights, speeds: ["immediate", "day", "next", "second", "week"], loading: true, shipment: { size: "md", weight: "average", speed: "next" }, details: { payment: "cash", payer: "receiver" }, agree: false }; }, computed: { sizeImage() { return `/images/icons/box-${this.shipment.size}.svg`; }, priceEstimate() { return tallyFee(this.shipment, currency["eur"].symbol); }, pickup() { const { city, country, postal } = this.store.config; return { name: "", method: "none", contact: "", address: "", address2: "", city, state: country, postal }; }, destination() { const { city, country, postal } = this.store.config; return { name: "", method: "none", contact: "", address: "", address2: "", city, state: country, postal }; } }, methods: { btnShowShipment() { $("#shipment-tab").tab("show"); }, btnShowPickup() { $("#pickup-tab").tab("show"); }, btnShowDestination() { $("#destination-tab").tab("show"); }, btnShowDetails() { $("#details-tab").tab("show"); }, btnCreateShipment() { const record = { size: this.shipment.size, weight: this.shipment.weight, speed: this.shipment.speed, pickup_name: this.pickup.name, pickup_method: this.pickup.method, pickup_contact: this.pickup.contact, pickup_address: this.pickup.address, pickup_address2: this.pickup.address2, pickup_city: this.pickup.city, pickup_state: this.pickup.state, pickup_postal: this.pickup.postal, dest_name: this.destination.name, dest_method: this.destination.method, dest_contact: this.destination.contact, dest_address: this.destination.address, dest_address2: this.destination.address2, dest_city: this.destination.city, dest_state: this.destination.state, dest_postal: this.destination.postal }; const router = this.$router; ssrFetcher.Post("shipments", record).then((data) => { router.push("/shipment/" + data.id); }); }, btnCancelShipment() { alert("Cancel order to be created..."); } }, mounted() { this.loading = false; } }; const _hoisted_1$5 = { key: 0, class: "estimator" }; const _hoisted_2$4 = { class: "estimate", id: "estimate" }; const _hoisted_3$4 = { class: "preview" }; const _hoisted_4$2 = { class: "row" }; const _hoisted_5$2 = { class: "col-md-6 text-center" }; const _hoisted_6$2 = { class: "height" }; const _hoisted_7$1 = ["src"]; const _hoisted_8$1 = { class: "width" }; const _hoisted_9$1 = { class: "length" }; const _hoisted_10$1 = { class: "col-md-6 text-center" }; const _hoisted_11$1 = { class: "mt-3" }; const _hoisted_12 = { class: "nav nav-tabs", id: "myTab", role: "tablist" }; const _hoisted_13 = { class: "nav-item" }; const _hoisted_14 = { class: "nav-link active", id: "shipment-tab", "data-toggle": "tab", href: "#shipment", role: "tab", "aria-controls": "shipment", "aria-selected": "true" }; const _hoisted_15 = { class: "nav-item" }; const _hoisted_16 = { class: "nav-link", id: "pickup-tab", "data-toggle": "tab", href: "#pickup", role: "tab", "aria-controls": "pickup", "aria-selected": "false" }; const _hoisted_17 = { class: "nav-item", symbol: "" }; const _hoisted_18 = { class: "nav-link", id: "destination-tab", "data-toggle": "tab", href: "#destination", role: "tab", "aria-controls": "destination", "aria-selected": "false" }; const _hoisted_19 = { class: "nav-item" }; const _hoisted_20 = { class: "nav-link", id: "details-tab", "data-toggle": "tab", href: "#details", role: "tab", "aria-controls": "details", "aria-selected": "false" }; const _hoisted_21 = { class: "tab-content pb-4", id: "myTabContent" }; const _hoisted_22 = { class: "tab-pane active", id: "shipment", role: "tabpanel", "aria-labelledby": "shipment-tab" }; const _hoisted_23 = { class: "form-row mb-4" }; const _hoisted_24 = { class: "col-md-4" }; const _hoisted_25 = { for: "inputSize" }; const _hoisted_26 = ["value"]; const _hoisted_27 = { class: "col-md-4" }; const _hoisted_28 = { for: "inputWeight" }; const _hoisted_29 = ["value"]; const _hoisted_30 = { class: "col-md-4" }; const _hoisted_31 = { for: "inputSpeed" }; const _hoisted_32 = ["value"]; const _hoisted_33 = { class: "form-row mb-4 text-right" }; const _hoisted_34 = { class: "tab-pane", id: "pickup", role: "tabpanel", "aria-labelledby": "pickup-tab" }; const _hoisted_35 = { class: "mb-5" }; const _hoisted_36 = { class: "form-row" }; const _hoisted_37 = { class: "form-group col-md-5" }; const _hoisted_38 = { for: "inputName" }; const _hoisted_39 = { class: "form-group col-md-3" }; const _hoisted_40 = { for: "inputMethod" }; const _hoisted_41 = /* @__PURE__ */ createStaticVNode('<option value="none">None</option><option value="sms">SMS</option><option value="voice">Phone Call</option><option value="email">Email</option><option value="signal">Signal</option><option value="telegram">Telegram</option><option value="whatsapp">WhatsApp</option><option value="wire">Wire</option>', 8); const _hoisted_49 = [ _hoisted_41 ]; const _hoisted_50 = { class: "form-group col-md-4" }; const _hoisted_51 = { for: "inputContact" }; const _hoisted_52 = { class: "form-row" }; const _hoisted_53 = { class: "form-group col-md-6" }; const _hoisted_54 = { for: "inputAddressStart" }; const _hoisted_55 = { class: "form-group col-md-6" }; const _hoisted_56 = { for: "inputAddress2Start" }; const _hoisted_57 = { class: "form-row" }; const _hoisted_58 = { class: "form-group col-md-6" }; const _hoisted_59 = { for: "inputCityStart" }; const _hoisted_60 = { class: "form-group col-md-2" }; const _hoisted_61 = { for: "inputZipStart" }; const _hoisted_62 = { class: "form-group col-md-4" }; const _hoisted_63 = { for: "inputStateStart" }; const _hoisted_64 = ["value"]; const _hoisted_65 = { class: "tab-pane", id: "destination", role: "tabpanel", "aria-labelledby": "destination-tab" }; const _hoisted_66 = { class: "mb-5" }; const _hoisted_67 = { class: "form-row" }; const _hoisted_68 = { class: "form-group col-md-5" }; const _hoisted_69 = { for: "inputNameEnd" }; const _hoisted_70 = { class: "form-group col-md-3" }; const _hoisted_71 = { for: "inputMethodEnd" }; const _hoisted_72 = /* @__PURE__ */ createStaticVNode('<option value="none" selected>None</option><option value="sms">SMS</option><option value="voice">Phone Call</option><option value="day">Email</option><option value="signal">Signal</option><option value="telegram">Telegram</option><option value="whatsapp">WhatsApp</option><option value="wire">Wire</option>', 8); const _hoisted_80 = [ _hoisted_72 ]; const _hoisted_81 = { class: "form-group col-md-4" }; const _hoisted_82 = { for: "inputContactEnd" }; const _hoisted_83 = { class: "form-row" }; const _hoisted_84 = { class: "form-group col-md-6" }; const _hoisted_85 = { for: "inputAddressEnd" }; const _hoisted_86 = { class: "form-group col-md-6" }; const _hoisted_87 = { for: "inputAddress2End" }; const _hoisted_88 = { class: "form-row" }; const _hoisted_89 = { class: "form-group col-md-6" }; const _hoisted_90 = { for: "inputCityEnd" }; const _hoisted_91 = { class: "form-group col-md-2" }; const _hoisted_92 = { for: "inputZipEnd" }; const _hoisted_93 = { class: "form-group col-md-4" }; const _hoisted_94 = { for: "inputStateEnd" }; const _hoisted_95 = ["value"]; const _hoisted_96 = { class: "tab-pane", id: "details", role: "tabpanel", "aria-labelledby": "details-tab" }; const _hoisted_97 = { class: "form-row mb-3" }; const _hoisted_98 = { class: "form-group col-md-6" }; const _hoisted_99 = { for: "inputPayment" }; const _hoisted_100 = /* @__PURE__ */ createStaticVNode('<option value="none" selected>None</option><option value="cash">Cash</option><option value="bitcoin">Bitcoin</option><option value="paypal">PayPal</option><option value="cc">Credit Card</option><option value="time">Time Bank</option>', 6); const _hoisted_106 = [ _hoisted_100 ]; const _hoisted_107 = { class: "col-md-6" }; const _hoisted_108 = { for: "payer" }; const _hoisted_109 = /* @__PURE__ */ createElementVNode("option", { value: "na" }, "Not Applicable", -1); const _hoisted_110 = /* @__PURE__ */ createElementVNode("option", { value: "sender" }, "Sender", -1); const _hoisted_111 = /* @__PURE__ */ createElementVNode("option", { value: "receiver" }, "Receiver", -1); const _hoisted_112 = [ _hoisted_109, _hoisted_110, _hoisted_111 ]; const _hoisted_113 = ["innerHTML"]; const _hoisted_114 = { class: "form-group" }; const _hoisted_115 = { class: "form-check" }; const _hoisted_116 = { class: "form-check-label", for: "gridCheck" }; const _hoisted_117 = { class: "mb-3" }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { return !$data.loading ? (openBlock(), createElementBlock("div", _hoisted_1$5, [ createElementVNode("form", { method: "POST", onSubmit: _cache[27] || (_cache[27] = withModifiers(($event) => $options.btnCreateShipment(), ["prevent"])) }, [ createElementVNode("div", _hoisted_2$4, toDisplayString(_ctx.$t("estimate")), 1), createElementVNode("div", _hoisted_3$4, [ createElementVNode("div", _hoisted_4$2, [ createElementVNode("div", _hoisted_5$2, [ createElementVNode("span", _hoisted_6$2, toDisplayString($data.sizing.height), 1), createElementVNode("img", { id: "previewImg", src: $options.sizeImage, class: "invert" }, null, 8, _hoisted_7$1), createElementVNode("span", _hoisted_8$1, toDisplayString($data.sizing.width), 1), createTextVNode(" x "), createElementVNode("span", _hoisted_9$1, toDisplayString($data.sizing.length), 1) ]), createElementVNode("div", _hoisted_10$1, [ createElementVNode("h2", null, toDisplayString($options.priceEstimate), 1) ]) ]) ]), createElementVNode("div", _hoisted_11$1, [ createElementVNode("ul", _hoisted_12, [ createElementVNode("li", _hoisted_13, [ createElementVNode("a", _hoisted_14, toDisplayString(_ctx.$t("shipment.title")), 1) ]), createElementVNode("li", _hoisted_15, [ createElementVNode("a", _hoisted_16, toDisplayString(_ctx.$t("pickup.title")), 1) ]), createElementVNode("li", _hoisted_17, [ createElementVNode("a", _hoisted_18, toDisplayString(_ctx.$t("destination.title")), 1) ]), createElementVNode("li", _hoisted_19, [ createElementVNode("a", _hoisted_20, toDisplayString(_ctx.$t("delivery.title")), 1) ]) ]) ]), createElementVNode("div", _hoisted_21, [ createElementVNode("div", _hoisted_22, [ createElementVNode("div", _hoisted_23, [ createElementVNode("div", _hoisted_24, [ createElementVNode("label", _hoisted_25, toDisplayString(_ctx.$t("shipment.size")), 1), withDirectives(createElementVNode("select", { "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.shipment.size = $event), id: "inputSize", class: "form-control" }, [ (openBlock(true), createElementBlock(Fragment, null, renderList($data.sizes, (size, index) => { return openBlock(), createElementBlock("option", { key: index, value: index }, toDisplayString(_ctx.$t("sizes." + index)), 9, _hoisted_26); }), 128)) ], 512), [ [vModelSelect, $data.shipment.size] ]) ]), createElementVNode("div", _hoisted_27, [ createElementVNode("label", _hoisted_28, toDisplayString(_ctx.$t("shipment.weight")), 1), withDirectives(createElementVNode("select", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.shipment.weight = $event), id: "inputWeight", class: "form-control" }, [ (openBlock(true), createElementBlock(Fragment, null, renderList($data.weights, (weight, index) => { return openBlock(), createElementBlock("option", { key: index, value: index }, toDisplayString(_ctx.$t("weights." + index)) + " (" + toDisplayString(weight.kg) + ") ", 9, _hoisted_29); }), 128)) ], 512), [ [vModelSelect, $data.shipment.weight] ]) ]), createElementVNode("div", _hoisted_30, [ createElementVNode("label", _hoisted_31, toDisplayString(_ctx.$t("shipment.shipmentSpeed")), 1), withDirectives(createElementVNode("select", { "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.shipment.speed = $event), id: "inputSpeed", class: "form-control" }, [ (openBlock(true), createElementBlock(Fragment, null, renderList($data.speeds, (speed) => { return openBlock(), createElementBlock("option", { key: speed, value: speed }, toDisplayString(_ctx.$t("speeds." + speed)), 9, _hoisted_32); }), 128)) ], 512), [ [vModelSelect, $data.shipment.speed] ]) ]) ]), createElementVNode("div", _hoisted_33, [ createElementVNode("button", { type: "button", onClick: _cache[3] || (_cache[3] = (...args) => $options.btnShowPickup && $options.btnShowPickup(...args)), class: "btn btn-primary" }, " Next Step ") ]) ]), createElementVNode("div", _hoisted_34, [ createElementVNode("div", _hoisted_35, [ createElementVNode("div", _hoisted_36, [ createElementVNode("div", _hoisted_37, [ createElementVNode("label", _hoisted_38, toDisplayString(_ctx.$t("pickup.name")), 1), withDirectives(createElementVNode("input", { type: "text", "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $options.pickup.name = $event), class: "form-control", id: "inputName" }, null, 512), [ [vModelText, $options.pickup.name] ]) ]), createElementVNode("div", _hoisted_39, [ createElementVNode("label", _hoisted_40, toDisplayString(_ctx.$t("pickup.contactMethod")), 1), withDirectives(createElementVNode("select", { id: "inputMethod", class: "form-control", "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $options.pickup.method = $event) }, _hoisted_49, 512), [ [vModelSelect, $options.pickup.method] ]) ]), createElementVNode("div", _hoisted_50, [ createElementVNode("label", _hoisted_51, toDisplayString(_ctx.$t("pickup.contact")), 1), withDirectives(createElementVNode("input", { type: "text", "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $options.pickup.contact = $event), class: "form-control", id: "inputContact" }, null, 512), [ [vModelText, $options.pickup.contact] ]) ]) ]), createElementVNode("div", _hoisted_52, [ createElementVNode("div", _hoisted_53, [ createElementVNode("label", _hoisted_54, toDisplayString(_ctx.$t("pickup.address")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $options.pickup.address = $event), id: "inputAddressStart", placeholder: "1234 Main St" }, null, 512), [ [vModelText, $options.pickup.address] ]) ]), createElementVNode("div", _hoisted_55, [ createElementVNode("label", _hoisted_56, toDisplayString(_ctx.$t("pickup.addressSuffix")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $options.pickup.address2 = $event), id: "inputAddress2Start", placeholder: "Apartment, studio, or floor" }, null, 512), [ [vModelText, $options.pickup.address2] ]) ]) ]), createElementVNode("div", _hoisted_57, [ createElementVNode("div", _hoisted_58, [ createElementVNode("label", _hoisted_59, toDisplayString(_ctx.$t("pickup.city")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $options.pickup.city = $event), id: "inputCityStart" }, null, 512), [ [vModelText, $options.pickup.city] ]) ]), createElementVNode("div", _hoisted_60, [ createElementVNode("label", _hoisted_61, toDisplayString(_ctx.$t("pickup.postal")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", id: "inputZipStart", "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $options.pickup.postal = $event) }, null, 512), [ [vModelText, $options.pickup.postal] ]) ]), createElementVNode("div", _hoisted_62, [ createElementVNode("label", _hoisted_63, toDisplayString(_ctx.$t("pickup.state")), 1), withDirectives(createElementVNode("select", { id: "inputStateStart", class: "form-control", "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $options.pickup.state = $event) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$tm("countries"), (country) => { return openBlock(), createElementBlock("option", { key: country.value, value: country.value }, toDisplayString(country.text), 9, _hoisted_64); }), 128)) ], 512), [ [vModelSelect, $options.pickup.state] ]) ]) ]), createElementVNode("button", { type: "button", onClick: _cache[12] || (_cache[12] = (...args) => $options.btnShowDestination && $options.btnShowDestination(...args)), class: "btn btn-primary float-right" }, " Next Step ") ]) ]), createElementVNode("div", _hoisted_65, [ createElementVNode("div", _hoisted_66, [ createElementVNode("div", _hoisted_67, [ createElementVNode("div", _hoisted_68, [ createElementVNode("label", _hoisted_69, toDisplayString(_ctx.$t("destination.name")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", id: "inputNameEnd", "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $options.destination.name = $event) }, null, 512), [ [vModelText, $options.destination.name] ]) ]), createElementVNode("div", _hoisted_70, [ createElementVNode("label", _hoisted_71, toDisplayString(_ctx.$t("destination.contactMethod")), 1), withDirectives(createElementVNode("select", { id: "inputMethodEnd", class: "form-control", "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $options.destination.method = $event) }, _hoisted_80, 512), [ [vModelSelect, $options.destination.method] ]) ]), createElementVNode("div", _hoisted_81, [ createElementVNode("label", _hoisted_82, toDisplayString(_ctx.$t("destination.contact")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", id: "inputContactEnd", "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $options.destination.contact = $event) }, null, 512), [ [vModelText, $options.destination.contact] ]) ]) ]), createElementVNode("div", _hoisted_83, [ createElementVNode("div", _hoisted_84, [ createElementVNode("label", _hoisted_85, toDisplayString(_ctx.$t("destination.address")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", id: "inputAddressEnd", placeholder: "1234 Main St", "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $options.destination.address = $event) }, null, 512), [ [vModelText, $options.destination.address] ]) ]), createElementVNode("div", _hoisted_86, [ createElementVNode("label", _hoisted_87, toDisplayString(_ctx.$t("destination.addressSuffix")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", id: "inputAddress2End", placeholder: "Apartment, studio, or floor", "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => $options.destination.address2 = $event) }, null, 512), [ [vModelText, $options.destination.address2] ]) ]) ]), createElementVNode("div", _hoisted_88, [ createElementVNode("div", _hoisted_89, [ createElementVNode("label", _hoisted_90, toDisplayString(_ctx.$t("destination.city")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", id: "inputCityEnd", "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $options.destination.city = $event) }, null, 512), [ [vModelText, $options.destination.city] ]) ]), createElementVNode("div", _hoisted_91, [ createElementVNode("label", _hoisted_92, toDisplayString(_ctx.$t("destination.postal")), 1), withDirectives(createElementVNode("input", { type: "text", class: "form-control", id: "inputZipEnd", "onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => $options.destination.postal = $event) }, null, 512), [ [vModelText, $options.destination.postal] ]) ]), createElementVNode("div", _hoisted_93, [ createElementVNode("label", _hoisted_94, toDisplayString(_ctx.$t("destination.state")), 1), withDirectives(createElementVNode("select", { id: "inputStateEnd", class: "form-control", "onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => $options.destination.state = $event) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$tm("countries"), (country) => { return openBlock(), createElementBlock("option", { key: country.value, value: country.value }, toDisplayString(country.text), 9, _hoisted_95); }), 128)) ], 512), [ [vModelSelect, $options.destination.state] ]) ]) ]), createElementVNode("button", { type: "button", onClick: _cache[21] || (_cache[21] = (...args) => $options.btnShowDetails && $options.btnShowDetails(...args)), class: "btn btn-primary float-right" }, " Next Step ") ]) ]), createElementVNode("div", _hoisted_96, [ createElementVNode("h4", null, toDisplayString(_ctx.$t("delivery.payment")), 1), createElementVNode("div", _hoisted_97, [ createElementVNode("div", _hoisted_98, [ createElementVNode("label", _hoisted_99, toDisplayString(_ctx.$t("delivery.paymentMethod")), 1), withDirectives(createElementVNode("select", { id: "inputPayment", class: "form-control", "onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => $data.details.payment = $event) }, _hoisted_106, 512), [ [vModelSelect, $data.details.payment] ]) ]), createElementVNode("div", _hoisted_107, [ createElementVNode("label", _hoisted_108, toDisplayString(_ctx.$t("delivery.paymentPayer")), 1), withDirectives(createElementVNode("select", { id: "payer", class: "form-control", "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => $data.details.payer = $event) }, _hoisted_112, 512), [ [vModelSelect, $data.details.payer] ]) ]) ]), createElementVNode("h5", null, toDisplayString(_ctx.$t("delivery.tos")), 1), createElementVNode("div", { innerHTML: _ctx.$t("delivery.tosMust") }, null, 8, _hoisted_113), createElementVNode("div", _hoisted_114, [ createElementVNode("div", _hoisted_115, [ withDirectives(createElementVNode("input", { class: "form-check-input", "onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => $data.agree = $event), type: "checkbox", id: "gridCheck" }, null, 512), [ [vModelCheckbox, $data.agree] ]), createElementVNode("label", _hoisted_116, toDisplayString(_ctx.$t("delivery.tosAgree")), 1) ]) ]), createElementVNode("div", _hoisted_117, [ createElementVNode("button", { type: "button", class: "btn btn-secondary mr-4", onClick: _cache[25] || (_cache[25] = ($event) => $options.btnCancelShipment()) }, toDisplayString(_ctx.$t("delivery.btnCancel")), 1), createElementVNode("button", { type: "submit", class: "btn btn-primary", onSubmit: _cache[26] || (_cache[26] = withModifiers(($event) => $options.btnCreateShipment(), ["prevent"])) }, toDisplayString(_ctx.$t("delivery.btnComplete")), 33) ]) ]) ]) ], 32) ])) : createCommentVNode("", true); } const Estimator = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$3]]); const _sfc_main$5 = { name: "IdentityKey", props: ["identity"], data: function() { return {}; } }; const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("br", null, null, -1); const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("br", null, null, -1); const _hoisted_3$3 = /* @__PURE__ */ createElementVNode("br", null, null, -1); function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", null, [ createElementVNode("small", null, [ createTextVNode(toDisplayString($props.identity.identity), 1), _hoisted_1$4, createTextVNode(" Level: " + toDisplayString($props.identity.level), 1), _hoisted_2$3, createTextVNode(" Status: " + toDisplayString($props.identity.status), 1), _hoisted_3$3, createTextVNode(" " + toDisplayString($props.identity.info), 1) ]) ]); } const IdentityKey = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$2]]); const ce = (e, o) => { for (const t of Object.keys(o)) e.on(t, o[t]); }, ye = (e) => { for (const o of Object.keys(e)) { const t = e[o]; t && k(t.cancel) && t.cancel(); } }, Je = (e) => !e || typeof e.charAt != "function" ? e : e.charAt(0).toUpperCase() + e.slice(1), k = (e) => typeof e == "function", L$2 = (e, o, t) => { for (const n in t) { const s = "set" + Je(n); e[s] ? watch( () => t[n], (r, l) => { e[s](r, l); } ) : o[s] && watch( () => t[n], (r) => { o[s](r); } ); } }, f = (e, o, t = {}) => { const n = { ...t }; for (const s in e) { const r = o[s], l = e[s]; r && (r && r.custom === true || l !== void 0 && (n[s] = l)); } return n; }, T = (e) => { const o = {}, t = {}; for (const n in e) if (n.startsWith("on") && !n.startsWith("onUpdate") && n !== "onReady") { const s = n.slice(2).toLocaleLowerCase(); o[s] = e[n]; } else t[n] = e[n]; return { listeners: o, attrs: t }; }, qe = async (e) => { const o = await Promise.all([ import("./marker-icon-2x-DN7sBQTc.js"), import("./marker-icon-Dxo8DtlK.js"), import("./marker-shadow-BWlltkiu.js") ]); delete e.Default.prototype._getIconUrl, e.Default.mergeOptions({ iconRetinaUrl: o[0].default, iconUrl: o[1].default, shadowUrl: o[2].default }); }, Y = (e) => { const o = ref( (...n) => console.warn(`Method ${e} has been invoked without being replaced`) ), t = (...n) => o.value(...n); return t.wrapped = o, provide(e, t), t; }, V = (e, o) => e.wrapped.value = o, b = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || globalThis, m = (e) => { const o = inject(e); if (o === void 0) throw new Error( `Attempt to inject ${e.description} before it was provided.` ); return o; }, h = Symbol( "useGlobalLeaflet" ), M = Symbol("addLayer"), ee = Symbol("removeLayer"), H = Symbol( "registerControl" ), me = Symbol( "registerLayerControl" ), ve = Symbol( "canSetParentHtml" ), be = Symbol("setParentHtml"), fe = Symbol("setIcon"), ge = Symbol("bindPopup"), Le = Symbol("bindTooltip"), he = Symbol("unbindPopup"), Oe = Symbol("unbindTooltip"), W = { options: { type: Object, default: () => ({}), custom: true } }, J = (e) => ({ options: e.options, methods: {} }), D2 = { ...W, pane: { type: String }, attribution: { type: String }, name: { type: String, custom: true }, layerType: { type: String, custom: true }, visible: { type: Boolean, custom: true, default: true } }, q = (e, o, t) => { const n = m(M), s = m(ee), { options: r, methods: l } = J(e), a = f( e, D2, r ), i = () => n({ leafletObject: o.value }), u = () => s({ leafletObject: o.value }), d = { ...l, setAttribution(y) { u(), o.value.options.attribution = y, e.visible && i(); }, setName() { u(), e.visible && i(); }, setLayerType() { u(), e.visible && i(); }, setVisible(y) { o.value && (y ? i() : u()); }, bindPopup(y) { if (!o.value || !k(o.value.bindPopup)) { console.warn( "Attempt to bind popup before bindPopup method available on layer." ); return; } o.value.bindPopup(y); }, bindTooltip(y) { if (!o.value || !k(o.value.bindTooltip)) { console.warn( "Attempt to bind tooltip before bindTooltip method available on layer." ); return; } o.value.bindTooltip(y); }, unbindTooltip() { o.value && (k(o.value.closeTooltip) && o.value.closeTooltip(), k(o.value.unbindTooltip) && o.value.unbindTooltip()); }, unbindPopup() { o.value && (k(o.value.closePopup) && o.value.closePopup(), k(o.value.unbindPopup) && o.value.unbindPopup()); }, updateVisibleProp(y) { t.emit("update:visible", y); } }; return provide(ge, d.bindPopup), provide(Le, d.bindTooltip), provide(he, d.unbindPopup), provide(Oe, d.unbindTooltip), onUnmounted(() => { d.unbindPopup(), d.unbindTooltip(), u(); }), { options: a, methods: d }; }, G = (e, o) => { if (e && o.default) return h$1("div", { style: { display: "none" } }, o.default()); }, Se = { ...D2, interactive: { type: Boolean, default: void 0 }, bubblingMouseEvents: { type: Boolean, default: void 0 } }, Ke = (e, o, t) => { const { options: n, methods: s } = q( e, o, t ); return { options: f( e, Se, n ), methods: s }; }, ne = { ...Se, stroke: { type: Boolean, default: void 0 }, color: { type: String }, weight: { type: Number }, opacity: { type: Number }, lineCap: { type: String }, lineJoin: { type: String }, dashArray: { type: String }, dashOffset: { type: String }, fill: { type: Boolean, default: void 0 }, fillColor: { type: String }, fillOpacity: { type: Number }, fillRule: { type: String }, className: { type: String } }, _e = (e, o, t) => { const { options: n, methods: s } = Ke(e, o, t), r = f( e, ne, n ), l = m(ee), a = { ...s, setStroke(i) { o.value.setStyle({ stroke: i }); }, setColor(i) { o.value.setStyle({ color: i }); }, setWeight(i) { o.value.setStyle({ weight: i }); }, setOpacity(i) { o.value.setStyle({ opacity: i }); }, setLineCap(i) { o.value.setStyle({ lineCap: i }); }, setLineJoin(i) { o.value.setStyle({ lineJoin: i }); }, setDashArray(i) { o.value.setStyle({ dashArray: i }); }, setDashOffset(i) { o.value.setStyle({ dashOffset: i }); }, setFill(i) { o.value.setStyle({ fill: i }); }, setFillColor(i) { o.value.setStyle({ fillColor: i }); }, setFillOpacity(i) { o.value.setStyle({ fillOpacity: i }); }, setFillRule(i) { o.value.setStyle({ fillRule: i }); }, setClassName(i) { o.value.setStyle({ className: i }); } }; return onBeforeUnmount(() => { l({ leafletObject: o.value }); }), { options: r, methods: a }; }, re = { ...ne, /** * Radius of the marker in pixels. */ radius: { type: Number }, latLng: { type: [Object, Array], required: true, custom: true } }, je = (e, o, t) => { const { options: n, methods: s } = _e( e, o, t ), r = f( e, re, n ), l = { ...s, setRadius(a) { o.value.setRadius(a); }, setLatLng(a) { o.value.setLatLng(a); } }; return { options: r, methods: l }; }, Pe = { ...re, /** * Radius of the circle in meters. */ radius: { type: Number } }, Qe = (e, o, t) => { const { options: n, methods: s } = je(e, o, t), r = f( e, Pe, n ), l = { ...s }; return { options: r, methods: l }; }; defineComponent({ name: "LCircle", props: Pe, setup(e, o) { const t = ref(), n = ref(false), s = inject(h), r = m(M), { options: l, methods: a } = Qe(e, t, o); return onMounted(async () => { const { circle: i } = s ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"); t.value = markRaw(i(e.latLng, l)); const { listeners: u } = T(o.attrs); t.value.on(u), L$2(a, t.value, e), r({ ...e, ...a, leafletObject: t.value }), n.value = true, nextTick(() => o.emit("ready", t.value)); }), { ready: n, leafletObject: t }; }, render() { return G(this.ready, this.$slots); } }); defineComponent({ name: "LCircleMarker", props: re, setup(e, o) { const t = ref(), n = ref(false), s = inject(h), r = m(M), { options: l, methods: a } = je( e, t, o ); return onMounted(async () => { const { circleMarker: i } = s ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"); t.value = markRaw( i(e.latLng, l) ); const { listeners: u } = T(o.attrs); t.value.on(u), L$2(a, t.value, e), r({ ...e, ...a, leafletObject: t.value }), n.value = true, nextTick(() => o.emit("ready", t.value)); }), { ready: n, leafletObject: t }; }, render() { return G(this.ready, this.$slots); } }); const F = { ...W, position: { type: String } }, K = (e, o) => { const { options: t, methods: n } = J(e), s = f( e, F, t ), r = { ...n, setPosition(l) { o.value && o.value.setPosition(l); } }; return onUnmounted(() => { o.value && o.value.remove(); }), { options: s, methods: r }; }, Xe = (e) => e.default ? h$1("div", { ref: "root" }, e.default()) : null; defineComponent({ name: "LControl", props: { ...F, disableClickPropagation: { type: Boolean, custom: true, default: true }, disableScrollPropagation: { type: Boolean, custom: true, default: false } }, setup(e, o) { const t = ref(), n = ref(), s = inject(h), r = m(H), { options: l, methods: a } = K(e, t); return onMounted(async () => { const { Control: i, DomEvent: u } = s ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"), d = i.extend({ onAdd() { return n.value; } }); t.value = markRaw(new d(l)), L$2(a, t.value, e), r({ leafletObject: t.value }), e.disableClickPropagation && n.value && u.disableClickPropagation(n.value), e.disableScrollPropagation && n.value && u.disableScrollPropagation(n.value), nextTick(() => o.emit("ready", t.value)); }), { root: n, leafletObject: t }; }, render() { return Xe(this.$slots); } }); const Ce = { ...F, prefix: { type: String } }, Ye = (e, o) => { const { options: t, methods: n } = K( e, o ), s = f( e, Ce, t ), r = { ...n, setPrefix(l) { o.value.setPrefix(l); } }; return { options: s, methods: r }; }; defineComponent({ name: "LControlAttribution", props: Ce, setup(e, o) { const t = ref(), n = inject(h), s = m(H), { options: r, methods: l } = Ye(e, t); return onMounted(async () => { const { control: a } = n ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"); t.value = markRaw( a.attribution(r) ), L$2(l, t.value, e), s({ leafletObject: t.value }), nextTick(() => o.emit("ready", t.value)); }), { leafletObject: t }; }, render() { return null; } }); const Te = { ...F, collapsed: { type: Boolean, default: void 0 }, autoZIndex: { type: Boolean, default: void 0 }, hideSingleBase: { type: Boolean, default: void 0 }, sortLayers: { type: Boolean, default: void 0 }, sortFunction: { type: Function } }, Ve = (e, o) => { const { options: t } = K(e, o); return { options: f( e, Te, t ), methods: { addLayer(r) { r.layerType === "base" ? o.value.addBaseLayer(r.leafletObject, r.name) : r.layerType === "overlay" && o.value.addOverlay(r.leafletObject, r.name); }, removeLayer(r) { o.value.removeLayer(r.leafletObject); } } }; }; defineComponent({ name: "LControlLayers", props: Te, setup(e, o) { const t = ref(), n = inject(h), s = m(me), { options: r, methods: l } = Ve(e, t); return onMounted(async () => { const { control: a } = n ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"); t.value = markRaw( a.layers(void 0, void 0, r) ), L$2(l, t.value, e), s({ ...e, ...l, leafletObject: t.value }), nextTick(() => o.emit("ready", t.value)); }), { leafletObject: t }; }, render() { return null; } }); const Me = { ...F, maxWidth: { type: Number }, metric: { type: Boolean, default: void 0 }, imperial: { type: Boolean, default: void 0 }, updateWhenIdle: { type: Boolean, default: void 0 } }, xe = (e, o) => { const { options: t, methods: n } = K( e, o ); return { options: f( e, Me, t ), methods: n }; }; defineComponent({ name: "LControlScale", props: Me, setup(e, o) { const t = ref(), n = inject(h), s = m(H), { options: r, methods: l } = xe(e, t); return onMounted(async () => { const { control: a } = n ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"); t.value = markRaw(a.scale(r)), L$2(l, t.value, e), s({ leafletObject: t.value }), nextTick(() => o.emit("ready", t.value)); }), { leafletObject: t }; }, render() { return null; } }); const Be = { ...F, zoomInText: { type: String }, zoomInTitle: { type: String }, zoomOutText: { type: String }, zoomOutTitle: { type: String } }, Re = (e, o) => { const { options: t, methods: n } = K( e, o ); return { options: f( e, Be, t ), methods: n }; }; defineComponent({ name: "LControlZoom", props: Be, setup(e, o) { const t = ref(), n = inject(h), s = m(H), { options: r, methods: l } = Re(e, t); return onMounted(async () => { const { control: a } = n ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"); t.value = markRaw(a.zoom(r)), L$2(l, t.value, e), s({ leafletObject: t.value }), nextTick(() => o.emit("ready", t.value)); }), { leafletObject: t }; }, render() { return null; } }); const te = { ...D2 }, se = (e, o, t) => { const { options: n, methods: s } = q( e, o, t ), r = f( e, te, n ), l = { ...s, addLayer(a) { o.value.addLayer(a.leafletObject); }, removeLayer(a) { o.value.removeLayer(a.leafletObject); } }; return provide(M, l.addLayer), provide(ee, l.removeLayer), { options: r, methods: l }; }, we = { ...te }, et = (e, o, t) => { const { options: n, methods: s } = se( e, o, t ), r = f( e, we, n ), l = { ...s }; return { options: r, methods: l }; }; defineComponent({ props: we, setup(e, o) { const t = ref(), n = ref(false), s = inject(h), r = m(M), { methods: l, options: a } = et( e, t, o ); return onMounted(async () => { const { featureGroup: i } = s ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"); t.value = markRaw( i(void 0, a) ); const { listeners: u } = T(o.attrs); t.value.on(u), L$2(l, t.value, e), r({ ...e, ...l, leafletObject: t.value }), n.value = true, nextTick(() => o.emit("ready", t.value)); }), { ready: n, leafletObject: t }; }, render() { return G(this.ready, this.$slots); } }); const Ie = { ...te, geojson: { type: [Object, Array], custom: true }, optionsStyle: { type: Function, custom: true } }, tt = (e, o, t) => { const { options: n, methods: s } = se( e, o, t ), r = f( e, Ie, n ); Object.prototype.hasOwnProperty.call(e, "optionsStyle") && (r.style = e.optionsStyle); const l = { ...s, setGeojson(a) { o.value.clearLayers(), o.value.addData(a); }, setOptionsStyle(a) { o.value.setStyle(a); }, getGeoJSONData() { return o.value.toGeoJSON(); }, getBounds() { return o.value.getBounds(); } }; return { options: r, methods: l }; }, no = defineComponent({ props: Ie, setup(e, o) { const t = ref(), n = ref(false), s = inject(h), r = m(M), { methods: l, options: a } = tt(e, t, o); return onMounted(async () => { const { geoJSON: i } = s ? b.L : await import("./leaflet-src.esm-BLb1zVo4.js"); t.value = markRaw(i(e.geojson, a)); const { listeners: u } = T(o.attrs); t.value.on(u), L$2(l, t.value, e), r({ ...e, ...l, leafletObject: t.value }), n.value = true, nextTick(() => o.emit("ready", t.value)); }), { ready: n, leafletObject: t }; }, render() { return G(this.ready, this.$slots); } }), ae = { ...D2, opacity: { type: Number }, zIndex: { type: Number }, tileSize: { type: [Number, Array, Object] }, noWrap: { type: Boolean, default: void 0 }, minZoom: { type: Number }, maxZoom: { type: Number }, className: { type: String } }, Ae = (e, o, t) => { const { options: n, methods: s } = q( e, o, t ), r = f( e, ae, n ), l = { ...s, setTileComponent() { var a; (a =