@quoreadmin/ui 1.10.33 → 1.11.0

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.
Files changed (365) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +29 -27
  3. package/dist/index10.js +2 -2
  4. package/dist/index101.js +20 -25
  5. package/dist/index102.js +34 -0
  6. package/dist/{index103.js → index104.js} +1 -1
  7. package/dist/index106.js +147 -2
  8. package/dist/index107.js +2 -37
  9. package/dist/index108.js +39 -0
  10. package/dist/index11.js +2 -2
  11. package/dist/{index109.js → index110.js} +2 -2
  12. package/dist/{index111.js → index112.js} +1 -1
  13. package/dist/{index113.js → index114.js} +3 -3
  14. package/dist/{index115.js → index116.js} +5 -5
  15. package/dist/{index117.js → index118.js} +1 -1
  16. package/dist/index12.js +2 -2
  17. package/dist/{index119.js → index120.js} +5 -5
  18. package/dist/index13.js +2 -2
  19. package/dist/{index131.js → index132.js} +2 -2
  20. package/dist/{index136.js → index137.js} +1 -1
  21. package/dist/{index138.js → index139.js} +2 -2
  22. package/dist/index14.js +2 -2
  23. package/dist/index142.js +167 -0
  24. package/dist/{index143.js → index146.js} +1 -1
  25. package/dist/index15.js +2 -2
  26. package/dist/{index147.js → index150.js} +379 -399
  27. package/dist/{index149.js → index152.js} +1 -1
  28. package/dist/{index151.js → index154.js} +10 -10
  29. package/dist/index16.js +2 -2
  30. package/dist/index160.js +581 -86
  31. package/dist/index163.js +93 -0
  32. package/dist/index165.js +87 -356
  33. package/dist/index168.js +389 -0
  34. package/dist/index17.js +2 -2
  35. package/dist/{index167.js → index170.js} +1 -1
  36. package/dist/index172.js +205 -111
  37. package/dist/index175.js +110 -87
  38. package/dist/index176.js +478 -844
  39. package/dist/index177.js +5520 -36
  40. package/dist/index178.js +90 -279
  41. package/dist/index179.js +833 -122
  42. package/dist/index18.js +2 -2
  43. package/dist/index180.js +36 -1197
  44. package/dist/index181.js +268 -760
  45. package/dist/index182.js +146 -1304
  46. package/dist/index183.js +1151 -228
  47. package/dist/index184.js +754 -88
  48. package/dist/index185.js +1308 -2
  49. package/dist/index186.js +259 -1359
  50. package/dist/index187.js +108 -0
  51. package/dist/index188.js +2 -18
  52. package/dist/index189.js +1372 -14
  53. package/dist/index19.js +2 -2
  54. package/dist/index191.js +8 -8
  55. package/dist/index192.js +10 -17
  56. package/dist/index193.js +18 -759
  57. package/dist/index194.js +18 -1177
  58. package/dist/index195.js +22 -1231
  59. package/dist/index196.js +740 -11258
  60. package/dist/index197.js +1177 -36
  61. package/dist/index198.js +1233 -43
  62. package/dist/index199.js +11258 -1209
  63. package/dist/index2.js +2 -2
  64. package/dist/index20.js +3 -3
  65. package/dist/index200.js +38 -0
  66. package/dist/index201.js +44 -5938
  67. package/dist/index202.js +1149 -128
  68. package/dist/index204.js +5933 -13
  69. package/dist/index205.js +205 -76
  70. package/dist/index206.js +28 -246
  71. package/dist/index207.js +14 -13680
  72. package/dist/index208.js +77 -26
  73. package/dist/index209.js +245 -55
  74. package/dist/index21.js +2 -2
  75. package/dist/index210.js +13655 -209
  76. package/dist/index211.js +26 -310
  77. package/dist/index212.js +43 -277
  78. package/dist/index213.js +231 -81
  79. package/dist/index214.js +291 -387
  80. package/dist/index215.js +296 -21
  81. package/dist/index219.js +2 -2
  82. package/dist/index22.js +2 -2
  83. package/dist/index220.js +1 -1
  84. package/dist/index222.js +4 -4
  85. package/dist/index224.js +1 -1
  86. package/dist/index225.js +1 -1
  87. package/dist/index226.js +1 -1
  88. package/dist/index227.js +4 -4
  89. package/dist/index229.js +1 -1
  90. package/dist/index23.js +2 -2
  91. package/dist/index230.js +84 -157
  92. package/dist/index231.js +384 -205
  93. package/dist/index232.js +22 -37
  94. package/dist/index233.js +127 -10
  95. package/dist/index234.js +25 -148
  96. package/dist/index235.js +80 -20
  97. package/dist/index236.js +1 -1
  98. package/dist/index237.js +13 -15
  99. package/dist/index238.js +19 -198
  100. package/dist/index239.js +18 -68
  101. package/dist/index24.js +2 -2
  102. package/dist/index240.js +20 -34
  103. package/dist/index241.js +143 -22
  104. package/dist/index242.js +11 -13
  105. package/dist/index243.js +12 -12
  106. package/dist/index244.js +198 -19
  107. package/dist/index245.js +48 -814
  108. package/dist/index246.js +34 -702
  109. package/dist/index247.js +39 -175
  110. package/dist/index248.js +253 -20
  111. package/dist/index249.js +8 -20
  112. package/dist/index250.js +138 -22
  113. package/dist/index251.js +83 -20
  114. package/dist/index252.js +160 -19
  115. package/dist/index253.js +228 -3
  116. package/dist/index254.js +31 -181
  117. package/dist/index255.js +10 -133
  118. package/dist/index256.js +22 -1223
  119. package/dist/index257.js +21 -126
  120. package/dist/index258.js +12 -12
  121. package/dist/index259.js +836 -22
  122. package/dist/index26.js +2 -2
  123. package/dist/index260.js +701 -21
  124. package/dist/index261.js +174 -36
  125. package/dist/index262.js +15 -22
  126. package/dist/index263.js +7 -7
  127. package/dist/index264.js +13 -13
  128. package/dist/index265.js +2 -1
  129. package/dist/index266.js +187 -2
  130. package/dist/index267.js +131 -78
  131. package/dist/index268.js +1223 -20
  132. package/dist/index269.js +11 -11
  133. package/dist/index27.js +2 -2
  134. package/dist/index270.js +22 -253
  135. package/dist/index271.js +21 -7
  136. package/dist/index272.js +29 -138
  137. package/dist/index273.js +20 -83
  138. package/dist/index274.js +20 -3709
  139. package/dist/index275.js +2 -60
  140. package/dist/index276.js +2 -83
  141. package/dist/index277.js +3690 -33
  142. package/dist/index278.js +34 -189
  143. package/dist/index279.js +82 -9
  144. package/dist/index28.js +2 -2
  145. package/dist/index280.js +34 -39
  146. package/dist/index281.js +186 -32
  147. package/dist/index282.js +9 -53
  148. package/dist/index283.js +39 -63
  149. package/dist/index284.js +35 -702
  150. package/dist/index285.js +40 -33
  151. package/dist/index286.js +40 -23
  152. package/dist/index287.js +727 -10
  153. package/dist/index288.js +38 -696
  154. package/dist/index289.js +62 -818
  155. package/dist/index29.js +2 -2
  156. package/dist/index290.js +10 -53
  157. package/dist/index291.js +694 -68
  158. package/dist/index292.js +820 -26
  159. package/dist/index293.js +2 -22
  160. package/dist/index294.js +78 -21
  161. package/dist/index295.js +52 -14
  162. package/dist/index296.js +26 -17
  163. package/dist/index297.js +22 -23
  164. package/dist/index298.js +22 -3
  165. package/dist/index299.js +16 -27
  166. package/dist/index3.js +2 -2
  167. package/dist/index30.js +2 -2
  168. package/dist/index300.js +17 -2
  169. package/dist/index301.js +21 -77
  170. package/dist/index302.js +78 -21
  171. package/dist/index303.js +22 -935
  172. package/dist/index304.js +935 -22
  173. package/dist/index305.js +15 -13
  174. package/dist/index306.js +5 -5
  175. package/dist/index307.js +19 -68
  176. package/dist/index308.js +68 -18
  177. package/dist/index309.js +14 -14
  178. package/dist/index31.js +3 -3
  179. package/dist/index310.js +19 -22
  180. package/dist/index311.js +14 -14
  181. package/dist/index312.js +21 -62
  182. package/dist/index313.js +63 -1534
  183. package/dist/index314.js +79 -381
  184. package/dist/index315.js +3 -2731
  185. package/dist/index316.js +24 -83
  186. package/dist/index317.js +1294 -3558
  187. package/dist/index318.js +379 -53
  188. package/dist/index319.js +2730 -14
  189. package/dist/index32.js +2 -2
  190. package/dist/index320.js +82 -80
  191. package/dist/index321.js +3749 -153
  192. package/dist/index322.js +54 -240
  193. package/dist/index323.js +15 -37
  194. package/dist/index324.js +75 -226
  195. package/dist/index325.js +200 -4
  196. package/dist/index326.js +236 -124
  197. package/dist/index327.js +36 -67
  198. package/dist/index328.js +124 -81
  199. package/dist/index329.js +397 -26
  200. package/dist/index33.js +2 -2
  201. package/dist/index330.js +235 -9
  202. package/dist/index331.js +5 -74
  203. package/dist/index332.js +133 -3
  204. package/dist/index333.js +68 -2
  205. package/dist/index334.js +83 -79
  206. package/dist/index335.js +27 -52
  207. package/dist/index336.js +8 -5
  208. package/dist/index337.js +74 -4
  209. package/dist/index338.js +3 -178
  210. package/dist/index339.js +2 -63
  211. package/dist/index34.js +2 -2
  212. package/dist/index340.js +82 -74
  213. package/dist/index341.js +53 -8
  214. package/dist/index342.js +5 -12
  215. package/dist/index343.js +4 -54
  216. package/dist/index344.js +176 -9
  217. package/dist/index345.js +61 -12
  218. package/dist/index346.js +75 -58
  219. package/dist/index347.js +19 -51
  220. package/dist/index348.js +19 -30
  221. package/dist/index349.js +64 -2
  222. package/dist/index35.js +2 -2
  223. package/dist/index350.js +37 -5
  224. package/dist/index351.js +9 -2
  225. package/dist/index352.js +13 -23
  226. package/dist/index353.js +52 -38
  227. package/dist/index354.js +12 -2
  228. package/dist/index355.js +14 -11
  229. package/dist/index356.js +54 -16
  230. package/dist/index357.js +52 -10
  231. package/dist/index358.js +31 -10
  232. package/dist/index359.js +2 -17
  233. package/dist/index36.js +2 -2
  234. package/dist/index360.js +5 -2
  235. package/dist/index361.js +2 -9
  236. package/dist/index362.js +23 -10
  237. package/dist/index363.js +39 -12
  238. package/dist/index364.js +2 -20
  239. package/dist/index365.js +11 -20
  240. package/dist/index366.js +18 -62
  241. package/dist/index367.js +10 -37
  242. package/dist/index368.js +10 -21
  243. package/dist/index369.js +16 -55
  244. package/dist/index37.js +2 -2
  245. package/dist/index370.js +2 -29
  246. package/dist/index371.js +9 -7
  247. package/dist/index372.js +9 -51
  248. package/dist/index373.js +13 -5
  249. package/dist/index374.js +19 -10
  250. package/dist/index375.js +56 -7
  251. package/dist/index376.js +29 -28
  252. package/dist/index377.js +7 -2
  253. package/dist/index378.js +50 -68
  254. package/dist/index379.js +5 -166
  255. package/dist/index38.js +2 -2
  256. package/dist/index380.js +12 -17
  257. package/dist/index381.js +6 -100
  258. package/dist/index382.js +28 -91
  259. package/dist/index383.js +2 -98
  260. package/dist/index384.js +69 -12
  261. package/dist/index385.js +167 -7
  262. package/dist/index386.js +131 -28
  263. package/dist/index387.js +17 -11
  264. package/dist/index388.js +98 -1
  265. package/dist/index389.js +90 -3
  266. package/dist/index39.js +2 -2
  267. package/dist/index390.js +98 -12
  268. package/dist/index391.js +30 -4
  269. package/dist/index392.js +11 -33
  270. package/dist/index393.js +4 -31
  271. package/dist/index394.js +4 -28
  272. package/dist/index395.js +12 -60
  273. package/dist/index396.js +7 -3
  274. package/dist/index397.js +12 -2
  275. package/dist/index398.js +5 -2
  276. package/dist/index399.js +33 -17
  277. package/dist/index4.js +2 -2
  278. package/dist/index40.js +2 -2
  279. package/dist/index400.js +31 -13
  280. package/dist/index401.js +28 -6
  281. package/dist/index402.js +57 -28
  282. package/dist/index403.js +489 -0
  283. package/dist/index404.js +128 -0
  284. package/dist/index405.js +5 -0
  285. package/dist/index406.js +4 -0
  286. package/dist/index407.js +4 -0
  287. package/dist/index408.js +19 -0
  288. package/dist/index409.js +15 -0
  289. package/dist/index41.js +2 -2
  290. package/dist/index410.js +8 -0
  291. package/dist/index411.js +34 -0
  292. package/dist/index42.js +4 -29
  293. package/dist/index43.js +25 -32
  294. package/dist/index44.js +32 -37
  295. package/dist/index45.js +37 -1391
  296. package/dist/index46.js +1350 -348
  297. package/dist/index47.js +367 -145
  298. package/dist/index48.js +155 -18
  299. package/dist/index49.js +16 -42
  300. package/dist/index5.js +2 -2
  301. package/dist/index50.js +45 -5
  302. package/dist/index51.js +5 -69
  303. package/dist/index52.js +67 -61
  304. package/dist/index53.js +57 -175
  305. package/dist/index54.js +173 -77
  306. package/dist/index55.js +79 -200
  307. package/dist/index56.js +206 -68
  308. package/dist/index57.js +69 -20
  309. package/dist/index58.js +20 -11
  310. package/dist/index59.js +10 -6
  311. package/dist/index6.js +2 -2
  312. package/dist/index60.js +5 -209
  313. package/dist/index61.js +210 -12
  314. package/dist/index62.js +12 -184
  315. package/dist/index63.js +176 -68
  316. package/dist/index64.js +79 -0
  317. package/dist/index66.js +7 -91
  318. package/dist/index67.js +93 -0
  319. package/dist/index7.js +2 -2
  320. package/dist/{index74.js → index75.js} +2 -2
  321. package/dist/index79.js +38 -395
  322. package/dist/index8.js +3 -3
  323. package/dist/index80.js +419 -0
  324. package/dist/{index83.js → index84.js} +4 -4
  325. package/dist/{index85.js → index86.js} +1 -1
  326. package/dist/index88.js +23 -143
  327. package/dist/index89.js +156 -0
  328. package/dist/index9.js +2 -2
  329. package/dist/{index90.js → index91.js} +5 -5
  330. package/dist/{index92.js → index93.js} +5 -5
  331. package/dist/{index98.js → index99.js} +4 -4
  332. package/dist/src/components/popper/popper.vue.d.ts +90 -0
  333. package/dist/src/components/popper/use-popper.d.ts +37 -0
  334. package/dist/src/index.d.ts +1 -0
  335. package/package.json +2 -1
  336. package/dist/index100.js +0 -29
  337. package/dist/index105.js +0 -149
  338. package/dist/index157.js +0 -588
  339. package/dist/index162.js +0 -120
  340. package/dist/index169.js +0 -210
  341. package/dist/index173.js +0 -497
  342. package/dist/index174.js +0 -5524
  343. package/dist/index190.js +0 -20
  344. package/dist/index203.js +0 -37
  345. package/dist/index65.js +0 -9
  346. package/dist/index78.js +0 -62
  347. package/dist/index87.js +0 -36
  348. package/dist/src/components/room-details-popover/room-details-popover.d.ts +0 -2167
  349. /package/dist/{index121.js → index122.js} +0 -0
  350. /package/dist/{index123.js → index124.js} +0 -0
  351. /package/dist/{index125.js → index126.js} +0 -0
  352. /package/dist/{index127.js → index128.js} +0 -0
  353. /package/dist/{index129.js → index130.js} +0 -0
  354. /package/dist/{index134.js → index135.js} +0 -0
  355. /package/dist/{index141.js → index144.js} +0 -0
  356. /package/dist/{index145.js → index148.js} +0 -0
  357. /package/dist/{index153.js → index156.js} +0 -0
  358. /package/dist/{index155.js → index158.js} +0 -0
  359. /package/dist/{index68.js → index69.js} +0 -0
  360. /package/dist/{index70.js → index71.js} +0 -0
  361. /package/dist/{index72.js → index73.js} +0 -0
  362. /package/dist/{index76.js → index77.js} +0 -0
  363. /package/dist/{index81.js → index82.js} +0 -0
  364. /package/dist/{index94.js → index95.js} +0 -0
  365. /package/dist/{index96.js → index97.js} +0 -0
@@ -1,33 +1,35 @@
1
- import { defineComponent as Tt, ref as i, computed as w, watch as B, onMounted as Dt, onUnmounted as Ot } from "vue";
2
- import { useI18n as kt } from "vue-i18n";
3
- import { DateTime as g } from "./index174.js";
4
- import "./index197.js";
5
- import Et from "./index2.js";
6
- import At from "./index3.js";
7
- import St from "./index4.js";
8
- import bt from "./index21.js";
9
- import Nt from "./index28.js";
10
- import Ct from "./index41.js";
11
- import Mt from "./index20.js";
12
- import Rt from "./index48.js";
13
- import Ht from "./index50.js";
14
- import Lt from "./index49.js";
15
- import Pt from "./index52.js";
16
- import Z from "./index198.js";
17
- const qt = 996, ea = Tt({
1
+ import { defineComponent as ht, ref as i, computed as g, watch as B, onMounted as yt, onUnmounted as gt } from "vue";
2
+ import { useI18n as _t } from "vue-i18n";
3
+ import { DateTime as _ } from "./index177.js";
4
+ import "./index200.js";
5
+ import wt from "./index2.js";
6
+ import It from "./index3.js";
7
+ import Tt from "./index4.js";
8
+ import Dt from "./index21.js";
9
+ import Ot from "./index28.js";
10
+ import kt from "./index42.js";
11
+ import Et from "./index41.js";
12
+ import At from "./index20.js";
13
+ import St from "./index49.js";
14
+ import Nt from "./index51.js";
15
+ import bt from "./index50.js";
16
+ import Mt from "./index53.js";
17
+ import J from "./index201.js";
18
+ const Ct = 996, Kt = ht({
18
19
  name: "QRoomDetailsPopover",
19
20
  components: {
20
- QAccordion: Et,
21
- QActivityItem: At,
22
- QAvatar: St,
23
- QDatePicker: Mt,
24
- QDivider: bt,
25
- QIcon: Nt,
26
- QPopover: Ct,
27
- QTag: Rt,
28
- QTextarea: Lt,
29
- QTimePicker: Ht,
30
- QTooltip: Pt
21
+ QAccordion: wt,
22
+ QActivityItem: It,
23
+ QAvatar: Tt,
24
+ QDatePicker: At,
25
+ QDivider: Dt,
26
+ QIcon: Ot,
27
+ QPopper: kt,
28
+ QPopover: Et,
29
+ QTag: St,
30
+ QTextarea: bt,
31
+ QTimePicker: Nt,
32
+ QTooltip: Mt
31
33
  },
32
34
  props: {
33
35
  id: {
@@ -171,14 +173,14 @@ const qt = 996, ea = Tt({
171
173
  }
172
174
  },
173
175
  emits: ["create:callback", "create:todo", "refresh:pms", "show:toast", "toggle"],
174
- setup(s, { emit: f }) {
175
- const { t: u } = kt(), De = () => {
176
- const e = g.now().setZone(s.propertyTimeZone), t = e.isValid ? e : g.now(), a = t.hour, o = t.minute, n = a >= 12 ? "PM" : "AM";
177
- return `${a % 12 || 12}:${String(o).padStart(2, "0")} ${n}`;
178
- }, X = () => {
179
- const e = g.now().setZone(s.propertyTimeZone), t = e.isValid ? e : g.now();
180
- return new Date(t.year, t.month - 1, t.day, 12, 0, 0, 0);
181
- }, Oe = "11:59 PM", r = i(s.room), ue = i(!1), ce = i("left"), ee = i([
176
+ setup(s, { emit: p }) {
177
+ const { t: u } = _t(), he = () => {
178
+ const e = _.now().setZone(s.propertyTimeZone), a = e.isValid ? e : _.now(), t = a.hour, o = a.minute, n = t >= 12 ? "PM" : "AM";
179
+ return `${t % 12 || 12}:${String(o).padStart(2, "0")} ${n}`;
180
+ }, K = () => {
181
+ const e = _.now().setZone(s.propertyTimeZone), a = e.isValid ? e : _.now();
182
+ return new Date(a.year, a.month - 1, a.day, 12, 0, 0, 0);
183
+ }, ye = "11:59 PM", r = i(s.room), re = i(!1), z = i([
182
184
  {
183
185
  id: 1,
184
186
  label: u("HC_DEPARTMENT")
@@ -191,7 +193,7 @@ const qt = 996, ea = Tt({
191
193
  id: 0,
192
194
  label: u("HC_ANYONE")
193
195
  }
194
- ]), b = i(""), p = i({
196
+ ]), N = i(""), f = i({
195
197
  checkInDate: /* @__PURE__ */ new Date(),
196
198
  checkOutDate: /* @__PURE__ */ new Date(),
197
199
  guestEmail: "",
@@ -203,11 +205,11 @@ const qt = 996, ea = Tt({
203
205
  problem: null,
204
206
  notes: "",
205
207
  tokenId: r.value?.tokenId
206
- }), G = i(250), U = i(290), C = i([]), ke = i([]), te = i(!0), ae = i(!0), M = i({
208
+ }), M = i([]), ge = i([]), Z = i(!0), X = i(!0), C = i({
207
209
  info: !0,
208
210
  tickets: !0,
209
211
  comments: !0
210
- }), oe = i(!0), Le = i(s.guestDetails), O = i([]), y = i({
212
+ }), ee = i(!0), Se = i(s.guestDetails), O = i([]), y = i({
211
213
  actionItems: !1,
212
214
  activity: !1,
213
215
  conversationToggle: !1,
@@ -216,7 +218,7 @@ const qt = 996, ea = Tt({
216
218
  roomNotices: !1,
217
219
  sendingMessage: !1,
218
220
  tickets: !1
219
- }), N = i([]), de = i([]), me = i("bottom"), R = i(null), H = i(!1), W = i(!1), j = i(""), ve = i(!1), S = i(!1), k = i(null), $ = i(null), Pe = 3e4, d = i({
221
+ }), b = i([]), le = i([]), R = i(null), L = i(!1), G = i(!1), U = i(""), ie = i(!1), S = i(!1), k = i(null), j = i(null), Ne = 3e4, d = i({
220
222
  assignType: null,
221
223
  department: null,
222
224
  due: /* @__PURE__ */ new Date(),
@@ -226,7 +228,7 @@ const qt = 996, ea = Tt({
226
228
  requestedBy: null,
227
229
  when: null,
228
230
  where: null
229
- }), Q = i([
231
+ }), $ = i([
230
232
  {
231
233
  id: 0,
232
234
  label: u("HC_STAFF_MEMBER")
@@ -235,14 +237,14 @@ const qt = 996, ea = Tt({
235
237
  id: 1,
236
238
  label: u("HC_HOTEL_GUEST")
237
239
  }
238
- ]), pe = i(!1), E = i(null), _ = i({
239
- endDate: X(),
240
+ ]), ue = i(!1), E = i(null), w = i({
241
+ endDate: K(),
240
242
  issue: null,
241
243
  notes: "",
242
- startDate: X(),
243
- startTime: De(),
244
- endTime: Oe
245
- }), V = i([]), se = i(!1), fe = i([]), qe = i(!0), A = i([]), L = i([]), Fe = i([
244
+ startDate: K(),
245
+ startTime: he(),
246
+ endTime: ye
247
+ }), W = i([]), te = i(!1), ce = i([]), be = i(!0), A = i([]), P = i([]), Me = i([
246
248
  {
247
249
  label: u("HC_COMPLAINT"),
248
250
  id: "complaint"
@@ -259,7 +261,7 @@ const qt = 996, ea = Tt({
259
261
  label: u("HC_WORK_ORDER"),
260
262
  id: "work_order"
261
263
  }
262
- ]), Y = i(), P = i(null), v = i({
264
+ ]), H = i(null), v = i({
263
265
  assignType: null,
264
266
  department: null,
265
267
  due: /* @__PURE__ */ new Date(),
@@ -268,7 +270,7 @@ const qt = 996, ea = Tt({
268
270
  notes: "",
269
271
  person: null,
270
272
  requestedBy: null
271
- }), he = i([]), q = i([]), F = i([]), xe = w(() => {
273
+ }), de = i([]), q = i([]), F = i([]), Ce = g(() => {
272
274
  switch (r.value.cleaning?.name) {
273
275
  case "CLEAN":
274
276
  case "INSPECTED":
@@ -281,95 +283,95 @@ const qt = 996, ea = Tt({
281
283
  default:
282
284
  return "";
283
285
  }
284
- }), Be = w(() => {
286
+ }), Re = g(() => {
285
287
  const e = r.value?.hkTaskTypeId || s.room?.hkTaskTypeId;
286
- return Number(e) === qt;
287
- }), Ge = w(() => s.cleanInitiativeInfo?.cleanInitiativeName ?? r.value?.cleanInitiativeInfo?.cleanInitiativeName ?? "Greener Stay"), Ue = w(() => s.cleanInitiativeInfo?.imgUrl ?? r.value?.cleanInitiativeInfo?.imgUrl ?? ""), We = w(() => {
288
- const e = b.value.toLowerCase();
289
- return s.quickReplies.filter((t) => t.toLowerCase().match(e));
290
- }), je = w(() => {
291
- if (!N.value.length) return [];
288
+ return Number(e) === Ct;
289
+ }), Le = g(() => s.cleanInitiativeInfo?.cleanInitiativeName ?? r.value?.cleanInitiativeInfo?.cleanInitiativeName ?? "Greener Stay"), Pe = g(() => s.cleanInitiativeInfo?.imgUrl ?? r.value?.cleanInitiativeInfo?.imgUrl ?? ""), He = g(() => s.position === "top" || s.position === "bottom" ? s.align === "right" ? `${s.position}-end` : s.align === "center" ? s.position : `${s.position}-start` : s.position === "left" || s.position === "right" ? s.align === "bottom" ? `${s.position}-end` : s.align === "middle" || s.align === "center" ? s.position : `${s.position}-start` : "bottom-start"), qe = g(() => {
290
+ const e = N.value.toLowerCase();
291
+ return s.quickReplies.filter((a) => a.toLowerCase().match(e));
292
+ }), Fe = g(() => {
293
+ if (!b.value.length) return [];
292
294
  const e = [];
293
- let t = null;
294
- return N.value.forEach((a) => {
295
- const o = g.fromFormat(
296
- a.dateUtc,
295
+ let a = null;
296
+ return b.value.forEach((t) => {
297
+ const o = _.fromFormat(
298
+ t.dateUtc,
297
299
  "yyyy-MM-dd HH:mm:ss",
298
300
  { zone: "utc" }
299
301
  ).setZone(s.propertyTimeZone), n = o.toFormat("yyyy-MM-dd-HH");
300
- n !== t && (e.push({
302
+ n !== a && (e.push({
301
303
  type: "separator",
302
304
  label: o.toFormat("ccc, LLL d 'at' h:mma").replace("AM", "am").replace("PM", "pm"),
303
305
  hourKey: n
304
- }), t = n), e.push({
306
+ }), a = n), e.push({
305
307
  type: "message",
306
- ...a,
308
+ ...t,
307
309
  formattedTime: o.toFormat("h:mma").replace("AM", "am").replace("PM", "pm")
308
310
  });
309
311
  }), e;
310
- }), Ee = w(() => A.value.length ? !!A.value.find(
311
- (t) => t.type === "complaint"
312
- ) : !1), $e = w(() => A.value.length ? !!A.value.find(
313
- (t) => t.type === "callback"
314
- ) : !1), Qe = w(() => {
312
+ }), _e = g(() => A.value.length ? !!A.value.find(
313
+ (a) => a.type === "complaint"
314
+ ) : !1), xe = g(() => A.value.length ? !!A.value.find(
315
+ (a) => a.type === "callback"
316
+ ) : !1), Be = g(() => {
315
317
  let e = [];
316
- return O.value[0] && O.value[0].options === void 0 ? O.value.forEach((t) => {
318
+ return O.value[0] && O.value[0].options === void 0 ? O.value.forEach((a) => {
317
319
  e.push({
318
- id: parseInt(t.id),
319
- label: t.display_name
320
+ id: parseInt(a.id),
321
+ label: a.display_name
320
322
  });
321
323
  }) : e = O.value, e;
322
- }), Ae = w(() => r.value.occupancy?.name === "OCCUPIED"), Ve = w(() => Ae.value && Ee.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Ye = w(() => {
324
+ }), we = g(() => r.value.occupancy?.name === "OCCUPIED"), Ge = g(() => we.value && _e.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Ue = g(() => {
323
325
  switch (E.value?.id) {
324
326
  case "request":
325
327
  case "work_order":
326
- return ee.value[0];
328
+ return z.value[0];
327
329
  default:
328
330
  return null;
329
331
  }
330
- }), Je = w(() => {
331
- if (C.value)
332
+ }), je = g(() => {
333
+ if (M.value)
332
334
  switch (E.value?.id) {
333
335
  case "request":
334
- return C.value.find((e) => parseInt(e.id) === 4);
336
+ return M.value.find((e) => parseInt(e.id) === 4);
335
337
  case "work_order":
336
- return C.value.find((e) => parseInt(e.id) === 2);
338
+ return M.value.find((e) => parseInt(e.id) === 2);
337
339
  default:
338
340
  return null;
339
341
  }
340
342
  return null;
341
- }), ze = w(() => {
343
+ }), $e = g(() => {
342
344
  switch (E.value?.id) {
343
345
  case "request":
344
- return Q.value[1];
346
+ return $.value[1];
345
347
  case "work_order":
346
- return Q.value[0];
348
+ return $.value[0];
347
349
  default:
348
350
  return null;
349
351
  }
350
- }), Ke = w(() => {
352
+ }), We = g(() => {
351
353
  let e = "";
352
354
  if (r.value && r.value.reservations[0]) {
353
- const t = g.fromISO(
355
+ const a = _.fromISO(
354
356
  r.value.reservations[0].arrivalDate
355
- ), a = t.toFormat("MMM"), o = t.day, n = t.year, l = g.fromISO(
357
+ ), t = a.toFormat("MMM"), o = a.day, n = a.year, l = _.fromISO(
356
358
  r.value.reservations[0].departureDate
357
359
  ), c = l.toFormat("MMM"), m = l.day, h = l.year;
358
- e += a + " " + o, n !== h && (e += ", " + n), a === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + h;
360
+ e += t + " " + o, n !== h && (e += ", " + n), t === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + h;
359
361
  }
360
362
  return e;
361
- }), Ze = w(() => {
362
- let e = V.value;
363
+ }), Qe = g(() => {
364
+ let e = W.value;
363
365
  return e = [...new Set(e)], e;
364
- }), Xe = w(() => {
366
+ }), Ve = g(() => {
365
367
  const e = E.value?.id;
366
368
  if (!e)
367
369
  return !1;
368
370
  switch (e) {
369
371
  case "room_notice":
370
- return _.value.issue && _.value.startDate && _.value.endDate;
372
+ return w.value.issue && w.value.startDate && w.value.endDate;
371
373
  case "complaint":
372
- return p.value.problem && p.value.guestName && p.value.guestMood;
374
+ return f.value.problem && f.value.guestName && f.value.guestMood;
373
375
  case "work_order":
374
376
  return v.value.item && v.value.issue && v.value.requestedBy && v.value.due && (v.value.assignType && v.value.assignType.id === 0 || v.value.assignType && v.value.assignType.id === 1 && v.value.department || v.value.assignType && v.value.assignType.id === 2 && v.value.person);
375
377
  case "request":
@@ -377,20 +379,20 @@ const qt = 996, ea = Tt({
377
379
  default:
378
380
  return !1;
379
381
  }
380
- }), Se = () => {
381
- se.value = !1, H.value = !1, ue.value = !1, pe.value = !1, O.value = [], de.value = [], he.value = [], q.value = [], F.value = [], E.value = null, _.value.issue = null, _.value.startDate = X(), _.value.endDate = X(), _.value.startTime = De(), _.value.endTime = Oe, _.value.notes = "", p.value.guestName = "", p.value.guestEmail = "", p.value.guestPhone = "", p.value.guestMood = null, p.value.guestLoyalty = "", p.value.problem = null, p.value.checkInDate = /* @__PURE__ */ new Date(), p.value.checkOutDate = /* @__PURE__ */ new Date(), p.value.notes = "", v.value.assignType = null, v.value.department = null, v.value.person = null, v.value.due = /* @__PURE__ */ new Date(), v.value.item = null, v.value.issue = null, v.value.notes = "", d.value.assignType = null, d.value.department = null, d.value.person = null, d.value.due = /* @__PURE__ */ new Date(), d.value.item = null, d.value.notes = "", d.value.when = null, d.value.where = null;
382
- }, et = async () => {
383
- f("create:callback", r.value), f("toggle", !1);
382
+ }), Ie = () => {
383
+ te.value = !1, L.value = !1, re.value = !1, ue.value = !1, O.value = [], le.value = [], de.value = [], q.value = [], F.value = [], E.value = null, w.value.issue = null, w.value.startDate = K(), w.value.endDate = K(), w.value.startTime = he(), w.value.endTime = ye, w.value.notes = "", f.value.guestName = "", f.value.guestEmail = "", f.value.guestPhone = "", f.value.guestMood = null, f.value.guestLoyalty = "", f.value.problem = null, f.value.checkInDate = /* @__PURE__ */ new Date(), f.value.checkOutDate = /* @__PURE__ */ new Date(), f.value.notes = "", v.value.assignType = null, v.value.department = null, v.value.person = null, v.value.due = /* @__PURE__ */ new Date(), v.value.item = null, v.value.issue = null, v.value.notes = "", d.value.assignType = null, d.value.department = null, d.value.person = null, d.value.due = /* @__PURE__ */ new Date(), d.value.item = null, d.value.notes = "", d.value.when = null, d.value.where = null;
384
+ }, Ye = async () => {
385
+ p("create:callback", r.value), p("toggle", !1);
384
386
  }, x = (e) => {
385
- const t = [];
387
+ const a = [];
386
388
  (Array.isArray(e) ? e : Object.values(e)).forEach((o) => {
387
- const n = o.senderType || o.sender_type, l = o.senderName || "", c = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, h = l ? l.split(" ") : ["", ""], I = o.user_first_name || o.guest_first_name || h[0] || "", K = o.user_last_name || o.guest_last_name || h.slice(1).join(" ") || "", le = I && K ? `${I} ${K}` : I || "Auto-Reply", ie = n === "system" || n === "user", T = n === "guest";
389
+ const n = o.senderType || o.sender_type, l = o.senderName || "", c = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, h = l ? l.split(" ") : ["", ""], I = o.user_first_name || o.guest_first_name || h[0] || "", Y = o.user_last_name || o.guest_last_name || h.slice(1).join(" ") || "", se = I && Y ? `${I} ${Y}` : I || "Auto-Reply", ne = n === "system" || n === "user", T = n === "guest";
388
390
  let D = {
389
391
  id: o.id,
390
392
  isPropertyEmployee: n === "user",
391
393
  isSent: !!o.sent,
392
394
  isSystemMessage: n === "system",
393
- isStaffMessage: ie,
395
+ isStaffMessage: ne,
394
396
  isGuestMessage: T,
395
397
  comment: o.content,
396
398
  dateUtc: o.sent || o.created,
@@ -399,66 +401,66 @@ const qt = 996, ea = Tt({
399
401
  icon: "",
400
402
  id: c || "system-message",
401
403
  initials: "",
402
- lastName: K || "",
403
- name: le,
404
+ lastName: Y || "",
405
+ name: se,
404
406
  src: m || ""
405
407
  }
406
408
  };
407
- D.user.firstName && D.user.lastName ? D.user.initials = D.user.firstName[0] + D.user.lastName[0] : D.user.firstName && (D.user.initials = D.user.firstName[0]), ie && (D.user.icon = "property-fill"), t.push(D);
408
- }), N.value = t;
409
- }, tt = (e) => {
409
+ D.user.firstName && D.user.lastName ? D.user.initials = D.user.firstName[0] + D.user.lastName[0] : D.user.firstName && (D.user.initials = D.user.firstName[0]), ne && (D.user.icon = "property-fill"), a.push(D);
410
+ }), b.value = a;
411
+ }, Je = (e) => {
410
412
  if (!e || e.length === 0) return;
411
- (Array.isArray(e) ? e : Object.values(e)).forEach((a) => {
412
- if (N.value.some((D) => D.id === a.id))
413
+ (Array.isArray(e) ? e : Object.values(e)).forEach((t) => {
414
+ if (b.value.some((D) => D.id === t.id))
413
415
  return;
414
- const o = a.senderType || a.sender_type, n = a.senderName || "", l = a.senderId || a.sender_id, c = a.profileImg || a.profile_img, m = n ? n.split(" ") : ["", ""], h = a.user_first_name || a.guest_first_name || m[0] || "", I = a.user_last_name || a.guest_last_name || m.slice(1).join(" ") || "", K = h && I ? `${h} ${I}` : h || "Auto-Reply", le = o === "system" || o === "user", ie = o === "guest";
416
+ const o = t.senderType || t.sender_type, n = t.senderName || "", l = t.senderId || t.sender_id, c = t.profileImg || t.profile_img, m = n ? n.split(" ") : ["", ""], h = t.user_first_name || t.guest_first_name || m[0] || "", I = t.user_last_name || t.guest_last_name || m.slice(1).join(" ") || "", Y = h && I ? `${h} ${I}` : h || "Auto-Reply", se = o === "system" || o === "user", ne = o === "guest";
415
417
  let T = {
416
- id: a.id,
418
+ id: t.id,
417
419
  isPropertyEmployee: o === "user",
418
- isSent: !!a.sent,
420
+ isSent: !!t.sent,
419
421
  isSystemMessage: o === "system",
420
- isStaffMessage: le,
421
- isGuestMessage: ie,
422
- comment: a.content,
423
- dateUtc: a.sent || a.created,
422
+ isStaffMessage: se,
423
+ isGuestMessage: ne,
424
+ comment: t.content,
425
+ dateUtc: t.sent || t.created,
424
426
  user: {
425
427
  firstName: h || "Auto-Reply",
426
428
  icon: "",
427
429
  id: l || "system-message",
428
430
  initials: "",
429
431
  lastName: I || "",
430
- name: K,
432
+ name: Y,
431
433
  src: c || ""
432
434
  }
433
435
  };
434
- T.user.firstName && T.user.lastName ? T.user.initials = T.user.firstName[0] + T.user.lastName[0] : T.user.firstName && (T.user.initials = T.user.firstName[0]), le && (T.user.icon = "property-fill"), N.value.push(T);
436
+ T.user.firstName && T.user.lastName ? T.user.initials = T.user.firstName[0] + T.user.lastName[0] : T.user.firstName && (T.user.initials = T.user.firstName[0]), se && (T.user.icon = "property-fill"), b.value.push(T);
435
437
  });
436
- }, ye = async (e = !1) => {
438
+ }, me = async (e = !1) => {
437
439
  if (s.showComments && r.value.tokenId) {
438
440
  e || (y.value.messages = !0);
439
441
  try {
440
- let t = `/api/client/connect/getMessages.php?tokenId=${r.value.tokenId}`;
441
- e && k.value !== null && (t += `&lastMsgId=${k.value}`);
442
- const o = await (await fetch(t, {
442
+ let a = `/api/client/connect/getMessages.php?tokenId=${r.value.tokenId}`;
443
+ e && k.value !== null && (a += `&lastMsgId=${k.value}`);
444
+ const o = await (await fetch(a, {
443
445
  method: "GET",
444
446
  credentials: "include"
445
447
  })).json();
446
448
  if (o.status === "error")
447
449
  throw new Error(o.message || "Failed to get messages");
448
450
  if (S.value = !o.closed, o.messages && o.messages.length > 0) {
449
- k.value = o.messages[o.messages.length - 1].id, e ? tt(o.messages) : x(o.messages);
450
- const n = setTimeout(z, 100);
451
- L.value.push(n);
451
+ k.value = o.messages[o.messages.length - 1].id, e ? Je(o.messages) : x(o.messages);
452
+ const n = setTimeout(V, 100);
453
+ P.value.push(n);
452
454
  } else e || x(o.messages || []);
453
- } catch (t) {
454
- console.error("getChatMessages error:", t);
455
+ } catch (a) {
456
+ console.error("getChatMessages error:", a);
455
457
  } finally {
456
458
  e || (y.value.messages = !1);
457
459
  }
458
460
  }
459
- }, at = (e) => {
460
- const t = g.utc(), a = g.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = t.diff(
461
- a,
461
+ }, Ke = (e) => {
462
+ const a = _.utc(), t = _.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = a.diff(
463
+ t,
462
464
  [
463
465
  "years",
464
466
  "months",
@@ -479,15 +481,15 @@ const qt = 996, ea = Tt({
479
481
  return h === 1 ? u("HC_ONE_MINUTE_AGO") : u("HC_X_MINUTES_AGO", { minutes: h });
480
482
  if (h === 0)
481
483
  return u("HC_A_MOMENT_AGO");
482
- }, ot = async () => {
483
- s.showGuestDetails && ne(), ge(), J(), re(), f("refresh:pms", r.value);
484
- }, ne = async () => {
484
+ }, ze = async () => {
485
+ s.showGuestDetails && ae(), ve(), Q(), oe(), p("refresh:pms", r.value);
486
+ }, ae = async () => {
485
487
  try {
486
488
  y.value.pms = !0;
487
- const e = new AbortController(), t = setTimeout(() => e.abort(), 45e3);
488
- L.value.push(t);
489
- const a = s.pmsBaseUrl;
490
- if (!a)
489
+ const e = new AbortController(), a = setTimeout(() => e.abort(), 45e3);
490
+ P.value.push(a);
491
+ const t = s.pmsBaseUrl;
492
+ if (!t)
491
493
  throw new Error("PMS base URL is required");
492
494
  const o = {
493
495
  Authorization: "Bearer " + (() => {
@@ -496,7 +498,7 @@ const qt = 996, ea = Tt({
496
498
  })(),
497
499
  "Content-Type": "application/json"
498
500
  }, n = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room.id, l = await fetch(
499
- `${a}/vendors/properties/statuses/${s.propertyId}/rooms`,
501
+ `${t}/vendors/properties/statuses/${s.propertyId}/rooms`,
500
502
  {
501
503
  method: "POST",
502
504
  headers: o,
@@ -504,21 +506,21 @@ const qt = 996, ea = Tt({
504
506
  body: JSON.stringify({ roomsIds: [n] })
505
507
  }
506
508
  );
507
- clearTimeout(t), l.ok || Ne(l);
509
+ clearTimeout(a), l.ok || De(l);
508
510
  const c = await l.json(), m = c.data?.pmsRooms || c.data?.rooms || c.rooms || [];
509
511
  R.value = m, m.length > 0 ? r.value = {
510
512
  ...m[0],
511
513
  tokenId: m[0].tokenId || s.room.tokenId
512
514
  } : r.value = s.room, y.value.pms = !1;
513
515
  } catch (e) {
514
- return y.value.pms = !1, f("show:toast", {
516
+ return y.value.pms = !1, p("show:toast", {
515
517
  show: !0,
516
518
  message: u("HC_FAILED_TO_LOAD_PMS_DATA"),
517
519
  variant: "error",
518
520
  icon: "exclamation-circle"
519
521
  }), e;
520
522
  }
521
- }, ge = async () => {
523
+ }, ve = async () => {
522
524
  try {
523
525
  y.value.roomNotices = !0;
524
526
  const e = await fetch(
@@ -526,10 +528,10 @@ const qt = 996, ea = Tt({
526
528
  );
527
529
  if (!e.ok)
528
530
  throw new Error(`HTTP error! status: ${e.status}`);
529
- const t = await e.json();
530
- V.value = t.notices;
531
+ const a = await e.json();
532
+ W.value = a.notices;
531
533
  } catch (e) {
532
- console.error("Error getting room notices:", e), V.value = [], f("show:toast", {
534
+ console.error("Error getting room notices:", e), W.value = [], p("show:toast", {
533
535
  show: !0,
534
536
  message: u("HC_FAILED_TO_LOAD_ROOM_NOTICES"),
535
537
  variant: "error",
@@ -538,11 +540,11 @@ const qt = 996, ea = Tt({
538
540
  } finally {
539
541
  y.value.roomNotices = !1;
540
542
  }
541
- }, _e = async () => {
543
+ }, fe = async () => {
542
544
  try {
543
545
  const e = new FormData();
544
546
  e.append("property_id", s.propertyId), e.append("filter", "tasks_new");
545
- const [t, a] = await Promise.all([
547
+ const [a, t] = await Promise.all([
546
548
  fetch("/api/client/common/getDepartments.php", {
547
549
  method: "POST"
548
550
  }),
@@ -550,10 +552,10 @@ const qt = 996, ea = Tt({
550
552
  method: "POST",
551
553
  body: e
552
554
  })
553
- ]), o = await t.json(), n = await a.json();
555
+ ]), o = await a.json(), n = await t.json();
554
556
  if (o.departments && (o.departments.forEach((l) => {
555
557
  l.label = l.display_name;
556
- }), C.value = o.departments), n.users) {
558
+ }), M.value = o.departments), n.users) {
557
559
  const l = [];
558
560
  let c = {
559
561
  group: "",
@@ -561,41 +563,41 @@ const qt = 996, ea = Tt({
561
563
  };
562
564
  n.users.forEach((m) => {
563
565
  m.translated_department !== c.group && (c.group && l.push({ ...c }), c.group = m.translated_department, c.options = []), c.options.push(m);
564
- }), c.group && l.push({ ...c }), ke.value = l;
566
+ }), c.group && l.push({ ...c }), ge.value = l;
565
567
  }
566
568
  } catch (e) {
567
- console.error("Error getting shared data:", e), f("show:toast", {
569
+ console.error("Error getting shared data:", e), p("show:toast", {
568
570
  show: !0,
569
571
  message: u("HC_FAILED_TO_LOAD_SHARED_DATA"),
570
572
  variant: "error",
571
573
  icon: "exclamation-circle"
572
574
  });
573
575
  }
574
- }, be = async () => {
576
+ }, Te = async () => {
575
577
  try {
576
- const t = await (await fetch(
578
+ const a = await (await fetch(
577
579
  `/api/client/connect/getStayDetails.php?tokenId=${r.value.tokenId}`,
578
580
  {
579
581
  method: "GET",
580
582
  credentials: "include"
581
583
  }
582
584
  )).json();
583
- if (t.status === "error")
584
- throw new Error(t.message || "Failed to get stay details");
585
- t.userName && (p.value.guestName = t.userName), t.cellPhone && (p.value.guestPhone = t.cellPhone), t.email && (p.value.guestEmail = t.email), t.checkIn && (p.value.checkInDate = g.fromISO(
586
- t.checkIn
587
- ).toJSDate()), t.checkOut && (p.value.checkOutDate = g.fromISO(
588
- t.checkOut
585
+ if (a.status === "error")
586
+ throw new Error(a.message || "Failed to get stay details");
587
+ a.userName && (f.value.guestName = a.userName), a.cellPhone && (f.value.guestPhone = a.cellPhone), a.email && (f.value.guestEmail = a.email), a.checkIn && (f.value.checkInDate = _.fromISO(
588
+ a.checkIn
589
+ ).toJSDate()), a.checkOut && (f.value.checkOutDate = _.fromISO(
590
+ a.checkOut
589
591
  ).toJSDate());
590
592
  } catch (e) {
591
- console.error("getStayDetails error:", e), f("show:toast", {
593
+ console.error("getStayDetails error:", e), p("show:toast", {
592
594
  show: !0,
593
595
  message: u("HC_FAILED_TO_LOAD_STAY_DETAILS"),
594
596
  variant: "error",
595
597
  icon: "exclamation-circle"
596
598
  });
597
599
  }
598
- }, st = (e) => {
600
+ }, Ze = (e) => {
599
601
  switch (e) {
600
602
  case "complaint":
601
603
  return "red-30";
@@ -608,7 +610,7 @@ const qt = 996, ea = Tt({
608
610
  case "task":
609
611
  return "green-20";
610
612
  }
611
- }, nt = (e) => {
613
+ }, Xe = (e) => {
612
614
  switch (e) {
613
615
  case "complaint":
614
616
  return "face-frown";
@@ -621,7 +623,7 @@ const qt = 996, ea = Tt({
621
623
  case "task":
622
624
  return "check";
623
625
  }
624
- }, J = async () => {
626
+ }, Q = async () => {
625
627
  try {
626
628
  y.value.tickets = !0;
627
629
  const e = await fetch(
@@ -629,10 +631,10 @@ const qt = 996, ea = Tt({
629
631
  );
630
632
  if (!e.ok)
631
633
  throw new Error(`HTTP error! status: ${e.status}`);
632
- const t = await e.json();
633
- A.value = t.tickets;
634
+ const a = await e.json();
635
+ A.value = a.tickets;
634
636
  } catch (e) {
635
- console.error("Error getting tickets:", e), A.value = [], f("show:toast", {
637
+ console.error("Error getting tickets:", e), A.value = [], p("show:toast", {
636
638
  show: !0,
637
639
  message: u("HC_FAILED_TO_LOAD_TICKETS"),
638
640
  variant: "error",
@@ -641,19 +643,19 @@ const qt = 996, ea = Tt({
641
643
  } finally {
642
644
  y.value.tickets = !1;
643
645
  }
644
- }, re = async () => {
646
+ }, oe = async () => {
645
647
  if (s.showActivity)
646
648
  try {
647
649
  y.value.activity = !0;
648
- const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = await fetch(
650
+ const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = await fetch(
649
651
  "/api/client/common/getCleaningsInspections.php?propertyId=" + s.propertyId + "&areaId=" + e
650
652
  );
651
- if (!t.ok)
652
- throw new Error(`HTTP error! status: ${t.status}`);
653
- const a = await t.json();
654
- fe.value = a.inspections || [];
653
+ if (!a.ok)
654
+ throw new Error(`HTTP error! status: ${a.status}`);
655
+ const t = await a.json();
656
+ ce.value = t.inspections || [];
655
657
  } catch (e) {
656
- console.error("Error getting activity:", e), fe.value = [], f("show:toast", {
658
+ console.error("Error getting activity:", e), ce.value = [], p("show:toast", {
657
659
  show: !0,
658
660
  message: u("HC_FAILED_TO_LOAD_ACTIVITY"),
659
661
  variant: "error",
@@ -662,19 +664,19 @@ const qt = 996, ea = Tt({
662
664
  } finally {
663
665
  y.value.activity = !1;
664
666
  }
665
- }, Ne = async (e) => {
666
- const t = await e.text();
667
- let a;
667
+ }, De = async (e) => {
668
+ const a = await e.text();
669
+ let t;
668
670
  try {
669
- a = JSON.parse(t).response;
671
+ t = JSON.parse(a).response;
670
672
  } catch {
671
- a = { code: e.status, message: t };
673
+ t = { code: e.status, message: a };
672
674
  }
673
- return a.code === 401 ? (window.location.href = "/logout.php?unauthorized=1", { error: a }) : a;
674
- }, rt = (e) => {
675
- const t = document.querySelectorAll(".pulse");
676
- if (t && t.length) {
677
- const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = document.getElementById("room-" + a), n = o?.classList;
675
+ return t.code === 401 ? (window.location.href = "/logout.php?unauthorized=1", { error: t }) : t;
676
+ }, et = (e) => {
677
+ const a = document.querySelectorAll(".pulse");
678
+ if (a && a.length) {
679
+ const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = document.getElementById("room-" + t), n = o?.classList;
678
680
  switch (e) {
679
681
  case "room_notice":
680
682
  (n?.contains("roombox_unsel") || n?.contains("roombox_unsel_active")) && (o?.classList.remove(), o?.classList.add("roomnoticeroombox_sel"));
@@ -690,93 +692,93 @@ const qt = 996, ea = Tt({
690
692
  break;
691
693
  }
692
694
  const l = setTimeout(() => {
693
- t.forEach((c) => {
695
+ a.forEach((c) => {
694
696
  c.classList.remove("pulse");
695
697
  });
696
698
  }, 4500);
697
- L.value.push(l);
699
+ P.value.push(l);
698
700
  }
699
- }, lt = () => {
701
+ }, tt = () => {
700
702
  window.open("/guest/overview.php", "_blank");
701
- }, it = (e) => {
702
- let t = "";
703
+ }, at = (e) => {
704
+ let a = "";
703
705
  switch (e.type) {
704
706
  case "complaint":
705
- t = `/complaints/complaints_view.php?id=${e.id}`;
707
+ a = `/complaints/complaints_view.php?id=${e.id}`;
706
708
  break;
707
709
  case "request":
708
- t = `/tasks/hk_request.php?id=${e.id}`;
710
+ a = `/tasks/hk_request.php?id=${e.id}`;
709
711
  break;
710
712
  case "satisfaction-call":
711
- t = `/tasks/task_callback.php?id=${e.id}`;
713
+ a = `/tasks/task_callback.php?id=${e.id}`;
712
714
  break;
713
715
  case "work-order":
714
- t = `/tasks/workorder.php?id=${e.id}`;
716
+ a = `/tasks/workorder.php?id=${e.id}`;
715
717
  break;
716
718
  case "task":
717
- t = `/tasks/task.php?id=${e.id}`;
719
+ a = `/tasks/task.php?id=${e.id}`;
718
720
  break;
719
721
  default:
720
722
  return "#";
721
723
  }
722
- window.open(t, "_blank");
723
- }, ut = (e) => {
724
+ window.open(a, "_blank");
725
+ }, ot = (e) => {
724
726
  e.link && window.open(e.link, "_blank");
725
- }, ct = async () => {
726
- pe.value = !0;
727
- const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = r.value?.qv2Rooms?.qRoomName || r.value?.name || s.room?.name, a = {
727
+ }, st = async () => {
728
+ ue.value = !0;
729
+ const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = r.value?.qv2Rooms?.qRoomName || r.value?.name || s.room?.name, t = {
728
730
  type: E.value?.id,
729
731
  propertyId: s.propertyId,
730
- userId: P.value,
732
+ userId: H.value,
731
733
  areaId: e,
732
- areaName: t
734
+ areaName: a
733
735
  };
734
736
  switch (E.value?.id) {
735
737
  case "complaint":
736
- a.tokenId = r.value.tokenId, a.problemId = p.value.problem.id, a.guestName = p.value.guestName, a.guestPhone = p.value.guestPhone, a.guestEmail = p.value.guestEmail, a.guestLoyalty = p.value.guestLoyalty, a.guestMood = p.value.guestMood.id, a.checkInDate = g.fromJSDate(p.value.checkInDate).toFormat(
738
+ t.tokenId = r.value.tokenId, t.problemId = f.value.problem.id, t.guestName = f.value.guestName, t.guestPhone = f.value.guestPhone, t.guestEmail = f.value.guestEmail, t.guestLoyalty = f.value.guestLoyalty, t.guestMood = f.value.guestMood.id, t.checkInDate = _.fromJSDate(f.value.checkInDate).toFormat(
737
739
  "yyyy-MM-dd"
738
- ), a.checkOutDate = g.fromJSDate(p.value.checkOutDate).toFormat(
740
+ ), t.checkOutDate = _.fromJSDate(f.value.checkOutDate).toFormat(
739
741
  "yyyy-MM-dd"
740
- ), a.notes = p.value.notes, a.inHouse = 2, a.source = "dashboard", f("create:todo", a);
742
+ ), t.notes = f.value.notes, t.inHouse = 2, t.source = "dashboard", p("create:todo", t);
741
743
  break;
742
744
  case "request":
743
- a.itemId = d.value.item.id, a.assignType = d.value.assignType.id, a.occupied = d.value.requestedBy.id, a.notes = d.value.notes, a.dueDate = g.fromJSDate(d.value.due).toFormat("yyyy-MM-dd"), d.value.assignType.id === 1 && (a.department = d.value.department.id), d.value.assignType.id === 2 && (a.person = d.value.person.id), s.allowWhenWhere && (a.requestWhen = d.value.when ? d.value.when.id : "", a.requestWhere = d.value.where ? d.value.where.id : ""), f("create:todo", a);
745
+ t.itemId = d.value.item.id, t.assignType = d.value.assignType.id, t.occupied = d.value.requestedBy.id, t.notes = d.value.notes, t.dueDate = _.fromJSDate(d.value.due).toFormat("yyyy-MM-dd"), d.value.assignType.id === 1 && (t.department = d.value.department.id), d.value.assignType.id === 2 && (t.person = d.value.person.id), s.allowWhenWhere && (t.requestWhen = d.value.when ? d.value.when.id : "", t.requestWhere = d.value.where ? d.value.where.id : ""), p("create:todo", t);
744
746
  break;
745
747
  case "room_notice":
746
- a.issueId = _.value.issue.id, a.startDate = g.fromJSDate(_.value.startDate).toFormat("yyyy-MM-dd"), a.endDate = g.fromJSDate(_.value.endDate).toFormat("yyyy-MM-dd"), a.startTime = _.value.startTime || "", a.endTime = _.value.endTime || "", a.notes = _.value.notes, f("create:todo", a);
748
+ t.issueId = w.value.issue.id, t.startDate = _.fromJSDate(w.value.startDate).toFormat("yyyy-MM-dd"), t.endDate = _.fromJSDate(w.value.endDate).toFormat("yyyy-MM-dd"), t.startTime = w.value.startTime || "", t.endTime = w.value.endTime || "", t.notes = w.value.notes, p("create:todo", t);
747
749
  break;
748
750
  case "work_order":
749
- a.itemId = v.value.item.id, a.issueId = v.value.issue.id, a.assignType = v.value.assignType.id, a.occupied = v.value.requestedBy.id, a.notes = v.value.notes, a.dueDate = g.fromJSDate(v.value.due).toFormat("yyyy-MM-dd"), v.value.assignType.id === 1 && (a.department = v.value.department.id), v.value.assignType.id === 2 && (a.person = v.value.person.id), f("create:todo", a);
751
+ t.itemId = v.value.item.id, t.issueId = v.value.issue.id, t.assignType = v.value.assignType.id, t.occupied = v.value.requestedBy.id, t.notes = v.value.notes, t.dueDate = _.fromJSDate(v.value.due).toFormat("yyyy-MM-dd"), v.value.assignType.id === 1 && (t.department = v.value.department.id), v.value.assignType.id === 2 && (t.person = v.value.person.id), p("create:todo", t);
750
752
  break;
751
753
  }
752
- }, dt = (e) => {
753
- Ie(), Te(), s.hover && f("toggle", e);
754
- }, mt = (e) => {
755
- Me(), b.value = e;
756
- }, vt = async (e) => {
757
- if (E.value = e, O.value = [], _.value.issue = null, p.value.problem = null, v.value.item = null, v.value.issue = null, d.value.item = null, !E.value) {
754
+ }, nt = (e) => {
755
+ s.hover && p("toggle", e);
756
+ }, rt = (e) => {
757
+ ke(), N.value = e;
758
+ }, lt = async (e) => {
759
+ if (E.value = e, O.value = [], w.value.issue = null, f.value.problem = null, v.value.item = null, v.value.issue = null, d.value.item = null, !E.value) {
758
760
  y.value.actionItems = !1;
759
761
  return;
760
762
  }
761
763
  y.value.actionItems = !0;
762
- const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = new FormData();
763
- switch (a.append("property_id", s.propertyId), a.append("area_id", t), e.id) {
764
+ const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = new FormData();
765
+ switch (t.append("property_id", s.propertyId), t.append("area_id", a), e.id) {
764
766
  case "complaint":
765
767
  try {
766
- r.value.tokenId && await be();
768
+ r.value.tokenId && await Te();
767
769
  const n = await (await fetch("/api/client/common/getComplaintProblemsByPropertyId.php", {
768
770
  method: "POST",
769
- body: a
771
+ body: t
770
772
  })).json();
771
773
  n.items && (O.value = n.items);
772
- const l = await Z.post(
774
+ const l = await J.post(
773
775
  "/api/client/common/getComplaintMoods.php"
774
776
  );
775
777
  l.data.items.forEach((c) => {
776
778
  c.label = c.display_name;
777
- }), de.value = l.data.items;
779
+ }), le.value = l.data.items;
778
780
  } catch (o) {
779
- console.error("Error loading complaint options:", o), f("show:toast", {
781
+ console.error("Error loading complaint options:", o), p("show:toast", {
780
782
  show: !0,
781
783
  message: u("HC_FAILED_TO_LOAD_COMPLAINT_OPTIONS"),
782
784
  variant: "error",
@@ -790,11 +792,11 @@ const qt = 996, ea = Tt({
790
792
  try {
791
793
  const n = await (await fetch("/api/client/common/getRoomNoticeIssuesByPropertyId.php", {
792
794
  method: "POST",
793
- body: a
795
+ body: t
794
796
  })).json();
795
797
  n.items && (O.value = n.items);
796
798
  } catch (o) {
797
- console.error("Error loading room notice options:", o), f("show:toast", {
799
+ console.error("Error loading room notice options:", o), p("show:toast", {
798
800
  show: !0,
799
801
  message: u("HC_FAILED_TO_LOAD_ROOM_NOTICE_OPTIONS"),
800
802
  variant: "error",
@@ -806,12 +808,12 @@ const qt = 996, ea = Tt({
806
808
  break;
807
809
  case "request":
808
810
  try {
809
- d.value.requestedBy = Q.value[1], d.value.assignType = ee.value[0];
811
+ d.value.requestedBy = $.value[1], d.value.assignType = z.value[0];
810
812
  const n = await (await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php", {
811
813
  method: "POST",
812
- body: a
814
+ body: t
813
815
  })).json();
814
- if (n.items && (O.value = n.items), await _e(), d.value.department = C.value.find(
816
+ if (n.items && (O.value = n.items), await fe(), d.value.department = M.value.find(
815
817
  (l) => parseInt(l.id) === 4
816
818
  ), s.allowWhenWhere)
817
819
  try {
@@ -834,7 +836,7 @@ const qt = 996, ea = Tt({
834
836
  value: h.id
835
837
  })) : F.value = [];
836
838
  } catch (l) {
837
- console.error("Error loading When/Where options:", l), q.value = [], F.value = [], f("show:toast", {
839
+ console.error("Error loading When/Where options:", l), q.value = [], F.value = [], p("show:toast", {
838
840
  show: !0,
839
841
  message: u("HC_FAILED_TO_LOAD_WHEN_WHERE_OPTIONS"),
840
842
  variant: "error",
@@ -842,7 +844,7 @@ const qt = 996, ea = Tt({
842
844
  });
843
845
  }
844
846
  } catch (o) {
845
- console.error("Error loading request options:", o), f("show:toast", {
847
+ console.error("Error loading request options:", o), p("show:toast", {
846
848
  show: !0,
847
849
  message: u("HC_FAILED_TO_LOAD_REQUEST_OPTIONS"),
848
850
  variant: "error",
@@ -854,10 +856,10 @@ const qt = 996, ea = Tt({
854
856
  break;
855
857
  case "work_order":
856
858
  try {
857
- v.value.requestedBy = Q.value[0], v.value.assignType = ee.value[0];
859
+ v.value.requestedBy = $.value[0], v.value.assignType = z.value[0];
858
860
  const n = await (await fetch("/api/client/common/getItemsByRoomId.php", {
859
861
  method: "POST",
860
- body: a
862
+ body: t
861
863
  })).json(), l = [];
862
864
  let c = {
863
865
  group: "",
@@ -866,20 +868,20 @@ const qt = 996, ea = Tt({
866
868
  n.items && (n.items.forEach((m) => {
867
869
  m.section_name !== c.group && (c.group && l.push({ ...c }), c.group = m.section_name, c.options = []), m.label && c.options.push(m);
868
870
  }), c.group && l.push({ ...c })), O.value = l, await Promise.all([
869
- Z.post(
871
+ J.post(
870
872
  "/api/client/common/getWorkOrderIssues.php"
871
873
  ),
872
- _e()
874
+ fe()
873
875
  ]).then((m) => {
874
876
  const h = m[0];
875
877
  h.data.issues.forEach((I) => {
876
878
  I.label = I.display_name;
877
- }), he.value = h.data.issues;
878
- }), v.value.department = C.value.find(
879
+ }), de.value = h.data.issues;
880
+ }), v.value.department = M.value.find(
879
881
  (m) => parseInt(m.id) === 2
880
882
  );
881
883
  } catch (o) {
882
- console.error("Error loading work order options:", o), f("show:toast", {
884
+ console.error("Error loading work order options:", o), p("show:toast", {
883
885
  show: !0,
884
886
  message: u("HC_FAILED_TO_LOAD_WORK_ORDER_OPTIONS"),
885
887
  variant: "error",
@@ -893,29 +895,29 @@ const qt = 996, ea = Tt({
893
895
  y.value.actionItems = !1;
894
896
  return;
895
897
  }
896
- }, pt = () => {
897
- se.value = !se.value, ue.value = !1;
898
- }, Ce = () => {
899
- const e = document.getElementById("comment-field"), t = document.getElementById("hidden-text");
900
- e.style.height = t?.offsetHeight + "px";
901
- }, z = () => {
898
+ }, it = () => {
899
+ te.value = !te.value, re.value = !1;
900
+ }, Oe = () => {
901
+ const e = document.getElementById("comment-field"), a = document.getElementById("hidden-text");
902
+ e.style.height = a?.offsetHeight + "px";
903
+ }, V = () => {
902
904
  const e = document.getElementById("comments-container");
903
905
  e?.scroll({
904
906
  top: e.scrollHeight,
905
907
  behavior: "smooth"
906
908
  });
907
- }, ft = async (e) => {
908
- if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && b.value && !H.value) {
909
+ }, ut = async (e) => {
910
+ if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && N.value && !L.value) {
909
911
  y.value.sendingMessage = !0;
910
912
  try {
911
- const t = new FormData();
912
- t.append("tokenId", r.value.tokenId), t.append("content", b.value), t.append("senderId", P.value || "");
913
- const a = await Z.post(
913
+ const a = new FormData();
914
+ a.append("tokenId", r.value.tokenId), a.append("content", N.value), a.append("senderId", H.value || "");
915
+ const t = await J.post(
914
916
  "/api/client/connect/sendMessage.php",
915
- t
917
+ a
916
918
  );
917
- if (a.data.status === "error") {
918
- f("show:toast", {
919
+ if (t.data.status === "error") {
920
+ p("show:toast", {
919
921
  show: !0,
920
922
  message: u("HC_FAILED_TO_SEND_MESSAGE"),
921
923
  variant: "error",
@@ -923,9 +925,9 @@ const qt = 996, ea = Tt({
923
925
  });
924
926
  return;
925
927
  }
926
- b.value = "", S.value = !a.data.closed, a.data.messages && (x(a.data.messages), a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), z();
927
- } catch (t) {
928
- console.error("sendChatMessage error:", t), f("show:toast", {
928
+ N.value = "", S.value = !t.data.closed, t.data.messages && (x(t.data.messages), t.data.messages.length > 0 && (k.value = t.data.messages[t.data.messages.length - 1].id)), V();
929
+ } catch (a) {
930
+ console.error("sendChatMessage error:", a), p("show:toast", {
929
931
  show: !0,
930
932
  message: u("HC_FAILED_TO_SEND_MESSAGE"),
931
933
  variant: "error",
@@ -935,15 +937,15 @@ const qt = 996, ea = Tt({
935
937
  y.value.sendingMessage = !1;
936
938
  }
937
939
  }
938
- }, ht = async () => {
939
- if (!(!r.value.tokenId || !P.value)) {
940
+ }, ct = async () => {
941
+ if (!(!r.value.tokenId || !H.value)) {
940
942
  y.value.conversationToggle = !0;
941
943
  try {
942
- const e = S.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", t = new FormData();
943
- t.append("tokenId", r.value.tokenId), t.append("userId", P.value), S.value && k.value !== null && t.append("lastMsgId", k.value.toString());
944
- const a = await Z.post(e, t);
945
- if (a.data.status === "error") {
946
- f("show:toast", {
944
+ const e = S.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", a = new FormData();
945
+ a.append("tokenId", r.value.tokenId), a.append("userId", H.value), S.value && k.value !== null && a.append("lastMsgId", k.value.toString());
946
+ const t = await J.post(e, a);
947
+ if (t.data.status === "error") {
948
+ p("show:toast", {
947
949
  show: !0,
948
950
  message: u("HC_FAILED_TO_UPDATE_CONVERSATION"),
949
951
  variant: "error",
@@ -951,14 +953,14 @@ const qt = 996, ea = Tt({
951
953
  });
952
954
  return;
953
955
  }
954
- S.value = !a.data.closed, a.data.messages && (x(a.data.messages), a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), f("show:toast", {
956
+ S.value = !t.data.closed, t.data.messages && (x(t.data.messages), t.data.messages.length > 0 && (k.value = t.data.messages[t.data.messages.length - 1].id)), p("show:toast", {
955
957
  show: !0,
956
958
  message: S.value ? u("HC_CONVERSATION_REOPENED") : u("HC_CONVERSATION_CLOSED"),
957
959
  variant: "success",
958
960
  icon: "check-circle"
959
961
  });
960
962
  } catch (e) {
961
- console.error("toggleMarkOpenClose error:", e), f("show:toast", {
963
+ console.error("toggleMarkOpenClose error:", e), p("show:toast", {
962
964
  show: !0,
963
965
  message: u("HC_FAILED_TO_UPDATE_CONVERSATION"),
964
966
  variant: "error",
@@ -968,18 +970,18 @@ const qt = 996, ea = Tt({
968
970
  y.value.conversationToggle = !1;
969
971
  }
970
972
  }
971
- }, yt = async () => {
972
- if (s.isTestEnvironment && !(!r.value?.tokenId || !j.value.trim())) {
973
- ve.value = !0;
973
+ }, dt = async () => {
974
+ if (s.isTestEnvironment && !(!r.value?.tokenId || !U.value.trim())) {
975
+ ie.value = !0;
974
976
  try {
975
977
  const e = new FormData();
976
- e.append("tokenId", r.value.tokenId), e.append("content", j.value.trim());
977
- const t = await Z.post(
978
+ e.append("tokenId", r.value.tokenId), e.append("content", U.value.trim());
979
+ const a = await J.post(
978
980
  "/api/client/connect/simulateInbound.php",
979
981
  e
980
982
  );
981
- if (t.data.status === "error") {
982
- f("show:toast", {
983
+ if (a.data.status === "error") {
984
+ p("show:toast", {
983
985
  show: !0,
984
986
  message: u("HC_FAILED_TO_SIMULATE_MESSAGE"),
985
987
  variant: "error",
@@ -987,55 +989,39 @@ const qt = 996, ea = Tt({
987
989
  });
988
990
  return;
989
991
  }
990
- t.data.messages && (x(t.data.messages), S.value = !t.data.closed, t.data.messages.length > 0 && (k.value = t.data.messages[t.data.messages.length - 1].id)), j.value = "", W.value = !1, z(), f("show:toast", {
992
+ a.data.messages && (x(a.data.messages), S.value = !a.data.closed, a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), U.value = "", G.value = !1, V(), p("show:toast", {
991
993
  show: !0,
992
994
  message: u("HC_SIMULATED_GUEST_REPLY"),
993
995
  variant: "success",
994
996
  icon: "check-circle"
995
997
  });
996
998
  } catch (e) {
997
- console.error("simulateGuestReply error:", e), f("show:toast", {
999
+ console.error("simulateGuestReply error:", e), p("show:toast", {
998
1000
  show: !0,
999
1001
  message: u("HC_FAILED_TO_SIMULATE_MESSAGE"),
1000
1002
  variant: "error",
1001
1003
  icon: "exclamation-circle"
1002
1004
  });
1003
1005
  } finally {
1004
- ve.value = !1;
1006
+ ie.value = !1;
1005
1007
  }
1006
1008
  }
1007
- }, gt = () => {
1008
- W.value = !W.value, W.value || (j.value = "");
1009
- }, _t = () => {
1010
- $.value || ($.value = setInterval(() => {
1011
- document.visibilityState === "visible" && ye(!0);
1012
- }, Pe));
1013
- }, we = () => {
1014
- $.value && (clearInterval($.value), $.value = null);
1015
- }, Ie = () => {
1016
- if (s.align === "left" || s.align === "right") {
1017
- const e = Y.value?.getBoundingClientRect().left, t = window.innerWidth;
1018
- ce.value = t - e < U.value ? "right" : "left";
1019
- } else {
1020
- const e = Y.value?.getBoundingClientRect().top, t = window.innerHeight;
1021
- ce.value = t - e < G.value ? "bottom" : "top";
1022
- }
1023
- }, Te = () => {
1024
- if (s.position === "top" || s.position === "bottom") {
1025
- const e = Y.value?.getBoundingClientRect().top, t = window.innerHeight;
1026
- me.value = t - e < G.value ? "top" : "bottom";
1027
- } else {
1028
- const e = Y.value?.getBoundingClientRect().left, t = window.innerWidth;
1029
- me.value = t - e < U.value ? "left" : "right";
1030
- }
1031
- }, Me = () => {
1032
- H.value = !H.value, H.value ? (b.value = "", M.value.info = ae.value, M.value.tickets = oe.value, M.value.comments = te.value, ae.value = !1, oe.value = !1, document.getElementById("comment-field")?.focus()) : (ae.value = M.value.info, oe.value = M.value.tickets, te.value = M.value.comments);
1033
- }, wt = async (e, t) => {
1034
- const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
1035
- if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([a])), await J(), A.value) {
1009
+ }, mt = () => {
1010
+ G.value = !G.value, G.value || (U.value = "");
1011
+ }, vt = () => {
1012
+ j.value || (j.value = setInterval(() => {
1013
+ document.visibilityState === "visible" && me(!0);
1014
+ }, Ne));
1015
+ }, pe = () => {
1016
+ j.value && (clearInterval(j.value), j.value = null);
1017
+ }, ke = () => {
1018
+ L.value = !L.value, L.value ? (N.value = "", C.value.info = X.value, C.value.tickets = ee.value, C.value.comments = Z.value, X.value = !1, ee.value = !1, document.getElementById("comment-field")?.focus()) : (X.value = C.value.info, ee.value = C.value.tickets, Z.value = C.value.comments);
1019
+ }, ft = async (e, a) => {
1020
+ const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
1021
+ if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([t])), await Q(), A.value) {
1036
1022
  const n = [];
1037
1023
  A.value.forEach((l) => {
1038
- l.id === e && l.type === t ? n.unshift({
1024
+ l.id === e && l.type === a ? n.unshift({
1039
1025
  ...l,
1040
1026
  isNew: !0
1041
1027
  }) : n.push({
@@ -1046,147 +1032,141 @@ const qt = 996, ea = Tt({
1046
1032
  }
1047
1033
  };
1048
1034
  B(() => s.open, () => {
1049
- if (s.open && s.showComments && N.value.length) {
1050
- const e = setTimeout(z, 500);
1051
- L.value.push(e);
1035
+ if (s.open && s.showComments && b.value.length) {
1036
+ const e = setTimeout(V, 500);
1037
+ P.value.push(e);
1052
1038
  }
1053
- s.open || (Se(), we(), k.value = null, N.value = [], S.value = !1);
1039
+ s.open || (Ie(), pe(), k.value = null, b.value = [], S.value = !1);
1054
1040
  }), B(
1055
- () => [s.open, s.showComments, te.value, r.value?.tokenId],
1056
- ([e, t, a, o]) => {
1057
- e && t && a && o ? _t() : we();
1041
+ () => [s.open, s.showComments, Z.value, r.value?.tokenId],
1042
+ ([e, a, t, o]) => {
1043
+ e && a && t && o ? vt() : pe();
1058
1044
  }
1059
- ), B(b, () => {
1060
- const e = setTimeout(Ce, 100);
1061
- L.value.push(e);
1062
- }), B(() => s.allowWhenWhere, (e, t) => {
1063
- t === !0 && e === !1 && (d.value.when = null, d.value.where = null, q.value = [], F.value = []);
1045
+ ), B(N, () => {
1046
+ const e = setTimeout(Oe, 100);
1047
+ P.value.push(e);
1048
+ }), B(() => s.allowWhenWhere, (e, a) => {
1049
+ a === !0 && e === !1 && (d.value.when = null, d.value.where = null, q.value = [], F.value = []);
1064
1050
  });
1065
- const Re = () => !!(s.room.reservations || s.room.cleaning || s.room.occupancy || s.room.hkTaskTypeId != null), It = () => Array.isArray(s.room.roomNoticeIssues) && s.room.roomNoticeIssues.length > 0, He = () => {
1066
- It() ? V.value = s.room.roomNoticeIssues : ge();
1051
+ const Ee = () => !!(s.room.reservations || s.room.cleaning || s.room.occupancy || s.room.hkTaskTypeId != null), pt = () => Array.isArray(s.room.roomNoticeIssues) && s.room.roomNoticeIssues.length > 0, Ae = () => {
1052
+ pt() ? W.value = s.room.roomNoticeIssues : ve();
1067
1053
  };
1068
- return B(() => s.open, async (e, t) => {
1069
- e && !t && (Re() ? (r.value = s.room, R.value = [s.room]) : s.showGuestDetails && !R.value ? await ne() : r.value || (r.value = s.room), J(), He(), re(), s.showComments && ye());
1054
+ return B(() => s.open, async (e, a) => {
1055
+ e && !a && (Ee() ? (r.value = s.room, R.value = [s.room]) : s.showGuestDetails && !R.value ? await ae() : r.value || (r.value = s.room), Q(), Ae(), oe(), s.showComments && me());
1070
1056
  }), B(
1071
1057
  () => s.room.id,
1072
- (e, t) => {
1073
- e !== t && (r.value = s.room, R.value = null, s.open && (Re() ? R.value = [s.room] : s.showGuestDetails && ne(), J(), He(), re()));
1058
+ (e, a) => {
1059
+ e !== a && (r.value = s.room, R.value = null, s.open && (Ee() ? R.value = [s.room] : s.showGuestDetails && ae(), Q(), Ae(), oe()));
1074
1060
  }
1075
- ), Dt(async () => {
1061
+ ), yt(async () => {
1076
1062
  const e = JSON.parse(
1077
1063
  window.localStorage.getItem("authenticated")
1078
1064
  );
1079
- P.value = e?.user?.id || window.userId || "", r.value = s.room, s.size === "sm" && (G.value = 140, U.value = 160), s.size === "lg" && (G.value = 250, U.value = 440), Ie(), Te();
1080
- }), Ot(() => {
1081
- L.value.forEach((e) => {
1065
+ H.value = e?.user?.id || window.userId || "", r.value = s.room;
1066
+ }), gt(() => {
1067
+ P.value.forEach((e) => {
1082
1068
  clearTimeout(e);
1083
- }), we();
1069
+ }), pe();
1084
1070
  }), {
1085
- DateTime: g,
1071
+ DateTime: _,
1086
1072
  // Refs
1087
- activityList: fe,
1088
- actionMenuOpen: ue,
1089
- alignment: ce,
1090
- assignTypes: ee,
1091
- comment: b,
1092
- complaint: p,
1093
- componentHeight: G,
1094
- componentWidth: U,
1095
- departments: C,
1096
- departmentUsers: ke,
1097
- expandActivity: qe,
1098
- expandComments: te,
1099
- expandGuestInfo: ae,
1100
- expandedStates: M,
1101
- expandTickets: oe,
1102
- guestDetailsData: Le,
1073
+ activityList: ce,
1074
+ actionMenuOpen: re,
1075
+ assignTypes: z,
1076
+ comment: N,
1077
+ complaint: f,
1078
+ departments: M,
1079
+ departmentUsers: ge,
1080
+ expandActivity: be,
1081
+ expandComments: Z,
1082
+ expandGuestInfo: X,
1083
+ expandedStates: C,
1084
+ expandTickets: ee,
1085
+ guestDetailsData: Se,
1103
1086
  itemOptions: O,
1104
1087
  loading: y,
1105
- messages: N,
1106
- moodOptions: de,
1088
+ messages: b,
1089
+ moodOptions: le,
1107
1090
  pmsData: R,
1108
- positioning: me,
1109
- quickReplyOpen: H,
1091
+ preferredPlacement: He,
1092
+ quickReplyOpen: L,
1110
1093
  request: d,
1111
- requestedByOptions: Q,
1112
- requestLoading: pe,
1094
+ requestedByOptions: $,
1095
+ requestLoading: ue,
1113
1096
  requestType: E,
1114
1097
  roomDetailsData: r,
1115
- roomNotice: _,
1116
- roomNotices: V,
1117
- showCreateRequest: se,
1098
+ roomNotice: w,
1099
+ roomNotices: W,
1100
+ showCreateRequest: te,
1118
1101
  ticketsList: A,
1119
- todoOptions: Fe,
1120
- trigger: Y,
1121
- userId: P,
1102
+ todoOptions: Me,
1103
+ userId: H,
1122
1104
  workOrder: v,
1123
- workOrderIssues: he,
1105
+ workOrderIssues: de,
1124
1106
  whenOptions: q,
1125
1107
  whereOptions: F,
1126
1108
  // Guest Connect state
1127
1109
  isConversationOpen: S,
1128
1110
  lastMessageId: k,
1129
1111
  // Simulate Guest Reply state (test environments only)
1130
- simulateOpen: W,
1131
- simulateContent: j,
1132
- simulateLoading: ve,
1112
+ simulateOpen: G,
1113
+ simulateContent: U,
1114
+ simulateLoading: ie,
1133
1115
  // Computed
1134
- cleanliness: xe,
1135
- greenerStayIconUrl: Ue,
1136
- greenerStayTooltipContent: Ge,
1137
- isGreenerStay: Be,
1138
- filteredReplies: We,
1139
- groupedMessages: je,
1140
- hasGuestCallback: $e,
1141
- hasComplaint: Ee,
1142
- itemOptionsList: Qe,
1143
- occupied: Ae,
1144
- occupancyTooltipContent: Ve,
1145
- selectedAssignType: Ye,
1146
- selectedDepartment: Je,
1147
- selectedRequestedBy: ze,
1148
- stayDetails: Ke,
1149
- tagsList: Ze,
1150
- validateToDo: Xe,
1116
+ cleanliness: Ce,
1117
+ greenerStayIconUrl: Pe,
1118
+ greenerStayTooltipContent: Le,
1119
+ isGreenerStay: Re,
1120
+ filteredReplies: qe,
1121
+ groupedMessages: Fe,
1122
+ hasGuestCallback: xe,
1123
+ hasComplaint: _e,
1124
+ itemOptionsList: Be,
1125
+ occupied: we,
1126
+ occupancyTooltipContent: Ge,
1127
+ selectedAssignType: Ue,
1128
+ selectedDepartment: je,
1129
+ selectedRequestedBy: $e,
1130
+ stayDetails: We,
1131
+ tagsList: Qe,
1132
+ validateToDo: Ve,
1151
1133
  // Methods
1152
- closeRequest: Se,
1153
- createCallback: et,
1154
- getActivity: re,
1134
+ closeRequest: Ie,
1135
+ createCallback: Ye,
1136
+ getActivity: oe,
1155
1137
  createMessageList: x,
1156
- getChatMessages: ye,
1157
- getHowLongAgo: at,
1158
- getPMSData: ne,
1159
- getRoomNotices: ge,
1160
- getSharedData: _e,
1161
- getStayDetails: be,
1162
- getTicketColor: st,
1163
- getTicketIcon: nt,
1164
- getTickets: J,
1165
- handleFailedResponse: Ne,
1166
- handlePulse: rt,
1167
- onClickActivity: ut,
1168
- onClickEditConnectGuest: lt,
1169
- onClickTicket: it,
1170
- onCreateRequestSubmit: ct,
1171
- onHoverToggle: dt,
1172
- onSelectQuickReply: mt,
1173
- onSelectToDo: vt,
1174
- openRequest: pt,
1175
- refreshPMSData: ot,
1176
- resizeTextarea: Ce,
1177
- scrollToConnectBottom: z,
1178
- sendChatMessage: ft,
1179
- setAlignment: Ie,
1180
- setPositioning: Te,
1181
- toggleMarkOpenClose: ht,
1182
- toggleQuickReply: Me,
1183
- updateTickets: wt,
1138
+ getChatMessages: me,
1139
+ getHowLongAgo: Ke,
1140
+ getPMSData: ae,
1141
+ getRoomNotices: ve,
1142
+ getSharedData: fe,
1143
+ getStayDetails: Te,
1144
+ getTicketColor: Ze,
1145
+ getTicketIcon: Xe,
1146
+ getTickets: Q,
1147
+ handleFailedResponse: De,
1148
+ handlePulse: et,
1149
+ onClickActivity: ot,
1150
+ onClickEditConnectGuest: tt,
1151
+ onClickTicket: at,
1152
+ onCreateRequestSubmit: st,
1153
+ onHoverToggle: nt,
1154
+ onSelectQuickReply: rt,
1155
+ onSelectToDo: lt,
1156
+ openRequest: it,
1157
+ refreshPMSData: ze,
1158
+ resizeTextarea: Oe,
1159
+ scrollToConnectBottom: V,
1160
+ sendChatMessage: ut,
1161
+ toggleMarkOpenClose: ct,
1162
+ toggleQuickReply: ke,
1163
+ updateTickets: ft,
1184
1164
  // Simulate Guest Reply methods (test environments only)
1185
- simulateGuestReply: yt,
1186
- toggleSimulateOpen: gt
1165
+ simulateGuestReply: dt,
1166
+ toggleSimulateOpen: mt
1187
1167
  };
1188
1168
  }
1189
1169
  });
1190
1170
  export {
1191
- ea as default
1171
+ Kt as default
1192
1172
  };