@feathery/react 2.41.1 → 2.43.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 (208) hide show
  1. package/cjs/{fthry_AssistantChat.AuMTE5ni.js → fthry_AssistantChat.Dc6irzAk.js} +4 -4
  2. package/cjs/{fthry_FormControl.D82S9LtT.js → fthry_FormControl.D_eydQlT.js} +1 -1
  3. package/cjs/{fthry_InlineTooltip.kdzoP2rc.js → fthry_InlineTooltip.Km0nxBV3.js} +2 -2
  4. package/cjs/{fthry_Overlay.CbC1FjTZ.js → fthry_Overlay.ChABiy0m.js} +1 -1
  5. package/cjs/{fthry_PaymentMethodField.BxzrLkB0.js → fthry_PaymentMethodField.BMABompY.js} +4 -4
  6. package/cjs/{fthry_Placeholder.Di6onpMl.js → fthry_Placeholder.CnNGDD_K.js} +1 -1
  7. package/cjs/{fthry_ShowEyeIcon.B5w5N8jm.js → fthry_ShowEyeIcon.Cozhh36m.js} +1 -1
  8. package/cjs/fthry_auto-track.CzyR3umO.js +114 -0
  9. package/cjs/{fthry_highlighted-body-TPN3WLV5.CB6IWsjv.js → fthry_highlighted-body-TPN3WLV5.D8LjPUtI.js} +3 -3
  10. package/cjs/{fthry_index.DH8lgbPx.js → fthry_index.5oiWIOUK.js} +1 -1
  11. package/cjs/fthry_index.8ZkixEuX.js +477 -0
  12. package/cjs/{fthry_index.Bz-JA0yl.js → fthry_index.B-QAg85r.js} +6 -6
  13. package/cjs/{fthry_index.BvqRq5KX.js → fthry_index.B4qsX_2B.js} +4 -4
  14. package/cjs/fthry_index.B5TkPpn3.js +73 -0
  15. package/cjs/fthry_index.B76xVeoK.js +6893 -0
  16. package/cjs/fthry_index.B79ksg_6.js +68 -0
  17. package/cjs/{fthry_index.BM9fkWLL.js → fthry_index.B7Slrn_2.js} +1 -1
  18. package/cjs/{fthry_index.BgbTmgMy.js → fthry_index.BNFRKqrl.js} +5 -5
  19. package/cjs/{fthry_index.COz6kiMq.js → fthry_index.BPu5GDF3.js} +5 -5
  20. package/cjs/{fthry_index.D1jW5KD5.js → fthry_index.BVLMhJHP.js} +1 -1
  21. package/cjs/{fthry_index.BvLzo0YW.js → fthry_index.BYJ0Cjz1.js} +1 -1
  22. package/cjs/{fthry_index.DIK6ws4x.js → fthry_index.CMRH7foG.js} +6 -6
  23. package/cjs/{fthry_index.J2MkUMO_.js → fthry_index.Cj3i1JIs.js} +1 -1
  24. package/cjs/{fthry_index.YiQCJ_8p.js → fthry_index.Cj8NIIWS.js} +6 -6
  25. package/cjs/{fthry_index.BoWkmyhH.js → fthry_index.Crv5Oqdb.js} +6 -6
  26. package/cjs/{fthry_index.BZUdAFdY.js → fthry_index.CsV6zv_0.js} +5 -5
  27. package/cjs/{fthry_index.uAmtxDHN.js → fthry_index.D6PlFvY8.js} +5 -5
  28. package/cjs/{fthry_index.9lXPMg87.js → fthry_index.D7jBFEkz.js} +1 -1
  29. package/cjs/fthry_index.DMmTH04s.js +34 -0
  30. package/cjs/{fthry_index.COVcTBk0.js → fthry_index.DcnmaMvN.js} +2 -2
  31. package/cjs/fthry_index.DfOk3_Vc.js +72 -0
  32. package/cjs/{fthry_index.Dx6_vLXH.js → fthry_index.Dn7k0XbZ.js} +101 -112
  33. package/cjs/{fthry_index.CfCS_H4E.js → fthry_index.DoliEMOD.js} +3 -3
  34. package/cjs/{fthry_index.DyfArFz1.js → fthry_index.H4GgWRQ-.js} +1 -1
  35. package/cjs/fthry_index.KDrRVPx5.js +575 -0
  36. package/cjs/{fthry_index.C7-q3RPG.js → fthry_index.KMyCBmte.js} +1 -1
  37. package/cjs/{fthry_index.BvupjK8i.js → fthry_index.WbKUUcdS.js} +1 -1
  38. package/cjs/{fthry_index.DLYQKv1h.js → fthry_index._pqB5lCu.js} +8 -8
  39. package/cjs/{fthry_index.wT0xFcFi.js → fthry_index.ecHJPvgK.js} +3 -3
  40. package/cjs/fthry_index.umd.lxnwBuEl.js +41 -0
  41. package/cjs/{fthry_index.DKEljSgi.js → fthry_index.wTd_xpVX.js} +4 -4
  42. package/cjs/{fthry_index.D2MsWDhX.js → fthry_index.x_Q9efXs.js} +2 -2
  43. package/cjs/{fthry_input.Dqe4AZPw.js → fthry_input.DJaKnXqS.js} +1 -1
  44. package/cjs/fthry_is-plan-event-enabled.nMt_kVye.js +19 -0
  45. package/cjs/{fthry_mermaid-O7DHMXV3.Hr0ROL9a.js → fthry_mermaid-O7DHMXV3.CyaPsnki.js} +3 -3
  46. package/cjs/{fthry_script.5FcM2fg9.js → fthry_script.DrFnB8ud.js} +1 -1
  47. package/cjs/{fthry_styles.CxfiChN9.js → fthry_styles.qeOM9hPF.js} +1 -1
  48. package/cjs/{fthry_useElementSize.DjNvJMZW.js → fthry_useElementSize.K1QGuhUj.js} +1 -1
  49. package/cjs/{fthry_useSalesforceSync.D_GLzNtJ.js → fthry_useSalesforceSync.DQd2UZn6.js} +1 -1
  50. package/cjs/{fthry_webfontloader.rkfqw_Az.js → fthry_webfontloader.D6aR0hiT.js} +1 -1
  51. package/cjs/index.js +1 -1
  52. package/cjs/integrations/segment.d.ts +1 -1
  53. package/cjs/integrations/segment.d.ts.map +1 -1
  54. package/cjs/utils/featheryClient/integrationClient.d.ts +1 -1
  55. package/cjs/utils/featheryClient/integrationClient.d.ts.map +1 -1
  56. package/cjs/utils/fieldHelperFunctions.d.ts +1 -1
  57. package/cjs/utils/fieldHelperFunctions.d.ts.map +1 -1
  58. package/cjs/utils/internalState.d.ts +16 -1
  59. package/cjs/utils/internalState.d.ts.map +1 -1
  60. package/dist/{fthry_AssistantChat.9iZnqQQt.js → fthry_AssistantChat.D2SjzX88.js} +4 -4
  61. package/dist/{fthry_FormControl.aWX059qS.js → fthry_FormControl.AWZ2hRhb.js} +1 -1
  62. package/dist/{fthry_InlineTooltip.159qVlX7.js → fthry_InlineTooltip.DAaWNMEQ.js} +2 -2
  63. package/dist/{fthry_Overlay.Di0mol1Z.js → fthry_Overlay.C500WG6U.js} +1 -1
  64. package/dist/{fthry_PaymentMethodField.C_6Pu8x2.js → fthry_PaymentMethodField.Bl2Ce36L.js} +4 -4
  65. package/dist/{fthry_Placeholder.Dsx8_ezr.js → fthry_Placeholder.DXrZi2ze.js} +1 -1
  66. package/dist/{fthry_ShowEyeIcon.nRVpMPPa.js → fthry_ShowEyeIcon.D3iEMZA7.js} +1 -1
  67. package/dist/fthry_auto-track.C9HCW4qJ.js +111 -0
  68. package/dist/{fthry_highlighted-body-TPN3WLV5.x-GmTT4p.js → fthry_highlighted-body-TPN3WLV5.j0rrY2PD.js} +3 -3
  69. package/dist/fthry_index.-lEiRiJ3.js +66 -0
  70. package/dist/{fthry_index.BfOeedPy.js → fthry_index.0DlQOa4l.js} +1 -1
  71. package/dist/{fthry_index.BZ22DoJF.js → fthry_index.4rXsgo8n.js} +6 -6
  72. package/dist/{fthry_index.DieTiO1R.js → fthry_index.BALrl_Ek.js} +4 -4
  73. package/dist/{fthry_index.DfusnmMH.js → fthry_index.BDtWG5y-.js} +5 -5
  74. package/dist/fthry_index.BHbPxMcy.js +71 -0
  75. package/dist/fthry_index.BjZmdaIR.js +474 -0
  76. package/dist/{fthry_index.BKKIUHxP.js → fthry_index.BlrVY1vE.js} +6 -6
  77. package/dist/{fthry_index.BD4Gxt6n.js → fthry_index.BoXwpo3p.js} +101 -113
  78. package/dist/{fthry_index.CPLtkSYO.js → fthry_index.C-Af9t8c.js} +5 -5
  79. package/dist/{fthry_index.Se5JLYs9.js → fthry_index.C8xVXq31.js} +3 -3
  80. package/dist/{fthry_index.D5rdhFrZ.js → fthry_index.C9P7Vo6r.js} +1 -1
  81. package/dist/{fthry_index.Drx2ZVkE.js → fthry_index.CB6eTYmX.js} +5 -5
  82. package/dist/{fthry_index.CUWsRf0D.js → fthry_index.CS604ePK.js} +2 -2
  83. package/dist/{fthry_index.Pp6zhlf_.js → fthry_index.Cd0JKkOc.js} +8 -8
  84. package/dist/fthry_index.Cn4kA2tn.js +6871 -0
  85. package/dist/fthry_index.Co2zkJCZ.js +70 -0
  86. package/dist/{fthry_index.CBIXVWL-.js → fthry_index.D2-zTdBQ.js} +1 -1
  87. package/dist/{fthry_index.BOH7m5kT.js → fthry_index.D3O1Qvm3.js} +3 -3
  88. package/dist/{fthry_index.CyDzbx5S.js → fthry_index.D5dmTp6g.js} +1 -1
  89. package/dist/{fthry_index.CBiQrmKH.js → fthry_index.D8_hWgYx.js} +1 -1
  90. package/dist/{fthry_index.D0eO_jrF.js → fthry_index.DA5HHbVe.js} +1 -1
  91. package/dist/fthry_index.DAdR6bYe.js +32 -0
  92. package/dist/{fthry_index.BAs20rGv.js → fthry_index.DFZRIGNF.js} +2 -2
  93. package/dist/{fthry_index.CPAAIiq3.js → fthry_index.DOGU2-kQ.js} +5 -5
  94. package/dist/{fthry_index.Fq2JKey_.js → fthry_index.DZviU_0h.js} +1 -1
  95. package/dist/{fthry_index.CYYRO1p6.js → fthry_index.DtHlcCDX.js} +1 -1
  96. package/dist/{fthry_index.Dm5kGSKR.js → fthry_index.DzDuGB1B.js} +6 -6
  97. package/dist/{fthry_index.D8wf4Och.js → fthry_index.IaraEDTR.js} +1 -1
  98. package/dist/fthry_index.JD44HVFL.js +573 -0
  99. package/dist/{fthry_index.BROaFD02.js → fthry_index.OgRdIE07.js} +5 -5
  100. package/dist/fthry_index.umd.BhHG1ThX.js +39 -0
  101. package/dist/{fthry_index.C9wizXBA.js → fthry_index.x_DcI6GR.js} +4 -4
  102. package/dist/{fthry_input.p12lRSx4.js → fthry_input.Y2HVhQeo.js} +1 -1
  103. package/dist/fthry_is-plan-event-enabled.mXX0dwl-.js +17 -0
  104. package/dist/{fthry_mermaid-O7DHMXV3.CWWC47_a.js → fthry_mermaid-O7DHMXV3._Ng2DeVi.js} +3 -3
  105. package/dist/{fthry_script.GZmaXrTw.js → fthry_script.4cQVioC4.js} +1 -1
  106. package/dist/{fthry_styles.p1MsrWgL.js → fthry_styles.DX0NUnVP.js} +1 -1
  107. package/dist/{fthry_useElementSize.cLenWN5F.js → fthry_useElementSize.BCbe9jZd.js} +1 -1
  108. package/dist/{fthry_useSalesforceSync.0EbTmWOM.js → fthry_useSalesforceSync.DJFGoBIG.js} +1 -1
  109. package/dist/{fthry_webfontloader.DvZgpMoe.js → fthry_webfontloader.4kqCCEG_.js} +1 -1
  110. package/dist/index.js +1 -1
  111. package/dist/integrations/segment.d.ts +1 -1
  112. package/dist/integrations/segment.d.ts.map +1 -1
  113. package/dist/utils/featheryClient/integrationClient.d.ts +1 -1
  114. package/dist/utils/featheryClient/integrationClient.d.ts.map +1 -1
  115. package/dist/utils/fieldHelperFunctions.d.ts +1 -1
  116. package/dist/utils/fieldHelperFunctions.d.ts.map +1 -1
  117. package/dist/utils/internalState.d.ts +16 -1
  118. package/dist/utils/internalState.d.ts.map +1 -1
  119. package/package.json +2 -1
  120. package/umd/277.1a33ea06f86326613fcb.js +1 -0
  121. package/umd/301.b40f38397dcde848ba46.js +1 -0
  122. package/umd/435.a94343a900f83a1ba8eb.js +1 -0
  123. package/umd/466.c82e14e5b06ae17649ff.js +1 -0
  124. package/umd/509.d49410af0cc948b08d73.js +2 -0
  125. package/umd/529.e7a0a831bf80398fda0f.js +1 -0
  126. package/umd/542.5168cf86fc7255c8b7fd.js +1 -0
  127. package/umd/598.9bc05f78267c055211d9.js +2 -0
  128. package/umd/602.ddda17ac6b2cabb3d639.js +1 -0
  129. package/umd/664.4a3ec465094a3d59c184.js +1 -0
  130. package/umd/834.b4ef33227c4c872368d6.js +1 -0
  131. package/umd/94.391827577c1c62f73f29.js +2 -0
  132. package/umd/AddressField.648b3da916171008dc9f.js +1 -0
  133. package/umd/AssistantChat.879f86967feffba1cc6f.js +1 -0
  134. package/umd/ButtonGroupField.d39ac976a6dee9ef593a.js +1 -0
  135. package/umd/CheckboxField.3323fdfd4a7377580d46.js +1 -0
  136. package/umd/CheckboxGroupField.e495eb152c4faa000d4b.js +1 -0
  137. package/umd/ColorPickerField.7e0f3c3a7dc1bcaf5e30.js +1 -0
  138. package/umd/CustomField.895d9a1d34e8e7b8b8d0.js +1 -0
  139. package/umd/DateSelectorField.e702b3e6b0a5b498c824.js +1 -0
  140. package/umd/DropdownField.d1a234d236d9989bbf20.js +1 -0
  141. package/umd/DropdownMultiField.5b4e24025035f1678c83.js +1 -0
  142. package/umd/FileUploadField.f0d66cf87244c0e565a1.js +1 -0
  143. package/umd/MatrixField.bcd6f58ea1896f386988.js +1 -0
  144. package/umd/PasswordField.593d7b7d3d954634fa30.js +1 -0
  145. package/umd/PaymentMethodField.8e4fd6353793eaaa2b5b.js +1 -0
  146. package/umd/PhoneField.861b99c7e81b4b9c8648.js +1 -0
  147. package/umd/PinInputField.ddc30797191dfbed7fe3.js +1 -0
  148. package/umd/QRScanner.94381603047f5db6b5c0.js +1 -0
  149. package/umd/RadioButtonGroupField.7a333a6f7e578a181a98.js +1 -0
  150. package/umd/RatingField.204cb92c30aeb4b8952a.js +1 -0
  151. package/umd/SignatureField.9cc9b3783cf8149ba767.js +1 -0
  152. package/umd/SliderField.d746a57527031d551f58.js +1 -0
  153. package/umd/TableElement.fef6a362cfa150f0f38e.js +1 -0
  154. package/umd/TextArea.04335be4f0f0d6c0cc1a.js +1 -0
  155. package/umd/TextField.749931ebb258bf38e007.js +1 -0
  156. package/umd/ajs-destination.19322d501875cd260554.js +1 -0
  157. package/umd/auto-track.e6503d851d1d8c634ff0.js +1 -0
  158. package/umd/index.js +1 -1
  159. package/umd/legacyVideos.5ab9e462d737eca6f817.js +1 -0
  160. package/umd/libphonenumber.721378defae8d84deae2.js +1 -0
  161. package/umd/queryString.74978b49d70f9556e22a.js +1 -0
  162. package/umd/remoteMiddleware.fb68e7490b3379937c68.js +1 -0
  163. package/umd/schemaFilter.45d31876c08e74664f1d.js +1 -0
  164. package/umd/segment.76c3946188b5c80e77d6.js +2 -0
  165. package/umd/segment.76c3946188b5c80e77d6.js.LICENSE.txt +1 -0
  166. package/umd/tsub-middleware.4d4d00320fa7aa6a97cc.js +2 -0
  167. package/umd/tsub-middleware.4d4d00320fa7aa6a97cc.js.LICENSE.txt +1 -0
  168. package/umd/webfontloader.419636e0eb0cfb39b078.js +1 -0
  169. package/umd/277.87e6ca5c1cf2a7477992.js +0 -1
  170. package/umd/301.a96bba9d529bf7fd379e.js +0 -1
  171. package/umd/435.faa037e36038c2c766da.js +0 -1
  172. package/umd/466.e3456c8b3407ad04ba56.js +0 -1
  173. package/umd/509.bca2ff43c66b1dba064f.js +0 -2
  174. package/umd/529.63afee65c745ca950f81.js +0 -1
  175. package/umd/542.f1dbbbb062e82a2995e9.js +0 -1
  176. package/umd/598.ca92da6595afad37b511.js +0 -2
  177. package/umd/602.1fde434923c6596acd40.js +0 -1
  178. package/umd/664.42541009d1fcb121cc49.js +0 -1
  179. package/umd/94.e8ad20ab98c664d13197.js +0 -2
  180. package/umd/AddressField.c4188872f2a931394aa1.js +0 -1
  181. package/umd/AssistantChat.7af8f8f25348f5379aeb.js +0 -1
  182. package/umd/ButtonGroupField.33cf9c939c8e82cc6c83.js +0 -1
  183. package/umd/CheckboxField.782999cad642da04434d.js +0 -1
  184. package/umd/CheckboxGroupField.18ab392a2890a239fd0b.js +0 -1
  185. package/umd/ColorPickerField.f6740bb7c4c20a520db5.js +0 -1
  186. package/umd/CustomField.a5b2965922f2d170b9b5.js +0 -1
  187. package/umd/DateSelectorField.568bb30a220837a36660.js +0 -1
  188. package/umd/DropdownField.9f0f8a425ddf09771ad8.js +0 -1
  189. package/umd/DropdownMultiField.72a44c0280217eeb5652.js +0 -1
  190. package/umd/FileUploadField.7a5028fb6035d09b3e81.js +0 -1
  191. package/umd/MatrixField.2b65107453ddf2322137.js +0 -1
  192. package/umd/PasswordField.7585ef588333cb4181f7.js +0 -1
  193. package/umd/PaymentMethodField.d08bcfa1efb56084572d.js +0 -1
  194. package/umd/PhoneField.b9293ead8e5a2a3b7c37.js +0 -1
  195. package/umd/PinInputField.b1aee0ef9d3c9f9a1933.js +0 -1
  196. package/umd/QRScanner.3c22391de30dba001f13.js +0 -1
  197. package/umd/RadioButtonGroupField.20268d1b4649053bf1db.js +0 -1
  198. package/umd/RatingField.eeeb0ac499c308c120ba.js +0 -1
  199. package/umd/SignatureField.0e7d60fa2fafcb6be554.js +0 -1
  200. package/umd/SliderField.a5ab58e4b89fa67d6ac6.js +0 -1
  201. package/umd/TableElement.1076e69a66923cfe6434.js +0 -1
  202. package/umd/TextArea.7cca0d69e618846660c5.js +0 -1
  203. package/umd/TextField.28c59425e129e78a4551.js +0 -1
  204. package/umd/libphonenumber.4ab4d30edb4e455b2fc4.js +0 -1
  205. package/umd/webfontloader.b44bdf00049b175713ae.js +0 -1
  206. /package/umd/{509.bca2ff43c66b1dba064f.js.LICENSE.txt → 509.d49410af0cc948b08d73.js.LICENSE.txt} +0 -0
  207. /package/umd/{598.ca92da6595afad37b511.js.LICENSE.txt → 598.9bc05f78267c055211d9.js.LICENSE.txt} +0 -0
  208. /package/umd/{94.e8ad20ab98c664d13197.js.LICENSE.txt → 94.391827577c1c62f73f29.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- (this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[664],{6664:function(e,t,n){!function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,c=[],u=!0,i=!1;try{for(n=n.call(e);!(u=(r=n.next()).done)&&(c.push(r.value),!t||c.length!==t);u=!0);}catch(e){i=!0,o=e}finally{try{u||null==n.return||n.return()}finally{if(i)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,p,f,d,h={exports:{}};h.exports=function(){if(d)return f;d=1;var e=p?l:(p=1,l="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,f=function(){function r(t,n,r,o,c,u){if(u!==e){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function o(){return r}r.isRequired=r;var c={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return c.PropTypes=c,c}}()();var m=a(h.exports),y=function(e,n,r){var o=!!r,c=t.useRef(r);t.useEffect((function(){c.current=r}),[r]),t.useEffect((function(){if(!o||!e)return function(){};var t=function(){c.current&&c.current.apply(c,arguments)};return e.on(n,t),function(){e.off(n,t)}}),[o,n,e,c])},g=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},v=function(e){return null!==e&&"object"===o(e)},C=function(e){return v(e)&&"function"==typeof e.then},E=function(e){return v(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment},k="[object Object]",b=function e(t,n){if(!v(t)||!v(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===k;if(o!==(Object.prototype.toString.call(n)===k))return!1;if(!o&&!r)return t===n;var c=Object.keys(t),u=Object.keys(n);if(c.length!==u.length)return!1;for(var i={},s=0;s<c.length;s+=1)i[c[s]]=!0;for(var a=0;a<u.length;a+=1)i[u[a]]=!0;var l=Object.keys(i);if(l.length!==c.length)return!1;var p=t,f=n;return l.every((function(t){return e(p[t],f[t])}))},S=function(e,t,n){return v(e)?Object.keys(e).reduce((function(o,u){var i=!v(t)||!b(e[u],t[u]);return n.includes(u)?(i&&console.warn("Unsupported prop change: options.".concat(u," is not a mutable property.")),o):i?r(r({},o||{}),{},c({},u,e[u])):o}),null):null},w="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;if(null===e||E(e))return e;throw new Error(t)},O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;if(C(e))return{tag:"async",stripePromise:Promise.resolve(e).then((function(e){return P(e,t)}))};var n=P(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},j=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"3.7.0"}),e.registerAppInfo({name:"react-stripe-js",version:"3.7.0",url:"https://stripe.com/docs/stripe-js/react"}))},x=t.createContext(null);x.displayName="ElementsContext";var A=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},R=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo((function(){return O(n)}),[n]),u=i(t.useState((function(){return{stripe:"sync"===c.tag?c.stripe:null,elements:"sync"===c.tag?c.stripe.elements(r):null}})),2),s=u[0],a=u[1];t.useEffect((function(){var e=!0,t=function(e){a((function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}}))};return"async"!==c.tag||s.stripe?"sync"!==c.tag||s.stripe||t(c.stripe):c.stripePromise.then((function(n){n&&e&&t(n)})),function(){e=!1}}),[c,s,r]);var l=g(n);t.useEffect((function(){null!==l&&l!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")}),[l,n]);var p=g(r);return t.useEffect((function(){if(s.elements){var e=S(r,p,["clientSecret","fonts"]);e&&s.elements.update(e)}}),[r,p,s.elements]),t.useEffect((function(){j(s.stripe)}),[s.stripe]),t.createElement(x.Provider,{value:s},o)};R.propTypes={stripe:m.any,options:m.object};var I=function(e){var n=t.useContext(x);return A(n,e)},N=function(e){return(0,e.children)(I("mounts <ElementsConsumer>"))};N.propTypes={children:m.func.isRequired};var T=["on","session"],Y=t.createContext(null);Y.displayName="CheckoutSdkContext";var B=function(e,t){if(!e)throw new Error("Could not find CheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CheckoutProvider> provider."));return e},U=t.createContext(null);U.displayName="CheckoutContext";var M=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo((function(){return O(n,"Invalid prop `stripe` supplied to `CheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")}),[n]),s=i(t.useState(null),2),a=s[0],l=s[1],p=i(t.useState((function(){return{stripe:"sync"===c.tag?c.stripe:null,checkoutSdk:null}})),2),f=p[0],d=p[1],h=function(e,t){d((function(n){return n.stripe&&n.checkoutSdk?n:{stripe:e,checkoutSdk:t}}))},m=t.useRef(!1);t.useEffect((function(){var e=!0;return"async"!==c.tag||f.stripe?"sync"===c.tag&&c.stripe&&!m.current&&(m.current=!0,c.stripe.initCheckout(r).then((function(e){e&&(h(c.stripe,e),e.on("change",l))}))):c.stripePromise.then((function(t){t&&e&&!m.current&&(m.current=!0,t.initCheckout(r).then((function(e){e&&(h(t,e),e.on("change",l))})))})),function(){e=!1}}),[c,f,r,l]);var y=g(n);t.useEffect((function(){null!==y&&y!==n&&console.warn("Unsupported prop change on CheckoutProvider: You cannot change the `stripe` prop after setting it.")}),[y,n]);var v=g(r),C=g(f.checkoutSdk);t.useEffect((function(){var e,t;if(f.checkoutSdk){var n=null==v||null===(e=v.elementsOptions)||void 0===e?void 0:e.appearance,o=null==r||null===(t=r.elementsOptions)||void 0===t?void 0:t.appearance,c=!b(o,n),u=!C&&f.checkoutSdk;o&&(c||u)&&f.checkoutSdk.changeAppearance(o)}}),[r,v,f.checkoutSdk,C]),t.useEffect((function(){j(f.stripe)}),[f.stripe]);var E=t.useMemo((function(){return function(e,t){if(!e)return null;e.on,e.session;var n=u(e,T);return t?Object.assign(t,n):Object.assign(e.session(),n)}(f.checkoutSdk,a)}),[f.checkoutSdk,a]);return f.checkoutSdk?t.createElement(Y.Provider,{value:f},t.createElement(U.Provider,{value:E},o)):null};M.propTypes={stripe:m.any,options:m.shape({fetchClientSecret:m.func.isRequired,elementsOptions:m.object}).isRequired};var _=function(e){var n=t.useContext(Y),r=t.useContext(x);if(n&&r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CheckoutProvider> and <Elements> providers."));return n?B(n,e):A(r,e)},L=["mode"],D=function(e,n){var r,o="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),c=n?function(e){_("mounts <".concat(o,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r,c=n.id,s=n.className,a=n.options,l=void 0===a?{}:a,p=n.onBlur,f=n.onFocus,d=n.onReady,h=n.onChange,m=n.onEscape,v=n.onClick,C=n.onLoadError,E=n.onLoaderStart,k=n.onNetworksChange,b=n.onConfirm,w=n.onCancel,P=n.onShippingAddressChange,O=n.onShippingRateChange,j=_("mounts <".concat(o,">")),x="elements"in j?j.elements:null,A="checkoutSdk"in j?j.checkoutSdk:null,R=i(t.useState(null),2),I=R[0],N=R[1],T=t.useRef(null),Y=t.useRef(null);y(I,"blur",p),y(I,"focus",f),y(I,"escape",m),y(I,"click",v),y(I,"loaderror",C),y(I,"loaderstart",E),y(I,"networkschange",k),y(I,"confirm",b),y(I,"cancel",w),y(I,"shippingaddresschange",P),y(I,"shippingratechange",O),y(I,"change",h),d&&(r="expressCheckout"===e?d:function(){d(I)}),y(I,"ready",r),t.useLayoutEffect((function(){if(null===T.current&&null!==Y.current&&(x||A)){var t=null;if(A)switch(e){case"payment":t=A.createPaymentElement(l);break;case"address":if(!("mode"in l))throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");var n=l.mode,r=u(l,L);if("shipping"===n)t=A.createShippingAddressElement(r);else{if("billing"!==n)throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");t=A.createBillingAddressElement(r)}break;case"expressCheckout":t=A.createExpressCheckoutElement(l);break;case"currencySelector":t=A.createCurrencySelectorElement();break;default:throw new Error("Invalid Element type ".concat(o,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else x&&(t=x.create(e,l));T.current=t,N(t),t&&t.mount(Y.current)}}),[x,A,l]);var B=g(l);return t.useEffect((function(){if(T.current){var e=S(l,B,["paymentRequest"]);e&&"update"in T.current&&T.current.update(e)}}),[l,B]),t.useLayoutEffect((function(){return function(){if(T.current&&"function"==typeof T.current.destroy)try{T.current.destroy(),T.current=null}catch(e){}}}),[]),t.createElement("div",{id:c,className:s,ref:Y})};return c.propTypes={id:m.string,className:m.string,onChange:m.func,onBlur:m.func,onFocus:m.func,onReady:m.func,onEscape:m.func,onClick:m.func,onLoadError:m.func,onLoaderStart:m.func,onNetworksChange:m.func,onConfirm:m.func,onCancel:m.func,onShippingAddressChange:m.func,onShippingRateChange:m.func,options:m.object},c.displayName=o,c.__elementType=e,c},W="undefined"==typeof window,q=t.createContext(null);q.displayName="EmbeddedCheckoutProviderContext";var F=function(){var e=t.useContext(q);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},H=W?function(e){var n=e.id,r=e.className;return F(),t.createElement("div",{id:n,className:r})}:function(e){var n=e.id,r=e.className,o=F().embeddedCheckout,c=t.useRef(!1),u=t.useRef(null);return t.useLayoutEffect((function(){return!c.current&&o&&null!==u.current&&(o.mount(u.current),c.current=!0),function(){if(c.current&&o)try{o.unmount(),c.current=!1}catch(e){}}}),[o]),t.createElement("div",{ref:u,id:n,className:r})},V=D("auBankAccount",W),$=D("card",W),z=D("cardNumber",W),G=D("cardExpiry",W),J=D("cardCvc",W),K=D("fpxBank",W),Q=D("iban",W),X=D("idealBank",W),Z=D("p24Bank",W),ee=D("epsBank",W),te=D("payment",W),ne=D("expressCheckout",W),re=D("currencySelector",W),oe=D("paymentRequestButton",W),ce=D("linkAuthentication",W),ue=D("address",W),ie=D("shippingAddress",W),se=D("paymentMethodMessaging",W),ae=D("affirmMessage",W),le=D("afterpayClearpayMessage",W);e.AddressElement=ue,e.AffirmMessageElement=ae,e.AfterpayClearpayMessageElement=le,e.AuBankAccountElement=V,e.CardCvcElement=J,e.CardElement=$,e.CardExpiryElement=G,e.CardNumberElement=z,e.CheckoutProvider=M,e.CurrencySelectorElement=re,e.Elements=R,e.ElementsConsumer=N,e.EmbeddedCheckout=H,e.EmbeddedCheckoutProvider=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo((function(){return O(n,"Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")}),[n]),u=t.useRef(null),s=t.useRef(null),a=i(t.useState({embeddedCheckout:null}),2),l=a[0],p=a[1];t.useEffect((function(){if(!s.current&&!u.current){var e=function(e){s.current||u.current||(s.current=e,u.current=s.current.initEmbeddedCheckout(r).then((function(e){p({embeddedCheckout:e})})))};"async"!==c.tag||s.current||!r.clientSecret&&!r.fetchClientSecret?"sync"!==c.tag||s.current||!r.clientSecret&&!r.fetchClientSecret||e(c.stripe):c.stripePromise.then((function(t){t&&e(t)}))}}),[c,r,l,s]),t.useEffect((function(){return function(){l.embeddedCheckout?(u.current=null,l.embeddedCheckout.destroy()):u.current&&u.current.then((function(){u.current=null,l.embeddedCheckout&&l.embeddedCheckout.destroy()}))}}),[l.embeddedCheckout]),t.useEffect((function(){j(s)}),[s]);var f=g(n);t.useEffect((function(){null!==f&&f!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")}),[f,n]);var d=g(r);return t.useEffect((function(){null!=d&&(null!=r?(void 0===r.clientSecret&&void 0===r.fetchClientSecret&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),null!=d.clientSecret&&r.clientSecret!==d.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=d.fetchClientSecret&&r.fetchClientSecret!==d.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=d.onComplete&&r.onComplete!==d.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),null!=d.onShippingDetailsChange&&r.onShippingDetailsChange!==d.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),null!=d.onLineItemsChange&&r.onLineItemsChange!==d.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")):console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them."))}),[d,r]),t.createElement(q.Provider,{value:l},o)},e.EpsBankElement=ee,e.ExpressCheckoutElement=ne,e.FpxBankElement=K,e.IbanElement=Q,e.IdealBankElement=X,e.LinkAuthenticationElement=ce,e.P24BankElement=Z,e.PaymentElement=te,e.PaymentMethodMessagingElement=se,e.PaymentRequestButtonElement=oe,e.ShippingAddressElement=ie,e.useCheckout=function(){!function(e){var n=t.useContext(Y);B(n,e)}("calls useCheckout()");var e=t.useContext(U);if(!e)throw new Error("Could not find Checkout Context; You need to wrap the part of your app that calls useCheckout() in an <CheckoutProvider> provider.");return e},e.useElements=function(){return I("calls useElements()").elements},e.useStripe=function(){return _("calls useStripe()").stripe}}(t,n(7294))}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 94.e8ad20ab98c664d13197.js.LICENSE.txt */
2
- (this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[94],{3094:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L});var r=n(7294);const a="undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,s=(e,t)=>{const n=r.useRef(!0);a((()=>e(n.current)),t),a((()=>(n.current=!1,()=>{n.current=!0})),[])},l=function(e){const t=r.useRef();return t.current=e,r.useCallback(((...e)=>t.current?.(...e)),[])};let o={};const c=[];function u(e,t){}function i(e,t){}function d(e,t,n){t||o[n]||(e(!1,n),o[n]=!0)}function f(e,t){d(u,e,t)}f.preMessage=e=>{c.push(e)},f.resetWarned=function(){o={}},f.noteOnce=function(e,t){d(i,e,t)};const E=f;var m=n(9109),h=n.n(m),g=n(3935);function v(e,t,n){return(e-t)/(n-t)}function p(e,t,n,r){const a=v(t,n,r),s={};switch(e){case"rtl":s.right=100*a+"%",s.transform="translateX(50%)";break;case"btt":s.bottom=100*a+"%",s.transform="translateY(50%)";break;case"ttb":s.top=100*a+"%",s.transform="translateY(-50%)";break;default:s.left=100*a+"%",s.transform="translateX(-50%)"}return s}function b(e,t){return Array.isArray(e)?e[t]:e}const y={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){const{keyCode:t}=e;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=y.F1&&t<=y.F12)return!1;switch(t){case y.ALT:case y.CAPS_LOCK:case y.CONTEXT_MENU:case y.CTRL:case y.DOWN:case y.END:case y.ESC:case y.HOME:case y.INSERT:case y.LEFT:case y.MAC_FF_META:case y.META:case y.NUMLOCK:case y.NUM_CENTER:case y.PAGE_DOWN:case y.PAGE_UP:case y.PAUSE:case y.PRINT_SCREEN:case y.RIGHT:case y.SHIFT:case y.UP:case y.WIN_KEY:case y.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=y.ZERO&&e<=y.NINE)return!0;if(e>=y.NUM_ZERO&&e<=y.NUM_MULTIPLY)return!0;if(e>=y.A&&e<=y.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case y.SPACE:case y.QUESTION_MARK:case y.NUM_PLUS:case y.NUM_MINUS:case y.NUM_PERIOD:case y.NUM_DIVISION:case y.SEMICOLON:case y.DASH:case y.EQUALS:case y.COMMA:case y.PERIOD:case y.SLASH:case y.APOSTROPHE:case y.SINGLE_QUOTE:case y.OPEN_SQUARE_BRACKET:case y.BACKSLASH:case y.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},C=y,M=r.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),N=r.createContext({});function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}const x=r.forwardRef(((e,t)=>{const{prefixCls:n,value:a,valueIndex:s,onStartMove:l,onDelete:o,style:c,render:u,dragging:i,draggingDelete:d,onOffsetChange:f,onChangeComplete:E,onFocus:m,onMouseEnter:g,...v}=e,{min:y,max:N,direction:x,disabled:O,keyboard:A,range:k,tabIndex:T,ariaLabelForHandle:I,ariaLabelledByForHandle:R,ariaRequired:_,ariaValueTextFormatterForHandle:U,styles:F,classNames:L}=r.useContext(M),P=`${n}-handle`,D=e=>{O||l(e,s)},w=p(x,a,y,N);let H={};null!==s&&(H={tabIndex:O?null:b(T,s),role:"slider","aria-valuemin":y,"aria-valuemax":N,"aria-valuenow":a,"aria-disabled":O,"aria-label":b(I,s),"aria-labelledby":b(R,s),"aria-required":b(_,s),"aria-valuetext":b(U,s)?.(a),"aria-orientation":"ltr"===x||"rtl"===x?"horizontal":"vertical",onMouseDown:D,onTouchStart:D,onFocus:e=>{m?.(e,s)},onMouseEnter:e=>{g(e,s)},onKeyDown:e=>{if(!O&&A){let t=null;switch(e.which||e.keyCode){case C.LEFT:t="ltr"===x||"btt"===x?-1:1;break;case C.RIGHT:t="ltr"===x||"btt"===x?1:-1;break;case C.UP:t="ttb"!==x?1:-1;break;case C.DOWN:t="ttb"!==x?-1:1;break;case C.HOME:t="min";break;case C.END:t="max";break;case C.PAGE_UP:t=2;break;case C.PAGE_DOWN:t=-2;break;case C.BACKSPACE:case C.DELETE:o?.(s)}null!==t&&(e.preventDefault(),f(t,s))}},onKeyUp:e=>{switch(e.which||e.keyCode){case C.LEFT:case C.RIGHT:case C.UP:case C.DOWN:case C.HOME:case C.END:case C.PAGE_UP:case C.PAGE_DOWN:E?.()}}});let K=r.createElement("div",S({ref:t,className:h()(P,{[`${P}-${s+1}`]:null!==s&&k,[`${P}-dragging`]:i,[`${P}-dragging-delete`]:d},L.handle),style:{...w,...c,...F.handle}},H,v));return u&&(K=u(K,{index:s,prefixCls:n,value:a,dragging:i,draggingDelete:d})),K}));function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}const A=r.forwardRef(((e,t)=>{const{prefixCls:n,style:a,onStartMove:s,onOffsetChange:l,values:o,handleRender:c,activeHandleRender:u,draggingIndex:i,draggingDelete:d,onFocus:f,...E}=e,m=r.useRef({}),[h,v]=r.useState(!1),[p,y]=r.useState(-1),C=e=>{y(e),v(!0)};r.useImperativeHandle(t,(()=>({focus:e=>{m.current[e]?.focus()},hideHelp:()=>{(0,g.flushSync)((()=>{v(!1)}))}})));const M={prefixCls:n,onStartMove:s,onOffsetChange:l,render:c,onFocus:(e,t)=>{C(t),f?.(e)},onMouseEnter:(e,t)=>{C(t)},...E};return r.createElement(r.Fragment,null,o.map(((e,t)=>{const n=i===t;return r.createElement(x,O({ref:e=>{e?m.current[t]=e:delete m.current[t]},dragging:n,draggingDelete:n&&d,style:b(a,t),key:t,value:e,valueIndex:t},M))})),u&&h&&r.createElement(x,O({key:"a11y"},M,{value:o[p],valueIndex:null,dragging:-1!==i,draggingDelete:d,render:u,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))})),k=e=>{const{prefixCls:t,style:n,children:a,value:s,onClick:l}=e,{min:o,max:c,direction:u,includedStart:i,includedEnd:d,included:f}=r.useContext(M),E=`${t}-text`,m=p(u,s,o,c);return r.createElement("span",{className:h()(E,{[`${E}-active`]:f&&i<=s&&s<=d}),style:{...m,...n},onMouseDown:e=>{e.stopPropagation()},onClick:()=>{l(s)}},a)},T=e=>{const{prefixCls:t,marks:n,onClick:a}=e,s=`${t}-mark`;return n.length?r.createElement("div",{className:s},n.map((({value:e,style:t,label:n})=>r.createElement(k,{key:e,prefixCls:s,style:t,value:e,onClick:a},n)))):null},I=e=>{const{prefixCls:t,value:n,style:a,activeStyle:s}=e,{min:l,max:o,direction:c,included:u,includedStart:i,includedEnd:d}=r.useContext(M),f=`${t}-dot`,E=u&&i<=n&&n<=d;let m={...p(c,n,l,o),..."function"==typeof a?a(n):a};return E&&(m={...m,..."function"==typeof s?s(n):s}),r.createElement("span",{className:h()(f,{[`${f}-active`]:E}),style:m})},R=e=>{const{prefixCls:t,marks:n,dots:a,style:s,activeStyle:l}=e,{min:o,max:c,step:u}=r.useContext(M),i=r.useMemo((()=>{const e=new Set;if(n.forEach((t=>{e.add(t.value)})),a&&null!==u){let t=o;for(;t<=c;)e.add(t),t+=u}return Array.from(e)}),[o,c,u,a,n]);return r.createElement("div",{className:`${t}-step`},i.map((e=>r.createElement(I,{prefixCls:t,key:e,value:e,style:s,activeStyle:l}))))},_=e=>{const{prefixCls:t,style:n,start:a,end:s,index:l,onStartMove:o,replaceCls:c}=e,{direction:u,min:i,max:d,disabled:f,range:E,classNames:m}=r.useContext(M),g=`${t}-track`,p=v(a,i,d),b=v(s,i,d),y=e=>{!f&&o&&o(e,-1)},C={};switch(u){case"rtl":C.right=100*p+"%",C.width=100*b-100*p+"%";break;case"btt":C.bottom=100*p+"%",C.height=100*b-100*p+"%";break;case"ttb":C.top=100*p+"%",C.height=100*b-100*p+"%";break;default:C.left=100*p+"%",C.width=100*b-100*p+"%"}const N=c||h()(g,{[`${g}-${l+1}`]:null!==l&&E,[`${t}-track-draggable`]:o},m.track);return r.createElement("div",{className:N,style:{...C,...n},onMouseDown:y,onTouchStart:y})},U=e=>{const{prefixCls:t,style:n,values:a,startPoint:s,onStartMove:l}=e,{included:o,range:c,min:u,styles:i,classNames:d}=r.useContext(M),f=r.useMemo((()=>{if(!c){if(0===a.length)return[];const e=s??u,t=a[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}const e=[];for(let t=0;t<a.length-1;t+=1)e.push({start:a[t],end:a[t+1]});return e}),[a,c,s,u]);if(!o)return null;const E=f?.length&&(d.tracks||i.tracks)?r.createElement(_,{index:null,prefixCls:t,start:f[0].start,end:f[f.length-1].end,replaceCls:h()(d.tracks,`${t}-tracks`),style:i.tracks}):null;return r.createElement(r.Fragment,null,E,f.map((({start:e,end:a},s)=>r.createElement(_,{index:s,prefixCls:t,style:{...b(n,s),...i.track},start:e,end:a,key:s,onStartMove:l}))))};function F(e){const t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}const L=r.forwardRef(((e,t)=>{const{prefixCls:n="rc-slider",className:a,style:o,classNames:c,styles:u,id:i,disabled:d=!1,keyboard:f=!0,autoFocus:m,onFocus:g,onBlur:v,min:p=0,max:b=100,step:y=1,value:C,defaultValue:S,range:x,count:O,onChange:k,onBeforeChange:I,onAfterChange:_,onChangeComplete:L,allowCross:P=!0,pushable:D=!1,reverse:w,vertical:H,included:K=!0,startPoint:$,trackStyle:G,handleStyle:W,railStyle:B,dotStyle:j,activeDotStyle:V,marks:Y,dots:X,handleRender:Q,activeHandleRender:Z,track:q,tabIndex:z=0,ariaLabelForHandle:J,ariaLabelledByForHandle:ee,ariaRequired:te,ariaValueTextFormatterForHandle:ne}=e,re=r.useRef(null),ae=r.useRef(null),se=r.useMemo((()=>H?w?"ttb":"btt":w?"rtl":"ltr"),[w,H]),[le,oe,ce,ue,ie]=function(e){return(0,r.useMemo)((()=>{if(!0===e||!e)return[!!e,!1,!1,0];const{editable:t,draggableTrack:n,minCount:r,maxCount:a}=e;return[!0,t,!t&&n,r||0,a]}),[e])}(x),de=r.useMemo((()=>isFinite(p)?p:0),[p]),fe=r.useMemo((()=>isFinite(b)?b:100),[b]),Ee=r.useMemo((()=>null!==y&&y<=0?1:y),[y]),me=r.useMemo((()=>"boolean"==typeof D?!!D&&Ee:D>=0&&D),[D,Ee]),he=r.useMemo((()=>Object.keys(Y||{}).map((e=>{const t=Y[e],n={value:Number(e)};return t&&"object"==typeof t&&!r.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((({label:e})=>e||"number"==typeof e)).sort(((e,t)=>e.value-t.value))),[Y]),[ge,ve]=function(e,t,n,a,s,l){const o=r.useCallback((n=>Math.max(e,Math.min(t,n))),[e,t]),c=r.useCallback((r=>{if(null!==n){const a=e+Math.round((o(r)-e)/n)*n,s=e=>(String(e).split(".")[1]||"").length,l=Math.max(s(n),s(t),s(e)),c=Number(a.toFixed(l));return e<=c&&c<=t?c:null}return null}),[n,e,t,o]),u=r.useCallback((r=>{const s=o(r),l=a.map((e=>e.value));null!==n&&l.push(c(r)),l.push(e,t);let u=l[0],i=t-e;return l.forEach((e=>{const t=Math.abs(s-e);t<=i&&(u=e,i=t)})),u}),[e,t,a,n,o,c]),i=(r,s,l,o="unit")=>{if("number"==typeof s){let u;const d=r[l],f=d+s;let E=[];a.forEach((e=>{E.push(e.value)})),E.push(e,t),E.push(c(d));const m=s>0?1:-1;"unit"===o?E.push(c(d+m*n)):E.push(c(f)),E=E.filter((e=>null!==e)).filter((e=>s<0?e<=d:e>=d)),"unit"===o&&(E=E.filter((e=>e!==d)));const h="unit"===o?d:f;u=E[0];let g=Math.abs(u-h);if(E.forEach((e=>{const t=Math.abs(e-h);t<g&&(u=e,g=t)})),void 0===u)return s<0?e:t;if("dist"===o)return u;if(Math.abs(s)>1){const e=[...r];return e[l]=u,i(e,s-m,l,o)}return u}return"min"===s?e:"max"===s?t:void 0},d=(e,t,n,r="unit")=>{const a=e[n],s=i(e,t,n,r);return{value:s,changed:s!==a}},f=e=>null===l&&0===e||"number"==typeof l&&e<l;return[u,(e,t,n,r="unit")=>{const a=e.map(u),o=a[n],c=i(a,t,n,r);if(a[n]=c,!1===s){const e=l||0;n>0&&a[n-1]!==o&&(a[n]=Math.max(a[n],a[n-1]+e)),n<a.length-1&&a[n+1]!==o&&(a[n]=Math.min(a[n],a[n+1]-e))}else if("number"==typeof l||null===l){for(let e=n+1;e<a.length;e+=1){let t=!0;for(;f(a[e]-a[e-1])&&t;)({value:a[e],changed:t}=d(a,1,e))}for(let e=n;e>0;e-=1){let t=!0;for(;f(a[e]-a[e-1])&&t;)({value:a[e-1],changed:t}=d(a,-1,e-1))}for(let e=a.length-1;e>0;e-=1){let t=!0;for(;f(a[e]-a[e-1])&&t;)({value:a[e-1],changed:t}=d(a,-1,e-1))}for(let e=0;e<a.length-1;e+=1){let t=!0;for(;f(a[e+1]-a[e])&&t;)({value:a[e+1],changed:t}=d(a,1,e+1))}}return{value:a[n],values:a}}]}(de,fe,Ee,he,P,me),[pe,be]=function(e,t){const[n,a]=(0,r.useState)(e),l=void 0!==t?t:n;return s((e=>{e||a(t)}),[t]),[l,a]}(S,C),ye=r.useMemo((()=>{const e=null==pe?[]:Array.isArray(pe)?pe:[pe],[t=de]=e;let n=null===pe?[]:[t];if(le){if(n=[...e],O||void 0===pe){const e=O>=0?O+1:2;for(n=n.slice(0,e);n.length<e;)n.push(n[n.length-1]??de)}n.sort(((e,t)=>e-t))}return n.forEach(((e,t)=>{n[t]=ge(e)})),n}),[pe,le,de,O,ge]),Ce=e=>le?e:e[0],Me=l((e=>{const t=[...e].sort(((e,t)=>e-t));k&&!function(e,t,n=!1){const r=new Set;return function e(t,a,s=1){const l=r.has(t);if(E(!l,"Warning: There may be circular references"),l)return!1;if(t===a)return!0;if(n&&s>1)return!1;r.add(t);const o=s+1;if(Array.isArray(t)){if(!Array.isArray(a)||t.length!==a.length)return!1;for(let n=0;n<t.length;n++)if(!e(t[n],a[n],o))return!1;return!0}if(t&&a&&"object"==typeof t&&"object"==typeof a){const n=Object.keys(t);return n.length===Object.keys(a).length&&n.every((n=>e(t[n],a[n],o)))}return!1}(e,t)}(t,ye,!0)&&k(Ce(t)),be(t)})),Ne=l((e=>{e&&re.current.hideHelp();const t=Ce(ye);_?.(t),E(!_,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),L?.(t)})),[Se,xe,Oe,Ae,ke]=function(e,t,n,a,o,c,u,i,d,f,E){const[m,h]=r.useState(null),[g,v]=r.useState(-1),[p,b]=r.useState(!1),[y,C]=r.useState(n),[M,S]=r.useState(n),x=r.useRef(null),O=r.useRef(null),A=r.useRef(null),{onDragStart:k,onDragChange:T}=r.useContext(N);s((()=>{-1===g&&C(n)}),[n,g]),r.useEffect((()=>()=>{document.removeEventListener("mousemove",x.current),document.removeEventListener("mouseup",O.current),A.current&&(A.current.removeEventListener("touchmove",x.current),A.current.removeEventListener("touchend",O.current))}),[]);const I=(e,t,n)=>{void 0!==t&&h(t),C(e);let r=e;n&&(r=e.filter(((e,t)=>t!==g))),u(r),T&&T({rawValues:e,deleteIndex:n?g:-1,draggingIndex:g,draggingValue:t})},R=l(((e,t,n)=>{if(-1===e){const e=M[0],n=M[M.length-1],r=a-e,s=o-n;let l=t*(o-a);l=Math.max(l,r),l=Math.min(l,s);const u=c(e+l);l=u-e;const i=M.map((e=>e+l));I(i)}else{const r=(o-a)*t,s=[...y];s[e]=M[e];const l=d(s,r,e,"dist");I(l.values,l.value,n)}})),_=r.useMemo((()=>{const e=[...n].sort(((e,t)=>e-t)),t=[...y].sort(((e,t)=>e-t)),r={};t.forEach((e=>{r[e]=(r[e]||0)+1})),e.forEach((e=>{r[e]=(r[e]||0)-1}));const a=f?1:0;return Object.values(r).reduce(((e,t)=>e+Math.abs(t)),0)<=a?y:n}),[n,y,f]);return[g,m,p,_,(r,a,s)=>{r.stopPropagation();const l=s||n,o=l[a];v(a),h(o),S(l),C(l),b(!1);const{pageX:c,pageY:u}=F(r);let d=!1;k&&k({rawValues:l,draggingIndex:a,draggingValue:o});const m=n=>{n.preventDefault();const{pageX:r,pageY:s}=F(n),l=r-c,o=s-u,{width:i,height:m}=e.current.getBoundingClientRect();let h,g;switch(t){case"btt":h=-o/m,g=l;break;case"ttb":h=o/m,g=l;break;case"rtl":h=-l/i,g=o;break;default:h=l/i,g=o}d=!!f&&Math.abs(g)>130&&E<y.length,b(d),R(a,h,d)},g=e=>{e.preventDefault(),document.removeEventListener("mouseup",g),document.removeEventListener("mousemove",m),A.current&&(A.current.removeEventListener("touchmove",x.current),A.current.removeEventListener("touchend",O.current)),x.current=null,O.current=null,A.current=null,i(d),v(-1),b(!1)};document.addEventListener("mouseup",g),document.addEventListener("mousemove",m),r.currentTarget.addEventListener("touchend",g),r.currentTarget.addEventListener("touchmove",m),x.current=m,O.current=g,A.current=r.currentTarget}]}(ae,se,ye,de,fe,ge,Me,Ne,ve,oe,ue),Te=(e,t)=>{if(!d){const n=[...ye];let r=0,a=0,s=fe-de;ye.forEach(((t,n)=>{const l=Math.abs(e-t);l<=s&&(s=l,r=n),t<e&&(a=n)}));let l=r;oe&&0!==s&&(!ie||ye.length<ie)?(n.splice(a+1,0,e),l=a+1):n[r]=e,le&&!ye.length&&void 0===O&&n.push(e);const o=Ce(n);I?.(o),Me(n),t?(document.activeElement?.blur?.(),re.current.focus(l),ke(t,l,n)):(_?.(o),E(!_,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),L?.(o))}},[Ie,Re]=r.useState(null);r.useEffect((()=>{if(null!==Ie){const e=ye.indexOf(Ie);e>=0&&re.current.focus(e)}Re(null)}),[Ie]);const _e=r.useMemo((()=>(!ce||null!==Ee)&&ce),[ce,Ee]),Ue=l(((e,t)=>{ke(e,t),I?.(Ce(ye))})),Fe=-1!==Se;r.useEffect((()=>{if(!Fe){const e=ye.lastIndexOf(xe);re.current.focus(e)}}),[Fe]);const Le=r.useMemo((()=>[...Ae].sort(((e,t)=>e-t))),[Ae]),[Pe,De]=r.useMemo((()=>le?[Le[0],Le[Le.length-1]]:[de,Le[0]]),[Le,le,de]);r.useImperativeHandle(t,(()=>({focus:()=>{re.current.focus(0)},blur:()=>{const{activeElement:e}=document;ae.current?.contains(e)&&e?.blur()}}))),r.useEffect((()=>{m&&re.current.focus(0)}),[]);const we=r.useMemo((()=>({min:de,max:fe,direction:se,disabled:d,keyboard:f,step:Ee,included:K,includedStart:Pe,includedEnd:De,range:le,tabIndex:z,ariaLabelForHandle:J,ariaLabelledByForHandle:ee,ariaRequired:te,ariaValueTextFormatterForHandle:ne,styles:u||{},classNames:c||{}})),[de,fe,se,d,f,Ee,K,Pe,De,le,z,J,ee,te,ne,u,c]);return r.createElement(M.Provider,{value:we},r.createElement("div",{ref:ae,className:h()(n,a,{[`${n}-disabled`]:d,[`${n}-vertical`]:H,[`${n}-horizontal`]:!H,[`${n}-with-marks`]:he.length}),style:o,onMouseDown:e=>{e.preventDefault();const{width:t,height:n,left:r,top:a,bottom:s,right:l}=ae.current.getBoundingClientRect(),{clientX:o,clientY:c}=e;let u;switch(se){case"btt":u=(s-c)/n;break;case"ttb":u=(c-a)/n;break;case"rtl":u=(l-o)/t;break;default:u=(o-r)/t}Te(ge(de+u*(fe-de)),e)},id:i},r.createElement("div",{className:h()(`${n}-rail`,c?.rail),style:{...B,...u?.rail}}),!1!==q&&r.createElement(U,{prefixCls:n,style:G,values:ye,startPoint:$,onStartMove:_e?Ue:void 0}),r.createElement(R,{prefixCls:n,marks:he,dots:X,style:j,activeStyle:V}),r.createElement(A,{ref:re,prefixCls:n,style:W,values:Ae,draggingIndex:Se,draggingDelete:Oe,onStartMove:Ue,onOffsetChange:(e,t)=>{if(!d){const n=ve(ye,e,t);I?.(Ce(ye)),Me(n.values),Re(n.value)}},onFocus:g,onBlur:v,handleRender:Q,activeHandleRender:Z,onChangeComplete:Ne,onDelete:oe?e=>{if(d||!oe||ye.length<=ue)return;const t=[...ye];t.splice(e,1),I?.(Ce(t)),Me(t);const n=Math.max(0,e-1);re.current.hideHelp(),re.current.focus(n)}:void 0}),r.createElement(T,{prefixCls:n,marks:he,onClick:Te})))}))},9109:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var l=a.apply(null,n);l&&e.push(l)}}else if("object"===s){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var o in n)r.call(n,o)&&n[o]&&e.push(o)}}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[102],{1587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(5944),o=r(7294),i=r(8776),a=r(5096),l=r(2988),u=r(4665),c=r(7449),s=r(9479),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)};function d(e){var t=e.id,r=e.text,d=e.responsiveStyles,p=e.absolute,v=void 0===p||p,h=e.containerRef,g=e.repeat,y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(!1),2),b=y[0],m=y[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,g)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",f({ref:w,onMouseEnter:x?void 0:function(){return m(!0)},onMouseLeave:x?void 0:function(){return m(!1)},onFocus:function(){return m(!0)},onBlur:function(){return m(!1)},onClick:function(){return m((function(e){return!e}))},css:v?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:l.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,n.tZ)(a.by,{cssStyles:d.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,f({show:b,targetRef:w,containerRef:h,placement:"left",onHide:function(){return m(!1)},offset:8},{children:(0,n.tZ)(i.u,f({id:"tooltip-".concat(t),css:{zIndex:l.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:r}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(5944),o=r(7294),i=r(3935),a=r(9479),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};const u=function(e){var t=e.show,r=e.targetRef,u=e.children,f=e.onHide,d=e.placement,p=void 0===d?"bottom-start":d,v=e.offset,h=void 0===v?0:v,g=e.zIndex,y=void 0===g?1e3:g,b=e.containerRef,m=(0,o.useRef)(null),w=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(null),2),x=w[0],S=w[1],E=(0,o.useCallback)((function(){return(null==b?void 0:b.current)||(0,a.me)().body}),[b]),k=(0,o.useCallback)((function(){var e;if(t&&r.current&&m.current){var n=(0,a.Kv)(),o=E();if(o){var i=r.current.getBoundingClientRect(),l=m.current.getBoundingClientRect(),u=o.getBoundingClientRect(),f=s(p,i,l,h),d=f.top,v=f.left,g=d+l.height,y=v+l.width,b=d>=0&&g<=n.innerHeight,w=v>=0&&y<=n.innerWidth;if(!b||!w){var x=c(p,!b,!w);x!==p&&(d=(e=s(x,i,l,h)).top,v=e.left)}var k=o===(0,a.me)().body,O=k?d+n.scrollY:d-u.top,Z=k?v+n.scrollX:v-u.left;S((function(e){return e&&e.top===O&&e.left===Z?e:{top:O,left:Z}}))}}}),[t,p,h,E,r]),O=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){k(),e=!1})))}}),[k])();if((0,o.useLayoutEffect)((function(){t&&k()}),[t,k]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=E();if(n){e.addEventListener("resize",O),e.addEventListener("scroll",O,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",O);var o=new ResizeObserver((function(){return O()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",O),e.removeEventListener("scroll",O,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",O),o.disconnect()}}}}),[t,O,E,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(S(null),null==f||f())},n=function(e){var t=e.target;m.current&&!m.current.contains(t)&&r.current&&!r.current.contains(t)&&(S(null),null==f||f())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,f,r]),!t)return null;var Z=E();return Z?(0,i.createPortal)((0,n.tZ)("div",l({ref:m,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:y})},{children:u})),Z):(0,n.tZ)(n.HY,{children:u})};var c=function(e,t,r){if(t){if(e.includes("top"))return e.replace("top","bottom");if(e.includes("bottom"))return e.replace("bottom","top")}if(r){if(e.includes("left"))return e.replace("left","right");if(e.includes("right"))return e.replace("right","left")}return e},s=function(e,t,r,n){switch(void 0===n&&(n=0),e){case"top":return{top:t.top-r.height-n,left:t.left+(t.width-r.width)/2};case"top-start":return{top:t.top-r.height-n,left:t.left};case"top-end":return{top:t.top-r.height-n,left:t.right-r.width};case"left":return{top:t.top+(t.height-r.height)/2,left:t.left-r.width-n};case"left-start":return{top:t.top,left:t.left-r.width-n};case"left-end":return{top:t.bottom-r.height,left:t.left-r.width-n};case"bottom":default:return{top:t.bottom+n,left:t.left+(t.width-r.width)/2};case"bottom-start":return{top:t.bottom+n,left:t.left};case"bottom-end":return{top:t.bottom+n,left:t.right-r.width};case"right":return{top:t.top+(t.height-r.height)/2,left:t.right+n};case"right-start":return{top:t.top,left:t.right+n};case"right-end":return{top:t.bottom-r.height,left:t.right+n}}}},9069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(5944),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e){var t,r,i,a=e.value,l=e.element,u=e.responsiveStyles,c=e.type,s=void 0===c?"input":c,f=e.inputFocused,d=void 0!==f&&f,p=e.repeatIndex,v=void 0===p?null:p,h=l.properties,g=null!==(i=(null!==(r=h.repeat_placeholder)&&void 0!==r?r:[])[null!=v?v:0])&&void 0!==i?i:h.placeholder||"",y=o(o({},u.getTarget("placeholderFocus")),u.getTarget("placeholderActive"));return(0,n.tZ)("span",o({css:o(o(o(o({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===s?"50%":"0.6rem"},u.getTarget("placeholder")),a?u.getTarget("placeholderFocus"):{}),d?y:{}),(t={},t["".concat(s,":focus ~ &")]=y,t))},{children:g}))}},8776:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(5944),o=r(2988),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(e){var t=e.children,r=e.css,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","css"]);return(0,n.tZ)("div",i({css:i({zIndex:o.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}},r)},a,{children:(0,n.tZ)("div",i({className:"tooltip-inner"},{children:t}))}))}},5024:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var n=r(5944),o=r(7294),i=r(9069),a=r(1587),l=r(1211),u=r(9292),c=r(1296),s=r.n(c),f=r(6867),d=r(7449),p=r(1275),v=r(9479),h=r(5398),g=function(){return g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};const b=(0,o.memo)((function(e){var t=this,r=e.element,c=e.responsiveStyles,b=e.fieldLabel,m=e.elementProps,w=void 0===m?{}:m,x=e.disabled,S=void 0!==x&&x,E=e.autoComplete,k=e.editMode,O=e.repeatIndex,Z=void 0===O?null:O,R=e.onSelect,L=void 0===R?function(){}:R,C=e.onChange,T=void 0===C?function(){}:C,z=e.required,I=e.onBlur,j=void 0===I?function(){}:I,B=e.onEnter,P=void 0===B?function(){}:B,_=e.setRef,F=void 0===_?function(){}:_,M=e.value,H=void 0===M?"":M,X=e.inlineError,q=e.children,A=r.servar,K=function(e,t){var r,n=t.metadata,i=n.address_autocomplete,a=null!==(r=n.autocomplete_country)&&void 0!==r?r:"",l=function(){var e=(0,o.useRef)(!0);return(0,o.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}(),c=y((0,o.useState)(e),2),f=c[0],d=c[1],p=y((0,o.useState)([]),2),v=p[0],h=p[1],g=(0,o.useCallback)(s()((function(e){(new u.ZP).addressSearchResults(e,a,"gmap_city"===t.type).then((function(t){l.current&&(h(t),d(e))}))}),500),[h,d]);return(0,o.useEffect)((function(){var t=e.trim();i&&t!==f&&(t.length>3?g(t):(v.length&&h([]),d(t)))}),[e]),v}(H,A),W=y((0,o.useState)(!1),2),Y=W[0],D=W[1],G=y((0,o.useState)(!1),2),N=G[0],J=G[1],Q=(0,o.useRef)(null),U=(0,o.useRef)(null),V=(0,o.useRef)(null),$=(0,h.Z)(V).width,ee=(0,f.Z)({element:r,error:X,breakpoint:c.getMobileBreakpoint()}),te=ee.borderStyles,re=ee.customBorder,ne="gmap_city"===A.type?"address-level2":"street-address";return(0,n.BX)("div",g({ref:U,css:g({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:k?"none":"auto"},c.getTarget("fc"))},w,{children:[q,b,(0,n.BX)("div",g({ref:V,css:g(g(g({position:"relative",width:"100%",overflowX:"clip"},c.getTarget("sub-fc")),S?c.getTarget("disabled"):{}),{"&:hover":(0,v.wL)(S?{}:g(g({},c.getTarget("hover")),te.hover)),"&&":N?g(g({},c.getTarget("active")),te.active):{}})},{children:[re,(0,n.tZ)("input",{id:A.key,name:A.key,css:g(g(g({position:"relative",height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),c.getTarget("field")),N||H||!r.properties.placeholder?{}:{color:"transparent !important"}),maxLength:A.max_length,minLength:A.min_length,placeholder:"",disabled:S,"aria-label":r.properties.aria_label,autoComplete:"on"===E?ne:"new-password",value:H,ref:function(e){Q.current=e,F(e)},onKeyDown:function(e){var t;t=e,Boolean(t.isTrusted&&t.code)&&("Enter"===e.key?P(e):D("Escape"!==e.key))},onFocus:function(e){J(!0),(0,v.ms)(e)},onBlur:function(e){setTimeout((function(){return D(!1)}),200),j(e),J(!1)},onChange:T,required:z}),(0,n.tZ)(d.Z,g({show:Y&&K.length>0,targetRef:Q,containerRef:U,placement:"bottom-start",offset:4,onHide:function(){return D(!1)}},{children:(0,n.tZ)("ul",g({css:g({zIndex:p.m6,listStyleType:"none",padding:0,margin:0,backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)",width:void 0!==$?"".concat($,"px"):"100%"},c.getTarget("dropdown"))},{children:K.map((function(e){var r=e.display,o=e.address_id;return(0,n.tZ)("li",g({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":(0,v.wL)({backgroundColor:"#e6e6e633"})},onClick:function(){return e=t,r=void 0,i=function(){var e,t;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,(function(r){switch(r.label){case 0:return[4,(new u.ZP).addressDetail(o)];case 1:return e=r.sent(),L(e,o),D(!1),null===(t=Q.current)||void 0===t||t.focus(),[2]}}))},new((n=void 0)||(n=Promise))((function(t,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function l(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,l)}u((i=i.apply(e,r||[])).next())}));var e,r,n,i}},{children:r}),r)}))}))})),(0,n.tZ)(i.Z,{value:H,element:r,responsiveStyles:c,repeatIndex:Z}),(0,n.tZ)(a.Z,{containerRef:U,id:r.id,text:r.properties.tooltipText,responsiveStyles:c,repeat:r.repeat})]}))]}))}))},5398:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(7294),o=r(9479);function i(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,n.useState)({width:void 0,height:void 0}),2),r=t[0],i=t[1];return(0,n.useLayoutEffect)((function(){var t=function(){var t=e.current;if(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;i({width:n>0?n:void 0,height:o>0?o:void 0})}},r=e.current;if(r){if("undefined"==typeof ResizeObserver){var n=(0,o.Kv)();return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener?(n.addEventListener("resize",t),t(),function(){return n.removeEventListener("resize",t)}):void t()}var a=new ResizeObserver((function(){return t()}));try{a.observe(r,{box:"border-box"})}catch(e){a.observe(r)}return t(),function(){return a.disconnect()}}}),[e]),r}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[917],{9649:(e,t,n)=>{n.r(t),n.d(t,{default:()=>et});var r=n(5944),o=n(7294),i=n(1247),a=n(4790),l=n(4438),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)},s=function(e){return(0,r.tZ)("svg",u({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e,{children:(0,r.tZ)("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}))},c=function(e){return(0,r.tZ)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:(0,r.tZ)("path",{d:"m6 9 6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))},d=function(e){return(0,r.BX)("svg",u({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("path",{d:"m22 2-7 20-4-9-9-4 20-7z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.tZ)("path",{d:"m22 2-11 11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},p=function(e){return(0,r.BX)("svg",u({width:"16",height:"16",style:{borderRadius:"50%"},viewBox:"0 0 50 50"},e,{children:[(0,r.tZ)("circle",{cx:25,cy:25,r:22.5,style:{fill:"none",stroke:"#f5cbcb",strokeWidth:3,opacity:1}}),(0,r.tZ)("circle",{cx:25,cy:25,r:22.5,style:{fill:"none",stroke:"#e2626e",strokeWidth:3,opacity:1,strokeLinecap:"round",transformOrigin:"50% 50%",transform:"rotate3d(0,0,1,0deg)",animation:"2156ms ease-in-out 0s infinite normal none running feathery-spinner-arc,1829ms linear 0s infinite normal none running feathery-spinner-rotate"}})]}))},f=function(e){return(0,r.BX)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("path",{d:"M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.tZ)("path",{d:"m6 6 12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(e){return(0,r.tZ)("svg",u({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none"},e,{children:(0,r.tZ)("polyline",{points:"20 6 9 17 4 12",stroke:"#10b981",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))},v=function(e){return(0,r.tZ)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:(0,r.tZ)("path",{d:"m6 9 6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))},y=function(e){return(0,r.BX)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,r.tZ)("rect",{x:"12",y:"12",width:"7",height:"7",rx:"1",stroke:"currentColor",strokeWidth:"2"})]}))},g=function(e){return(0,r.BX)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,r.tZ)("path",{d:"M9 3v18",stroke:"currentColor",strokeWidth:"2"})]}))},m=function(e){return(0,r.BX)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,r.tZ)("path",{d:"M15 3v18",stroke:"currentColor",strokeWidth:"2"})]}))},b=function(e){return(0,r.BX)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("path",{d:"M4 9V5a1 1 0 0 1 1-1h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.tZ)("path",{d:"M20 9V5a1 1 0 0 0-1-1h-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.tZ)("path",{d:"M4 15v4a1 1 0 0 0 1 1h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.tZ)("path",{d:"M20 15v4a1 1 0 0 1-1 1h-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},x=function(e){return(0,r.tZ)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:(0,r.tZ)("path",{d:"M5 12h14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}))},k=function(e){return(0,r.BX)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("path",{d:"m11 17-5-5 5-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.tZ)("path",{d:"m18 17-5-5 5-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},w=function(e){return(0,r.BX)("svg",u({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("path",{d:"m6 17 5-5-5-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.tZ)("path",{d:"m13 17 5-5-5-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},S=function(e){return(0,r.BX)("svg",u({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},e,{children:[(0,r.tZ)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.tZ)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},C="#6b7280",Z="#f9fafb",_="#e5e7eb",A="#9ca3af",L="#6b7280",j="#1f2937",B="#ef4444",T=function(e,t){var n=parseInt(e.replace("#",""),16),r=Math.min(255,Math.max(0,(n>>16)+Math.round(2.55*t))),o=Math.min(255,Math.max(0,(n>>8&255)+Math.round(2.55*t))),i=Math.min(255,Math.max(0,(255&n)+Math.round(2.55*t)));return"#".concat((r<<16|o<<8|i).toString(16).padStart(6,"0"))},I=function(){return I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},I.apply(this,arguments)},W=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},z=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},E={searchDocuments:{running:"Searching documents...",done:"Searched the documents"},searchWeb:{running:"Searching the web...",done:"Searched the web"},scrapeUrl:{running:"Reading web page...",done:"Read the web page"},getPanelSnapshot:{running:"Reading the form...",done:"Reviewed the form"},getFuserSnapshot:{running:"Looking up your submission...",done:"Reviewed the submission"},listFormExtractions:{running:"Looking up extractions...",done:"Reviewed available extractions"},getExtractionSnapshot:{running:"Reading extraction setup...",done:"Reviewed the extraction setup"},getExtractionResults:{running:"Reading extraction results...",done:"Reviewed the extraction results"},setFieldValue:{running:"Updating form fields...",done:"Updated form fields"},clickElement:{running:"Just a moment...",done:"Triggered a form action"},getLogicRules:{running:"Reading form logic...",done:"Reviewed form logic"}},O=function(e){try{var t=new URL(e);return t.hostname+("/"!==t.pathname?t.pathname:"")}catch(t){return e}},R=function(e){if(!e||"object"!=typeof e)return[];var t=e,n=[],r=function(e){return e.map((function(e){return"object"==typeof e&&null!==e&&e.url||""})).filter(Boolean)};return Array.isArray(t.web)&&n.push.apply(n,z([],W(r(t.web)),!1)),Array.isArray(t.news)&&n.push.apply(n,z([],W(r(t.news)),!1)),Array.isArray(t.images)&&n.push.apply(n,z([],W(r(t.images)),!1)),"string"==typeof t.url&&t.url&&n.push(t.url),n.length>0?Array.from(new Set(n)):Array.isArray(e)?Array.from(new Set(r(e))):[]},M=function(e){return"input-streaming"===e||"input-available"===e},F=function(e){return"output-error"===e.state||"object"==typeof e.output&&null!==e.output&&!1===e.output.ok},X=function(e){var t,n=e.row,o=e.linkColor,i=e.indent,a=void 0===i?24:i,l=null===(t=n.input)||void 0===t?void 0:t.query,u=R(n.output);return l||u.length>0?(0,r.BX)("div",I({css:{display:"flex",flexDirection:"column",gap:"4px",paddingLeft:"".concat(a,"px"),marginTop:"2px",marginBottom:"4px"}},{children:[l&&(0,r.BX)("div",I({css:{color:A,fontSize:"12px",fontStyle:"italic"}},{children:['"',l.length>80?l.substring(0,80)+"...":l,'"']})),u.map((function(e,t){return(0,r.BX)("a",I({href:e,target:"_blank",rel:"noopener noreferrer",css:{fontSize:"12px",color:o,textDecoration:"none",display:"flex",alignItems:"center",gap:"4px",minWidth:0,":hover":{textDecoration:"underline"}}},{children:[(0,r.tZ)(S,{css:{flexShrink:0}}),(0,r.tZ)("span",I({css:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{children:O(e)}))]}),t)}))]})):null},K=function(e){var t;return!!(null===(t=e.input)||void 0===t?void 0:t.query)||R(e.output).length>0},D=function(e){var t,n,r=E[e.toolName]||{running:"Working...",done:"Done"};return M(e.state)?r.running:F(e)?null!==(t=r.done)&&void 0!==t?t:"Failed":null!==(n=r.done)&&void 0!==n?n:r.running},N={backgroundImage:"linear-gradient(90deg, ".concat(L," 25%, #d1d5db 50%, ").concat(L," 75%)"),backgroundSize:"220% 100%",backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",animation:"feathery-tool-shimmer 1.6s linear infinite","@keyframes feathery-tool-shimmer":{from:{backgroundPosition:"160% 0"},to:{backgroundPosition:"-60% 0"}}},P=function(e){var t=e.rows,n=e.followedByText,i=e.turnFinished,a=e.linkColor,l=void 0===a?C:a,u=e.isFirstChunk,s=void 0!==u&&u,d=t.some((function(e){return M(e.state)})),p=!d&&(n||i),h=!(!d&&n),v=W((0,o.useState)(null),2),y=v[0],g=v[1],m=null!=y?y:h,b=function(){return g(!m)},x=I({display:"flex",flexDirection:"column",gap:"2px",fontSize:"13px",minWidth:0,paddingLeft:"".concat(14,"px")},s?{}:{animation:"feathery-chunk-fade-in 220ms ease-out both","@keyframes feathery-chunk-fade-in":{from:{opacity:0,transform:"translateY(4px)"},to:{opacity:1,transform:"translateY(0)"}}});if(p&&1===t.length){var k=t[0],w=F(k),S=K(k);return(0,r.BX)("div",I({css:x},{children:[(0,r.BX)("button",I({type:"button",onClick:S?b:void 0,css:{display:"inline-flex",alignItems:"center",gap:"6px",background:"none",border:"none",padding:"4px 0",cursor:S?"pointer":"default",color:L,textAlign:"left",font:"inherit",fontSize:"13px",alignSelf:"flex-start"}},{children:[w&&(0,r.tZ)(f,{css:{width:"12px",height:"12px",color:B}}),(0,r.tZ)("span",{children:D(k)}),S&&(0,r.tZ)(c,{css:{width:"12px",height:"12px",color:A,transform:m?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.2s ease",flexShrink:0}})]})),S&&m&&(0,r.tZ)(X,{row:k,linkColor:l,indent:6})]}))}var Z=p?"Finished working":"Working on it...";return(0,r.BX)("div",I({css:x},{children:[(0,r.BX)("button",I({type:"button",onClick:b,css:{display:"inline-flex",alignItems:"center",gap:"6px",background:"none",border:"none",padding:"4px 0",cursor:"pointer",color:L,textAlign:"left",font:"inherit",fontSize:"13px",alignSelf:"flex-start"}},{children:[(0,r.tZ)("span",I({css:p?void 0:N},{children:Z})),(0,r.tZ)(c,{css:{width:"12px",height:"12px",color:A,transform:m?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.2s ease",flexShrink:0}})]})),m&&(0,r.tZ)("div",I({css:{display:"flex",flexDirection:"column",gap:"2px",marginLeft:"5px",paddingLeft:"13px",borderLeft:"2px solid ".concat(_)}},{children:t.map((function(e){return(0,r.tZ)(V,{row:e,linkColor:l},e.key)}))}))]}))},V=function(e){var t=e.row,n=e.linkColor,i=K(t),a=M(t.state),l=F(t),u=W((0,o.useState)(null),2),s=u[0],d=u[1],v=null!=s?s:a,y=i?"button":"div";return(0,r.BX)("div",I({css:{display:"flex",flexDirection:"column",gap:"2px"}},{children:[(0,r.BX)(y,I({type:i?"button":void 0,onClick:i?function(){return d(!v)}:void 0,css:{display:"inline-flex",alignItems:"center",gap:"6px",color:l?B:L,background:"none",border:"none",padding:"2px 0",textAlign:"left",cursor:i?"pointer":"default",font:"inherit",fontSize:"13px",alignSelf:"flex-start"}},{children:[a?(0,r.tZ)(p,{css:{width:"12px",height:"12px"}}):l?(0,r.tZ)(f,{css:{width:"12px",height:"12px"}}):(0,r.tZ)(h,{css:{width:"12px",height:"12px"}}),(0,r.tZ)("span",I({css:a?N:void 0},{children:D(t)})),i&&(0,r.tZ)(c,{css:{width:"10px",height:"10px",color:A,transform:v?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.2s ease",flexShrink:0}})]})),i&&v&&(0,r.tZ)(X,{row:t,linkColor:n})]}))},q=function(){return(0,r.tZ)("div",I({css:{display:"flex",flexDirection:"column",gap:"2px",fontSize:"13px",minWidth:0,paddingLeft:"14px",animation:"feathery-chunk-fade-in 220ms ease-out both","@keyframes feathery-chunk-fade-in":{from:{opacity:0,transform:"translateY(4px)"},to:{opacity:1,transform:"translateY(0)"}}}},{children:(0,r.tZ)("div",I({css:{padding:"4px 0",color:L,fontSize:"13px",alignSelf:"flex-start"}},{children:(0,r.tZ)("span",I({css:N},{children:"Working on it..."}))}))}))},Y=n(917),H=n(4123),U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},U.apply(this,arguments)},J=(0,Y.iv)({color:"#2563eb",fontWeight:400,textDecoration:"underline",textUnderlineOffset:"0.12em",textDecorationSkipInk:"auto",overflowWrap:"break-word","&:visited":{color:"#6d28d9"},"&:hover":{color:"#1d4ed8"}}),G=(0,Y.iv)('\n & p,\n & [data-streamdown="ordered-list"],\n & [data-streamdown="unordered-list"],\n & [data-streamdown="blockquote"],\n & [data-streamdown="code-block"],\n & [data-streamdown^="heading-"],\n & [data-streamdown="horizontal-rule"] {\n margin-top: 0 !important;\n margin-bottom: 0.6em !important;\n }\n & > *:last-child,\n & p:last-child,\n & [data-streamdown="ordered-list"]:last-child,\n & [data-streamdown="unordered-list"]:last-child,\n & [data-streamdown="blockquote"]:last-child,\n & [data-streamdown="code-block"]:last-child,\n & [data-streamdown^="heading-"]:last-child {\n margin-bottom: 0 !important;\n }\n\n & [data-streamdown="strong"],\n & strong,\n & b {\n font-weight: 600 !important;\n }\n & em,\n & i {\n font-style: italic !important;\n }\n\n & [data-streamdown="heading-1"] {\n font-size: 1.25em !important;\n font-weight: 600 !important;\n }\n & [data-streamdown="heading-2"] {\n font-size: 1.15em !important;\n font-weight: 600 !important;\n }\n & [data-streamdown="heading-3"] {\n font-size: 1.05em !important;\n font-weight: 600 !important;\n }\n & [data-streamdown="heading-4"],\n & [data-streamdown="heading-5"],\n & [data-streamdown="heading-6"] {\n font-size: 1em !important;\n font-weight: 600 !important;\n }\n\n & [data-streamdown="ordered-list"],\n & [data-streamdown="unordered-list"] {\n padding-left: 1.25em !important;\n }\n & [data-streamdown="ordered-list"] {\n list-style: decimal !important;\n }\n & [data-streamdown="unordered-list"] {\n list-style: disc !important;\n }\n & [data-streamdown="list-item"] {\n margin-bottom: 0.2em !important;\n }\n & [data-streamdown="list-item"]:last-child {\n margin-bottom: 0 !important;\n }\n\n & [data-streamdown="inline-code"] {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;\n font-size: 0.9em !important;\n padding: 0.1em 0.3em !important;\n border-radius: 4px !important;\n background-color: rgba(0, 0, 0, 0.06) !important;\n }\n & [data-streamdown="code-block"] {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;\n font-size: 0.9em !important;\n padding: 0.5em 0.75em !important;\n border-radius: 6px !important;\n background-color: rgba(0, 0, 0, 0.06) !important;\n overflow-x: auto !important;\n }\n\n & [data-streamdown="blockquote"] {\n padding-left: 0.75em !important;\n border-left: 3px solid rgba(0, 0, 0, 0.15) !important;\n color: rgba(0, 0, 0, 0.75) !important;\n }\n\n & [data-streamdown="horizontal-rule"] {\n border: 0 !important;\n border-top: 1px solid rgba(0, 0, 0, 0.12) !important;\n margin: 0.6em 0 !important;\n }\n'),Q={a:function(e){var t=e.href,n=e.children;return(0,r.tZ)("a",U({href:t,target:"_blank",rel:"noopener noreferrer",css:J},{children:n}))}},$=(0,o.memo)((function(e){var t=e.text,n=e.isStreaming,o=void 0!==n&&n;return(0,r.tZ)("div",U({css:G},{children:(0,r.tZ)(H.qI,U({components:Q,isAnimating:o,parseIncompleteMarkdown:o},{children:t}))}))}));$.displayName="MarkdownText";const ee=$;var te=function(){return te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},te.apply(this,arguments)},ne=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function l(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))},re=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},oe=function(e,t){return ne(void 0,void 0,void 0,(function(){var n;return re(this,(function(r){switch(r.label){case 0:return[4,fetch("".concat(e,"threads/"),{headers:t()})];case 1:return(n=r.sent()).ok?[2,n.json()]:[2,null]}}))}))},ie=function(e,t,n){return ne(void 0,void 0,void 0,(function(){var r;return re(this,(function(o){switch(o.label){case 0:return[4,fetch("".concat(e,"threads/").concat(n,"/"),{headers:t()})];case 1:return(r=o.sent()).ok?[2,r.json()]:[2,null]}}))}))},ae=function(e,t,n){return ne(void 0,void 0,void 0,(function(){return re(this,(function(r){switch(r.label){case 0:return[4,fetch("".concat(e,"threads/").concat(n,"/"),{method:"DELETE",headers:t()})];case 1:return r.sent(),[2]}}))}))},le=function(e,t){var n,r;if(!Array.isArray(e)||!Array.isArray(t)||0===t.length)return[];var o=[];try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),a=i.next();!a.done;a=i.next()){var l=a.value,u=Array.isArray(null==l?void 0:l.position)?l.position:[];if(!(u.length>=t.length)){for(var s=!0,c=0;c<u.length;c++)if(u[c]!==t[c]){s=!1;break}s&&o.push(l)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o.sort((function(e,t){return t.position.length-e.position.length})),o},ue=n(5710),se=n(9479),ce=n(4428),de=n(4665),pe=function(){return pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pe.apply(this,arguments)},fe=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},he=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},ve=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ye=function(e){var t=e.text;if("string"==typeof t&&t.trim())return t;var n=e.text_formatted,r=Array.isArray(n)?n:null==n?void 0:n.ops;return Array.isArray(r)?r.map((function(e){return"string"==typeof(null==e?void 0:e.insert)?e.insert:""})).join("").trim():""},ge=function(e,t){if(!e)return"";try{return(0,de.xf)(e,t)}catch(t){return e}},me=new Set(["submit","load"]),be=function(e,t,n,r){return(null!=e?e:[]).some((function(e){if((null==e?void 0:e.trigger_event)!==t)return!1;if(!1===e.enabled||!1===e.valid)return!1;var o=e.steps,i=e.elements;return!(Array.isArray(o)&&o.length>0&&!o.includes(n))&&(!!me.has(t)||Array.isArray(i)&&i.includes(r))}))},xe=function(e){var t,n,r,o,i,a,l,u,s,c,d,p,f,h,v,y,g,m,b,x,k=ce.Z[e];if(!k||!k.currentStep)return null;var w=k.currentStep,S=null!==(i=k.visiblePositions)&&void 0!==i?i:{},C=null!==(a=k.fields)&&void 0!==a?a:{},Z=null!==(l=k.inlineErrors)&&void 0!==l?l:{},_=k.logicRules,A=!(!(null===(u=k.formSettings)||void 0===u?void 0:u.readOnly)&&"readOnly"!==ue.Hi.collaboratorReview),L=(null!==(s=w.subgrids)&&void 0!==s?s:[]).filter((function(e){var t,n,r=null===(t=null==e?void 0:e.properties)||void 0===t?void 0:t.actions;return!!(Array.isArray(r)&&r.length>0)||be(_,"action",w.id,null!==(n=e.id)&&void 0!==n?n:"")})),j=function(e){return le(L,Array.isArray(null==e?void 0:e.position)?e.position:[]).map((function(e){var t;return null!==(t=e.id)&&void 0!==t?t:""}))},B=(null!==(c=w.servar_fields)&&void 0!==c?c:[]).map((function(e){var t,n,r,o,i,a,l,u=(null===(t=e.position)||void 0===t?void 0:t.join(","))||"root",s=S[u],c=!Array.isArray(s)||s.some(Boolean),d=C[e.servar.key],p=null!==(n=e.properties)&&void 0!==n?n:{},f="string"==typeof p.placeholder&&p.placeholder.trim()?ge(p.placeholder):void 0,h="string"==typeof p.tooltipText&&p.tooltipText.trim()?ge(p.tooltipText):void 0,v=null===(r=Z[e.servar.key])||void 0===r?void 0:r.message,y=null!==(o=e.servar)&&void 0!==o?o:{},g=null!==(i=y.metadata)&&void 0!==i?i:{},m=Array.isArray(g.options)?g.options:null,b=Array.isArray(g.labels)?g.labels:[],x=m?m.map((function(e,t){var n,r;return{value:String(null!=e?e:""),label:String(null!==(r=null!==(n=b[t])&&void 0!==n?n:e)&&void 0!==r?r:"")}})):void 0,k=Array.isArray(g.questions)?g.questions:null,L=k?k.map((function(e){var t,n;return{id:String(null!==(t=null==e?void 0:e.id)&&void 0!==t?t:""),label:String(null!==(n=null==e?void 0:e.label)&&void 0!==n?n:"")}})).filter((function(e){return e.id||e.label})):void 0,B=he(he([],fe(Array.isArray(g.file_types)?g.file_types:[]),!1),fe(Array.isArray(g.custom_file_types)?g.custom_file_types.map((function(e){return".".concat(e)})):[]),!1),T=g.min_val_label||g.max_val_label?pe(pe({},g.min_val_label?{min:String(g.min_val_label)}:{}),g.max_val_label?{max:String(g.max_val_label)}:{}):void 0,I=!(!p.disabled&&!A),W=be(_,"change",w.id,null!==(a=y.id)&&void 0!==a?a:""),z=j(e);return pe(pe(pe(pe(pe(pe(pe(pe(pe(pe(pe(pe(pe(pe(pe({key:y.key,type:y.type,value:null!==(l=null==d?void 0:d.value)&&void 0!==l?l:null,visible:c,disabled:I,required:!!y.required,repeated:!!y.repeated},W?{hasLogicRules:!0}:{}),z.length>0?{clickableAncestorIds:z}:{}),f?{placeholder:f}:{}),h?{tooltip:h}:{}),v?{error:v}:{}),x?{options:x}:{}),L?{questions:L}:{}),"number"==typeof y.min_length?{minLength:y.min_length}:{}),"number"==typeof y.max_length?{maxLength:y.max_length}:{}),y.format?{format:String(y.format)}:{}),B.length>0?{fileTypes:B}:{}),g.multiple?{multipleFiles:!0}:{}),"button_group"===y.type?{multiple:!!g.multiple}:{}),T?{sliderLabels:T}:{}),"number"==typeof g.step_size?{stepSize:g.step_size}:{})})),T=new Set;try{for(var I=ve(Object.keys(null!==(d=k.steps)&&void 0!==d?d:{})),W=I.next();!W.done;W=I.next()){var z=W.value,E=k.steps[z];(null!==(p=null==E?void 0:E.servar_fields)&&void 0!==p?p:[]).forEach((function(e){var t;(null===(t=null==e?void 0:e.servar)||void 0===t?void 0:t.key)&&T.add(e.servar.key)}))}}catch(e){t={error:e}}finally{try{W&&!W.done&&(n=I.return)&&n.call(I)}finally{if(t)throw t.error}}var O=function(e){return!(null==e||"string"==typeof e&&""===e||Array.isArray(e)&&0===e.length)},R={},M={};try{for(var F=ve(Object.keys(C)),X=F.next();!X.done;X=F.next()){var K=X.value,D=null!==(h=null===(f=C[K])||void 0===f?void 0:f.value)&&void 0!==h?h:null;T.has(K)?R[K]=D:O(D)&&(M[K]=D)}}catch(e){r={error:e}}finally{try{X&&!X.done&&(o=F.return)&&o.call(F)}finally{if(r)throw r.error}}var N=[],P=function(e){var t,n=(null===(t=e.position)||void 0===t?void 0:t.join(","))||"root",r=S[n];return!Array.isArray(r)||r.some(Boolean)};L.forEach((function(e){var t,n,r=e.properties.actions,o=be(_,"action",w.id,null!==(t=e.id)&&void 0!==t?t:""),i=j(e);N.push(pe(pe({type:"container",id:null!==(n=e.id)&&void 0!==n?n:"",visible:P(e),actions:r},o?{hasLogicRules:!0}:{}),i.length>0?{clickableAncestorIds:i}:{}))})),(null!==(v=w.texts)&&void 0!==v?v:[]).forEach((function(e){var t,n,r,o=ye(null!==(t=null==e?void 0:e.properties)&&void 0!==t?t:{});if(o){var i=ge(o),a=null!==(n=null==e?void 0:e.properties)&&void 0!==n?n:{},l=Array.isArray(a.actions)?a.actions:[],u=be(_,"action",w.id,null!==(r=e.id)&&void 0!==r?r:""),s=j(e);N.push(pe(pe(pe(pe(pe({type:"text",text:i,visible:P(e)},e.id?{id:e.id}:{}),o!==i?{templateText:o}:{}),l.length>0?{actions:l}:{}),u?{hasLogicRules:!0}:{}),s.length>0?{clickableAncestorIds:s}:{}))}})),(null!==(y=w.buttons)&&void 0!==y?y:[]).forEach((function(e){var t,n,r,o,i=ye(null!==(t=null==e?void 0:e.properties)&&void 0!==t?t:{});if(i){var a=null!==(n=null==e?void 0:e.properties)&&void 0!==n?n:{},l=Array.isArray(a.actions)?a.actions:[],u=be(_,"action",w.id,null!==(r=e.id)&&void 0!==r?r:"")||!!a.submit&&(be(_,"submit",w.id,"")||be(_,"form_complete",w.id,""));N.push(pe({type:"button",id:null!==(o=e.id)&&void 0!==o?o:"",text:ge(i),visible:P(e),submit:!!a.submit,actions:l},u?{hasLogicRules:!0}:{}))}})),(null!==(g=w.images)&&void 0!==g?g:[]).forEach((function(e){var t,n=null!==(t=null==e?void 0:e.properties)&&void 0!==t?t:{},r="string"==typeof n.alt_text&&n.alt_text||"string"==typeof n.caption&&n.caption||"";if(r){var o=j(e);N.push(pe({type:"image",text:ge(r),visible:P(e)},o.length>0?{clickableAncestorIds:o}:{}))}})),(null!==(m=w.progress_bars)&&void 0!==m?m:[]).forEach((function(e){var t,n=null===(t=null==e?void 0:e.properties)||void 0===t?void 0:t.num_segments;N.push(pe(pe({type:"progress"},"number"==typeof n?{segments:n}:{}),{visible:P(e)}))}));var V=[];return(null!==(b=w.tables)&&void 0!==b?b:[]).forEach((function(e){var t,n,r=null!==(n=null===(t=null==e?void 0:e.properties)||void 0===t?void 0:t.columns)&&void 0!==n?n:[];if(0!==r.length){var o=r.reduce((function(e,t){var n,r=t.field_key?null===(n=C[t.field_key])||void 0===n?void 0:n.value:void 0;return Array.isArray(r)?Math.max(e,r.length):e}),0),i=Array.from({length:o},(function(e,t){return r.map((function(e){var n,r,o=e.field_key?null===(n=C[e.field_key])||void 0===n?void 0:n.value:null;return Array.isArray(o)?null!==(r=o[t])&&void 0!==r?r:null:null!=o?o:null}))}));V.push({columns:r.map((function(e){var t,n,r;return{name:null!==(n=null!==(t=e.name)&&void 0!==t?t:e.field_key)&&void 0!==n?n:"",fieldKey:null!==(r=e.field_key)&&void 0!==r?r:""}})),rows:i,visible:P(e)})}})),{currentStep:{id:w.id,key:w.key},previousStepName:k.previousStepName||void 0,totalSteps:Object.keys(null!==(x=k.steps)&&void 0!==x?x:{}).length,currentStepFields:B,currentStepElements:N,currentStepTables:V,values:R,hiddenFieldValues:M}},ke=n(9234),we=n(1075),Se=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function l(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))},Ce=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Ze=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_e=new Set(["file_upload","signature"]),Ae=new Set(["text_field","text_area","email","phone_number","url","password","ssn","ein","gmap_line_1","gmap_line_2","gmap_city","gmap_state","gmap_country","gmap_zip"]),Le=new Set(["integer_field","slider","rating"]),je=new Set(["dropdown","radio"]),Be=new Set(["dropdown_multi","multiselect","checkbox_group","button_group"]);function Te(e,t,n){var r,o=null!==(r=null==n?void 0:n.currentStepFields)&&void 0!==r?r:[],i=o.find((function(t){return t.key===e}));if(!i){var a=o.map((function(e){return e.key})).join(", ")||"(none)";return{ok:!1,errorType:"not_on_step",error:"Field '".concat(e,"' is not on the current step. Available field keys here: ").concat(a,".")}}if(!i.visible)return{ok:!1,errorType:"hidden",error:"Field '".concat(e,"' is on the current step but is hidden right now.")};if(i.disabled)return{ok:!1,errorType:"disabled",error:"Field '".concat(e,"' is disabled and cannot be written.")};if(_e.has(i.type))return{ok:!1,errorType:"unwriteable_type",error:"Field '".concat(e,"' (").concat(i.type,") cannot be filled by the assistant; the user has to provide this themselves.")};var l=t;"phone_number"===i.type&&"number"==typeof l&&Number.isFinite(l)&&(l=String(Math.trunc(l)));var u=function(e,t){var n,r;if("checkbox"===e.type)return"boolean"==typeof t?null:"Field '".concat(e.key,"' (checkbox) expects a boolean.");if(Le.has(e.type))return"number"==typeof t&&Number.isFinite(t)?"number"==typeof e.minLength&&t<e.minLength?"Value below minimum (".concat(e.minLength,")."):"number"==typeof e.maxLength&&t>e.maxLength?"Value above maximum (".concat(e.maxLength,")."):null:"Field '".concat(e.key,"' (").concat(e.type,") expects a number.");if("date_selector"===e.type)return"string"!=typeof t?"Field '".concat(e.key,"' (date_selector) expects a string."):/^\d{4}-\d{2}-\d{2}$/.test(t)?null:"Field '".concat(e.key,"' expects ISO date 'YYYY-MM-DD'.");if(je.has(e.type)){if("string"!=typeof t)return"Field '".concat(e.key,"' (").concat(e.type,") expects a single option value (string).");var o=(null!==(n=e.options)&&void 0!==n?n:[]).map((function(e){return e.value}));return o.length>0&&!o.includes(t)?"Value not in allowed options. Allowed: ".concat(o.join(", "),"."):null}if(Be.has(e.type)){if(!Array.isArray(t)||!t.every((function(e){return"string"==typeof e})))return"Field '".concat(e.key,"' (").concat(e.type,") expects an array of option-value strings.");if("button_group"===e.type&&!e.multiple&&t.length>1)return"Field '".concat(e.key,"' (button_group) is single-select; pass at most one option.");var i=new Set((null!==(r=e.options)&&void 0!==r?r:[]).map((function(e){return e.value})));if(i.size>0){var a=t.filter((function(e){return!i.has(e)}));if(a.length>0)return"Values not in allowed options: ".concat(a.join(", "),".")}return null}return Ae.has(e.type)?"string"!=typeof t?"Field '".concat(e.key,"' (").concat(e.type,") expects a string."):"number"==typeof e.minLength&&t.length<e.minLength?"Value shorter than minimum length (".concat(e.minLength,")."):"number"==typeof e.maxLength&&t.length>e.maxLength?"Value exceeds maximum length (".concat(e.maxLength,")."):null:null}(i,l);return u?{ok:!1,errorType:"shape_mismatch",error:u}:{ok:!0,value:l}}function Ie(e,t){return Se(this,void 0,void 0,(function(){var n,r,o,i,a,l,u,s,c,d,p,f;return Ce(this,(function(h){switch(h.label){case 0:if(!e||0===t.length)return[2];if(!(n=ce.Z[e]))return[2];r={},h.label=1;case 1:h.trys.push([1,8,9,10]),o=Ze(t),i=o.next(),h.label=2;case 2:return i.done?[3,7]:(a=i.value,l=a.fieldKey,u=a.value,s=function(e,t){var n,r,o,i,a,l=null!==(o=e.steps)&&void 0!==o?o:{};try{for(var u=Ze(Object.keys(l)),s=u.next();!s.done;s=u.next()){var c=(null!==(a=null===(i=l[s.value])||void 0===i?void 0:i.servar_fields)&&void 0!==a?a:[]).find((function(e){var n;return(null===(n=null==e?void 0:e.servar)||void 0===n?void 0:n.key)===t}));if(c)return c.servar}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return null}(n,l),c=u,"gmap_state"!==(null==s?void 0:s.type)?[3,3]:(c=function(e,t){var n,r;if("string"!=typeof e||!e)return e;var o=!!(null===(n=t.metadata)||void 0===n?void 0:n.store_abbreviation),i=null===(r=t.metadata)||void 0===r?void 0:r.default_country,a=(i&&"auto"!==i?i:"us").toLowerCase(),l=we.P3[a];if(!l||0===l.length)return e;var u=e.toLowerCase(),s=l.find((function(e){return e.code.toLowerCase()===u||e.name.toLowerCase()===u}));return s?o?s.code:s.name:e}(u,s),[3,5]));case 3:return"phone_number"!==(null==s?void 0:s.type)?[3,5]:[4,We(u,s,n,l)];case 4:c=h.sent(),h.label=5;case 5:r[l]=c,h.label=6;case 6:return i=o.next(),[3,2];case 7:return[3,10];case 8:return d=h.sent(),p={error:d},[3,10];case 9:try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(p)throw p.error}return[7];case 10:return(0,ue.Ax)(r,!0,!0),[2]}}))}))}function We(e,t,n,r){return Se(this,void 0,void 0,(function(){var o,i,a;return Ce(this,(function(l){switch(l.label){case 0:return(o="number"==typeof e?String(Math.trunc(e)):"string"==typeof e?e:"").replace(/\D/g,"")?(ke.BZ||(0,ke.bq)(),[4,ke.hV]):[2,e];case 1:return l.sent(),ke.BZ?(i=function(e,t,n){var r,o,i,a=null===(o=null===(r=e.fields)||void 0===r?void 0:r[t])||void 0===o?void 0:o.value;if(a&&"string"==typeof a&&ke.BZ)try{var l=ke.BZ.parsePhoneNumber("+".concat(a));if(null==l?void 0:l.country)return l.country}catch(e){}var u=null===(i=n.metadata)||void 0===i?void 0:i.default_country;return u&&"auto"!==u?u:"US"}(n,r,t),(null==(a=function(){try{return ke.BZ.parsePhoneNumber(o,i)}catch(e){return}}())?void 0:a.isValid())?[2,a.number.replace(/^\+/,"")]:[2,e]):[2,e]}}))}))}var ze=function(){return ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ze.apply(this,arguments)},Ee=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Oe=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Re=function(e){var t,n,r,o,i=null!==(r=null==e?void 0:e.inlineErrors)&&void 0!==r?r:{},a={};try{for(var l=Ee(Object.keys(i)),u=l.next();!u.done;u=l.next()){var s=u.value,c=null===(o=i[s])||void 0===o?void 0:o.message;"string"==typeof c&&c.length>0&&(a[s]=c)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return a};function Me(e,t){var n,r,o,i,a,l,u;return i=this,a=void 0,u=function(){var i,a,l,u,s,c,d,p,f,h,v,y,g,m,b,x,k,w,S,C,Z,_,A;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,(function(L){switch(L.label){case 0:if(!e)return[2,{ok:!1,errorType:"no_form_state",error:"Form has not loaded yet."}];if(!(i=ce.Z[e])||!i.currentStep||!i.assistantClient)return[2,{ok:!1,errorType:"no_form_state",error:"Form has not loaded yet."}];if("string"!=typeof t||0===t.length)return[2,{ok:!1,errorType:"shape_mismatch",error:"elementId is required."}];if(a=function(e,t){var n,r,o,i=null==e?void 0:e.currentStep;if(!i)return null;var a=[[i.buttons,"button"],[i.texts,"text"],[i.subgrids,"container"]];try{for(var l=Ee(a),u=l.next();!u.done;u=l.next()){var s=Oe(u.value,2),c=s[0],d=s[1],p=(null!=c?c:[]).find((function(e){return(null==e?void 0:e.id)===t}));if(p){var f=null===(o=null==p?void 0:p.properties)||void 0===o?void 0:o.actions;return{element:p,elementType:d,actions:Array.isArray(f)?f:[],position:Array.isArray(p.position)?p.position:[]}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return null}(i,t),!a)return[2,{ok:!1,errorType:"not_on_step",error:"Element '".concat(t,"' is not on the current step.")}];if(!function(e,t){var n,r=t.join(",")||"root",o=null===(n=e.visiblePositions)||void 0===n?void 0:n[r];return!Array.isArray(o)||o.some(Boolean)}(i,a.position))return[2,{ok:!1,errorType:"hidden",error:"Element '".concat(t,"' is on the current step but is hidden right now.")}];l=i.assistantClient,u=i.currentStep.key,s=Re(i),L.label=1;case 1:return L.trys.push([1,13,,14]),"button"!==a.elementType?[3,3]:[4,l.click(a.element)];case 2:return L.sent(),[3,12];case 3:return c=le(i.currentStep.subgrids,a.position),[4,l.runActions({actions:a.actions,element:a.element,elementType:a.elementType})];case 4:L.sent(),L.label=5;case 5:L.trys.push([5,10,11,12]),d=Ee(c),p=d.next(),L.label=6;case 6:return p.done?[3,9]:(f=p.value,h=null===(n=null==f?void 0:f.properties)||void 0===n?void 0:n.actions,[4,l.runActions({actions:Array.isArray(h)?h:[],element:f,elementType:"container"})]);case 7:L.sent(),L.label=8;case 8:return p=d.next(),[3,6];case 9:return[3,12];case 10:return v=L.sent(),C={error:v},[3,12];case 11:try{p&&!p.done&&(Z=d.return)&&Z.call(d)}finally{if(C)throw C.error}return[7];case 12:return[3,14];case 13:return[2,{ok:!1,errorType:"dispatch_failed",error:(y=L.sent())instanceof Error?y.message:String(y)}];case 14:g=null!==(o=null===(r=i.currentStep)||void 0===r?void 0:r.key)&&void 0!==o?o:u,m=Re(i),b={};try{for(x=Ee(Object.keys(m)),k=x.next();!k.done;k=x.next())w=k.value,m[w]!==s[w]&&(b[w]=m[w])}catch(e){_={error:e}}finally{try{k&&!k.done&&(A=x.return)&&A.call(x)}finally{if(_)throw _.error}}return S="button"===a.elementType?b[t]:void 0,delete b[t],[2,ze(ze({ok:!0,navigated:g!==u?{fromStepKey:u,toStepKey:g}:null},S?{buttonError:S}:{}),Object.keys(b).length>0?{fieldErrors:b}:{})]}}))},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function r(e){try{o(u.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof l?o:new l((function(e){e(o)}))).then(n,r)}o((u=u.apply(i,a||[])).next())}))}var Fe=function(){return Fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Fe.apply(this,arguments)},Xe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function l(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))},Ke=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},De=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Ne=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Pe=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Ve="feathery.assistant.mode",qe="current",Ye=function(){try{var e=(0,se.Kv)().localStorage.getItem(Ve);return"current"===(t=e)||"sidebar-left"===t||"sidebar-right"===t||"fullscreen"===t?e:qe}catch(e){return qe}var t},He="feathery.assistant.sidebarWidth",Ue=400,Je=function(e){var t=Math.max(280,function(){try{return Math.min(800,Math.floor(.6*(0,se.Kv)().innerWidth))}catch(e){return 800}}());return e<280?280:e>t?t:e},Ge=function(){try{var e=(0,se.Kv)().localStorage.getItem(He),t=e?parseInt(e,10):NaN;return Number.isFinite(t)&&t>0?Je(t):Ue}catch(e){return Ue}},Qe=function(e){try{(0,se.Kv)().localStorage.setItem(He,String(e))}catch(e){}},$e=["current","sidebar-left","sidebar-right","fullscreen"];const et=function(e){var t,n,u,c=e.instanceId,p=e.getTargets,h=e.getJwt,S=e.baseUrl,L=e.bottom,B=void 0===L?20:L,I=e.color,W=e.workflowActions,z=void 0===W?[]:W,E=e.allowedModes,O=void 0===E?$e:E,R=e.onLayoutChange,M=(0,o.useMemo)((function(){if(h)return function(){return{Authorization:"Bearer ".concat(h())}};var e=(0,ue.JQ)().sdkKey;return function(){var t={Authorization:"Token ".concat(e)},n=(0,se.ej)("feathery_session_token");return n&&(t["X-Feathery-Session"]=n),t}}),[h]),F=De((0,o.useState)(!1),2),X=F[0],K=F[1],D=De((0,o.useState)(Ye),2),N=D[0],V=D[1],Y=(0,o.useCallback)((function(e){V(e),function(e){try{(0,se.Kv)().localStorage.setItem(Ve,e)}catch(e){}}(e)}),[]),H=De((0,o.useState)(Ge),2),U=H[0],J=H[1],G=De((0,o.useState)(!1),2),Q=G[0],$=G[1];(0,o.useEffect)((function(){var e=function(){J((function(e){var t=Je(e);return t!==e&&Qe(t),t}))};return(0,se.Kv)().addEventListener("resize",e),function(){return(0,se.Kv)().removeEventListener("resize",e)}}),[]);var le=(0,o.useCallback)((function(e){return function(t){if(0===t.button){t.preventDefault(),$(!0);var n=(0,se.me)().body;n.style.cursor="col-resize",n.style.userSelect="none";var r=U,o=function(t){var n="right"===e?(0,se.Kv)().innerWidth-t.clientX:t.clientX;r=Je(n),J(r)},i=function(){(0,se.Kv)().removeEventListener("pointermove",o),(0,se.Kv)().removeEventListener("pointerup",i),(0,se.Kv)().removeEventListener("pointercancel",i),$(!1),n.style.cursor="",n.style.userSelect="",Qe(r)};(0,se.Kv)().addEventListener("pointermove",o),(0,se.Kv)().addEventListener("pointerup",i),(0,se.Kv)().addEventListener("pointercancel",i)}}}),[U]),de=(0,o.useCallback)((function(){J(Ue),Qe(Ue)}),[]),pe=De((0,o.useState)(""),2),fe=pe[0],he=pe[1],ve=De((0,o.useState)([]),2),ye=ve[0],ge=ve[1],me=De((0,o.useState)(null),2),be=me[0],ke=me[1],we=De((0,o.useState)(!1),2),Se=we[0],Ce=we[1],Ze=De((0,o.useState)(!1),2),_e=Ze[0],Ae=Ze[1],Le=De((0,o.useState)(null),2),je=Le[0],Be=Le[1],We=(0,o.useRef)(null),ze=(0,o.useRef)(null),Ee=(0,o.useRef)(!0),Oe=(0,o.useCallback)((function(){var e=ze.current;if(e){var t=e.scrollHeight-e.scrollTop-e.clientHeight;Ee.current=t<60}}),[]),Re=(0,o.useMemo)((function(){return{primary:e=I||C,hover:T(e,-15),disabled:T(e,30),light:(t=e,90,n=parseInt(t.replace("#",""),16),r=n>>16&255,o=n>>8&255,i=255&n,.9,a=Math.round(r+.9*(255-r)),l=Math.round(o+.9*(255-o)),u=Math.round(i+.9*(255-i)),"#".concat((a<<16|l<<8|u).toString(16).padStart(6,"0")))};var e,t,n,r,o,i,a,l,u}),[I]),qe=function(e,t,n){void 0===t&&(t=[]);var r=e,o=!!n,i=new l.PD({api:S,headers:M,body:function(){return Fe(Fe({},function(){var e={},t=p();if(t.length>0&&(e.targets=t),c){var n=xe(c);n&&(e.panel_runtime=n)}return e}()),{thread_id:r||null})},fetch:function(e,t){return Xe(void 0,void 0,void 0,(function(){var n,i,a,l,s,d,f,h,v,y;return Ke(this,(function(g){switch(g.label){case 0:return[4,fetch(e,t)];case 1:return n=g.sent(),(i=n.headers.get("X-Thread-Id"))&&!r&&(r=i,ge((function(e){return e.map((function(e){return e.chat===u?Fe(Fe({},e),{id:i,isTemporary:!1}):e}))})),ke(i),ie(S,M,i).then((function(e){e&&ge((function(t){return t.map((function(t){return t.id===i?Fe(Fe({},e),{chat:u,title:t.title||e.title}):t}))}))}))),o||(a=null===(y=null===(v=null===(h=u.messages.find((function(e){return"user"===e.role})))||void 0===h?void 0:h.parts)||void 0===v?void 0:v[0])||void 0===y?void 0:y.text)&&(o=!0,l=r||i||null,s={},(d=p()).length>0&&(s.targets=d),c&&(f=function(e){var t,n;return null===(n=null===(t=ce.Z[e])||void 0===t?void 0:t.currentStep)||void 0===n?void 0:n.key}(c),f&&(s.current_step=f)),function(e,t,n,r,o){return ne(void 0,void 0,void 0,(function(){var i,a,l;return re(this,(function(u){switch(u.label){case 0:return[4,fetch("".concat(e,"threads/title/"),{method:"POST",headers:te(te({},t()),{"Content-Type":"application/json"}),body:JSON.stringify(te({message:r,thread_id:null!=n?n:void 0},null!=o?o:{}))})];case 1:return(i=u.sent()).ok?[4,i.json()]:[2,null];case 2:return a=u.sent(),[2,null!==(l=a.title)&&void 0!==l?l:null]}}))}))}(S,M,l,a,s).then((function(e){e&&ge(l?function(t){return t.map((function(t){return t.id===l?Fe(Fe({},t),{title:e}):t}))}:function(t){return t.map((function(t){return t.chat===u?Fe(Fe({},t),{title:e}):t}))})}))),[2,n]}}))}))}}),u=new a.en({transport:i,messages:t,sendAutomaticallyWhen:l.Qk,onToolCall:function(e){var t=e.toolCall;return Xe(void 0,void 0,void 0,(function(){var e,n,r,o,i,a,l,s,d,p,f,h,v,y,g,m,b,x,k,w,S,C,Z,_,A,L,j,B,T,I,W,z,E;return Ke(this,(function(O){switch(O.label){case 0:if(t.dynamic)return[2];if("setFieldValue"!==t.toolName)return[3,5];e=null!==(I=t.input)&&void 0!==I?I:{},n=Array.isArray(e.fields)?e.fields:[],r=c?xe(c):null,o=function(e){return null==e?null:JSON.parse(JSON.stringify(e))},i=new Map((null!==(W=null==r?void 0:r.currentStepFields)&&void 0!==W?W:[]).map((function(e){return[e.key,o(e.value)]}))),a=[],l=[];try{for(s=Ne(n),d=s.next();!d.done;d=s.next())p=d.value,(w="string"==typeof(null==p?void 0:p.fieldKey)?p.fieldKey:"")?(f=Te(w,p.value,r)).ok?l.push({fieldKey:w,value:f.value}):a.push({fieldKey:w,ok:!1,error:f.error,errorType:f.errorType}):a.push({fieldKey:w,ok:!1,errorType:"shape_mismatch",error:"fieldKey is required."})}catch(e){_={error:e}}finally{try{d&&!d.done&&(A=s.return)&&A.call(s)}finally{if(_)throw _.error}}O.label=1;case 1:return O.trys.push([1,3,,4]),[4,Ie(c,l)];case 2:O.sent();try{for(h=Ne(l),v=h.next();!v.done;v=h.next())y=v.value,w=y.fieldKey,g=y.value,a.push({fieldKey:w,ok:!0,value:g,priorValue:null!==(z=i.get(w))&&void 0!==z?z:null})}catch(e){L={error:e}}finally{try{v&&!v.done&&(j=h.return)&&j.call(h)}finally{if(L)throw L.error}}return[3,4];case 3:m=O.sent(),b=m instanceof Error?m.message:String(m);try{for(x=Ne(l),k=x.next();!k.done;k=x.next())w=k.value.fieldKey,a.push({fieldKey:w,ok:!1,errorType:"apply_failed",error:b})}catch(e){B={error:e}}finally{try{k&&!k.done&&(T=x.return)&&T.call(x)}finally{if(B)throw B.error}}return[3,4];case 4:return u.addToolOutput({tool:"setFieldValue",toolCallId:t.toolCallId,output:{results:a}}),[3,7];case 5:return"clickElement"!==t.toolName?[3,7]:(S=null!==(E=t.input)&&void 0!==E?E:{},C="string"==typeof S.elementId?S.elementId:"",[4,Me(c,C)]);case 6:Z=O.sent(),u.addToolOutput({tool:"clickElement",toolCallId:t.toolCallId,output:Z}),O.label=7;case 7:return[2]}}))}))},onFinish:function(e){var t=e.isAbort,n=e.isError;t||n||!r||ge((function(e){var t=e.find((function(e){return e.id===r}));return t?Pe([Fe(Fe({},t),{updated_at:(new Date).toISOString()})],De(e.filter((function(e){return e.id!==r}))),!1):e}))}});return u},He=(0,o.useMemo)((function(){return qe(null)}),[M,p,h]),et=ye.find((function(e){return e.id===be})),tt=null!==(u=null==et?void 0:et.chat)&&void 0!==u?u:He,nt=(0,a.RJ)({chat:tt}),rt=nt.messages,ot=nt.sendMessage,it=nt.status,at=nt.error,lt=(0,o.useMemo)((function(){var e,t,n,r,o=[];try{for(var i=Ne(rt),a=i.next();!a.done;a=i.next()){var l=a.value,u=o[o.length-1];u&&"assistant"===u.role&&"assistant"===l.role?o[o.length-1]=Fe(Fe({},u),{parts:Pe(Pe([],De(null!==(n=u.parts)&&void 0!==n?n:[]),!1),De(null!==(r=l.parts)&&void 0!==r?r:[]),!1)}):o.push(l)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return o}),[rt]);(0,o.useEffect)((function(){var e;Ee.current&&(null===(e=We.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[lt]),(0,o.useEffect)((function(){if("ready"===it&&Ee.current){var e=(0,se.Kv)().requestAnimationFrame((function(){var e;null===(e=We.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})}));return function(){return(0,se.Kv)().cancelAnimationFrame(e)}}}),[it]);var ut=(0,o.useCallback)((function(){return Xe(void 0,void 0,void 0,(function(){var e;return Ke(this,(function(t){switch(t.label){case 0:return[4,oe(S,M)];case 1:return(e=t.sent())?(ge((function(t){return Pe(Pe([],De(e.map((function(e){var n;return Fe(Fe({},e),{chat:null===(n=t.find((function(t){return t.id===e.id})))||void 0===n?void 0:n.chat})}))),!1),De(t.filter((function(t){return!e.find((function(e){return e.id===t.id}))}))),!1)})),[2]):[2]}}))}))}),[M,S]);(0,o.useEffect)((function(){X&&ut()}),[X,ut]);var st=function(){Ee.current=!0;var e=(0,i.Z)(),t=(new Date).toISOString(),n=qe(null);ge((function(r){return Pe([{id:e,title:"",created_at:t,updated_at:t,isTemporary:!0,chat:n}],De(r.filter((function(e){return!e.isTemporary||e.title}))),!1)})),ke(e)},ct=function(){if(fe.trim()&&"ready"===it){Ee.current=!0;var e=(new Date).toISOString();if(be)et&&!et.title&&ge((function(t){return Pe([Fe(Fe({},et),{title:"New Chat",updated_at:e})],De(t.filter((function(e){return e.id!==be}))),!1)}));else{var t=(0,i.Z)();ge((function(n){return Pe([{id:t,title:"New Chat",created_at:e,updated_at:e,isTemporary:!0,chat:tt}],De(n),!1)})),ke(t)}ot({text:fe}),he("")}},dt=ye.filter((function(e){return e.title})),pt="submitted"===it||"streaming"===it,ft="sidebar-left"===N?"left":"sidebar-right"===N?"right":null,ht=X&&ft?U:0,vt=(0,o.useRef)(R);vt.current=R,(0,o.useEffect)((function(){var e;null===(e=vt.current)||void 0===e||e.call(vt,{mode:N,isOpen:X,side:ft,width:ht,isResizing:Q})}),[N,X,ft,ht,Q]);var yt="sidebar-left"===N?k:"sidebar-right"===N?w:"fullscreen"===N?f:x,gt="sidebar-left"===N?g:"sidebar-right"===N?m:"fullscreen"===N?b:y,mt="sidebar-left"===N,bt=mt?{left:"20px"}:{right:"20px"},xt=mt?20:B;if(!X)return(0,r.tZ)("button",Fe({type:"button",onClick:function(){return K(!0)},css:Fe(Fe({position:"fixed",bottom:"".concat(xt,"px")},bt),{width:"".concat(56,"px"),height:"".concat(56,"px"),borderRadius:"50%",backgroundColor:Re.primary,color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",transition:"transform 0.2s, box-shadow 0.2s, background-color 0.2s",zIndex:1e3,":hover":{backgroundColor:Re.hover,transform:"scale(1.05)",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"}})},{children:(0,r.tZ)(s,{})}));var kt="sidebar-left"===N?{top:0,left:0,width:"".concat(U,"px"),height:"100vh",borderRadius:0,boxShadow:"4px 0 24px rgba(0, 0, 0, 0.12)"}:"sidebar-right"===N?{top:0,right:0,width:"".concat(U,"px"),height:"100vh",borderRadius:0,boxShadow:"-4px 0 24px rgba(0, 0, 0, 0.12)"}:"fullscreen"===N?{inset:0,borderRadius:0,boxShadow:"none",border:"none"}:{bottom:"".concat(B,"px"),right:"20px",width:"".concat(380,"px"),height:"".concat(500,"px"),borderRadius:"12px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.12)",border:"1px solid ".concat(_)};return(0,r.BX)("div",Fe({css:Fe({position:"fixed",backgroundColor:"white",display:"flex",flexDirection:"column",overflow:"hidden",zIndex:1e3},kt)},{children:[ft&&(0,r.tZ)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize assistant panel",title:"Drag to resize, double-click to reset",onPointerDown:le(ft),onDoubleClick:de,css:(t={position:"absolute",top:0},t["right"===ft?"left":"right"]=0,t.width="6px",t.height="100%",t.cursor="col-resize",t.zIndex=2,t.touchAction="none",t.userSelect="none",t["::after"]=(n={content:'""',position:"absolute",top:0},n["right"===ft?"left":"right"]="2px",n.width="2px",n.height="100%",n.backgroundColor="transparent",n.transition="background-color 120ms ease",n),t[":hover::after"]={backgroundColor:"rgba(0, 0, 0, 0.15)"},t)}),(0,r.BX)("div",Fe({css:Fe({display:"flex",alignItems:"center",justifyContent:"space-between",gap:"2px",padding:"12px 16px",backgroundColor:Re.primary,color:"white",position:"relative"},ft?{minHeight:"var(--main-nav-height, 55px)",boxSizing:"border-box"}:{})},{children:[(0,r.BX)("div",Fe({css:{display:"flex",alignItems:"center",gap:"8px",minWidth:0,flex:1,overflow:"hidden"}},{children:[(0,r.tZ)(s,{}),(0,r.BX)("button",Fe({type:"button",onClick:function(){return Ce((function(e){return!e}))},css:{background:"none",border:"none",color:"white",cursor:"pointer",fontWeight:600,fontSize:"14px",padding:"4px",borderRadius:"4px",display:"flex",alignItems:"center",gap:"4px",minWidth:0,maxWidth:"100%",":hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}}},{children:[(0,r.tZ)("span",Fe({css:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0}},{children:(null==et?void 0:et.title)||"AI Assistant"})),(0,r.tZ)("span",Fe({css:{display:"flex",opacity:.8,flexShrink:0}},{children:(0,r.tZ)(v,{})}))]}))]})),(0,r.BX)("div",Fe({css:{display:"flex",alignItems:"center",gap:"2px",position:"relative",flexShrink:0}},{children:[(0,r.tZ)("button",Fe({type:"button",onClick:function(){return Ae((function(e){return!e}))},css:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",":hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}}},{children:(0,r.tZ)(gt,{})})),(0,r.tZ)("button",Fe({type:"button",onClick:function(){return K(!1)},css:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",":hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}}},{children:(0,r.tZ)(yt,{})})),_e&&(0,r.BX)(r.HY,{children:[(0,r.tZ)("div",{css:{position:"fixed",inset:0,zIndex:1e3},onClick:function(){return Ae(!1)}}),(0,r.tZ)("div",Fe({css:{position:"absolute",top:"100%",right:0,marginTop:"4px",minWidth:"180px",backgroundColor:"white",border:"1px solid ".concat(_),borderRadius:"8px",boxShadow:"0 8px 16px rgba(0,0,0,0.12)",zIndex:1001,overflow:"hidden"}},{children:[{value:"current",label:"Floating",Icon:y},{value:"sidebar-left",label:"Sidebar left",Icon:g},{value:"sidebar-right",label:"Sidebar right",Icon:m},{value:"fullscreen",label:"Fullscreen",Icon:b}].filter((function(e){var t=e.value;return O.includes(t)})).map((function(e){var t=e.value,n=e.label,o=e.Icon;return(0,r.BX)("button",Fe({type:"button",onClick:function(){Y(t),Ae(!1)},css:{width:"100%",padding:"10px 14px",background:t===N?Re.light:"white",border:"none",cursor:"pointer",fontSize:"13px",color:j,textAlign:"left",display:"flex",alignItems:"center",gap:"10px",":hover":{backgroundColor:Z}}},{children:[(0,r.tZ)("span",Fe({css:{display:"flex",color:A,flexShrink:0}},{children:(0,r.tZ)(o,{})})),(0,r.tZ)("span",{children:n})]}),t)}))}))]})]})),Se&&(0,r.BX)(r.HY,{children:[(0,r.tZ)("div",{css:{position:"fixed",inset:0,zIndex:1e3},onClick:function(){return Ce(!1)}}),(0,r.BX)("div",Fe({css:{position:"absolute",top:"100%",left:0,width:"100%",backgroundColor:"white",border:"1px solid ".concat(_),borderTop:"none",borderRadius:"0 0 8px 8px",boxShadow:"0 8px 16px rgba(0,0,0,0.12)",zIndex:1001,maxHeight:"240px",overflowY:"scroll"}},{children:[(0,r.tZ)("button",Fe({type:"button",onClick:function(){st(),Ce(!1)},css:{width:"100%",padding:"10px 14px",background:"none",border:"none",borderBottom:"1px solid ".concat("#f3f4f6"),cursor:"pointer",fontSize:"13px",fontWeight:600,color:Re.primary,textAlign:"left",":hover":{backgroundColor:Z}}},{children:"+ New Chat"})),0===dt.length&&(0,r.tZ)("div",Fe({css:{padding:"12px 14px",fontSize:"13px",color:A}},{children:"No chats yet"})),dt.map((function(e){return(0,r.BX)("div",Fe({onClick:function(){return t=e.id,Xe(void 0,void 0,void 0,(function(){var e,n,r,o;return Ke(this,(function(i){switch(i.label){case 0:return Ee.current=!0,(null===(r=ye.find((function(e){return e.id===t})))||void 0===r?void 0:r.chat)?(ke(t),Ce(!1),[2]):[4,ie(S,M,t)];case 1:return(e=i.sent())?(n=qe(t,null!==(o=e.messages)&&void 0!==o?o:[],e.title),ge((function(r){return r.map((function(r){return r.id===t?Fe(Fe({},e),{chat:n}):r}))})),ke(t),Ce(!1),[2]):[2]}}))}));var t},css:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 14px",cursor:"pointer",backgroundColor:e.id===be?Re.light:"white",":hover":{backgroundColor:Z}}},{children:[(0,r.BX)("div",Fe({css:{flex:1,minWidth:0}},{children:[(0,r.tZ)("div",Fe({css:{fontSize:"13px",fontWeight:500,color:j,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{children:e.title||"Untitled conversation"})),(0,r.tZ)("div",Fe({css:{fontSize:"11px",color:A,marginTop:"2px"}},{children:new Date(e.updated_at).toLocaleDateString()}))]})),(0,r.tZ)("button",Fe({type:"button",onClick:function(t){return function(e,t){return Xe(void 0,void 0,void 0,(function(){var n;return Ke(this,(function(r){switch(r.label){case 0:return t.stopPropagation(),(null==(n=ye.find((function(t){return t.id===e})))?void 0:n.isTemporary)?[3,2]:[4,ae(S,M,e)];case 1:r.sent(),r.label=2;case 2:return ge((function(t){return t.filter((function(t){return t.id!==e}))})),be===e&&st(),[2]}}))}))}(e.id,t)},css:{background:"none",border:"none",cursor:"pointer",color:A,fontSize:"16px",padding:"2px 6px",marginLeft:"8px",borderRadius:"4px",lineHeight:1,":hover":{color:"#dc2626",backgroundColor:"#fef2f2"}}},{children:"×"}))]}),e.id)}))]}))]})]})),(0,r.BX)("div",Fe({ref:ze,onScroll:Oe,css:{flex:1,overflowY:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"12px"}},{children:[0===lt.length&&(0,r.tZ)("div",Fe({css:{textAlign:"center",color:A,fontSize:"14px",marginTop:"40px"}},{children:"How can I help?"})),lt.map((function(e,t){return"user"===e.role?(0,r.tZ)("div",Fe({css:{display:"flex",justifyContent:"flex-end"}},{children:(0,r.tZ)("div",Fe({css:{maxWidth:"80%",padding:"10px 14px",borderRadius:"12px",fontSize:"14px",lineHeight:"1.5",backgroundColor:Re.primary,color:"white",overflowWrap:"anywhere",wordBreak:"break-word"}},{children:e.parts.filter((function(e){return!e.hidden})).map((function(e,t){return"text"===e.type?(0,r.tZ)("span",{children:e.text},t):null}))}))}),e.id):(0,r.tZ)(o.Fragment,{children:(n=t===lt.length-1,i=function(e){var t=[];return e.forEach((function(e,n){if("text"===e.type&&e.text.trim()){var r=t[t.length-1];r&&"text"===r.kind?r.text="".concat(r.text,"\n\n").concat(e.text):t.push({kind:"text",key:"text-".concat(n),text:e.text})}else{var o=function(e){if("text"===(null==e?void 0:e.type))return{kind:"text"};var t="string"==typeof(null==e?void 0:e.type)&&e.type.startsWith("tool-"),n="dynamic-tool"===(null==e?void 0:e.type);return t||n?{kind:"tool",toolName:t?e.type.replace("tool-",""):e.toolName||"unknown"}:null}(e);if(o&&"tool"===o.kind&&o.toolName){var i={key:"tool-".concat(n),toolName:o.toolName,state:e.state,input:e.input,output:e.output},a=t[t.length-1];a&&"tools"===a.kind?a.rows.push(i):t.push({kind:"tools",key:"tools-".concat(n),rows:[i]})}}})),t}(e.parts),a=e.parts[e.parts.length-1],l=!n||"ready"===it&&"text"===(null==a?void 0:a.type),i.map((function(e,t){if("text"===e.kind)return(0,r.tZ)("div",Fe({css:{display:"flex",justifyContent:"flex-start"}},{children:(0,r.tZ)("div",Fe({css:{maxWidth:"80%",padding:"10px 14px",borderRadius:"12px",fontSize:"14px",lineHeight:"1.5",backgroundColor:Re.light,color:j,overflowWrap:"anywhere",wordBreak:"break-word"}},{children:(0,r.tZ)(ee,{text:e.text,isStreaming:pt&&n&&t===i.length-1})}))}),e.key);var o=i.slice(t+1).some((function(e){return"text"===e.kind}));return(0,r.tZ)("div",Fe({css:{display:"flex",justifyContent:"flex-start",maxWidth:"80%",minWidth:0}},{children:(0,r.tZ)(P,{rows:e.rows,turnFinished:l,followedByText:o,linkColor:Re.primary,isFirstChunk:0===t})}),e.key)})))},e.id);var n,i,a,l})),function(){if(!pt)return null;var e=lt[lt.length-1];if(!e)return null;if("user"!==e.role){var t=(e.parts||[]).some((function(e){var t;if("text"===(null==e?void 0:e.type))return(null!==(t=e.text)&&void 0!==t?t:"").trim().length>0;var n="string"==typeof(null==e?void 0:e.type)?e.type:"";return n.startsWith("tool-")||"dynamic-tool"===n}));if(t)return null}return(0,r.tZ)(q,{})}(),at&&(0,r.tZ)("div",Fe({css:{padding:"10px 14px",borderRadius:"8px",backgroundColor:"#fef2f2",color:"#dc2626",fontSize:"14px"}},{children:"Something went wrong. Please try again."})),(0,r.tZ)("div",{ref:We})]})),z.length>0&&(0,r.BX)("div",Fe({css:{position:"relative",zIndex:1,borderTop:"1px solid ".concat(_),backgroundColor:Z,padding:"8px 16px",display:"flex",gap:"6px",overflowX:"auto"}},{children:[z.map((function(e,t){return(0,r.tZ)("button",Fe({type:"button",disabled:pt,onClick:function(){return function(e){if("ready"===it){var t=(new Date).toISOString();if(be)et&&!et.title&&ge((function(e){return Pe([Fe(Fe({},et),{title:"New Chat",updated_at:t})],De(e.filter((function(e){return e.id!==be}))),!1)}));else{var n=(0,i.Z)();ge((function(e){return Pe([{id:n,title:"New Chat",created_at:t,updated_at:t,isTemporary:!0,chat:tt}],De(e),!1)})),ke(n)}ot({parts:[{type:"text",text:e.name},{type:"text",text:e.instructions,hidden:!0,interpolate:!0}]})}}(e)},onMouseEnter:function(t){if(e.description){var n=t.currentTarget.getBoundingClientRect();Be({text:e.description,x:n.left+n.width/2,y:n.top})}},onMouseLeave:function(){return Be(null)},css:{flexShrink:0,padding:"4px 10px",fontSize:"12px",border:"1px solid ".concat(Re.primary),borderRadius:"12px",backgroundColor:"white",color:Re.primary,cursor:"pointer",whiteSpace:"nowrap",":disabled":{opacity:.5,cursor:"not-allowed"},":hover:not(:disabled)":{backgroundColor:Re.light},transition:"background-color 0.15s, color 0.15s"}},{children:e.name}),t)})),je&&(0,r.tZ)("div",Fe({css:{position:"fixed",top:je.y-34,left:je.x,transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.9)",color:"white",fontSize:"12px",padding:"4px 8px",borderRadius:"4px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:1e4}},{children:je.text}))]})),(0,r.BX)("div",Fe({css:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",borderTop:"1px solid ".concat(_),backgroundColor:Z}},{children:[(0,r.tZ)("input",{type:"text",value:fe,onChange:function(e){return he(e.target.value)},onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),e.stopPropagation(),ct())},placeholder:"Type a message...",css:{flex:1,padding:"10px 14px",border:"1px solid ".concat(_),borderRadius:"8px",fontSize:"14px",outline:"none",transition:"border-color 0.2s",":focus":{borderColor:Re.primary}}}),(0,r.tZ)("button",Fe({type:"button",onClick:ct,disabled:pt||!fe.trim(),css:{padding:"10px",backgroundColor:Re.primary,color:"white",border:"none",borderRadius:"8px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s",":hover:not(:disabled)":{backgroundColor:Re.hover},":disabled":{backgroundColor:Re.disabled,cursor:"not-allowed"}}},{children:(0,r.tZ)(d,{})}))]}))]}))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[507],{5888:(e,t,a)=>{a.r(t),a.d(t,{default:()=>u});var i=a(5944),r=a(7294),n=a(1211),o=a(6867),l=a(9479),s=a(1587),c=a(4416),d=a(5406),p=function(){return p=Object.assign||function(e){for(var t,a=1,i=arguments.length;a<i;a++)for(var r in t=arguments[a])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)};const u=function(e){var t,a=e.element,u=e.responsiveStyles,v=e.fieldLabel,f=e.inlineError,g=e.fieldVal,m=void 0===g?null:g,h=e.repeatIndex,b=void 0===h?null:h,y=e.editMode,k=e.onClick,x=void 0===k?function(){}:k,Z=e.elementProps,_=void 0===Z?{}:Z,w=e.disabled,T=void 0!==w&&w,S=e.children,B=(0,r.useRef)(null),C=a.servar,O=(0,d.Z)(C.metadata.salesforce_sync,y),j=O.dynamicOptions,M=O.loadingDynamicOptions,X=O.shouldSalesforceSync,A=(0,r.useMemo)((function(){return Array.isArray(m)?m.reduce((function(e,t){return e[t]=!0,e}),{}):{}}),[m]),E=(0,o.Z)({element:a,error:f,breakpoint:u.getMobileBreakpoint()}),F=E.borderStyles,I=E.customBorder,L=C.metadata.option_labels,P=C.metadata.option_tooltips;return t=X?j.map((function(e){return{value:e.value,label:e.label,tooltip:""}})):null!==b&&void 0!==C.metadata.repeat_options&&void 0!==C.metadata.repeat_options[b]?C.metadata.repeat_options[b]:C.metadata.options.map((function(e,t){return{value:e,label:L&&L[t]?L[t]:e,tooltip:P&&P[t]?P[t]:""}})),(0,i.BX)("div",p({ref:B,css:p({position:"relative",width:"100%",height:"100%",pointerEvents:y||T||M?"none":"auto"},u.getTarget("fc"))},{children:[S,v,(0,i.BX)("div",p({css:p({display:"flex",flexWrap:"wrap",width:"100%"},u.getTarget("bc"))},_,{children:[t.map((function(e,t){var r,o,c,d=null!==(r=e.value)&&void 0!==r?r:e,v=null!==(o=e.label)&&void 0!==o?o:e,f=e.image?e.image:C.metadata.option_images[t],g=null!==(c=e.tooltip)&&void 0!==c?c:"";return(0,i.BX)("div",p({onClick:function(){y||T||M||x(d)},css:p(p({position:"relative",display:"flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box",cursor:"pointer"},u.getTarget("field")),{"&:hover":(0,l.wL)(y||T||M?{}:p(p({},u.getTarget("hover")),F.hover)),"&&":A[d]?p(p({},u.getTarget("active")),F.active):{}})},{children:[I,f&&(0,i.tZ)("img",{src:f,css:p(p({},n.lH),u.getTargets("img"))}),v&&(0,i.tZ)("div",p({css:p(p({display:"flex",maxWidth:"100%"},u.getTargets("label")),n.aY)},{children:v})),g&&(0,i.tZ)(s.Z,{containerRef:B,id:"".concat(a.id,"-").concat(v),text:g,responsiveStyles:u,absolute:!1,repeat:a.repeat})]}),"".concat(C.key,"-").concat(t))})),(0,i.tZ)(c.Z,{id:C.key,name:C.key,"aria-label":a.properties.aria_label})]}))]}))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[745],{2788:(e,t,c)=>{c.r(t),c.d(t,{applyCheckableInputStyles:()=>b,applyHeightWidthMarginByFontSize:()=>l,composeCheckableInputStyle:()=>d,default:()=>s});var o=c(5944),r=c(7294),a=c(9479),n=function(){return n=Object.assign||function(e){for(var t,c=1,o=arguments.length;c<o;c++)for(var r in t=arguments[c])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},i="polygon(40% 85%, 89% 23%, 76% 12%, 39% 59%, 23% 44%, 12% 55%)",h=function(e){return Math.max(e,13)},l=function(e,t,c){void 0===c&&(c=!1),e.apply(t,["font_size"],(function(e){var t=h(e),o="".concat(t,"px"),r={minHeight:o,height:o,minWidth:o,width:o},a=Math.max(t/2,10);return c||(r.marginRight="".concat(a,"px")),r}))},p=function(e,t,c,o){e.apply(t,["font_size",c],(function(e,t){var c=h(e);return o?function(e,t){return{height:e=Math.floor(e/1.7),width:e,minWidth:e,minHeight:e,border:0,boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),borderRadius:"50%"}}(c,t):function(e,t){return{boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),clipPath:i}}(c,t)}))},k=function(e,t,c){e.apply(t,["height","height_unit","width","width_unit",c],(function(e,t,c,o,r){return{boxShadow:"inset ".concat(c).concat(o," ").concat(e).concat(t," #").concat(r),clipPath:i}}))};function b(e,t){t.addTargets("checkbox","checkboxCheckmark","checkboxSelected","checkboxHover","checkboxCheckmarkHover","checkboxLabel");var c=e.servar,o=c.type,r=c.metadata.multiple,a="select"===o||"matrix"===o&&!r;return"multiselect"===o||"checkbox_group"===o||"matrix"===o&&r||a?(function(e,t){e.apply("checkboxLabel",["font_size","line_height"],(function(e,t){return t||(t=h(e)),{position:"relative",top:"-".concat((t-e)/2,"px"),lineHeight:"".concat(t,"px")}}))}(t),l(t,"checkbox",!0),l(t,"checkboxCheckmark",!0),l(t,"checkboxCheckmarkHover",!0),p(t,"checkboxCheckmark","selected_font_color",a),p(t,"checkboxCheckmarkHover","hover_font_color",a)):(t.applyHeight("checkbox"),t.applyWidth("checkbox"),t.applyHeight("checkboxCheckmark"),t.applyWidth("checkboxCheckmark"),t.applyHeight("checkboxCheckmarkHover"),t.applyWidth("checkboxCheckmarkHover"),t.apply("checkbox",["width","width_unit"],(function(e,t){return"px"===t&&e?{marginRight:"".concat(Math.max(Math.round(.4*e),5),"px")}:{}})),k(t,"checkboxCheckmark","selected_font_color"),k(t,"checkboxCheckmarkHover","hover_font_color")),t.applyBorders({target:"checkbox"}),a||t.applyCorners("checkbox"),t.applyBoxShadow("checkbox"),t.applyColor("checkbox","background_color","backgroundColor",!0),t.applySelectorStyles("checkboxHover",{prefix:"hover_",important:!0}),t.applySelectorStyles("checkboxSelected",{prefix:"selected_",important:!0}),t}var d=function(e,t,c){return void 0===t&&(t=!1),void 0===c&&(c=!1),n(n({position:"static",marginLeft:5,marginRight:5,marginTop:0,marginBottom:0,appearance:"none",display:"grid",placeContent:"center",outline:"none",borderRadius:c?"50%":null},e.getTarget("checkbox")),{"&:hover":(0,a.wL)(t?{}:e.getTarget("checkboxHover")),"&::before":n({content:"''",transform:"scale(0)"},e.getTarget("checkboxCheckmark")),"&:hover::before":(0,a.wL)(n(n({},e.getTarget("checkboxCheckmark")),e.getTarget("checkboxCheckmarkHover"))),"&:checked":n({},e.getTarget("checkboxSelected")),"&:checked::before":{transform:"scale(1)"}})};const s=function(e){var t=e.element,c=e.responsiveStyles,i=e.fieldLabel,h=e.fieldVal,l=void 0===h||h,p=e.onChange,k=void 0===p?function(){}:p,s=e.elementProps,x=void 0===s?{}:s,u=e.disabled,g=void 0!==u&&u,m=e.children,f=(0,r.useMemo)((function(){return b(t,c)}),[c]),v=t.servar;return(0,o.BX)("div",n({css:n(n({},c.getTarget("fc")),{position:"relative",display:"flex",alignItems:"center"})},x,{children:[m,(0,o.tZ)("input",{id:v.key,name:v.key,type:"checkbox",checked:l,disabled:g,onChange:k,onFocus:a.ms,"aria-label":t.properties.aria_label,css:n(n(n(n({},d(f,g)),i?{}:{marginRight:5}),g?c.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})}),i]}))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[446,745],{5577:(e,t,o)=>{o.d(t,{N:()=>r});var n=o(5944),a=function(){return a=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},a.apply(this,arguments)};function r(e){var t=e.type,o=void 0===t?"text":t,r=e.htmlSize,c=e.css,i=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["type","htmlSize","css"]);return(0,n.tZ)("input",a({type:o,size:r,css:a({border:"1px solid #ced4da",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",fontSize:"1rem",lineHeight:"1.5",color:"#495057",backgroundColor:"#fff",backgroundClip:"padding-box",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"},"&:disabled":{backgroundColor:"#e9ecef",opacity:1}},c)},i))}},2788:(e,t,o)=>{o.r(t),o.d(t,{applyCheckableInputStyles:()=>h,applyHeightWidthMarginByFontSize:()=>d,composeCheckableInputStyle:()=>u,default:()=>b});var n=o(5944),a=o(7294),r=o(9479),c=function(){return c=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},c.apply(this,arguments)},i="polygon(40% 85%, 89% 23%, 76% 12%, 39% 59%, 23% 44%, 12% 55%)",l=function(e){return Math.max(e,13)},d=function(e,t,o){void 0===o&&(o=!1),e.apply(t,["font_size"],(function(e){var t=l(e),n="".concat(t,"px"),a={minHeight:n,height:n,minWidth:n,width:n},r=Math.max(t/2,10);return o||(a.marginRight="".concat(r,"px")),a}))},p=function(e,t,o,n){e.apply(t,["font_size",o],(function(e,t){var o=l(e);return n?function(e,t){return{height:e=Math.floor(e/1.7),width:e,minWidth:e,minHeight:e,border:0,boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),borderRadius:"50%"}}(o,t):function(e,t){return{boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),clipPath:i}}(o,t)}))},s=function(e,t,o){e.apply(t,["height","height_unit","width","width_unit",o],(function(e,t,o,n,a){return{boxShadow:"inset ".concat(o).concat(n," ").concat(e).concat(t," #").concat(a),clipPath:i}}))};function h(e,t){t.addTargets("checkbox","checkboxCheckmark","checkboxSelected","checkboxHover","checkboxCheckmarkHover","checkboxLabel");var o=e.servar,n=o.type,a=o.metadata.multiple,r="select"===n||"matrix"===n&&!a;return"multiselect"===n||"checkbox_group"===n||"matrix"===n&&a||r?(function(e,t){e.apply("checkboxLabel",["font_size","line_height"],(function(e,t){return t||(t=l(e)),{position:"relative",top:"-".concat((t-e)/2,"px"),lineHeight:"".concat(t,"px")}}))}(t),d(t,"checkbox",!0),d(t,"checkboxCheckmark",!0),d(t,"checkboxCheckmarkHover",!0),p(t,"checkboxCheckmark","selected_font_color",r),p(t,"checkboxCheckmarkHover","hover_font_color",r)):(t.applyHeight("checkbox"),t.applyWidth("checkbox"),t.applyHeight("checkboxCheckmark"),t.applyWidth("checkboxCheckmark"),t.applyHeight("checkboxCheckmarkHover"),t.applyWidth("checkboxCheckmarkHover"),t.apply("checkbox",["width","width_unit"],(function(e,t){return"px"===t&&e?{marginRight:"".concat(Math.max(Math.round(.4*e),5),"px")}:{}})),s(t,"checkboxCheckmark","selected_font_color"),s(t,"checkboxCheckmarkHover","hover_font_color")),t.applyBorders({target:"checkbox"}),r||t.applyCorners("checkbox"),t.applyBoxShadow("checkbox"),t.applyColor("checkbox","background_color","backgroundColor",!0),t.applySelectorStyles("checkboxHover",{prefix:"hover_",important:!0}),t.applySelectorStyles("checkboxSelected",{prefix:"selected_",important:!0}),t}var u=function(e,t,o){return void 0===t&&(t=!1),void 0===o&&(o=!1),c(c({position:"static",marginLeft:5,marginRight:5,marginTop:0,marginBottom:0,appearance:"none",display:"grid",placeContent:"center",outline:"none",borderRadius:o?"50%":null},e.getTarget("checkbox")),{"&:hover":(0,r.wL)(t?{}:e.getTarget("checkboxHover")),"&::before":c({content:"''",transform:"scale(0)"},e.getTarget("checkboxCheckmark")),"&:hover::before":(0,r.wL)(c(c({},e.getTarget("checkboxCheckmark")),e.getTarget("checkboxCheckmarkHover"))),"&:checked":c({},e.getTarget("checkboxSelected")),"&:checked::before":{transform:"scale(1)"}})};const b=function(e){var t=e.element,o=e.responsiveStyles,i=e.fieldLabel,l=e.fieldVal,d=void 0===l||l,p=e.onChange,s=void 0===p?function(){}:p,b=e.elementProps,g=void 0===b?{}:b,f=e.disabled,k=void 0!==f&&f,m=e.children,y=(0,a.useMemo)((function(){return h(t,o)}),[o]),x=t.servar;return(0,n.BX)("div",c({css:c(c({},o.getTarget("fc")),{position:"relative",display:"flex",alignItems:"center"})},g,{children:[m,(0,n.tZ)("input",{id:x.key,name:x.key,type:"checkbox",checked:d,disabled:k,onChange:s,onFocus:r.ms,"aria-label":t.properties.aria_label,css:c(c(c(c({},u(y,k)),i?{}:{marginRight:5}),k?o.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})}),i]}))}},8250:(e,t,o)=>{o.r(t),o.d(t,{default:()=>h});var n=o(5944),a=o(7294),r=o(5577),c=o(1211),i=o(2788),l=o(1587),d=o(9479),p=o(5406),s=function(){return s=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)};const h=function(e){var t,o,h,u=e.element,b=e.responsiveStyles,g=e.fieldLabel,f=e.fieldVal,k=void 0===f?[]:f,m=e.otherVal,y=void 0===m?"":m,x=e.repeatIndex,v=void 0===x?null:x,w=e.editMode,C=e.onChange,S=void 0===C?function(){}:C,_=e.onSelectAllChange,T=void 0===_?function(){}:_,H=e.onOtherChange,O=void 0===H?function(){}:H,Z=e.onEnter,B=void 0===Z?function(){}:Z,L=e.elementProps,P=void 0===L?{}:L,R=e.disabled,j=void 0!==R&&R,z=e.children,M=u.servar,W=(0,p.Z)(M.metadata.salesforce_sync,w),F=W.dynamicOptions,I=W.loadingDynamicOptions,E=W.shouldSalesforceSync,G=k.includes(y),X=null!==(t=M.metadata.other_label)&&void 0!==t?t:"Other",D=M.metadata.select_all_label||"Select All",V=(0,a.useRef)(null),A=(0,a.useRef)(null),N=(0,a.useMemo)((function(){return(0,i.applyCheckableInputStyles)(u,b),function(e,t){t.addTargets("checkboxGroup"),(0,i.applyHeightWidthMarginByFontSize)(t,"checkboxGroup")}(0,b),b.addTargets("row-container"),b.apply("row-container","row_separation",(function(e){return{gap:"".concat(e||5,"px")}})),b.apply("row-container","option_direction",(function(e){return{flexDirection:e||"column"}})),b}),[b]),q=M.metadata.option_labels,K=null!==(o=M.metadata.option_tooltips)&&void 0!==o?o:[],J=function(e){return j||I||M.max_length&&M.max_length<=k.length&&!e},Q=J(G),U=!G||Q,Y=(h=E?F.map((function(e){return{value:e.value,label:e.label,tooltip:""}})):null!==v&&void 0!==M.metadata.repeat_options&&void 0!==M.metadata.repeat_options[v]?M.metadata.repeat_options[v]:M.metadata.options.map((function(e,t){return{value:e,label:q&&q[t]?q[t]:e,tooltip:K&&K[t]?K[t]:""}}))).map((function(e){var t;return null!==(t=e.value)&&void 0!==t?t:e})),$=Y.filter((function(e){return k.includes(e)})).length,ee=Y.length>0&&$===Y.length,te=$>0&&!ee,oe=M.metadata.select_all&&!M.max_length&&Y.length>0,ne=j||I;return(0,a.useEffect)((function(){A.current&&(A.current.indeterminate=te)}),[te]),(0,n.BX)("div",s({ref:V,css:s({position:"relative",width:"100%"},b.getTarget("fc"))},P,{children:[z,g,(0,n.BX)("div",s({css:s({display:"flex",flexWrap:"wrap",width:"100%"},N.getTarget("row-container"))},{children:[oe&&(0,n.tZ)("div",s({css:{display:"flex",pointerEvents:ne?"none":"auto"}},{children:(0,n.BX)("label",s({style:{display:"contents"}},{children:[(0,n.tZ)("input",{ref:A,type:"checkbox",id:"".concat(M.key,"-select-all"),checked:ee,onChange:function(){return T(Y,!ee)},onFocus:d.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(N,ne)),N.getTarget("checkboxGroup")),ne?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"},"&:indeterminate":s({},N.getTarget("checkboxSelected")),"&:indeterminate::before":{transform:"scale(1)",clipPath:"inset(45% 15%)"}}),disabled:ne,"aria-label":D}),(0,n.tZ)("span",s({css:s({whiteSpace:"pre-wrap",overflowWrap:"anywhere"},N.getTarget("checkboxLabel"))},{children:D}))]}))})),h.map((function(e,t){var o,a,r,c=null!==(o=e.value)&&void 0!==o?o:e,p=null!==(a=e.label)&&void 0!==a?a:e,h=k.includes(c),g=J(h);return(0,n.BX)("div",s({css:{display:"flex",pointerEvents:g?"none":"auto"}},{children:[(0,n.BX)("label",s({style:{display:"contents"}},{children:[(0,n.tZ)("input",{type:"checkbox",id:"".concat(M.key,"-").concat(t),name:c,checked:h,onChange:S,onFocus:d.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(N,g)),N.getTarget("checkboxGroup")),g?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}}),disabled:g,"aria-label":u.properties.aria_label}),(0,n.tZ)("span",s({css:s({whiteSpace:"pre-wrap",overflowWrap:"anywhere"},N.getTarget("checkboxLabel"))},{children:p}))]})),(0,n.tZ)(l.Z,{containerRef:V,id:"".concat(u.id,"-").concat(c),text:null!==(r=e.tooltip)&&void 0!==r?r:"",responsiveStyles:b,absolute:!1,repeat:u.repeat})]}),"".concat(M.key,"-").concat(t))})),M.metadata.other&&(0,n.BX)("div",s({style:{display:"flex",flexGrow:1}},{children:[(0,n.tZ)("input",{type:"checkbox",id:"".concat(M.key,"-"),name:y,checked:G,disabled:Q,onChange:S,onFocus:d.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(N,Q)),N.getTarget("checkboxGroup")),Q?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})},"".concat(M.key,"-")),(0,n.tZ)("label",s({htmlFor:"".concat(M.key,"-"),css:N.getTarget("checkboxLabel")},{children:X})),(0,n.tZ)(r.N,{type:"text",htmlSize:1,css:s(s(s(s({marginLeft:"5px"},c.ET),{paddingLeft:"0.4rem",flexGrow:1}),b.getTarget("field")),U?b.getTarget("disabled"):{}),id:M.key,value:y||"",onChange:O,onKeyDown:function(e){"Enter"===e.key&&B(e)},required:G,disabled:U}),(0,n.tZ)(l.Z,{containerRef:V,id:"".concat(u.id,"-"),text:M.metadata.other_tooltip,responsiveStyles:b,absolute:!1,repeat:u.repeat})]}))]}))]}))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[999],{3714:(e,r,t)=>{t.r(r),t.d(r,{default:()=>ae});var a=t(5944),o=t(7294),n=t(2988);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},s.apply(this,arguments)}function l(e,r){if(null==e)return{};var t,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}var i=255,c=100,p=e=>{var{r,g:t,b:a,a:o}=e,n=Math.max(r,t,a),s=n-Math.min(r,t,a),l=s?n===r?(t-a)/s:n===t?2+(a-r)/s:4+(r-t)/s:0;return{h:60*(l<0?l+6:l),s:n?s/n*c:0,v:n/i*c,a:o}},d=e=>{var{h:r,s:t,l:a,a:o}=h(e);return"hsla("+r+", "+t+"%, "+a+"%, "+o+")"},h=e=>{var{h:r,s:t,v:a,a:o}=e,n=(200-t)*a/c;return{h:r,s:n>0&&n<200?t*a/c/(n<=c?n:200-n)*c:0,l:n/2,a:o}},u=(Math.PI,e=>{var r,{r:t,g:a,b:o}=e;return"#"+(r=(t<<16|a<<8|o).toString(16),new Array(7-r.length).join("0")+r)}),g=e=>p(b(e)),b=e=>{var r=e.replace("#","");/^#?/.test(e)&&3===r.length&&(e="#"+r.charAt(0)+r.charAt(0)+r.charAt(1)+r.charAt(1)+r.charAt(2)+r.charAt(2));var t=new RegExp("[A-Za-z0-9]{2}","g"),[a,o,n=0,s]=e.match(t).map((e=>parseInt(e,16)));return{r:a,g:o,b:n,a:(null!=s?s:255)/i}},f=e=>{var{h:r,s:t,v:a,a:o}=e,n=r/60,l=t/c,p=a/c,d=Math.floor(n)%6,h=n-Math.floor(n),u=i*p*(1-l),g=i*p*(1-l*h),b=i*p*(1-l*(1-h));p*=i;var f={};switch(d){case 0:f.r=p,f.g=b,f.b=u;break;case 1:f.r=g,f.g=p,f.b=u;break;case 2:f.r=u,f.g=p,f.b=b;break;case 3:f.r=u,f.g=g,f.b=p;break;case 4:f.r=b,f.g=u,f.b=p;break;case 5:f.r=p,f.g=u,f.b=g}return f.r=Math.round(f.r),f.g=Math.round(f.g),f.b=Math.round(f.b),s({},f,{a:o})},v=e=>{var{r,g:t,b:a,a:o}=f(e);return"rgba("+r+", "+t+", "+a+", "+o+")"},x=e=>u(f(e)),m=e=>{var r,t,a,o,n,s,l,i,c;return"string"==typeof e&&y(e)?(s=g(e),i=e):"string"!=typeof e&&(s=e),s&&(a=(e=>{var{h:r,s:t,v:a}=e;return{h:r,s:t,v:a}})(s),n=h(s),c=(e=>{var{r,g:t,b:a,a:o}=e,n="number"==typeof o&&(255*o|256).toString(16).slice(1);return""+u({r,g:t,b:a})+(n||"")})(o=f(s)),i=x(s),t=(e=>{var{h:r,s:t,l:a}=e;return{h:r,s:t,l:a}})(n),l=(e=>{var{r,g:t,b:a}=e,o=function(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},n=o(r/255),s=o(t/255),l=o(a/255),i={};return i.x=.4124*n+.3576*s+.1805*l,i.y=.2126*n+.7152*s+.0722*l,i.bri=.0193*n+.1192*s+.9505*l,i})(r=(e=>{var{r,g:t,b:a}=e;return{r,g:t,b:a}})(o))),{rgb:r,hsl:t,hsv:a,rgba:o,hsla:n,hsva:s,hex:i,hexa:c,xy:l}},y=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e);function w(e){var r=(0,o.useRef)(e);return(0,o.useEffect)((()=>{r.current=e})),(0,o.useCallback)(((e,t)=>r.current&&r.current(e,t)),[])}var C=e=>"touches"in e,k=e=>{!C(e)&&e.preventDefault&&e.preventDefault()},A=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e<r?r:e},j=(e,r)=>{var t=e.getBoundingClientRect(),a=C(r)?r.touches[0]:r;return{left:A((a.pageX-(t.left+window.pageXOffset))/t.width),top:A((a.pageY-(t.top+window.pageYOffset))/t.height),width:t.width,height:t.height,x:a.pageX-(t.left+window.pageXOffset),y:a.pageY-(t.top+window.pageYOffset)}},N=t(5893),B=["prefixCls","className","onMove","onDown"],R=o.forwardRef(((e,r)=>{var{prefixCls:t="w-color-interactive",className:a,onMove:n,onDown:i}=e,c=l(e,B),p=(0,o.useRef)(null),d=(0,o.useRef)(!1),[h,u]=(0,o.useState)(!1),g=w(n),b=w(i),f=(0,o.useCallback)((e=>{k(e),p.current&&((C(e)?e.touches.length>0:e.buttons>0)?null==g||g(j(p.current,e),e):u(!1))}),[g]),v=(0,o.useCallback)((()=>u(!1)),[]),x=(0,o.useCallback)((e=>{e?(window.addEventListener(d.current?"touchmove":"mousemove",f),window.addEventListener(d.current?"touchend":"mouseup",v)):(window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",v),window.removeEventListener("touchmove",f),window.removeEventListener("touchend",v))}),[f,v]);(0,o.useEffect)((()=>(x(h),()=>{x(!1)})),[h,f,v,x]);var m=(0,o.useCallback)((e=>{k(e.nativeEvent),(e=>!(d.current&&!C(e)||(d.current=C(e),0)))(e.nativeEvent)&&p.current&&(null==b||b(j(p.current,e.nativeEvent),e.nativeEvent),u(!0))}),[b]);return(0,N.jsx)("div",s({},c,{className:[t,a||""].filter(Boolean).join(" "),style:s({},c.style,{touchAction:"none"}),ref:p,tabIndex:0,onMouseDown:m,onTouchStart:m}))}));R.displayName="Interactive";const S=R;var E=e=>{var{className:r,color:t,left:a,top:n,prefixCls:s}=e,l={position:"absolute",top:n,left:a},i={"--saturation-pointer-box-shadow":"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",width:6,height:6,transform:"translate(-3px, -3px)",boxShadow:"var(--saturation-pointer-box-shadow)",borderRadius:"50%",backgroundColor:t};return(0,o.useMemo)((()=>(0,N.jsx)("div",{className:s+"-pointer "+(r||""),style:l,children:(0,N.jsx)("div",{className:s+"-fill",style:i})})),[n,a,t,r,s])},P=["prefixCls","radius","pointer","className","hue","style","hsva","onChange"],F=o.forwardRef(((e,r)=>{var t,{prefixCls:a="w-color-saturation",radius:n=0,pointer:i,className:c,hue:p=0,style:h,hsva:u,onChange:g}=e,b=l(e,P),f=s({width:200,height:200,borderRadius:n},h,{position:"relative"}),v=(e,r)=>{g&&u&&g({h:u.h,s:100*e.left,v:100*(1-e.top),a:u.a})},x=(0,o.useMemo)((()=>{if(!u)return null;var e={top:100-u.v+"%",left:u.s+"%",color:d(u)};return i&&"function"==typeof i?i(s({prefixCls:a},e)):(0,N.jsx)(E,s({prefixCls:a},e))}),[u,i,a]);return(0,N.jsx)(S,s({className:[a,c||""].filter(Boolean).join(" ")},b,{style:s({position:"absolute",inset:0,cursor:"crosshair",backgroundImage:"linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl("+(null!=(t=null==u?void 0:u.h)?t:p)+", 100%, 50%))"},f),ref:r,onMove:v,onDown:v,children:x}))}));F.displayName="Saturation";const L=F;var M=["className","prefixCls","left","top","style","fillProps"],D=e=>{var{className:r,prefixCls:t,left:a,top:o,style:n,fillProps:i}=e,c=l(e,M),p=s({},n,{position:"absolute",left:a,top:o}),d=s({width:18,height:18,boxShadow:"var(--alpha-pointer-box-shadow)",borderRadius:"50%",backgroundColor:"var(--alpha-pointer-background-color)"},null==i?void 0:i.style,{transform:a?"translate(-9px, -1px)":"translate(-1px, -9px)"});return(0,N.jsx)("div",s({className:t+"-pointer "+(r||""),style:p},c,{children:(0,N.jsx)("div",s({className:t+"-fill"},i,{style:d}))}))},z=["prefixCls","className","hsva","background","bgProps","innerProps","pointerProps","radius","width","height","direction","style","onChange","pointer"],I=o.forwardRef(((e,r)=>{var{prefixCls:t="w-color-alpha",className:a,hsva:o,background:n,bgProps:i={},innerProps:c={},pointerProps:p={},radius:h=0,width:u,height:g=16,direction:b="horizontal",style:f,onChange:v,pointer:x}=e,m=l(e,z),y=e=>{v&&v(s({},o,{a:"horizontal"===b?e.left:e.top}),e)},w=d(Object.assign({},o,{a:1})),C="linear-gradient(to "+("horizontal"===b?"right":"bottom")+", rgba(244, 67, 54, 0) 0%, "+w+" 100%)",k={};"horizontal"===b?k.left=100*o.a+"%":k.top=100*o.a+"%";var A=s({"--alpha-background-color":"#fff","--alpha-pointer-background-color":"rgb(248, 248, 248)","--alpha-pointer-box-shadow":"rgb(0 0 0 / 37%) 0px 1px 4px 0px",borderRadius:h,background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==) left center",backgroundColor:"var(--alpha-background-color)"},{width:u,height:g},f,{position:"relative"}),j=x&&"function"==typeof x?x(s({prefixCls:t},p,k)):(0,N.jsx)(D,s({},p,{prefixCls:t},k));return(0,N.jsxs)("div",s({},m,{className:[t,t+"-"+b,a||""].filter(Boolean).join(" "),style:A,ref:r,children:[(0,N.jsx)("div",s({},i,{style:s({inset:0,position:"absolute",background:n||C,borderRadius:h},i.style)})),(0,N.jsx)(S,s({},c,{style:s({},c.style,{inset:0,zIndex:1,position:"absolute"}),onMove:y,onDown:y,children:j}))]}))}));I.displayName="Alpha";const O=I;var T=["prefixCls","placement","label","value","className","style","labelStyle","inputStyle","onChange","onBlur","renderInput"],Y=o.forwardRef(((e,r)=>{var{prefixCls:t="w-color-editable-input",placement:a="bottom",label:n,value:i,className:c,style:p,labelStyle:d,inputStyle:h,onChange:u,onBlur:g,renderInput:b}=e,f=l(e,T),[v,x]=(0,o.useState)(i),m=(0,o.useRef)(!1);(0,o.useEffect)((()=>{e.value!==v&&(m.current||x(e.value))}),[e.value]);var y={};"bottom"===a&&(y.flexDirection="column"),"top"===a&&(y.flexDirection="column-reverse"),"left"===a&&(y.flexDirection="row-reverse");var w=s({"--editable-input-label-color":"rgb(153, 153, 153)","--editable-input-box-shadow":"rgb(204 204 204) 0px 0px 0px 1px inset","--editable-input-color":"#666",position:"relative",alignItems:"center",display:"flex",fontSize:11},y,p),C=s({width:"100%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,fontSize:11,background:"transparent",boxSizing:"border-box",border:"none",color:"var(--editable-input-color)",boxShadow:"var(--editable-input-box-shadow)"},h),k=s({value:v,onChange:function(e,r){var t=(r||e.target.value).trim().replace(/^#/,"");/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(t)&&u&&u(e,t);var a=(e=>Number(String(e).replace(/%/g,"")))(t);isNaN(a)||u&&u(e,a),x(t)},onBlur:function(r){m.current=!1,x(e.value),g&&g(r)},autoComplete:"off",onFocus:()=>m.current=!0},f,{style:C});return(0,N.jsxs)("div",{className:[t,c||""].filter(Boolean).join(" "),style:w,children:[b?b(k,r):(0,N.jsx)("input",s({ref:r},k)),n&&(0,N.jsx)("span",{style:s({color:"var(--editable-input-label-color)",textTransform:"capitalize"},d),children:n})]})}));Y.displayName="EditableInput";const G=Y;var X=["prefixCls","hsva","placement","rProps","gProps","bProps","aProps","className","style","onChange"],U=o.forwardRef(((e,r)=>{var{prefixCls:t="w-color-editable-input-rgba",hsva:a,placement:o="bottom",rProps:n={},gProps:i={},bProps:c={},aProps:d={},className:h,style:u,onChange:g}=e,b=l(e,X),v=a?f(a):{};function x(e){var r=Number(e.target.value);r&&r>255&&(e.target.value="255"),r&&r<0&&(e.target.value="0")}var y=(e,r,t)=>{"number"==typeof e&&("a"===r&&(e<0&&(e=0),e>100&&(e=100),g&&g(m(p(s({},v,{a:e/100}))))),e>255&&(e=255,t.target.value="255"),e<0&&(e=0,t.target.value="0"),"r"===r&&g&&g(m(p(s({},v,{r:e})))),"g"===r&&g&&g(m(p(s({},v,{g:e})))),"b"===r&&g&&g(m(p(s({},v,{b:e})))))};return(0,N.jsxs)("div",s({ref:r,className:[t,h||""].filter(Boolean).join(" ")},b,{style:s({fontSize:11,display:"flex"},u),children:[(0,N.jsx)(G,s({label:"R",value:v.r||0,onBlur:x,placement:o,onChange:(e,r)=>y(r,"r",e)},n,{style:s({},n.style)})),(0,N.jsx)(G,s({label:"G",value:v.g||0,onBlur:x,placement:o,onChange:(e,r)=>y(r,"g",e)},i,{style:s({marginLeft:5},n.style)})),(0,N.jsx)(G,s({label:"B",value:v.b||0,onBlur:x,placement:o,onChange:(e,r)=>y(r,"b",e)},c,{style:s({marginLeft:5},c.style)})),d&&(0,N.jsx)(G,s({label:"A",value:v.a?parseInt(String(100*v.a),10):0,onBlur:x,placement:o,onChange:(e,r)=>y(r,"a",e)},d,{style:s({marginLeft:5},d.style)}))]}))}));U.displayName="EditableInputRGBA";const V=U;var Z=["prefixCls","className","hue","onChange","direction"],Q=o.forwardRef(((e,r)=>{var{prefixCls:t="w-color-hue",className:a,hue:o=0,onChange:n,direction:i="horizontal"}=e,c=l(e,Z);return(0,N.jsx)(O,s({ref:r,className:t+" "+(a||"")},c,{direction:i,background:"linear-gradient(to "+("horizontal"===i?"right":"bottom")+", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",hsva:{h:o,s:100,v:100,a:o/360},onChange:(e,r)=>{n&&n({h:"horizontal"===i?360*r.left:360*r.top})}}))}));Q.displayName="Hue";const W=Q;var J=["prefixCls","className","color","colors","style","rectProps","onChange","addonAfter","addonBefore","rectRender"],H=o.forwardRef(((e,r)=>{var{prefixCls:t="w-color-swatch",className:a,color:n,colors:i=[],style:c,rectProps:p={},onChange:d,addonAfter:h,addonBefore:u,rectRender:b}=e,f=l(e,J),v=s({"--swatch-background-color":"rgb(144, 19, 254)",background:"var(--swatch-background-color)",height:15,width:15,marginRight:5,marginBottom:5,cursor:"pointer",position:"relative",outline:"none",borderRadius:2},p.style),x=(e,r)=>{d&&d(g(e),m(g(e)),r)};return(0,N.jsxs)("div",s({ref:r},f,{className:[t,a||""].filter(Boolean).join(" "),style:s({display:"flex",flexWrap:"wrap",position:"relative"},c),children:[u&&o.isValidElement(u)&&u,i&&Array.isArray(i)&&i.map(((e,r)=>{var t="",a="";"string"==typeof e&&(t=e,a=e),"object"==typeof e&&e.color&&(t=e.title||e.color,a=e.color);var l=n&&n.toLocaleLowerCase()===a.toLocaleLowerCase(),i=b&&b({title:t,color:a,checked:!!l,style:s({},v,{background:a}),onClick:e=>x(a,e)});if(i)return(0,N.jsx)(o.Fragment,{children:i},r);var c=p.children&&o.isValidElement(p.children)?o.cloneElement(p.children,{color:a,checked:l}):null;return(0,N.jsx)("div",s({tabIndex:0,title:t,onClick:e=>x(a,e)},p,{children:c,style:s({},v,{background:a})}),r)})),h&&o.isValidElement(h)&&h]}))}));H.displayName="Swatch";const $=H;var K=["prefixCls","className","onChange","width","presetColors","color","editableDisable","disableAlpha","style"],_=["#D0021B","#F5A623","#f8e61b","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"],q=e=>(0,N.jsx)("div",{style:{boxShadow:"rgb(0 0 0 / 60%) 0px 0px 2px",width:4,top:1,bottom:1,left:e.left,borderRadius:1,position:"absolute",backgroundColor:"#fff"}}),ee=o.forwardRef(((e,r)=>{var{prefixCls:t="w-color-sketch",className:a,onChange:n,width:i=218,presetColors:c=_,color:p,editableDisable:d=!0,disableAlpha:h=!1,style:u}=e,b=l(e,K),[f,w]=(0,o.useState)({h:209,s:36,v:90,a:1});(0,o.useEffect)((()=>{"string"==typeof p&&y(p)&&w(g(p)),"object"==typeof p&&w(p)}),[p]);var C=e=>{w(e),n&&n(m(e))},k=s({"--sketch-background":"rgb(255, 255, 255)","--sketch-box-shadow":"rgb(0 0 0 / 15%) 0px 0px 0px 1px, rgb(0 0 0 / 15%) 0px 8px 16px","--sketch-swatch-box-shadow":"rgb(0 0 0 / 15%) 0px 0px 0px 1px inset","--sketch-alpha-box-shadow":"rgb(0 0 0 / 15%) 0px 0px 0px 1px inset, rgb(0 0 0 / 25%) 0px 0px 4px inset","--sketch-swatch-border-top":"1px solid rgb(238, 238, 238)",background:"var(--sketch-background)",borderRadius:4,boxShadow:"var(--sketch-box-shadow)",width:i},u),A={borderRadius:2,background:v(f),boxShadow:"var(--sketch-alpha-box-shadow)"};return(0,N.jsxs)("div",s({},b,{className:t+" "+(a||""),ref:r,style:k,children:[(0,N.jsxs)("div",{style:{padding:"10px 10px 8px"},children:[(0,N.jsx)(L,{hsva:f,style:{width:"auto",height:150},onChange:e=>C(s({},f,e,{a:f.a}))}),(0,N.jsxs)("div",{style:{display:"flex",marginTop:4},children:[(0,N.jsxs)("div",{style:{flex:1},children:[(0,N.jsx)(W,{width:"auto",height:10,hue:f.h,pointer:q,innerProps:{style:{marginLeft:1,marginRight:5}},onChange:e=>C(s({},f,e))}),!h&&(0,N.jsx)(O,{width:"auto",height:10,hsva:f,pointer:q,style:{marginTop:4},innerProps:{style:{marginLeft:1,marginRight:5}},onChange:e=>C(s({},f,{a:e.a}))})]}),!h&&(0,N.jsx)(O,{width:24,height:24,hsva:f,radius:2,style:{marginLeft:4},bgProps:{style:{background:"transparent"}},innerProps:{style:A},pointer:()=>(0,N.jsx)(o.Fragment,{})})]})]}),d&&(0,N.jsxs)("div",{style:{display:"flex",margin:"0 10px 3px 10px"},children:[(0,N.jsx)(G,{label:"Hex",value:x(f).replace(/^#/,"").toLocaleUpperCase(),onChange:(e,r)=>{var t;"string"==typeof(t=r)&&y(t)&&/(3|6)/.test(String(t.length))&&C(g(t))},style:{minWidth:58}}),(0,N.jsx)(V,{hsva:f,style:{marginLeft:6},aProps:!h&&{},onChange:e=>C(e.hsva)})]}),c&&c.length>0&&(0,N.jsx)($,{style:{borderTop:"var(--sketch-swatch-border-top)",paddingTop:10,paddingLeft:10},colors:c,color:x(f),onChange:e=>C(e),rectProps:{style:{marginRight:10,marginBottom:10,borderRadius:3,boxShadow:"var(--sketch-swatch-box-shadow)"}}})]}))}));ee.displayName="Sketch";const re=ee;var te=function(){return te=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},te.apply(this,arguments)};const ae=function(e){var r=e.element,t=e.fieldLabel,s=e.responsiveStyles,l=e.fieldVal,i=void 0===l?"FFFFFFFF":l,c=e.editMode,p=e.onChange,d=void 0===p?function(){}:p,h=e.elementProps,u=void 0===h?{}:h,g=e.disabled,b=void 0!==g&&g,f=e.children,v=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var a,o,n=t.call(e),s=[];try{for(;(void 0===r||r-- >0)&&!(a=n.next()).done;)s.push(a.value)}catch(e){o={error:e}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s}((0,o.useState)(!1),2),x=v[0],m=v[1];return(0,a.BX)("div",te({css:te({maxWidth:"100%",width:"100%",position:"relative",pointerEvents:c||b?"none":"auto"},s.getTarget("fc"))},u,{children:[f,t,(0,a.tZ)("div",{css:te({width:"100%",background:"#".concat(i),cursor:"pointer"},s.getTarget("field")),onClick:function(){c||b||m((function(e){return!e}))}}),x?(0,a.BX)("div",te({css:{position:"absolute",zIndex:n.rM+1}},{children:[(0,a.tZ)("div",{css:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"},onClick:function(){return m(!1)}}),(0,a.tZ)(re,{"aria-label":r.properties.aria_label,color:"#".concat(i),onChange:function(e){var r=e.hex.substring(1,7),t=function(e){var r=Math.max(0,Math.min(1,e));return Math.round(255*r).toString(16).toUpperCase().padStart(2,"0")}(e.rgba.a);d("".concat(r).concat(t))}})]})):null]}))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[329],{4394:(e,n,t)=>{t.r(n),t.d(n,{default:()=>h});var r=t(5944),o=t(7294),a=function(){return a=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},a.apply(this,arguments)};const i=function(){return(0,r.tZ)("div",a({style:{padding:"16px",border:"2px dashed #d1d5db",borderRadius:"4px",textAlign:"center"}},{children:(0,r.BX)("div",a({style:{color:"#4b5563"}},{children:[(0,r.tZ)("div",a({style:{fontSize:"14px"}},{children:"Custom Component"})),(0,r.tZ)("div",a({style:{fontSize:"12px",marginTop:"4px"}},{children:"No code provided"}))]}))}))},c=function(){return(0,r.tZ)("div",a({style:{position:"absolute",top:0,left:0,right:0,padding:"8px",backgroundColor:"#dbeafe",color:"#2563eb",fontSize:"14px"}},{children:"Loading..."}))},l=function(e){var n=e.error;return(0,r.BX)("div",a({style:{position:"absolute",top:0,left:0,right:0,padding:"8px",backgroundColor:"#fee2e2",color:"#dc2626",fontSize:"14px"}},{children:["Error: ",n]}))};var s=t(9479),d=function(e,n,t){return"\n<!DOCTYPE html>\n<html>\n <head>\n <script src=\"https://cdn.jsdelivr.net/npm/@babel/standalone/babel.min.js\"><\/script>\n <style>\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n \n body {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n line-height: 1.5;\n overflow: hidden;\n }\n\n #root {\n min-height: 100vh;\n width: 100%;\n }\n </style>\n <script type=\"importmap\">\n ".concat((r=function(e){var n=e.split("\n"),t=new Set;return n.forEach((function(e){if((e=e.trim()).startsWith("import")){var n=e.match(/from\s+['"]([^'"]+)['"]/);n&&"react"!==n[1]&&t.add(n[1])}})),Array.from(t)}(e),o=r.map((function(e){return function(e){try{return new URL(e),!0}catch(e){return!1}}(e)?'"'.concat(e,'": "').concat(e,'"'):'"'.concat(e,'": "https://esm.sh/').concat(e,'/?external=react"')})),'{\n "imports": {\n "react": "https://esm.sh/react@18.2.0",\n "react-dom": "https://esm.sh/react-dom@18.2.0",\n "react-dom/client": "https://esm.sh/react-dom@18.2.0/client",\n "react/jsx-runtime": "https://esm.sh/react@18.2.0/jsx-runtime"'.concat(r.length?",":"","\n ").concat(o.join(",\n"),"\n }\n}")),"\n <\/script>\n <script type=\"module\">\n import React from 'react';\n import { createRoot } from 'react-dom/client';\n\n // Store the elementId for use in postMessage\n window.elementId = '").concat(t,"';\n\n (async () => {\n try {\n const transformedCode = Babel.transform(\n `").concat(e,"`,\n {\n presets: ['react'],\n filename: 'dynamic.jsx'\n }\n ).code;\n\n // Create a blob URL for the transformed code\n const blob = new Blob([transformedCode], { type: 'text/javascript' });\n const moduleUrl = URL.createObjectURL(blob);\n\n // Import the component\n const { default: UserComponent } = await import(moduleUrl);\n\n // Set up the root and store it\n const container = document.getElementById('root');\n const root = createRoot(container);\n window.rootRef = root;\n\n window.parent.postMessage({ \n type: 'LOADING_COMPLETE',\n elementId: window.elementId\n }, '*');\n\n // Handle resize\n const resizeObserver = new ResizeObserver(entries => {\n const height = entries[0].contentRect.height;\n window.parent.postMessage({ \n type: 'resize', \n height,\n elementId: window.elementId\n }, '*');\n });\n \n resizeObserver.observe(container);\n\n // Store references for updates\n window.React = React;\n window.UserComponent = UserComponent;\n } catch (err) {\n console.error('Error:', err);\n window.parent.postMessage({ \n type: 'error',\n error: `${err.name}: ${err.message}`,\n elementId: window.elementId\n }, '*');\n }\n })();\n <\/script>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>\n");var r,o},u=function(){return u=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},u.apply(this,arguments)},p=function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,a=t.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(o)throw o.error}}return i},f=t(4416),m=function(){return m=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},m.apply(this,arguments)};const h=(0,o.memo)((function(e){var n,t=e.element,a=e.elementProps,h=void 0===a?{}:a,v=e.responsiveStyles,y=e.onChange,b=e.rawValue,g=e.required,w=e.disabled,x=e.fieldStyles,C=e.editMode,R=e.rightToLeft,S=e.index,O=t.servar.metadata.code,E=(!O||""===O.trim())&&C,I=(0,o.useMemo)((function(){var e;return{fieldProperties:{description:t.servar.name,required:g,disabled:w,custom:(null===(e=t.servar.metadata)||void 0===e?void 0:e.custom)||{},aria_label:t.properties.aria_label},fieldStyles:x||{},formContext:{rightToLeft:R||!1,editMode:C||!1}}}),[g,w,x,R,C,null===(n=t.servar.metadata)||void 0===n?void 0:n.custom]),k=function(e){var n=this,t=e.componentCode,r=e.elementId,a=e.value,i=e.onChange,c=e.customProps,l=(0,o.useRef)(null),f=(0,o.useRef)(null),m=p((0,o.useState)(null),2),h=m[0],v=m[1],y=p((0,o.useState)(!0),2),b=y[0],g=y[1],w=function(e){var n,t;void 0===e&&(e=!1);var o=l.current;if(o&&f.current&&(!b||e)){var i=f.current,d=null===(n=o.contentWindow)||void 0===n?void 0:n.React,p=null===(t=o.contentWindow)||void 0===t?void 0:t.UserComponent;d&&p&&i.render(d.createElement(d.StrictMode,null,d.createElement(p,u({value:a,onChange:function(e){var n;null===(n=o.contentWindow)||void 0===n||n.parent.postMessage({type:"valueChange",value:e,elementId:r},(0,s.Kv)().location.origin)}},c))))}};return(0,o.useEffect)((function(){var e,o,a,c;e=n,o=void 0,c=function(){var e,n,o;return function(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(a){if(!(e=l.current))return[2];try{return g(!0),n=d(t,0,r),o=function(n){var t,o,a,c,l;(null===(t=n.data)||void 0===t?void 0:t.elementId)===r&&("LOADING_COMPLETE"===n.data.type?(g(!1),v(null),f.current=null===(o=e.contentWindow)||void 0===o?void 0:o.rootRef,w(!0)):(null===(a=n.data)||void 0===a?void 0:a.error)?(v(n.data.error),g(!1)):"resize"===(null===(c=n.data)||void 0===c?void 0:c.type)&&e?e.style.height="".concat(n.data.height,"px"):"valueChange"===(null===(l=n.data)||void 0===l?void 0:l.type)&&(null==i||i(n.data.value)))},(0,s.Kv)().addEventListener("message",o),e.srcdoc=n,[2,function(){(0,s.Kv)().removeEventListener("message",o)}]}catch(e){v(e.message),g(!1)}return[2]}))},new((a=void 0)||(a=Promise))((function(n,t){function r(e){try{l(c.next(e))}catch(e){t(e)}}function i(e){try{l(c.throw(e))}catch(e){t(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,i)}l((c=c.apply(e,o||[])).next())}))}),[t]),(0,o.useEffect)((function(){w()}),[a,b,c]),{iframeRef:l,error:h,loading:b}}({componentCode:t.servar.metadata.code,elementId:null!=S?"".concat(t.id,"[").concat(S,"]"):t.id,value:b,onChange:y,customProps:I}),j=k.iframeRef,L=k.error,M=k.loading;return(0,r.BX)("div",m({css:m({maxWidth:"100%",width:"100%",height:"auto",position:"relative",pointerEvents:C?"none":"auto"},null==v?void 0:v.getTarget("fc"))},h,{children:[E?(0,r.tZ)(i,{}):(0,r.BX)(r.HY,{children:[L&&(0,r.tZ)(l,{error:L}),M&&(0,r.tZ)(c,{}),(0,r.tZ)("iframe",{ref:j,sandbox:"allow-scripts allow-same-origin",style:{width:"100%",border:"none",backgroundColor:"transparent",overflow:"hidden",display:"block"}})]}),(0,r.tZ)(f.Z,{id:t.servar.key,name:t.servar.key,"aria-label":t.properties.aria_label})]}))}))}}]);