@aizu-chat/react 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-BRNQSZ2E.mjs +931 -0
- package/dist/components.d.mts +2 -12
- package/dist/components.d.ts +2 -12
- package/dist/components.js +423 -313
- package/dist/components.mjs +3 -5
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +423 -357
- package/dist/index.mjs +2 -10
- package/package.json +1 -1
- package/dist/chunk-27KHUFCW.mjs +0 -826
- package/dist/chunk-2E7KQQED.mjs +0 -816
- package/dist/chunk-2PRXGXTN.mjs +0 -826
- package/dist/chunk-2UZJYWLD.mjs +0 -49
- package/dist/chunk-2ZNJT52V.mjs +0 -814
- package/dist/chunk-34B6VEJC.mjs +0 -677
- package/dist/chunk-35JN2QFA.mjs +0 -784
- package/dist/chunk-3FHGECHR.mjs +0 -829
- package/dist/chunk-3IU2OVAG.mjs +0 -780
- package/dist/chunk-3QKHSOJ4.mjs +0 -728
- package/dist/chunk-3XKU4RH2.mjs +0 -814
- package/dist/chunk-432NOVMD.mjs +0 -822
- package/dist/chunk-4FW2X356.mjs +0 -653
- package/dist/chunk-4KUZUKKS.mjs +0 -776
- package/dist/chunk-4UO5EJ54.mjs +0 -826
- package/dist/chunk-66DXSMQL.mjs +0 -826
- package/dist/chunk-6IIUDDOD.mjs +0 -775
- package/dist/chunk-6LVL2AO4.mjs +0 -660
- package/dist/chunk-6OMCLP7J.mjs +0 -727
- package/dist/chunk-6SYZLU5L.mjs +0 -782
- package/dist/chunk-6XLUHLNW.mjs +0 -826
- package/dist/chunk-6Z4U3TJM.mjs +0 -728
- package/dist/chunk-6ZNP2727.mjs +0 -686
- package/dist/chunk-75Q3MZEF.mjs +0 -52
- package/dist/chunk-A4YWLH3K.mjs +0 -751
- package/dist/chunk-AT5CG6CS.mjs +0 -53
- package/dist/chunk-B4CPQFKO.mjs +0 -826
- package/dist/chunk-BH52V6JW.mjs +0 -776
- package/dist/chunk-BYPRKP6J.mjs +0 -782
- package/dist/chunk-BZVP32PP.mjs +0 -826
- package/dist/chunk-C6T755JT.mjs +0 -780
- package/dist/chunk-CCFEXIKG.mjs +0 -815
- package/dist/chunk-CTYW4VK4.mjs +0 -815
- package/dist/chunk-D2UMLUGP.mjs +0 -685
- package/dist/chunk-D4DQP4GI.mjs +0 -817
- package/dist/chunk-DIBJNQPT.mjs +0 -782
- package/dist/chunk-DJQK65LJ.mjs +0 -822
- package/dist/chunk-DLQEX6QS.mjs +0 -661
- package/dist/chunk-EADN4TWS.mjs +0 -819
- package/dist/chunk-EAW7EHJI.mjs +0 -826
- package/dist/chunk-EBU5NLRJ.mjs +0 -661
- package/dist/chunk-EDBTUKCC.mjs +0 -738
- package/dist/chunk-EHQQJPCV.mjs +0 -53
- package/dist/chunk-EKELJTME.mjs +0 -674
- package/dist/chunk-ELAN3AIY.mjs +0 -784
- package/dist/chunk-EWW3DF5X.mjs +0 -814
- package/dist/chunk-EXJ5M326.mjs +0 -826
- package/dist/chunk-F3DEI4YK.mjs +0 -682
- package/dist/chunk-FBJJFSCR.mjs +0 -778
- package/dist/chunk-G7M72PUZ.mjs +0 -776
- package/dist/chunk-GFVIBK25.mjs +0 -673
- package/dist/chunk-GYZ6ICY2.mjs +0 -685
- package/dist/chunk-H733EISO.mjs +0 -826
- package/dist/chunk-H7C7VETZ.mjs +0 -776
- package/dist/chunk-HD2IHWNW.mjs +0 -776
- package/dist/chunk-HKAXD2CX.mjs +0 -776
- package/dist/chunk-HLRWI4YU.mjs +0 -778
- package/dist/chunk-HNPNRGTG.mjs +0 -686
- package/dist/chunk-HQYDHSWS.mjs +0 -678
- package/dist/chunk-HVPJAO66.mjs +0 -654
- package/dist/chunk-I36Q4NZE.mjs +0 -675
- package/dist/chunk-ICOCFEPA.mjs +0 -776
- package/dist/chunk-IMM7TFAT.mjs +0 -685
- package/dist/chunk-J5OEYYWK.mjs +0 -728
- package/dist/chunk-JDR62NUF.mjs +0 -729
- package/dist/chunk-JEOWW4D7.mjs +0 -49
- package/dist/chunk-JIAD2PHZ.mjs +0 -779
- package/dist/chunk-JMHZ4OMV.mjs +0 -814
- package/dist/chunk-JUYVQ5F6.mjs +0 -673
- package/dist/chunk-K2EPLJ4A.mjs +0 -728
- package/dist/chunk-K2WK46MB.mjs +0 -776
- package/dist/chunk-KM4P2EHL.mjs +0 -729
- package/dist/chunk-KR4PTVQ4.mjs +0 -779
- package/dist/chunk-KUHNPG4Q.mjs +0 -796
- package/dist/chunk-KXFNNAMR.mjs +0 -814
- package/dist/chunk-LEZIDZXE.mjs +0 -831
- package/dist/chunk-LMFIKGQM.mjs +0 -782
- package/dist/chunk-LT43AVHN.mjs +0 -780
- package/dist/chunk-MBHPFGVB.mjs +0 -782
- package/dist/chunk-MDMZAAPV.mjs +0 -685
- package/dist/chunk-MFFRGYEX.mjs +0 -728
- package/dist/chunk-O3U6ONKJ.mjs +0 -677
- package/dist/chunk-OEPSB4XZ.mjs +0 -686
- package/dist/chunk-OJ5M55LN.mjs +0 -660
- package/dist/chunk-OSHAWBTV.mjs +0 -800
- package/dist/chunk-OVDFBN6H.mjs +0 -800
- package/dist/chunk-OWFM4DXQ.mjs +0 -686
- package/dist/chunk-P4FEBZ5I.mjs +0 -829
- package/dist/chunk-QBXYSNTR.mjs +0 -675
- package/dist/chunk-QDS6QW7Y.mjs +0 -738
- package/dist/chunk-QN5L3XNN.mjs +0 -830
- package/dist/chunk-QOK4APM5.mjs +0 -728
- package/dist/chunk-QR37WSLB.mjs +0 -826
- package/dist/chunk-QS7TKK6W.mjs +0 -685
- package/dist/chunk-QTL5KRV3.mjs +0 -686
- package/dist/chunk-QV2LQKNI.mjs +0 -686
- package/dist/chunk-QV74GE66.mjs +0 -778
- package/dist/chunk-R3NQ7SPU.mjs +0 -780
- package/dist/chunk-R3Z7JF73.mjs +0 -673
- package/dist/chunk-S63OOCED.mjs +0 -781
- package/dist/chunk-SJJDDFKI.mjs +0 -830
- package/dist/chunk-SLS4OSOJ.mjs +0 -826
- package/dist/chunk-SRFLVMCW.mjs +0 -685
- package/dist/chunk-SUOZPZBK.mjs +0 -826
- package/dist/chunk-TBBN7SM4.mjs +0 -660
- package/dist/chunk-TLJKLZBR.mjs +0 -734
- package/dist/chunk-U4ODVQIJ.mjs +0 -728
- package/dist/chunk-UA2YL34U.mjs +0 -782
- package/dist/chunk-UOQWXJXH.mjs +0 -779
- package/dist/chunk-UYBDUWOL.mjs +0 -776
- package/dist/chunk-UZD3IED4.mjs +0 -676
- package/dist/chunk-V2YCL6RC.mjs +0 -798
- package/dist/chunk-V5ROKX6T.mjs +0 -779
- package/dist/chunk-VBZLGI7W.mjs +0 -819
- package/dist/chunk-VEAZMIG4.mjs +0 -830
- package/dist/chunk-VMG4TRFB.mjs +0 -750
- package/dist/chunk-VOLA2PFJ.mjs +0 -676
- package/dist/chunk-VTBZU2XN.mjs +0 -826
- package/dist/chunk-WC37DM4U.mjs +0 -816
- package/dist/chunk-WDLA4JJY.mjs +0 -778
- package/dist/chunk-WQ6BKSTC.mjs +0 -815
- package/dist/chunk-WXSNIINA.mjs +0 -778
- package/dist/chunk-WYBPKSFQ.mjs +0 -816
- package/dist/chunk-XFRN7OPZ.mjs +0 -686
- package/dist/chunk-XLRF64SW.mjs +0 -53
- package/dist/chunk-YLNMIJBD.mjs +0 -728
- package/dist/chunk-YUGESFKI.mjs +0 -819
- package/dist/chunk-YVDMWPWQ.mjs +0 -776
- package/dist/chunk-Z6L7TEVJ.mjs +0 -828
- package/dist/chunk-Z72DRRM6.mjs +0 -829
- package/dist/chunk-ZXF3RMZZ.mjs +0 -685
- package/dist/sdk.d.mts +0 -39
- package/dist/sdk.d.ts +0 -39
- package/dist/sdk.js +0 -121
- package/dist/sdk.mjs +0 -10
package/dist/chunk-4KUZUKKS.mjs
DELETED
|
@@ -1,776 +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-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-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\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 --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-wiggle: wiggle 1s 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-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 .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-4 {\n bottom: calc(var(--spacing) * 4);\n }\n .bottom-5 {\n bottom: calc(var(--spacing) * 5);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .z-10 {\n z-index: 10;\n }\n .z-9999 {\n z-index: 9999;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mr-auto {\n margin-right: auto;\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-0\\.75 {\n height: calc(var(--spacing) * 0.75);\n }\n .h-1\\.25 {\n height: calc(var(--spacing) * 1.25);\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 .w-0\\.75 {\n width: calc(var(--spacing) * 0.75);\n }\n .w-1\\.25 {\n width: calc(var(--spacing) * 1.25);\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-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-max {\n min-width: max-content;\n }\n .flex-1 {\n flex: 1;\n }\n .shrink-0 {\n flex-shrink: 0;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\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 .animate-wiggle {\n animation: var(--animate-wiggle);\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 .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\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-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-\\[\\#F8F8FA\\] {\n background-color: #F8F8FA;\n }\n .bg-black\\/60 {\n background-color: color-mix(in srgb, #000 60%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 60%, 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-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-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\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-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-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-\\[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-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-500 {\n color: var(--color-gray-500);\n }\n .text-orange-500 {\n color: var(--color-orange-500);\n }\n .text-white {\n color: var(--color-white);\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-2xl {\n --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));\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 .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 .outline-none {\n --tw-outline-style: none;\n outline-style: none;\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 .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-orange-300 {\n &:focus {\n --tw-ring-color: var(--color-orange-300);\n }\n }\n .disabled\\:bg-gray-400 {\n &:disabled {\n background-color: var(--color-gray-400);\n }\n }\n .lg\\:top-auto {\n @media (width >= 64rem) {\n top: auto;\n }\n }\n .lg\\:right-5 {\n @media (width >= 64rem) {\n right: calc(var(--spacing) * 5);\n }\n }\n .lg\\:bottom-20 {\n @media (width >= 64rem) {\n bottom: calc(var(--spacing) * 20);\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\\: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\\:max-w-80 {\n @media (width >= 64rem) {\n max-width: calc(var(--spacing) * 80);\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}\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@keyframes wiggle {\n 0%, 100% {\n transform: translateY(-50%);\n animation-timing-function: cubic-bezier(0.8, 0, 1, 1);\n }\n 50% {\n transform: none;\n animation-timing-function: cubic-bezier(0, 0, 0.2, 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 }\n }\n}\n');
|
|
33
|
-
|
|
34
|
-
// src/constant/default.ts
|
|
35
|
-
var defaultQuickMenuMessage = "\u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35\u0E04\u0E23\u0E31\u0E1A Brooklyn! \u{1F44B} UTECH \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}";
|
|
36
|
-
var defaultBanner = "https://utech-dev.zimpligital.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcoupon-banner-th.edad52fd.webp&w=640&q=75";
|
|
37
|
-
var defaultQuickMenus = [
|
|
38
|
-
{ 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 */ },
|
|
39
|
-
{ 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 */ },
|
|
40
|
-
{ 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 */ },
|
|
41
|
-
{ 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 */ }
|
|
42
|
-
];
|
|
43
|
-
var defaultCategory = [
|
|
44
|
-
{ 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 */ },
|
|
45
|
-
{ 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 */ },
|
|
46
|
-
{ 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 */ },
|
|
47
|
-
{ 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 */ },
|
|
48
|
-
{ 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 */ },
|
|
49
|
-
{ id: "6", title: "\u0E41\u0E01\u0E14\u0E40\u0E08\u0E47\u0E15 ", value: "\u0E41\u0E01\u0E14\u0E40\u0E08\u0E47\u0E15 ", mockResponse: "ERROR" /* ERROR */ }
|
|
50
|
-
];
|
|
51
|
-
var tryAgain = "\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07";
|
|
52
|
-
var defaultFailMenu = [
|
|
53
|
-
{ 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 */ },
|
|
54
|
-
{ id: "2", title: "\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E40\u0E23\u0E32 \u{1F4DE}\xA0", phoneNumber: "099999999", mockResponse: "ERROR" /* ERROR */ }
|
|
55
|
-
];
|
|
56
|
-
var defaultQuickMenuChips = [
|
|
57
|
-
{ 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 */ },
|
|
58
|
-
{ 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 */ },
|
|
59
|
-
{ 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 */ },
|
|
60
|
-
{ 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 */ }
|
|
61
|
-
];
|
|
62
|
-
var budgetRanges = [
|
|
63
|
-
{ 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 */ },
|
|
64
|
-
{ 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 */ },
|
|
65
|
-
{ 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 */ },
|
|
66
|
-
{ 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 */ }
|
|
67
|
-
];
|
|
68
|
-
var shippingOptions = [
|
|
69
|
-
{ 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 */ },
|
|
70
|
-
{ 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 */ },
|
|
71
|
-
{ 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 */ }
|
|
72
|
-
];
|
|
73
|
-
var supportTopics = [
|
|
74
|
-
{ 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 */ },
|
|
75
|
-
{ 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 */ },
|
|
76
|
-
{ 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 */ },
|
|
77
|
-
{ 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 */ }
|
|
78
|
-
];
|
|
79
|
-
var searchableMenus = [
|
|
80
|
-
...defaultQuickMenus,
|
|
81
|
-
...defaultCategory,
|
|
82
|
-
...defaultQuickMenuChips,
|
|
83
|
-
...budgetRanges,
|
|
84
|
-
...shippingOptions,
|
|
85
|
-
...supportTopics
|
|
86
|
-
];
|
|
87
|
-
var mockResponse = {
|
|
88
|
-
["CATEGORY_SMARTPHONE" /* CATEGORY_SMARTPHONE */]: {
|
|
89
|
-
id: "bot-category-smartphone",
|
|
90
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
91
|
-
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?",
|
|
92
|
-
menus: budgetRanges
|
|
93
|
-
},
|
|
94
|
-
["CATEGORY_NOTEBOOK" /* CATEGORY_NOTEBOOK */]: {
|
|
95
|
-
id: "bot-category-notebook",
|
|
96
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
97
|
-
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?",
|
|
98
|
-
menus: defaultCategory
|
|
99
|
-
},
|
|
100
|
-
["ERROR" /* ERROR */]: {
|
|
101
|
-
id: "bot-error-response",
|
|
102
|
-
type: "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */,
|
|
103
|
-
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}",
|
|
104
|
-
menus: defaultFailMenu
|
|
105
|
-
},
|
|
106
|
-
["QUICK_MENU_SHOP" /* QUICK_MENU_SHOP */]: {
|
|
107
|
-
id: "bot-shop-response",
|
|
108
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
109
|
-
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}",
|
|
110
|
-
menus: defaultCategory
|
|
111
|
-
},
|
|
112
|
-
["CODE_CANT_USE" /* CODE_CANT_USE */]: {
|
|
113
|
-
id: "bot-code-cant-use",
|
|
114
|
-
type: "BOT_TEXT" /* BOT_TEXT */,
|
|
115
|
-
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"
|
|
116
|
-
},
|
|
117
|
-
["BUDGET_INQUIRY" /* BUDGET_INQUIRY */]: {
|
|
118
|
-
id: "bot-budget-inquiry",
|
|
119
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
120
|
-
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}",
|
|
121
|
-
menus: budgetRanges
|
|
122
|
-
},
|
|
123
|
-
["PRODUCT_FOUND_LESS_10000" /* PRODUCT_FOUND_LESS_10000 */]: {
|
|
124
|
-
id: "bot-product-found",
|
|
125
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
126
|
-
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?",
|
|
127
|
-
menus: shippingOptions
|
|
128
|
-
},
|
|
129
|
-
["PRODUCT_FOUND_RANGE_10000_20000" /* PRODUCT_FOUND_RANGE_10000_20000 */]: {
|
|
130
|
-
id: "bot-product-found",
|
|
131
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
132
|
-
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?",
|
|
133
|
-
menus: shippingOptions
|
|
134
|
-
},
|
|
135
|
-
["PRODUCT_FOUND_RANGE_20000_30000" /* PRODUCT_FOUND_RANGE_20000_30000 */]: {
|
|
136
|
-
id: "bot-product-found",
|
|
137
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
138
|
-
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?",
|
|
139
|
-
menus: shippingOptions
|
|
140
|
-
},
|
|
141
|
-
["PRODUCT_FOUND_MORE_30000" /* PRODUCT_FOUND_MORE_30000 */]: {
|
|
142
|
-
id: "bot-product-found",
|
|
143
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
144
|
-
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?",
|
|
145
|
-
menus: shippingOptions
|
|
146
|
-
},
|
|
147
|
-
["SHIPPING_INFO" /* SHIPPING_INFO */]: {
|
|
148
|
-
id: "bot-shipping-info",
|
|
149
|
-
type: "BOT_TEXT" /* BOT_TEXT */,
|
|
150
|
-
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?"
|
|
151
|
-
},
|
|
152
|
-
["PAYMENT_METHODS" /* PAYMENT_METHODS */]: {
|
|
153
|
-
id: "bot-payment-methods",
|
|
154
|
-
type: "BOT_TEXT" /* BOT_TEXT */,
|
|
155
|
-
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?"
|
|
156
|
-
},
|
|
157
|
-
["WARRANTY_INFO" /* WARRANTY_INFO */]: {
|
|
158
|
-
id: "bot-warranty-info",
|
|
159
|
-
type: "BOT_TEXT" /* BOT_TEXT */,
|
|
160
|
-
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"
|
|
161
|
-
},
|
|
162
|
-
["RETURN_POLICY" /* RETURN_POLICY */]: {
|
|
163
|
-
id: "bot-return-policy",
|
|
164
|
-
type: "BOT_TEXT" /* BOT_TEXT */,
|
|
165
|
-
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?"
|
|
166
|
-
},
|
|
167
|
-
["PROMOTION_INFO" /* PROMOTION_INFO */]: {
|
|
168
|
-
id: "bot-promotion-info",
|
|
169
|
-
type: "BOT_TEXT" /* BOT_TEXT */,
|
|
170
|
-
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: UTECH2024 \u0E23\u0E31\u0E1A\u0E2A\u0E48\u0E27\u0E19\u0E25\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2D\u0E35\u0E01 5%!"
|
|
171
|
-
},
|
|
172
|
-
["STOCK_AVAILABLE" /* STOCK_AVAILABLE */]: {
|
|
173
|
-
id: "bot-stock-available",
|
|
174
|
-
type: "BOT_TEXT" /* BOT_TEXT */,
|
|
175
|
-
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?"
|
|
176
|
-
},
|
|
177
|
-
["OUT_OF_STOCK" /* OUT_OF_STOCK */]: {
|
|
178
|
-
id: "bot-out-of-stock",
|
|
179
|
-
type: "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */,
|
|
180
|
-
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?",
|
|
181
|
-
menus: defaultCategory
|
|
182
|
-
},
|
|
183
|
-
["SPEC_INQUIRY" /* SPEC_INQUIRY */]: {
|
|
184
|
-
id: "bot-spec-inquiry",
|
|
185
|
-
type: "BOT_TEXT" /* BOT_TEXT */,
|
|
186
|
-
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?'
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
var mockMessages = [
|
|
190
|
-
{
|
|
191
|
-
id: "2",
|
|
192
|
-
type: "USER_TEXT" /* USER_TEXT */,
|
|
193
|
-
text: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F6CD}\uFE0F"
|
|
194
|
-
},
|
|
195
|
-
__spreadValues({}, mockResponse["ERROR" /* ERROR */]),
|
|
196
|
-
{
|
|
197
|
-
id: "4",
|
|
198
|
-
type: "USER_TEXT" /* USER_TEXT */,
|
|
199
|
-
text: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F6CD}\uFE0F"
|
|
200
|
-
},
|
|
201
|
-
__spreadValues({}, mockResponse["CATEGORY_NOTEBOOK" /* CATEGORY_NOTEBOOK */])
|
|
202
|
-
];
|
|
203
|
-
|
|
204
|
-
// src/hooks/use-openchat.tsx
|
|
205
|
-
import { useCallback, useState } from "react";
|
|
206
|
-
var useOpenChat = () => {
|
|
207
|
-
const [isOpen, setIsOpen] = useState(true);
|
|
208
|
-
const openChat = useCallback(() => setIsOpen(true), []);
|
|
209
|
-
const closeChat = useCallback(() => setIsOpen(false), []);
|
|
210
|
-
const toggleChat = useCallback(() => setIsOpen((prev) => !prev), []);
|
|
211
|
-
return {
|
|
212
|
-
isOpen,
|
|
213
|
-
openChat,
|
|
214
|
-
closeChat,
|
|
215
|
-
toggleChat
|
|
216
|
-
};
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
// src/contexts/chat-context.tsx
|
|
220
|
-
import { createContext, useCallback as useCallback2, useContext, useMemo, useState as useState2 } from "react";
|
|
221
|
-
import { jsx } from "react/jsx-runtime";
|
|
222
|
-
var ChatContext = createContext(void 0);
|
|
223
|
-
var ChatProvider = ({ children }) => {
|
|
224
|
-
const [messages, setMessages] = useState2([]);
|
|
225
|
-
const [latestMessage, setLatestMessage] = useState2();
|
|
226
|
-
const chatControls = useOpenChat();
|
|
227
|
-
const [isLoading, setIsLoading] = useState2(false);
|
|
228
|
-
const addUserMessage = useCallback2((text) => {
|
|
229
|
-
const newMessage = {
|
|
230
|
-
id: Date.now().toString() + Math.random().toString(),
|
|
231
|
-
text,
|
|
232
|
-
type: "USER_TEXT" /* USER_TEXT */
|
|
233
|
-
};
|
|
234
|
-
setLatestMessage(newMessage);
|
|
235
|
-
setMessages((prev) => [...prev, newMessage]);
|
|
236
|
-
setIsLoading(true);
|
|
237
|
-
}, []);
|
|
238
|
-
const addBotMessage = useCallback2((message) => __async(null, null, function* () {
|
|
239
|
-
yield new Promise((resolve) => setTimeout(resolve, Math.random() * 2e3 + 1e3));
|
|
240
|
-
setIsLoading(false);
|
|
241
|
-
const newMessage = __spreadProps(__spreadValues({}, message), {
|
|
242
|
-
id: Date.now().toString() + Math.random().toString()
|
|
243
|
-
});
|
|
244
|
-
setMessages((prev) => [...prev, newMessage]);
|
|
245
|
-
}), []);
|
|
246
|
-
const clearMessages = useCallback2(() => setMessages([]), []);
|
|
247
|
-
const value = useMemo(
|
|
248
|
-
() => ({
|
|
249
|
-
messages,
|
|
250
|
-
latestMessage,
|
|
251
|
-
isLoading,
|
|
252
|
-
setIsLoading,
|
|
253
|
-
addUserMessage,
|
|
254
|
-
addBotMessage,
|
|
255
|
-
clearMessages,
|
|
256
|
-
chatControls
|
|
257
|
-
}),
|
|
258
|
-
[messages, latestMessage, isLoading, chatControls, addUserMessage, addBotMessage, clearMessages]
|
|
259
|
-
);
|
|
260
|
-
return /* @__PURE__ */ jsx(ChatContext.Provider, { value, children });
|
|
261
|
-
};
|
|
262
|
-
var useChatContext = () => {
|
|
263
|
-
const context = useContext(ChatContext);
|
|
264
|
-
if (!context) {
|
|
265
|
-
throw new Error("useChatContext must be used within ChatProvider");
|
|
266
|
-
}
|
|
267
|
-
return context;
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
// src/utils/cn.ts
|
|
271
|
-
import { clsx } from "clsx";
|
|
272
|
-
import { twMerge } from "tailwind-merge";
|
|
273
|
-
function cn(...args) {
|
|
274
|
-
return twMerge(clsx(args));
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// src/utils/message.ts
|
|
278
|
-
var getMockBotMessage = (menu) => {
|
|
279
|
-
const newMessage = mockResponse[menu.mockResponse];
|
|
280
|
-
return newMessage ? newMessage : mockResponse["ERROR" /* ERROR */];
|
|
281
|
-
};
|
|
282
|
-
var getMockBotMessageByText = (text) => {
|
|
283
|
-
const menu = searchableMenus.find((menu2) => menu2.title.includes(text));
|
|
284
|
-
if (!menu) {
|
|
285
|
-
return mockResponse["ERROR" /* ERROR */];
|
|
286
|
-
}
|
|
287
|
-
const newMessage = mockResponse[menu.mockResponse];
|
|
288
|
-
return newMessage ? newMessage : mockResponse["ERROR" /* ERROR */];
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
// src/components/aizu-chat.tsx
|
|
292
|
-
import {
|
|
293
|
-
useCallback as useCallback3,
|
|
294
|
-
useEffect,
|
|
295
|
-
useRef,
|
|
296
|
-
useState as useState3
|
|
297
|
-
} from "react";
|
|
298
|
-
|
|
299
|
-
// src/components/input-bar/index.tsx
|
|
300
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
301
|
-
var ButtonSelectImage = (_a) => {
|
|
302
|
-
var _b = _a, { onClick, className } = _b, props = __objRest(_b, ["onClick", "className"]);
|
|
303
|
-
return /* @__PURE__ */ jsx2(
|
|
304
|
-
"button",
|
|
305
|
-
__spreadProps(__spreadValues({
|
|
306
|
-
type: "button",
|
|
307
|
-
onClick,
|
|
308
|
-
className: cn(
|
|
309
|
-
"shrink-0 w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center hover:bg-gray-200 transition-colors",
|
|
310
|
-
className
|
|
311
|
-
),
|
|
312
|
-
"aria-label": "Upload image"
|
|
313
|
-
}, props), {
|
|
314
|
-
children: /* @__PURE__ */ jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
315
|
-
/* @__PURE__ */ jsx2("title", { children: "Image Upload Icon" }),
|
|
316
|
-
/* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
317
|
-
/* @__PURE__ */ jsx2("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
318
|
-
/* @__PURE__ */ jsx2("polyline", { points: "21 15 16 10 5 21" })
|
|
319
|
-
] })
|
|
320
|
-
})
|
|
321
|
-
);
|
|
322
|
-
};
|
|
323
|
-
var InputText = (_a) => {
|
|
324
|
-
var _b = _a, { onMagicClick, placeholder, className } = _b, props = __objRest(_b, ["onMagicClick", "placeholder", "className"]);
|
|
325
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex-1 relative", children: [
|
|
326
|
-
/* @__PURE__ */ jsx2(
|
|
327
|
-
"input",
|
|
328
|
-
__spreadValues({
|
|
329
|
-
type: "text",
|
|
330
|
-
name: "message",
|
|
331
|
-
placeholder,
|
|
332
|
-
className: cn(
|
|
333
|
-
"w-full px-4 py-2 pr-12 rounded-full bg-gray-100 border-none outline-none focus:ring-2 focus:ring-orange-300 text-sm",
|
|
334
|
-
className
|
|
335
|
-
),
|
|
336
|
-
onKeyDown: (e) => {
|
|
337
|
-
var _a2;
|
|
338
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
339
|
-
e.preventDefault();
|
|
340
|
-
(_a2 = e.currentTarget.form) == null ? void 0 : _a2.requestSubmit();
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}, props)
|
|
344
|
-
),
|
|
345
|
-
onMagicClick && /* @__PURE__ */ jsx2(
|
|
346
|
-
"button",
|
|
347
|
-
{
|
|
348
|
-
type: "button",
|
|
349
|
-
onClick: onMagicClick,
|
|
350
|
-
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",
|
|
351
|
-
"aria-label": "AI assist",
|
|
352
|
-
children: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
353
|
-
/* @__PURE__ */ jsx2("title", { children: "Magic/AI Icon" }),
|
|
354
|
-
/* @__PURE__ */ jsx2("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" })
|
|
355
|
-
] })
|
|
356
|
-
}
|
|
357
|
-
)
|
|
358
|
-
] });
|
|
359
|
-
};
|
|
360
|
-
var ButtonConfirm = (_a) => {
|
|
361
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
362
|
-
return /* @__PURE__ */ jsx2(
|
|
363
|
-
"button",
|
|
364
|
-
__spreadProps(__spreadValues({
|
|
365
|
-
type: "submit",
|
|
366
|
-
className: cn(
|
|
367
|
-
"shrink-0 w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center hover:bg-gray-200 transition-colors",
|
|
368
|
-
className
|
|
369
|
-
),
|
|
370
|
-
"aria-label": "Send message"
|
|
371
|
-
}, props), {
|
|
372
|
-
children: /* @__PURE__ */ jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
373
|
-
/* @__PURE__ */ jsx2("title", { children: "Send Icon" }),
|
|
374
|
-
/* @__PURE__ */ jsx2("line", { x1: "12", y1: "19", x2: "12", y2: "5" }),
|
|
375
|
-
/* @__PURE__ */ jsx2("polyline", { points: "5 12 12 5 19 12" })
|
|
376
|
-
] })
|
|
377
|
-
})
|
|
378
|
-
);
|
|
379
|
-
};
|
|
380
|
-
var InputBar = (_a) => {
|
|
381
|
-
var _b = _a, {
|
|
382
|
-
onSend,
|
|
383
|
-
onImageClick,
|
|
384
|
-
onMagicClick,
|
|
385
|
-
placeholder = "\u0E16\u0E32\u0E21\u0E04\u0E33\u0E16\u0E32\u0E21\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22...",
|
|
386
|
-
className
|
|
387
|
-
} = _b, props = __objRest(_b, [
|
|
388
|
-
"onSend",
|
|
389
|
-
"onImageClick",
|
|
390
|
-
"onMagicClick",
|
|
391
|
-
"placeholder",
|
|
392
|
-
"className"
|
|
393
|
-
]);
|
|
394
|
-
const handleSubmit = (e) => {
|
|
395
|
-
e.preventDefault();
|
|
396
|
-
const formData = new FormData(e.currentTarget);
|
|
397
|
-
const message = formData.get("message");
|
|
398
|
-
if ((message == null ? void 0 : message.trim()) && onSend) {
|
|
399
|
-
onSend(message);
|
|
400
|
-
e.currentTarget.reset();
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
return /* @__PURE__ */ jsx2("section", __spreadProps(__spreadValues({ className: cn("bg-white p-4", className) }, props), { children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "flex items-center gap-3", children: [
|
|
404
|
-
/* @__PURE__ */ jsx2(ButtonSelectImage, { onClick: onImageClick }),
|
|
405
|
-
/* @__PURE__ */ jsx2(InputText, { placeholder, onMagicClick }),
|
|
406
|
-
/* @__PURE__ */ jsx2(ButtonConfirm, {})
|
|
407
|
-
] }) }));
|
|
408
|
-
};
|
|
409
|
-
InputBar.ButtonSelectImage = ButtonSelectImage;
|
|
410
|
-
InputBar.InputText = InputText;
|
|
411
|
-
InputBar.ButtonConfirm = ButtonConfirm;
|
|
412
|
-
|
|
413
|
-
// src/components/loading.tsx
|
|
414
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
415
|
-
var Loading = ({ message }) => {
|
|
416
|
-
return /* @__PURE__ */ jsxs2("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: [
|
|
417
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex justify-center items-center gap-x-1 ", children: [
|
|
418
|
-
/* @__PURE__ */ jsx3("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-wiggle" }),
|
|
419
|
-
/* @__PURE__ */ jsx3("span", { className: "w-1.25 h-1.25 rounded-full bg-orange-400 animate-wiggle" }),
|
|
420
|
-
/* @__PURE__ */ jsx3("span", { className: "w-0.75 h-0.75 rounded-full bg-orange-400 animate-wiggle" })
|
|
421
|
-
] }),
|
|
422
|
-
message && /* @__PURE__ */ jsx3("p", { className: "text-center text-[12px] text-gray-500 mt-1", children: message })
|
|
423
|
-
] });
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
// src/components/button.tsx
|
|
427
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
428
|
-
var Button = (_a) => {
|
|
429
|
-
var _b = _a, { children, className, onClick, ref } = _b, props = __objRest(_b, ["children", "className", "onClick", "ref"]);
|
|
430
|
-
return /* @__PURE__ */ jsx4(
|
|
431
|
-
"button",
|
|
432
|
-
__spreadProps(__spreadValues({
|
|
433
|
-
ref,
|
|
434
|
-
type: "button",
|
|
435
|
-
onClick,
|
|
436
|
-
className: cn(
|
|
437
|
-
"border border-orange-300 rounded-3xl",
|
|
438
|
-
"px-4 py-2",
|
|
439
|
-
"text-orange-500 text-sm",
|
|
440
|
-
"cursor-pointer",
|
|
441
|
-
className
|
|
442
|
-
)
|
|
443
|
-
}, props), {
|
|
444
|
-
children
|
|
445
|
-
})
|
|
446
|
-
);
|
|
447
|
-
};
|
|
448
|
-
|
|
449
|
-
// src/components/container.tsx
|
|
450
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
451
|
-
var Container = (_a) => {
|
|
452
|
-
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
453
|
-
return /* @__PURE__ */ jsx5("div", { className: cn("p-3 rounded-3xl border border-orange-300", className), children });
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
// src/components/message/index.tsx
|
|
457
|
-
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
458
|
-
var MessageBubble = ({ message, handleClick }) => {
|
|
459
|
-
if (message.type === "USER_TEXT" /* USER_TEXT */) {
|
|
460
|
-
return /* @__PURE__ */ jsx6(Container, { className: "ml-auto bg-orange-200 border-none text-sm", children: message.text });
|
|
461
|
-
}
|
|
462
|
-
if (message.type === "BOT_TEXT" /* BOT_TEXT */) {
|
|
463
|
-
return /* @__PURE__ */ jsx6(Container, { className: "mr-auto max-w-75.5 text-sm", children: message.text });
|
|
464
|
-
}
|
|
465
|
-
if (message.type === "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */) {
|
|
466
|
-
return /* @__PURE__ */ jsx6(MessageWithMenus, { type: message.type, message: message.text || "", menus: message.menus || [], handleClick });
|
|
467
|
-
}
|
|
468
|
-
if (message.type === "BOT_QUICK_MENUS" /* BOT_QUICK_MENUS */) {
|
|
469
|
-
return /* @__PURE__ */ jsx6(MessageWithMenus, { type: message.type, message: message.text || "", menus: message.menus || [], handleClick });
|
|
470
|
-
}
|
|
471
|
-
if (message.type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */) {
|
|
472
|
-
return /* @__PURE__ */ jsx6(MessageWithMenus, { type: message.type, message: message.text || "", menus: message.menus || [], handleClick });
|
|
473
|
-
}
|
|
474
|
-
return /* @__PURE__ */ jsx6(MenusImage, { menus: message.menus || [] });
|
|
475
|
-
};
|
|
476
|
-
var MessageWithMenus = ({ type, message, menus, className, handleClick }) => {
|
|
477
|
-
return /* @__PURE__ */ jsxs3(Container, { className: cn("mr-auto max-w-75.5 lg:max-w-80", className), children: [
|
|
478
|
-
/* @__PURE__ */ jsx6("p", { className: "text-sm mb-4", children: message }),
|
|
479
|
-
/* @__PURE__ */ jsx6("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) => {
|
|
480
|
-
if (menu == null ? void 0 : menu.phoneNumber) {
|
|
481
|
-
return /* @__PURE__ */ jsx6("li", { className: "w-full ", children: /* @__PURE__ */ jsx6(
|
|
482
|
-
"a",
|
|
483
|
-
{
|
|
484
|
-
href: `tel:+${menu == null ? void 0 : menu.phoneNumber}`,
|
|
485
|
-
className: "border border-orange-300 rounded-3xl px-4 py-2 text-orange-500 text-sm text-center block",
|
|
486
|
-
children: menu.title
|
|
487
|
-
}
|
|
488
|
-
) }, menu.id);
|
|
489
|
-
}
|
|
490
|
-
return /* @__PURE__ */ jsx6("li", { className: "min-w-max ", children: /* @__PURE__ */ jsx6(
|
|
491
|
-
Button,
|
|
492
|
-
{
|
|
493
|
-
className: cn({ "w-full": type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */ }),
|
|
494
|
-
onClick: () => {
|
|
495
|
-
handleClick(menu);
|
|
496
|
-
},
|
|
497
|
-
children: menu.title
|
|
498
|
-
}
|
|
499
|
-
) }, menu.id);
|
|
500
|
-
}) })
|
|
501
|
-
] });
|
|
502
|
-
};
|
|
503
|
-
var MenusImage = ({ menus }) => {
|
|
504
|
-
return /* @__PURE__ */ jsx6("ul", { className: "flex gap-x-2", children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ jsx6("li", { children: /* @__PURE__ */ jsx6("img", { src: menu == null ? void 0 : menu.imageUrl, alt: "menu-image" }) }, menu.id)) });
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
// src/components/quick-menus.tsx
|
|
508
|
-
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
509
|
-
var QuickMenus = ({ bannerSrc, message = "welcome message", menus, handleClick }) => {
|
|
510
|
-
return /* @__PURE__ */ jsxs4("section", { className: "w-75.5 bg-white shadow rounded-3xl overflow-hidden", children: [
|
|
511
|
-
bannerSrc ? /* @__PURE__ */ jsx7("img", { src: bannerSrc, alt: "banner" }) : /* @__PURE__ */ jsx7("div", { className: "w-75.5 h-29.5 border-b border-gray-200" }),
|
|
512
|
-
/* @__PURE__ */ jsxs4("div", { className: "p-3 flex flex-col gap-y-3", children: [
|
|
513
|
-
/* @__PURE__ */ jsx7("p", { className: "text-sm", children: message }),
|
|
514
|
-
/* @__PURE__ */ jsx7("ul", { className: "flex gap-3 flex-wrap", children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(Button, { onClick: () => {
|
|
515
|
-
handleClick(menu);
|
|
516
|
-
}, children: menu.title }) }, menu.id)) })
|
|
517
|
-
] })
|
|
518
|
-
] });
|
|
519
|
-
};
|
|
520
|
-
|
|
521
|
-
// src/components/quick-menus-chip.tsx
|
|
522
|
-
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
523
|
-
var QuickMenuChips = ({ menus, handleClick, className }) => {
|
|
524
|
-
return /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
|
|
525
|
-
/* @__PURE__ */ jsx8("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" }),
|
|
526
|
-
/* @__PURE__ */ jsx8("ul", { className: cn("flex lg:flex-wrap gap-3 overflow-x-scroll scrollbar-hide", className), children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8(
|
|
527
|
-
Button,
|
|
528
|
-
{
|
|
529
|
-
onClick: () => {
|
|
530
|
-
handleClick(menu);
|
|
531
|
-
},
|
|
532
|
-
className: "text-nowrap text-black/85 border-black/50",
|
|
533
|
-
children: menu.title
|
|
534
|
-
}
|
|
535
|
-
) }, menu.id)) })
|
|
536
|
-
] });
|
|
537
|
-
};
|
|
538
|
-
var quick_menus_chip_default = QuickMenuChips;
|
|
539
|
-
|
|
540
|
-
// src/contexts/aizu-client-context.tsx
|
|
541
|
-
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
542
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
543
|
-
var AizuClientContext = createContext2(
|
|
544
|
-
void 0
|
|
545
|
-
);
|
|
546
|
-
var AizuClientProvider = ({
|
|
547
|
-
children,
|
|
548
|
-
client
|
|
549
|
-
}) => {
|
|
550
|
-
return /* @__PURE__ */ jsx9(AizuClientContext.Provider, { value: { aizuClient: client }, children });
|
|
551
|
-
};
|
|
552
|
-
var useAizuClient = () => {
|
|
553
|
-
const context = useContext2(AizuClientContext);
|
|
554
|
-
if (!context) {
|
|
555
|
-
throw new Error("useAizuClient must be used within AizuClientProvider");
|
|
556
|
-
}
|
|
557
|
-
return context;
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
// src/components/aizu-chat.tsx
|
|
561
|
-
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
562
|
-
var AizuChat = ({ aizuClient }) => {
|
|
563
|
-
console.log("\u{1F680} ~ AizuChat ~ aizuClient:", aizuClient);
|
|
564
|
-
return /* @__PURE__ */ jsx10(AizuClientProvider, { client: aizuClient, children: /* @__PURE__ */ jsx10(ChatProvider, { children: /* @__PURE__ */ jsxs6("div", { children: [
|
|
565
|
-
/* @__PURE__ */ jsx10(FloatingButton, {}),
|
|
566
|
-
/* @__PURE__ */ jsxs6(ChatWindow, { children: [
|
|
567
|
-
/* @__PURE__ */ jsx10(ChatHeader, {}),
|
|
568
|
-
/* @__PURE__ */ jsx10(ChatBody, {}),
|
|
569
|
-
/* @__PURE__ */ jsx10(ChatFooter, {})
|
|
570
|
-
] })
|
|
571
|
-
] }) }) });
|
|
572
|
-
};
|
|
573
|
-
var FloatingButton = () => {
|
|
574
|
-
const { chatControls } = useChatContext();
|
|
575
|
-
return /* @__PURE__ */ jsx10(
|
|
576
|
-
"button",
|
|
577
|
-
{
|
|
578
|
-
type: "button",
|
|
579
|
-
onClick: chatControls.toggleChat,
|
|
580
|
-
className: "rounded-full p-2 aspect-square w-10 bg-black/60 cursor-pointer fixed right-5 bottom-5",
|
|
581
|
-
children: "AI"
|
|
582
|
-
}
|
|
583
|
-
);
|
|
584
|
-
};
|
|
585
|
-
var ChatWindow = ({ children }) => {
|
|
586
|
-
const { chatControls } = useChatContext();
|
|
587
|
-
return /* @__PURE__ */ jsx10(
|
|
588
|
-
"div",
|
|
589
|
-
{
|
|
590
|
-
className: cn(
|
|
591
|
-
"w-full lg:w-107.5 h-full lg:max-h-201",
|
|
592
|
-
"z-9999 fixed top-0 right-0 lg:right-5 lg:bottom-20 lg:top-auto bg-[#F8F8FA]",
|
|
593
|
-
"lg:rounded-4xl shadow-2xl overflow-hidden",
|
|
594
|
-
"flex flex-col",
|
|
595
|
-
{ invisible: !chatControls.isOpen }
|
|
596
|
-
),
|
|
597
|
-
children
|
|
598
|
-
}
|
|
599
|
-
);
|
|
600
|
-
};
|
|
601
|
-
var ChatHeader = () => {
|
|
602
|
-
return /* @__PURE__ */ jsxs6("section", { className: "flex justify-between items-center bg-white py-3 px-4", children: [
|
|
603
|
-
/* @__PURE__ */ jsx10("button", { type: "button", children: " Back" }),
|
|
604
|
-
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center", children: [
|
|
605
|
-
/* @__PURE__ */ jsx10("span", { children: "Shop Logo" }),
|
|
606
|
-
/* @__PURE__ */ jsx10("span", { className: "text-[10px]", children: "Powered by Zimpligital" })
|
|
607
|
-
] }),
|
|
608
|
-
/* @__PURE__ */ jsx10("div", {})
|
|
609
|
-
] });
|
|
610
|
-
};
|
|
611
|
-
var ChatBody = () => {
|
|
612
|
-
const { isLoading, addUserMessage, addBotMessage, messages, latestMessage } = useChatContext();
|
|
613
|
-
const [showWaitMessage, setShowWaitMessage] = useState3(false);
|
|
614
|
-
const messagesEndRef = useRef(null);
|
|
615
|
-
const loadingMessage = showWaitMessage ? "Wait a minute..." : void 0;
|
|
616
|
-
const messagesDisplay = messages || [];
|
|
617
|
-
const displayWelcomeMessage = messagesDisplay.length === 0 && !isLoading;
|
|
618
|
-
const handleClick = useCallback3(
|
|
619
|
-
(menu) => __async(null, null, function* () {
|
|
620
|
-
if (menu.title.includes(tryAgain) && !!(latestMessage == null ? void 0 : latestMessage.text)) {
|
|
621
|
-
return addUserMessage(latestMessage == null ? void 0 : latestMessage.text);
|
|
622
|
-
}
|
|
623
|
-
addUserMessage(menu.title);
|
|
624
|
-
const mockResponse2 = getMockBotMessage(menu);
|
|
625
|
-
addBotMessage(mockResponse2);
|
|
626
|
-
}),
|
|
627
|
-
[addUserMessage, addBotMessage, latestMessage]
|
|
628
|
-
);
|
|
629
|
-
useEffect(() => {
|
|
630
|
-
var _a;
|
|
631
|
-
(_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
632
|
-
}, [isLoading, messagesDisplay.length]);
|
|
633
|
-
useEffect(() => {
|
|
634
|
-
let timer;
|
|
635
|
-
if (isLoading) {
|
|
636
|
-
timer = setTimeout(() => {
|
|
637
|
-
setShowWaitMessage(true);
|
|
638
|
-
}, 2e3);
|
|
639
|
-
} else {
|
|
640
|
-
setShowWaitMessage(false);
|
|
641
|
-
}
|
|
642
|
-
return () => {
|
|
643
|
-
if (timer) clearTimeout(timer);
|
|
644
|
-
};
|
|
645
|
-
}, [isLoading]);
|
|
646
|
-
return /* @__PURE__ */ jsx10("section", { className: "flex-1 overflow-y-auto relative", children: /* @__PURE__ */ jsxs6("section", { className: " p-4 flex flex-col gap-y-3 overflow-y-auto", children: [
|
|
647
|
-
/* @__PURE__ */ jsx10(
|
|
648
|
-
QuickMenus,
|
|
649
|
-
{
|
|
650
|
-
bannerSrc: defaultBanner,
|
|
651
|
-
menus: defaultQuickMenus,
|
|
652
|
-
message: defaultQuickMenuMessage,
|
|
653
|
-
handleClick
|
|
654
|
-
}
|
|
655
|
-
),
|
|
656
|
-
messagesDisplay == null ? void 0 : messagesDisplay.map((message) => /* @__PURE__ */ jsx10(
|
|
657
|
-
MessageBubble,
|
|
658
|
-
{
|
|
659
|
-
message,
|
|
660
|
-
handleClick
|
|
661
|
-
},
|
|
662
|
-
message.id
|
|
663
|
-
)),
|
|
664
|
-
isLoading && /* @__PURE__ */ jsx10(Loading, { message: loadingMessage }),
|
|
665
|
-
/* @__PURE__ */ jsx10("div", { ref: messagesEndRef }),
|
|
666
|
-
displayWelcomeMessage && /* @__PURE__ */ jsx10("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 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 UTECH AI" })
|
|
667
|
-
] }) });
|
|
668
|
-
};
|
|
669
|
-
var ChatFooter = () => {
|
|
670
|
-
const { addUserMessage, addBotMessage, latestMessage } = useChatContext();
|
|
671
|
-
const handleClick = useCallback3(
|
|
672
|
-
(menu) => __async(null, null, function* () {
|
|
673
|
-
if (menu.title.includes(tryAgain) && !!(latestMessage == null ? void 0 : latestMessage.text)) {
|
|
674
|
-
return addUserMessage(latestMessage == null ? void 0 : latestMessage.text);
|
|
675
|
-
}
|
|
676
|
-
addUserMessage(menu.title);
|
|
677
|
-
const mockResponse2 = getMockBotMessage(menu);
|
|
678
|
-
addBotMessage(mockResponse2);
|
|
679
|
-
}),
|
|
680
|
-
[addUserMessage, addBotMessage, latestMessage]
|
|
681
|
-
);
|
|
682
|
-
const handleSend = useCallback3(
|
|
683
|
-
(message) => {
|
|
684
|
-
addUserMessage(message);
|
|
685
|
-
const mockResponse2 = getMockBotMessageByText(message);
|
|
686
|
-
addBotMessage(mockResponse2);
|
|
687
|
-
},
|
|
688
|
-
[addUserMessage, addBotMessage]
|
|
689
|
-
);
|
|
690
|
-
return /* @__PURE__ */ jsxs6("section", { className: "bg-white h-42.5 lg:h-46", children: [
|
|
691
|
-
/* @__PURE__ */ jsx10(
|
|
692
|
-
quick_menus_chip_default,
|
|
693
|
-
{
|
|
694
|
-
handleClick,
|
|
695
|
-
menus: defaultQuickMenuChips,
|
|
696
|
-
className: "pl-4 pt-4 pb-2"
|
|
697
|
-
}
|
|
698
|
-
),
|
|
699
|
-
/* @__PURE__ */ jsx10(
|
|
700
|
-
InputBar,
|
|
701
|
-
{
|
|
702
|
-
placeholder: "\u0E16\u0E32\u0E21\u0E04\u0E33\u0E16\u0E32\u0E21\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22...",
|
|
703
|
-
onSend: handleSend,
|
|
704
|
-
onImageClick: () => console.log("Image upload"),
|
|
705
|
-
onMagicClick: () => console.log("AI assist")
|
|
706
|
-
}
|
|
707
|
-
)
|
|
708
|
-
] });
|
|
709
|
-
};
|
|
710
|
-
|
|
711
|
-
// src/components/test-component.tsx
|
|
712
|
-
import { useState as useState4 } from "react";
|
|
713
|
-
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
714
|
-
var TestComponent = ({ client }) => {
|
|
715
|
-
return /* @__PURE__ */ jsx11(AizuClientProvider, { client, children: /* @__PURE__ */ jsx11(TestComponentContent, {}) });
|
|
716
|
-
};
|
|
717
|
-
var TestComponentContent = () => {
|
|
718
|
-
const { aizuClient } = useAizuClient();
|
|
719
|
-
const [query, setQuery] = useState4("");
|
|
720
|
-
const [response, setResponse] = useState4("");
|
|
721
|
-
const [loading, setLoading] = useState4(false);
|
|
722
|
-
const handleSend = () => __async(null, null, function* () {
|
|
723
|
-
if (!query.trim()) return;
|
|
724
|
-
try {
|
|
725
|
-
setLoading(true);
|
|
726
|
-
setResponse("");
|
|
727
|
-
console.log("\u{1F4E4} Sending query:", query);
|
|
728
|
-
const result = yield aizuClient.chat({ query });
|
|
729
|
-
console.log("\u2705 Got response:", result);
|
|
730
|
-
setResponse(result.response);
|
|
731
|
-
} catch (error) {
|
|
732
|
-
console.error("\u274C Error:", error);
|
|
733
|
-
setResponse(`Error ${error.message}`);
|
|
734
|
-
} finally {
|
|
735
|
-
setLoading(false);
|
|
736
|
-
}
|
|
737
|
-
});
|
|
738
|
-
return /* @__PURE__ */ jsxs7("div", { className: "border-2 border-blue-500 p-4 rounded space-y-4", children: [
|
|
739
|
-
/* @__PURE__ */ jsx11("h2", { className: "font-bold text-xl", children: "Test API Call" }),
|
|
740
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex gap-2", children: [
|
|
741
|
-
/* @__PURE__ */ jsx11(
|
|
742
|
-
"input",
|
|
743
|
-
{
|
|
744
|
-
type: "text",
|
|
745
|
-
value: query,
|
|
746
|
-
onChange: (e) => setQuery(e.target.value),
|
|
747
|
-
placeholder: "Type your question...",
|
|
748
|
-
className: "flex-1 border p-2 rounded",
|
|
749
|
-
disabled: loading
|
|
750
|
-
}
|
|
751
|
-
),
|
|
752
|
-
/* @__PURE__ */ jsx11(
|
|
753
|
-
"button",
|
|
754
|
-
{
|
|
755
|
-
type: "button",
|
|
756
|
-
onClick: handleSend,
|
|
757
|
-
disabled: loading || !query.trim(),
|
|
758
|
-
className: "bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 disabled:bg-gray-400",
|
|
759
|
-
children: loading ? "Sending..." : "Send"
|
|
760
|
-
}
|
|
761
|
-
)
|
|
762
|
-
] }),
|
|
763
|
-
response && /* @__PURE__ */ jsxs7("div", { className: "p-3 bg-gray-100 rounded", children: [
|
|
764
|
-
/* @__PURE__ */ jsx11("strong", { children: "Response:" }),
|
|
765
|
-
/* @__PURE__ */ jsx11("p", { className: "mt-1 whitespace-pre-wrap", children: response })
|
|
766
|
-
] })
|
|
767
|
-
] });
|
|
768
|
-
};
|
|
769
|
-
|
|
770
|
-
export {
|
|
771
|
-
Loading,
|
|
772
|
-
Button,
|
|
773
|
-
QuickMenus,
|
|
774
|
-
AizuChat,
|
|
775
|
-
TestComponent
|
|
776
|
-
};
|