@aizu-chat/react 0.0.10 → 0.1.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.
@@ -1,1186 +0,0 @@
1
- 'use client'
2
- import {
3
- __async,
4
- __objRest,
5
- __spreadProps,
6
- __spreadValues
7
- } from "./chunk-33CPD3DF.mjs";
8
-
9
- // #style-inject:#style-inject
10
- function styleInject(css, { insertAt } = {}) {
11
- if (!css || typeof document === "undefined") return;
12
- const head = document.head || document.getElementsByTagName("head")[0];
13
- const style = document.createElement("style");
14
- style.type = "text/css";
15
- if (insertAt === "top") {
16
- if (head.firstChild) {
17
- head.insertBefore(style, head.firstChild);
18
- } else {
19
- head.appendChild(style);
20
- }
21
- } else {
22
- head.appendChild(style);
23
- }
24
- if (style.styleSheet) {
25
- style.styleSheet.cssText = css;
26
- } else {
27
- style.appendChild(document.createTextNode(css));
28
- }
29
- }
30
-
31
- // src/global.css
32
- styleInject('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root,\n :host {\n --font-sans:\n ui-sans-serif,\n system-ui,\n sans-serif,\n "Apple Color Emoji",\n "Segoe UI Emoji",\n "Segoe UI Symbol",\n "Noto Color Emoji";\n --font-mono:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n --color-orange-200: oklch(90.1% 0.076 70.697);\n --color-orange-300: oklch(83.7% 0.128 66.29);\n --color-orange-400: oklch(75% 0.183 55.934);\n --color-orange-500: oklch(70.5% 0.213 47.604);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-blue-600: oklch(54.6% 0.245 262.881);\n --color-gray-100: oklch(96.7% 0.003 264.542);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-900: oklch(21% 0.034 264.665);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --font-weight-bold: 700;\n --radius-3xl: 1.5rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n --font-sukhumvit:\n "Sukhumvit Set",\n ui-sans-serif,\n system-ui,\n sans-serif;\n --animate-circle-keys: circle-keys 2s ease-in-out infinite;\n }\n}\n@layer base {\n *,\n ::after,\n ::before,\n ::backdrop,\n ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html,\n :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b,\n strong {\n font-weight: bolder;\n }\n code,\n kbd,\n samp,\n pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol,\n ul,\n menu {\n list-style: none;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n vertical-align: middle;\n }\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n button,\n input,\n select,\n optgroup,\n textarea,\n ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit,\n ::-webkit-datetime-edit-year-field,\n ::-webkit-datetime-edit-month-field,\n ::-webkit-datetime-edit-day-field,\n ::-webkit-datetime-edit-hour-field,\n ::-webkit-datetime-edit-minute-field,\n ::-webkit-datetime-edit-second-field,\n ::-webkit-datetime-edit-millisecond-field,\n ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button,\n input:where([type=button], [type=reset], [type=submit]),\n ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button,\n ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=until-found])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-auto {\n pointer-events: auto;\n }\n .pointer-events-none {\n pointer-events: none;\n }\n .invisible {\n visibility: hidden;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .right-0 {\n right: calc(var(--spacing) * 0);\n }\n .right-2 {\n right: calc(var(--spacing) * 2);\n }\n .right-5 {\n right: calc(var(--spacing) * 5);\n }\n .bottom-0 {\n bottom: calc(var(--spacing) * 0);\n }\n .bottom-5 {\n bottom: calc(var(--spacing) * 5);\n }\n .z-10 {\n z-index: 10;\n }\n .z-9998 {\n z-index: 9998;\n }\n .z-9999 {\n z-index: 9999;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-2 {\n margin-top: calc(var(--spacing) * 2);\n }\n .mt-auto {\n margin-top: auto;\n }\n .mr-3 {\n margin-right: calc(var(--spacing) * 3);\n }\n .mr-auto {\n margin-right: auto;\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .ml-auto {\n margin-left: auto;\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .aspect-square {\n aspect-ratio: 1 / 1;\n }\n .h-2 {\n height: calc(var(--spacing) * 2);\n }\n .h-8 {\n height: calc(var(--spacing) * 8);\n }\n .h-10 {\n height: calc(var(--spacing) * 10);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-29\\.5 {\n height: calc(var(--spacing) * 29.5);\n }\n .h-42\\.5 {\n height: calc(var(--spacing) * 42.5);\n }\n .h-full {\n height: 100%;\n }\n .min-h-full {\n min-height: 100%;\n }\n .w-2 {\n width: calc(var(--spacing) * 2);\n }\n .w-8 {\n width: calc(var(--spacing) * 8);\n }\n .w-10 {\n width: calc(var(--spacing) * 10);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-75\\.5 {\n width: calc(var(--spacing) * 75.5);\n }\n .w-full {\n width: 100%;\n }\n .max-w-69\\.5 {\n max-width: calc(var(--spacing) * 69.5);\n }\n .max-w-75\\.5 {\n max-width: calc(var(--spacing) * 75.5);\n }\n .min-w-\\[100px\\] {\n min-width: 100px;\n }\n .min-w-max {\n min-width: max-content;\n }\n .flex-1 {\n flex: 1;\n }\n .shrink-0 {\n flex-shrink: 0;\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-y-0 {\n --tw-translate-y: calc(var(--spacing) * 0);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-y-4 {\n --tw-translate-y: calc(var(--spacing) * 4);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .animate-circle-keys {\n animation: var(--animate-circle-keys);\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .space-y-1 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .gap-x-1 {\n column-gap: calc(var(--spacing) * 1);\n }\n .gap-x-2 {\n column-gap: calc(var(--spacing) * 2);\n }\n .gap-y-3 {\n row-gap: calc(var(--spacing) * 3);\n }\n .overflow-hidden {\n overflow: hidden;\n }\n .overflow-x-scroll {\n overflow-x: scroll;\n }\n .overflow-y-auto {\n overflow-y: auto;\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-3xl {\n border-radius: var(--radius-3xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-none {\n --tw-border-style: none;\n border-style: none;\n }\n .border-black\\/50 {\n border-color: color-mix(in srgb, #000 50%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--color-black) 50%, transparent);\n }\n }\n .border-blue-500 {\n border-color: var(--color-blue-500);\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-orange-300 {\n border-color: var(--color-orange-300);\n }\n .border-orange-400 {\n border-color: var(--color-orange-400);\n }\n .bg-\\[\\#3D3D3D\\] {\n background-color: #3D3D3D;\n }\n .bg-\\[\\#F8F8FA\\] {\n background-color: #F8F8FA;\n }\n .bg-black\\/50 {\n background-color: color-mix(in srgb, #000 50%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 50%, transparent);\n }\n }\n .bg-blue-500 {\n background-color: var(--color-blue-500);\n }\n .bg-gray-100 {\n background-color: var(--color-gray-100);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-orange-200 {\n background-color: var(--color-orange-200);\n }\n .bg-orange-400 {\n background-color: var(--color-orange-400);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .bg-linear-to-l {\n --tw-gradient-position: to left;\n @supports (background-image: linear-gradient(in lab, red, red)) {\n --tw-gradient-position: to left in oklab;\n }\n background-image: linear-gradient(var(--tw-gradient-stops));\n }\n .from-white {\n --tw-gradient-from: var(--color-white);\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n .to-transparent {\n --tw-gradient-to: transparent;\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-2\\.5 {\n padding: calc(var(--spacing) * 2.5);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-2 {\n padding-top: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pr-12 {\n padding-right: calc(var(--spacing) * 12);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .text-center {\n text-align: center;\n }\n .text-left {\n text-align: left;\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .text-\\[10px\\] {\n font-size: 10px;\n }\n .text-\\[12px\\] {\n font-size: 12px;\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .text-nowrap {\n text-wrap: nowrap;\n }\n .whitespace-pre-wrap {\n white-space: pre-wrap;\n }\n .text-\\[\\#3D3D3D\\] {\n color: #3D3D3D;\n }\n .text-\\[\\#7C7C7C\\] {\n color: #7C7C7C;\n }\n .text-\\[\\#FFF8EC\\] {\n color: #FFF8EC;\n }\n .text-black {\n color: var(--color-black);\n }\n .text-black\\/85 {\n color: color-mix(in srgb, #000 85%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, var(--color-black) 85%, transparent);\n }\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-gray-900 {\n color: var(--color-gray-900);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-orange-500 {\n color: var(--color-orange-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .opacity-0 {\n opacity: 0%;\n }\n .opacity-100 {\n opacity: 100%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n .shadow-orange-blur {\n --tw-shadow: 0 4px 20px 0 var(--tw-shadow-color, #a1440299);\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n .shadow-orange-400 {\n --tw-shadow-color: oklch(75% 0.183 55.934);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-shadow-color: color-mix(in oklab, var(--color-orange-400) var(--tw-shadow-alpha), transparent);\n }\n }\n .filter {\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n outline-color,\n text-decoration-color,\n fill,\n stroke,\n --tw-gradient-from,\n --tw-gradient-via,\n --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-300 {\n --tw-duration: 300ms;\n transition-duration: 300ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .outline-none {\n --tw-outline-style: none;\n outline-style: none;\n }\n .focus-within\\:ring-2 {\n &:focus-within {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n }\n .focus-within\\:ring-orange-300 {\n &:focus-within {\n --tw-ring-color: var(--color-orange-300);\n }\n }\n .hover\\:bg-blue-600 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-blue-600);\n }\n }\n }\n .hover\\:bg-gray-200 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-200);\n }\n }\n }\n .hover\\:bg-gray-300 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-300);\n }\n }\n }\n .hover\\:opacity-70 {\n &:hover {\n @media (hover: hover) {\n opacity: 70%;\n }\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .disabled\\:cursor-not-allowed {\n &:disabled {\n cursor: not-allowed;\n }\n }\n .disabled\\:bg-gray-300 {\n &:disabled {\n background-color: var(--color-gray-300);\n }\n }\n .disabled\\:bg-gray-400 {\n &:disabled {\n background-color: var(--color-gray-400);\n }\n }\n .disabled\\:opacity-50 {\n &:disabled {\n opacity: 50%;\n }\n }\n .lg\\:invisible {\n @media (width >= 64rem) {\n visibility: hidden;\n }\n }\n .lg\\:visible {\n @media (width >= 64rem) {\n visibility: visible;\n }\n }\n .lg\\:top-auto {\n @media (width >= 64rem) {\n top: auto;\n }\n }\n .lg\\:right-1\\/2 {\n @media (width >= 64rem) {\n right: calc(1/2 * 100%);\n }\n }\n .lg\\:right-5 {\n @media (width >= 64rem) {\n right: calc(var(--spacing) * 5);\n }\n }\n .lg\\:bottom-25 {\n @media (width >= 64rem) {\n bottom: calc(var(--spacing) * 25);\n }\n }\n .lg\\:hidden {\n @media (width >= 64rem) {\n display: none;\n }\n }\n .lg\\:h-46 {\n @media (width >= 64rem) {\n height: calc(var(--spacing) * 46);\n }\n }\n .lg\\:h-\\[calc\\(100vh-100px\\)\\] {\n @media (width >= 64rem) {\n height: calc(100vh - 100px);\n }\n }\n .lg\\:max-h-201 {\n @media (width >= 64rem) {\n max-height: calc(var(--spacing) * 201);\n }\n }\n .lg\\:w-107\\.5 {\n @media (width >= 64rem) {\n width: calc(var(--spacing) * 107.5);\n }\n }\n .lg\\:w-\\[calc\\(100vw-100px\\)\\] {\n @media (width >= 64rem) {\n width: calc(100vw - 100px);\n }\n }\n .lg\\:max-w-80 {\n @media (width >= 64rem) {\n max-width: calc(var(--spacing) * 80);\n }\n }\n .lg\\:max-w-289 {\n @media (width >= 64rem) {\n max-width: calc(var(--spacing) * 289);\n }\n }\n .lg\\:translate-x-1\\/2 {\n @media (width >= 64rem) {\n --tw-translate-x: calc(1/2 * 100%);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .lg\\:flex-wrap {\n @media (width >= 64rem) {\n flex-wrap: wrap;\n }\n }\n .lg\\:rounded-4xl {\n @media (width >= 64rem) {\n border-radius: var(--radius-4xl);\n }\n }\n}\n@layer base {\n * {\n font-family: var(--font-sukhumvit);\n }\n}\n@layer utilities {\n .scrollbar-hide::-webkit-scrollbar {\n display: none;\n }\n .scrollbar-hide {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n .animation-delay-0 {\n animation-delay: 0s;\n }\n .animation-delay-300 {\n animation-delay: 0.3s;\n }\n .animation-delay-600 {\n animation-delay: 0.6s;\n }\n .animation-delay-900 {\n animation-delay: 0.9s;\n }\n .animation-delay-1200 {\n animation-delay: 1.2s;\n }\n}\n@property --tw-translate-x { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-translate-y { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-translate-z { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-space-y-reverse { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }\n@property --tw-gradient-position { syntax: "*"; inherits: false; }\n@property --tw-gradient-from { syntax: "<color>"; inherits: false; initial-value: #0000; }\n@property --tw-gradient-via { syntax: "<color>"; inherits: false; initial-value: #0000; }\n@property --tw-gradient-to { syntax: "<color>"; inherits: false; initial-value: #0000; }\n@property --tw-gradient-stops { syntax: "*"; inherits: false; }\n@property --tw-gradient-via-stops { syntax: "*"; inherits: false; }\n@property --tw-gradient-from-position { syntax: "<length-percentage>"; inherits: false; initial-value: 0%; }\n@property --tw-gradient-via-position { syntax: "<length-percentage>"; inherits: false; initial-value: 50%; }\n@property --tw-gradient-to-position { syntax: "<length-percentage>"; inherits: false; initial-value: 100%; }\n@property --tw-font-weight { syntax: "*"; inherits: false; }\n@property --tw-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-shadow-color { syntax: "*"; inherits: false; }\n@property --tw-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }\n@property --tw-inset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-inset-shadow-color { syntax: "*"; inherits: false; }\n@property --tw-inset-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }\n@property --tw-ring-color { syntax: "*"; inherits: false; }\n@property --tw-ring-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-inset-ring-color { syntax: "*"; inherits: false; }\n@property --tw-inset-ring-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-ring-inset { syntax: "*"; inherits: false; }\n@property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }\n@property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }\n@property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-blur { syntax: "*"; inherits: false; }\n@property --tw-brightness { syntax: "*"; inherits: false; }\n@property --tw-contrast { syntax: "*"; inherits: false; }\n@property --tw-grayscale { syntax: "*"; inherits: false; }\n@property --tw-hue-rotate { syntax: "*"; inherits: false; }\n@property --tw-invert { syntax: "*"; inherits: false; }\n@property --tw-opacity { syntax: "*"; inherits: false; }\n@property --tw-saturate { syntax: "*"; inherits: false; }\n@property --tw-sepia { syntax: "*"; inherits: false; }\n@property --tw-drop-shadow { syntax: "*"; inherits: false; }\n@property --tw-drop-shadow-color { syntax: "*"; inherits: false; }\n@property --tw-drop-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }\n@property --tw-drop-shadow-size { syntax: "*"; inherits: false; }\n@property --tw-duration { syntax: "*"; inherits: false; }\n@property --tw-ease { syntax: "*"; inherits: false; }\n@keyframes circle-keys {\n 0% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(0.7);\n opacity: 1;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *,\n ::before,\n ::after,\n ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-gradient-position: initial;\n --tw-gradient-from: #0000;\n --tw-gradient-via: #0000;\n --tw-gradient-to: #0000;\n --tw-gradient-stops: initial;\n --tw-gradient-via-stops: initial;\n --tw-gradient-from-position: 0%;\n --tw-gradient-via-position: 50%;\n --tw-gradient-to-position: 100%;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-blur: initial;\n --tw-brightness: initial;\n --tw-contrast: initial;\n --tw-grayscale: initial;\n --tw-hue-rotate: initial;\n --tw-invert: initial;\n --tw-opacity: initial;\n --tw-saturate: initial;\n --tw-sepia: initial;\n --tw-drop-shadow: initial;\n --tw-drop-shadow-color: initial;\n --tw-drop-shadow-alpha: 100%;\n --tw-drop-shadow-size: initial;\n --tw-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n');
33
-
34
- // src/utils/cn.ts
35
- import { clsx } from "clsx";
36
- import { twMerge } from "tailwind-merge";
37
- function cn(...args) {
38
- return twMerge(clsx(args));
39
- }
40
-
41
- // src/assets/icons/ai/index.tsx
42
- import { jsx, jsxs } from "react/jsx-runtime";
43
- var IconAI = (_a) => {
44
- var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
45
- return /* @__PURE__ */ jsxs(
46
- "svg",
47
- __spreadProps(__spreadValues({
48
- width: "64",
49
- height: "64",
50
- viewBox: "0 0 64 64",
51
- fill: "none",
52
- xmlns: "http://www.w3.org/2000/svg",
53
- className: cn("w-8 h-8", className)
54
- }, props), {
55
- children: [
56
- /* @__PURE__ */ jsx("title", { children: "Icon AI" }),
57
- /* @__PURE__ */ jsx("g", { filter: "url(#filter0_ii_48_32)", children: /* @__PURE__ */ jsx("circle", { cx: "32.0001", cy: "32", r: "32", fill: "url(#paint0_linear_48_32)" }) }),
58
- /* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M34.2288 17.7789C33.9922 16.7384 33.0671 16 32 16C30.9329 16 30.0078 16.7384 29.7712 17.7789L28.5065 23.3405C27.9216 25.9129 25.9129 27.9216 23.3405 28.5065L17.7789 29.7712C16.7384 30.0078 16 30.9329 16 32C16 33.0671 16.7384 33.9922 17.7789 34.2288L23.3405 35.4935C25.9129 36.0784 27.9216 38.0871 28.5065 40.6595L29.7712 46.2211C30.0078 47.2616 30.9329 48 32 48C33.0671 48 33.9922 47.2616 34.2288 46.2211L35.4935 40.6595C36.0784 38.0871 38.0871 36.0784 40.6595 35.4935L46.2211 34.2288C47.2616 33.9922 48 33.0671 48 32C48 30.9329 47.2616 30.0078 46.2211 29.7712L40.6595 28.5065C38.0871 27.9216 36.0784 25.9129 35.4935 23.3405L34.2288 17.7789Z", fill: "url(#paint1_linear_48_32)" }),
59
- /* @__PURE__ */ jsxs("defs", { children: [
60
- /* @__PURE__ */ jsxs("filter", { id: "filter0_ii_48_32", x: "0.00012207", y: "0", width: "63.9999", height: "64", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [
61
- /* @__PURE__ */ jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
62
- /* @__PURE__ */ jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
63
- /* @__PURE__ */ jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
64
- /* @__PURE__ */ jsx("feMorphology", { radius: "4", operator: "erode", in: "SourceAlpha", result: "effect1_innerShadow_48_32" }),
65
- /* @__PURE__ */ jsx("feOffset", {}),
66
- /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "4" }),
67
- /* @__PURE__ */ jsx("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
68
- /* @__PURE__ */ jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0" }),
69
- /* @__PURE__ */ jsx("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_48_32" }),
70
- /* @__PURE__ */ jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
71
- /* @__PURE__ */ jsx("feOffset", {}),
72
- /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "1" }),
73
- /* @__PURE__ */ jsx("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
74
- /* @__PURE__ */ jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.3 0" }),
75
- /* @__PURE__ */ jsx("feBlend", { mode: "normal", in2: "effect1_innerShadow_48_32", result: "effect2_innerShadow_48_32" })
76
- ] }),
77
- /* @__PURE__ */ jsxs("linearGradient", { id: "paint0_linear_48_32", x1: "32.0001", y1: "-5.96047e-08", x2: "32.0001", y2: "64", gradientUnits: "userSpaceOnUse", children: [
78
- /* @__PURE__ */ jsx("stop", { stopColor: "#3D3D3D" }),
79
- /* @__PURE__ */ jsx("stop", { offset: "0.496312" }),
80
- /* @__PURE__ */ jsx("stop", { offset: "0.723156", stopColor: "#803500" }),
81
- /* @__PURE__ */ jsx("stop", { offset: "0.95", stopColor: "#FF6A00" })
82
- ] }),
83
- /* @__PURE__ */ jsxs("linearGradient", { id: "paint1_linear_48_32", x1: "32", y1: "16", x2: "32", y2: "48", gradientUnits: "userSpaceOnUse", children: [
84
- /* @__PURE__ */ jsx("stop", { stopColor: "white" }),
85
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#EBEBEB" })
86
- ] })
87
- ] })
88
- ]
89
- })
90
- );
91
- };
92
-
93
- // src/assets/icons/arrow-narrow-up/index.tsx
94
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
95
- var IconArrowNarrowUp = (_a) => {
96
- var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
97
- return /* @__PURE__ */ jsxs2(
98
- "svg",
99
- __spreadProps(__spreadValues({
100
- width: "20",
101
- height: "20",
102
- viewBox: "0 0 20 20",
103
- fill: "none",
104
- xmlns: "http://www.w3.org/2000/svg",
105
- className
106
- }, props), {
107
- children: [
108
- /* @__PURE__ */ jsx2("title", { children: "Arrow Narrow up" }),
109
- /* @__PURE__ */ jsx2(
110
- "path",
111
- {
112
- d: "M10 16.6666V3.33331M10 3.33331L5 8.33331M10 3.33331L15 8.33331",
113
- stroke: "currentColor",
114
- strokeWidth: "2",
115
- strokeLinecap: "round",
116
- strokeLinejoin: "round"
117
- }
118
- )
119
- ]
120
- })
121
- );
122
- };
123
-
124
- // src/assets/icons/chevron-left/index.tsx
125
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
126
- var IconChevronLeft = (_a) => {
127
- var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
128
- return /* @__PURE__ */ jsxs3(
129
- "svg",
130
- __spreadProps(__spreadValues({
131
- width: "20",
132
- height: "20",
133
- viewBox: "0 0 20 20",
134
- fill: "none",
135
- xmlns: "http://www.w3.org/2000/svg",
136
- className
137
- }, props), {
138
- children: [
139
- /* @__PURE__ */ jsx3("title", { children: "Chevron Left" }),
140
- /* @__PURE__ */ jsx3(
141
- "path",
142
- {
143
- d: "M12.5 15L7.5 10L12.5 5",
144
- stroke: "currentColor",
145
- strokeWidth: "1.5",
146
- strokeLinecap: "round",
147
- strokeLinejoin: "round"
148
- }
149
- )
150
- ]
151
- })
152
- );
153
- };
154
-
155
- // src/assets/icons/expand/index.tsx
156
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
157
- var IconExpand = (_a) => {
158
- var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
159
- return /* @__PURE__ */ jsxs4(
160
- "svg",
161
- __spreadProps(__spreadValues({
162
- width: "20",
163
- height: "20",
164
- viewBox: "0 0 20 20",
165
- fill: "none",
166
- xmlns: "http://www.w3.org/2000/svg",
167
- className: cn("text-[#3D3D3D]", className)
168
- }, props), {
169
- children: [
170
- /* @__PURE__ */ jsx4("title", { children: "Icon Expand" }),
171
- /* @__PURE__ */ jsx4(
172
- "path",
173
- {
174
- d: "M11.6667 8.33333L17.5 2.5M17.5 2.5H12.5M17.5 2.5V7.5M8.33333 11.6667L2.5 17.5M2.5 17.5H7.5M2.5 17.5L2.5 12.5",
175
- stroke: "currentColor",
176
- strokeWidth: "1.5",
177
- strokeLinecap: "round",
178
- strokeLinejoin: "round"
179
- }
180
- )
181
- ]
182
- })
183
- );
184
- };
185
-
186
- // src/assets/icons/image-plus/index.tsx
187
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
188
- var IconImagePlus = (_a) => {
189
- var _b = _a, { className = "text-[#FFF8EC]" } = _b, props = __objRest(_b, ["className"]);
190
- return /* @__PURE__ */ jsxs5(
191
- "svg",
192
- __spreadProps(__spreadValues({
193
- width: "20",
194
- height: "20",
195
- viewBox: "0 0 20 20",
196
- fill: "none",
197
- xmlns: "http://www.w3.org/2000/svg",
198
- className
199
- }, props), {
200
- children: [
201
- /* @__PURE__ */ jsx5("title", { children: "Icon Image Plus" }),
202
- /* @__PURE__ */ jsx5(
203
- "path",
204
- {
205
- d: "M10.4167 2.50002H6.5C5.09987 2.50002 4.3998 2.50002 3.86502 2.7725C3.39462 3.01219 3.01217 3.39464 2.77248 3.86504C2.5 4.39982 2.5 5.09989 2.5 6.50002V13.5C2.5 14.9002 2.5 15.6002 2.77248 16.135C3.01217 16.6054 3.39462 16.9879 3.86502 17.2275C4.3998 17.5 5.09987 17.5 6.5 17.5H14.1667C14.9416 17.5 15.3291 17.5 15.647 17.4148C16.5098 17.1837 17.1836 16.5098 17.4148 15.6471C17.5 15.3292 17.5 14.9417 17.5 14.1667M15.8333 6.66669V1.66669M13.3333 4.16669H18.3333M8.75 7.08335C8.75 8.00383 8.00381 8.75002 7.08333 8.75002C6.16286 8.75002 5.41667 8.00383 5.41667 7.08335C5.41667 6.16288 6.16286 5.41669 7.08333 5.41669C8.00381 5.41669 8.75 6.16288 8.75 7.08335ZM12.4917 9.93181L5.44262 16.3401C5.04614 16.7005 4.84789 16.8807 4.83036 17.0368C4.81516 17.1722 4.86704 17.3064 4.96932 17.3963C5.08732 17.5 5.35523 17.5 5.89107 17.5H13.7133C14.9126 17.5 15.5123 17.5 15.9833 17.2985C16.5745 17.0456 17.0456 16.5746 17.2985 15.9833C17.5 15.5123 17.5 14.9126 17.5 13.7133C17.5 13.3098 17.5 13.108 17.4559 12.9201C17.4004 12.684 17.2941 12.4628 17.1444 12.272C17.0252 12.1202 16.8677 11.9941 16.5526 11.7421L14.2215 9.87724C13.9062 9.62494 13.7485 9.4988 13.5748 9.45428C13.4218 9.41504 13.2607 9.42012 13.1104 9.46893C12.94 9.5243 12.7905 9.66014 12.4917 9.93181Z",
206
- stroke: "currentColor",
207
- strokeWidth: "1.5",
208
- strokeLinecap: "round",
209
- strokeLinejoin: "round"
210
- }
211
- )
212
- ]
213
- })
214
- );
215
- };
216
-
217
- // src/assets/icons/x-close/index.tsx
218
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
219
- var IconXClose = (_a) => {
220
- var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
221
- return /* @__PURE__ */ jsxs6(
222
- "svg",
223
- __spreadProps(__spreadValues({
224
- width: "20",
225
- height: "20",
226
- viewBox: "0 0 20 20",
227
- fill: "none",
228
- xmlns: "http://www.w3.org/2000/svg",
229
- className: cn("text-[#3D3D3D]", className)
230
- }, props), {
231
- children: [
232
- /* @__PURE__ */ jsx6("title", { children: "Icon XClose" }),
233
- /* @__PURE__ */ jsx6(
234
- "path",
235
- {
236
- d: "M15 5L5 15M5 5L15 15",
237
- stroke: "currentColor",
238
- strokeWidth: "1.5",
239
- strokeLinecap: "round",
240
- strokeLinejoin: "round"
241
- }
242
- )
243
- ]
244
- })
245
- );
246
- };
247
-
248
- // src/constant/default.ts
249
- var defaultQuickMenuMessage = "\u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35\u0E04\u0E23\u0E31\u0E1A \u{1F44B} ZIMCRAFT \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E0A\u0E48\u0E27\u0E22\u0E04\u0E38\u0E13\u0E2B\u0E32\u0E2D\u0E38\u0E1B\u0E01\u0E23\u0E13\u0E4C IT \u0E17\u0E35\u0E48\u0E15\u0E2D\u0E1A\u0E42\u0E08\u0E17\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14 \u0E44\u0E21\u0E48\u0E27\u0E48\u0E32\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E2D\u0E21\u0E1E\u0E34\u0E27\u0E40\u0E15\u0E2D\u0E23\u0E4C \u0E2D\u0E38\u0E1B\u0E01\u0E23\u0E13\u0E4C\u0E40\u0E2A\u0E23\u0E34\u0E21 \u0E2B\u0E23\u0E37\u0E2D\u0E2D\u0E30\u0E44\u0E23\u0E01\u0E47\u0E15\u0E32\u0E21 \u0E16\u0E32\u0E21\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22\u0E04\u0E23\u0E31\u0E1A \u{1F60A}";
250
- var defaultBanner = "https://utech-dev.zimpligital.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcoupon-banner-th.edad52fd.webp&w=640&q=75";
251
- var defaultQuickMenus = [
252
- { id: "1", title: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F6CD}\uFE0F", value: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32", mockResponse: "QUICK_MENU_SHOP" /* QUICK_MENU_SHOP */ },
253
- { id: "2", title: "\u0E0A\u0E48\u0E27\u0E22\u0E2B\u0E32\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F50D}", value: "\u0E0A\u0E48\u0E27\u0E22\u0E2B\u0E32\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32", mockResponse: "ERROR" /* ERROR */ },
254
- { id: "3", title: "\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E1E\u0E31\u0E2A\u0E14\u0E38 \u{1F69A}", value: "\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E1E\u0E31\u0E2A\u0E14\u0E38", mockResponse: "ERROR" /* ERROR */ },
255
- { id: "4", title: "\u0E2B\u0E31\u0E27\u0E02\u0E49\u0E2D\u0E2D\u0E37\u0E48\u0E19\u0E46 \u{1F4AC}", value: "\u0E2B\u0E31\u0E27\u0E02\u0E49\u0E2D\u0E2D\u0E37\u0E48\u0E19\u0E46", mockResponse: "ERROR" /* ERROR */ }
256
- ];
257
- var defaultCategory = [
258
- { id: "1", title: "\u0E2A\u0E21\u0E32\u0E23\u0E4C\u0E17\u0E42\u0E1F\u0E19", value: "\u0E2A\u0E21\u0E32\u0E23\u0E4C\u0E17\u0E42\u0E1F\u0E19", mockResponse: "CATEGORY_SMARTPHONE" /* CATEGORY_SMARTPHONE */ },
259
- { id: "2", title: "\u0E42\u0E19\u0E4A\u0E15\u0E1A\u0E38\u0E4A\u0E04", value: "\u0E42\u0E19\u0E4A\u0E15\u0E1A\u0E38\u0E4A\u0E04", mockResponse: "CATEGORY_NOTEBOOK" /* CATEGORY_NOTEBOOK */ },
260
- { id: "3", title: "\u0E04\u0E2D\u0E21\u0E1E\u0E34\u0E27\u0E40\u0E15\u0E2D\u0E23\u0E4C", value: "\u0E04\u0E2D\u0E21\u0E1E\u0E34\u0E27\u0E40\u0E15\u0E2D\u0E23\u0E4C", mockResponse: "ERROR" /* ERROR */ },
261
- { id: "4", title: "\u0E40\u0E01\u0E21\u0E21\u0E34\u0E48\u0E07\u0E40\u0E01\u0E35\u0E22\u0E23\u0E4C", value: "\u0E40\u0E01\u0E21\u0E21\u0E34\u0E48\u0E07\u0E40\u0E01\u0E35\u0E22\u0E23\u0E4C", mockResponse: "ERROR" /* ERROR */ },
262
- { id: "5", title: "\u0E40\u0E01\u0E21\u0E04\u0E2D\u0E19\u0E42\u0E0B\u0E25", value: "\u0E40\u0E01\u0E21\u0E04\u0E2D\u0E19\u0E42\u0E0B\u0E25", mockResponse: "ERROR" /* ERROR */ },
263
- { id: "6", title: "\u0E41\u0E01\u0E14\u0E40\u0E08\u0E47\u0E15 ", value: "\u0E41\u0E01\u0E14\u0E40\u0E08\u0E47\u0E15 ", mockResponse: "ERROR" /* ERROR */ }
264
- ];
265
- var tryAgain = "\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07";
266
- var defaultFailMenu = [
267
- { id: "1", title: "\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u{1F504}\xA0", value: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F6CD}\uFE0F", mockResponse: "ERROR" /* ERROR */ },
268
- { id: "2", title: "\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E40\u0E23\u0E32 \u{1F4DE}\xA0", phoneNumber: "099999999", mockResponse: "ERROR" /* ERROR */ }
269
- ];
270
- var defaultQuickMenuChips = [
271
- { id: "1", title: "\u0E0B\u0E37\u0E49\u0E2D\u0E02\u0E2D\u0E07/\u0E0A\u0E33\u0E23\u0E30\u0E40\u0E07\u0E34\u0E19\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49", value: "\u0E0B\u0E37\u0E49\u0E2D\u0E02\u0E2D\u0E07/\u0E0A\u0E33\u0E23\u0E30\u0E40\u0E07\u0E34\u0E19\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49", mockResponse: "PAYMENT_METHODS" /* PAYMENT_METHODS */ },
272
- { id: "2", title: "\u0E43\u0E0A\u0E49\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49", value: "\u0E43\u0E0A\u0E49\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49", mockResponse: "CODE_CANT_USE" /* CODE_CANT_USE */ },
273
- { id: "3", title: "\u0E43\u0E0A\u0E49\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49", value: "\u0E43\u0E0A\u0E49\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49", mockResponse: "CODE_CANT_USE" /* CODE_CANT_USE */ },
274
- { id: "4", title: "\u0E43\u0E0A\u0E49\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49", value: "\u0E43\u0E0A\u0E49\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49", mockResponse: "CODE_CANT_USE" /* CODE_CANT_USE */ }
275
- ];
276
- var budgetRanges = [
277
- { id: "1", title: "\u0E15\u0E48\u0E33\u0E01\u0E27\u0E48\u0E32 10,000 \u0E1A\u0E32\u0E17", value: "\u0E15\u0E48\u0E33\u0E01\u0E27\u0E48\u0E32 10,000 \u0E1A\u0E32\u0E17", mockResponse: "PRODUCT_FOUND_LESS_10000" /* PRODUCT_FOUND_LESS_10000 */ },
278
- { id: "2", title: "10,000 - 20,000 \u0E1A\u0E32\u0E17", value: "10,000 - 20,000 \u0E1A\u0E32\u0E17", mockResponse: "PRODUCT_FOUND_RANGE_10000_20000" /* PRODUCT_FOUND_RANGE_10000_20000 */ },
279
- { id: "3", title: "20,000 - 30,000 \u0E1A\u0E32\u0E17", value: "20,000 - 30,000 \u0E1A\u0E32\u0E17", mockResponse: "PRODUCT_FOUND_RANGE_20000_30000" /* PRODUCT_FOUND_RANGE_20000_30000 */ },
280
- { id: "4", title: "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 30,000 \u0E1A\u0E32\u0E17", value: "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 30,000 \u0E1A\u0E32\u0E17", mockResponse: "PRODUCT_FOUND_MORE_30000" /* PRODUCT_FOUND_MORE_30000 */ }
281
- ];
282
- var shippingOptions = [
283
- { id: "1", title: "\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E1B\u0E01\u0E15\u0E34 (3-5 \u0E27\u0E31\u0E19)", value: "\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E1B\u0E01\u0E15\u0E34", mockResponse: "PAYMENT_METHODS" /* PAYMENT_METHODS */ },
284
- { id: "2", title: "\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E14\u0E48\u0E27\u0E19 (1-2 \u0E27\u0E31\u0E19)", value: "\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E14\u0E48\u0E27\u0E19", mockResponse: "PAYMENT_METHODS" /* PAYMENT_METHODS */ },
285
- { id: "3", title: "\u0E23\u0E31\u0E1A\u0E40\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E23\u0E49\u0E32\u0E19", value: "\u0E23\u0E31\u0E1A\u0E40\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E23\u0E49\u0E32\u0E19", mockResponse: "PAYMENT_METHODS" /* PAYMENT_METHODS */ }
286
- ];
287
- var supportTopics = [
288
- { id: "1", title: "\u0E01\u0E32\u0E23\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07 \u{1F69A}", value: "\u0E01\u0E32\u0E23\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07", mockResponse: "SHIPPING_INFO" /* SHIPPING_INFO */ },
289
- { id: "2", title: "\u0E01\u0E32\u0E23\u0E0A\u0E33\u0E23\u0E30\u0E40\u0E07\u0E34\u0E19 \u{1F4B3}", value: "\u0E01\u0E32\u0E23\u0E0A\u0E33\u0E23\u0E30\u0E40\u0E07\u0E34\u0E19", mockResponse: "PAYMENT_METHODS" /* PAYMENT_METHODS */ },
290
- { id: "3", title: "\u0E01\u0E32\u0E23\u0E04\u0E37\u0E19\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F504}", value: "\u0E01\u0E32\u0E23\u0E04\u0E37\u0E19\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32", mockResponse: "RETURN_POLICY" /* RETURN_POLICY */ },
291
- { id: "4", title: "\u0E01\u0E32\u0E23\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E30\u0E01\u0E31\u0E19 \u{1F6E1}\uFE0F", value: "\u0E01\u0E32\u0E23\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E30\u0E01\u0E31\u0E19", mockResponse: "WARRANTY_INFO" /* WARRANTY_INFO */ }
292
- ];
293
- var searchableMenus = [
294
- ...defaultQuickMenus,
295
- ...defaultCategory,
296
- ...defaultQuickMenuChips,
297
- ...budgetRanges,
298
- ...shippingOptions,
299
- ...supportTopics
300
- ];
301
- var mockResponse = {
302
- ["CATEGORY_SMARTPHONE" /* CATEGORY_SMARTPHONE */]: {
303
- id: "bot-category-smartphone",
304
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
305
- text: "\u0E22\u0E2D\u0E14\u0E40\u0E22\u0E35\u0E48\u0E22\u0E21! \u0E04\u0E38\u0E13\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48\u0E2A\u0E21\u0E32\u0E23\u0E4C\u0E17\u0E42\u0E1F\u0E19\u0E41\u0E25\u0E49\u0E27 \u0E1A\u0E2D\u0E01\u0E1C\u0E21\u0E2B\u0E19\u0E48\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E1A \u0E27\u0E48\u0E32\u0E07\u0E1A\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E40\u0E17\u0E48\u0E32\u0E44\u0E2B\u0E23\u0E48?",
306
- menus: budgetRanges
307
- },
308
- ["CATEGORY_NOTEBOOK" /* CATEGORY_NOTEBOOK */]: {
309
- id: "bot-category-notebook",
310
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
311
- text: "\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E32\u0E21\u0E2B\u0E32 \u0E43\u0E19\u0E2B\u0E21\u0E27\u0E14\u0E42\u0E19\u0E4A\u0E15\u0E1A\u0E38\u0E4A\u0E04\u0E04\u0E23\u0E31\u0E1A \u0E25\u0E2D\u0E07\u0E14\u0E39\u0E2B\u0E21\u0E27\u0E14\u0E2D\u0E37\u0E48\u0E19\u0E44\u0E2B\u0E21?",
312
- menus: defaultCategory
313
- },
314
- ["ERROR" /* ERROR */]: {
315
- id: "bot-error-response",
316
- type: "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */,
317
- text: "\u0E40\u0E2D\u0E4A\u0E30! \u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E19\u0E34\u0E14\u0E2B\u0E19\u0E48\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E1A \u{1F613} \u0E44\u0E21\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E44\u0E23\u0E19\u0E30 \u0E25\u0E2D\u0E07\u0E17\u0E32\u0E07\u0E19\u0E35\u0E49\u0E14\u0E39\u0E04\u0E23\u0E31\u0E1A\u{1F447}",
318
- menus: defaultFailMenu
319
- },
320
- ["QUICK_MENU_SHOP" /* QUICK_MENU_SHOP */]: {
321
- id: "bot-shop-response",
322
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
323
- text: "\u0E2A\u0E19\u0E43\u0E08\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E2B\u0E19\u0E04\u0E23\u0E31\u0E1A \u0E40\u0E23\u0E32\u0E0A\u0E48\u0E27\u0E22\u0E41\u0E19\u0E30\u0E19\u0E33\u0E44\u0E14\u0E49\u0E19\u0E30 \u{1F60A}",
324
- menus: defaultCategory
325
- },
326
- ["CODE_CANT_USE" /* CODE_CANT_USE */]: {
327
- id: "bot-code-cant-use",
328
- type: "BOT_TEXT" /* BOT_TEXT */,
329
- text: "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22\u0E04\u0E23\u0E31\u0E1A \u0E42\u0E04\u0E49\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E40\u0E07\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E02\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E2D\u0E37\u0E48\u0E19\u0E04\u0E23\u0E31\u0E1A"
330
- },
331
- ["BUDGET_INQUIRY" /* BUDGET_INQUIRY */]: {
332
- id: "bot-budget-inquiry",
333
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
334
- text: "\u0E07\u0E1A\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E0A\u0E48\u0E27\u0E07\u0E44\u0E2B\u0E19\u0E04\u0E23\u0E31\u0E1A? \u0E40\u0E23\u0E32\u0E08\u0E30\u0E0A\u0E48\u0E27\u0E22\u0E2B\u0E32\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E17\u0E35\u0E48\u0E40\u0E2B\u0E21\u0E32\u0E30\u0E2A\u0E21\u0E43\u0E2B\u0E49 \u{1F60A}",
335
- menus: budgetRanges
336
- },
337
- ["PRODUCT_FOUND_LESS_10000" /* PRODUCT_FOUND_LESS_10000 */]: {
338
- id: "bot-product-found",
339
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
340
- text: "\u0E40\u0E08\u0E2D\u0E41\u0E25\u0E49\u0E27\u0E04\u0E23\u0E31\u0E1A! \u0E40\u0E23\u0E32\u0E21\u0E35\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 \u{1F389}\n\niPhone 4 Pro 16GB\n\u0E23\u0E32\u0E04\u0E32: \u0E3F5,900\n- \u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D 6.9 \u0E19\u0E34\u0E49\u0E27\n- \u0E0A\u0E34\u0E1B A18 Pro\n- \u0E01\u0E25\u0E49\u0E2D\u0E07 48MP\n\n\u0E2A\u0E19\u0E43\u0E08\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?",
341
- menus: shippingOptions
342
- },
343
- ["PRODUCT_FOUND_RANGE_10000_20000" /* PRODUCT_FOUND_RANGE_10000_20000 */]: {
344
- id: "bot-product-found",
345
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
346
- text: "\u0E40\u0E08\u0E2D\u0E41\u0E25\u0E49\u0E27\u0E04\u0E23\u0E31\u0E1A! \u0E40\u0E23\u0E32\u0E21\u0E35\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 \u{1F389}\n\niPhone 16 Pro Max 128GB\n\u0E23\u0E32\u0E04\u0E32: \u0E3F19,000\n- \u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D 6.9 \u0E19\u0E34\u0E49\u0E27\n- \u0E0A\u0E34\u0E1B A18 Pro\n- \u0E01\u0E25\u0E49\u0E2D\u0E07 48MP\n\n\u0E2A\u0E19\u0E43\u0E08\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?",
347
- menus: shippingOptions
348
- },
349
- ["PRODUCT_FOUND_RANGE_20000_30000" /* PRODUCT_FOUND_RANGE_20000_30000 */]: {
350
- id: "bot-product-found",
351
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
352
- text: "\u0E40\u0E08\u0E2D\u0E41\u0E25\u0E49\u0E27\u0E04\u0E23\u0E31\u0E1A! \u0E40\u0E23\u0E32\u0E21\u0E35\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 \u{1F389}\n\niPhone 16 Pro Max 256GB\n\u0E23\u0E32\u0E04\u0E32: \u0E3F30,000\n- \u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D 6.9 \u0E19\u0E34\u0E49\u0E27\n- \u0E0A\u0E34\u0E1B A18 Pro\n- \u0E01\u0E25\u0E49\u0E2D\u0E07 48MP\n\n\u0E2A\u0E19\u0E43\u0E08\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?",
353
- menus: shippingOptions
354
- },
355
- ["PRODUCT_FOUND_MORE_30000" /* PRODUCT_FOUND_MORE_30000 */]: {
356
- id: "bot-product-found",
357
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
358
- text: "\u0E40\u0E08\u0E2D\u0E41\u0E25\u0E49\u0E27\u0E04\u0E23\u0E31\u0E1A! \u0E40\u0E23\u0E32\u0E21\u0E35\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 \u{1F389}\n\niPhone 16 Pro Max 512GB\n\u0E23\u0E32\u0E04\u0E32: \u0E3F45,900\n- \u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D 6.9 \u0E19\u0E34\u0E49\u0E27\n- \u0E0A\u0E34\u0E1B A18 Pro\n- \u0E01\u0E25\u0E49\u0E2D\u0E07 48MP\n\n\u0E2A\u0E19\u0E43\u0E08\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?",
359
- menus: shippingOptions
360
- },
361
- ["SHIPPING_INFO" /* SHIPPING_INFO */]: {
362
- id: "bot-shipping-info",
363
- type: "BOT_TEXT" /* BOT_TEXT */,
364
- text: "\u{1F4E6} \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E01\u0E32\u0E23\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\n\n\u2705 \u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E1F\u0E23\u0E35 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E15\u0E31\u0E49\u0E07\u0E41\u0E15\u0E48 1,000 \u0E1A\u0E32\u0E17\u0E02\u0E36\u0E49\u0E19\u0E44\u0E1B\n\u2705 \u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E1B\u0E01\u0E15\u0E34 3-5 \u0E27\u0E31\u0E19\u0E17\u0E33\u0E01\u0E32\u0E23\n\u2705 \u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E14\u0E48\u0E27\u0E19 1-2 \u0E27\u0E31\u0E19\u0E17\u0E33\u0E01\u0E32\u0E23 (\u0E40\u0E2A\u0E35\u0E22\u0E04\u0E48\u0E32\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21 100 \u0E1A\u0E32\u0E17)\n\u2705 \u0E23\u0E31\u0E1A\u0E40\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E23\u0E49\u0E32\u0E19\u0E44\u0E14\u0E49\u0E17\u0E31\u0E19\u0E17\u0E35\n\n\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E2D\u0E1A\u0E16\u0E32\u0E21\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?"
365
- },
366
- ["PAYMENT_METHODS" /* PAYMENT_METHODS */]: {
367
- id: "bot-payment-methods",
368
- type: "BOT_TEXT" /* BOT_TEXT */,
369
- text: "\u{1F4B3} \u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07\u0E01\u0E32\u0E23\u0E0A\u0E33\u0E23\u0E30\u0E40\u0E07\u0E34\u0E19\n\n\u2705 \u0E42\u0E2D\u0E19\u0E1C\u0E48\u0E32\u0E19\u0E18\u0E19\u0E32\u0E04\u0E32\u0E23\n\u2705 \u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15/\u0E40\u0E14\u0E1A\u0E34\u0E15 (Visa, Mastercard, JCB)\n\u2705 \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E40\u0E1E\u0E22\u0E4C\n\u2705 \u0E1C\u0E48\u0E2D\u0E19\u0E0A\u0E33\u0E23\u0E30 0% (\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15\u0E18\u0E19\u0E32\u0E04\u0E32\u0E23\u0E0A\u0E31\u0E49\u0E19\u0E19\u0E33)\n\u2705 \u0E40\u0E01\u0E47\u0E1A\u0E40\u0E07\u0E34\u0E19\u0E1B\u0E25\u0E32\u0E22\u0E17\u0E32\u0E07\n\n\u0E0A\u0E33\u0E23\u0E30\u0E14\u0E49\u0E27\u0E22\u0E27\u0E34\u0E18\u0E35\u0E44\u0E2B\u0E19\u0E2A\u0E30\u0E14\u0E27\u0E01\u0E04\u0E23\u0E31\u0E1A?"
370
- },
371
- ["WARRANTY_INFO" /* WARRANTY_INFO */]: {
372
- id: "bot-warranty-info",
373
- type: "BOT_TEXT" /* BOT_TEXT */,
374
- text: "\u{1F6E1}\uFE0F \u0E40\u0E07\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E02\u0E01\u0E32\u0E23\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E30\u0E01\u0E31\u0E19\n\n\u2705 \u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E30\u0E01\u0E31\u0E19\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 1 \u0E1B\u0E35\u0E40\u0E15\u0E47\u0E21 (\u0E15\u0E32\u0E21\u0E40\u0E07\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E02\u0E1C\u0E39\u0E49\u0E1C\u0E25\u0E34\u0E15)\n\u2705 \u0E28\u0E39\u0E19\u0E22\u0E4C\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E17\u0E31\u0E48\u0E27\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\n\u2705 \u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E32\u0E01\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E1E\u0E1A\u0E27\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E40\u0E2A\u0E35\u0E22\u0E08\u0E32\u0E01\u0E42\u0E23\u0E07\u0E07\u0E32\u0E19\n\u2705 \u0E0B\u0E48\u0E2D\u0E21\u0E1F\u0E23\u0E35 \u0E2B\u0E32\u0E01\u0E0A\u0E33\u0E23\u0E38\u0E14\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E1B\u0E01\u0E15\u0E34\n\n\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E2B\u0E15\u0E38: \u0E44\u0E21\u0E48\u0E23\u0E27\u0E21\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2A\u0E35\u0E22\u0E2B\u0E32\u0E22\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E17\u0E35\u0E48\u0E1C\u0E34\u0E14\u0E27\u0E34\u0E18\u0E35\u0E2B\u0E23\u0E37\u0E2D\u0E2D\u0E38\u0E1A\u0E31\u0E15\u0E34\u0E40\u0E2B\u0E15\u0E38"
375
- },
376
- ["RETURN_POLICY" /* RETURN_POLICY */]: {
377
- id: "bot-return-policy",
378
- type: "BOT_TEXT" /* BOT_TEXT */,
379
- text: "\u{1F504} \u0E19\u0E42\u0E22\u0E1A\u0E32\u0E22\u0E01\u0E32\u0E23\u0E04\u0E37\u0E19\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\n\n\u2705 \u0E04\u0E37\u0E19\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E44\u0E14\u0E49\u0E20\u0E32\u0E22\u0E43\u0E19 7 \u0E27\u0E31\u0E19\n\u2705 \u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E2A\u0E20\u0E32\u0E1E\u0E40\u0E14\u0E34\u0E21 \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E01\u0E25\u0E48\u0E2D\u0E07\u0E41\u0E25\u0E30\u0E2D\u0E38\u0E1B\u0E01\u0E23\u0E13\u0E4C\u0E04\u0E23\u0E1A\u0E16\u0E49\u0E27\u0E19\n\u2705 \u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E2D\u0E22\u0E01\u0E23\u0E2D\u0E22\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\n\u2705 \u0E04\u0E37\u0E19\u0E40\u0E07\u0E34\u0E19\u0E40\u0E15\u0E47\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19 (\u0E2B\u0E31\u0E01\u0E04\u0E48\u0E32\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07)\n\n\u274C \u0E44\u0E21\u0E48\u0E23\u0E31\u0E1A\u0E04\u0E37\u0E19: \u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E25\u0E14\u0E23\u0E32\u0E04\u0E32\u0E1E\u0E34\u0E40\u0E28\u0E29, \u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 Clearance Sale\n\n\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23\u0E04\u0E37\u0E19\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?"
380
- },
381
- ["PROMOTION_INFO" /* PROMOTION_INFO */]: {
382
- id: "bot-promotion-info",
383
- type: "BOT_TEXT" /* BOT_TEXT */,
384
- text: "\u{1F389} \u0E42\u0E1B\u0E23\u0E42\u0E21\u0E0A\u0E31\u0E48\u0E19\u0E1E\u0E34\u0E40\u0E28\u0E29\u0E1B\u0E23\u0E30\u0E08\u0E33\u0E40\u0E14\u0E37\u0E2D\u0E19\n\n\u{1F525} \u0E25\u0E14\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14 30% \u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E17\u0E38\u0E01\u0E2B\u0E21\u0E27\u0E14\n\u{1F525} \u0E0B\u0E37\u0E49\u0E2D\u0E04\u0E23\u0E1A 5,000 \u0E1A\u0E32\u0E17 \u0E23\u0E31\u0E1A\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14 500 \u0E1A\u0E32\u0E17\n\u{1F525} \u0E1C\u0E48\u0E2D\u0E19 0% \u0E19\u0E32\u0E19 10 \u0E40\u0E14\u0E37\u0E2D\u0E19\n\u{1F525} \u0E02\u0E2D\u0E07\u0E41\u0E16\u0E21\u0E21\u0E39\u0E25\u0E04\u0E48\u0E32\u0E2A\u0E39\u0E07 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E25\u0E39\u0E01\u0E04\u0E49\u0E32\u0E43\u0E2B\u0E21\u0E48\n\n\u0E43\u0E0A\u0E49\u0E42\u0E04\u0E49\u0E14: ZIMCRAFT 2024 \u0E23\u0E31\u0E1A\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2D\u0E35\u0E01 5%!"
385
- },
386
- ["STOCK_AVAILABLE" /* STOCK_AVAILABLE */]: {
387
- id: "bot-stock-available",
388
- type: "BOT_TEXT" /* BOT_TEXT */,
389
- text: "\u2705 \u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E21\u0E35\u0E43\u0E19\u0E2A\u0E15\u0E47\u0E2D\u0E01\u0E04\u0E23\u0E31\u0E1A!\n\n\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E08\u0E31\u0E14\u0E2A\u0E48\u0E07\u0E17\u0E31\u0E19\u0E17\u0E35 \u0E2B\u0E32\u0E01\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E20\u0E32\u0E22\u0E43\u0E19\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49\n\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32: 15 \u0E0A\u0E34\u0E49\u0E19\n\n\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E40\u0E25\u0E22\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?"
390
- },
391
- ["OUT_OF_STOCK" /* OUT_OF_STOCK */]: {
392
- id: "bot-out-of-stock",
393
- type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
394
- text: "\u{1F614} \u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22\u0E04\u0E23\u0E31\u0E1A \u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E2B\u0E21\u0E14\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27\n\n\u0E04\u0E32\u0E14\u0E27\u0E48\u0E32\u0E08\u0E30\u0E21\u0E35\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E40\u0E02\u0E49\u0E32\u0E43\u0E2B\u0E21\u0E48\u0E20\u0E32\u0E22\u0E43\u0E19 3-5 \u0E27\u0E31\u0E19\n\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E14\u0E39\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E17\u0E32\u0E07\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E37\u0E48\u0E19\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?",
395
- menus: defaultCategory
396
- },
397
- ["SPEC_INQUIRY" /* SPEC_INQUIRY */]: {
398
- id: "bot-spec-inquiry",
399
- type: "BOT_TEXT" /* BOT_TEXT */,
400
- text: '\u{1F4F1} \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E40\u0E1E\u0E32\u0E30\n\niPhone 16 Pro Max\n\u2022 \u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D: Super Retina XDR 6.9"\n\u2022 \u0E0A\u0E34\u0E1B\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25: A18 Pro\n\u2022 \u0E01\u0E25\u0E49\u0E2D\u0E07: 48MP \u0E2B\u0E25\u0E31\u0E01 + 12MP Ultra Wide + 12MP Telephoto\n\u2022 \u0E41\u0E1A\u0E15\u0E40\u0E15\u0E2D\u0E23\u0E35\u0E48: \u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14 29 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07\n\u2022 \u0E2B\u0E19\u0E48\u0E27\u0E22\u0E04\u0E27\u0E32\u0E21\u0E08\u0E33: 256GB / 512GB / 1TB\n\u2022 \u0E2A\u0E35: Natural Titanium, Blue Titanium, White Titanium, Black Titanium\n\n\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A?'
401
- }
402
- };
403
- var mockMessages = [
404
- {
405
- id: "2",
406
- type: "USER_TEXT" /* USER_TEXT */,
407
- text: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F6CD}\uFE0F"
408
- },
409
- __spreadValues({}, mockResponse["ERROR" /* ERROR */]),
410
- {
411
- id: "4",
412
- type: "USER_TEXT" /* USER_TEXT */,
413
- text: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F6CD}\uFE0F"
414
- },
415
- __spreadValues({}, mockResponse["CATEGORY_NOTEBOOK" /* CATEGORY_NOTEBOOK */])
416
- ];
417
-
418
- // src/hooks/use-openchat.tsx
419
- import { useCallback, useState } from "react";
420
- var useOpenChat = () => {
421
- const [isOpen, setIsOpen] = useState(false);
422
- const [isExpanded, setIsExpanded] = useState(false);
423
- const openChat = useCallback(() => setIsOpen(true), []);
424
- const closeChat = useCallback(() => setIsOpen(false), []);
425
- const toggleChat = useCallback(() => setIsOpen((prev) => !prev), []);
426
- const toggleExpand = useCallback(() => setIsExpanded((prev) => !prev), []);
427
- return {
428
- isOpen,
429
- isExpanded,
430
- openChat,
431
- closeChat,
432
- toggleChat,
433
- toggleExpand
434
- };
435
- };
436
-
437
- // src/contexts/chat-context.tsx
438
- import { createContext, useCallback as useCallback2, useContext, useMemo, useState as useState2 } from "react";
439
- import { jsx as jsx7 } from "react/jsx-runtime";
440
- var ChatContext = createContext(void 0);
441
- var ChatProvider = ({ children }) => {
442
- const [messages, setMessages] = useState2([]);
443
- const [latestMessage, setLatestMessage] = useState2();
444
- const chatControls = useOpenChat();
445
- const [isLoading, setIsLoading] = useState2(false);
446
- const addUserMessage = useCallback2((text) => {
447
- const newMessage = {
448
- id: Date.now().toString() + Math.random().toString(),
449
- text,
450
- type: "USER_TEXT" /* USER_TEXT */
451
- };
452
- setLatestMessage(newMessage);
453
- setMessages((prev) => [...prev, newMessage]);
454
- setIsLoading(true);
455
- }, []);
456
- const addBotMessage = useCallback2((message) => __async(null, null, function* () {
457
- yield new Promise((resolve) => setTimeout(resolve, Math.random() * 2e3 + 1e3));
458
- setIsLoading(false);
459
- const newMessage = __spreadProps(__spreadValues({}, message), {
460
- id: Date.now().toString() + Math.random().toString()
461
- });
462
- setMessages((prev) => [...prev, newMessage]);
463
- }), []);
464
- const clearMessages = useCallback2(() => setMessages([]), []);
465
- const value = useMemo(
466
- () => ({
467
- messages,
468
- latestMessage,
469
- isLoading,
470
- setIsLoading,
471
- addUserMessage,
472
- addBotMessage,
473
- clearMessages,
474
- chatControls
475
- }),
476
- [messages, latestMessage, isLoading, chatControls, addUserMessage, addBotMessage, clearMessages]
477
- );
478
- return /* @__PURE__ */ jsx7(ChatContext.Provider, { value, children });
479
- };
480
- var useChatContext = () => {
481
- const context = useContext(ChatContext);
482
- if (!context) {
483
- throw new Error("useChatContext must be used within ChatProvider");
484
- }
485
- return context;
486
- };
487
-
488
- // src/utils/message.ts
489
- var getMockBotMessage = (menu) => {
490
- const newMessage = mockResponse[menu.mockResponse];
491
- return newMessage ? newMessage : mockResponse["ERROR" /* ERROR */];
492
- };
493
-
494
- // src/components/aizu-chat.tsx
495
- import {
496
- useCallback as useCallback5,
497
- useEffect,
498
- useRef,
499
- useState as useState4
500
- } from "react";
501
-
502
- // src/components/input-bar/index.tsx
503
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
504
- var ButtonSelectImage = (_a) => {
505
- var _b = _a, { onClick, className } = _b, props = __objRest(_b, ["onClick", "className"]);
506
- return /* @__PURE__ */ jsx8(
507
- "button",
508
- __spreadProps(__spreadValues({
509
- type: "button",
510
- onClick,
511
- className: cn(
512
- "shrink-0 w-8 h-8 rounded-full bg-[#3D3D3D] flex items-center justify-center hover:opacity-70 cursor-pointer transition-colors",
513
- className
514
- ),
515
- "aria-label": "Upload image"
516
- }, props), {
517
- children: /* @__PURE__ */ jsx8(IconImagePlus, {})
518
- })
519
- );
520
- };
521
- var InputText = (_a) => {
522
- var _b = _a, { onMagicClick, placeholder, className } = _b, props = __objRest(_b, ["onMagicClick", "placeholder", "className"]);
523
- return /* @__PURE__ */ jsxs7("div", { className: "flex-1 relative", children: [
524
- /* @__PURE__ */ jsx8(
525
- "input",
526
- __spreadValues({
527
- type: "text",
528
- name: "message",
529
- placeholder,
530
- className: cn(
531
- "w-full pr-12 bg-gray-100 outline-none ",
532
- className
533
- ),
534
- onKeyDown: (e) => {
535
- var _a2;
536
- if (e.key === "Enter" && !e.shiftKey) {
537
- e.preventDefault();
538
- (_a2 = e.currentTarget.form) == null ? void 0 : _a2.requestSubmit();
539
- }
540
- }
541
- }, props)
542
- ),
543
- onMagicClick && /* @__PURE__ */ jsx8(
544
- "button",
545
- {
546
- type: "button",
547
- onClick: onMagicClick,
548
- className: "absolute right-2 top-1/2 -translate-y-1/2 w-8 h-8 flex items-center justify-center hover:bg-gray-200 rounded-full transition-colors",
549
- "aria-label": "AI assist",
550
- children: /* @__PURE__ */ jsxs7("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
551
- /* @__PURE__ */ jsx8("title", { children: "Magic/AI Icon" }),
552
- /* @__PURE__ */ jsx8("path", { d: "M12 2L15 8.5L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L9 8.5L12 2Z" })
553
- ] })
554
- }
555
- )
556
- ] });
557
- };
558
- var ButtonConfirm = (_a) => {
559
- var _b = _a, { className, disabled } = _b, props = __objRest(_b, ["className", "disabled"]);
560
- return /* @__PURE__ */ jsx8(
561
- "button",
562
- __spreadProps(__spreadValues({
563
- type: "submit",
564
- className: cn(
565
- "shrink-0 w-10 h-10 rounded-full ",
566
- "bg-gray-100 hover:bg-gray-200 transition-colors",
567
- "flex items-center justify-center",
568
- "cursor-pointer",
569
- "disabled:bg-gray-300 disabled:cursor-not-allowed",
570
- className
571
- ),
572
- "aria-label": "Send message",
573
- disabled
574
- }, props), {
575
- children: /* @__PURE__ */ jsx8(IconArrowNarrowUp, { className: "text-black" })
576
- })
577
- );
578
- };
579
- var InputBar = (_a) => {
580
- var _b = _a, {
581
- isLoading,
582
- onSend,
583
- onImageClick,
584
- onMagicClick,
585
- placeholder = "\u0E16\u0E32\u0E21\u0E04\u0E33\u0E16\u0E32\u0E21\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22...",
586
- className
587
- } = _b, props = __objRest(_b, [
588
- "isLoading",
589
- "onSend",
590
- "onImageClick",
591
- "onMagicClick",
592
- "placeholder",
593
- "className"
594
- ]);
595
- const handleSubmit = (e) => {
596
- e.preventDefault();
597
- const formData = new FormData(e.currentTarget);
598
- const message = formData.get("message");
599
- if ((message == null ? void 0 : message.trim()) && onSend) {
600
- onSend(message);
601
- e.currentTarget.reset();
602
- }
603
- };
604
- return /* @__PURE__ */ jsx8("section", __spreadProps(__spreadValues({ className: cn("bg-white p-4", className) }, props), { children: /* @__PURE__ */ jsxs7("form", { onSubmit: handleSubmit, className: "flex items-center gap-3", children: [
605
- /* @__PURE__ */ jsxs7(
606
- "label",
607
- {
608
- htmlFor: "chat-input-text",
609
- className: "flex items-center rounded-full bg-gray-100 flex-1 p-2 focus-within:ring-2 focus-within:ring-orange-300",
610
- children: [
611
- /* @__PURE__ */ jsx8(ButtonSelectImage, { onClick: onImageClick, className: "mr-3" }),
612
- /* @__PURE__ */ jsx8(InputText, { id: "chat-input-text", placeholder, onMagicClick })
613
- ]
614
- }
615
- ),
616
- /* @__PURE__ */ jsx8(ButtonConfirm, { disabled: isLoading })
617
- ] }) }));
618
- };
619
- InputBar.ButtonSelectImage = ButtonSelectImage;
620
- InputBar.InputText = InputText;
621
- InputBar.ButtonConfirm = ButtonConfirm;
622
-
623
- // src/components/loading.tsx
624
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
625
- var Loading = ({ message }) => {
626
- return /* @__PURE__ */ jsxs8("section", { className: cn("flex flex-col justify-center items-center border border-orange-400 shadow shadow-orange-400 h-10 max-w-69.5 rounded-3xl", { "h-16": !!message }), children: [
627
- /* @__PURE__ */ jsxs8("div", { className: "flex justify-center items-center gap-x-1 ", children: [
628
- /* @__PURE__ */ jsx9("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-300" }),
629
- /* @__PURE__ */ jsx9("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-600" }),
630
- /* @__PURE__ */ jsx9("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-900" })
631
- ] }),
632
- message && /* @__PURE__ */ jsx9("p", { className: "text-center text-[12px] text-gray-500 mt-1", children: message })
633
- ] });
634
- };
635
-
636
- // src/components/button.tsx
637
- import { jsx as jsx10 } from "react/jsx-runtime";
638
- var Button = (_a) => {
639
- var _b = _a, { children, className, onClick, ref } = _b, props = __objRest(_b, ["children", "className", "onClick", "ref"]);
640
- return /* @__PURE__ */ jsx10(
641
- "button",
642
- __spreadProps(__spreadValues({
643
- ref,
644
- type: "button",
645
- onClick,
646
- className: cn(
647
- "border border-orange-300 rounded-3xl",
648
- "px-4 py-2",
649
- "text-orange-500 text-sm",
650
- "cursor-pointer",
651
- className
652
- )
653
- }, props), {
654
- children
655
- })
656
- );
657
- };
658
-
659
- // src/components/container.tsx
660
- import { jsx as jsx11 } from "react/jsx-runtime";
661
- var Container = (_a) => {
662
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
663
- return /* @__PURE__ */ jsx11("div", { className: cn("p-3 rounded-3xl border border-orange-300", className), children });
664
- };
665
-
666
- // src/components/message/index.tsx
667
- import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
668
- var MessageBubble = ({ message, handleClick }) => {
669
- if (message.type === "USER_TEXT" /* USER_TEXT */) {
670
- return /* @__PURE__ */ jsx12(Container, { className: "ml-auto bg-orange-200 border-none text-sm", children: message.text });
671
- }
672
- if (message.type === "BOT_TEXT" /* BOT_TEXT */) {
673
- return /* @__PURE__ */ jsx12(BotMessageWrapper, { children: /* @__PURE__ */ jsx12(Container, { className: "mr-auto max-w-75.5 text-sm", children: message.text }) });
674
- }
675
- if (message.type === "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */ || message.type === "BOT_QUICK_MENUS" /* BOT_QUICK_MENUS */ || message.type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */) {
676
- return /* @__PURE__ */ jsx12(BotMessageWrapper, { children: /* @__PURE__ */ jsx12(MessageWithMenus, { type: message.type, message: message.text || "", menus: message.menus || [], handleClick }) });
677
- }
678
- return /* @__PURE__ */ jsx12(MenusImage, { menus: message.menus || [] });
679
- };
680
- var MessageWithMenus = ({ type, message, menus, className, handleClick }) => {
681
- return /* @__PURE__ */ jsxs9(Container, { className: cn("mr-auto max-w-75.5 lg:max-w-80", className), children: [
682
- /* @__PURE__ */ jsx12("p", { className: "text-sm mb-4", children: message }),
683
- /* @__PURE__ */ jsx12("ul", { className: cn("flex flex-wrap gap-x-1 gap-y-3", { "flex-col": type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */ }), children: menus == null ? void 0 : menus.map((menu) => {
684
- if (menu == null ? void 0 : menu.phoneNumber) {
685
- return /* @__PURE__ */ jsx12("li", { className: "w-full ", children: /* @__PURE__ */ jsx12(
686
- "a",
687
- {
688
- href: `tel:+${menu == null ? void 0 : menu.phoneNumber}`,
689
- className: "border border-orange-300 rounded-3xl px-4 py-2 text-orange-500 text-sm text-center block",
690
- children: menu.title
691
- }
692
- ) }, menu.id);
693
- }
694
- return /* @__PURE__ */ jsx12("li", { className: "min-w-max ", children: /* @__PURE__ */ jsx12(
695
- Button,
696
- {
697
- className: cn({ "w-full": type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */ }),
698
- onClick: () => {
699
- handleClick(menu);
700
- },
701
- children: menu.title
702
- }
703
- ) }, menu.id);
704
- }) })
705
- ] });
706
- };
707
- var MenusImage = ({ menus }) => {
708
- return /* @__PURE__ */ jsx12("ul", { className: "flex gap-x-2", children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsx12("img", { src: menu == null ? void 0 : menu.imageUrl, alt: "menu-image" }) }, menu.id)) });
709
- };
710
- var BotMessageWrapper = ({ children }) => /* @__PURE__ */ jsxs9("div", { className: "flex flex-col items-start", children: [
711
- /* @__PURE__ */ jsx12(IconAI, { className: "mb-2" }),
712
- children
713
- ] });
714
-
715
- // src/components/quick-menus.tsx
716
- import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
717
- var QuickMenus = ({ bannerSrc, message = "welcome message", menus, handleClick }) => {
718
- return /* @__PURE__ */ jsxs10("section", { className: "w-75.5 bg-white shadow rounded-3xl overflow-hidden", children: [
719
- bannerSrc ? /* @__PURE__ */ jsx13("img", { src: bannerSrc, alt: "banner" }) : /* @__PURE__ */ jsx13("div", { className: "w-75.5 h-29.5 border-b border-gray-200" }),
720
- /* @__PURE__ */ jsxs10("div", { className: "p-3 flex flex-col gap-y-3", children: [
721
- /* @__PURE__ */ jsx13("p", { className: "text-sm", children: message }),
722
- /* @__PURE__ */ jsx13("ul", { className: "flex gap-3 flex-wrap", children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ jsx13("li", { children: /* @__PURE__ */ jsx13(Button, { onClick: () => {
723
- handleClick(menu);
724
- }, children: menu.title }) }, menu.id)) })
725
- ] })
726
- ] });
727
- };
728
-
729
- // src/components/quick-menus-chip.tsx
730
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
731
- var QuickMenuChips = ({ menus, handleClick, className }) => {
732
- return /* @__PURE__ */ jsxs11("div", { className: "relative", children: [
733
- /* @__PURE__ */ jsx14("div", { className: "absolute lg:hidden right-0 top-0 bottom-0 w-8 bg-linear-to-l from-white to-transparent pointer-events-none z-10" }),
734
- /* @__PURE__ */ jsx14("ul", { className: cn("flex lg:flex-wrap gap-3 overflow-x-scroll scrollbar-hide", className), children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ jsx14("li", { children: /* @__PURE__ */ jsx14(
735
- Button,
736
- {
737
- onClick: () => {
738
- handleClick(menu);
739
- },
740
- className: "text-nowrap text-black/85 border-black/50",
741
- children: menu.title
742
- }
743
- ) }, menu.id)) })
744
- ] });
745
- };
746
- var quick_menus_chip_default = QuickMenuChips;
747
-
748
- // src/contexts/aizu-client-context.tsx
749
- import {
750
- createContext as createContext2,
751
- useContext as useContext2,
752
- useMemo as useMemo2
753
- } from "react";
754
-
755
- // src/hooks/use-aizu-chat.ts
756
- import { useCallback as useCallback4 } from "react";
757
-
758
- // src/hooks/use-local-storage.ts
759
- import { useState as useState3, useCallback as useCallback3 } from "react";
760
- function useLocalStorage(key, initialValue) {
761
- const [storedValue, setStoredValue] = useState3(() => {
762
- if (typeof window === "undefined") return initialValue;
763
- try {
764
- const item = window.localStorage.getItem(key);
765
- return item ? JSON.parse(item) : initialValue;
766
- } catch (error) {
767
- console.error(`Error reading localStorage key "${key}":`, error);
768
- return initialValue;
769
- }
770
- });
771
- const setValue = useCallback3(
772
- (value) => {
773
- try {
774
- setStoredValue(value);
775
- if (typeof window !== "undefined") {
776
- window.localStorage.setItem(key, JSON.stringify(value));
777
- }
778
- } catch (error) {
779
- console.error(`Error setting localStorage key "${key}":`, error);
780
- }
781
- },
782
- [key]
783
- );
784
- const clearValue = useCallback3(() => {
785
- try {
786
- setStoredValue(initialValue);
787
- if (typeof window !== "undefined") {
788
- window.localStorage.removeItem(key);
789
- }
790
- } catch (error) {
791
- console.error(`Error clearing localStorage key "${key}":`, error);
792
- }
793
- }, [key, initialValue]);
794
- return [storedValue, setValue, clearValue];
795
- }
796
-
797
- // src/hooks/use-aizu-chat.ts
798
- var useAizuChat = (client) => {
799
- const [threadId, setThreadId, clearThreadId] = useLocalStorage(
800
- "aizu_thread_id",
801
- null
802
- );
803
- const [resourceId, setResourceId, clearResourceId] = useLocalStorage("aizu_resource_id", null);
804
- const sendMessage = useCallback4(
805
- (query) => __async(null, null, function* () {
806
- const params = __spreadValues(__spreadValues({
807
- query
808
- }, threadId && { thread_id: threadId }), resourceId && { resource_id: resourceId });
809
- try {
810
- const response = yield client.chat(params);
811
- if (response.thread_id && response.thread_id !== threadId) {
812
- setThreadId(response.thread_id);
813
- }
814
- if (response.resource_id && response.resource_id !== resourceId) {
815
- setResourceId(response.resource_id);
816
- }
817
- return { success: true, data: response };
818
- } catch (error) {
819
- console.error("Failed to send message:", error);
820
- return { success: false, message: "Failed to send message" };
821
- }
822
- }),
823
- [client, threadId, resourceId, setThreadId, setResourceId]
824
- );
825
- const clearConversation = useCallback4(() => {
826
- clearThreadId();
827
- clearResourceId();
828
- }, [clearThreadId, clearResourceId]);
829
- return {
830
- sendMessage,
831
- clearConversation,
832
- threadId,
833
- resourceId
834
- };
835
- };
836
-
837
- // src/contexts/aizu-client-context.tsx
838
- import { jsx as jsx15 } from "react/jsx-runtime";
839
- var AizuClientContext = createContext2(
840
- void 0
841
- );
842
- var AizuClientProvider = ({
843
- children,
844
- client
845
- }) => {
846
- const { sendMessage, clearConversation, threadId, resourceId } = useAizuChat(client);
847
- const value = useMemo2(
848
- () => ({
849
- aizuClient: client,
850
- threadId,
851
- resourceId,
852
- sendMessage,
853
- clearConversation
854
- }),
855
- [client, threadId, resourceId, sendMessage, clearConversation]
856
- );
857
- return /* @__PURE__ */ jsx15(AizuClientContext.Provider, { value, children });
858
- };
859
- var useAizuClient = () => {
860
- const context = useContext2(AizuClientContext);
861
- if (!context) {
862
- throw new Error("useAizuClient must be used within AizuClientProvider");
863
- }
864
- return context;
865
- };
866
-
867
- // src/components/aizu-chat.tsx
868
- import { Fragment, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
869
- var AizuChat = ({ aizuClient }) => {
870
- return /* @__PURE__ */ jsx16(AizuClientProvider, { client: aizuClient, children: /* @__PURE__ */ jsx16(ChatProvider, { children: /* @__PURE__ */ jsxs12("div", { children: [
871
- /* @__PURE__ */ jsx16(FloatingButton, {}),
872
- /* @__PURE__ */ jsxs12(ChatWindow, { children: [
873
- /* @__PURE__ */ jsx16(ChatHeader, {}),
874
- /* @__PURE__ */ jsx16(ChatBody, {}),
875
- /* @__PURE__ */ jsx16(ChatFooter, {})
876
- ] })
877
- ] }) }) });
878
- };
879
- var FloatingButton = () => {
880
- const { chatControls } = useChatContext();
881
- return /* @__PURE__ */ jsx16(
882
- "button",
883
- {
884
- type: "button",
885
- onClick: chatControls.toggleChat,
886
- className: "rounded-full aspect-square w-16 cursor-pointer fixed right-5 bottom-5 shadow-orange-blur",
887
- "aria-label": "Toggle chat",
888
- children: /* @__PURE__ */ jsx16(IconAI, { className: "w-full h-full" })
889
- }
890
- );
891
- };
892
- var ChatWindow = ({ children }) => {
893
- const { chatControls } = useChatContext();
894
- return /* @__PURE__ */ jsxs12(Fragment, { children: [
895
- chatControls.isExpanded && /* @__PURE__ */ jsx16(
896
- "div",
897
- {
898
- className: "fixed inset-0 bg-black/50 z-9998 transition-opacity duration-300",
899
- onClick: chatControls.toggleExpand,
900
- onKeyDown: void 0,
901
- "aria-hidden": "true"
902
- }
903
- ),
904
- /* @__PURE__ */ jsx16(
905
- "div",
906
- {
907
- className: cn(
908
- "w-full lg:w-107.5 h-full lg:h-[calc(100vh-100px)] lg:max-h-201",
909
- "z-9999 fixed top-0 right-0 lg:right-5 lg:bottom-25 lg:top-auto bg-[#F8F8FA]",
910
- "lg:rounded-4xl shadow-orange-blur overflow-hidden",
911
- "flex flex-col",
912
- "transition-all duration-300 ease-in-out",
913
- {
914
- "opacity-0 pointer-events-none translate-y-4": !chatControls.isOpen,
915
- "opacity-100 pointer-events-auto translate-y-0": chatControls.isOpen
916
- },
917
- {
918
- "lg:right-1/2 lg:translate-x-1/2 lg:w-[calc(100vw-100px)] lg:max-w-289 ": chatControls.isExpanded
919
- }
920
- ),
921
- children
922
- }
923
- )
924
- ] });
925
- };
926
- var ChatHeader = () => {
927
- const { chatControls } = useChatContext();
928
- return /* @__PURE__ */ jsxs12("section", { className: "flex justify-between items-center bg-white py-3 px-4", children: [
929
- /* @__PURE__ */ jsxs12(
930
- "button",
931
- {
932
- type: "button",
933
- onClick: chatControls.closeChat,
934
- className: "text-sm text-left cursor-pointer flex flex-1 lg:invisible",
935
- children: [
936
- /* @__PURE__ */ jsx16(IconChevronLeft, {}),
937
- /* @__PURE__ */ jsx16("span", { children: "\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A" })
938
- ]
939
- }
940
- ),
941
- /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center flex-1 ", children: [
942
- /* @__PURE__ */ jsx16("span", { className: "text-nowrap", children: "ZIMCRAFT STORE" }),
943
- /* @__PURE__ */ jsx16("span", { className: "text-[10px] text-[#7C7C7C]", children: "Powered by Zimpligital" })
944
- ] }),
945
- /* @__PURE__ */ jsxs12("div", { className: "flex-1 flex items-center justify-end gap-2 invisible lg:visible", children: [
946
- /* @__PURE__ */ jsx16(
947
- "button",
948
- {
949
- type: "button",
950
- "aria-label": "Expand chat",
951
- onClick: chatControls.toggleExpand,
952
- className: "text-sm p-2.5 cursor-pointer",
953
- children: /* @__PURE__ */ jsx16(IconExpand, {})
954
- }
955
- ),
956
- /* @__PURE__ */ jsx16(
957
- "button",
958
- {
959
- type: "button",
960
- "aria-label": "Close chat",
961
- onClick: chatControls.closeChat,
962
- className: "text-sm p-2.5 cursor-pointer",
963
- children: /* @__PURE__ */ jsx16(IconXClose, {})
964
- }
965
- )
966
- ] })
967
- ] });
968
- };
969
- var ChatBody = () => {
970
- const { isLoading, addUserMessage, addBotMessage, messages, latestMessage } = useChatContext();
971
- const [showWaitMessage, setShowWaitMessage] = useState4(false);
972
- const messagesEndRef = useRef(null);
973
- const loadingMessage = showWaitMessage ? "Wait a minute..." : void 0;
974
- const messagesDisplay = messages || [];
975
- const displayWelcomeMessage = messagesDisplay.length === 0 && !isLoading;
976
- const handleClick = useCallback5(
977
- (menu) => __async(null, null, function* () {
978
- if (menu.title.includes(tryAgain) && !!(latestMessage == null ? void 0 : latestMessage.text)) {
979
- return addUserMessage(latestMessage == null ? void 0 : latestMessage.text);
980
- }
981
- addUserMessage(menu.title);
982
- const mockResponse2 = getMockBotMessage(menu);
983
- addBotMessage(mockResponse2);
984
- }),
985
- [addUserMessage, addBotMessage, latestMessage]
986
- );
987
- useEffect(() => {
988
- var _a;
989
- (_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
990
- }, [isLoading, messagesDisplay.length]);
991
- useEffect(() => {
992
- let timer;
993
- if (isLoading) {
994
- timer = setTimeout(() => {
995
- setShowWaitMessage(true);
996
- }, 2e3);
997
- } else {
998
- setShowWaitMessage(false);
999
- }
1000
- return () => {
1001
- if (timer) clearTimeout(timer);
1002
- };
1003
- }, [isLoading]);
1004
- return /* @__PURE__ */ jsx16("section", { className: "flex-1 overflow-y-auto relative", children: /* @__PURE__ */ jsxs12("section", { className: " p-4 flex flex-col gap-y-3 overflow-y-auto min-h-full", children: [
1005
- /* @__PURE__ */ jsxs12("div", { children: [
1006
- /* @__PURE__ */ jsx16(IconAI, { className: "mb-2" }),
1007
- /* @__PURE__ */ jsx16(
1008
- QuickMenus,
1009
- {
1010
- bannerSrc: defaultBanner,
1011
- menus: defaultQuickMenus,
1012
- message: defaultQuickMenuMessage,
1013
- handleClick
1014
- }
1015
- )
1016
- ] }),
1017
- messagesDisplay == null ? void 0 : messagesDisplay.map((message) => {
1018
- return /* @__PURE__ */ jsx16("div", { className: "w-full flex flex-col items-start", children: /* @__PURE__ */ jsx16(MessageBubble, { message, handleClick }) }, message.id);
1019
- }),
1020
- isLoading && /* @__PURE__ */ jsxs12("div", { children: [
1021
- /* @__PURE__ */ jsx16(IconAI, { className: "mb-2" }),
1022
- /* @__PURE__ */ jsx16(Loading, { message: loadingMessage })
1023
- ] }),
1024
- /* @__PURE__ */ jsx16("div", { ref: messagesEndRef }),
1025
- displayWelcomeMessage && /* @__PURE__ */ jsx16("div", { className: "mt-auto text-center text-sm text-gray-500", children: "\u0E04\u0E38\u0E13\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E2A\u0E19\u0E17\u0E19\u0E32\u0E01\u0E31\u0E1A ZIMCRAFT AI" })
1026
- ] }) });
1027
- };
1028
- var ChatFooter = () => {
1029
- const { addUserMessage, addBotMessage, latestMessage, isLoading } = useChatContext();
1030
- const { sendMessage } = useAizuClient();
1031
- const handleClick = useCallback5(
1032
- (menu) => __async(null, null, function* () {
1033
- if (menu.title.includes(tryAgain) && !!(latestMessage == null ? void 0 : latestMessage.text)) {
1034
- return addUserMessage(latestMessage == null ? void 0 : latestMessage.text);
1035
- }
1036
- addUserMessage(menu.title);
1037
- const mockResponse2 = getMockBotMessage(menu);
1038
- addBotMessage(mockResponse2);
1039
- }),
1040
- [addUserMessage, addBotMessage, latestMessage]
1041
- );
1042
- const handleSend = useCallback5(
1043
- (message) => __async(null, null, function* () {
1044
- addUserMessage(message);
1045
- const result = yield sendMessage(message);
1046
- if (result.success) {
1047
- const botMessage = {
1048
- id: Date.now().toString(),
1049
- text: result.data.response,
1050
- type: "BOT_TEXT" /* BOT_TEXT */
1051
- };
1052
- addBotMessage(botMessage);
1053
- } else {
1054
- const botMessage = __spreadProps(__spreadValues({}, mockResponse["ERROR" /* ERROR */]), {
1055
- id: Date.now().toString(),
1056
- type: "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */
1057
- });
1058
- addBotMessage(botMessage);
1059
- }
1060
- }),
1061
- [addUserMessage, addBotMessage, sendMessage]
1062
- );
1063
- return /* @__PURE__ */ jsxs12("section", { className: "bg-white h-42.5 lg:h-46", children: [
1064
- /* @__PURE__ */ jsx16(
1065
- quick_menus_chip_default,
1066
- {
1067
- handleClick,
1068
- menus: defaultQuickMenuChips,
1069
- className: "pl-4 pt-4 pb-2"
1070
- }
1071
- ),
1072
- /* @__PURE__ */ jsx16(
1073
- InputBar,
1074
- {
1075
- placeholder: "\u0E16\u0E32\u0E21\u0E04\u0E33\u0E16\u0E32\u0E21\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22...",
1076
- isLoading,
1077
- onSend: handleSend,
1078
- onImageClick: () => console.log("Image upload"),
1079
- onMagicClick: () => console.log("AI assist")
1080
- }
1081
- )
1082
- ] });
1083
- };
1084
-
1085
- // src/components/test-component.tsx
1086
- import { useState as useState5 } from "react";
1087
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1088
- var TestComponent = ({ client }) => {
1089
- return /* @__PURE__ */ jsx17(AizuClientProvider, { client, children: /* @__PURE__ */ jsx17(TestComponentContent, {}) });
1090
- };
1091
- var TestComponentContent = () => {
1092
- const { sendMessage, resourceId, threadId, clearConversation } = useAizuClient();
1093
- const [query, setQuery] = useState5("");
1094
- const [response, setResponse] = useState5("");
1095
- const [loading, setLoading] = useState5(false);
1096
- const handleSend = () => __async(null, null, function* () {
1097
- if (!query.trim()) return;
1098
- setLoading(true);
1099
- setResponse("");
1100
- console.log("\u{1F4E4} Sending query:", query);
1101
- const result = yield sendMessage(query);
1102
- if (result.success) {
1103
- console.log("\u2705 Got response:", result.data);
1104
- setResponse(result.data.response);
1105
- setQuery("");
1106
- } else {
1107
- console.error("\u274C Error:", result.message);
1108
- setResponse(`\u274C Error: ${result.message}`);
1109
- }
1110
- setLoading(false);
1111
- });
1112
- const handleClear = () => {
1113
- if (confirm("Start new conversation? This will clear your chat history.")) {
1114
- clearConversation();
1115
- setResponse("");
1116
- setQuery("");
1117
- console.log("\u{1F504} Conversation cleared!");
1118
- }
1119
- };
1120
- return /* @__PURE__ */ jsxs13("div", { className: "border-2 border-blue-500 p-4 rounded space-y-4", children: [
1121
- /* @__PURE__ */ jsxs13("div", { className: "flex justify-between items-center", children: [
1122
- /* @__PURE__ */ jsx17("h2", { className: "font-bold text-xl", children: "Test API Call" }),
1123
- /* @__PURE__ */ jsx17(
1124
- "button",
1125
- {
1126
- type: "button",
1127
- onClick: handleClear,
1128
- className: "text-sm bg-gray-200 px-3 py-1 rounded hover:bg-gray-300 disabled:opacity-50",
1129
- disabled: loading,
1130
- children: "\u{1F504} New Chat"
1131
- }
1132
- )
1133
- ] }),
1134
- /* @__PURE__ */ jsxs13("div", { className: "text-sm space-y-1", children: [
1135
- /* @__PURE__ */ jsxs13("p", { className: threadId ? "text-green-600" : "text-gray-400", children: [
1136
- "\u{1F517} Thread ID: ",
1137
- threadId || "(waiting for first message)"
1138
- ] }),
1139
- /* @__PURE__ */ jsxs13("p", { className: resourceId ? "text-green-600" : "text-gray-400", children: [
1140
- "\u{1F4E6} Resource ID: ",
1141
- resourceId || "(waiting for first message)"
1142
- ] })
1143
- ] }),
1144
- /* @__PURE__ */ jsxs13("div", { className: "flex gap-2", children: [
1145
- /* @__PURE__ */ jsx17(
1146
- "input",
1147
- {
1148
- type: "text",
1149
- value: query,
1150
- onChange: (e) => setQuery(e.target.value),
1151
- onKeyDown: (e) => e.key === "Enter" && !loading && handleSend(),
1152
- placeholder: "Type your question...",
1153
- className: "flex-1 border p-2 rounded focus:outline-none focus:ring-2 focus:ring-blue-500",
1154
- disabled: loading
1155
- }
1156
- ),
1157
- /* @__PURE__ */ jsx17(
1158
- "button",
1159
- {
1160
- type: "button",
1161
- onClick: handleSend,
1162
- disabled: loading || !query.trim(),
1163
- className: "bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 disabled:bg-gray-400 disabled:cursor-not-allowed min-w-[100px]",
1164
- children: loading ? "Sending..." : "Send"
1165
- }
1166
- )
1167
- ] }),
1168
- response && /* @__PURE__ */ jsxs13("div", { className: "p-3 bg-gray-100 rounded", children: [
1169
- /* @__PURE__ */ jsx17("strong", { className: "text-gray-700", children: "Response:" }),
1170
- /* @__PURE__ */ jsx17("p", { className: "mt-1 whitespace-pre-wrap text-gray-900", children: response })
1171
- ] }),
1172
- !threadId && /* @__PURE__ */ jsxs13("div", { className: "text-xs text-gray-500 border-t pt-2 mt-2", children: [
1173
- "\u{1F4A1} ",
1174
- /* @__PURE__ */ jsx17("strong", { children: "Tip:" }),
1175
- " Send your first message to start a conversation. The thread ID will be saved and persist across page refreshes."
1176
- ] })
1177
- ] });
1178
- };
1179
-
1180
- export {
1181
- Loading,
1182
- Button,
1183
- QuickMenus,
1184
- AizuChat,
1185
- TestComponent
1186
- };