(window.webpackJsonpweb=window.webpackJsonpweb||[]).push([[0],{1345:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="Translation",t.labelBodyText="Translation Body",t.btnExampleTitle="CLICK ME",t.languageApiContentType="application/json",t.languageApiMethodType="GET",t.translateApiContentType="application/json",t.translateApiMethodType="POST",t.translateApiBaseUrl="https://libretranslate.de/",t.translateApiEndPoint="translate",t.languagesApiEndPoint="languages"},1346:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1347:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1348:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="cfconnectorlogic",t.labelBodyText="cfconnectorlogic Body",t.btnExampleTitle="CLICK ME"},1352:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1353:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1354:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="cfprojecttemplates2",t.labelBodyText="cfprojecttemplates2 Body",t.btnExampleTitle="CLICK ME"},1355:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.productApiContentType="application/json",t.apiMethodTypeGet="GET",t.productAPiEndPoint="catalogue/catalogues"},1356:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.facebookButtonText="Sign up With Facebook",t.googleButtonText="Sign up With Google",t.signUpButtonText="Sign up with email and password",t.orText="or",t.signUpBodyText="Value proposition: why users should sign up.",t.signUpTitleText="Sign up"},1361:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1362:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1363:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAASCAYAAAC5DOVpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGfSURBVHgBrZNBUsJAEEW7A+wsKt4ATiBF3DvcICWwNp4AboDcAG+QrEUrnCDDWtDcQI6ALoVM2xMhDhAooOxFKpWZef3/7wnUREvUxa0H/1DoNNqkX/gx44dUsOjHMpzBGZXBzCICXwEFsRxKOKGsPwD2mT1LOyB4BcTIabTeT4kgU5bQoqrt1UXbA4QuAlxljdIIkr4CJQ9FsANbL1zzYIgV8pY788BvBPm5Wvu6TDivaTT0SlSoMiLYjKD04YhWpG9CrjLdkfWN91kRwrW/oOQiYo93VzKlqwje5IufO03eEvNAYgaPuIGGz81VRzRdQkvnemNCc20S4CWC+izwu52zngDOkWhDBIOhaCBGrCYswyKUW0p01dimBUWetNVBwyYXu6CgDEs/gyW07OZltYJ0OHlty04NpephbBE9TIyLXYQ9pSfFNnsMEcbnOZAKLLD8V/kUb58p7kKabgGwsw3hKT5eqO9BXgQ7MG2l3mh7aGSurSCpwVQ+h3BEZTDu3DUhOo/piT+6hmnZ9rFWDsNI3fO9qujRyug8yLp+ACkX2fx9SOkBAAAAAElFTkSuQmCC"},1364:function(e,t,a){e.exports=a.p+"static/media/image_videocam.39571c77.svg"},1365:function(e,t,a){e.exports=a.p+"static/media/image_book.a4e35467.svg"},1366:function(e,t,a){e.exports=a.p+"static/media/image_call_split.d2408051.svg"},1367:function(e,t,a){e.exports=a.p+"static/media/image_link.276cd8df.svg"},1368:function(e,t,a){e.exports=a.p+"static/media/image_list.86893061.svg"},1369:function(e,t,a){e.exports=a.p+"static/media/image_toll.dacf63af.svg"},1370:function(e,t,a){e.exports=a.p+"static/media/image_update.36b0ac4b.svg"},1371:function(e,t,a){e.exports=a.p+"static/media/image_star_border.e69b8dc0.svg"},1372:function(e,t,a){e.exports=a.p+"static/media/image_copy.76cfa97d.svg"},1373:function(e,t,a){e.exports=a.p+"static/media/image_category.00f38d82.svg"},1374:function(e,t,a){e.exports=a.p+"static/media/image_arrow_right.5c3a7416.svg"},1375:function(e,t,a){e.exports=a.p+"static/media/image_all_inbox.69928291.svg"},1376:function(e,t,a){e.exports=a.p+"static/media/view_.61957319.svg"},1377:function(e,t,a){e.exports=a.p+"static/media/button_close.d5e16c8e.svg"},1380:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="ProjectTemplates",t.labelBodyText="ProjectTemplates Body",t.projectAPiEndPoint="bx_block_projecttemplates/project_templates",t.btnExampleTitle="CLICK ME",t.createCategoryEndpoint="bx_block_chatbot6/categories",t.createTemplateEndpoint="bx_block_chatbot6/card_templates",t.allCategoriesEndpoint="bx_block_chatbot6/categories",t.allTemplatesEndpoint="bx_block_chatbot6/card_templates",t.editCategoryEndpoint="bx_block_chatbot6/categories",t.editTemplateEndpoint="bx_block_chatbot6/card_templates"},1381:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1382:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1383:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="cfmicrosoftazureopenaiintegration1",t.labelBodyText="cfmicrosoftazureopenaiintegration1 Body",t.btnExampleTitle="CLICK ME"},1384:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1385:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1386:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="cftoggledraftvspublishedchatbot",t.labelBodyText="cftoggledraftvspublishedchatbot Body",t.btnExampleTitle="CLICK ME"},1387:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentTypeApiGetCountryCodes="application/json",t.apiEndPointGetCountryCodes="account/accounts/country_code_and_flag",t.apiGetCountryCodesType="GET",t.countryPlaceHolder="Select Country",t.countryPlaceHolderMobile="Type Here..."},1401:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1402:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1403:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ACCOUNT_TYPE_EMAIL="EmailAccount",t.ACCOUNT_TYPE_SOCIAL="SocialAccount",t.ACCOUNT_TYPE_PHONE="SmsAccount",t.contentTypeApiUpdateUser="application/json",t.apiEndPointUpdateUser="profile/profile",t.apiUpdateUserType="PUT",t.urlGetValidations="profile/validations",t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.contenttypeApiValidateMobileNo="application/json",t.endPointApiValidateMobileNo="profile/change_phone_validation",t.callTypeApiValidateMobileNo="POST",t.endPointApiGetUserProfile="profile/profile",t.contentTypeApiGetUserProfile="application/json",t.methodTypeApiGetUserProfile="GET",t.placeHolderEmail="Email",t.labelHeader="This is your profile, Here you can see and update your personal information.",t.labelFirstName="First name",t.lastName="Last name",t.labelArea="Area",t.labelMobile="Mobile",t.labelEmail="Email",t.labelCurrentPassword="Current password",t.labelNewPassword="New Password",t.labelRePassword="Re-Type Password",t.btnTextCancelPasswordChange="Cancel",t.btnTextSaveChanges="Save Changes",t.btnTextChangePassword="Change Password",t.errorCountryCodeNotSelected="Please select country code",t.errorMobileNoNotValid="Phone number is not valid.",t.errorTitle="Error",t.errorBothPasswordsNotSame="Passwords must match.",t.errorCurrentNewPasswordMatch="New password cannot match current password.",t.errorCurrentPasswordNotValid="Current password not valid.",t.errorNewPasswordNotValid="New password not valid.",t.errorReTypePasswordNotValid="Re-type password not valid.",t.hintCountryCode="Select Country",t.errorBlankField="can't be blank",t.errorEmailNotValid="Email not valid.",t.errorFirstName="Please enter a first name",t.errorLastName="Please enter a last name",t.atLeastOneCapitalLetterRegexp="[A-Z]{1,}",t.atLeastOnelowercaseRegexp="[a-z]{1,}",t.atLeastOneNumberRegexp="\\d{1,}",t.atLeastOneSymbolRegexp=/[!@#$%^&*()\-+={}[\]|\:";'<>?,.\/~`]+/,t.minEightCharLengthRegexp="^.{8,}",t.newPasswordRegexp=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()\-+={}[\]|:";'<>?,./~`])[A-Za-z\d!@#$%^&*()\-+={}[\]|:";'<>?,./~`]{8,}$/,t.showUserProfileApiEndPoint="account_block/accounts/show_profile"},1404:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1405:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1406:function(e,t,a){e.exports=a.p+"static/media/view_logo.3b374d8d.svg"},1407:function(e,t,a){e.exports=a.p+"static/media/I132932446018435433ZsWxCC5PncVsKfq9yxSBT.29b39495.svg"},1408:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.loginAPiEndPoint="bx_block_login/logins",t.loginAPiMethod="POST",t.loginApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="signuplogin",t.labelBodyText="signuplogin Body",t.btnExampleTitle="CLICK ME",t.labelTitle="Log in",t.regexp="^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},1411:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.jsonApiContentType="application/json",t.getApiMethodType="GET",t.audienceFollowersAPiEndPoint="visual_analytics/audience_followers",t.userStatisticAPiEndPoint="visual_analytics/user_statistic",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="visualanalytics",t.labelBodyText="visualanalytics Body"},1412:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1413:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1414:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.post="POST",t.delete="DELETE",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="catalogue1",t.labelBodyText="catalogue1 Body",t.btnExampleTitle="CLICK ME",t.createBotApiEndpoint="bx_block_chatbot6/chatbots",t.practiceEndpoint="bx_block_catalogue/tags/practice"},1415:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1416:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1417:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="termsandconditions",t.labelBodyText="termsandconditions Body",t.btnExampleTitle="CLICK ME"},1418:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1419:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1420:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="cfgoogledialogflowapiintegration",t.labelBodyText="cfgoogledialogflowapiintegration Body",t.btnExampleTitle="CLICK ME"},1421:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1422:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1423:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.placeHolderEmail="Email",t.labelHeader="Value proposition: why users should sign up.",t.labelFirstName="First name",t.lastName="Last name",t.labelEmail="Email",t.labelPassword="Password",t.labelRePassword="Re-Type Password",t.errorCountryCodeNotSelected="Please select country code",t.errorBlankField="can't be blank",t.labelLegalText="Legal text: By signing up you agree to our Terms & conditions and Privacy policy.",t.labelLegalTermCondition="Terms and conditions",t.labelLegalPrivacyPolicy="Privacy policy",t.btnTextSignUp="Sign up",t.errorPasswordNotValid="Password not valid.",t.errorTitle="Error",t.errorBothPasswordsNotSame="Passwords should be same.",t.errorAllFieldsAreMandatory="All fields are mandatory.",t.contentTypeApiAddDetail="application/json",t.accountsAPiEndPoint="account/accounts",t.apiMethodTypeAddDetail="POST",t.errorEmailNotValid="Email not valid.",t.urlGetValidations="profile/validations",t.validationApiContentType="application/json",t.validationApiMethodType="GET"},1424:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.httpGetType="GET",t.httpPostType="POST",t.httpDeleteType="DELETE",t.categoryApiContentType="application/json",t.categoryAPIEndPoint="categories/categories",t.subCategoryAPIEndPoint="categories/sub_categories",t.errorTitle="Error",t.errorAllFieldsAreMandatory="Please enter a category first",t.errorCategory="Please select a category first"},1425:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1426:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1427:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAbrwAAG68BXhqRHAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABQmSURBVHic7d3LjStZeoXRPy96Ig9kgtxoHzRQWdgaVNvQbrQBPSgPNCmAGijjKvMmM5OPOM+9FhAAwdGZEPtDEAy+XC6XAgCy/Bh9AACgPwEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAECol5eXv7y8vPxl9DmAMQQABHod/r9V1d9EAGTywYcwb8b/P9+899vlcvlz3KmA3twBgCDXxv/1tTsBEEYAQIhPxv8gAiCMAIAA34z/QQRAEAEAm7tx/A8iAEIIANjYneN/EAEQQADAph4c/4MIgM0JANjQk+N/EAGwMQEAmzlp/A8iADYlAGAjJ4//QQTAhgQAbKLR+B9EAGxGAMAGGo//QQTARgQALK7T+B9EAGxCAMDCOo//QQTABgQALGrQ+B9EACxOAMCCBo//QQTAwgQALGaS8T+IAFiUAICFTDb+BxEACxIAsIhJx/8gAmAxAgAWMPn4H0QALEQAwOQWGf+DCIBFCACY2GLjfxABsAABAJNadPwPIgAmJwBgQouP/0EEwMQEAExmk/E/iACYlACAiWw2/gcRABMSADCJTcf/IAJgMgIAJrD5+B9EAExEAMBgIeN/EAEwCQEAA4WN/0EEwAQEAAwSOv4HEQCDCQAYIHz8DyIABhIA0Jnxf0cEwCACADoy/leJABhAAEAnxv9LIgA6EwDQgfG/iQiAjgQANGb87yICoBMBAA0Z/4eIAOhAAEAjxv8pIgAaEwDQgPE/hQiAhgQAnMz4n0oEQCMCAE5k/JsQAdCAAICTGP+mRACcTADACYx/FyIATiQA4EnGvysRACcRAPAE4z+ECIATCAB4kPEfSgTAkwQAPMD4T0EEwBMEANzJ+E9FBMCDBADcwfhPSQTAAwQA3Mj4T00EwJ0EANzA+C9BBMAdBAB8w/gvRQTAjQQAfMH4L0kEwA0EAHzC+C9NBMA3BABcYfy3IALgCwIAfmH8tyIC4BMCAN4w/lsSAXCFAIBXxn9rIgB+IQCgjH8IEQBvCADiGf8oIgBeCQCiGf9IIgBKABDM+EcTAcQTAEQy/pQIIJwAII7x5w0RQCwBQBTjzxUigEgCgBjGny+IAOIIACIYf24gAogiANie8ecOIoAYAoCtGX8eIAKIIADYlvHnCSKA7QkAtmT8OYEIYGsCgO0Yf04kAtiWAGArxp8GRABbEgBsw/jTkAhgOwKALRh/OhABbEUAsDzjT0cigG0IAJZm/BlABLAFAcCyjD8DiQCWJwBYkvFnAiKApQkAlmP8mYgIYFkCgKUYfyYkAliSAGAZxp+JiQCWIwBYgvFnASKApQgApmf8WYgIYBkCgKkZfxYkAliCAGBaxp+FiQCmJwCYkvFnAyKAqQkApmP82YgIYFoCgKkYfzYkApiSAGAaxp+NiQCmIwCYgvEngAhgKgKA4Yw/QUQA0xAADGX8CSQCmIIAYBjjTzARwHACgCGMP4gAxhIAdGf84ScRwDACgK6MP3wgAhhCANCN8YdPiQC6EwB0YfzhWyKArgQAzRl/uJkIoBsBQFPGH+4mAuhCANCM8YeHiQCaEwA0YfzhaSKApgQApzP+cBoRQDMCgFMZfzidCKAJAcBpjD80IwI4nQDgFMYfmhMBnEoA8DTjD92IAE4jAHiK8YfuRACnEAA8zPjDMCKApwkAHmL8YTgRwFMEAHcz/jANEcDDBAB3Mf4wHRHAQwQANzP+MC0RwN0EADcx/jA9EcBdBADfMv6wDBHAzQQAXzL+sBwRwE0EAJ8y/rAsEcC3BABXGf8If7xe7EkE8CUBwAfGP8IfVfXX10sE7EsE8CkBwDvGP8IfVfXXy+Xyz8vl8s8SAbsTAVwlAPjJ+Ef4Of7HGyIgggjgAwFAVRn/EB/G/yACIogA3hEAGP8Mn47/QQREEAH8JADCGf8I347/QQREEAFUlQCIZvwj3Dz+BxEQQQQgAFIZ/wh3j/9BBEQQAeEEQCDjH+Hh8T+IgAgiIJgACGP8Izw9/gcREEEEhBIAQYx/hNPG/yACIoiAQAIghPGPcPr4H0RABBEQRgAEMP4Rmo3/QQREEAFBBMDmjH+E5uN/EAERREAIAbAx4x+h2/gfREAEERBAAGzK+EfoPv4HERBBBGxOAGzI+EcYNv4HERBBBGxMAGzG+EcYPv4HERBBBGxKAGzE+EeYZvwPIiCCCNiQANiE8Y8w3fgfREAEEbAZAbAB4x9h2vE/iIAIImAjAmBxxj/C9ON/EAERRMAmBMDCjH+EZcb/IAIiiIANCIBFGf8Iy43/QQREEAGLEwALMv4Rlh3/gwiIIAIWJgAWY/wjLD/+BxEQQQQsSgAsxPhH2Gb8DyIggghYkABYhPGPsN34H0RABBGwGAGwAOMfYdvxP4iACCJgIQJgcsY/wvbjfxABEUTAIgTAxIx/hJjxP4iACCJgAQJgUsY/Qtz4H0RABBEwOQEwIeMfIXb8DyIgggiYmACYjPGPED/+BxEQQQRMSgBMxPhHMP6/EAERRMCEBMAkjH8E4/8JERBBBExGAEzA+Ecw/t8QARFEwEQEwGDGP4Lxv5EIiCACJiEABjL+EYz/nURABBEwAQEwiPGPYPwfJAIiiIDBBMAAxj+C8X+SCIggAgYSAJ0Z/wjG/yQiIIIIGEQAdGT8Ixj/k4mACCJgAAHQifGPYPwbEQERREBnAqAD4x/B+DcmAiKIgI4EQGPGP4Lx70QERBABnQiAhox/BOPfmQiIIAI6EACNGP8Ixn8QERBBBDQmABow/hGM/2AiIIIIaEgAnMz4RzD+kxABEURAIwLgRMY/gvGfjAiIIAIaEAAnMf4RjP+kREAEEXAyAXAC4x/B+E9OBEQQAScSAE8y/hGM/yJEQAQRcBIB8ATjH8H4L0YERBABJxAADzL+EYz/okRABBHwJAHwAOMfwfgvTgREEAFPEAB3Mv4RjP8mREAEEfAgAXAH4x/B+G9GBEQQAQ8QADcy/hGM/6ZEQAQRcCcBcAPjH8H4b04ERBABdxAA3zD+EYx/CBEQQQTcSAB8wfhHMP5hREAEEXADAfAJ4x/B+IcSARFEwDcEwBXGP4LxDycCIoiALwiAXxj/CMafqhIBIUTAJwTAG8Y/gvHnHREQQQRcIQBeGf8Ixp+rREAEEfALAVDGP4Tx50siIIIIeCM+AIx/BOPPTURABBHwKjoAjH8E489dREAEEVDBAWD8Ixh/HiICIsRHQGQAGP8Ixp+niIAI0REQFwDGP4Lx5xQiIEJsBEQFgPGPYPw5lQiIEBkBMQFg/CMYf5oQARHiIiAiAIx/BONPUyIgQlQEbB8Axj+C8acLERAhJgK2DgDjH8H405UIiBARAdsGgPGPYPwZQgRE2D4CtgwA4x/B+DOUCIiwdQRsFwDGP4LxZwoiIMK2EbBVABj/CMafqYiACFtGwDYBYPwjGH+mJAIibBcBWwSA8Y9g/JmaCIiwVQQsHwDGP4LxZwkiIMI2EbB0ABj/CMafpYiACFtEwLIBYPwjGH+WJAIiLB8BSwaA8Y9g/FmaCIiwdAQsFwDGP4LxZwsiIMKyEbBUABj/CMafrYiACEtGwDIBYPwjGH+2JAIiLBcBSwSA8Y9g/NmaCIiwVARMHwDGP4LxJ4IIiLBMBEwdAMY/gvEnigiIsEQETBsAxj+C8SeSCIgwfQRMGQDGP4LxJ5oIiDB1BEwXAMY/gvGHEgEhpo2AqQLA+Ecw/vCGCIgwZQRMEwDGP4LxhytEQITpImCKADD+EYw/fEEERJgqAoYHgPGPYPzhBiIgwjQRMDQAjH8E4w93EAERpoiAYQFg/CMYf3iACIgwPAKGBIDxj2D84QkiIMLQCOgeAMY/gvGHE4iACMMioGsAGP8Ixh9OJAIiDImAbgFg/CMYf2hABEToHgFdAsD4RzD+0JAIiNA1ApoHgPGPYPyhAxEQoVsENA0A4x/B+ENHIiBClwhoFgDGP4LxhwFEQITmEdAkAIx/BOMPA4mACE0j4PQAMP4RjD9MQAREaBYBpwaA8Y9g/GEiIiBCkwg4LQCMfwTjDxMSARFOj4BTAsD4RzD+MDEREOHUCHg6AIx/BOMPCxABEU6LgKcCwPhHMP6wEBEQ4ZQIeDgAjH8E4w8LEgERno6AhwLA+Ecw/rAwERDhqQi4OwCMfwTjDxsQAREejoC7AsD4RzD+sBEREOGhCLg5AIx/BOMPGxIBEe6OgJsCwPhHMP6wMREQ4a4I+DYAjH8E4w8BRECEmyPgywAw/hGMPwQRARFuioBPA8D4RzD+EEgERPg2Aq4GgPGPYPwhmAiI8GUEfAgA4x/B+AMiIMOnEfAuAIx/BOMP/CQCIlyNgJ8BYPwjGH/gAxEQ4UME/Kgy/iGMP/ApERDhXQS8VJXx35/xB27y8vLyH1X1j6r699FnoZnfq+q3l/q/8f+vwYehHeMP3EUERPjvH1X196r6c/RJaML4A3fzdcD2/qyqv/+4XC6/V9VvJQJ2Y/yBh4mAbf1ZVb9dLpfff1RViYDtGH/gaSJgOz/Hv+rNzwBFwDaMP3AaEbCNd+Nf9cuDgETA8ow/cDoRsLwP41915VHAImBZxh9oRgQs6+r4V33yZ0AiYDnGH2hOBCzn0/Gv+uLvgEXAMow/0I0IWMaX41/1RQBUiYAFGH+gOxEwvW/Hv+qbAKgSARMz/sAwImBaN41/1Q0BUCUCJmT8geFEwHRuHv+qGwOgSgRMxPgD0xAB07hr/KvuCIAqETAB4w9MRwQMd/f4V90ZAFUiYCDjD0xLBAzz0PhXPRAAVSJgAOMPTE8EdPfw+Fc9GABVIqAj4w8sQwR089T4Vz0RAFUioAPjDyxHBDT39PhXPRkAVSKgIeMPLEsENHPK+FedEABVIqAB4w8sTwSc7rTxrzopAKpEwImMP7ANEXCaU8e/6sQAqBIBJzD+wHZEwNNOH/+qkwOgSgQ8wfgD2xIBD2sy/lUNAqBKBDzA+APbEwF3azb+VY0CoEoE3MH4AzFEwM2ajn9VwwCoEgE3MP5AHBHwrebjX9U4AKpEwBeMPxBLBHyqy/hXdQiAKhFwhfEH4omAD7qNf1WnAKgSAW8Yf4BXIuCnruNf1TEAqkRAGX+AD0RA//Gv6hwAVdERYPwBPhEcAUPGv2pAAFRFRoDxB/hGYAQMG/+qQQFQFRUBxh/gRkERMHT8qwYGQFVEBBh/gDsFRMDw8a8aHABVW0eA8Qd40MYRMMX4V00QAFVbRoDxB3jShhEwzfhXTRIAVVtFgPEHOMlGETDV+FdNFABVW0SA8Qc42QYRMN34V00WAFVLR4DxB2hk4QiYcvyrJgyAqiUjwPgDNLZgBEw7/lWTBkDVUhFg/AE6WSgCph7/qokDoGqJCDD+AJ0tEAHTj3/V5AFQNXUEGH+AQSaOgCXGv2qBAKiaMgKMP8BgE0bAMuNftUgAVE0VAcYfYBITRcBS41+1UABUTREBxh9gMhNEwHLjX7VYAFQNjQDjDzCpgRGw5PhXLRgAVUMiwPgDTG5ABCw7/lWLBkBV1wgw/gCL6BgBS49/1cIBUNUlAow/wGI6RMDy41+1eABUNY0A4w+wqIYRsMX4V20QAFVNIsD4AyyuQQRsM/5VmwRA1akRYPwBNnFiBGw1/lUbBUDVKRFg/AE2c0IEbDf+VZsFQNVTEWD8ATb1RARsOf5VGwZA1UMRYPwBNvdABGw7/lWbBkDVXRFg/AFC3BEBW49/1cYBUHVTBBh/gDA3RMD241+1eQBUfRkBxh8g1BcREDH+VQEBUHU1Aow/QLgrERAz/lUhAVD1LgL+VcYfgHoXAf+qoPGvqnq5XC6jz9DVy8vLv10ul/8ZfQ4A5pG4DXEBAAAEfQUAAPw/AQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEOh/AcdO935SL0DwAAAAAElFTkSuQmCC"},1428:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAbrwAAG68BXhqRHAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABQ7SURBVHic7d27jSTJoYXh04tVrgcUrgHXDdpAKmvhKvSBbhC0YI0g0Fdg52B2ph/1yEdEnO9TujqlAEo4PxJZVS+vr68BALr8cvUBAIDzCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEJ1AfDy8vI/V58BgLE0bkNVALy8vPw9yb9fXl7+7+qzADCGt03499tG1KgJgLc39vck/5vknyIAgLct+Gf+uw2/N0VARQB8N/6/vl36S0QAQLXvxv8vb5d+TVEELB8A74z/RgQAlHpn/Dc1EbB0AHwy/hsRAFDmk/HfVETAsgFww/hvRABAiRvGf7N8BCwZAHeM/0YEACzujvHfLB0BywXAA+O/EQEAi3pg/DfLRsBSAfDE+G9EAMBinhj/zZIRsEwA7DD+GxEAsIgdxn+zXAQsEQA7jv9GBABMbsfx3ywVAdMHwAHjvxEBAJM6YPw3y0TA1AFw4PhvRADAZA4c/80SETBtAJww/hsRADCJE8Z/M30ETBkAJ47/RgQADO7E8d9MHQHTBcAF478RAQCDumD8N9NGwFQBcOH4b0QAwGAuHP/NlBEwTQAMMP4bEQAwiAHGfzNdBEwRAAON/0YEAFxsoPHfTBUBwwfAgOO/EQEAFxlw/DfTRMDQATDw+G9EAMDJBh7/zRQRMGwATDD+GxEAcJIJxn8zfAQMGQATjf9GBAAcbKLx3wwdAcMFwITjvxEBAAeZcPw3w0bAUAEw8fhvRADAziYe/82QETBMACww/hsRALCTBcZ/M1wEDBEAC43/RgQAPGmh8d8MFQGXB8CC478RAQAPWnD8N8NEwKUBsPD4b0QAwJ0WHv/NEBFwWQAUjP9GBADcqGD8N5dHwCUBUDT+GxEA8IWi8d9cGgGnB0Dh+G9EAMAHCsd/c1kEnBoAxeO/EQEAPyge/80lEXBaABj/b0QAwBvj/83pEXBKABj/n4gAoJ7x/8mpEXB4ABj/D4kAoJbx/9BpEXBoABj/L4kAoI7x/9IpEXBYABj/m4kAoIbxv9nhEXBIABj/u4kAYHnG/26HRsDuAWD8HyYCgGUZ/4cdFgG7BoDxf5oIAJZj/J92SATsFgDGfzciAFiG8d/N7hGwSwAY/92JAGB6xn93u0bA0wFg/A8jAoBpGf/D7BYBTwWA8T+cCACmY/wPt0sEPBwAxv80IgCYhvE/zdMR8FAAGP/TiQBgeMb/dE9FwN0BYPwvIwKAYRn/yzwcAXcFgPG/nAgAhmP8L/dQBNwcAMZ/GCIAGIbxH8bdEXBTABj/4YgA4HLGfzh3RcCXAWD8hyUCgMsY/2HdHAGfBoDxH54IAE5n/Id3UwR8GADGfxoiADiN8Z/GlxHwbgAY/+mIAOBwxn86n0bATwFg/KclAoDDGP9pfRgBfwoA4z89EQDszvhP790I+BYAxn8ZIgDYjfFfxk8R8Eti/BckAoCnGf/l/CkCXpIY/3X9keSvr6+v/7r6IMBcjP/S/pPkt1+S/C3Gf1XuBAB3M/7L+zXJ317eXvye/94JYE3uBAA3Mf4V/pHkt19eX1//k+S3twusyZ0A4EvGv8I/kvz2+vr6n1+SRARUEAHAh4x/hW/jn3z3MUARUEEEAD8x/hX+NP7JD18EJAIqiADgG+Nf4afxT975KmARUEEEAMa/w7vjn3zwY0AioIIIgGLGv8KH45988nPAIqCCCIBCxr/Cp+OffBIAiQgoIQKgiPGv8OX4J18EQCICSogAKGD8K9w0/skNAZCIgBIiABZm/CvcPP7JjQGQiIASIgAWZPwr3DX+yR0BkIiAEiIAFmL8K9w9/smdAZCIgBIiABZg/Cs8NP7JAwGQiIASIgAmZvwrPDz+yYMBkIiAEiIAJmT8Kzw1/skTAZCIgBIiACZi/Cs8Pf7JkwGQiIASIgAmYPwr7DL+yQ4BkIiAEiIABmb8K+w2/slOAZCIgBIiAAZk/CvsOv7JjgGQiIASIgAGYvwr7D7+yc4BkIiAEiIABmD8Kxwy/skBAZCIgBIiAC5k/CscNv7JQQGQiIASIgAuYPwrHDr+yYEBkIiAEiIATmT8Kxw+/snBAZCIgBIiAE5g/CucMv7JCQGQiIASIgAOZPwrnDb+yUkBkIiAEiIADmD8K5w6/smJAZCIgBIiAHZk/CucPv7JyQGQiIASIgB2YPwrXDL+yQUBkIiAEiIAnmD8K1w2/slFAZCIgBIiAB5g/CtcOv7JhQGQiIASIgDuYPwrXD7+ycUBkIiAEiIAbmD8Kwwx/skAAZCIgBIiAD5h/CsMM/7JIAGQiIASIgDeYfwrDDX+yUABkIiAEiIAvmP8Kww3/slgAZCIgBIiAGL8Sww5/smAAZCIgBIigGrGv8Kw458MGgCJCCghAqhk/CsMPf7JwAGQiIASIoAqxr/C8OOfDB4AiQgoIQKoYPwrTDH+yQQBkIiAEiKApRn/CtOMfzJJACQioIQIYEnGv8JU459MFACJCCghAliK8a8w3fgnkwVAIgJKiACWYPwrTDn+yYQBkIiAEiKAqRn/CtOOfzJpACQioIQIYErGv8LU459MHACJCCghApiK8a8w/fgnkwdAIgJKiACmYPwrLDH+yQIBkIiAEiKAoRn/CsuMf7JIACQioIQIYEjGv8JS458sFACJCCghAhiK8a+w3PgniwVAIgJKiACGYPwrLDn+yYIBkIiAEiKASxn/CsuOf7JoACQioIQI4BLGv8LS458sHACJCCghAjiV8a+w/PgniwdAIgJKiABOYfwrVIx/UhAAiQgoIQI4lPGvUDP+SUkAJCKghAjgEMa/QtX4J0UBkIiAEiKAXRn/CnXjn5QFQCICSogAdmH8K1SOf1IYAIkIKCECeIrxr1A7/klpACQioIQI4CHGv0L1+CfFAZCIgBIigLsY/wr145+UB0AiAkqIAG5i/CsY/zf1AZCIgBIigE8Z/wrG/zsC4I0IqCACeJfxr2D8fyAAviMCKogA/sT4VzD+7xAAPxABFUQASYx/CeP/AQHwDhFQQQSUM/4VjP8nBMAHREAFEVDK+Fcw/l8QAJ8QARVEQBnjX8H430AAfEEEVBABJYx/BeN/IwFwAxFQQQQszvhXMP53EAA3EgEVRMCijH8F438nAXAHEVBBBCzG+Fcw/g8QAHcSARVEwCKMfwXj/yAB8AARUEEETM74VzD+TxAADxIBFUTApIx/BeP/JAHwBBFQQQRMxvhXMP47EABPEgEVRMAkjH8F478TAbADEVBBBAzO+Fcw/jsSADsRARVEwKCMfwXjvzMBsCMRUEEEDMb4VzD+BxAAOxMBFUTAIIx/BeN/EAFwABFQQQRczPhXMP4HEgAHEQEVRMBFjH8F438wAXAgEVBBBJzM+Fcw/icQAAcTARVEwEmMfwXjfxIBcAIRUEEEHMz4VzD+JxIAJxEBFUTAQYx/BeN/MgFwIhFQQQTszPhXMP4XEAAnEwEVRMBOjH8F438RAXABEVBBBDzJ+Fcw/hcSABcRARVEwIOMfwXjfzEBcCERUEEE3Mn4VzD+AxAAFxMBFUTAjYx/BeM/CAEwABFQQQR8wfhXMP4DEQCDEAEVRMAHjH8F4z8YATAQEVBBBPzA+Fcw/gMSAIMRARVEwBvjX8H4D0oADEgEVKiPAONfwfgPTAAMSgRUqI0A41/B+A9OAAxMBFSoiwDjX8H4T0AADE4EVKiJAONfwfhPQgBMQARUWD4CjH8F4z8RATAJEVBh2Qgw/hWM/2QEwEREQIXlIsD4VzD+ExIAkxEBFZaJAONfwfhPSgBMSARUmD4CjH8F4z8xATApEVBh2ggw/hWM/+QEwMREQIXpIsD4VzD+CxAAkxMBFaaJAONfwfgvQgAsQARUGD4CjH8F478QAbAIEVBh2Agw/hWM/2IEwEJEQIXhIsD4VzD+CxIAixEBFYaJAONfwfgvSgAsSARUuDwCjH8F478wAbAoEVDhsggw/hWM/+IEwMJEQIXTI8D4VzD+BQTA4kRAhdMiwPhXMP4lBEABEVDh8Agw/hWMfxEBUEIEVDgsAox/BeNfRgAUEQEVdo8A41/B+BcSAGVEQIXdIsD4VzD+pQRAIRFQ4ekIMP4VjH8xAVBKBFR4OAKMfwXjX04AFBMBFe6OAONfwfgjANqJgAo3R4Dxr2D8SSIAiAgo8WUEGP8Kxp9vBABJRECJDyPA+Fcw/vyJAOAbEVDhpwgw/hWMPz95eX19vfoMDObl5eXXJL8n+fvVZ+EwfyT569tr478248+7BADvEgEV/nj7a/zXZfz5kADgQyIApmb8+ZRnAPiQZwJgWsafLwkAPiUCYDrGn5sIAL4kAmAaxp+bCQBuIgJgeMafuwgAbiYCYFjGn7sJAO4iAmA4xp+HCADuJgJgGMafhwkAHiIC4HLGn6cIAB4mAuAyxp+nCQCeIgLgdMafXQgAniYC4DTGn90IAHYhAuBwxp9dCQB2IwLgMMaf3QkAdiUCYHfGn0MIAHYnAmA3xp/DCAAOIQLgacafQwkADiMC4GHGn8MJAA4lAuBuxp9TCAAOJwLgZsaf0wgATiEC4EvGn1MJAE4jAuBDxp/TCQBOJQLgJ8afSwgATicC4Bvjz2UEAJcQAWD8uZYA4DIigGLGn8sJAC4lAihk/BmCAOByIoAixp9hCACGIAIoYPwZigBgGCKAhRl/hiMAGIoIYEHGnyEJAIYjAliI8WdYAoAhiQAWYPwZmgBgWCKAiRl/hicAGJoIYELGnykIAIYnApiI8WcaAoApiAAmYPyZigBgGiKAgRl/piMAmIoIYEDGnykJAKYjAhiI8WdaAoApiQAGYPyZmgBgWiKACxl/picAmJoI4ALGnyUIAKYnAjiR8WcZAoAliABOYPxZigBgGSKAAxl/liMAWIoI4ADGnyUJAJYjAtiR8WdZAoAliQB2YPxZmgBgWSKAJxh/licAWJoI4AHGnwoCgOWJAO5g/KkhAKggAriB8aeKAKCGCOATxp86AoAqIoB3GH8qCQDqiAC+Y/ypJQCoJAKI8aecAKCWCKhm/KknAKgmAioZf4gAABHQxfjDGwEAEQEljD98RwDAGxGwNOMPPxAA8B0RsCTjD+8QAPADEbAU4w8fEADwDhGwBOMPnxAA8AERMDXjD18QAPAJETAl4w83EADwBREwFeMPNxIAcAMRMAXjD3cQAHAjETA04w93EgBwBxEwJOMPDxAAcCcRMBTjDw8SAPAAETAE4w9PEADwIBFwKeMPTxIA8AQRcAnjDzsQAPAkEXAq4w87EQCwAxFwCuMPOxIAsBMRcCjjDzsTALAjEXAI4w8HEACwMxGwK+MPBxEAcAARsAvjDwcSAHAQEfAU4w8HEwBwIBHwEOMPJxAAcDARcBfjDycRAHACEXAT4w8nEgBwEhHwKeMPJxMAcCIR8C7jDxcQAHAyEfAnxh8uIgDgAiIgifGHSwkAuEh5BBh/uJgAgAuVRoDxhwEIALhYWQQYfxiEAIABlESA8YeBCAAYxOIRYPxhMAIABrJoBBh/GJAAgMEsFgHGHwYlAGBAi0SA8YeBCQAY1OQRYPxhcAIABjZpBBh/mIAAgMFNFgHGHyYhAGACk0SA8YeJCACYxOARYPxhMgIAJjJoBBh/mJAAgMkMFgHGHyYlAGBCg0SA8YeJCQCY1MURYPxhcgIAJnZRBBh/WIAAgMmdHAHGHxYhAGABJ0WA8YeFCABYxMERYPxhMQIAFnJQBBh/WJAAgMXsHAHGHxYlAGBBO0WA8YeFCQBY1JMRYPxhcQIAFvZgBBh/KCAAYHF3RoDxhxICAArcGAHGH4oIACjxRQQYfygjAKDIBxFg/KHQy+vr69VnAE728vLya5Lf3/41/lBIAECptwiI8YdOAgAACnkGAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEL/D7XsAWkpbTJfAAAAAElFTkSuQmCC"},1429:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA1VBMVEUAAAA1WngzV3s0V3s0V3s0WHszV3szVXs0WHs5VYA0V3oyVXg0V3szWXk1V3szV3szV3wzVno3VXkyV3s0Vns0V3s0V3s1Vns0V3s1WHoyVX0tWng0V3s2VXk1V3s0WHw3W4A0VXwzV3owUIA0V3s0V3pAYIBVVVU0V3s2V3k0V3o0V3s1V3s1WHs0V3s0V3s0V3s0V3s0Vns0WHwzWHs4WHg2VXw1V3w0WHwzWH01WHs0V3szWHwzV3s0V3s0V3syV3w0Vno0V3s0V3s1V3w0V3sAAADjXQLOAAAARXRSTlMAInK21OxVPMMSrSTXKO7aI3MqOObx9D7+YDMR6Dm4xg4nMhDOyggD2CblzcfM7evT0bRxbiAhwsA3Oqyp1dbbKavBcG+oIEuNAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB+QJFg0EA8zenusAAALvSURBVHja7dtrV9NAEMbxRUCstd6gWqjV4hW8QK1WEfHufv+vJGmbpiHZ3XkmM7u+yLyCcyD/X7bJ5nCpMflsXNvc2rYyc93As3NDqM0DdG5K5nFA95ZsHwX0bgv3QUDnjnQfBAi//jBgR76PAUTvPwbgrkIfAtxLDdhMAbi/W3y8lQDQ2+sXAvFNKAzo7Vn74GH+2aD0nfsHIjP0rv+jrLRagzJ9BFw9zMnOP5t8DWID8v5KEBlQ9HNBXMB6fymICij3F4KYgKv9uSAiYHH/ledxRED1/K19Mo4HcPSjAVz9WABnPxLA3Y8D8PSjAHz9GABvPwLA39cHBPrqgFBfGxDsKwPCfV0Aoa8KoPQ1AaS+IoDW1wMQ+2oAal8LcEjtKwHofR0A0FcBIH0NANRXAGB9eQDYFwegfWkA3CcAnj6j9+t+/vT3w4BR/3lH7/zDgFHfWqqA0w8Bsj5VwOoHAIs+TcDr+wF5nyJg9r2Aom/ti8C9QL7+X26UxgdY74fWgH7+o/IXeQDlvl8ArD8ZcFD5PbpbgLz+VMCro+oxXdcBtP+RV+D4dfWo9WuAXf/0a4AqAO8/OoAoQO9/AEASwPsPAiAI8P0PAgQFjP0XAwQEnP0fBHgFrOcPCvAIeM8/GOAUMJ+/OMAh4D7/GYDac31Ts/+/JfRZgNo14J0/E0AS0PpMAEFA7HMBQQG1zwYEBOQ+H+AV0PsNAB4B0G8CcAqQfiOAQ/BuSEsLAGoFWL8hoEYA9psCKgK03xhwRQD3mwNKArwvAFgTMPoSgJWA0xcBLAWsvgxgLuD1hQCXAmZfCmC6Y15fDMCeFtACWkALaAEtoAW0gBbw3wFU3uLhm/1ScGBObNI5NZO0gPc6b3Siz9R8SAv4aGZpAZ+M+Zyyf3Z5X34ZND8Oe86zneFruv7FfGsaf0vVP1r+Nf4w0WZ0cpxvz93vKfo/fhYPiOGv6PnBRfm/Ic5/x+2f7VYek7M/08l2jPbpZPp3tsr+A/dyXwijeSXsAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA5LTIyVDEzOjA0OjAzKzAwOjAwmYV51AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wOS0yMlQxMzowNDowMyswMDowMOjYwWgAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC"},1430:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAq1BMVEUAAAA1WngzV3s0V3s0V3s0WHs0V3s0WHwzVXs0WHs1V3w0Vnk5VYA0V3o0V3stWngyVXg0V3s0V3syV3wzWXk1V3s0V3s0VXwzV3s0V3s0Vno0V3szV3w2VXwzVno0V3s0Vns0V3s0V3s1WHoyVX02VXk0V3s0V3s0V3szWHs4WHg0WHwzWH01WHszWHw3W4AzV3s0V3swUIA2V3k0V3syV3s1V3w0V3sAAAAtJV/uAAAAN3RSTlMAInK21Oy1cTzDwjsSrawRJNfbKSju7Sfa2avBIyFzcLTS/mAzOevT0W4gwDc6qQ7V2BAm1jhvoyQkOgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfkCRYNAh+OhWUiAAABQklEQVR42u3byVbCQBCF4UISUZRB0aAMEoMQCYKKQ73/m2nANqd1p4euzX932eR+J52uXrWIS+2gHsUaIHF02KjJzxwdh+iu0jzx6k9bYevLtDtVf/csfL/qec/1X1xa9Ksm/a/vf2XTr3q9WwWD9XcZbP9/u37Vci8E3n9+hiIjy37VsdzYAiZStwWkEtkCbsVoCLnEknnP07u9Z+oVZuKDZrL3zPxGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAe4D5FY9ETTOX3BZwb3/RqWELWEhhCxiLNC37l5/78iH7/3v+nFU5Gdp2/evtaHp8sup/3uyGY99oGCUvbjx3Xy36q4vPIp1B8PpsvfHOqNUwbP/y7dcxWUzSPMj1/3mevhfftR8exWuVAIlGJQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0yMlQxMzowMjozMSswMDowMI2LH1kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDktMjJUMTM6MDI6MzErMDA6MDD81qflAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="},1431:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAABjCAYAAADjPeyQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABk9JREFUeNrsnX+IFGUYxz+7nl5puleU55mUphkViRX2A5MscbIstR9KUEaUq0UWiZYSJZRFhAaGhsGEZAqVCKWS5HppZhL0Rx0HnphSFuadeeaNpGLnuf0xz+re3Dvuu7sudzv3fEG8fd95Z973M/P+eN55531i6XQak1KJJJ2gq4CbgQeAEUA1kAA84BBQD2wCfgH+LGVGHM+1PraCrqEaYDbwNDDQEH8ZMAS4A5gJHAQ+AZYDjZ2d+XgXAPgIsAN4LQSgSQPl+B2SvltDXAisA4YWmH6opF/YXSHOBd4EYkWeJybnmdtZBemsNnE8sOQ88U3AVuBX6VCqgeHAvcCAkDRLpOPZ0h0gXgqsCIn7D1gKLAMOGOIHAS8CLwO9DPErgFHA0ahX5+dC2sDjwARgfghAJHy+HPdvSBv5fNTbxD7AM4bwk8A0YJvlebYBjwn4oJ4F+kYZ4v3AMEO4K4PofLQZ+MgQfg3wYJQhjjKE/QO8XeD53gWaDeG3dsWOpbdYFQmgJ5DO8zqZ40cb4v6S3ndIAfk/IdbL5YHwO7NuWL5DqBjQmkokPaDR8dwTORPksJ0nAZPFjq0B+hUJsbch7hTQCvQoAGKb5KcyBHDBEIFjYlLWA+sdz92QF8RUIjkaeAsY20VMw87WGeA7YKHjuTtzQkwlkrNl4Fqp7Iy1Zp7juctDO5ZUIvmqDHQVoFmVwDLh1PFJTCWSU4AvLR/tqMumCXvY8dyvzkJMJZJVwM/n6SG3ADulkfUK7ATKRW0yChkho4nxIcf9DtzieG5LbHO/GTGZAVlsOLBRzKzV3a3eZma2U4nkdOA9GZ0E9QrwflwikyF35KnuCDAAc7VwaDNEJ4GauAxjTBMCy4Ba7UvA8dxa4WGa8BgbB0Ya2rjTwFrF105rhUu2egAj42JyBfUbsE+5tdM+4RJUdVx6oqCOAIeVW7sqfVi4BJWIiwEf1BVAf0XXzhDpL1yCOhgHdhsG0Ffjv9NQndNw4RI0PHbHgT0ya5GtnsB05dZO04VLtlqBPXGxQnYZEs3EnwbTqpxIThYeQe0C6uOO5zaFWCsAq4A5FP9uuFzhxVKJ5BzhYNJix3ObMrZzT+AnGTOatB2oE/It3cB2rgJuFB53hxxXB9zmeG5r9izOGOBbQ71XdVQrMM7x3B2QNeUjAdqZWHYyGYDtIArIL4CpdIHlal1UjcBU4XRWYe9YBuMv1XiBrrOGsTN1GvgQWOp47v5gZK63fa8DiwwNbwv+upmKiIHqJZ1KsON8w/Hc0HfjuSCY1sQ0AU8C+4nWu5hTwGBgDXClBQdriJUhF6vHX7kQNR2T8tlwwNixWCqOvzApiupTCBN9MX8BpBAVokJUiCqFqBAVokJUKUSFqBAVoqrzId6OP0f3Df6nZ7bqi/8FQ638n8+nZtPkemvk+iVVqWemb5DCVMnv++TGfW5xcz8FpsjvccBNwKPkXjP+OPBZ1u+J+MuGG8r1SXwiC2BGMyzSXY//JWm2Jkh4LgXPXyX5KNvqfIkhrMoiXY0hb5ml0blUZZmPsoFoqnptFunaDGnP5JHWJh9lAzFtGWZ7TLqE19Qhjo4TFaJKISpEhagQVQpRISpEhahSiApRISpElUJUiApRIaoUokJUiApRpRAVokJUiCWTadeSCst0pgVNNrugVFjmo2wgmr6JPmKRromO62fSEp5LRyzzUTYQ19NxW3sbD1oNQHBz8A3YLdQMnr9Z8lEyFbJSNo39Kqs6fG8VmQ051uO7Q7K5xix8j2jD8PcufMfyuuvwHYZN5twGGHUlKFtREOPkt+3VdvmXr44C8wp8OFYRvjXV+RSjBF/etxjCqgl3cVTuqsG8s2lLMRAbDY/3Rfg+T6KoIVK+YBVvLAZiA2Z/J7OI3qZDFVIuDB1TQzEQm/G9lgV1D7AgYhAXSLmC2up4bnOxQ5yVIeGLgA8i0D4OkHIsyrP8efXOtcBG4CFD3EsSvgnYi++XoBw2rEzj7+p8Lb7z2TCfCxux2LA9ZulVdxDwAx03po2y/gDucjz3wIWyWA7gf6nkdROAHjDDBmC+Zl8tvs+qvREHuBeYJP4GSmI7fw+MwXe/dDxi8I5LucZIOUtq9h3C90PyMb5rt4nAdfg7xF9cRtBOAn/j7zP+NfCj/J23/h8ArCOIn662QsUAAAAASUVORK5CYII="},1432:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1433:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1434:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="cfpowerbiapiintegration",t.labelBodyText="cfpowerbiapiintegration Body",t.btnExampleTitle="CLICK ME"},1435:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1436:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1437:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="VideoEmbeddingYoutube",t.labelBodyText="VideoEmbeddingYoutube Body",t.btnExampleTitle="CLICK ME"},1438:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1439:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1440:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="adminconsole2",t.labelBodyText="adminconsole2 Body",t.btnExampleTitle="CLICK ME"},1441:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1442:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1443:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="dashboard4",t.labelBodyText="dashboard4 Body",t.btnExampleTitle="CLICK ME",t.dashboardEndPoint="bx_block_chatbot6/chat_statistics",t.aggregateDataEndPoint="bx_block_visual_analytics/audiences/aggregate_data"},1444:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="Analytics",t.labelBodyText="Analytics Body",t.getFeedDataEndPoint="bx_block_chatbot6/audit_logs",t.btnExampleTitle="CLICK ME"},1445:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1446:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1447:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.urlGetValidations="profile/validations",t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.loginAPiEndPoint="login/login",t.loginAPiMethod="POST",t.loginApiContentType="application/json",t.errorEmailNotValid="Email not valid.",t.errorPasswordNotValid="Password not valid.",t.placeHolderEmail="Email",t.placeHolderPassword="Password",t.labelHeader="The reason we require login",t.btnTxtLogin="LOG IN",t.labelRememberMe="Remember me",t.btnTxtSocialLogin="LOGIN WITH SOCIAL MEDIA",t.labelOr="OR",t.labelTitle="Log in",t.imgPasswordInVisiblePath="assets/ic_password_invisible.png",t.imgPasswordVisiblePath="assets/ic_password_visible.png"},1448:function(e,t,a){e.exports=a.p+"static/media/user-profile.6d7d0312.png"},1449:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="NavigationMenu",t.labelBodyText="NavigationMenu Body",t.btnExampleTitle="CLICK ME",t.openDrawerText="Open Drawer",t.userName="Jordan Ramsay",t.userDesignation="Miami Herica",t.logout="Logout",t.jsonApiContentType="application/json",t.getMenuItemsEndPoint="navmenu/navigation_menu",t.getApiMethodType="GET"},1450:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="LandingPage",t.labelBodyText="LandingPage Body",t.btnExampleTitle="CLICK ME"},1451:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.httpGetMethod="GET",t.advancedsearchApiContentType="application/json",t.getAdvancedSearchApiEndPoint="advanced_search/search",t.errorTitle="Error"},1452:function(e,t,a){e.exports=a.p+"static/media/user-profile.6d7d0312.png"},1453:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.userName="User name",t.location="Location",t.url="Location",t.educationList="/profile/educational_qualifications",t.projectList="/profile/projects",t.awardList="/profile/awards",t.patentList="/profile/publication_patents",t.educationalTitle="Educational Qualification",t.projectLabel="Project",t.awardsLabel="Awards",t.publicationPatentLabel="Publication Patents",t.showMore="Show More",t.noProjectText="No project...",t.noQualiText="No qualifications",t.noAwards="No Award...",t.noPublicationPatents="No Publication Patents...",t.closeText="Close",t.userNameLabel="User name",t.urlLabel="Url",t.projectDurationLabel="Project Duration",t.toLabel="to",t.descriptionLabel="Description",t.projectNameLabel="Project name",t.projectDetailsLabel="Project Details",t.awardDetailsLabel="Award Details",t.titleLabel="Title",t.associatedWithLabel="Associated with",t.issuerLabel="Issuer",t.issueDateLabel="Issue date",t.patentDetailsLabel="Patent Details",t.patentsEmptyText="No publication patents found",t.publicationsLabel="Publications",t.authorLabel="Author",t.noProjectsLabel="No Projects",t.projectsLabel="Projects",t.gradesLabel="Grades",t.durationLabel="Duration",t.noAwardsLabel="No Awards",t.getEducationContentType="application/json",t.getEducationApiMethod="GET",t.getEducationApiEndPoint="profile/educational_qualifications",t.getProjectContextType="application/json",t.getProjectApiMethod="GET",t.getProjectApiEndPoint="profile/projects",t.getAwardsContextType="application/json",t.getAwardsApiMethod="GET",t.getAwardsApiEndPoint="profile/awards",t.getPatentsContextType="application/json",t.getPatentsApiMethod="GET",t.getPatentsApiEndPoint="profile/publication_patents",t.btnProjectsTestId="projectsButton",t.btnProjectsShowMoreTestId="btnProjectsShowMore",t.projectsEmptyTestId="projectsEmpty",t.btnAwardsTestId="awardsButton",t.btnAwardsShowMoreTestId="btnAwardsShowMore",t.awardsEmptyTestId="awardsEmpty",t.btnPatentsTestId="patentsButton",t.btnPatentsShowMoreTestId="btnPatentsShowMore",t.patentsEmptyTestId="patentsEmpty",t.qualificationsListItemTestId="qualificationsListItem",t.qualificationsEmptyTestId="qualificationsEmpty",t.hideKeyboardTestID="hideKeyboard",t.modalWindowTestId="modalWindow",t.openUrlTestId="openUrl"},1454:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.PostAPiMethod="POST",t.exampleApiContentType="application/json",t.PostApiMethodType="GET",t.patchPostAPiMethod="PATCH",t.putPostAPiMethod="PUT",t.postGetUrl="posts/posts",t.postContentType="application/json",t.deletePostAPiMethod="DELETE",t.CategoryGetUrl="categories/categories",t.btnExampleTitle="CLICK ME",t.Category="Category",t.Description="Description",t.Price="Price",t.ProductName="Product Name",t.CreatePost="Create Post",t.UpdatePost="Update Post",t.Error="Error",t.FieldsErrorMassage="Please enter all mandatory fields",t.Warning="Warning",t.MessageForDelete="Are you sure for delete this post?",t.PostName="Post Name",t.Cost="Cost",t.PostID="Post ID",t.Delete="Delete",t.Edit="Edit",t.NewPost="Add new Post",t.PostUpdated="Post is updated!",t.PostCreated="Post is created!",t.getAllTagsEndPoint="/bx_block_catalogue/tags",t.postTagsEndPoint="/bx_block_catalogue/tags",t.getAllPracticeEndPoint="/bx_block_catalogue/tags/practice",t.updateTagEndPoint="/bx_block_catalogue/update_multiple",t.postCreationEndPoint="/bx_block_cfinteractivewhiteboardtoolforchatbotmaker2/guides"},1580:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="Maps",t.labelBodyText="Maps Body",t.btnExampleTitle="CLICK ME"},1581:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.getThemeApiEndpoint="/themes/themes/",t.getAllThemesApiEndpoint="/themes/themes",t.updateMethodType="PUT",t.updateThemeApiEndpoint="/themes/themes/",t.deleteMethodType="DELETE",t.deleteThemeApiEndpoint="/themes/themes/",t.createApiMethodType="POST",t.createThemeApiEndpoint="/themes/themes",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="ThemeBlock",t.labelBodyText="ThemeBlock Body",t.submitButton="Submit Theme",t.createThemeApi="/themes/themes",t.themeConstant="Theme",t.chooseBackgroundColor="Choose Background Color",t.chooseTextColor="Choose Text Color",t.isBoldLabel="Is Bold",t.isItalicLabel="Is Italic",t.isUnderlinedLabel="Is Underlined",t.chooseTextBackgroundColor="Choose Text Background",t.updateButton="Update Theme",t.deleteButton="Delete Theme",t.getAllThemesButton="Get all themes",t.thisIsTextLabel="This is text!",t.resetButton="Reset Theme"},1582:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1583:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1584:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="settings2",t.labelBodyText="settings2 Body",t.btnExampleTitle="CLICK ME"},1585:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1586:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1587:function(e,t,a){e.exports=a.p+"static/media/chat_logo.cf7786f9.png"},1588:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="customiseinterface2",t.labelBodyText="customiseinterface2 Body",t.btnExampleTitle="CLICK ME",t.practiceDataEndpoint="bx_block_catalogue/tags/practice",t.designSettingsEndpoint="bx_block_customiseinterface2/chatbots",t.generalSettingsEndpoint="bx_block_settings/settings",t.designSettingsUpdateEndpoint="bx_block_customiseinterface2/chatbots",t.generalSettingsUpdateEndpoint="bx_block_settings/settings"},1589:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1590:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1591:function(e,t,a){e.exports=a.p+"static/media/view_logo.3b374d8d.svg"},1592:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.httpGetMethod="GET",t.httpPostMethod="POST",t.profileValidationSettingsAPiEndPoint="profile/validations",t.passwordRecoveryStartOtpAPiEndPoint="forgot_password/otp",t.passwordRecoveryConfirmOtpAPiEndPoint="otp_confirmation",t.passwordRecoveryChangePasswordAPiEndPoint="forgot_password/password",t.forgotPasswordAPiContentType="application/json",t.pleaseEnterAValidEmail="Please enter a valid email",t.emailIsRequired="Email is required",t.phoneNumberIsNotValid="Phone number is not valid",t.phoneNumberIsRequired="Phone number is required",t.otpCodeIsRequired="Phone number is required",t.pleaseEnterAPassword="Please enter a password",t.passwordMustBeAtLeast2Characters="Password must be at least 2 characters",t.pleaseConfirmYourPassword="Please confirm your password",t.passwordsMustMatch="Passwords must match",t.invalidEmailAddress="Invalid email address",t.invalidPassword="Invalid password",t.goToOtpAfterPhoneValidationErrorTitle="Error",t.goToOtpAfterPhoneValidationErrorBody="Please select country code",t.labelTextIsAccountRecovery="Account Recovery",t.secondLabelText="Please choose what type of account you signed up with.",t.thirdLabelText="To Reset your password, please enter the email associated with your account.",t.forthLabelText="We sent a confirmation code to the following email:",t.fifthLabelText="To Reset your password, please enter the phone number associated with your account.",t.sixthLabelText="We sent a confirmation code to the following phone:",t.firstInputAutoCompleteType="email",t.firstInputPlaceholder="Email",t.firstInputKeyboardStyle="email-address",t.firstInputErrorColor="red",t.buttonTextIsNext="Next",t.buttonColorForNextButton="#6200EE",t.secondInputAutoCompleteType="tel",t.secondInputKeyboardType="phone-pad",t.secondInputPlaceholder="Mobile",t.secondInputErrorColor="red",t.thirdInputPlaceholder="Enter OTP",t.thirdInputErrorColor="red",t.buttonTitleIsSMSPhoneAccount="SMS (Phone) Account",t.buttonTitleIsEmailAccount="Email Account",t.labelTextIsPleaseEnterYourNewPassword="Please enter your new password.",t.labelTextIsYourPasswordHasBeenSuccessfullyChanged="Your password has been successfully changed",t.handled="handled",t.placeholderIsReTypePassword="Re-Type Password",t.buttonTitleIsOk="Ok",t.buttonColorForOkButton="#6200EE",t.placeholderIsPassword="password",t.countryCodeSelectorPlaceholder="Select Country",t.phoneRegExp=/^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/,t.forgotAPiEndPoint="bx_block_forgot_password/passwords/forgot_password",t.forgotApiContentType="application/json",t.newPasswordApiEndPoint="bx_block_forgot_password/passwords/change_password",t.resetPasswordApiEndPoint="bx_block_forgot_password/passwords/reset_password"},1593:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validationApiContentType="application/json",t.validationApiMethodType="GET",t.exampleAPiEndPoint="EXAMPLE_URL",t.exampleAPiMethod="POST",t.exampleApiContentType="application/json",t.textInputPlaceHolder="Enter Text",t.labelTitleText="blogpostsmanagement",t.labelBodyText="blogpostsmanagement Body",t.BlogpostEndPoint="bx_block_blogpostsmanagement/blogposts",t.btnExampleTitle="CLICK ME",t.getBlogpostEndPoint="bx_block_cfinteractivewhiteboardtoolforchatbotmaker2/guides",t.deleteBlogpostEndPoint="bx_block_cfinteractivewhiteboardtoolforchatbotmaker2/guides/",t.deleteApiMethodType="DELETE",t.viewCountMethodType="PUT",t.userGuideCountEndPoint="bx_block_cfinteractivewhiteboardtoolforchatbotmaker2/guides/guide_count"},1594:function(e,t,a){e.exports=a.p+"static/media/back-icon.8620e85f.svg"},1595:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1596:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1597:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAZCAYAAAArK+5dAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHLSURBVHgB7VNBTsJQEJ35bQ2y4gjcQLwBbFTiyqUhCCwNonACyglYKGswhDVhYQhuwBNYb1BvwE4T2o7zCzUILa1iogte8pP5f/7M+zP/DcAOfw0McjTb/cSeGr8hpCIQJBfHBtvGzKZGrZQ14acEzd5jSnVojEAJ3ygCExX7rJw7NSAEYi15e5j0khPREwFlrvInKJe0+cqEn5UkRxnLu2EE6uqBpuAYZHKHGpVCVl/2VfLZiSS47Q47CFjQVGzzPgNRK+DAtHwdIpiryZdhWbEqd3fKZrrVe0hBVAIk9C5PNgXVShlO7gykbdsiOgH33P1Ux6ZXCAE5YM4f9amwcAJEt2wZnoAQsPzclwucE0UiYM27skMhCnIOgoJc9SAeuAm0ze38QuCphFdC0/abQUGqKppSDNzTweX55oFbk6miUsm2xDMHF++6oxRZTs2Cd2N+OZZCFetca5q3U0WDKoTAd5JbPMn8i30K+EApY/aZbKZ5HvRy/rgBARB+h+XckSEUyiBRiRO9LNJOF5PdiM/eDtl3L095r7e6ozp8p4Ko4MHUuYL6PJF/JVsRRCHZmmCVxOG2Xl9kO55PwC+A5a3Lv5G2Ajv8N3wA/tC75xO9TaEAAAAASUVORK5CYII="},1598:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD6SURBVHgB7ZQ7DoMwDIadRJF6DI7A2BFu0LErJ2Pt2BtAN8YeIceoxCN1KpAQ5WFCJBZ/EgOJlf+PYxuAYRjmZAQlKE7ukYImb6HJ3uXThIp1SCCgRJuDEIkUuoiTWwQr4lJ0hYtVoHMgQDKgrcowWQbTFS2ZGMQFWLdnNNQZ5WzSEziuKFC726GARYHO1umQ4j9x3KsI6d9lYMkEwAV8xXcbmDPhjvAV9zIwNdEveYk7SEU45YOfHf3bfs2H3QamBbfVHUENzFW7tjI9YoJcA2utttaiQQxQ+tzXBHkUb7VaVT7M+DmCj2K81Wur1QYTv1jiKGYYhjmdL46Zx1GnqdMtAAAAAElFTkSuQmCC"},1601:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABRklEQVR42u1WTWvDMAxtdym0MCg0hfS0lZwDifN1CDsEUiiDHQtp+2Py06sHDgQTxc3WDhUsEDG2JD8/SY5nMydOnDiZJPMwDFdlWa6hGGPuXxEopTZxHKsoio70vaRpeu0r5vSagu3TgBRF8UEbfJsAbAof+D4MSJ7n70mS1FOBmIoYiPUnMET9jqg/DW2gU/NF4z3VzhaKMeaGUql9Toj5KzBZln1ygem0PyhizhdrsOEOgtiTmaHcnzkwQRAszG4zuws2HCjEvpspMl6SE5umPjOaiZq00Vqb6xzL2AN7WQFRgIorTNSHAaYZYLDpg9J1dmUOWNnY8S3dsu9sxzoPa50dfCzXgj8G6DDmTKf1YNe27dsQO32WYKMZ8iyADi8FSFbKxBW1yLYXdzGK/HWI/LmKfH6IfKCJfcKKfeQ7ceLk1eUGuwSFdNyCoXEAAAAASUVORK5CYII="},1602:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAB2klEQVR42u1XS0vDQBCuelShB63gSSk1lJSQd9KeEq+eeohF0h+Tn+58uCvDkmr2Uc0hAwtNd3fm23l8OzubTTLJP0kQBNd5nj/HcRwkSVJg4Df+w9yfgOi67pKMrsn4W5Zlx58G1mAt9pwFTFmWT2Rg/xsQdWAP9rrEcpF9ybeRNE0/yNBrGIaroigefN+/QZiiKLqnkL3QfEXzrQIugy5rMOT6mp22JRC7ITmCNbS+VMJYW4HiniHlB/LAo64OFZTwlFnOMDDv5Jm5rg4KndcTuqN2TjVNcyUTGApNPMPBCB1b9r2HDR3vrOVpkDO2YPCthg82BiuUPINq0iW5U2BYoreSpwYzMNtUuwLD1lRyftBhCcSShWvlEgwEPMVoYDlE8UZuoBMsXIIRB75jBLvR4h7P825dgoGA1bU4iQPCZpdgIDikFiAeMrjXJRhRNAutkPGkRgK6BANBoWglNS97lKhLMOLAtVbZc2JUN9mCgS6QrRYxqlcH6N4FGBGundHV0XO5bm3B4II2vlzV9oM3aIaemaOFMW4/+jiJh8/AMwfrBq2vhZWghrawyBneoFm3sKeafBG6CjyFxh7Gwepo+MEzeADIanLd5I/yGTTOh+Ion9KTTNIjn0IfQKhG7LRpAAAAAElFTkSuQmCC"},1603:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAA7AAAAOwBeShxvQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJKSURBVFiF7ZfPaxNBFMc/M4nJatOiYJuIPzC2XqqCXjyIlNKDd096D/4BCh78K9SzF0FE67ngQdCDBy+K0ipC0qhUkOZQtdo02c3OPA/pbro2pJsQA2q/l519+2a/n/eWnZ2F/12qXXDq/upx8dWkWJUyABiM2bho4PeYCeMmmhPErPIkod+Vr40tdgSYfiQZ3OotK1IQASuCCIgI1m4abxyj4yB/YxzJD64zW1OqULmeqwaeOkLjrd8GCt22Mb7kkmPtzbYdmL5Xn1DKlKLE/e6AIIKITUws3ch+iHRAaXPiz1UekRLlnwpOWgCo1IAAUCKhl+6UOAjtAPQVQCuYGE2TH021X+HaKNk3cw1nDjrs25PENcLKT8O3qr/9vL6YKzh72CE73KzH9YWqa7aZ1SVALqPJZramawXn8g4HRprmdV9487lGw0is+8Z6BLmMpnDawTXCXNFlftkPzc/n04xlkrh+0/zl0jrrno1bVzyAoBal4MJ4GiPwvtJg+phDdjiBa6DeEF58qlF145tDzEdQWbPMFV1EmhAz+RQXJ3dzZG+r7c8/dm8eGwDg9bLP45IXQuwfak6t+cKzUo21Hsyhy9dwvuJjRZg6mgrNnxTr/OjRvGsAgIWKz5onHBrRvPrSYLXeu3lPAADlr4bFFR+ReK9aJ/1b34K/G0AQb1CmolTo1dqSJRJvB+YvyYUtAE8vO2WQ2QEAPAx2xBEAgF12qKBE7tBa/vutB3Wtr2wOtN24zNz9Pt5Q+mQ/f810Ui0Ur7Yq31GgX9yJbKqCj7IgAAAAAElFTkSuQmCC"},1604:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAZCAYAAAArK+5dAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHLSURBVHgB7VNBTsJQEJ35bQ2y4gjcQLwBbFTiyqUhCCwNonACyglYKGswhDVhYQhuwBNYb1BvwE4T2o7zCzUILa1iogte8pP5f/7M+zP/DcAOfw0McjTb/cSeGr8hpCIQJBfHBtvGzKZGrZQ14acEzd5jSnVojEAJ3ygCExX7rJw7NSAEYi15e5j0khPREwFlrvInKJe0+cqEn5UkRxnLu2EE6uqBpuAYZHKHGpVCVl/2VfLZiSS47Q47CFjQVGzzPgNRK+DAtHwdIpiryZdhWbEqd3fKZrrVe0hBVAIk9C5PNgXVShlO7gykbdsiOgH33P1Ux6ZXCAE5YM4f9amwcAJEt2wZnoAQsPzclwucE0UiYM27skMhCnIOgoJc9SAeuAm0ze38QuCphFdC0/abQUGqKppSDNzTweX55oFbk6miUsm2xDMHF++6oxRZTs2Cd2N+OZZCFetca5q3U0WDKoTAd5JbPMn8i30K+EApY/aZbKZ5HvRy/rgBARB+h+XckSEUyiBRiRO9LNJOF5PdiM/eDtl3L095r7e6ozp8p4Ko4MHUuYL6PJF/JVsRRCHZmmCVxOG2Xl9kO55PwC+A5a3Lv5G2Ajv8N3wA/tC75xO9TaEAAAAASUVORK5CYII="},1605:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD6SURBVHgB7ZQ7DoMwDIadRJF6DI7A2BFu0LErJ2Pt2BtAN8YeIceoxCN1KpAQ5WFCJBZ/EgOJlf+PYxuAYRjmZAQlKE7ukYImb6HJ3uXThIp1SCCgRJuDEIkUuoiTWwQr4lJ0hYtVoHMgQDKgrcowWQbTFS2ZGMQFWLdnNNQZ5WzSEziuKFC726GARYHO1umQ4j9x3KsI6d9lYMkEwAV8xXcbmDPhjvAV9zIwNdEveYk7SEU45YOfHf3bfs2H3QamBbfVHUENzFW7tjI9YoJcA2utttaiQQxQ+tzXBHkUb7VaVT7M+DmCj2K81Wur1QYTv1jiKGYYhjmdL46Zx1GnqdMtAAAAAElFTkSuQmCC"},1632:function(e,t,a){e.exports=a.p+"static/media/filter.b8e25451.svg"},1633:function(e,t,a){e.exports=a.p+"static/media/backIcon.a4f9278d.svg"},1634:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD6SURBVHgB7ZQ7DoMwDIadRJF6DI7A2BFu0LErJ2Pt2BtAN8YeIceoxCN1KpAQ5WFCJBZ/EgOJlf+PYxuAYRjmZAQlKE7ukYImb6HJ3uXThIp1SCCgRJuDEIkUuoiTWwQr4lJ0hYtVoHMgQDKgrcowWQbTFS2ZGMQFWLdnNNQZ5WzSEziuKFC726GARYHO1umQ4j9x3KsI6d9lYMkEwAV8xXcbmDPhjvAV9zIwNdEveYk7SEU45YOfHf3bfs2H3QamBbfVHUENzFW7tjI9YoJcA2utttaiQQxQ+tzXBHkUb7VaVT7M+DmCj2K81Wur1QYTv1jiKGYYhjmdL46Zx1GnqdMtAAAAAElFTkSuQmCC"},1635:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABFCAYAAAC1+eO9AAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAXZSURBVHgB7ZxbbBRlFMfP+Wbp7uzOli0QyrKtlkA0kQgoAoYEIk30xQS1kWgikhJvib5qCIlQKsaICUYlGrm8EBIf8IEYEy8vIi+EiBFUYrh4qXS2WxTK0tnd2dKdOZ5Z06bQ27Zsd2dmv1+yl/m+2Z32/L/zXc53ZhHKAAGIq/PmRQKFggI+xxbCnjOnbwB/hwEoAwjTIBmPh8PCWBNCWM9fsYYFWMKP2VxVBz6HDUb8vw4iQR8fnOeiU0CFE6pqnpmOKFMSID0/uDhYF9wCSFv4r2gBSREWxDHkJSI6QoN0QPsne6XUz5YkAM2PNJp1Yh9faNO0XKa2IEI4MlAY3DEnlb882cmT2jMbj76ICu3jU0MgKRkC6mWb7QzrxiH830nGRIxXcRwgkG2OHkYFDkrjTx0EXMCG3z/QFN1DEzT0MSsy3OWIOjzK1etBUg5OXreMRxMpyN1eMcoD+hPRuWz8z6Xxy8raBiX6DY1h71EFAcQONv46kJSbdQMJ7ePbC2/pgsyE9jIh7gfJTGEh4VY12X9kqGBYgH/nhRdqQeUCT6E0kMwg1KuStQqTpu4cDXdBkZCyRxq/EuCCHAY6ho+cp2w8/CAqymmYYFoqKSscNLNXBvXsL0WDo1A2gzR+JQnYiE84b4aM/jhIKgrHK9qdV8w2169Coh9AUnF4yr9aIFkbQFIVCkStgmzxMEiqA9IygQLiIKkOtrjPGYTvBUmVoMWOAFFwC0QFqC0ijgABcAEcKexVUTRiQFnEq8NDLEYe/A6CcM/ii+BP1Pv71K50l6obL6mEK3jf+QCXG+BjXLv6xR7jQiRpvCIQVxY9AuAm+BDXhx9Cev+lokdYWgMh7WRXSYKP8Ez8B1OpXKQ7s7tg4Qqb4HUWQgcf4LkAXH3KuKoljb1mrm4pH26DYvaBd/FsBHRuX19/WDfeU/XMQsWGJ9lHzoAH8XwI2sm5CfYYX6h6/2qyYaMNcA48hG/2AFiIQqTH+DKiG8v5sI3XFafBA/huE4aFsLlrOsZCrFYEOePEMXaSQXApvt4FC17O/MZitClADyHSUSdfEFxGTWxDOnuvanfmGfaIZewNn7kp5uQaASZKYC0Xwe7MubCeeU7NB1v4anu5qOpC1ORGPF67llSTxjZe0P0FVcYVkdBK42Qrm03aq9z6lkCVcY0ANM3bpaZ0jbtmN5gWtZtov8GXc8VOYE14AC2BYM7U2k3b3sYyL6qA1iXjawEuseGb8vVP5/O0HRGWggvxpQC0EmblerUXIA9v8tQ/AS7GdwLkmuufNa/Qu9zi7wYP4BsBck3Rp7jtd/Ii637wEJ4WoLexMTI7YLbZgnfKyJlSeu8mWk8K4NxrZTZrm4Cy2wlwObouwlM6nhLAWStk45HHTEU4LX4t+ABPCOAY/maT1pYnfEcg3AM+wvUCmAmtNYfwPnJX48EuflJcK4AZj64jhTq5j9/g59+nQJ6+uWIIQ6IcoWgt2DQ/IGAHF62CGsA1AtQmZPKYBtdAUiWwR9hA3SCpDggpIQB/BElVIIKLgoTtqUQmn3FKCEt8DZJqQAqK70QoaVzkpeZ5kFQU3qf4OdR9449iVkQB4TBIKgoRfui8FgWwAsqnvBhIg6QyEHRhwPrWeVsUoKErnRZAH4CkIqCAg5G/c6ni+6HC6y2xWKhg/cSesAgkMwe3/nDSGLbxcGac4wVkw2aoQIpgDVNQ0N44suCW1MRwj3GSR+e3QDIjsG3fDurZX0eWjcoNjeiZXeRsbkvKimNTtu0ou44bas82aR28CbILJHcMIu1UuzO7x6yb6IPZhLYDETvBi+kGLoFsei3Sk/lkvPpJDWsuiLWQYh3nM1tAUjqEZ22wtmrJ7NmJTiu5ZWcS0XYeMDqkEJPSJyzqDKUyH5Vy8pS7lqIQSM/zR1tBMgL6nuc0B9WM+ArT6ZKjCtPu2ykWixlR65FZRMt44fAAf1HM5gcSxsDn8KDaxU9dRHSjgHg8aignpmL0kfwHvjb+7RL373gAAAAASUVORK5CYII="},1654:function(module,exports,__webpack_require__){"use strict";(function(global){function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(e,t){var a=[],i=!0,s=!1,o=void 0;try{for(var n,r=e[Symbol.iterator]();!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(l){s=!0,o=l}finally{try{i||null===r.return||r.return()}finally{if(s)throw o}}return a}function _arrayWithHoles(e){if(Array.isArray(e))return e}const inject=_ref=>{let _ref$module=_slicedToArray(_ref.module,2),id=_ref$module[0],code=_ref$module[1],sourceURL=_ref.sourceURL;global.globalEvalWithSourceUrl?global.globalEvalWithSourceUrl(code,sourceURL):eval(code)};function injectUpdate(e){e.added.forEach(inject),e.modified.forEach(inject)}module.exports=injectUpdate}).call(this,__webpack_require__(52))},1655:function(e,t,a){"use strict";a.r(t);var i=a(0),s=a.n(i),o=a(25),n=a.n(o),r=a(553),l=a(4),d=a(274),c=a.n(d),h=(a(782),a(364)),p=a(374),g=(a(797),a(241)),u=a(38),m=a(9),C=a(528),b=a.n(C),A=a(682),f=a.n(A),x=a(683),E=a.n(x);const v=new f.a;var y=E.a.create(v,{});const{width:w,height:I,scale:P,fontScale:S}=u.a.get("window"),M=w/360,F=I/700;Math.min(M,F);function R(e,t){const a=new RegExp("[^@]+[@][\\S]+[.][\\S]+");return function(e){let t=!0;return!b.a.isNil(e)&&b.a.trim(String(e)).length>0&&(t=!1),t}(t)?{status:!1,message:"Email address field cannot be empty."}:a.test(t)?{status:!0,message:""}:{status:!1,message:"Invalid email address."}}async function D(e,t){e&&t&&await y.set(e,t)}async function B(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(y&&e){const a=await y.get(e)||null;return t&&a?JSON.parse(a):a}return null}async function T(e){y&&e&&await y.remove(e)}const k=new Set(["/login","/forgot-password","/change-password"]),N=/^\/bots\/[^/]+\/chat$/;function O(e){const[t,a]=Object(i.useState)(!1);return Object(i.useEffect)(()=>{(async t=>{const i=null!==(t=await B("authToken"))&&void 0!==t?t:sessionStorage.getItem("authToken"),s=k.has(e.location.pathname),o=N.test(e.location.pathname);i||s||o?(a(!0),i&&s&&e.history.push("/dashboard")):e.history.push("/login")})()},[]),Object(i.useLayoutEffect)(()=>{const t=e.history.listen(()=>{var e;null===(e=document.getElementById("container"))||void 0===e||e.scrollTo(0,0)});return()=>{t()}},[e.history]),t||N.test(e.location.pathname)?e.children:null}function L(e){let{element:t,history:a,match:i,routeMap:o,closeModal:n}=e;return s.a.cloneElement(t,{navigation:{navigate:(e,t)=>{let s=o[e].path;if(t&&Object.keys(t).length>0&&Object.keys(t).forEach(e=>{const a=RegExp(`:${e}\\??`);s=s.replace(a,escape(t[e]))}),s=s.replace(/\/:(.*?)(?=\/|$)/g,""),o[e].modal){const e=/\/$/.test(i.url)?"":"/";s=i.url+e+s,s=s.replace(/\*\/?/g,""),a.push(s)}else t?a.push(s,t):a.push(s)},getParam:(e,t)=>i.params[e]||t,goBack:()=>{a.goBack()},history:a},closeModal:n})}var H=e=>{let{routeMap:t}=e;return Object.keys(t).map(e=>{const a=t[e],i=a.component;return a.modal?s.a.createElement(p.ModalRoute,{key:a.path,path:a.path,component:e=>s.a.createElement(L,Object.assign({element:s.a.createElement(i,null)},e,{routeMap:t}))}):s.a.createElement(h.a,{key:a.path,path:a.path,exact:a.exact,render:e=>s.a.createElement(O,e,s.a.createElement(L,Object.assign({element:s.a.createElement(i,null)},e,{routeMap:t})))})})},_=a(16),V=a(5),U=a(184),W=a(41);class j{constructor(e){this.subscribers=void 0,this.topic=void 0,this.topic=e,this.subscribers=[]}pub(e,t){this.subscribers.forEach(a=>{try{a.receive(e,t)}catch{}})}sub(e){this.subscribers.push(e)}unsub(e){for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:null;console.log("=====================Debug Log Start======================"),void 0!==t&&console.log(e+"====>"+JSON.stringify(t)),console.log("=====================Debug Log End======================"),console.log(" ")},this.channels=new Map,this.addChannel=this.addChannel.bind(this),this.attachBuildingBlock=this.attachBuildingBlock.bind(this),this.sendMessage=this.sendMessage.bind(this),this.unSubscribeFromMessages=this.unSubscribeFromMessages.bind(this)}addChannel(e){this.channels.set(e,new j(e))}unSubscribeFromMessages(e,t){t&&t.forEach(t=>{const a=this.channels.get(t);a&&a.unsub(e)})}attachBuildingBlock(e,t){t.forEach(t=>{this.channels.has(t)||this.addChannel(t);const a=this.channels.get(t);a&&a.sub(e)})}sendMessage(e,t){if(t&&t.id){const a=this.channels.get(t.id);a&&a.subscribers.forEach(a=>a.receive(e,t))}}};class Q{constructor(e){this.id=void 0,this.properties=void 0,this.messageId=void 0,this.initializeFromObject=e=>{this.properties={...this.properties,...e}},this.id=e,this.properties={};const t=a(229);this.messageId=t()}addData(e,t){this.properties[e]=t}getData(e){let t=this.properties[e];if(t)return t;console.log("properties = ",this.properties,e)}copyAllPropertiesOf(e){Object.entries(e.properties).map(e=>{let[t,a]=e;return this.addData(t,a)})}}var G=function(e){return e[e.EntityPostedMessage=0]="EntityPostedMessage",e[e.PostEntityMessage=1]="PostEntityMessage",e[e.GetEntityMessage=2]="GetEntityMessage",e[e.NavigationMessage=3]="NavigationMessage",e[e.NavigationScreenNameMessage=4]="NavigationScreenNameMessage",e[e.NavigationRaiseMessage=5]="NavigationRaiseMessage",e[e.NavigationTargetMessage=6]="NavigationTargetMessage",e[e.NavigationPropsMessage=7]="NavigationPropsMessage",e[e.NavigationPayLoadMessage=8]="NavigationPayLoadMessage",e[e.NavigationMobilePhoneOTPMessage=9]="NavigationMobilePhoneOTPMessage",e[e.NavigationMobilePhoneAdditionalDetailsMessage=10]="NavigationMobilePhoneAdditionalDetailsMessage",e[e.NavigationBotsMessage=11]="NavigationBotsMessage",e[e.NavigationBlogpostsManagementMessage=12]="NavigationBlogpostsManagementMessage",e[e.NavigationIndividualBotMessage=13]="NavigationIndividualBotMessage",e[e.NavigationNewPasswordMessage=14]="NavigationNewPasswordMessage",e[e.NavigationUserGuideMessage=15]="NavigationUserGuideMessage",e[e.NavigationEditUserGuideMessage=16]="NavigationEditUserGuideMessage",e[e.NavigationUserProfileMessage=17]="NavigationUserProfileMessage",e[e.NavigationChatsMessage=18]="NavigationChatsMessage",e[e.NavigationAuditMessage=19]="NavigationAuditMessage",e[e.NavigationVisualAnalyticsMessage=20]="NavigationVisualAnalyticsMessage",e[e.NavigationFormsMessage=21]="NavigationFormsMessage",e[e.NavigationQAMessage=22]="NavigationQAMessage",e[e.NavigationQACreateMessage=23]="NavigationQACreateMessage",e[e.NavigationQAEditMessage=24]="NavigationQAEditMessage",e[e.NavigationSignpostingMessage=25]="NavigationSignpostingMessage",e[e.NavigationSignpostingCreateMessage=26]="NavigationSignpostingCreateMessage",e[e.NavigationSignpostingEditMessage=27]="NavigationSignpostingEditMessage",e[e.NavigationAutomaticFormCreationMessage=28]="NavigationAutomaticFormCreationMessage",e[e.NavigationProjectTemplatesEditMessage=29]="NavigationProjectTemplatesEditMessage",e[e.NavigationInfoPageMessage=30]="NavigationInfoPageMessage",e[e.NavigationHomeScreenMessage=31]="NavigationHomeScreenMessage",e[e.NavigationMobilePhoneLogInMessage=32]="NavigationMobilePhoneLogInMessage",e[e.NavigationEmailLogInMessage=33]="NavigationEmailLogInMessage",e[e.NavigationSignupLoginMessage=34]="NavigationSignupLoginMessage",e[e.NavigationSocialLogInMessage=35]="NavigationSocialLogInMessage",e[e.NavigationTermAndConditionMessage=36]="NavigationTermAndConditionMessage",e[e.NavigationPrivacyPolicyMessage=37]="NavigationPrivacyPolicyMessage",e[e.NavigationForgotPasswordPageInfo=38]="NavigationForgotPasswordPageInfo",e[e.NavigationForgotPasswordOTPMessage=39]="NavigationForgotPasswordOTPMessage",e[e.NavigationForgotPasswordMessage=40]="NavigationForgotPasswordMessage",e[e.NavigationSocialMediaAccountLogin=41]="NavigationSocialMediaAccountLogin",e[e.NavigationSocialMediaAccountCreation=42]="NavigationSocialMediaAccountCreation",e[e.NavigateEmailSignUpMessage=43]="NavigateEmailSignUpMessage",e[e.RestAPIRequestMessage=44]="RestAPIRequestMessage",e[e.RestAPIRequestMethodMessage=45]="RestAPIRequestMethodMessage",e[e.RestAPIRequestHeaderMessage=46]="RestAPIRequestHeaderMessage",e[e.RestAPIRequestBodyMessage=47]="RestAPIRequestBodyMessage",e[e.RestAPIResponceMessage=48]="RestAPIResponceMessage",e[e.RestAPIResponceDataMessage=49]="RestAPIResponceDataMessage",e[e.RestAPIResponceSuccessMessage=50]="RestAPIResponceSuccessMessage",e[e.RestAPIResponceErrorMessage=51]="RestAPIResponceErrorMessage",e[e.RestAPIResponceEndPointMessage=52]="RestAPIResponceEndPointMessage",e[e.AlertMessage=53]="AlertMessage",e[e.AlertTypeMessage=54]="AlertTypeMessage",e[e.AlertTitleMessage=55]="AlertTitleMessage",e[e.AlertBodyMessage=56]="AlertBodyMessage",e[e.CountryCodeMessage=57]="CountryCodeMessage",e[e.CountyCodeDataMessage=58]="CountyCodeDataMessage",e[e.EnterOTPAsForgotPasswordMessage=59]="EnterOTPAsForgotPasswordMessage",e[e.AuthTokenPhoneNumberMessage=60]="AuthTokenPhoneNumberMessage",e[e.AuthTokenEmailMessage=61]="AuthTokenEmailMessage",e[e.AuthTokenDataMessage=62]="AuthTokenDataMessage",e[e.InfoPageMessage=63]="InfoPageMessage",e[e.InfoPageTitleMessage=64]="InfoPageTitleMessage",e[e.InfoPageBodyMessage=65]="InfoPageBodyMessage",e[e.InfoPageButtonTextMessage=66]="InfoPageButtonTextMessage",e[e.InfoPageDataMessage=67]="InfoPageDataMessage",e[e.InfoPageNavigationScreenMessage=68]="InfoPageNavigationScreenMessage",e[e.AccoutResgistrationSuccess=69]="AccoutResgistrationSuccess",e[e.AccoutLoginSuccess=70]="AccoutLoginSuccess",e[e.SessionRequestMessage=71]="SessionRequestMessage",e[e.SessionRequestedBy=72]="SessionRequestedBy",e[e.SessionResponseMessage=73]="SessionResponseMessage",e[e.SessionResponseData=74]="SessionResponseData",e[e.SessionResponseToken=75]="SessionResponseToken",e[e.SessionResponseError=76]="SessionResponseError",e[e.SessionSaveMessage=77]="SessionSaveMessage",e[e.AuthenticateUserMessage=78]="AuthenticateUserMessage",e[e.LoginSuccessMessage=79]="LoginSuccessMessage",e[e.LoginFaliureMessage=80]="LoginFaliureMessage",e[e.LoginUserName=81]="LoginUserName",e[e.LoginPassword=82]="LoginPassword",e[e.LoginCountryCode=83]="LoginCountryCode",e[e.LoginIsRememberMe=84]="LoginIsRememberMe",e[e.RequestUserCredentials=85]="RequestUserCredentials",e[e.ReciveUserCredentials=86]="ReciveUserCredentials",e[e.RequestUserSession=87]="RequestUserSession",e[e.ReciveUserSession=88]="ReciveUserSession",e[e.NavigationAlertWebMessage=89]="NavigationAlertWebMessage",e[e.AlertButtonPositiveText=90]="AlertButtonPositiveText",e[e.AlertButtonPositiveMessage=91]="AlertButtonPositiveMessage",e[e.AlertButtonNegativeText=92]="AlertButtonNegativeText",e[e.AlertButtonNegativeMessage=93]="AlertButtonNegativeMessage",e[e.AlertButtonNeutralText=94]="AlertButtonNeutralText",e[e.AlertButtonNeutralMessage=95]="AlertButtonNeutralMessage",e[e.NavigationPlaceSearchMessage=96]="NavigationPlaceSearchMessage",e[e.SelectedPlaceMessage=97]="SelectedPlaceMessage",e[e.SelectedPlaceData=98]="SelectedPlaceData",e[e.SelectedPlaceDetails=99]="SelectedPlaceDetails",e[e.UserDeletesProfileImageMessage=100]="UserDeletesProfileImageMessage",e[e.SearchIconOnNavigationBarMessage=101]="SearchIconOnNavigationBarMessage",e[e.AddStopToSearchLocationDirectionMessage=102]="AddStopToSearchLocationDirectionMessage",e[e.SelectedRoleMessage=103]="SelectedRoleMessage",e[e.SelectedRoleDataMessage=104]="SelectedRoleDataMessage",e[e.SplashScreenCompleteMessage=105]="SplashScreenCompleteMessage",e[e.OnboardingGuideControllerSkipOnboarding=106]="OnboardingGuideControllerSkipOnboarding",e[e.OnboardingGuideControllerDoneOnboarding=107]="OnboardingGuideControllerDoneOnboarding",e[e.NavigationDiscoverAllMessage=108]="NavigationDiscoverAllMessage",e[e.InitiatePayment=109]="InitiatePayment",e[e.NavigationLocationMessage=110]="NavigationLocationMessage",e[e.LocationReqestingScreenIdMessage=111]="LocationReqestingScreenIdMessage",e[e.NavigationCalendarMessage=112]="NavigationCalendarMessage",e[e.LocationReqestingScreenMessage=113]="LocationReqestingScreenMessage",e[e.AddressSelectionMessage=114]="AddressSelectionMessage",e[e.SelectedServiceMessage=115]="SelectedServiceMessage",e[e.SelectedOfferMessage=116]="SelectedOfferMessage",e[e.SelectedTimeMessage=117]="SelectedTimeMessage",e[e.SelectedDateMessage=118]="SelectedDateMessage",e[e.NavigationShoppingcartMessage=119]="NavigationShoppingcartMessage",e[e.SelectedSpecialistMessage=120]="SelectedSpecialistMessage",e[e.ServiceProviderIdMessage=121]="ServiceProviderIdMessage",e[e.NavigationReviewsMessage=122]="NavigationReviewsMessage",e[e.NavigationDiscountsOffersMessage=123]="NavigationDiscountsOffersMessage",e[e.NavigationOfferDetailsMessage=124]="NavigationOfferDetailsMessage",e[e.SelectedSpecialOfferDataMessage=125]="SelectedSpecialOfferDataMessage",e[e.NavigationStoreLocatorMessage=126]="NavigationStoreLocatorMessage",e[e.NearbyVansApiMessage=127]="NearbyVansApiMessage",e[e.CalendarEstimatedArrivalTimeApiMessage=128]="CalendarEstimatedArrivalTimeApiMessage",e[e.SPDBUpdateVanLocationApiMessage=129]="SPDBUpdateVanLocationApiMessage",e[e.SPAMDUpdateVanLocationApiMessage=130]="SPAMDUpdateVanLocationApiMessage",e[e.SPAMLUpdateVanLocationApiMessage=131]="SPAMLUpdateVanLocationApiMessage",e[e.NearbyVansResponseMessage=132]="NearbyVansResponseMessage",e[e.CalendarEstimatedArrivalTimeResponseMessage=133]="CalendarEstimatedArrivalTimeResponseMessage",e[e.NavigationDashboardMessage=134]="NavigationDashboardMessage",e[e.SPDBUpdateVanLocationResponseMessage=135]="SPDBUpdateVanLocationResponseMessage",e[e.NavigationAppointmentDetailsMessage=136]="NavigationAppointmentDetailsMessage",e[e.SPAMDUpdateVanLocationResponseMessage=137]="SPAMDUpdateVanLocationResponseMessage",e[e.NavigationAppointmentLocationMessage=138]="NavigationAppointmentLocationMessage",e[e.SPAMLUpdateVanLocationResponseMessage=139]="SPAMLUpdateVanLocationResponseMessage",e[e.SPAMDGetAppointmentDetailsResponseMessage=140]="SPAMDGetAppointmentDetailsResponseMessage",e[e.NavigationAppointmentManagementMessage=141]="NavigationAppointmentManagementMessage",e[e.UAMUpdateOrderResponseMessage=142]="UAMUpdateOrderResponseMessage",e[e.UAMCancelOrderResponseMessage=143]="UAMCancelOrderResponseMessage",e[e.SPAMDGetAppointmentDetailsApiMessage=144]="SPAMDGetAppointmentDetailsApiMessage",e[e.UAMCancelOrderApiMessage=145]="UAMCancelOrderApiMessage",e[e.UAMUpdateOrderApiMessage=146]="UAMUpdateOrderApiMessage",e[e.NavigationPaymentsMessage=147]="NavigationPaymentsMessage",e[e.OrderSuccessDataMessage=148]="OrderSuccessDataMessage",e[e.CalendarProviderDetailsResponseMessage=149]="CalendarProviderDetailsResponseMessage",e[e.CalendarProviderDetailsApiMessage=150]="CalendarProviderDetailsApiMessage",e[e.ScheduleCreateAvailabilityResponseMessage=151]="ScheduleCreateAvailabilityResponseMessage",e[e.ScheduleCreateAvailabilityApiMessage=152]="ScheduleCreateAvailabilityApiMessage",e[e.ScheduleGetServicesResponseMessage=153]="ScheduleGetServicesResponseMessage",e[e.NavigationCatalogueMessage=154]="NavigationCatalogueMessage",e[e.ScheduleGetServicesApiMessage=155]="ScheduleGetServicesApiMessage",e[e.NavigationServiceProviderSchedule=156]="NavigationServiceProviderSchedule",e[e.CalendarOfferProviderResponseMessage=157]="CalendarOfferProviderResponseMessage",e[e.CalendarAvailableSlotsResponseMessage=158]="CalendarAvailableSlotsResponseMessage",e[e.CalendarAvailableSlotsApiMessage=159]="CalendarAvailableSlotsApiMessage",e[e.CalendarOfferProviderApiMessage=160]="CalendarOfferProviderApiMessage",e[e.CustomSubscriptionDataMessage=161]="CustomSubscriptionDataMessage",e[e.PostDetailDataMessage=162]="PostDetailDataMessage",e[e.HelpCentreMessageData=163]="HelpCentreMessageData",e[e.EventsMessageData=164]="EventsMessageData",e[e.AutomaticFormCreationAdapter=165]="AutomaticFormCreationAdapter",e[e.AutomaticEditFormAdapter=166]="AutomaticEditFormAdapter",e[e.NavigationAutomaticEditFormMessage=167]="NavigationAutomaticEditFormMessage",e[e.NavigationSettingsMessage=168]="NavigationSettingsMessage",e[e.NavigationTrainingHubMessage=169]="NavigationTrainingHubMessage",e[e.NavigationEndUserChatMessage=170]="NavigationEndUserChatMessage",e}(G||{});const q=e=>G[e];var Z=G,J=a(218);function Y(){return m.a.OS}class K extends i.Component{constructor(e){super(e),this.isLoaded=!1,this.send=void 0,this.blockId=void 0,this.subScribedMessages=void 0;const t=a(229);this.blockId=t(),this.send=e=>z.sendMessage(this.blockId,e),this.subScribedMessages=[""],this.hideKeyboard=this.hideKeyboard.bind(this)}receive(e,t){}async componentDidMount(){this.isLoaded=!0}async componentWillUnmount(){this.isLoaded=!1,J.a.dismiss(),z.unSubscribeFromMessages(this,this.subScribedMessages)}toggleState(e){this.changeState(e,!Boolean(this.getState(e)))}changeState(e,t){console.log("changeState::Not Confifured for "+e)}getState(e){switch(e){case"testBoolTrue":return!0;case"testBoolFalse":return!1;case"testString":return"";default:return console.log("changeState::Not Confifured for "+e),null}}processOnClickMessage(e){console.log("processOnClickMessage::Not Configured for "+e)}showAlert(e,t,a,i,s,o,n,r){J.a.dismiss(),a||s||n||(a="Ok");const l=new Q(q(Z.AlertMessage));l.addData(q(Z.AlertTitleMessage),e),l.addData(q(Z.AlertBodyMessage),t),l.addData(q(Z.NavigationPropsMessage),this.props),l.addData(q(Z.NavigationPropsMessage),this.props),l.addData(q(Z.AlertButtonPositiveText),a),l.addData(q(Z.AlertButtonNegativeText),s),l.addData(q(Z.AlertButtonNeutralText),n),l.addData(q(Z.AlertButtonPositiveMessage),i),l.addData(q(Z.AlertButtonNegativeMessage),o),l.addData(q(Z.AlertButtonNeutralMessage),r),z.sendMessage(l.id,l)}parseApiErrorResponse(e){if(!e||!e.errors)return;const t=e.errors;let a="";t.map(e=>{const t=JSON.stringify(e);JSON.parse(t,(e,t)=>{t.length>0&&(a=a.length<=0?t:`${a}{\n}${t}`)})}),this.showAlert("Error",a)}isPlatformWeb(){return"web"===Y()}isPlatformiOS(){return"ios"===Y()}isPlatformAndroid(){return"android"===Y()}parseApiCatchErrorResponse(e){e&&this.showAlert("Error",JSON.stringify(e).replace(new RegExp('"',"g"),""))}hideKeyboard(){this.isPlatformWeb()||J.a.dismiss()}}var X=a(76),$=a(34);class ee extends K{constructor(e){super(e),this.messagePositiveButton=void 0,this.messageNegativeButton=void 0,this.messageNeutralButton=void 0,this.subScribedMessages=[q(Z.AlertMessage),q(Z.NavigationPayLoadMessage)],z.attachBuildingBlock(this,this.subScribedMessages),this.state={title:"",body:"",btnPositiveText:"",btnNegativeText:"",btnNeutralText:""},this.GetTitleView=this.GetTitleView.bind(this),this.GetMainView=this.GetMainView.bind(this),this.receive=this.receive.bind(this)}render(){return this.state.title||this.state.body||this.state.btnNeutralText||this.state.btnNegativeText||this.state.btnPositiveText?s.a.createElement(this.GetMainView,null):null}onNegativeButtonPress(){this.messageNegativeButton?this.send(this.messageNegativeButton):this.props.navigation.goBack()}onPositiveButtonPress(){this.messagePositiveButton?this.send(this.messagePositiveButton):this.props.navigation.goBack()}onNeutralButtonPress(){this.messageNeutralButton?this.send(this.messageNeutralButton):this.props.navigation.goBack()}GetTitleView(){return this.state.title?s.a.createElement(_.a,{style:te.title},this.state.title):null}GetMainView(){return s.a.createElement(l.a,{style:te.modalParentContainer},s.a.createElement(this.GetTitleView,null),s.a.createElement(_.a,{style:te.body},this.state.body),this.state.btnPositiveText||this.state.btnNegativeText||this.state.btnNeutralText?s.a.createElement(l.a,{style:te.allButtonContainer},this.state.btnNeutralText?s.a.createElement(X.a,{onPress:()=>{this.onNeutralButtonPress()},title:this.state.btnNeutralText}):null,this.state.btnNegativeText||this.state.btnPositiveText?s.a.createElement(l.a,{style:te.twoButtonContainer},this.state.btnNegativeText?s.a.createElement(X.a,{onPress:()=>{this.onNegativeButtonPress()},title:this.state.btnNegativeText}):null,this.state.btnPositiveText?s.a.createElement($.a,{style:te.positiveButton},s.a.createElement(X.a,{onPress:()=>{this.onPositiveButtonPress()},title:this.state.btnPositiveText})):null):null):null)}async receive(e,t){if(q(Z.AlertMessage)===t.id)this.navigateToAlertPage(t);else if(q(Z.NavigationPayLoadMessage)===t.id){t.getData(q(Z.AlertTypeMessage));let e=t.getData(q(Z.AlertTitleMessage)),a=t.getData(q(Z.AlertBodyMessage)),i=t.getData(q(Z.AlertButtonPositiveText)),s=t.getData(q(Z.AlertButtonPositiveMessage)),o=t.getData(q(Z.AlertButtonNegativeText)),n=t.getData(q(Z.AlertButtonNegativeMessage)),r=t.getData(q(Z.AlertButtonNeutralText)),l=t.getData(q(Z.AlertButtonNeutralMessage));this.setState({title:e,body:a,btnPositiveText:i,btnNegativeText:o,btnNeutralText:r}),this.messagePositiveButton=s,this.messageNegativeButton=n,this.messageNeutralButton=l}}navigateToAlertPage(e){const t=new Q(q(Z.NavigationAlertWebMessage));t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t.copyAllPropertiesOf(e),this.send(t)}}const te=V.a.create({allButtonContainer:{flexDirection:"row",justifyContent:"space-between"},body:{padding:0,fontSize:24,marginBottom:15,marginTop:7},twoButtonContainer:{flexDirection:"row",marginLeft:40},positiveButton:{marginLeft:10},modalParentContainer:{padding:10,flex:1},title:{padding:0,fontSize:30,fontWeight:"bold",includeFontPadding:!1}});var ae=a(2),ie=a.n(ae),se=a(48);class oe extends K{render(){return s.a.createElement(l.a,null,s.a.createElement(l.a,{style:{flexDirection:"row",alignItems:"center"}},s.a.createElement(_.a,{onPress:this.props.onPress,style:ne.item},this.props.content),s.a.createElement(se.a,{style:{height:20,width:20,marginRight:10},source:a(808)})),s.a.createElement(l.a,{style:ne.seprator}))}}oe.propTypes={content:ie.a.string.isRequired};const ne=V.a.create({item:{backgroundColor:"#00000000",padding:18,color:"black",fontSize:18,fontWeight:"bold",flex:1,flexDirection:"row"},seprator:{backgroundColor:"#6200EE",color:"#6200EE",height:1}});var re=class extends K{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{navigation:null}),this.receive=this.receive.bind(this),z.attachBuildingBlock(this,[q(Z.NavigationMessage),q(Z.NavigationPropsMessage)])}async receive(e,t){if(t.id===q(Z.NavigationMessage)){const e=t.getData(q(Z.NavigationRaiseMessage));if(void 0!==e){const t=this;setTimeout((function(){t.send(e)}),0)}const s=t.getData(q(Z.NavigationScreenNameMessage)),o=t.getData(q(Z.NavigationPropsMessage));var a,i;if(o&&o.navigation)null===o||void 0===o||null===(a=o.navigation)||void 0===a||a.set,null===o||void 0===o||null===(i=o.navigation)||void 0===i||i.navigate(t.getData(q(Z.NavigationTargetMessage)),{navigationBarTitleText:s})}}};class le{constructor(){this.send=void 0,this.blockId=void 0;const e=a(229);this.blockId=e(),this.send=e=>z.sendMessage(this.blockId,e)}receive(e,t){}}let de=a(809);class ce extends le{constructor(){super(),this.props=void 0,z.attachBuildingBlock(this,[q(Z.RestAPIRequestMessage)])}static getInstance(){return ce.instance||(ce.instance=new ce),ce.instance}async receive(e,t){if(console.log("API Rquest Message"+JSON.stringify(t)),q(Z.RestAPIRequestMessage)===t.id){const e=t.messageId,{RestAPIRequestMethodMessage:a,RestAPIResponceEndPointMessage:i,RestAPIRequestHeaderMessage:s,RestAPIRequestBodyMessage:o,NavigationPropsMessage:n}=t.properties;this.props=n,this.makeApiCall(e,a,i,s,o)}}async makeApiCall(e,t,a,i,s){let o=-1===a.indexOf("://")?de.baseURL+"/"+a:a,n=new Q(q(Z.RestAPIResponceMessage));n.addData(q(Z.RestAPIResponceDataMessage),e);try{let e=new Response;e=i&&s?await fetch(o,{method:t.toUpperCase(),headers:i.length?JSON.parse(i):i,body:s}):i?await fetch(o,{method:t.toUpperCase(),headers:i.length?JSON.parse(i):i}):await fetch(o,{method:t.toUpperCase()});let a=await e.json();n.addData(q(Z.RestAPIResponceSuccessMessage),a),console.log("Api Response"+JSON.stringify(a))}catch(r){z.debugLog("RestApiClient Error",r),console.log("Api Error"+JSON.stringify(r)),n.addData(q(Z.RestAPIResponceErrorMessage),"An error has occuured. Please try again later.")}this.props&&n.addData(q(Z.NavigationPropsMessage),this.props),this.send(n)}}ce.instance=void 0;class he extends le{constructor(){super(),this.sessionToken=void 0,this.sessionData=void 0,z.attachBuildingBlock(this,[q(Z.SessionRequestMessage),q(Z.SessionSaveMessage)])}static getInstance(){return he.instance||(he.instance=new he),he.instance}async receive(e,t){if(z.debugLog("SessionManagerBlock","Session Rquest Message"+JSON.stringify(t)),q(Z.SessionRequestMessage)===t.id){let e=t.messageId,a=new Q(q(Z.SessionResponseMessage));a.addData(q(Z.SessionRequestedBy),e),this.isSessionValid()?(a.addData(q(Z.SessionResponseData),this.getData()),a.addData(q(Z.SessionResponseToken),this.getToken())):a.addData(q(Z.SessionResponseError),this.getError()),this.send(a)}else if(q(Z.SessionSaveMessage)===t.id){let e=t.getData(q(Z.SessionResponseData)),a=t.getData(q(Z.SessionResponseToken));this.saveSessionData(a,e)}}saveSessionData(e,t){if(this.sessionToken=e,this.sessionData=t,e&&D("authToken",e),t&&t.meta&&t.meta.role){D("role",t.meta.role)}}getToken(){return this.sessionToken}getData(){return this.sessionData}getError(){return"Session Expired"}isSessionValid(){return!0}}he.instance=void 0;class pe extends le{constructor(){super(),this.userCredsKey="saveUserInfo",this.userName=void 0,this.password=void 0,this.phoneNumber=void 0,this.countryCode=void 0,this.loadCreds(),z.attachBuildingBlock(this,[q(Z.LoginSuccessMessage),q(Z.LoginFaliureMessage),q(Z.RequestUserCredentials)])}static getInstance(){return pe.instance||(pe.instance=new pe),pe.instance}async loadCreds(){let e=await y.get(this.userCredsKey);if(e)try{const t=JSON.parse(e);this.userName=t.id,this.password=t.password,this.countryCode=t.countrycode}catch{}}receive(e,t){if(q(Z.RequestUserCredentials)===t.id){let e=new Q(q(Z.ReciveUserCredentials));e.addData(q(Z.LoginUserName),this.userName),e.addData(q(Z.LoginPassword),this.password),e.addData(q(Z.LoginCountryCode),this.countryCode),this.send(e)}else if(q(Z.LoginSuccessMessage)===t.id){let e=t.getData(q(Z.LoginUserName)),a=t.getData(q(Z.LoginPassword)),i=t.getData(q(Z.LoginCountryCode)),s=t.getData(q(Z.LoginIsRememberMe));this.saveUserData(i,e,a,s)}else q(Z.LoginFaliureMessage)===t.id&&this.clearUserData()}async saveUserData(e,t,a,i){if(i)try{const i={id:t,countrycode:e,password:a};await y.set(this.userCredsKey,JSON.stringify(i)),this.countryCode=e,this.userName=t,this.password=a}catch{}else this.clearUserData()}async clearUserData(){await y.set(this.userCredsKey,""),this.userName=null,this.password=null,this.countryCode=null}}pe.instance=void 0;class ge extends le{constructor(){super(),this.userCredsKey="saveUserInfo",this.userName=void 0,this.phoneNumber=void 0,this.countryCode=void 0,z.attachBuildingBlock(this,[q(Z.AuthenticateUserMessage),q(Z.LoginFaliureMessage),q(Z.RequestUserSession)])}static getInstance(){return ge.instance||(ge.instance=new ge),ge.instance}async receive(e,t){switch(t.id){case q(Z.AuthenticateUserMessage):new Q(q(Z.RestAPIRequestMessage)).initializeFromObject(t.properties);break;case q(Z.RequestUserSession):}}async saveUserData(e,t,a,i){if(i)try{const i={id:t,countrycode:e,password:a};await y.set(this.userCredsKey,JSON.stringify(i)),this.countryCode=e,this.userName=t}catch{}else this.clearUserData()}async clearUserData(){await y.set(this.userCredsKey,""),this.userName=null,this.countryCode=null}}ge.instance=void 0;var ue=function(){let e,t,a,i;return{getRestBlockInstance:function(){return e||(e=ce.getInstance(),e.constructor=null),e},getSessionBlockInstance:function(){return t||(t=he.getInstance(),t.constructor=null),t},getUserManagerInstance:function(){return a||(a=pe.getInstance(),a.constructor=null),a},getAuthManagerInstance:function(){return i||(i=ge.getInstance(),i.constructor=null),i}}}(),me=a(21);new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"SocialMediaAccountLoginScreen"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationSocialLogInMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"SocialMediaAccountLogin"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationSocialMediaAccountLogin)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"EmailAccountLoginBlock"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationEmailLogInMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"EmailAccountRegistration"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigateEmailSignUpMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));t.addData(q(Z.NavigationTargetMessage),"ForgotPassword"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage)));const a=new Q(q(Z.NavigationPayLoadMessage));return a.addData(q(Z.NavigationForgotPasswordPageInfo),e.getData(q(Z.NavigationForgotPasswordPageInfo))),t.addData(q(Z.NavigationRaiseMessage),a),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationForgotPasswordMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0;var e=a(229)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationMobilePhoneOTPMessage),q(Z.NavigationForgotPasswordOTPMessage)])}convert(e){const t=new Q(q(Z.NavigationMessage));e.getData(q(Z.EnterOTPAsForgotPasswordMessage))?t.addData(q(Z.NavigationTargetMessage),"ForgotPasswordOTP"):t.addData(q(Z.NavigationTargetMessage),"OTPInputAuth"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage)));const a=new Q(q(Z.NavigationPayLoadMessage));return a.addData(q(Z.AuthTokenDataMessage),e.getData(q(Z.AuthTokenDataMessage))),a.addData(q(Z.AuthTokenPhoneNumberMessage),e.getData(q(Z.AuthTokenPhoneNumberMessage))),a.addData(q(Z.AuthTokenEmailMessage),e.getData(q(Z.AuthTokenEmailMessage))),a.addData(q(Z.EnterOTPAsForgotPasswordMessage),e.getData(q(Z.EnterOTPAsForgotPasswordMessage))),t.addData(q(Z.NavigationRaiseMessage),a),t}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0;var e=a(229)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationNewPasswordMessage)])}convert(e){const t=new Q(q(Z.NavigationMessage));t.addData(q(Z.NavigationTargetMessage),"NewPassword"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage)));const a=new Q(q(Z.NavigationPayLoadMessage));return a.addData(q(Z.AuthTokenDataMessage),e.getData(q(Z.AuthTokenDataMessage))),t.addData(q(Z.NavigationRaiseMessage),a),t}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));t.addData(q(Z.NavigationTargetMessage),"InfoPage"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage)));const a=new Q(q(Z.NavigationPayLoadMessage));a.addData(q(Z.InfoPageTitleMessage),"Privacy Policy"),a.addData(q(Z.InfoPageBodyMessage),"Feature Comming Soon.."),a.addData(q(Z.InfoPageButtonTextMessage),"Home");const i=new Q(q(Z.NavigationHomeScreenMessage));return i.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),a.addData(q(Z.InfoPageNavigationScreenMessage),i),t.addData(q(Z.NavigationRaiseMessage),a),t.addData(q(Z.NavigationScreenNameMessage),"Privacy Policy"),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationPrivacyPolicyMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));t.addData(q(Z.NavigationTargetMessage),"InfoPage"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage)));const a=new Q(q(Z.NavigationPayLoadMessage));a.addData(q(Z.InfoPageTitleMessage),"Terms and Conditions"),a.addData(q(Z.InfoPageBodyMessage),"Feature Comming Soon.."),a.addData(q(Z.InfoPageButtonTextMessage),"Home");const i=new Q(q(Z.NavigationHomeScreenMessage));return i.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),a.addData(q(Z.InfoPageNavigationScreenMessage),i),t.addData(q(Z.NavigationRaiseMessage),a),t.addData(q(Z.NavigationScreenNameMessage),"Terms and Conditions"),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationTermAndConditionMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=async e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Home"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.SplashScreenCompleteMessage)])}async receive(e,t){this.send(await this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Signuplogin"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationSignupLoginMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"NewPassword"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationNewPasswordMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Catalogue1"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationBotsMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"BlogpostsManagement"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationBlogpostsManagementMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Chatbot5"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t.addData(q(Z.NavigationScreenNameMessage),e.getData(q(Z.NavigationScreenNameMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationIndividualBotMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"PostCreation"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationUserGuideMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"UserProfileBasic"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationUserProfileMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"VisualAnalytics"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationVisualAnalyticsMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Audit"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationAuditMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Chats"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationChatsMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Dashboard"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationDashboardMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Forms"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationFormsMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Q&A"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationQAMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Q&ACreate"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationQACreateMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Q&AEdit"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t.addData(q(Z.NavigationScreenNameMessage),e.getData(q(Z.NavigationScreenNameMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationQAEditMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Signposting"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationSignpostingMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"AutomaticFormCreation"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationAutomaticFormCreationMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"AutomaticEditForm"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t.addData(q(Z.NavigationScreenNameMessage),e.getData(q(Z.NavigationScreenNameMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationAutomaticEditFormMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"SignpostingCreate"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationSignpostingCreateMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"SignpostingEdit"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t.addData(q(Z.NavigationScreenNameMessage),e.getData(q(Z.NavigationScreenNameMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationSignpostingEditMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Settings"),t.addData(q(Z.NavigationScreenNameMessage),e.getData(q(Z.NavigationScreenNameMessage))),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationSettingsMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"PostEdit"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t.addData(q(Z.NavigationScreenNameMessage),e.getData(q(Z.NavigationScreenNameMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationEditUserGuideMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"ProjectTemplates"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t.addData(q(Z.NavigationScreenNameMessage),e.getData(q(Z.NavigationScreenNameMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationProjectTemplatesEditMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"TrainingHub"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t.addData(q(Z.NavigationScreenNameMessage),e.getData(q(Z.NavigationScreenNameMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationTrainingHubMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Catalogue1"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationEndUserChatMessage)])}receive(e,t){this.send(this.convert(t))}},ue.getRestBlockInstance(),new ee,new re,ue.getSessionBlockInstance(),ue.getUserManagerInstance(),new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));return t.addData(q(Z.NavigationTargetMessage),"Home"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationHomeScreenMessage)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{let t=e.getData(q(Z.InfoPageTitleMessage)),a=e.getData(q(Z.InfoPageBodyMessage)),i=e.getData(q(Z.InfoPageButtonTextMessage)),s=e.getData(q(Z.NavigationScreenNameMessage)),o=e.getData(q(Z.NavigationRaiseMessage));e.id===q(Z.AccoutResgistrationSuccess)?(t="Account Creation",a="Account was sucessfuly created.",i="Ok",s="Account Creation",o=new Q(q(Z.NavigationHomeScreenMessage))):e.id===q(Z.AccoutLoginSuccess)&&(t="Account Login",a="Account was sucessfuly logged in.",i="Ok",s="Account Login",o=new Q(q(Z.NavigationHomeScreenMessage)));const n=new Q(q(Z.NavigationMessage));n.addData(q(Z.NavigationTargetMessage),"InfoPage"),n.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),n.addData(q(Z.NavigationScreenNameMessage),s);const r=new Q(q(Z.NavigationPayLoadMessage));return r.addData(q(Z.InfoPageTitleMessage),t),r.addData(q(Z.InfoPageBodyMessage),a),r.addData(q(Z.InfoPageButtonTextMessage),i),o.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage))),r.addData(q(Z.InfoPageNavigationScreenMessage),o),n.addData(q(Z.NavigationRaiseMessage),r),n};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),z.attachBuildingBlock(this,[q(Z.NavigationInfoPageMessage),q(Z.AccoutResgistrationSuccess),q(Z.AccoutLoginSuccess)])}receive(e,t){this.send(this.convert(t))}},new class{constructor(){this.send=void 0,this.convert=e=>{const t=new Q(q(Z.NavigationMessage));t.addData(q(Z.NavigationTargetMessage),"AlertWeb"),t.addData(q(Z.NavigationPropsMessage),e.getData(q(Z.NavigationPropsMessage)));const a=new Q(q(Z.NavigationPayLoadMessage));return a.copyAllPropertiesOf(e),t.addData(q(Z.NavigationRaiseMessage),a),t};const e=Object(me.v4)();this.send=t=>z.sendMessage(e,t),console.log("initing AlertPageWebAdapter"),z.attachBuildingBlock(this,[q(Z.NavigationAlertWebMessage)])}receive(e,t){console.log("receive AlertPageWebAdapter==>"+JSON.stringify(t)),console.log("Converted AlertPageWebAdapter==>"+JSON.stringify(this.convert(t))),this.send(this.convert(t))}};const Ce=m.a.select({ios:"The iOS APP to rule them all!",android:"Now with Android AI",web:"Selector your adventure."});class be extends K{constructor(e){super(e),be.instance=this,this.subScribedMessages=[],z.attachBuildingBlock(this,this.subScribedMessages)}async componentDidMount(){var e;const t=null!==(e=await B("authToken"))&&void 0!==e?e:sessionStorage.getItem("authToken"),a=new Q(q(t?Z.NavigationDashboardMessage:Z.NavigationSignupLoginMessage));a.addData(q(Z.NavigationPropsMessage),this.props),this.send(a)}render(){const{navigation:e}=this.props;return s.a.createElement(U.a,null,s.a.createElement(W.a,{contentContainerStyle:Ae.scrollView,bounces:!1},s.a.createElement(l.a,{style:Ae.container},s.a.createElement(l.a,{style:Ae.header},s.a.createElement(_.a,{style:Ae.welcome},"Welcome to MaxchatbotApp!")),s.a.createElement(_.a,{style:Ae.instructions},Ce),s.a.createElement(_.a,{style:Ae.header},"DEFAULT BLOCKS"),s.a.createElement(oe,{content:"InfoPage",onPress:()=>e.navigate("InfoPage")}),s.a.createElement(oe,{content:"Alert",onPress:()=>this.showAlert("Example","This happened")}),s.a.createElement(oe,{content:"blogpostsmanagement",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"core",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"utilities",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"CustomProfileHeader",onPress:()=>e.navigate("CustomProfileHeader")}),s.a.createElement(oe,{content:"Maps",onPress:()=>e.navigate("Maps")}),s.a.createElement(oe,{content:"ThemeBlock",onPress:()=>e.navigate("ThemeBlock")}),s.a.createElement(oe,{content:"LandingPage",onPress:()=>e.navigate("LandingPage")}),s.a.createElement(oe,{content:"NavigationMenu",onPress:()=>e.navigate("NavigationMenu")}),s.a.createElement(oe,{content:"SocialMediaAccountRegistrationScreen",onPress:()=>e.navigate("SocialMediaAccountRegistrationScreen")}),s.a.createElement(oe,{content:"SocialMediaAccountLogin",onPress:()=>e.navigate("SocialMediaAccountLogin")}),s.a.createElement(oe,{content:"EmailAccountLoginBlock",onPress:()=>e.navigate("EmailAccountLoginBlock")}),s.a.createElement(oe,{content:"EmailAccountRegistration",onPress:()=>e.navigate("EmailAccountRegistration")}),s.a.createElement(oe,{content:"CountryCodeSelector",onPress:()=>e.navigate("CountryCodeSelector")}),s.a.createElement(oe,{content:"ForgotPassword",onPress:()=>e.navigate("ForgotPassword")}),s.a.createElement(oe,{content:"OTPInputAuth",onPress:()=>e.navigate("OTPInputAuth")}),s.a.createElement(oe,{content:"SocialMediaAccountLoginScreen",onPress:()=>e.navigate("SocialMediaAccountLoginScreen")}),s.a.createElement(oe,{content:"AdvancedSearch",onPress:()=>e.navigate("AdvancedSearch")}),s.a.createElement(oe,{content:"dashboard",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"VideoEmbeddingYoutube",onPress:()=>e.navigate("VideoEmbeddingYoutube")}),s.a.createElement(oe,{content:"TermsConditions",onPress:()=>e.navigate("TermsConditions")}),s.a.createElement(oe,{content:"PostCreation",onPress:()=>e.navigate("PostCreation")}),s.a.createElement(oe,{content:"Categoriessubcategories",onPress:()=>e.navigate("Categoriessubcategories")}),s.a.createElement(oe,{content:"contexttagging",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"UserProfileBasic",onPress:()=>e.navigate("UserProfileBasic")}),s.a.createElement(oe,{content:"EducationalUserProfile",onPress:()=>e.navigate("EducationalUserProfile")}),s.a.createElement(oe,{content:"multipageforms",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"contentmanagement",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"productdescription",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"projecttemplates",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"customform",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"Catalogue",onPress:()=>e.navigate("Catalogue")}),s.a.createElement(oe,{content:"Translation",onPress:()=>e.navigate("Translation")}),s.a.createElement(oe,{content:"Analytics",onPress:()=>e.navigate("Analytics")}),s.a.createElement(oe,{content:"reviewprompt",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"ImportExportData",onPress:()=>e.navigate("ImportExportData")}),s.a.createElement(oe,{content:"Adminconsole2",onPress:()=>e.navigate("Adminconsole2")}),s.a.createElement(oe,{content:"Uploadmedia3",onPress:()=>e.navigate("Uploadmedia3")}),s.a.createElement(oe,{content:"Settings2",onPress:()=>e.navigate("Settings2")}),s.a.createElement(oe,{content:"Chatbot5",onPress:()=>e.navigate("Chatbot5")}),s.a.createElement(oe,{content:"Cfprojecttemplates2",onPress:()=>e.navigate("Cfprojecttemplates2")}),s.a.createElement(oe,{content:"Cftoggledraftvspublishedchatbot",onPress:()=>e.navigate("Cftoggledraftvspublishedchatbot")}),s.a.createElement(oe,{content:"Cfconnectorlogic",onPress:()=>e.navigate("Cfconnectorlogic")}),s.a.createElement(oe,{content:"Cfgoogledialogflowapiintegration",onPress:()=>e.navigate("Cfgoogledialogflowapiintegration")}),s.a.createElement(oe,{content:"Cfpowerbiapiintegration",onPress:()=>e.navigate("Cfpowerbiapiintegration")}),s.a.createElement(oe,{content:"Catalogue1",onPress:()=>e.navigate("Catalogue1")}),s.a.createElement(oe,{content:"Adminconsole",onPress:()=>e.navigate("Adminconsole")}),s.a.createElement(oe,{content:"Settings",onPress:()=>e.navigate("Settings")}),s.a.createElement(oe,{content:"Signuplogin",onPress:()=>e.navigate("Signuplogin")}),s.a.createElement(oe,{content:"Termsandconditions",onPress:()=>e.navigate("Termsandconditions")}),s.a.createElement(oe,{content:"Contentmanagement1",onPress:()=>e.navigate("Contentmanagement1")}),s.a.createElement(oe,{content:"Dashboard4",onPress:()=>e.navigate("Dashboard4")}),s.a.createElement(oe,{content:"Analytics1",onPress:()=>e.navigate("Analytics1")}),s.a.createElement(oe,{content:"chatbot",onPress:()=>this.showAlert("Error","Could not determine assembler export")}),s.a.createElement(oe,{content:"Customiseinterface2",onPress:()=>e.navigate("Customiseinterface2")}))))}}be.instance=void 0;const Ae=V.a.create({scrollView:{flexGrow:1,height:"web"===m.a.OS?"100vh":"auto",backgroundColor:"#F5FCFF"},container:{flex:1},welcome:{fontSize:20,textAlign:"center",fontWeight:"bold",color:"white"},instructions:{textAlign:"center",color:"#6200EE",marginBottom:5,fontWeight:"bold",fontSize:16,padding:10},button:{backgroundColor:"#6200EE",padding:15,color:"white",fontSize:16,fontWeight:"bold"},header:{backgroundColor:"#6200EE",padding:15,color:"white",fontSize:16,fontWeight:"bold"},item:{backgroundColor:"#00000000",padding:18,color:"#6200EE",fontSize:16,fontWeight:"normal"}});var fe=be,xe=a(679);const Ee=V.a.create({main:{flexDirection:"row",justifyContent:"space-evenly",backgroundColor:"#cccccc"}});Object(xe.a)(e=>{let{history:t}=e;return s.a.createElement(l.a,{style:Ee.main},s.a.createElement(X.a,{title:"Home",onPress:()=>t.push("/")}))});const ve=V.a.create({container:{flex:1,marginLeft:"auto",marginRight:"auto",width:"web"===m.a.OS?"75%":"100%",maxWidth:650,padding:16,backgroundColor:"#fff"},labelTitle:{marginTop:24,marginBottom:32,fontSize:32,textAlign:"left",marginVertical:8,color:"#6200EE"},btnStyleWebContainer:{justifyContent:"flex-end",flexDirection:"row"},btnStyleMobileContainer:{},btnStyleWeb:{paddingLeft:50,paddingRight:50,backgroundColor:"#6200EE"},btnStyleMobile:{}});var ye=a(1720),we=a(1828),Ie=a(281),Pe=a(1723),Se=a(1724),Me=a(1725),Fe=a(743),Re=a(1726),De=a(737),Be=a(1719),Te=a(65),ke=a.n(Te),Ne=a(64),Oe=a.n(Ne);const Le=a(813),He=a(814),_e=a(815);class Ve extends K{constructor(e){super(e),this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?Le:He}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?Le:He},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}}const Ue=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}});const We={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},inputStyle:{borderBottom:"1px solid rgba(0, 0, 0, 0.6)",width:"100%",height:"100px",display:"flex",flexDirection:"column",justifyContent:"space-between"},buttonStyle:{width:"100%",height:"45px",marginTop:"40px",border:"none",backgroundColor:"rgb(98, 0, 238)"}};var je=a(148);const ze=a(818),Qe=(a(819),a(817).default);class Ge extends s.a.Component{constructor(e){super(e)}render(){return s.a.createElement(Qe,{fields:"name,email,picture",scope:"email,public_profile",appId:this.props.appId,callback:this.props.callback,testID:"facebookCustomLogin",render:e=>s.a.createElement($.a,{onPress:()=>{e.onClick(),this.props.onPress()},style:qe.facebookStyle,testID:"facebookCustomLoginButton"},s.a.createElement(se.a,{style:qe.facebookImageStyle,source:ze}),s.a.createElement(_.a,{style:qe.facebookTextStyle},this.props.loginFacebookButtonText))})}}const qe=V.a.create({facebookStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:0,backgroundColor:"#ffffff",padding:"11px"},facebookImageStyle:{marginRight:10,width:20,height:20},facebookTextStyle:{color:"#2553b4",fontFamily:"Helvetica-Bold, sans-serif",paddingLeft:7}});var Ze=a(529);const Je=a(437);class Ye extends s.a.Component{constructor(e){super(e)}render(){return s.a.createElement(Ze.b,{clientId:Je.clientID},s.a.createElement(l.a,{style:this.props.style,testID:"googleLogin"},s.a.createElement(Ze.a,{onSuccess:e=>{e.credential&&this.props.onResponse(e.credential)},onError:()=>this.props.onError(Je.loginFailed),useOneTap:!0})))}}var Ke;class Xe{constructor(){this.googleUser=void 0,this.googleUserInfo=void 0,this.delegateClass=void 0,this.parseUserDetails=e=>{var t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(a)},this.googleLogIn=this.googleLogIn.bind(this),this.updateGoogleUser=this.updateGoogleUser.bind(this)}signinChanged(e){z.debugLog("Signin state changed to ",e)}userChanged(e,t){z.debugLog("USER NOW: ",e),Xe.instance.updateGoogleUser(e)&&Xe.instance.delegateClass.googleUserStatusChanged(Xe.instance.googleUserInfo,t)}googleLogIn(e,t){try{Xe.instance.googleUser=null,Xe.instance.delegateClass=e;const a=this.parseUserDetails(t);return Xe.instance.signinChanged(a),Xe.instance.userChanged(a,!1),Promise.resolve(a)}catch(a){z.debugLog(a)}}updateGoogleUser(e){return!(!e||e===Xe.instance.googleUser)&&(Xe.instance.googleUser=e,z.debugLog(e.sub+"_______"+e.email),Xe.instance.googleUserInfo={email:e.email,id:e.sub},!0)}}Ke=Xe,Xe.instance=new Ke;var $e=new Xe;const et=a(437);class tt extends K{constructor(e){super(e),this.createAccountAPICallId="",this.googleUser=void 0,this.startLoading=()=>{this.setState({loading:!0})},this.stopLoading=()=>{this.setState({loading:!1})},this.responseFacebook=e=>{this.stopLoading(),this.props.isRegistration?this.createAccountFromSocial(e.email,e.id,this.props):this.logInWithSocial(e.email,e.email,e.id,this.props),z.debugLog(e)},this.googleLogIn=(e,t)=>{var a;const i=this;null===(a=$e.googleLogIn(this,t))||void 0===a||a.then((function(){i.stopLoading(),z.debugLog("User SIGNED IN.")}),(function(e){i.stopLoading(),e.error}))},this.btnFacebookLogInProps={onPress:()=>{this.startLoading()},callback:this.responseFacebook},this.btnGoogleLogInProps={useOneTap:!0,onResponse:e=>{this.googleLogIn(this.props.isRegistration,e),this.startLoading()},onError:e=>{alert(e)}},this.btnNavigateProps={onPress:()=>this.navigate()},this.subScribedMessages=[],this.receive=this.receive.bind(this),z.attachBuildingBlock(this,[q(Z.RestAPIResponceMessage),q(Z.SessionSaveMessage)]),this.state={loading:!1}}googleUserStatusChanged(e){this.props.isRegistration?this.createAccountFromSocial(e.email,e.id,this.props):this.logInWithSocial(e.email,e.email,e.id,this.props)}async receive(e,t){if(this.stopLoading(),q(Z.SessionSaveMessage)===t.id)this.openInfoPage();else if(q(Z.RestAPIResponceMessage)===t.id&&""!==this.createAccountAPICallId&&this.createAccountAPICallId===t.getData(q(Z.RestAPIResponceDataMessage))){var a=t.getData(q(Z.RestAPIResponceSuccessMessage));if(a&&a.meta&&a.meta.token)this.saveLoggedInUserData(a);else if(a&&a.errors)this.parseApiErrorResponse(a);else{var i=t.getData(q(Z.RestAPIResponceErrorMessage));this.parseApiCatchErrorResponse(i)}}}async createAccountFromSocial(e,t,a){if(!e||0===e.length||!t||0===t.length)return void z.debugLog("createAccountFromSocial empty info");this.startLoading();const i={"Content-Type":et.urlHeaderTypeJSON},s=new Q(q(Z.RestAPIRequestMessage));this.createAccountAPICallId=s.messageId,s.addData(q(Z.RestAPIResponceEndPointMessage),et.createAccountURL);const o={data:{type:"social_account",attributes:{email:e,password:e,unique_auth_id:t}}};s.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(i)),s.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(o)),s.addData(q(Z.NavigationPropsMessage),a),s.addData(q(Z.RestAPIRequestMethodMessage),et.postHttpRequest),z.sendMessage(s.id,s)}async logInWithSocial(e,t,a,i){if(!e||0===e.length||!a||0===a.length)return void z.debugLog("createAccountFromSocial empty info");this.startLoading();const s={"Content-Type":et.urlHeaderTypeJSON},o={data:{type:"social_account",attributes:{email:e,password:t,unique_auth_id:a}}},n=new Q(q(Z.RestAPIRequestMessage));this.createAccountAPICallId=n.messageId,n.addData(q(Z.RestAPIResponceEndPointMessage),et.loginAccountURL),n.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(s)),n.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(o)),n.addData(q(Z.NavigationPropsMessage),i),n.addData(q(Z.RestAPIRequestMethodMessage),et.postHttpRequest),z.sendMessage(n.id,n)}navigate(){var e;(null===(e=this.props)||void 0===e?void 0:e.isRegistration)?this.navigateToSignup():this.navigateToLogin()}navigateToSignup(){const e=new Q(q(Z.NavigateEmailSignUpMessage));e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)}navigateToLogin(){const e=new Q(q(Z.NavigationEmailLogInMessage));e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)}saveLoggedInUserData(e){const t=new Q(q(Z.SessionSaveMessage));t.addData(q(Z.SessionResponseData),JSON.stringify(e)),t.addData(q(Z.SessionResponseToken),e.meta.token),this.send(t)}openInfoPage(){const e=new Q(q(this.props.isRegistration?Z.AccoutResgistrationSuccess:Z.AccoutLoginSuccess));e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)}}const at=a(437);class it extends tt{constructor(e){super(e)}render(){return s.a.createElement(l.a,{style:st.container},this.state.loading&&s.a.createElement(l.a,{style:st.loaderStyle},s.a.createElement(je.a,null)),s.a.createElement(_.a,{style:st.labelTitle},this.props.isRegistration?at.signUpTitleText:at.logInTitleText," "),s.a.createElement(_.a,{style:st.titleWhySignUp},this.props.isRegistration?at.signUpBodyText:at.logInBodyText," "),s.a.createElement(Ge,Object.assign({testID:"btnFacebookLogIn",appId:at.facebookAppId,loginFacebookButtonText:this.props.isRegistration?at.facebookButtonText:at.loginFacebookButtonText},this.btnFacebookLogInProps)),s.a.createElement(Ye,Object.assign({testID:"btnGoogleLogIn",style:st.googleStyle},this.btnGoogleLogInProps)),s.a.createElement(_.a,{style:st.orTextStyle},at.orText," "),s.a.createElement(l.a,{style:st.logInButtonContainer},s.a.createElement($.a,Object.assign({testID:"btnNavigate",style:st.signUpButtonStyle},this.btnNavigateProps),s.a.createElement(_.a,{style:st.signUpButtonTextStyle},this.props.isRegistration?at.signUpButtonText:at.loginButtonText," "))))}}it.SocialMediaAccount=void 0;const st=V.a.create({container:{flex:1,alignItems:"center",backgroundColor:"#F5FCFF"},logInButtonContainer:{overflow:"hidden",display:void 0,flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"flex-start",alignItems:"center",shadowColor:"black",shadowOpacity:.3,shadowRadius:8,height:40,width:205,marginTop:16,elevation:6,backgroundColor:"#ffffff"},facebookStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:0,backgroundColor:"#ffffff",padding:"11px"},facebookImageStyle:{marginRight:10,width:20,height:20},facebookTextStyle:{color:"#2553b4",fontFamily:"Helvetica-Bold, sans-serif",paddingLeft:7},googleStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:5,backgroundColor:"#ffffff",marginTop:32},googleButtonImageStyle:{marginRight:15,width:20,height:20},googleButtonTextStyle:{paddingLeft:6,paddingRight:3,fontSize:14,color:"#2553b4",fontFamily:"Helvetica-Bold, sans-serif",marginLeft:8},orTextStyle:{color:"#000000",fontWeight:"bold",alignSelf:"center",margin:20},signUpButtonStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:0,backgroundColor:"#ffffff",padding:"11px",height:"100%",width:"100%"},signUpButtonTextStyle:{color:"#2553b4",fontSize:11,fontFamily:"Helvetica-Bold, sans-serif"},titleWhySignUp:{marginBottom:32,fontSize:16,textAlign:"left",marginVertical:8},labelTitle:{marginTop:24,marginBottom:32,fontSize:32,textAlign:"left",marginVertical:8,color:"#6200EE"},loaderStyle:{flex:1,alignItems:"center",justifyContent:"center"}});var ot=it;class nt extends K{constructor(e){super(e),this.receive=this.receive.bind(this),this.state={loading:!1,isRegistration:!1},z.attachBuildingBlock(this,[q(Z.RestAPIResponceMessage)])}async receive(e,t){}}class rt extends K{constructor(e){super(e),this.receive=this.receive.bind(this),this.state={},z.attachBuildingBlock(this,[q(Z.RestAPIResponceMessage)])}async receive(e,t){}}const lt=a(820),dt=a(821),ct=a(822);class ht extends K{constructor(e){super(e),this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?lt:dt}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?lt:dt},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}}const pt=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}});const gt={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},inputStyle:{borderBottom:"1px solid rgba(0, 0, 0, 0.6)",width:"100%",height:"100px",display:"flex",flexDirection:"column",justifyContent:"space-between"},buttonStyle:{width:"100%",height:"45px",marginTop:"40px",border:"none",backgroundColor:"rgb(98, 0, 238)"}},ut=a(823),mt=a(824),Ct=a(825);class bt extends K{constructor(e){super(e),this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?ut:mt}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?ut:mt},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}}const At=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}});const ft={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},inputStyle:{borderBottom:"1px solid rgba(0, 0, 0, 0.6)",width:"100%",height:"100px",display:"flex",flexDirection:"column",justifyContent:"space-between"},buttonStyle:{width:"100%",height:"45px",marginTop:"40px",border:"none",backgroundColor:"rgb(98, 0, 238)"}},xt=a(826);class Et extends K{constructor(e){super(e),this.jsonDataApiCallId="",this.getToken=()=>{const e=new Q(q(Z.SessionRequestMessage));this.send(e)},this.isJSON=e=>{try{return"object"===typeof JSON.parse(e)}catch(t){return!1}},this.exportFile=(e,t)=>{const a=new Blob([e],{type:".json"===t?"application/json":"text/csv"}),i=URL.createObjectURL(a),s=document.createElement("a");s.href=i,s.download=`${Date.now()}${t}`,document.body.appendChild(s),s.click(),document.body.removeChild(s),this.setState({loadingCSV:!1,loadingJson:!1})},this.downloadCSVData=async()=>{this.setState({loadingCSV:!0});try{const e=await fetch(`${xt.baseURL}/${xt.exportDataEndpoint}`,{headers:{"Content-Type":xt.csvApiContentType,token:this.state.token}}),t=await e.text();let a=t&&this.isJSON(t)?JSON.parse(t):null;(null===a||void 0===a?void 0:a.errors)?(console.log(a.errors),this.showAlert("Error downloading CSV",xt.errorMsg),this.setState({loadingCSV:!1})):this.exportFile(t,".csv")}catch(e){console.log("error: ",e),this.setState({loadingCSV:!1})}},this.downloadJsonData=()=>{this.setState({loadingJson:!0});const e={"Content-Type":xt.jsonApiContentType,token:this.state.token},t=new Q(q(Z.RestAPIRequestMessage));return this.jsonDataApiCallId=t.messageId,t.addData(q(Z.RestAPIResponceEndPointMessage),xt.exportDataEndpoint),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),t.addData(q(Z.RestAPIRequestMethodMessage),xt.exportDataMethod),z.sendMessage(t.id,t),!0},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess),q(Z.SessionResponseMessage),q(Z.RestAPIResponceMessage)],this.state={loadingCSV:!1,loadingJson:!1,token:""},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(z.debugLog("Message Recived",t),q(Z.SessionResponseMessage)===t.id){let e=t.getData(q(Z.SessionResponseToken));z.debugLog("TOKEN",e),this.setState({token:e})}if(q(Z.RestAPIResponceMessage)===t.id&&""!==this.jsonDataApiCallId&&this.jsonDataApiCallId===t.getData(q(Z.RestAPIResponceDataMessage))){const e=t.getData(q(Z.RestAPIResponceSuccessMessage));e&&e.errors?(console.log(e.errors),alert(xt.errorMsg),this.setState({loadingJson:!1})):e&&this.exportFile(JSON.stringify(e),".json")}}async componentDidMount(){super.componentDidMount(),this.getToken(),!1===this.isPlatformWeb()&&this.props.navigation.addListener("willFocus",()=>{this.getToken()})}}const vt=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}});const yt={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},buttonStyle:{marginTop:"30px",border:"none",backgroundColor:"rgb(98, 0, 238)"}};var wt=a(1837),It=a(1727),Pt=a(1728),St=a(1729),Mt=a(1730),Ft=a(545),Rt=a(1838),Dt=a(531),Bt=a.n(Dt),Tt=a(530),kt=a.n(Tt),Nt=(a(827),a(543)),Ot=a(532),Lt=a.n(Ot),Ht=a(196),_t=a.n(Ht),Vt=a(701),Ut=a.n(Vt);const{centerCrop:Wt,makeAspectCrop:jt,PixelCrop:zt,PercentCrop:Qt}=a(924),Gt=a(925);class qt extends K{constructor(e){super(e),this.imageRef=null,this.getProfileHeaderApiCallId=null,this.updateProfileHeaderApiCallId=null,this.saveCustomHeaderImageApiCallId="",this.getProfileImageHeaderApiCallID=null,this.getToken=()=>{const e=new Q(q(Z.SessionRequestMessage));this.send(e)},this.receive=async(e,t)=>{z.debugLog("Message Recived",t);const a=t.getData(q(Z.RestAPIResponceDataMessage)),i=t.getData(q(Z.RestAPIResponceSuccessMessage));if(q(Z.SessionResponseMessage)===t.id){t.getData(q(Z.SessionResponseToken));this.setState({loginToken:this.state.loginToken},()=>this.getAccountGroup())}if(q(Z.RestAPIResponceMessage)===t.id&&null!==this.getProfileHeaderApiCallId&&a===this.getProfileHeaderApiCallId)if(this.getProfileHeaderApiCallId=null,i&&i.data&&!i.error){var s;0===(null===(s=i.data)||void 0===s?void 0:s.length)&&this.parseApiCatchErrorResponse(Gt.emptyAccount)}else{var o=t.getData(q(Z.RestAPIResponceErrorMessage));this.parseApiCatchErrorResponse(o)}if(q(Z.RestAPIResponceMessage)===t.id&&null!==this.updateProfileHeaderApiCallId&&a===this.updateProfileHeaderApiCallId){this.updateProfileHeaderApiCallId=null,i&&i.data&&this.getAccountGroup();let e=t.getData(q(Z.RestAPIResponceErrorMessage));i&&i.meta&&i.meta.token?z.unSubscribeFromMessages(this,this.subScribedMessages):this.parseApiErrorResponse(i),this.parseApiCatchErrorResponse(e)}if(q(Z.RestAPIResponceMessage)===t.id&&null!==this.getProfileImageHeaderApiCallID&&a===this.getProfileImageHeaderApiCallID)if(this.getProfileImageHeaderApiCallID=null,i&&i.data&&!i.error)this.setState({image:{base64:null===i.data.attributes.settings?"":i.data.attributes.settings.profile_image,width:null===i.data.attributes.settings?0:Gt.imageWidth,height:null===i.data.attributes.settings?0:Gt.imageHeight}});else{o=t.getData(q(Z.RestAPIResponceErrorMessage));this.setState({image:{base64:"",width:0,height:0}}),this.parseApiCatchErrorResponse(o)}},this.handleColorChange=e=>{e.hex!==this.state.selectHeaderColor&&this.setState({previousColor:this.state.HeaderColor?this.state.previousColor:this.state.selectHeaderColor,selectHeaderColor:e.hex,HeaderColor:!0})},this.handleColorBackGround=e=>{e.hex!==this.state.selectBackGroundColor&&this.setState({previousBackGroundColor:this.state.BackgroundColor?this.state.previousBackGroundColor:this.state.selectBackGroundColor,selectBackGroundColor:e.hex,BackgroundColor:!0})},this.handleCloseColorPicker=()=>{this.setState({setHexPickerOpen:!1,selectHeaderColor:this.state.HeaderColor?this.state.previousColor:this.state.selectHeaderColor,HeaderColor:!1})},this.handleCloseColorPickerBackground=()=>{this.setState({setHexPickerOpenBackground:!1,selectBackGroundColor:this.state.BackgroundColor?this.state.previousBackGroundColor:this.state.selectBackGroundColor,BackgroundColor:!1})},this.handleHexPickerToggle=()=>{this.setState({setHexPickerOpen:!this.state.setHexPickerOpen})},this.handleHexPickerBackGround=()=>{this.setState({setHexPickerOpenBackground:!this.state.setHexPickerOpenBackground})},this.handleDoneButtonClick=()=>{this.setState({setHexPickerOpen:!1})},this.handleDoneButtonBackGroundClick=()=>{this.setState({setHexPickerOpenBackground:!1})},this.getAccountGroup=()=>{const e={"Content-Type":"application/json",token:this.state.loginToken},t=new Q(q(Z.RestAPIRequestMessage));this.getProfileHeaderApiCallId=t.messageId,t.addData(q(Z.RestAPIResponceEndPointMessage),Gt.customProfileHeaderEndpoint),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),t.addData(q(Z.RestAPIRequestMethodMessage),Gt.validationApiMethodType),z.sendMessage(t.id,t)},this.getProfileImage=()=>{const e={"Content-Type":"application/json",token:this.state.loginToken},t=new Q(q(Z.RestAPIRequestMessage));this.getProfileImageHeaderApiCallID=t.messageId,t.addData(q(Z.RestAPIResponceEndPointMessage),`${Gt.customProfileHeaderEndpoint}/${this.state.selectedAccount}`),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),t.addData(q(Z.RestAPIRequestMethodMessage),Gt.validationApiMethodType),z.sendMessage(t.id,t)},this.openImagePicker=async e=>{if(this.isPlatformWeb()){if(e&&e.target.files&&e.target.files.length>0){this.setState({crop:void 0});const t=new FileReader;t.addEventListener("load",()=>{var e;return this.setState({imgSrc:(null===(e=t.result)||void 0===e?void 0:e.toString())||"",modalOpen:!0})}),t.readAsDataURL(e.target.files[0])}return}const t=a(926),i=await t.openPicker({width:Gt.imageWidth,height:Gt.imageHeight,cropping:!0,includeBase64:!0,includeExif:!0});this.setState({image:{base64:`data:${i.mime};base64,`+i.data,width:i.width,height:i.height},isImageSelect:!0})},this.handleModalClose=()=>{this.setState({modalOpen:!1})},this.cropImage=()=>{var e;const{completedCrop:t}=this.state,a=(null===(e=this.imageRef)||void 0===e?void 0:e.current)||null,i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return;const o=((null===a||void 0===a?void 0:a.naturalWidth)||0)/((null===a||void 0===a?void 0:a.width)||0),n=((null===a||void 0===a?void 0:a.naturalHeight)||0)/((null===a||void 0===a?void 0:a.height)||0),r=window.devicePixelRatio;i.width=Math.floor((t&&t.width||0)*o*r),i.height=Math.floor((t&&t.height||0)*n*r),s.scale(r,r),s.imageSmoothingQuality="high";const l=(t&&t.x||0)*o,d=(t&&t.y||0)*n;s.save(),s.translate(-l,-d),s.drawImage(a,0,0,(null===a||void 0===a?void 0:a.naturalWidth)||0,(null===a||void 0===a?void 0:a.naturalHeight)||0,0,0,(null===a||void 0===a?void 0:a.naturalWidth)||0,(null===a||void 0===a?void 0:a.naturalHeight)||0);const c=i.toDataURL("image/jpeg");this.setState({image:{base64:c,width:Gt.selectImageWidth,height:Gt.selectImageHeight},modalOpen:!1,isImageSelect:!0})},this.onImageLoad=e=>{const{width:t,height:a}=e.currentTarget,i=Wt(jt({unit:"%",width:90},16/9,t,a),t,a);this.setState({crop:i})},this.uploadImage=async()=>{var e,t,a,i;const s={"Content-Type":Gt.saveCustomProfileHeaderContentType,token:this.state.loginToken};let o={};o=null===(e=this.state.accountList)||void 0===e?void 0:e.find(e=>e.value===this.state.selectedAccount);const n=new Q(q(Z.RestAPIRequestMessage));this.updateProfileHeaderApiCallId=n.messageId;const r={group:{name:null===(t=o)||void 0===t?void 0:t.label,settings:{profile_image:null===(a=this.state.image)||void 0===a?void 0:a.base64},account_ids:null===(i=o)||void 0===i?void 0:i.account}};return this.saveCustomHeaderImageApiCallId=n.messageId,n.addData(q(Z.RestAPIResponceEndPointMessage),`${Gt.customProfileHeaderEndpoint}/${this.state.selectedAccount}`),n.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(s)),n.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(r)),n.addData(q(Z.RestAPIRequestMethodMessage),Gt.updateCustomProfileHeaderMethod),z.sendMessage(n.id,n),!0},this.cropModalWebProps={onClose:this.handleModalClose},this.cropImageWebProps={onLoad:this.onImageLoad},this.cropSubmitButtonWebProps={onClick:this.cropImage},this.handleAccountChange=e=>{this.handleSelectAccount(e.target.value)},this.handleSelectAccount=e=>{this.setState({selectedAccount:e,isImageSelect:!1},()=>{this.getProfileImage()})},this.setAccountPickerOpen=e=>{this.setState({accountPickerOpen:e})},this.setAccountPickerValue=e=>{this.setState({accountValue:e(this.state.accountValue)})},this.subScribedMessages=[q(Z.AccoutLoginSuccess),q(Z.RestAPIResponceMessage),q(Z.NavigationPayLoadMessage),q(Z.RestAPIRequestMessage),q(Z.SessionResponseToken)],this.state={image:null,modalOpen:!1,crop:void 0,completedCrop:void 0,imgSrc:void 0,loginToken:"",accountList:[],selectedAccount:null,isUpload:!1,isImageSelect:!1,accountPickerOpen:!1,accountValue:"",selectedTab:1,anchorEl:null,color:"#51ABB4",setHexPickerOpen:!1,colorBackground:"#FFFFFF",setHexPickerOpenBackground:!1,anchorEl1:null,selectHeaderColor:"#51ABB4",selectBackGroundColor:"#FFFFFF",previousColor:"#51ABB4",previousBackGroundColor:"#FFFFFF",HeaderColor:!1,BackgroundColor:!1},z.attachBuildingBlock(this,this.subScribedMessages)}async componentDidMount(){super.componentDidMount(),this.getAccountGroup(),this.getToken()}componentDidUpdate(e,t){this.isPlatformWeb()||t.isUpload!==this.state.isUpload&&this.state.isUpload&&g.a.alert("",Gt.profileUpdated,[{text:Gt.testOK}])}}const Zt=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}});const Jt={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},cropModalContainer:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},cropModal:{backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},previewImage:{width:320,height:180,margin:20},boxUpperSpace:{marginTop:10},TernaryButtonStyle:{height:30,fontWeight:"bold"},headerDiv:{width:"50px",height:"50px",borderRadius:"30px",display:"inline-block",margin:"5px",cursor:"pointer",border:'2px solid "black"',borderWidth:"20px",boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.3)"},headerSelected:{top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"white",fontWeight:"bold"},HeaderIconButton:{width:"50px",height:"50px",borderRadius:"30px",cursor:"pointer",border:'2px solid "black"',borderWidth:"20px",marginLeft:10,boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.3)"},CancelHeaderButton:{fontWeight:"bold",fontFamily:"Cairo",fontSize:"14px",backgroundColor:"E5EBFF",color:"#51abb4",width:"45%"},DoneHeaderButton:{fontWeight:"bold",fontFamily:"Cairo",fontSize:"14px",backgroundColor:"51ABB3",color:"white",width:"45%"},BackGroundHeader:{fontWeight:"bold",color:"#0F172A",fontFamily:"Cairo",fontSize:"16px",marginTop:20},BackGroundDiv:{width:"50px",height:"50px",borderRadius:"30px",display:"inline-block",margin:"5px",cursor:"pointer",border:'2px solid "black"',borderWidth:"20px",boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.3)"},BackGroundTick:{top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"white",fontWeight:"bold"},BackGroundAddIcon:{width:"50px",height:"50px",borderRadius:"30px",cursor:"pointer",border:'2px solid "black"',borderWidth:"20px",marginLeft:10,boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.3)"},widgetHeader:{fontWeight:"bold",color:"#0F172A",fontFamily:"Cairo",fontSize:"16px",marginTop:20},widgetHeaderDesc:{fontWeight:"bold",color:"grey",fontFamily:"Cairo",fontSize:"13px",marginTop:20},BackGroundCancelButton:{fontWeight:"bold",fontFamily:"Cairo",fontSize:"14px",backgroundColor:"E5EBFF",color:"#51abb4",width:"45%"},BackGroundDoneButton:{fontWeight:"bold",fontFamily:"Cairo",fontSize:"14px",backgroundColor:"51ABB3",color:"white",width:"45%"}};var Yt=a(1735),Kt=a(1736);const Xt=Object(Yt.a)(()=>({root:{position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"rgb(0, 0, 0, .4)",zIndex:1},circularContainer:{position:"absolute",left:"50%",top:"40%",transform:"translate(-50%, -50%)"}}));function $t(e){const t=Xt();return e.loading?s.a.createElement("div",{className:t.root},s.a.createElement("div",{className:t.circularContainer},s.a.createElement(Kt.a,null))):s.a.createElement("div",null)}const ea=a(928);class ta extends tt{constructor(e){super(e),this.state={loading:!1,isRegistration:!1}}render(){const{loading:e}=this.state;return s.a.createElement(l.a,{style:aa.container},s.a.createElement($t,{loading:e}),s.a.createElement(_.a,{style:aa.labelTitle},ea.logInTitleText," "),s.a.createElement(_.a,{style:aa.titleWhySignUp},ea.logInBodyText," "),s.a.createElement(Ge,Object.assign({testID:"btnFacebookLogIn",appId:"170982444234877",loginFacebookButtonText:ea.loginFacebookButtonText},this.btnFacebookLogInProps)),s.a.createElement(Ye,Object.assign({testID:"btnGoogleLogIn",style:aa.googleStyle},this.btnGoogleLogInProps)),s.a.createElement(_.a,{style:aa.orTextStyle},ea.orText," "),s.a.createElement(l.a,{style:aa.logInButtonContainer},s.a.createElement($.a,Object.assign({testID:"btnNavigate",style:aa.signUpButtonStyle},this.btnNavigateProps),s.a.createElement(_.a,{style:aa.signUpButtonTextStyle},ea.loginButtonText," "))))}}ta.SocialMediaAccountLoginScreen=void 0;const aa=V.a.create({container:{flex:1,alignItems:"center",backgroundColor:"#F5FCFF"},logInButtonContainer:{overflow:"hidden",display:void 0,flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"flex-start",alignItems:"center",shadowColor:"black",shadowOpacity:.3,shadowRadius:8,height:40,width:205,marginTop:16,elevation:6,backgroundColor:"#ffffff"},facebookStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:0,backgroundColor:"#ffffff",padding:"11px"},facebookImageStyle:{marginRight:10,width:20,height:20},facebookTextStyle:{color:"#2553b4",fontFamily:"Helvetica-Bold, sans-serif",paddingLeft:7},googleStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:5,backgroundColor:"#ffffff",marginTop:32},googleButtonImageStyle:{marginRight:15,width:20,height:20},googleButtonTextStyle:{paddingLeft:6,paddingRight:3,fontSize:14,color:"#2553b4",fontFamily:"Helvetica-Bold, sans-serif",marginLeft:8},orTextStyle:{color:"#000000",fontWeight:"bold",alignSelf:"center",margin:20},signUpButtonStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:0,backgroundColor:"#ffffff",padding:"11px",height:"100%",width:"100%"},signUpButtonTextStyle:{color:"#2553b4",fontSize:11,fontFamily:"Helvetica-Bold, sans-serif"},titleWhySignUp:{marginBottom:32,fontSize:16,textAlign:"left",marginVertical:8},labelTitle:{marginTop:24,marginBottom:32,fontSize:32,textAlign:"left",marginVertical:8,color:"#6200EE"}});var ia=ta,sa=a(61),oa=a(96);const na=a(929);class ra extends K{constructor(e){super(e),this.otpAuthApiCallId=void 0,this.btnTxtSubmitOtp=void 0,this.placeHolderOtp=void 0,this.labelInfo="",this.submitButtonColor=na.submitButtonColor,this.btnSubmitOTPProps={onPress:()=>this.submitOtp()},this.txtMobilePhoneOTPWebProps={onChangeText:e=>this.setState({otp:e})},this.txtMobilePhoneOTPMobileProps={...this.txtMobilePhoneOTPWebProps,keyboardType:"numeric"},this.txtMobilePhoneOTPProps=this.isPlatformWeb()?this.txtMobilePhoneOTPWebProps:this.txtMobilePhoneOTPMobileProps,this.subScribedMessages=[q(Z.RestAPIResponceMessage),q(Z.NavigationPayLoadMessage)],this.receive=this.receive.bind(this),z.attachBuildingBlock(this,this.subScribedMessages),this.state={otp:"",otpAuthToken:"",userAccountID:"",labelInfo:na.labelInfo,toMessage:"",isFromForgotPassword:!1},this.btnTxtSubmitOtp=na.btnTxtSubmitOtp,this.placeHolderOtp=na.placeHolderOtp}async receive(e,t){if(q(Z.RestAPIResponceMessage)===t.id&&null!=this.otpAuthApiCallId&&this.otpAuthApiCallId===t.getData(q(Z.RestAPIResponceDataMessage))){var a=t.getData(q(Z.RestAPIResponceSuccessMessage));if(a&&(a.messages||a.meta&&a.meta.token))if(a.meta&&a.meta.token&&this.setState({otpAuthToken:a.meta.token}),this.state.isFromForgotPassword){const e=new Q(q(Z.NavigationNewPasswordMessage));e.addData(q(Z.AuthTokenDataMessage),this.state.otpAuthToken),e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)}else{const e=new Q(q(Z.NavigationMobilePhoneAdditionalDetailsMessage));e.addData(q(Z.AuthTokenDataMessage),this.state.otpAuthToken),e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)}else this.parseApiErrorResponse(a);var i=t.getData(q(Z.RestAPIResponceErrorMessage));null!=i&&this.parseApiCatchErrorResponse(i)}else if(q(Z.NavigationPayLoadMessage)===t.id){const e=t.getData(q(Z.AuthTokenDataMessage)),a=t.getData(q(Z.AuthTokenPhoneNumberMessage)),i=t.getData(q(Z.EnterOTPAsForgotPasswordMessage)),s=t.getData(q(Z.AuthTokenEmailMessage)),o=a?""+a:""+s;let n=this.state.labelInfo;o&&"undefined"!==o&&(n=n.replace("phone",o)),this.setState({otpAuthToken:e&&e.length>0?e:this.state.otpAuthToken,userAccountID:o,labelInfo:n,isFromForgotPassword:void 0===i?this.state.isFromForgotPassword:i})}}async submitOtp(){if(!this.state.otp||0===this.state.otp.length)return void this.showAlert(na.errorTitle,na.errorOtpNotValid);const e=new Q(q(Z.RestAPIRequestMessage));if(this.state.isFromForgotPassword){const t={"Content-Type":na.apiVerifyOtpContentType};this.otpAuthApiCallId=e.messageId,e.addData(q(Z.RestAPIResponceEndPointMessage),na.apiVerifyForgotPasswordOtpEndPoint),e.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t));const a={data:{token:this.state.otpAuthToken?this.state.otpAuthToken:"",otp_code:this.state.otp?this.state.otp:""}};e.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(a))}else{const t={"Content-Type":na.apiVerifyOtpContentType,token:this.state.otpAuthToken};this.otpAuthApiCallId=e.messageId,e.addData(q(Z.RestAPIResponceEndPointMessage),na.apiVerifyOtpEndPoint+this.state.otp),e.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),e.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(JSON.stringify({})))}e.addData(q(Z.RestAPIRequestMethodMessage),na.apiVerifyOtpMethod),z.sendMessage(e.id,e)}}const la=V.a.create({container:{flex:1,padding:16,width:"100%",marginLeft:"auto",marginRight:"auto",maxWidth:650,backgroundColor:"#fff"},containerWeb:{flex:1,padding:16,width:"75%",marginLeft:"auto",marginRight:"auto",maxWidth:650,backgroundColor:"#fff"},titleWhySignUp:{marginBottom:32,fontSize:16,textAlign:"left",marginVertical:8},titleOtpInfo:{marginBottom:32,fontSize:16,textAlign:"left",marginVertical:8},phoneInputMobile:{flexDirection:"row",fontSize:16,textAlign:"left",backgroundColor:"#00000000",marginBottom:64,borderWidth:1,borderColor:"#767676",borderRadius:2,includeFontPadding:!0,padding:10},phoneInputWeb:{flex:1,flexDirection:"row",marginBottom:64,fontSize:18,padding:10,borderBottomColor:"#767676",borderBottomWidth:1},bgRectBorder:{borderWidth:1,borderColor:"#767676",borderRadius:2,marginBottom:10,padding:10}});var da=a(373),ca=a(702),ha=a.n(ca);class pa extends i.Component{constructor(e){super(e),this.state={isChecked:this.props.isChecked}}render(){const{testID:e}=this.props;return"ios"===m.a.OS?s.a.createElement(da.a,{testID:e,style:{marginRight:5,marginLeft:5},value:this.state.isChecked,onValueChange:e=>this.handleValueChange(e)}):s.a.createElement(ha.a,{testID:e,style:{marginRight:"web"===m.a.OS?5:0,marginLeft:"web"===m.a.OS?5:0},value:this.state.isChecked,onValueChange:e=>this.handleValueChange(e)})}componentWillReceiveProps(e){this.setState({isChecked:e.isChecked})}handleValueChange(e){this.setState({isChecked:e}),this.props.onChangeValue&&this.props.onChangeValue(e)}}var ga=a(401),ua=a(417),ma=a(73),Ca=a.n(ma);const ba=a(483);class Aa extends K{constructor(e){super(e),this.getTermsCondsCallId="",this.getTermsCondsListCallId="",this.getAccountGroupsCallId="",this.setAcceptanceOfTermsCondsId="",this.getToken=()=>{const e=new Q(q(Z.SessionRequestMessage));this.send(e)},this.navigateToTermsCondsDetail=e=>{const t=new Q(q(Z.NavigationMessage));t.addData(q(Z.NavigationTargetMessage),"TermsConditionsDetail"),t.addData(q(Z.NavigationPropsMessage),this.props);const a=new Q(q(Z.NavigationPayLoadMessage));a.addData(q(Z.SessionResponseData),{termsCondsId:e}),t.addData(q(Z.NavigationRaiseMessage),a),this.send(t)},this.navigateToTermsCondsEdit=()=>{const e=new Q(q(Z.NavigationMessage));e.addData(q(Z.NavigationTargetMessage),"TermsConditionsEdit"),e.addData(q(Z.NavigationPropsMessage),this.props);const t=new Q(q(Z.NavigationPayLoadMessage));t.addData(q(Z.SessionResponseData),null),e.addData(q(Z.NavigationRaiseMessage),t),this.send(e)},this.getAccountGroups=async e=>{const t={"Content-Type":ba.apiContentType,token:e},a=new Q(q(Z.RestAPIRequestMessage));this.getAccountGroupsCallId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),ba.getAccountGroupsApiEndPoint),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestMethodMessage),ba.getApiMethod),z.sendMessage(a.id,a),this.setState({isLoading:!0})},this.getTermsCondsList=async e=>{const t={"Content-Type":ba.apiContentType,token:e},a=new Q(q(Z.RestAPIRequestMessage));this.getTermsCondsListCallId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),ba.getAllTermsCondsApiEndPoint),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestMethodMessage),ba.getApiMethod),z.sendMessage(a.id,a)},this.getTermsConds=async e=>{const t={"Content-Type":ba.apiContentType,token:e},a=new Q(q(Z.RestAPIRequestMessage));this.getTermsCondsCallId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),ba.getTermsCondsApiEndPoint),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestMethodMessage),ba.getApiMethod),z.sendMessage(a.id,a)},this.handleCheckBoxChange=e=>{var t;const a={"Content-Type":ba.apiContentType,token:this.state.token},i={id:null===(t=this.state.termsConds)||void 0===t?void 0:t.id,is_accepted:e},s=new Q(q(Z.RestAPIRequestMessage));this.setAcceptanceOfTermsCondsId=s.messageId,s.addData(q(Z.RestAPIResponceEndPointMessage),ba.setTermsCondsAcceptanceApiEndPoint),s.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),s.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(i)),s.addData(q(Z.RestAPIRequestMethodMessage),ba.postApiMethod),z.sendMessage(s.id,s)},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.SessionResponseMessage),q(Z.RestAPIResponceMessage),q(Z.NavigationPayLoadMessage)],this.state={token:"",accountId:-1,termsCondsList:[],isAdminUser:!0,termsConds:null,isTermsCondsAccepted:!1,isLoading:!1},z.attachBuildingBlock(this,this.subScribedMessages)}async componentDidMount(){super.componentDidMount(),this.getToken(),this.isPlatformWeb()||this.props.navigation.addListener("willFocus",()=>{this.getToken()})}async receive(e,t){const a=t.getData(q(Z.RestAPIResponceDataMessage)),i=t.getData(q(Z.RestAPIResponceSuccessMessage)),s=t.getData(q(Z.RestAPIResponceErrorMessage));if(s&&this.parseApiCatchErrorResponse(s),(null===i||void 0===i?void 0:i.errors)&&this.parseApiErrorResponse(i),q(Z.SessionResponseMessage)===t.id){const e=t.getData(q(Z.SessionResponseToken));if(!e)return this.props.navigation.goBack(),alert("Please Login");{var o;z.debugLog("TOKEN",e);const a=JSON.parse(t.getData(q(Z.SessionResponseData))),i=null===a||void 0===a||null===(o=a.meta)||void 0===o?void 0:o.id;this.setState({accountId:i}),this.setState({token:e,accountId:i},()=>this.getAccountGroups(e))}}if(i&&q(Z.RestAPIResponceMessage)===t.id&&this.getTermsCondsListCallId.length>0&&a===this.getTermsCondsListCallId&&(this.getTermsCondsListCallId="",this.setState({termsCondsList:i.data,isLoading:!1})),i&&q(Z.RestAPIResponceMessage)===t.id&&this.getTermsCondsCallId.length>0&&a===this.getTermsCondsCallId&&(this.getTermsCondsCallId="",this.setState({termsConds:i,isTermsCondsAccepted:i.is_accepted,isLoading:!1})),i&&q(Z.RestAPIResponceMessage)===t.id&&this.setAcceptanceOfTermsCondsId.length>0&&a===this.setAcceptanceOfTermsCondsId&&(this.setAcceptanceOfTermsCondsId="",this.setState({isTermsCondsAccepted:!this.state.isTermsCondsAccepted})),(null===i||void 0===i?void 0:i.data)&&q(Z.RestAPIResponceMessage)===t.id&&this.getAccountGroupsCallId.length>0&&a===this.getAccountGroupsCallId){this.getAccountGroupsCallId="";const e=i.data.some(e=>e.attributes.accounts.some(e=>e.id===this.state.accountId&&1===e.role_id));this.setState({isAdminUser:e}),e?this.getTermsCondsList(this.state.token):this.getTermsConds(this.state.token)}}}const fa=V.a.create({container:{flex:1,margin:20},spinnerContainer:{flex:1,alignItems:"center",justifyContent:"center"},title:{flex:1,padding:20,fontWeight:"600",fontSize:22},termsCondsTitle:{fontWeight:"600",marginBottom:20,fontSize:22},scrollView:{height:"100%"},checkboxContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",marginTop:"auto",marginBottom:40,marginRight:20},termsCondsContainer:{flex:1,flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottomWidth:1,padding:20},button:{backgroundColor:"blue",marginLeft:10,width:120,height:40,display:"flex",justifyContent:"center",borderRadius:4,alignSelf:"flex-end"},buttonLabel:{fontSize:16,color:"#fff",textAlign:"center"},buttonContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-end",margin:20}}),xa=a(483);class Ea extends K{constructor(e){super(e),this.getTermsCondsCallId="",this.getToken=()=>{const e=new Q(q(Z.SessionRequestMessage));this.send(e)},this.navigateToTermsCondsUsers=e=>{var t;const a=new Q(q(Z.NavigationMessage));a.addData(q(Z.NavigationTargetMessage),"TermsConditionsUsers"),a.addData(q(Z.NavigationPropsMessage),this.props);const i=new Q(q(Z.NavigationPayLoadMessage));i.addData(q(Z.SessionResponseData),{termsCondsUsers:null===(t=e.attributes)||void 0===t?void 0:t.accepted_by}),a.addData(q(Z.NavigationRaiseMessage),i),this.send(a)},this.navigateToTermsCondsEdit=()=>{var e,t,a;const i=new Q(q(Z.NavigationMessage));i.addData(q(Z.NavigationTargetMessage),"TermsConditionsEdit"),i.addData(q(Z.NavigationPropsMessage),this.props);const s=new Q(q(Z.NavigationPayLoadMessage));s.addData(q(Z.SessionResponseData),{termsConds:null===(e=this.state.termsConds)||void 0===e||null===(t=e.attributes)||void 0===t?void 0:t.description,termsCondsId:null===(a=this.state.termsConds)||void 0===a?void 0:a.id}),i.addData(q(Z.NavigationRaiseMessage),s),this.send(i)},this.getTermsCondsDetails=(e,t)=>{const a={"Content-Type":xa.apiContentType,token:e},i=new Q(q(Z.RestAPIRequestMessage));this.getTermsCondsCallId=i.messageId,i.addData(q(Z.RestAPIResponceEndPointMessage),`${xa.getAllTermsCondsApiEndPoint}/${t}`),i.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),i.addData(q(Z.RestAPIRequestMethodMessage),xa.getApiMethod),z.sendMessage(i.id,i),this.setState({isLoading:!0})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.SessionResponseMessage),q(Z.RestAPIResponceMessage),q(Z.NavigationPayLoadMessage)],this.state={token:"",termsCondsId:"",termsConds:null,isLoading:!1},z.attachBuildingBlock(this,this.subScribedMessages)}async componentDidMount(){super.componentDidMount(),this.getToken(),this.isPlatformWeb()||this.props.navigation.addListener("willFocus",()=>{this.getToken()})}async receive(e,t){const a=t.getData(q(Z.RestAPIResponceDataMessage)),i=t.getData(q(Z.RestAPIResponceSuccessMessage)),s=t.getData(q(Z.RestAPIResponceErrorMessage));if(s&&this.parseApiCatchErrorResponse(s),(null===i||void 0===i?void 0:i.errors)&&this.parseApiErrorResponse(i),q(Z.SessionResponseMessage)===t.id){const e=t.getData(q(Z.SessionResponseToken));z.debugLog("TOKEN",e),e&&this.setState({token:e},()=>{this.state.termsCondsId&&this.getTermsCondsDetails(e,this.state.termsCondsId)})}if(q(Z.NavigationPayLoadMessage)===t.id){const e=t.getData(q(Z.SessionResponseData)),{termsCondsId:a}=e;a&&this.setState({termsCondsId:a},()=>this.getTermsCondsDetails(this.state.token,a))}q(Z.RestAPIResponceMessage)===t.id&&a===this.getTermsCondsCallId&&(null===i||void 0===i?void 0:i.data)&&(this.getTermsCondsCallId="",this.setState({termsConds:i.data,isLoading:!1}))}}const va=V.a.create({container:{flex:1,margin:20},spinnerContainer:{flex:1,alignItems:"center",justifyContent:"center"},title:{fontWeight:"600",fontSize:22,marginBottom:10},dateTitle:{fontSize:18,marginBottom:20},markdownContainer:{borderWidth:1,padding:10},buttonContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginVertical:20},sendButton:{backgroundColor:"blue",marginLeft:10,width:80,height:40,display:"flex",justifyContent:"center",borderRadius:4,alignSelf:"flex-end"},button:{backgroundColor:"blue",marginLeft:10,width:120,height:40,display:"flex",justifyContent:"center",borderRadius:4,alignSelf:"flex-end"},buttonLabel:{fontSize:16,color:"#fff",textAlign:"center"}}),ya=a(483);class wa extends K{constructor(e){super(e),this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.SessionResponseMessage),q(Z.NavigationPayLoadMessage)],this.state={token:"",termsCondsUserList:[]},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(q(Z.NavigationPayLoadMessage)===t.id){const e=t.getData(q(Z.SessionResponseData)),{termsCondsUsers:a}=e;this.setState({termsCondsUserList:a})}}}const Ia=V.a.create({container:{flex:1,padding:16,marginLeft:"auto",marginRight:"auto",width:"100%",maxWidth:650,backgroundColor:"#ffffffff"},title:{padding:20,fontWeight:"600",fontSize:22},textContainer:{flex:1,flexDirection:"row",alignItems:"center",borderBottomWidth:1,padding:20},text:{flex:1},centralText:{flex:1,marginHorizontal:10,textAlign:"center"},button:{backgroundColor:"blue",marginLeft:10,width:120,height:40,display:"flex",justifyContent:"center",borderRadius:4,alignSelf:"flex-end"},buttonLabel:{fontSize:16,color:"#fff",textAlign:"center"},buttonContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-end",margin:20}});var Pa=a(1830),Sa=a(1737);const Ma=a(1345);class Fa extends K{constructor(e){super(e),this.getLanguageCallId="",this.getTranslateCallId="",this.txtInputProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.handleChangeFrom=e=>{this.setState({fromLang:e.target.value})},this.handleChangeTo=e=>{this.setState({toLang:e.target.value})},this.handleChangeFromMobile=e=>{this.setState({fromLang:e})},this.handleChangeToMobile=e=>{this.setState({toLang:e})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess),q(Z.RestAPIResponceMessage)],this.state={txtInputValue:"",txtSavedValue:"A",convertedText:"Hello bro",fromLang:"en",toLang:"ar",languages:[]},z.attachBuildingBlock(this,this.subScribedMessages)}async componentDidMount(){super.componentDidMount(),this.getLanguage()}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}if(q(Z.RestAPIResponceMessage)===t.id&&this.getLanguageCallId===t.getData(q(Z.RestAPIResponceDataMessage))){var a=t.getData(q(Z.RestAPIResponceSuccessMessage));this.setState({languages:a})}if(q(Z.RestAPIResponceMessage)===t.id&&this.getTranslateCallId===t.getData(q(Z.RestAPIResponceDataMessage))){var i;a=t.getData(q(Z.RestAPIResponceSuccessMessage));this.setState({convertedText:null===(i=a)||void 0===i?void 0:i.translatedText})}}translateTextWeb(){const e={"Content-Type":Ma.translateApiContentType},t=new Q(q(Z.RestAPIRequestMessage));this.getTranslateCallId=t.messageId,t.addData(q(Z.RestAPIResponceEndPointMessage),Ma.translateApiBaseUrl+Ma.translateApiEndPoint),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),t.addData(q(Z.RestAPIRequestMethodMessage),Ma.translateApiMethodType),t.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify({q:this.state.txtInputValue,source:this.state.fromLang,target:this.state.toLang,format:"text"})),z.sendMessage(t.id,t)}getLanguage(){const e={"Content-Type":Ma.languageApiContentType},t=new Q(q(Z.RestAPIRequestMessage));this.getLanguageCallId=t.messageId,t.addData(q(Z.RestAPIResponceEndPointMessage),Ma.translateApiBaseUrl+Ma.languagesApiEndPoint),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),t.addData(q(Z.RestAPIRequestMethodMessage),Ma.languageApiMethodType),z.sendMessage(t.id,t)}}const Ra=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}});const Da={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},inputStyle:{borderBottom:"1px solid rgba(0, 0, 0, 0.6)",width:"100%",height:"50px",display:"flex",flexDirection:"column"},buttonStyle:{width:"100%",height:"45px",marginTop:"40px",border:"none",backgroundColor:"rgb(98, 0, 238)"}};var Ba=a(1839),Ta=a(738);const ka={drawerCard:{container:{width:440,backgroundColor:"#fff",display:"flex",height:"100%",overflowY:"auto",flexDirection:"column",scrollbarWidth:"none","&::-webkit-scrollbar":{width:0}},drawerHeaderOrFooter:{padding:"24px 48px",display:"flex",gap:16,position:"sticky",backgroundColor:"#fff",zIndex:2},stickyHeader:{top:0,"& button":{all:"unset",height:24,cursor:"pointer"}},stickyFooter:{bottom:0},drawerContent:{padding:"0px 48px 24px",flexGrow:1,display:"flex",flexDirection:"column",gap:12,backgroundColor:"#FFFFFF"},formControl:{display:"flex",flexDirection:"column",gap:4,"&. gap-8":{gap:8}},textArea:{width:"100%",boxSizing:"border-box",border:"1px solid #CBD5E1",borderRadius:8,padding:8,fontFamily:"Cairo",color:"#697077",fontWeight:400,fontSize:16,lineHeight:"22.4px",outline:"none","&:focus":{borderColor:"#51ABB3"},"&.error":{border:"1px solid #F59E0B"},"&::placeholder":{opacity:.5}},botContainer:{padding:"16px 8px 16px 16px",display:"flex",flexDirection:"column",gap:12,borderRadius:8,backgroundColor:"#F6F7FF"},addLinkOrOptionButton:{all:"unset",fontFamily:"Inter",fontSize:16,lineHeight:"24px",fontWeight:700,color:"#64748B",cursor:"pointer",display:"flex",gap:8,alignItems:"center",width:"max-content",'&[aria-disabled="true"]':{pointerEvents:"none",color:"#94A3B8"}},iconButton:{all:"unset",cursor:"grab","&.pointer":{cursor:"pointer"}},formErrorOrInfo:{display:"flex",justifyContent:"space-between",gap:4,"&.error":{color:"#D97706"}}},MuiOutlinedInputStyle:{root:{borderRadius:8,"&:hover $notchedOutline":{borderColor:"#CBD5E1"},"&.Mui-Focused $notchedOutline":{borderColor:"#51ABB3",borderWidth:1},"&.Mui-error $notchedOutline":{borderColor:"#F59E0B"}},notchedOutline:{borderWidth:1,borderColor:"#CBD5E1"},input:{padding:0}},MuiTypographyStyle:{fontFamily:"Cairo",h4:{fontSize:18,fontWeight:700,lineHeight:"26px",color:"#0F172A"},subtitle2:{fontWeight:400,fontSize:12,lineHeight:"18px",color:"#94A3B8","&.error":{color:"#D97706"},"&.ml-auto":{marginLeft:"auto"}},body2:{color:"#64748B",fontFamily:"Cairo",fontSize:14,lineHeight:"22px",fontWeight:400,"&.primary":{color:"#51ABB3"}},body1:{fontFamily:"Cairo",fontWeight:700,fontSize:14,lineHeight:"22px",color:"#475569"}},MuiInputBaseRootStyle:{root:{backgroundColor:"#FFFFFF",padding:"16px 8px"},input:{fontFamily:"Cairo",fontSize:"16px",fontWeight:400,lineHeight:"24px",color:"#64748B",height:24,'&[type="number"]':{"-moz-appearance":"textfield"},"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{"-webkit-appearance":"none"}}},MuiOutlinedInputRootStyle:{borderRadius:8,"&:hover $notchedOutline":{borderColor:"#CBD5E1"},"&.Mui-Focused $notchedOutline":{borderColor:"#51ABB3"},"&.secondary $notchedOutline":{borderColor:"#51ABB3"},"&.secondary:not(:has(.Mui-error)):hover $notchedOutline":{borderColor:"#51ABB3"},"&.secondary.Mui-Focused $notchedOutline":{borderColor:"#51ABB3",borderWidth:1},"&.Mui-error $notchedOutline":{borderColor:"#F59E0B !important"}},MuiButtonRootStyle:{fontFamily:"Cairo",fontSize:"16px",fontWeight:700,lineHeight:"24px",color:"#51ABB3",textTransform:"none",borderRadius:8,width:110,textAlign:"center","&:hover":{backgroundColor:"transparent",boxShadow:"none"},"&.Mui-secondary":{backgroundColor:"#E5EBFF"},"&.Mui-primary":{color:"#FFFFFF",backgroundColor:"#51ABB3"}},MuiFormLabelRootStyle:{fontFamily:"Cairo",fontSize:14,lineHeight:"22px",fontWeight:700,color:"#475569"}};var Na=a(1738);const{drawerCard:Oa,MuiTypographyStyle:La}=ka,Ha=Object(De.a)({typography:La}),_a=Object(Yt.a)({stickyHeader:Oa.stickyHeader,drawerHeaderOrFooter:Oa.drawerHeaderOrFooter});function Va(e){let{onClose:t,title:a,id:i}=e;const o=_a();return s.a.createElement(Be.a,{theme:Ha},s.a.createElement("div",{className:`${o.drawerHeaderOrFooter} ${o.stickyHeader}`},!i&&s.a.createElement("button",{"aria-label":"back to panel lists",onClick:t},s.a.createElement(Na.a,{htmlColor:"#334155"})),s.a.createElement(Ie.a,{variant:"h4"},a)))}const{drawerCard:Ua,MuiButtonRootStyle:Wa}=ka,ja=Object(De.a)({overrides:{MuiButton:{text:{padding:"10px 16px"},root:Wa}}}),za=Object(Yt.a)({stickyFooter:Ua.stickyFooter,drawerHeaderOrFooter:Ua.drawerHeaderOrFooter});function Qa(e){let{onClose:t,loading:a,onSaveClick:i}=e;const o=za();return s.a.createElement(Be.a,{theme:ja},s.a.createElement("div",{className:`${o.drawerHeaderOrFooter} ${o.stickyFooter}`},s.a.createElement(Re.a,{onClick:t,className:"Mui-secondary"},"Cancel"),s.a.createElement(Re.a,{"data-testid":"saveChanges",disabled:a,className:"Mui-primary",onClick:i},a?s.a.createElement(Kt.a,{"data-testid":"progressbar",style:{height:24,width:24,color:"#FFFFFF"}}):"Save")))}var Ga=a(78),qa=a(1743),Za=a(1744),Ja=a(1745),Ya=a(1739),Ka=a(1740),Xa=a(1741);const $a=Object(Yt.a)({root:{position:"relative"},select:{padding:"16px 8px",border:"1px solid #CBD5E1",backgroundColor:"#FFF",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6,borderRadius:8,boxSizing:"border-box",cursor:"pointer"},error:{borderColor:"#F59E0B"},value:{fontWeight:400,fontFamily:"Cairo",fontSize:16,lineHeight:"24px",color:"#64748B"},listWithSearchboxContainer:{},listBox:{display:"flex",flexDirection:"column",margin:0,listStyle:"none",padding:0,maxHeight:143,overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"#64748B #FFFFFF"},option:{padding:"12px 16px",fontFamily:"Inter",fontSize:16,fontWeight:400,lineHeight:"24px",color:"#0F172A",cursor:"pointer",display:"flex",gap:10,alignItems:"center",justifyContent:"space-between","&:hover":{backgroundColor:"#F3EBFF"},"&:first-child":{borderRadius:"8px 8px 0 0"},"&:last-child":{borderRadius:"0 0 8px 8px"}},searchBoxList:{padding:"8px 16px"},searchBox:{display:"flex",alignItems:"center",gap:10,padding:6,border:"1px solid #CBD5E1",borderRadius:98},searchInput:{all:"unset",fontFamily:"Inter",fontSize:16,fontWeight:400,lineHeight:"24px",color:"#64748B",height:"24px"}}),ei={overflow:"hidden",maxHeight:"none",border:"1px solid #CBD5E1",backgroundColor:"#FFF",boxShadow:"0px 2px 8px 0px #00000014",boxSizing:"border-box",borderRadius:8};var ti=e=>{let{labelId:t,id:a,placeholder:o,value:n,hasSearch:r,searchPlaceholder:l,options:d,onChange:c,selectBoxWidth:h,renderOption:p,renderSelectedValue:g,optionClassName:u="",selectClassName:m="",optionContainerClassName:C="",disabled:b=!1,error:A=!1,paperStyle:f}=e;const x=$a(),E=Object(i.useRef)(null),[v,y]=Object(i.useState)(!1),[w,I]=Object(i.useState)(d),P=e=>()=>{c(e.value),y(!1),I(d)},S=!!E.current&&window.innerHeight-E.current.getBoundingClientRect().bottom>241;let M=d.find(e=>e.value===n);return s.a.createElement("div",{id:a,className:x.root,style:{width:h}},s.a.createElement("div",{ref:E,"data-error":A,"aria-disabled":b,role:"combobox","aria-expanded":v,"aria-labelledby":t,"aria-haspopup":"listbox",className:`${x.select} ${m} ${A?x.error:""}`,onClick:e=>{var t;null===e||void 0===e||null===(t=e.stopPropagation)||void 0===t||t.call(e),b||y(!0)}},o&&!M&&s.a.createElement("span",{"data-testid":a,className:x.value},o),M&&s.a.createElement("span",{id:"selected-value","data-testid":a,className:x.value},g?g(M):M.label),s.a.createElement(Ya.a,{htmlColor:"#64748B"})),s.a.createElement(Mt.a,{id:"popover-"+a,open:v,anchorEl:E.current,anchorOrigin:{vertical:S?"bottom":"top",horizontal:"center"},transformOrigin:{vertical:S?"top":"bottom",horizontal:"center"},onClose:e=>{e.stopPropagation(),y(!1),I(d)},PaperProps:{style:{width:h,...ei,...f},id:"mui-paperprop"},"aria-expanded":v},s.a.createElement("div",{className:x.listWithSearchboxContainer},r&&s.a.createElement("div",{className:x.searchBoxList},s.a.createElement("div",{className:x.searchBox},s.a.createElement(Ka.a,{htmlColor:"#94A3B8"}),s.a.createElement("input",{type:"text",className:x.searchInput,placeholder:l,onChange:e=>{const t=e.target.value;if(0===t.trim().length)return void I(d);const a=w.filter(e=>e.label.toLowerCase().includes(t.toLowerCase()));I(a)},"aria-label":"search"}))),s.a.createElement("ul",{className:`${x.listBox} ${C}`,role:"listbox"},w.map(e=>{const t=n===e.value;return s.a.createElement("li",{key:e.value,onClick:P(e),"data-value":e.value,className:`${x.option} ${u}`,role:"option","aria-selected":t},p?p(e):e.label,t&&s.a.createElement(Xa.a,{htmlColor:"#51ABB3"}))})))))};const ai={overflow:"hidden",maxHeight:"none",border:"1px solid #CBD5E1",backgroundColor:"#FFF",boxShadow:"0px 2px 8px 0px #00000014",boxSizing:"border-box",borderRadius:8};var ii=e=>{let{labelId:t,id:a,placeholder:o,value:n,hasSearch:r,searchPlaceholder:l,options:d,onChange:c,selectBoxWidth:h,renderOption:p,renderSelectedValue:g,optionClassName:u="",selectClassName:m="",disabled:C=!1,error:b=!1,handleFetchMore:A,hasNextPage:f=!1}=e;const x=$a(),E=Object(i.useRef)(null),[v,y]=Object(i.useState)(!1),[w,I]=Object(i.useState)(d),P=Object(i.useRef)(),S=Object(i.useRef)(null);Object(i.useEffect)(()=>{var e,t;const a=null!==(e=null===(t=S.current)||void 0===t?void 0:t.value)&&void 0!==e?e:"";let i=d;a&&(i=w.filter(e=>e.label.toLowerCase().includes(a.toLowerCase()))),I(i)},[d]);const M=e=>()=>{const t=new Set([...n]);t.has(e.value)?t.delete(e.value):t.add(e.value);const a=[...t];c(a)},F=Object(i.useCallback)(async e=>{e&&(P.current&&P.current.disconnect(),P.current=new IntersectionObserver(async e=>{e[0].isIntersecting&&(null===A||void 0===A||A())}),P.current.observe(e))},[f]),R=!!E.current&&window.innerHeight-E.current.getBoundingClientRect().bottom>241;let D=void 0;const B=new Set(n),T=d.filter(e=>B.has(e.value));return D=0===T.length?void 0:1===T.length?T[0]:{label:T.length+" Selected",value:T.length+" Selected"},s.a.createElement("div",{id:a,className:x.root,style:{width:h}},s.a.createElement("div",{ref:E,"data-testid":a+"-combobox","data-error":b,"aria-disabled":C,role:"combobox","aria-expanded":v,"aria-labelledby":t,"aria-haspopup":"listbox",className:`${x.select} ${m} ${b?x.error:""}`,onClick:()=>{C||y(!0)}},o&&!D&&s.a.createElement("span",{className:x.value},o),D&&s.a.createElement("span",{id:"selected-value",className:x.value},g?g(D):D.label),s.a.createElement(Ya.a,{htmlColor:"#64748B"})),s.a.createElement(Mt.a,{id:"popover-"+a,open:v,anchorEl:E.current,anchorOrigin:{vertical:R?"bottom":"top",horizontal:"center"},transformOrigin:{vertical:R?"top":"bottom",horizontal:"center"},onClose:()=>{S.current&&(S.current.value=""),y(!1),I(d)},PaperProps:{style:{width:h,...ai}},"aria-expanded":v},s.a.createElement("div",{className:x.listWithSearchboxContainer},r&&s.a.createElement("div",{className:x.searchBoxList},s.a.createElement("div",{className:x.searchBox},s.a.createElement(Ka.a,{htmlColor:"#94A3B8"}),s.a.createElement("input",{type:"text",className:x.searchInput,placeholder:l,onChange:e=>{const t=e.target.value;if(0===t.trim().length)return void I(d);const a=w.filter(e=>e.label.toLowerCase().includes(t.toLowerCase()));I(a)},"aria-label":"search",ref:S}))),s.a.createElement("ul",{className:x.listBox,role:"listbox"},w.map(e=>{const t=n.includes(e.value);return s.a.createElement("li",{key:e.value,onClick:M(e),"data-value":e.value,className:`${x.option} ${u}`,role:"option","aria-selected":t},p?p(e):e.label,t&&s.a.createElement(Xa.a,{htmlColor:"#51ABB3"}))}),f&&s.a.createElement("div",{ref:F,style:{margin:"10px auto"}},s.a.createElement(Kt.a,{style:{height:24,width:24,color:"#51ABB3"}}))))))};function si(e){let{children:t,onOutsideClickCallback:a}=e;const o=Object(i.useRef)(null);return Object(i.useEffect)(()=>{const e=e=>{var t;if(!(null===(t=o.current)||void 0===t?void 0:t.contains(e.target))){0===document.querySelectorAll('[role="option"]').length&&a()}};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[a,o]),s.a.createElement("div",{ref:o},t)}var oi=a(1742);const ni=/^https?:\/\/(?:[\w-]+\.)+[a-z]{2,}(?:\/[a-zA-Z0-9-_.~%]*)*(?:\?[a-zA-Z0-9-_.~%=&,]*)?(?:#[\w-]*)?$/,ri=Object(Yt.a)({heading5:{margin:0,fontFamily:"Cairo",fontWeight:700,fontSize:16,lineHeight:"22px",color:"#475569","&.text-14":{fontSize:14}},criteriaOperatorContainer:{display:"flex",justifyContent:"center",alignItems:"center",margin:"4px 0","& .horizontal-line":{width:80,height:2,backgroundColor:"#E2E8F0"},"& .operator-btn":{border:0,backgroundColor:"#FFFFFF",padding:"0px 12px",fontFamily:"Cairo",fontSize:14,lineHeight:"22px",fontWeight:400,color:"#0F172A",cursor:"pointer",boxShadow:"0px 2px 8px 0px #00000014",'&[data-active = "true"]':{backgroundColor:"#51ABB3",color:"#FFFFFF"},"&:focus":{outline:0},"&.or":{borderRadius:"6px 0px 0px 6px"},"&.and":{borderRadius:"0px 6px 6px 0px"}}},ruleCriteriaContainer:{display:"flex",gap:4,alignItems:"center","& > div":{flexGrow:1,borderRadius:6,padding:16,backgroundColor:"#F6F7FF",boxShadow:"0px 2px 8px 0px #00000014",cursor:"pointer","& > p":{fontFamily:"Cairo",margin:0,display:"flex",fontSize:14,fontWeight:400,color:"#51ABB3",lineHeight:"22px",gap:"0px 8px",flexWrap:"wrap","& .subfield":{color:"#51ABB3"},"& > span":{color:"#0F172A"}}},"& > button":{all:"unset",cursor:"pointer"}},row:{display:"flex",gap:4,"&.gap-8":{gap:8},"&.justify-between":{justifyContent:"space-between"},"&.items-center":{alignItems:"center"}},timeSelect:{padding:"8px 10px"},input:{border:"1px solid #51ABB3",backgroundColor:"#FFFFFF",boxSizing:"border-box",padding:"14px 6px",fontFamily:"Cairo",height:56,fontWeight:400,fontSize:"16px",color:"#64748B",lineHeight:"24px",borderRadius:8,"&:placeholder":{opacity:.5},"&:focus":{outline:0},'&[aria-invalid="true"]':{borderColor:"#F59E0B"}},timeLabel:{margin:0,fontFamily:"Cairo",fontWeight:700,fontSize:14,lineHeight:"22px",color:"#334155",'&[data-error="true"]':{color:"#F59E0B"}},contextBox:{display:"flex",gap:12,flexDirection:"column",backgroundColor:"#F6F7FF",padding:"16px 8px",borderRadius:8},dots:{fontFamily:"Inter",fontWeight:700,fontSize:16,lineHeight:"24px",color:"#0F172A"},column:{display:"flex",flexDirection:"column",gap:4,"&.gap-8":{gap:"8px"}},andOrDoneButton:{width:93,boxSizing:"border-box",border:0,backgroundColor:"#E5EBFF",padding:"6px 10px",borderRadius:8,color:"#51ABB3",fontFamily:"Cairo",fontSize:16,lineHeight:"24px",fontWeight:700,cursor:"pointer","&:focus":{ouline:0},"&.primary":{backgroundColor:"#51ABB3",color:"#FFFFFF"},'&[aria-disabled="true"':{pointerEvents:"none"}}}),li=[{label:"Android",value:"android"},{label:"Blackberry",value:"blackberry"},{label:"iOS",value:"iOS"},{label:"iPadOS",value:"iPadOS"},{label:"Linux",value:"linux"},{label:"Windows",value:"windows"},{label:"Nokia",value:"nokia"},{label:"Mac OS",value:"macOS"}],di=[{label:"Is",value:"is_equal_to"},{label:"Is not",value:"is_not_equal_to"},{label:"Contains",value:"contains"},{label:"Between",value:"between"},{label:"After",value:"after"},{label:"Before",value:"before"}],ci=[{label:"00",value:"00"},{label:"01",value:"01"},{label:"02",value:"02"},{label:"03",value:"03"},{label:"04",value:"04"},{label:"05",value:"05"},{label:"06",value:"06"},{label:"07",value:"07"},{label:"08",value:"08"},{label:"09",value:"09"},{label:"10",value:"10"},{label:"11",value:"11"},{label:"12",value:"12"},{label:"13",value:"13"},{label:"14",value:"14"},{label:"15",value:"15"},{label:"16",value:"16"},{label:"17",value:"17"},{label:"18",value:"18"},{label:"19",value:"19"},{label:"20",value:"20"},{label:"21",value:"21"},{label:"22",value:"22"},{label:"23",value:"23"}],hi=[{label:"00",value:"00"},{label:"01",value:"01"},{label:"02",value:"02"},{label:"03",value:"03"},{label:"04",value:"04"},{label:"05",value:"05"},{label:"06",value:"06"},{label:"07",value:"07"},{label:"08",value:"08"},{label:"09",value:"09"},{label:"10",value:"10"},{label:"11",value:"11"},{label:"12",value:"12"},{label:"13",value:"13"},{label:"14",value:"14"},{label:"15",value:"15"},{label:"16",value:"16"},{label:"17",value:"17"},{label:"18",value:"18"},{label:"19",value:"19"},{label:"20",value:"20"},{label:"21",value:"21"},{label:"22",value:"22"},{label:"23",value:"23"},{label:"24",value:"24"},{label:"25",value:"25"},{label:"26",value:"26"},{label:"27",value:"27"},{label:"28",value:"28"},{label:"29",value:"29"},{label:"30",value:"30"},{label:"31",value:"31"},{label:"32",value:"32"},{label:"33",value:"33"},{label:"34",value:"34"},{label:"35",value:"35"},{label:"36",value:"36"},{label:"37",value:"37"},{label:"38",value:"38"},{label:"39",value:"39"},{label:"40",value:"40"},{label:"41",value:"41"},{label:"42",value:"42"},{label:"43",value:"43"},{label:"44",value:"44"},{label:"45",value:"45"},{label:"46",value:"46"},{label:"47",value:"47"},{label:"48",value:"48"},{label:"49",value:"49"},{label:"50",value:"50"},{label:"51",value:"51"},{label:"52",value:"52"},{label:"53",value:"53"},{label:"54",value:"54"},{label:"55",value:"55"},{label:"56",value:"56"},{label:"57",value:"57"},{label:"58",value:"58"},{label:"59",value:"59"}],pi=[{label:"Context variable",value:"bot_contexts"},{label:"Operating system",value:"operating_system"},{label:"Time of the day",value:"time_of_the_day"},{label:"Current page URL",value:"current_page_url"}],gi={operating_system:"Operating system",time_of_the_day:"Time of the day",current_page_url:"Current page URL",bot_contexts:"Context variable"},ui={operating_system:di.slice(0,2),time_of_the_day:[di[0],...di.slice(3,6)],current_page_url:di.slice(0,3),bot_contexts:di.slice(0,2)},mi=["Start Time","End Time"],Ci=()=>{const e=new Date;return`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`},bi=e=>{let t=!1,a={...e};if("operating_system"===a.fieldName&&a.selectedOperatingSystems)t=0===a.selectedOperatingSystems.length,a={...a,error:0===a.selectedOperatingSystems.length};else if("current_page_url"===a.fieldName){const e=((e,t)=>{let a=!1;return 0===(null===e||void 0===e?void 0:e.trim().length)?a=!0:"contains"!==t&&e&&(a=!ni.test(e)),a})(a.currentPageURL,a.comparator);t=e,a={...a,error:e}}else if("time_of_the_day"===a.fieldName&&"between"===a.comparator&&a.time){const e=a.time[0]===a.time[1];t=e,a={...a,error:e}}else if(""===e.fieldName)t=!0,a={...a,fieldNameError:!0};else if("bot_contexts"===e.fieldName){var i,s;t=!e.subField||0===(null===(i=e.selectedSubFieldOptions)||void 0===i?void 0:i.length),a={...a,error:!e.subField,selectedSubFieldOptionsError:0===(null===(s=e.selectedSubFieldOptions)||void 0===s?void 0:s.length)}}return{hasError:t,newCriteria:a}},Ai=[{comparator:"",fieldName:""}],fi=(e,t)=>t&&e[t]?e[t].map(e=>({label:e,value:e})):[];function xi(e){let{onAddRule:t,initialCriteria:a=Ai,contextVariables:o,onDeleteCriteria:n}=e;const r=ri(),[l,d]=Object(i.useState)(a),[c,h]=Object(i.useState)(()=>a[0].fieldName?null:0),p=(e,t)=>{let a=l[t];switch(e){case"operating_system":a={...a,selectedOperatingSystems:[],comparator:"is_equal_to",fieldName:"operating_system",error:!1,fieldNameError:!1};break;case"time_of_the_day":const e=Ci();a={...a,time:[e,e],comparator:"between",fieldName:"time_of_the_day",fieldNameError:!1,error:!1};break;case"current_page_url":a={...a,comparator:"is_equal_to",currentPageURL:"",fieldName:"current_page_url",error:!1,fieldNameError:!1};break;case"bot_contexts":a={...a,comparator:o.subFields.length>0?"is_equal_to":"",fieldName:"bot_contexts",error:0===o.subFields.length,selectedSubFieldOptions:[],fieldNameError:!1,selectedSubFieldOptionsError:!1,subField:""}}const i=[...l];i[t]=a,d(i)},g=(e,t)=>{const a=l[t],i=[...l];i[t]={...a,...e},d(i)},u=e=>t=>{let a={comparator:t};if("time_of_the_day"===l[e].fieldName){const e=Ci();a={...a,time:"between"===t?[e,e]:[e],error:"between"===t}}g(a,e)},m=e=>t=>{g({selectedOperatingSystems:t,error:0===t.length},e)},C=e=>t=>{const a=t.target.value;let i=!1;"contains"===l[e].comparator||ni.test(a)||(i=!0),g({currentPageURL:a,error:0===a.trim().length||i},e)},b=e=>t=>{g({subField:t,selectedSubFieldOptions:[],error:!1},e)},A=e=>t=>{g({selectedSubFieldOptions:t,selectedSubFieldOptionsError:0===t.length},e)},f=(e,t,a)=>i=>{const s=l[t].time,o=[...s],n=s[e].split(":"),r=a?`${i}:${n[1]}`:`${n[0]}:${i}`;o[e]=r,g({time:o},t)},x=()=>{const e=[...l];e.pop(),d(e)},E=(e,t)=>a=>{if(a.stopPropagation(),null!==c)return x(),void h(null);g({criteriaOperatorWithPreviousCriteria:e},t)},v=e=>{let t=l[e];const{hasError:a,newCriteria:i}=bi(t),s=[...l];s[e]=i,a?d(s):h(null)},y=()=>{null!==c&&v(c)},w=e=>()=>{if(null!==c)return void v(c);const t={fieldName:"",comparator:"",criteriaOperatorWithPreviousCriteria:e};d([...l,t]),h(l.length)},I=l.some(e=>e.error);return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:r.row+" justify-between"},s.a.createElement("h5",{className:r.heading5},"Audience criteria"),s.a.createElement("button",{"data-testid":"done-btn",onClick:()=>{if(l.some(e=>{const{hasError:t}=bi(e);return t})){const e=l.map(e=>{const{newCriteria:t}=bi(e);return t});d(e)}else t(l)},className:r.andOrDoneButton+" primary","aria-disabled":I},"Done")),s.a.createElement("div",{className:r.column+" gap-8","data-testid":"criteria"},s.a.createElement("h5",{className:r.heading5+" text-14"},`Rules - (${l.length})*`),l.map((e,t)=>s.a.createElement(s.a.Fragment,{key:t},e.criteriaOperatorWithPreviousCriteria&&s.a.createElement("div",{className:r.criteriaOperatorContainer},s.a.createElement("div",{className:"horizontal-line"}),s.a.createElement("button",{"data-testid":"change-to-or-operator-"+t,className:"operator-btn or","data-active":"or"===e.criteriaOperatorWithPreviousCriteria,onClick:E("or",t)},"or"),s.a.createElement("button",{"data-testid":"change-to-and-operator-"+t,className:"operator-btn and","data-active":"and"===e.criteriaOperatorWithPreviousCriteria,onClick:E("and",t)},"and"),s.a.createElement("div",{className:"horizontal-line"})),c===t?s.a.createElement(Ei,{key:t,criteria:e,criteriaIndex:t,subFields:o.subFields,subFieldValue:o.subFieldValue,onFieldNameSelect:p,onComparatorChange:u,onOperatingSystemsChange:m,onCurrentPageURLInputChange:C,onHourAndMinuteTimeChange:f,onCriteriaFieldsOutsideClick:y,onSubFieldChange:b,onSubFieldOptionsChange:A}):s.a.createElement(vi,{criteria:e,onExpandCriteriaFields:()=>(e=>{if(null!==c)return x(),void h(e);h(e)})(t),isExpanded:t===c,handleDeleteCriteria:()=>(e=>{const t=[...l],a=l[e];if(a.criteriaId&&n(a.criteriaId),t[e+1]&&(t[e+1]={...t[e+1],criteriaOperatorWithPreviousCriteria:void 0}),1===l.length)return d(Ai),void h(0);h(null),t.splice(e,1),d([...t])})(t),subFields:o.subFields,subFieldValue:o.subFieldValue}))),s.a.createElement("div",{className:r.row+" gap-8"},s.a.createElement("button",{"data-testid":"add-or-operator","aria-disabled":null===c,className:r.andOrDoneButton,onClick:w("or")},"or"),s.a.createElement("button",{"data-testid":"add-and-operator","aria-disabled":null===c,className:r.andOrDoneButton,onClick:w("and")},"and"))))}function Ei(e){var t,a;let{criteria:i,criteriaIndex:o,subFields:n,subFieldValue:r,onFieldNameSelect:l,onComparatorChange:d,onOperatingSystemsChange:c,onCurrentPageURLInputChange:h,onHourAndMinuteTimeChange:p,onCriteriaFieldsOutsideClick:g,onSubFieldChange:u,onSubFieldOptionsChange:m}=e;const C=ri();return s.a.createElement(si,{onOutsideClickCallback:g},s.a.createElement("div",{className:C.contextBox},s.a.createElement(ti,{selectBoxWidth:320,id:"select-criterion",placeholder:"Select criterion",value:i.fieldName,onChange:e=>l(e,o),options:pi,hasSearch:!1,error:!!i.fieldNameError}),"bot_contexts"===i.fieldName&&s.a.createElement(ti,{selectBoxWidth:320,id:"select-subfield",placeholder:"Select",value:null!==(t=i.subField)&&void 0!==t?t:"",onChange:u(o),options:n.map(e=>({label:e,value:e})),hasSearch:!1,error:0===n.length||i.error,disabled:0===n.length}),i.fieldName&&i.comparator&&s.a.createElement(ti,{key:gi[i.fieldName],selectBoxWidth:174,id:"select-comparator",placeholder:"Select comparator",value:i.comparator,onChange:d(o),options:ui[i.fieldName],hasSearch:!1}),"operating_system"===i.fieldName&&i.selectedOperatingSystems&&s.a.createElement(ii,{selectBoxWidth:320,id:"select-operating-system",placeholder:"Select operating system",value:i.selectedOperatingSystems,options:li,hasSearch:!1,onChange:c(o),error:i.error}),"bot_contexts"===i.fieldName&&n.length>0&&s.a.createElement(ii,{selectBoxWidth:320,id:"select-subfield-option",placeholder:"Select",value:null!==(a=i.selectedSubFieldOptions)&&void 0!==a?a:[],options:fi(r,i.subField),hasSearch:!1,onChange:m(o),error:i.selectedSubFieldOptionsError,disabled:!i.subField}),"current_page_url"===i.fieldName&&s.a.createElement("input",{type:"text",placeholder:"Type the current page URL",value:i.currentPageURL,onChange:h(o),className:C.input,"aria-invalid":i.error}),"time_of_the_day"===i.fieldName&&i.time&&i.time.map((e,t)=>{const a=e.split(":");return s.a.createElement("div",{key:t,className:C.column+" gap-4"},s.a.createElement("p",{className:C.timeLabel,"data-error":1===t&&i.error},"between"!==i.comparator?"Time":mi[t]),s.a.createElement("div",{className:C.row+" items-center"},s.a.createElement(ti,{selectBoxWidth:79,id:"hour-time-"+t,placeholder:"Hour",value:a[0],onChange:p(t,o,!0),options:ci,hasSearch:!1,selectClassName:C.timeSelect}),s.a.createElement("div",{className:C.dots},":"),s.a.createElement(ti,{selectBoxWidth:79,id:"minute-time-"+t,placeholder:"Minute",value:a[1],onChange:p(t,o,!1),options:hi,hasSearch:!1,selectClassName:C.timeSelect})))})))}function vi(e){let{criteria:t,onExpandCriteriaFields:a,isExpanded:i,handleDeleteCriteria:o,subFields:n,subFieldValue:r}=e;const l=ri();let d="",c=void 0;var h;if(("operating_system"===t.fieldName&&t.selectedOperatingSystems&&(d=t.selectedOperatingSystems.map(e=>Bi[e]).join(", ")),"time_of_the_day"===t.fieldName&&t.time&&(d=t.time.join(" and ")),"current_page_url"===t.fieldName&&t.currentPageURL&&(d=t.currentPageURL),"bot_contexts"===t.fieldName&&t.selectedSubFieldOptions)&&n.includes(null!==(h=t.subField)&&void 0!==h?h:"")){const e=new Set(r[t.subField]);d=t.selectedSubFieldOptions.filter(t=>e.has(t)).join(", ")}return t.subField&&(c=t.subField),s.a.createElement("div",{className:l.ruleCriteriaContainer,onClick:a},s.a.createElement("div",null,s.a.createElement("p",null,gi[t.fieldName],c&&s.a.createElement("span",{className:"subfield"},c),s.a.createElement("span",null,`${Ti[t.comparator]} ${d}`))),!i&&s.a.createElement("button",{"aria-label":`remove ${gi[t.fieldName]} ${Ti[t.comparator]} ${d}`,onClick:e=>{e.stopPropagation(),o()}},s.a.createElement(oi.a,{htmlColor:"#DC2626"})))}const yi=a(1346),wi=a(1347),Ii=e=>e.map(e=>{const t={criteria_routing_title:e.title,rules_attributes:e.criteria.map(e=>{let t={field_name:e.fieldName,comparator:e.comparator,values:[],operator_with_previous_index:""};return e.selectedOperatingSystems&&(t.values=e.selectedOperatingSystems),e.currentPageURL&&(t.values=[e.currentPageURL]),e.time&&(t.values=e.time),e.criteriaOperatorWithPreviousCriteria&&(t.operator_with_previous_index=e.criteriaOperatorWithPreviousCriteria),e.criteriaId&&(t.id=e.criteriaId),e.subField&&e.selectedSubFieldOptions&&(t.sub_field=e.subField,t.values=e.selectedSubFieldOptions),t})};return e.ruleId&&(t.id=e.ruleId),t});var Pi=a(10);a(1348);class Si extends K{constructor(e){var t;super(e),this.currentRuleId=null,this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?yi:wi}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?yi:wi},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.handleChangeNameInput=e=>{this.setState({nameValue:e.target.value,nameError:0===e.target.value.trim().length})},this.handleAddRule=()=>{this.setState({isAudienceCriteria:!0})},this.onAddRule=e=>{let t=[...this.state.rules];if(this.currentRuleId){const a=t.findIndex(e=>e.id===this.currentRuleId);t[a]={...t[a],criteria:e}}else{const a={title:"Rule "+(this.state.rules.length+1),id:Date.now(),criteria:e,nextCardId:null};t.push(a)}this.currentRuleId=null,this.setState({rules:t,isAudienceCriteria:!1,selectedCriteria:void 0})},this.onDeleteRule=(e,t)=>a=>{a.stopPropagation();const i=this.state.rules.filter(t=>t.id!==e);this.currentRuleId=null;const s=[...this.state.deletedRuleIds];t&&s.push(t),this.setState({rules:i,selectedCriteria:void 0,deletedRuleIds:s})},this.onDeleteCriteria=e=>{const t=[...this.state.deletedCriteriaRoutingIds,e];this.setState({deletedCriteriaRoutingIds:t})},this.onDragEnd=e=>{if(!e.destination)return;if(e.destination.index===e.source.index)return;const t=[...this.state.rules],[a]=t.splice(e.source.index,1);t.splice(e.destination.index,0,a),this.setState({rules:t})},this.onRuleAndCriteriaClick=e=>t=>{t.stopPropagation();const{id:a,criteria:i}=this.state.rules[e];this.currentRuleId=a,this.setState({selectedCriteria:i,isAudienceCriteria:!0})},this.onSave=()=>{if(this.state.isAudienceCriteria||this.state.nameError)return;const e=0===this.state.nameValue.trim().length;if(e)return void this.setState({nameError:e});if(this.setState({nameError:!1}),0===this.state.rules.length)return void Pi.b.error("Please add a rule",{className:"error__toast"});const t=Ii(this.state.rules);this.props.onSaveClick({name:this.state.nameValue,criteriaRoutings:t,cardId:this.props.cardId,criteriaRoutingIds:this.state.deletedRuleIds,ruleIds:this.state.deletedCriteriaRoutingIds})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1,nameError:!1,nameValue:null!==(t=this.props.name)&&void 0!==t?t:"",isAudienceCriteria:!1,rules:[],selectedCriteria:void 0,deletedRuleIds:[],deletedCriteriaRoutingIds:[]},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}async componentDidMount(){if(this.props.initialCriteriaRoutings.length>0){const e=this.props.initialCriteriaRoutings.filter(e=>"Not Matched"!==e.title).map(e=>{const t=e.rules.map(e=>{const t={criteriaId:e.rule_id,fieldName:e.field_name,comparator:e.comparator,criteriaOperatorWithPreviousCriteria:e.operator_with_previous_index};return"current_page_url"===e.field_name?t.currentPageURL=e.values[0]:"operating_system"===e.field_name?t.selectedOperatingSystems=e.values:"time_of_the_day"===e.field_name&&(t.time=e.values),"bot_contexts"===e.field_name&&(t.subField=e.sub_field,t.selectedSubFieldOptions=e.values),t});return{title:e.title,ruleId:e.criteria_routing_id,id:e.criteria_routing_id,criteria:t,nextCardId:e.nextCardId}});this.setState({rules:e})}}}const Mi=Object(Ta.a)("div")({display:"flex",gap:8,borderRadius:6,padding:16,backgroundColor:"#F6F7FF",boxShadow:"0px 2px 8px 0px #00000014",alignItems:"flex-start","& .grab":{all:"unset",cursor:"grab"},"& .delete-rule":{all:"unset",cursor:"pointer"},"& .title":{margin:0,fontFamily:"Inter",fontWeight:700,fontSize:16,lineHeight:"24px",color:"#334155"},"& .flex":{display:"flex"},"& .flex-column":{flexDirection:"column"},"& .gap-2":{gap:2},"& .gap-4":{gap:4},"& .gap-8":{gap:8},"& .items-center":{alignItems:"center"},"& .rule-criteria":{fontFamily:"Cairo",margin:0,fontWeight:400,fontSize:14,lineHeight:"22px",color:"#51ABB3",gap:"0px 8px",flexWrap:"wrap","& > span":{color:"#0F172A",'&[data-valid="false"]':{color:"#F59E0B"}}}}),Fi=Object(Ta.a)("button")({all:"unset",display:"flex",alignItems:"center",gap:8,fontFamily:"Cairo",fontSize:16,lineHeight:"24px",fontWeight:700,color:"#64748B",cursor:"pointer"}),Ri=Object(Ta.a)("div")({display:"flex",gap:4,flexDirection:"column","& .formErrorOrInfo":{display:"flex",justifyContent:"space-between",gap:4}}),Di=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:ka.MuiTypographyStyle,overrides:{MuiContainer:{root:{width:440,marginLeft:0,marginRight:0,backgroundColor:"#FFFFFF",display:"flex",height:"100%",overflowY:"auto",flexDirection:"column",scrollbarWidth:"none",paddingRight:0,paddingLeft:0,"&::-webkit-scrollbar":{width:0},"@media (min-width: 600px)":{paddingLeft:0,paddingRight:0},"& .content":{flexGrow:1,backgroundColor:"#FFFFFF",display:"flex",gap:12,padding:"0px 48px 24px",flexDirection:"column"},"& .form-control":{display:"flex",gap:4,flexDirection:"column","&.gap-8":{gap:8},"&.items-start":{alignItems:"flex-start"}}}},MuiOutlinedInput:ka.MuiOutlinedInputStyle,MuiInputBase:ka.MuiInputBaseRootStyle,MuiFormLabel:{root:ka.MuiFormLabelRootStyle}}}),Bi={android:"Android",blackberry:"Blackberry",iOS:"iOS",iPadOS:"iPadOS",linux:"Linux",windows:"Windows",nokia:"Nokia",macOS:"Mac OS"},Ti={is_equal_to:"is",is_not_equal_to:"is not",contains:"contains",between:"between",after:"after",before:"before"};class ki extends Si{constructor(e){super(e),this.renderOperatingSystem=(e,t,a)=>{const i=e.map(e=>Bi[e]);return s.a.createElement("p",{className:"flex gap-8 rule-criteria",key:a},"Operating system",s.a.createElement("span",null,`${Ti[t]} ${i.join(", ")}`))},this.renderCurrentPageURL=(e,t,a)=>s.a.createElement("p",{className:"flex gap-8 rule-criteria",key:a},"Current page URL",s.a.createElement("span",null,`${Ti[t]} ${e}`)),this.renderTimeOfTheDay=(e,t,a)=>s.a.createElement("p",{className:"flex gap-8 rule-criteria",key:a},"Time of the day",s.a.createElement("span",null,`${Ti[t]} ${e.join(" and ")}`)),this.renderContextVariable=(e,t,a,i)=>{const o=this.props.contextVariables.subFields.includes(t),n=new Set(this.props.contextVariables.subFieldValue[t]);return s.a.createElement("p",{className:"flex gap-8 rule-criteria",key:i},"Context variable "+t,s.a.createElement("span",null,Ti[a]),s.a.createElement("span",{"data-testid":t,"data-valid":o},o?e.filter(e=>n.has(e)).join(", "):"{variable deleted}"))},this.renderNameError=()=>this.state.nameError?s.a.createElement(Ie.a,{variant:"subtitle2",className:"error"},"Please add a name"):null,this.renderRuleCriteria=e=>e.criteria.map((e,t)=>"operating_system"===e.fieldName&&e.selectedOperatingSystems?this.renderOperatingSystem(e.selectedOperatingSystems,e.comparator,t):"current_page_url"===e.fieldName&&e.currentPageURL?this.renderCurrentPageURL(e.currentPageURL,e.comparator,t):"time_of_the_day"===e.fieldName&&e.time?this.renderTimeOfTheDay(e.time,e.comparator,t):"bot_contexts"===e.fieldName&&e.subField&&e.selectedSubFieldOptions?this.renderContextVariable(e.selectedSubFieldOptions,e.subField,e.comparator,t):void 0)}render(){return s.a.createElement(Be.a,{theme:Di},s.a.createElement(ye.a,{"data-testid":"container"},s.a.createElement(Va,{id:this.props.cardId,onClose:this.props.onClose,title:"Criteria routing"}),s.a.createElement("div",{className:"content"},s.a.createElement(Ri,null,s.a.createElement(Pe.a,{htmlFor:"criteriaRoutingName"},"Name*"),s.a.createElement(Ba.a,{id:"criteriaRoutingName",name:"criteriaRoutingName",inputProps:{maxLength:50,placeholder:"Criteria routing card"},value:this.state.nameValue,error:this.state.nameError,onChange:this.handleChangeNameInput}),s.a.createElement("div",{className:"formErrorOrInfo"},this.renderNameError(),s.a.createElement(Ie.a,{variant:"subtitle2",className:"ml-auto"},this.state.nameValue.trim().length,"/50"))),this.state.isAudienceCriteria?s.a.createElement(xi,{onAddRule:this.onAddRule,initialCriteria:this.state.selectedCriteria,contextVariables:this.props.contextVariables,onDeleteCriteria:this.onDeleteCriteria}):s.a.createElement("div",{className:"form-control gap-8 items-start"},s.a.createElement(Ie.a,{variant:"body1"},`Rules - (${this.state.rules.length})*`),s.a.createElement(Ga.a,{onDragEnd:this.onDragEnd},s.a.createElement(Ga.c,{droppableId:"criteria-rules"},e=>s.a.createElement("div",Object.assign({ref:e.innerRef},e.droppableProps,{style:{width:"100%"}}),s.a.createElement("div",{className:"form-control gap-8"},this.state.rules.map((e,t)=>s.a.createElement(Ga.b,{draggableId:""+e.id,key:e.id,index:t},a=>s.a.createElement(Mi,Object.assign({ref:a.innerRef},a.draggableProps),s.a.createElement("button",Object.assign({},a.dragHandleProps,{className:"grab"}),s.a.createElement(qa.a,{htmlColor:"#64748B"})),s.a.createElement("div",{className:"flex flex-column gap-4",style:{cursor:"pointer"},onClick:this.onRuleAndCriteriaClick(t)},s.a.createElement("div",{className:"flex gap-2 items-center"},s.a.createElement("p",{className:"title"},e.title),s.a.createElement("button",{className:"delete-rule","aria-label":"delete "+e.title,onClick:this.onDeleteRule(e.id,e.ruleId)},s.a.createElement(Za.a,{htmlColor:"#0F172A",style:{height:18,width:18}}))),this.renderRuleCriteria(e))))))))),s.a.createElement(Fi,{onClick:this.handleAddRule},s.a.createElement(Ja.a,{style:{height:20,width:20},htmlColor:"#64748B"}),"Add rule"))),s.a.createElement(Qa,{onSaveClick:this.onSave,onClose:this.props.onDrawerClose,loading:this.props.loading})))}}const Ni=a(1352),Oi=a(1353),Li=a(1354);class Hi extends K{constructor(e){super(e),this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?Ni:Oi}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?Ni:Oi},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}}const _i=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}});const Vi={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},inputStyle:{borderBottom:"1px solid rgba(0, 0, 0, 0.6)",width:"100%",height:"100px",display:"flex",flexDirection:"column",justifyContent:"space-between"},buttonStyle:{width:"100%",height:"45px",marginTop:"40px",border:"none",backgroundColor:"rgb(98, 0, 238)"}},Ui=a(1355);class Wi extends K{constructor(e){super(e),this.getProductApiCallId=void 0,this.getToken=()=>{const e=new Q(q(Z.SessionRequestMessage));this.send(e)},this.getListRequest=e=>{const t={"Content-Type":Ui.productApiContentType,token:e},a=new Q(q(Z.RestAPIRequestMessage));this.getProductApiCallId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),Ui.productAPiEndPoint),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestMethodMessage),Ui.apiMethodTypeGet),z.sendMessage(a.id,a)},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.RestAPIResponceMessage),q(Z.SessionSaveMessage),q(Z.SessionResponseMessage)],this.state={arrayHolder:[],token:""},z.attachBuildingBlock(this,this.subScribedMessages)}async componentDidMount(){super.componentDidMount(),this.getToken(),!1===this.isPlatformWeb()&&this.props.navigation.addListener("willFocus",()=>{this.getToken()})}async receive(e,t){if(z.debugLog("Message Recived",t),q(Z.SessionResponseMessage)===t.id){let e=t.getData(q(Z.SessionResponseToken));this.setState({token:e}),this.getListRequest(e)}if(q(Z.RestAPIResponceMessage)===t.id&&null!=this.getProductApiCallId&&this.getProductApiCallId===t.getData(q(Z.RestAPIResponceDataMessage))){var a=t.getData(q(Z.RestAPIResponceSuccessMessage));if(a&&!a.errors&&a.data)this.setState({arrayHolder:a.data}),z.debugLog("arrayHolder",this.state.arrayHolder);else{var i=t.getData(q(Z.RestAPIResponceErrorMessage));this.parseApiCatchErrorResponse(i)}}}}const ji=Object(De.a)({palette:{primary:{main:"#0000ff",contrastText:"#fff"}}});const zi={productContainer:{display:"flex",flexDirection:"row",flexWrap:"wrap",width:"100%",backgroundColor:"white",marginTop:"20px"},productBox:{height:250,width:"49%",marginRight:"5px",flexDirection:"column"},ImgContainer:{height:150},productImg:{width:"100%",height:"100%"},detailContent:{display:"flex",flexDirection:"column"}};const Qi=a(1356);class Gi extends tt{constructor(e){super(e)}render(){const{loading:e}=this.state;return s.a.createElement(l.a,{style:qi.container},s.a.createElement($t,{loading:e}),s.a.createElement(_.a,{style:qi.labelTitle},Qi.signUpTitleText," "),s.a.createElement(_.a,{style:qi.titleWhySignUp},Qi.signUpBodyText," "),s.a.createElement(Ge,Object.assign({testID:"btnFacebookLogIn",appId:"170982444234877",loginFacebookButtonText:Qi.facebookButtonText},this.btnFacebookLogInProps)),s.a.createElement(Ye,Object.assign({testID:"btnGoogleLogIn",style:qi.googleStyle},this.btnGoogleLogInProps)),s.a.createElement(_.a,{style:qi.orTextStyle},Qi.orText," "),s.a.createElement(l.a,{style:qi.logInButtonContainer},s.a.createElement($.a,Object.assign({testID:"btnNavigate",style:qi.signUpButtonStyle},this.btnNavigateProps),s.a.createElement(_.a,{style:qi.signUpButtonTextStyle},Qi.signUpButtonText," "))))}}Gi.SocialMediaAccountRegistrationScreen=void 0;const qi=V.a.create({container:{flex:1,alignItems:"center",backgroundColor:"#F5FCFF"},logInButtonContainer:{overflow:"hidden",display:void 0,flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"flex-start",alignItems:"center",shadowColor:"black",shadowOpacity:.3,shadowRadius:8,height:40,width:205,marginTop:16,elevation:6,backgroundColor:"#ffffff"},facebookStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:0,backgroundColor:"#ffffff",padding:"11px"},facebookImageStyle:{marginRight:10,width:20,height:20},facebookTextStyle:{color:"#2553b4",fontFamily:"Helvetica-Bold, sans-serif",paddingLeft:7},googleStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:5,backgroundColor:"#ffffff",marginTop:32},googleButtonImageStyle:{marginRight:15,width:20,height:20},googleButtonTextStyle:{paddingLeft:6,paddingRight:3,fontSize:14,color:"#2553b4",fontFamily:"Helvetica-Bold, sans-serif",marginLeft:8},orTextStyle:{color:"#000000",fontWeight:"bold",alignSelf:"center",margin:20},signUpButtonStyle:{flexDirection:"row",alignItems:"center",justifyContent:"center",shadowColor:"black",shadowOpacity:.3,elevation:6,shadowRadius:8,borderWidth:0,borderRadius:0,backgroundColor:"#ffffff",padding:"11px",height:"100%",width:"100%"},signUpButtonTextStyle:{color:"#2553b4",fontSize:11,fontFamily:"Helvetica-Bold, sans-serif"},titleWhySignUp:{marginBottom:32,fontSize:16,textAlign:"left",marginVertical:8},labelTitle:{marginTop:24,marginBottom:32,fontSize:32,textAlign:"left",marginVertical:8,color:"#6200EE"}});var Zi=Gi,Ji=a(1747),Yi=a(1834),Ki=a(1755),Xi=a(1776),$i=a(1777),es=a(1841),ts=a(1666),as=a(1772),is=a(1734),ss=a(1764),os=a(1765),ns=a(1766),rs=a(1767),ls=a(1768),ds=a(1769),cs=a(1760),hs=a(1770),ps=a(1771),gs=a(18),us=a(45);const{MuiTypographyStyle:ms,MuiFormLabelRootStyle:Cs,MuiInputBaseRootStyle:bs,MuiOutlinedInputStyle:As,drawerCard:fs}=ka,xs=Object(Yt.a)({container:fs.container,drawerContent:fs.drawerContent,formControl:fs.formControl,formErrorOrInfo:{display:"flex",justifyContent:"space-between",gap:4,"&.error":{color:"#D97706"}},formTileGroup:{display:"flex",gap:32},formTileControl:{display:"flex",flexDirection:"column",gap:8},formTileLabel:{color:"#21272A",fontFamily:"Cairo",fontSize:14,lineHeight:"20px",margin:0},formTileButton:{width:76,height:50,boxSizing:"border-box",backgroundColor:"#FFFFFF",boxShadow:"0px 1.53px 6.1px 0px #00000014",display:"grid",placeItems:"center",border:0,borderRadius:8,cursor:"pointer","&:focus":{outline:"none"},'&[data-selected="true"]':{border:"1px solid #51ABB3"},'&[aria-disabled="true"]':{pointerEvents:"none"}}}),Es=Object(De.a)({typography:ms,overrides:{MuiFormLabel:{root:Cs},MuiOutlinedInput:As,MuiInputBase:bs}}),vs=gs.d().shape({cardName:gs.f().trim().required("Please add a name"),targetCard:gs.f().trim().required("Please choose a target card")});function ys(e){let{onClose:t,onSave:a,targetCardOptions:i,loading:o,title:n="",targetCard:r="",id:l,onDrawerClose:d,source:c}=e;const{handleSubmit:h,values:p,errors:g,getFieldProps:u,touched:m,setFieldValue:C}=Object(us.b)({initialValues:{cardName:n,targetCard:r,selectedCardType:"individual"},validationSchema:vs,onSubmit:e=>a({...e,id:l,source:c})}),b=xs(),A=e=>()=>{C("selectedCardType",e)},f="wire"===p.selectedCardType,x="individual"===p.selectedCardType,E=!!g.cardName&&!!m.cardName,v=!!g.targetCard&&!!m.targetCard;return s.a.createElement(Be.a,{theme:Es},s.a.createElement("div",{className:b.container},s.a.createElement(Va,{"data-testid":"cardHeader",id:l,onClose:t,title:"Go to tile"}),s.a.createElement("div",{className:b.drawerContent},s.a.createElement("div",{className:b.formControl},s.a.createElement(Pe.a,{htmlFor:"title"},"Name*"),s.a.createElement(Ba.a,{placeholder:"Go to tile card",fullWidth:!0,id:"cardName",name:"cardName",value:p.cardName,inputProps:{...u("cardName"),maxLength:50},error:E}),s.a.createElement("div",{className:b.formErrorOrInfo},E&&s.a.createElement(Ie.a,{"data-test-id":"nameError",className:"error",variant:"subtitle2"},g.cardName),s.a.createElement(Ie.a,{style:{marginLeft:"auto"},variant:"subtitle2"},p.cardName.trimStart().trimEnd().length,"/50"))),!l&&s.a.createElement("div",{className:b.formTileGroup},s.a.createElement("div",{className:b.formTileControl},s.a.createElement("label",{id:"individual",className:b.formTileLabel},"Individual card"),s.a.createElement("button",{"aria-labelledby":"individual","data-selected":x,onClick:A("individual"),className:b.formTileButton},s.a.createElement("svg",{width:"62",height:"14",viewBox:"0 0 62 14",fill:x?"#51ABB3":"#CBD5E1",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M19.0475 7.38086C19.0475 8.50447 19.9584 9.41534 21.082 9.41534C22.2056 9.41534 23.1165 8.50447 23.1165 7.38086C23.1165 6.25725 22.2056 5.34638 21.082 5.34638C19.9584 5.34638 19.0475 6.25725 19.0475 7.38086ZM38.8838 7.38086C38.8838 8.50447 39.7946 9.41534 40.9182 9.41534C42.0419 9.41534 42.9527 8.50447 42.9527 7.38086C42.9527 6.25725 42.0419 5.34638 40.9182 5.34638C39.7946 5.34638 38.8838 6.25725 38.8838 7.38086ZM21.082 7.76232H40.9182V6.99939H21.082V7.76232Z"}),s.a.createElement("mask",{id:"path-2-inside-1_14464_9317",fill:"white"},s.a.createElement("path",{d:"M0.48291 3.56641H21.082V11.9586C21.082 12.8014 20.3989 13.4845 19.5562 13.4845H2.00877C1.16606 13.4845 0.48291 12.8014 0.48291 11.9586V3.56641Z"})),s.a.createElement("path",{d:"M0.48291 3.56641H21.082V11.9586C21.082 12.8014 20.3989 13.4845 19.5562 13.4845H2.00877C1.16606 13.4845 0.48291 12.8014 0.48291 11.9586V3.56641Z",fill:"white"}),s.a.createElement("path",{d:"M0.48291 3.56641H21.082H0.48291ZM21.845 11.9586C21.845 13.2227 20.8203 14.2474 19.5562 14.2474H2.00877C0.744707 14.2474 -0.280021 13.2227 -0.280021 11.9586H1.24584C1.24584 12.38 1.58742 12.7216 2.00877 12.7216H19.5562C19.9775 12.7216 20.3191 12.38 20.3191 11.9586H21.845ZM2.00877 14.2474C0.744707 14.2474 -0.280021 13.2227 -0.280021 11.9586V3.56641H1.24584V11.9586C1.24584 12.38 1.58742 12.7216 2.00877 12.7216L2.00877 14.2474ZM21.845 3.56641V11.9586C21.845 13.2227 20.8203 14.2474 19.5562 14.2474V12.7216C19.9775 12.7216 20.3191 12.38 20.3191 11.9586V3.56641H21.845Z",fill:"#CBD5E1",mask:"url(#path-2-inside-1_14464_9317)"}),s.a.createElement("path",{d:"M0.48291 2.04051C0.48291 1.1978 1.16606 0.514648 2.00877 0.514648H19.5562C20.3989 0.514648 21.082 1.1978 21.082 2.04051V3.56637H0.48291V2.04051Z"}),s.a.createElement("mask",{id:"path-5-inside-2_14464_9317",fill:"white"},s.a.createElement("path",{d:"M40.918 3.56641H61.5171V11.9586C61.5171 12.8014 60.834 13.4845 59.9912 13.4845H42.4438C41.6011 13.4845 40.918 12.8014 40.918 11.9586V3.56641Z"})),s.a.createElement("path",{d:"M40.918 3.56641H61.5171V11.9586C61.5171 12.8014 60.834 13.4845 59.9912 13.4845H42.4438C41.6011 13.4845 40.918 12.8014 40.918 11.9586V3.56641Z",fill:"white"}),s.a.createElement("path",{d:"M40.918 3.56641H61.5171H40.918ZM62.28 11.9586C62.28 13.2227 61.2553 14.2474 59.9912 14.2474H42.4438C41.1798 14.2474 40.155 13.2227 40.155 11.9586H41.6809C41.6809 12.38 42.0225 12.7216 42.4438 12.7216H59.9912C60.4126 12.7216 60.7542 12.38 60.7542 11.9586H62.28ZM42.4438 14.2474C41.1798 14.2474 40.155 13.2227 40.155 11.9586V3.56641H41.6809V11.9586C41.6809 12.38 42.0225 12.7216 42.4438 12.7216L42.4438 14.2474ZM62.28 3.56641V11.9586C62.28 13.2227 61.2553 14.2474 59.9912 14.2474V12.7216C60.4126 12.7216 60.7542 12.38 60.7542 11.9586V3.56641H62.28Z",fill:"#CBD5E1",mask:"url(#path-5-inside-2_14464_9317)"}),s.a.createElement("path",{d:"M40.918 2.04051C40.918 1.1978 41.6011 0.514648 42.4438 0.514648H59.9912C60.834 0.514648 61.5171 1.1978 61.5171 2.04051V3.56637H40.918V2.04051Z"})))),s.a.createElement("div",{className:b.formTileControl},s.a.createElement("label",{id:"wire",className:b.formTileLabel},"Wire connection"),s.a.createElement("button",{"aria-labelledby":"wire","data-selected":f,onClick:A("wire"),className:b.formTileButton},s.a.createElement("svg",{width:"44",height:"14",viewBox:"0 0 44 14",fill:f?"#51ABB3":"#CBD5E1",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M0.747744 7.38086C0.747744 8.50447 1.65861 9.41534 2.78223 9.41534C3.90584 9.41534 4.81671 8.50447 4.81671 7.38086C4.81671 6.25725 3.90584 5.34638 2.78223 5.34638C1.65861 5.34638 0.747744 6.25725 0.747744 7.38086ZM20.584 7.38086C20.584 8.50447 21.4948 9.41534 22.6184 9.41534C23.742 9.41534 24.6529 8.50447 24.6529 7.38086C24.6529 6.25725 23.742 5.34638 22.6184 5.34638C21.4948 5.34638 20.584 6.25725 20.584 7.38086ZM2.78223 7.76232H22.6184V6.99939H2.78223V7.76232Z"}),s.a.createElement("mask",{id:"path-2-inside-1_14464_9328",fill:"white"},s.a.createElement("path",{d:"M22.6187 3.56641H43.2178V11.9586C43.2178 12.8014 42.5346 13.4845 41.6919 13.4845H24.1445C23.3018 13.4845 22.6187 12.8014 22.6187 11.9586V3.56641Z"})),s.a.createElement("path",{d:"M22.6187 3.56641H43.2178V11.9586C43.2178 12.8014 42.5346 13.4845 41.6919 13.4845H24.1445C23.3018 13.4845 22.6187 12.8014 22.6187 11.9586V3.56641Z",fill:"white"}),s.a.createElement("path",{d:"M22.6187 3.56641H43.2178H22.6187ZM43.9807 11.9586C43.9807 13.2227 42.956 14.2474 41.6919 14.2474H24.1445C22.8804 14.2474 21.8557 13.2227 21.8557 11.9586H23.3816C23.3816 12.38 23.7232 12.7216 24.1445 12.7216H41.6919C42.1133 12.7216 42.4549 12.38 42.4549 11.9586H43.9807ZM24.1445 14.2474C22.8804 14.2474 21.8557 13.2227 21.8557 11.9586V3.56641H23.3816V11.9586C23.3816 12.38 23.7232 12.7216 24.1445 12.7216L24.1445 14.2474ZM43.9807 3.56641V11.9586C43.9807 13.2227 42.956 14.2474 41.6919 14.2474V12.7216C42.1133 12.7216 42.4549 12.38 42.4549 11.9586V3.56641H43.9807Z",mask:"url(#path-2-inside-1_14464_9328)"}),s.a.createElement("path",{d:"M22.6187 2.04051C22.6187 1.1978 23.3018 0.514648 24.1445 0.514648H41.6919C42.5346 0.514648 43.2178 1.1978 43.2178 2.04051V3.56637H22.6187V2.04051Z"}))))),s.a.createElement("div",{className:b.formControl},s.a.createElement(Pe.a,{id:"targetCard"},"Choose target card*"),s.a.createElement(ti,{labelId:"targetCard",id:"targetcard-select",placeholder:"Select card",value:p.targetCard,onChange:e=>{C("targetCard",e)},options:i,selectBoxWidth:344,disabled:0===i.length,error:v}),v&&s.a.createElement(Ie.a,{"data-test-id":"nameError",className:"error",variant:"subtitle2"},g.targetCard))),s.a.createElement(Qa,{onClose:d,loading:o,onSaveClick:()=>h()})))}var ws=a(1832);var Is=()=>s.a.createElement("svg",{"data-test-id":"uncheckedIcon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"#51ABB3",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"},s.a.createElement("rect",{width:"20",height:"20",rx:"6"}));var Ps=()=>s.a.createElement("svg",{"data-test-id":"checkedIcon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("rect",{width:"20",height:"20",rx:"6",fill:"#51ABB3"}),s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.061 5.42238C15.5182 5.73229 15.6375 6.35411 15.3276 6.81124L10.243 14.3112C10.077 14.5562 9.81098 14.715 9.51659 14.745C9.2222 14.7749 8.92965 14.673 8.71765 14.4665L4.80221 10.6536C4.40654 10.2683 4.39814 9.6352 4.78345 9.23953C5.16876 8.84386 5.80187 8.83546 6.19754 9.22077L9.25759 12.2007L13.6722 5.68895C13.9821 5.23182 14.6039 5.11247 15.061 5.42238Z",fill:"white"})),Ss=a(1660);const{drawerCard:Ms}=ka,Fs=Object(Yt.a)({formControl:Ms.formControl,relative:{position:"relative"},textArea:Ms.textArea,formErrorOrInfo:Ms.formErrorOrInfo,description:{margin:0,fontWeight:400,fontSize:12,lineHeight:"18px",color:"#94A3B8",fontFamily:"Cairo",'&[data-error="true"]':{color:"#D97706"}},label:{fontFamily:"Cairo",lineHeight:"22px",fontSize:14,color:"#475569",fontWeight:700},botContextListContainer:{display:"flex",flexDirection:"column",listStyle:"none",margin:0,padding:0,maxHeight:270,overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"#FFFFFF #1E293B",zIndex:1992},botContextListItem:{margin:0,padding:"12px 16px",boxSizing:"border-box",fontFamily:"Cairo",fontSize:14,lineHeight:"16px",color:"#FFFFFF",cursor:"pointer","&:first-child":{borderRadius:"8px 8px 0 0"},"&:last-child":{borderRadius:"0 0 8px 8px"}},botContextPopover:{position:"absolute",top:-15,left:"25%",overflow:"hidden",maxHeight:"none",backgroundColor:"#1E293B",boxShadow:"0px 2px 4px 0px #00000026",boxSizing:"border-box",borderRadius:8,width:180,zIndex:2e3},botContextBackdrop:{position:"fixed",inset:0,width:"100vw",height:"100vh",background:"transparent",zIndex:1800}});function Rs(e){let{getFieldProps:t,messageErrorText:a,hasMessageError:o,value:n,placeholder:r="Type your message here",botContext:l,setFieldValue:d,description:c}=e;const h=Fs(),p=Object(i.useRef)(null),[g,u]=Object(i.useState)(!1),m=Object(i.useRef)(!1),C=Object(i.useRef)(!1),b=e=>{m.current=!0,d("message",`${n}${e}%`),u(!1),p.current&&p.current.focus()};return s.a.createElement("div",{className:`${h.formControl} ${h.relative}`},s.a.createElement("label",{htmlFor:"message",className:h.label},"Message*"),c&&s.a.createElement("p",{"data-testid":"description",className:h.description},c),s.a.createElement(Ss.a,Object.assign({id:"message",placeholder:r,className:`${h.textArea} ${o?"error":""}`},t("message"),{maxLength:1e3,style:{minHeight:101},ref:p,onChange:e=>{const a=e.target.value;t("message").onChange(e),m.current=!1,C.current=!0,a.endsWith("%")&&l.length>0?u(!0):u(!1)},onFocus:e=>{const t=e.target.value;C.current&&t.endsWith("%")&&!m.current&&u(!0)}})),s.a.createElement("div",{className:h.formErrorOrInfo},s.a.createElement("p",{className:h.description,"data-error":o},o?a:"Type % for dynamic text suggestions"),s.a.createElement("p",{className:h.description},n.trimStart().trimEnd().length,"/1000")),g&&s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{"data-testid":"context-backdrop",className:h.botContextBackdrop,onClick:()=>u(!1)}),s.a.createElement("div",{"data-testid":"bot-context-popover",className:h.botContextPopover},s.a.createElement("ul",{className:h.botContextListContainer},l.map(e=>s.a.createElement("li",{key:e,onClick:()=>b(e),className:h.botContextListItem},e))))))}const Ds=e=>gs.d().shape({name:gs.f().trim().required("Please add a name"),message:gs.f().trim().required("Please add a message"),saveIntoBotContext:gs.b().notRequired(),fieldName:gs.f().when("saveIntoBotContext",{is:!0,then:t=>t.trim().required("Please enter a valid name").notOneOf(e,"Please enter a unique name"),otherwise:e=>e.notRequired()})}),Bs=e=>gs.d().shape({title:gs.f().trim().required("Please add a name"),message:gs.f().trim().required("Please add a message"),saveIntoBotContext:gs.b().notRequired(),fieldName:gs.f().when("saveIntoBotContext",{is:!0,then:t=>t.trim().required("Please enter a valid name").notOneOf(e,"Plese enter a unique name"),otherwise:e=>e.notRequired()}),options:gs.f().required("Please add options")}),Ts=e=>gs.d().shape({title:gs.f().trim().required("Please add a name"),message:gs.f().trim().required("Please add a message"),saveIntoBotContext:gs.b().notRequired(),fieldName:gs.f().when("saveIntoBotContext",{is:!0,then:t=>t.trim().required("Please enter a valid name").notOneOf(e,"Please enter a unique name"),otherwise:e=>e.notRequired()}),minValue:gs.f().required("Please enter a valid range").test("should be minimum of 0","Please enter a valid range",(function(e){return+e>=0&&+e<=100})),maxValue:gs.f().required("Please enter a valid range").min(0,"Please enter a valid range").test("is-valid-range","Please enter a valid range",(function(e){const{minValue:t}=this.parent;return+e<=100&&+t<+e}))}),{MuiFormLabelRootStyle:ks,MuiTypographyStyle:Ns,MuiOutlinedInputRootStyle:Os,MuiInputBaseRootStyle:Ls,drawerCard:Hs}=ka,_s=Object(Yt.a)({container:Hs.container,drawerContent:Hs.drawerContent}),Vs=Object(De.a)({typography:{...Ns},overrides:{MuiFormLabel:{root:{...ks,"&.Mui-bot":{fontWeight:400,fontSize:16,lineHeight:"24px",color:"#0F172A"}}},MuiOutlinedInput:{root:{...Os},notchedOutline:{borderWidth:1,borderColor:"#CBD5E1"},input:{padding:0}},MuiInputBase:{...Ls}}}),Us=(e,t)=>!!e&&!!t;function Ws(e){let{onClose:t,onSubmit:a,loading:i,title:o="",message:n="",fieldName:r="",minValue:l="1",maxValue:d="10",id:c,onDrawerClose:h,botContext:p}=e;const g=_s();return s.a.createElement(Be.a,{theme:Vs},s.a.createElement(we.a,{className:g.container},s.a.createElement(Va,{id:c,onClose:t,title:"Slider scale"}),s.a.createElement(us.a,{initialValues:{title:o,message:n,saveIntoBotContext:!!r,fieldName:r,minValue:l,maxValue:d},onSubmit:e=>a({id:c,...e}),validationSchema:Ts(p.filter(e=>e!==r)),"data-test-id":"formik"},e=>{let{values:t,getFieldProps:a,handleChange:o,handleSubmit:n,errors:r,touched:l,setFieldValue:d}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement(we.a,{className:g.drawerContent},s.a.createElement(we.a,{style:js.formControlStyle},s.a.createElement(Pe.a,{htmlFor:"title"},"Name*"),s.a.createElement(Ba.a,{placeholder:"Slider scale field card",fullWidth:!0,id:"title",name:"title",inputProps:{...a("title"),maxLength:50},error:Us(r.title,l.title),"data-test-id":"txtTitle"}),s.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",gap:4}},Us(r.title,l.title)&&s.a.createElement(Ie.a,{"data-test-id":"titleError",className:"error",variant:"subtitle2"},r.title),s.a.createElement(Ie.a,{variant:"subtitle2",style:{marginLeft:"auto"}},t.title.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{getFieldProps:a,botContext:p,hasMessageError:Us(r.message,l.message),messageErrorText:r.message,value:t.message,setFieldValue:d}),s.a.createElement(we.a,{style:js.botContainer},s.a.createElement(we.a,{style:{display:"flex",gap:8,alignItems:"center"}},s.a.createElement(ws.a,{style:{padding:0},icon:s.a.createElement(Is,null),checkedIcon:s.a.createElement(Ps,null),id:"saveIntoBotContext",name:"saveIntoBotContext",checked:t.saveIntoBotContext,onChange:e=>{o(e),e.target.checked||d("fieldName","")},"data-test-id":"saveIntoBotCheckbox",disableRipple:!0}),s.a.createElement(Pe.a,{htmlFor:"saveIntoBotContext",className:"Mui-bot"},"Save in bot context")),t.saveIntoBotContext&&s.a.createElement(we.a,{style:js.formControlStyle},s.a.createElement(Pe.a,{htmlFor:"fieldName"},"Field name*"),s.a.createElement(Ba.a,{placeholder:"Type here",fullWidth:!0,id:"fieldName",name:"fieldName",className:"secondary",inputProps:{...a("fieldName"),maxLength:50},error:Us(r.fieldName,l.fieldName),"data-test-id":"txtFieldName"}),s.a.createElement("div",{style:{display:"flex",justifyContent:Us(r.fieldName,l.fieldName)?"space-between":"flex-end",gap:4}},Us(r.fieldName,l.fieldName)&&s.a.createElement(Ie.a,{"data-test-id":"fieldNameError",className:"error",variant:"subtitle2"},r.fieldName),s.a.createElement(Ie.a,{variant:"subtitle2"},t.fieldName.trimStart().trimEnd().length,"/50")))),s.a.createElement(we.a,{style:{display:"flex",gap:16}},s.a.createElement(we.a,{style:js.formControlStyle},s.a.createElement(Pe.a,{htmlFor:"minValue"},"Minimum Selection*"),s.a.createElement(Ba.a,{type:"number",fullWidth:!0,id:"minValue",name:"minValue",inputProps:{...a("minValue"),min:"1",max:"100"},error:!!r.minValue,"data-test-id":"txtMinValue"}),r.minValue&&s.a.createElement(Ie.a,{"data-test-id":"minValueError",className:"error",variant:"subtitle2"},r.minValue)),s.a.createElement(we.a,{style:js.formControlStyle},s.a.createElement(Pe.a,{htmlFor:"maxValue"},"Maximum Selection*"),s.a.createElement(Ba.a,{type:"number",fullWidth:!0,id:"maxValue",name:"maxValue",inputProps:{...a("maxValue"),min:"1",max:"100"},error:!!r.maxValue,"data-test-id":"txtMaxValue"}),r.maxValue&&s.a.createElement(Ie.a,{"data-test-id":"maxValueError",className:"error",variant:"subtitle2"},r.maxValue)))),s.a.createElement(Qa,{loading:i,onClose:h,onSaveClick:()=>n()}))})))}const js={formControlStyle:{display:"flex",flexDirection:"column",gap:4},textArea:{minHeight:101},errorTextArea:{border:"1px solid #F59E0B"},botContainer:{padding:"16px 8px 16px 16px",display:"flex",flexDirection:"column",gap:12,borderRadius:8,backgroundColor:"#F6F7FF"}};var zs=a(1746);const{MuiTypographyStyle:Qs,MuiFormLabelRootStyle:Gs,MuiInputBaseRootStyle:qs,MuiOutlinedInputStyle:Zs,drawerCard:Js}=ka,Ys=Object(Yt.a)({sendMessageContainer:Js.container,drawerContent:Js.drawerContent,formControl:Js.formControl,formErrorOrInfo:{display:"flex",justifyContent:"flex-end",gap:4,"&.spaceBetween":{justifyContent:"space-between"},"&.error":{color:"#D97706"}},switchContainer:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",marginBottom:8}}),Ks=Object(De.a)({typography:{...Qs},overrides:{MuiFormLabel:{root:{...Gs}},MuiOutlinedInput:Zs,MuiInputBase:qs,MuiSwitch:{root:{padding:0,width:48,height:28,borderRadius:40},input:{left:0,width:48,height:28},switchBase:{padding:0,top:2,left:2,"&.Mui-checked":{"& input":{left:"-24px"}}},thumb:{width:24,height:24,backgroundColor:"#FFFFFF",boxShadow:"0px 2px 8px 0px #00000014"},track:{backgroundColor:"#E2E8F0",opacity:1},colorSecondary:{"&.Mui-checked + $track":{backgroundColor:"#51ABB3",opacity:1}}},MuiIconButton:{root:{padding:12}}}}),Xs=gs.d().shape({name:gs.f().trim().required("Please add a name"),message:gs.f().trim().required("Please add a message")}),$s=[{label:"5 seconds",value:"5"},{label:"6 seconds",value:"6"},{label:"7 seconds",value:"7"},{label:"8 seconds",value:"8"},{label:"9 seconds",value:"9"},{label:"10 seconds",value:"10"}];function eo(e){let{onClose:t,onSubmit:a,loading:i,title:o="",message:n="",waitTime:r=5,id:l,onDrawerClose:d,botContext:c}=e;const h=Ys();return s.a.createElement(Be.a,{theme:Ks},s.a.createElement("div",{className:h.sendMessageContainer},s.a.createElement(Va,{id:l,onClose:t,"data-testid":"cardHeader",title:"Send message"}),s.a.createElement(us.a,{initialValues:{name:o,message:n,waitTime:r||5,cardWaitTimeChecked:!1},validationSchema:Xs,onSubmit:e=>a({id:l,type:"send_message",...e}),"data-test-id":"formik"},e=>{let{handleSubmit:t,values:a,errors:o,getFieldProps:n,setFieldValue:r,touched:l}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:h.drawerContent},s.a.createElement("div",{className:h.formControl},s.a.createElement(Pe.a,{htmlFor:"title"},"Name*"),s.a.createElement(Ba.a,{placeholder:"Send message card",fullWidth:!0,id:"name",name:"name",inputProps:{...n("name"),maxLength:50},error:!!o.name&&l.name,"data-test-id":"name"}),s.a.createElement("div",{className:`${h.formErrorOrInfo} ${o.name&&l.name?"spaceBetween":""}`},o.name&&l.name&&s.a.createElement(Ie.a,{"data-test-id":"nameError",className:"error",variant:"subtitle2"},o.name),s.a.createElement(Ie.a,{variant:"subtitle2"},a.name.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{getFieldProps:n,hasMessageError:!!o.message&&!!l.message,messageErrorText:o.message,value:a.message,placeholder:"Type your message here %OCtool%",botContext:c,setFieldValue:r}),s.a.createElement("div",{className:h.formControl,style:{gap:0}},s.a.createElement(Pe.a,{id:"waitTime",htmlFor:"title"},"Card wait time"),s.a.createElement("div",{className:h.switchContainer},s.a.createElement(Ie.a,{variant:"subtitle2"},"The card will be executed after the specified wait time"),s.a.createElement(zs.a,{disableRipple:!0,checked:a.cardWaitTimeChecked,inputProps:{...n("cardWaitTimeChecked")},id:"cardWaitTimeChecked"})),s.a.createElement(ti,{labelId:"waitTime",id:"waitTime-select",placeholder:"Wait Time",value:""+a.waitTime,onChange:e=>r("waitTime",+e),options:$s,selectBoxWidth:344,disabled:!a.cardWaitTimeChecked}))),s.a.createElement(Qa,{onClose:d,onSaveClick:()=>t(),loading:i}))})))}var to=a(1833),ao=a(1750),io=a(1752),so=a(1733),oo=a(1659),no=a(1753),ro=a(1754),lo=a(1831),co=a(1751),ho=a(1840),po=a(1749),go=a(1748),uo=a(739);const mo=Object(De.a)({typography:{h3:{fontFamily:"Cairo",fontWeight:700,fontSize:24,lineHeight:"32px",color:"#0F172A"},h4:{fontFamily:"Cairo",fontWeight:400,fontSize:16,lineHeight:"32px",color:"#0F172A"},subtitle1:{fontFamily:"Roboto",fontSize:14,fontWeight:400,lineHeight:"24px",color:"#94A3B8"}},overrides:{MuiFormLabel:{root:{fontSize:14,"&.zoom":{fontWeight:500,lineHeight:"24px",fontFamily:"Roboto",color:"#51ABB3"}}},MuiButton:{root:{textTransform:"none",borderRadius:8,padding:"16px",width:105,flex:1,"&.dialogFooterBtn":{flex:"0 0 105px",padding:16},"&:hover":{backgroundColor:"transparent",boxShadow:"none"},"&.Mui-secondary":{backgroundColor:"#E5F6FF",color:"#51ABB3"},"&.Mui-primary":{color:"#FFFFFF",backgroundColor:"#51ABB3"},"&.Mui-secondary:hover":{backgroundColor:"#E5F6FF",boxShadow:"none"},"&.Mui-primary:hover":{backgroundColor:"#51ABB3"}},label:{fontFamily:"Cairo",fontSize:"16px",fontWeight:700,lineHeight:"24px"}},MuiBackdrop:{root:{backgroundColor:"rgba(15, 23, 42, 0.4)"}},MuiPaper:{root:{backgroundCoor:"#FFFFFF",width:568,scrollbarWidth:"none","&::-webkit-scrollbar":{width:0}},elevation24:{boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008, 0px 25px 50px 0px #00000017"},rounded:{borderRadius:24}},MuiDialogActions:{root:{padding:"24px 40px",gap:10,borderTop:"1px solid #CBD5E1",position:"sticky",zIndex:2,bottom:0,backgroundColor:"#FFFFFF"},spacing:{"& > :not(:first-child)":{marginLeft:0}}},MuiSlider:{root:{color:"#51ABB3",padding:0},rail:{backgroundColor:"#94A3B8",height:4,borderRadius:100},track:{height:4,backgroundColor:"#51ABB3",borderRadius:100},thumb:{boxShadow:"none","&:hover":{boxShadow:"none"},"&.Mui-focusVisible":{boxShadow:"none"}},active:{boxShadow:"none"}},MuiAvatar:{root:{width:"100%",height:"100%"}}}}),Co=Object(Yt.a)({dialogHeader:{padding:"24px 40px",borderBottom:"1px solid #CBD5E1",display:"flex",justifyContent:"space-between",position:"sticky",top:0,zIndex:2,backgroundColor:"#FFFFFF"},dialogContent:{padding:"0 38.6px 23.21px",display:"flex",flexDirection:"column"},zoomFormControl:{display:"flex",flexDirection:"column",gap:4},zoomLabel:{display:"flex",justifyContent:"space-between"},imageOuterContainer:{height:333,position:"relative","& .reactEasyCrop_CropArea":{border:"4px solid #51ABB3",color:"#B0B9C6"}},profileImage:{width:"100%",height:"100%"}});async function bo(e,t){const a=await(i=e,new Promise((e,t)=>{const a=new Image;a.addEventListener("load",()=>e(a)),a.addEventListener("error",e=>t(e)),a.setAttribute("crossOrigin","anonymous"),a.src=i}));var i;const s=document.createElement("canvas"),o=s.getContext("2d");if(!o)return null;const{width:n,height:r}=a;s.width=n,s.height=r,o.drawImage(a,0,0);const l=document.createElement("canvas"),d=l.getContext("2d");return d?(l.width=t.width,l.height=t.height,d.drawImage(s,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise((e,t)=>{l.toBlob(a=>{if(!a)return t(null);const i=new File([a],"test.jpg",{type:"image/*"});e({url:URL.createObjectURL(a),file:i})},"image/png")})):null}function Ao(e){let{open:t,handleClose:a,selectedImage:o,onApply:n,profileUpdateLoading:r=!1}=e;const[l,d]=Object(i.useState)(1),[c,h]=Object(i.useState)({x:0,y:0}),[p,g]=Object(i.useState)(null),u=Co();return s.a.createElement(Be.a,{theme:mo},s.a.createElement(Ji.a,{"aria-labelledby":"adjustPhoto",open:t,onClose:a,PaperProps:{className:"confirmDialog"},BackdropProps:{style:{opacity:"0.4"}}},s.a.createElement("div",{className:u.dialogHeader},s.a.createElement(Ie.a,{id:"adjustPhoto",variant:"h3"},"Ajust position of photo"),s.a.createElement("button",{"aria-label":"close image crop dialog",onClick:a,style:{all:"unset",cursor:"pointer"}},s.a.createElement(go.a,{htmlColor:"#334155"}))),s.a.createElement("div",{className:u.dialogContent},s.a.createElement("div",{className:u.imageOuterContainer},s.a.createElement(uo.a,{image:o,cropShape:"round",aspect:1,zoom:l,onZoomChange:e=>{d(+e.toFixed(1))},minZoom:1,maxZoom:3,showGrid:!1,zoomSpeed:.1,crop:c,onCropChange:h,onCropComplete:(e,t)=>{g(t)},style:{mediaStyle:{width:288,height:288}}})),s.a.createElement(Ie.a,{variant:"h4",style:{textAlign:"center"}},"Drag to reposition photo"),s.a.createElement("div",{className:u.zoomFormControl},s.a.createElement("div",{className:u.zoomLabel},s.a.createElement(Pe.a,{className:"zoom"},"Zoom"),s.a.createElement(Ie.a,{variant:"subtitle1"},l)),s.a.createElement(ho.a,{value:l,onChange:(e,t)=>d(t),min:1,max:3,step:.1,name:"zoom",id:"zoom"}))),s.a.createElement(po.a,{"data-testid":"dialog-action"},s.a.createElement(Re.a,{onClick:a,"data-test-id":"cancel-edit-profile",type:"button",className:"Mui-secondary dialogFooterBtn"},"Cancel"),s.a.createElement(Re.a,{"data-test-id":"apply-edit-profile",onClick:()=>(async()=>{if(!p)return;const e=await bo(o,p);e&&n(e)})(),type:"button",className:"Mui-primary dialogFooterBtn",disabled:r},r?s.a.createElement(Kt.a,{style:{height:24,width:24,color:"#FFFFFF"}}):"Apply"))))}var fo=Object(i.forwardRef)((e,t)=>{let{onImageLoad:a,name:i}=e;return s.a.createElement("input",{ref:t,type:"file",hidden:!0,accept:"image/png,image/jpeg",name:i,onChange:e=>{var t;const s=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!s)return;const o=new FileReader;o.onload=e=>{var t;(null===(t=e.target)||void 0===t?void 0:t.result)&&"string"===typeof e.target.result&&a(i,e.target.result,s)},o.readAsDataURL(s)},"data-testid":"file-input"})});const xo={checkLinkNameAndURLError:e=>e.some(e=>{let t=!1;t="regular"===e.linkType?!Po.test(e.url):"mailTo"===e.linkType?!Do.email.test(e.email):!Do.phone.test(e.phone);return 0===e.name.trim().length||t}),addOrEditActions:(e,t)=>{let a=new Set;"openai"===t.type&&t.followUpActions.forEach(e=>{e.redirectCardId&&a.add(e.redirectCardId)});const i=e.map(e=>{if(a.has(""+e.id)){const a={...e};return a.source.push(""+t.id),a.status="connected",a}const i=[...e.source];return{...e,source:i}}),s=i.findIndex(e=>e.id===t.id);return-1===s?i.push(t):i[s]={...i[s],...t},i},getNodeDataFromConnectorCardAttributes:e=>{var t,a,i,s,o,n,r;const{attributes:l}=e;var d,c;return{id:l.id,title:l.name,message:null!==(t=l.message)&&void 0!==t?t:"",type:l.card_type,status:null!==(a=l.status)&&void 0!==a?a:"disconnected",source:[...new Set(l.source)],fieldName:null!==(i=l.field_name)&&void 0!==i?i:void 0,minValue:l.minimum_selection?""+l.minimum_selection:void 0,maxValue:l.maximum_selection?""+l.maximum_selection:void 0,videoURL:null!==(s=l.video_link)&&void 0!==s?s:void 0,waitTime:null!==(o=l.card_wait_time)&&void 0!==o?o:void 0,targetCard:null!==(n=l.target_card)&&void 0!==n?n:void 0,cardType:null!==(r=l.connection_type)&&void 0!==r?r:void 0,userGuides:l.user_guides,embedForms:l.embeded_forms,options:l.option,connectorCardType:l.connector_card_type,links:l.connector_card_links.map(e=>{var t,a;return{id:e.id,name:e.link_name,linkType:e.link_type,openLink:e.open_link,icon:e.connector_icon_image_link,url:null!==(t=e.link_url)&&void 0!==t?t:void 0,destination:null!==(a=e.destination)&&void 0!==a?a:void 0}}),criteriaRoutings:(c=l.criteria_routings,c.map(e=>({title:e.criteria_routing_title,criteria_routing_id:e.criteria_routing_id,nextCardId:e.next_card_id?""+e.next_card_id:null,rules:e.rules.map(e=>{var t;return{rule_id:e.rule_id,field_name:e.field_name,comparator:e.comparator,values:e.values,operator_with_previous_index:e.operator_with_previous_index,sub_field:null!==(t=e.sub_field)&&void 0!==t?t:void 0}})}))),followUpActions:(d=l.follow_ups,d.map(e=>({id:e.follow_up_id,buttonText:e.button_text,redirectCardId:e.redirect_user})))}},getFilteredNodeData:(e,t)=>t.filter(t=>t.id!==e).map(t=>{var a,i;const s=t.source.includes(""+e),o=t.source.filter(t=>t!==""+e),n=o.length>0?"connected":"disconnected",r=(null!==(a=t.criteriaRoutings)&&void 0!==a?a:[]).map(t=>{const a={...t};return a.nextCardId===""+e&&(a.nextCardId=null),a}),l=(null!==(i=t.followUpActions)&&void 0!==i?i:[]).map(t=>{const a={...t};return a.redirectCardId===""+e&&(a.redirectCardId=null),a});return{...t,source:o,status:s?n:t.status,criteriaRoutings:r,followUpActions:l}}),getTargetCardOptionsForGoToTileCard:(e,t)=>e.filter(e=>e.id!==t).map(e=>({label:e.title,value:""+e.id})),getTransformedLinks:(e,t)=>{if(!t)return[{linkId:"link1",title:"Link 1",name:"Link 1",linkType:"regular",openLink:"_blank",url:"https://",isExpanded:!0,email:"",phone:""}];return t.map((t,a)=>{var i;return{id:t.id,linkId:"link"+(a+1),title:"Link "+(a+1),name:t.name,linkType:t.linkType,openLink:t.openLink,icon:t.icon,url:null!==(i=t.url)&&void 0!==i?i:"",email:"mailTo"===t.linkType?t.destination:"",phone:"phone"===t.linkType?t.destination:"",isExpanded:!!e.get(t.name)}})},getContextVariableFromNodes:e=>{const t=[],a={};return e.forEach(e=>{if(e.fieldName){t.push(e.fieldName);let i=[];if("slider_scale"===e.type){const t=+e.minValue,s=+e.maxValue;for(let e=t;e<=s;e++)i.push(""+e);a[e.fieldName]=i}else"rating"===e.type?i=["1","2","3","4","5"]:"single_choice"!==e.type&&"multi_choice"!==e.type&&"dropdown"!==e.type||(i=e.options);a[e.fieldName]=i}}),{subFields:t,subFieldValue:a}},getAllActionCards:e=>e.map(e=>({label:e.title,value:""+e.id})),detectOS:()=>{const e=window.navigator.userAgent;return/android/i.test(e)?"android":/blackberry|bb10|rim/i.test(e)?"blackberry":/iPhone|iPod/i.test(e)?"iOS":/mac os/i.test(e)?"macOS":/iPad|Macintosh/i.test(e)?"iPadOS":/linux/i.test(e)&&!/android/i.test(e)?"linux":/windows/i.test(e)?"windows":/nokia/i.test(e)?"nokia":"unknown"},detectBrowser:()=>{const e=window.navigator.userAgent;return e.includes("Edg")?"Microsoft Edge":e.includes("MSIE")||e.includes("Trident")?"Internet Explorer":e.includes("Firefox")?"Mozilla Firefox":e.includes("OPR")||e.includes("Opera")?"Opera":e.includes("Safari")&&e.includes("Macintosh")?"Safari":"Google Chrome"}},{MuiTypographyStyle:Eo,MuiFormLabelRootStyle:vo,MuiInputBaseRootStyle:yo,MuiOutlinedInputStyle:wo,drawerCard:Io}=ka,Po=/^https?:\/\/(?:[\w-]+\.)+[a-z]{2,}(?:\/[a-zA-Z0-9-_.~%]*)*(?:\?[a-zA-Z0-9-_.~%=&,]*)?(?:#[\w-]*)?$/,So=Object(Yt.a)({shareLinkContainer:Io.container,drawerContent:Io.drawerContent,formControl:{...Io.formControl,"& .relative":{position:"relative"},"&.flex-grow-1":{flexGrow:1}},formErrorOrInfo:{display:"flex",justifyContent:"space-between",gap:4,"&.error":{color:"#D97706"}},radioContainer:{display:"flex",gap:24},iconOrURLContainer:{display:"flex",gap:16},uploadFileBtn:{all:"unset",height:56,width:56,border:"1px dashed #CBD5E1",borderRadius:8,backgroundColor:"#FFFFFF",display:"grid",placeItems:"center",cursor:"pointer"},addLinkBtn:Io.addLinkOrOptionButton,removeLinkIcon:{all:"unset",cursor:"pointer",position:"absolute",top:-10,right:-10,zIndex:1,height:20,width:20,display:"grid",placeItems:"center",backgroundColor:"#51ABB3",borderRadius:60}}),Mo=Object(De.a)({typography:{...Eo,body1:{fontFamily:"Cairo",fontSize:16,lineHeight:"24px",fontWeight:400,color:"#0F172A"}},overrides:{MuiFormLabel:{root:{...vo}},MuiOutlinedInput:wo,MuiInputBase:yo,MuiIconButton:{root:{padding:0},edgeEnd:{marginRight:0}},MuiPaper:{elevation1:{boxShadow:"none"}},MuiAccordion:{root:{padding:0,backgroundColor:"#F6F7FF","&::before":{height:0},"&.Mui-expanded":{margin:0}},rounded:{borderRadius:8,"&:last-child":{borderBottomLeftRadius:8,borderBottomRightRadius:8}}},MuiAccordionSummary:{root:{padding:"16px 8px 16px 16px",minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},content:{margin:0,fontSize:16,fontWeight:400,lineHeight:"24px",fontFamily:"Cairo",color:"#000000","&.Mui-expanded":{margin:"0"}}},MuiAccordionDetails:{root:{padding:"8px 8px 16px 16px",flexDirection:"column",gap:24}},MuiFormGroup:{root:{gap:8,marginTop:8}},MuiFormControlLabel:{root:{marginLeft:0,marginRight:0,gap:8}},MuiRadio:{root:{padding:0}},MuiAvatar:{root:{height:56,width:56,borderRadius:8}}}}),Fo=gs.d().shape({name:gs.f().trim().required("Please add a name"),message:gs.f().trim().required("Please add a message")}),Ro=e=>"regular"===e.linkType?e.url:"phone"===e.linkType?e.phone:e.email,Do={url:Po,email:/^[\w-.]+@([a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}$/,phone:/^\d{1,15}$/};function Bo(e){let{onClose:t,onSave:a,loading:o,id:n,title:r="",message:l="",onDrawerClose:d,initialLinks:c,botContext:h}=e;const p=Object(i.useRef)(new Map),[g,u]=Object(i.useState)(()=>xo.getTransformedLinks(p.current,c)),[m,C]=Object(i.useState)(null),{handleSubmit:b,values:A,errors:f,getFieldProps:x,touched:E,setFieldValue:v}=Object(us.b)({initialValues:{name:r,message:l},validationSchema:Fo,onSubmit:e=>{if(xo.checkLinkNameAndURLError(g)){const e=g.map(e=>{const t=(e=>"regular"===e.linkType?!Do.url.test(e.url):"phone"===e.linkType?!Do.phone.test(e.phone):!Do.email.test(e.email))(e);return{...e,nameError:0===e.name.trim().length,linkTypeInputError:t,isExpanded:0===e.name.trim().length||t}});return void u(e)}const t=g.map(e=>{const t=(e=>{const t={name:e.name.trim(),linkType:e.linkType,openLink:e.openLink,iconFile:e.iconFile};var a;"regular"===e.linkType?t.url=null===(a=e.url)||void 0===a?void 0:a.trim():"phone"===e.linkType?t.destination=e.phone:"mailTo"===e.linkType&&(t.destination=e.email);return e.id&&(t.id=e.id),e.iconFile&&(t.iconFile=e.iconFile),e.icon&&!e.iconFile&&(t.icon=e.icon),t})(e);return p.current.set(e.name,e.isExpanded),t});a({...e,links:t,id:n})}}),y=So(),w=Object(i.useRef)([null]),I=Object(i.useRef)("");Object(i.useEffect)(()=>{u(xo.getTransformedLinks(p.current,c))},[c]);const P=e=>{const t=[...g],a=t.findIndex(t=>t.linkId===e.linkId);t[a]={...t[a],...e},u(t)},S=e=>{const{name:t,value:a}=e.target,i=t.split("-")[0];P({linkId:i,name:a,nameError:0===a.trim().length})},M=e=>t=>{const{name:a,value:i}=t.target,s=a.split("-")[0];P({linkId:s,[e]:i,linkTypeInputError:!Do[e].test(i)})},F=e=>{const{name:t,value:a}=e.target,i=t.split("-")[0];P({linkId:i,linkType:a})},R=e=>{const{name:t,value:a}=e.target,i=t.split("-")[0];P({linkId:i,openLink:a})},D=(e,t)=>{const a=e.split("-")[0];I.current=t,C(a)},B={regular:{placeholder:"https://example.com",label:"URL*",error:"Please add a valid URL",id:"url",onChange:M("url")},phone:{placeholder:"Tel: 000 000 00",label:"Destination*",error:"Please add a valid phone number",id:"phone",onChange:M("phone")},mailTo:{placeholder:"Mailto:",label:"Destination*",error:"Please add a valid email",id:"email",onChange:M("email")}};return s.a.createElement(Be.a,{theme:Mo},s.a.createElement(Ao,{"data-test-id":"image-crop-dialog",key:m?"image-crop-dialog":"dialog",open:!!m,handleClose:()=>C(null),selectedImage:I.current,onApply:e=>{m&&(P({linkId:m,icon:e.url,iconFile:e.file}),I.current="",C(null))}}),s.a.createElement("div",{className:y.shareLinkContainer},s.a.createElement(Va,{onClose:t,"data-testid":"cardHeader",id:n,title:"Share link(s)"}),s.a.createElement("div",{className:y.drawerContent},s.a.createElement("div",{className:y.formControl},s.a.createElement(Pe.a,{htmlFor:"title"},"Name*"),s.a.createElement(Ba.a,{placeholder:"Send link(s) card",fullWidth:!0,id:"name",name:"name",value:A.name,inputProps:{...x("name"),maxLength:50},error:!!f.name&&E.name,"data-test-id":"name"}),s.a.createElement("div",{className:y.formErrorOrInfo},f.name&&E.name&&s.a.createElement(Ie.a,{"data-test-id":"nameError",className:"error",variant:"subtitle2"},f.name),s.a.createElement(Ie.a,{style:{marginLeft:"auto"},variant:"subtitle2"},A.name.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{getFieldProps:x,hasMessageError:!!f.message&&!!E.message,messageErrorText:f.message,value:A.message,botContext:h,setFieldValue:v}),s.a.createElement("div",{className:y.formControl},s.a.createElement(Pe.a,{id:"link-property"},`Link property (${g.length})*`),g.map((e,t)=>{return s.a.createElement(to.a,{"data-testid":"link-accordian-"+(t+1),expanded:e.isExpanded,onChange:(i=t,(e,t)=>{const a=[...g];a[i]={...a[i],isExpanded:t},u(a)}),key:e.linkId},s.a.createElement(ao.a,{"data-testid":"link-accordian-header-"+(t+1),disableRipple:!0,expandIcon:s.a.createElement(co.a,{htmlColor:"#64748B"}),id:e.linkId+"-header"},e.name),s.a.createElement(io.a,{"data-testid":"link-accordian-details-"+(t+1)},s.a.createElement("div",{className:y.formControl},s.a.createElement(Pe.a,{htmlFor:e.linkId},"Name*"),s.a.createElement(Ba.a,{placeholder:"Link "+(t+1),fullWidth:!0,id:e.linkId+"-name",name:e.linkId+"-name",value:e.name,error:e.nameError,onChange:S}),e.nameError&&s.a.createElement(Ie.a,{variant:"subtitle2",className:"error"},"Please add a name")),s.a.createElement("div",{className:y.radioContainer},s.a.createElement(so.a,{component:"fieldset"},s.a.createElement(oo.a,{component:"legend"},"Link Type"),s.a.createElement(no.a,{"aria-label":"link type",name:e.linkId+"-linkType",value:e.linkType,onChange:F},s.a.createElement(ro.a,{value:"regular",control:s.a.createElement(lo.a,{"data-testid":`link-${t+1}-regular`,"aria-checked":"regular"===e.linkType,icon:s.a.createElement(To,null),checkedIcon:s.a.createElement(ko,null)}),label:"Regular"}),s.a.createElement(ro.a,{value:"phone",control:s.a.createElement(lo.a,{"data-testid":`link-${t+1}-phone`,"aria-checked":"phone"===e.linkType,icon:s.a.createElement(To,null),checkedIcon:s.a.createElement(ko,null)}),label:"Phone"}),s.a.createElement(ro.a,{value:"mailTo",control:s.a.createElement(lo.a,{"data-testid":`link-${t+1}-mailTo`,"aria-checked":"mailTo"===e.linkType,icon:s.a.createElement(To,null),checkedIcon:s.a.createElement(ko,null)}),label:"Mailto"}))),s.a.createElement(so.a,{component:"fieldset"},s.a.createElement(oo.a,{component:"legend"},"Open Links"),s.a.createElement(no.a,{"aria-label":"open links",name:e.linkId+"-openLink",value:e.openLink,onChange:R},s.a.createElement(ro.a,{value:"_blank",control:s.a.createElement(lo.a,{"data-testid":`link-${t+1}-blank`,"aria-checked":"_blank"===e.openLink,icon:s.a.createElement(To,null),checkedIcon:s.a.createElement(ko,null)}),label:"In new page"}),s.a.createElement(ro.a,{value:"_self",control:s.a.createElement(lo.a,{"data-testid":`link-${t+1}-self`,"aria-checked":"_self"===e.openLink,icon:s.a.createElement(To,null),checkedIcon:s.a.createElement(ko,null)}),label:"In the same page"})))),s.a.createElement("div",{className:y.iconOrURLContainer},s.a.createElement("div",{className:y.formControl},s.a.createElement(Pe.a,null,"Icon"),e.icon?s.a.createElement("div",{className:"relative"},s.a.createElement(wt.a,{"data-test-id":"icon-avatar",src:e.icon}),s.a.createElement("button",{"aria-label":`remove ${e.linkId} icon`,onClick:(a=e.linkId,e=>{P({linkId:a,icon:null,iconFile:null})}),className:y.removeLinkIcon},s.a.createElement(Ki.a,{htmlColor:"#FFFFFF",fontSize:"small",style:{height:14,width:14}}))):s.a.createElement(s.a.Fragment,null,s.a.createElement(fo,{"data-test-id":"image-file-input",ref:e=>w.current[t]=e,onImageLoad:D,name:e.linkId+"-file"}),s.a.createElement("button",{"aria-label":"open file browser",onClick:()=>(e=>{var t;null===(t=w.current[e])||void 0===t||t.click()})(t),className:y.uploadFileBtn},s.a.createElement("svg",{fill:"#64748B",width:"24px",height:"24px",viewBox:"-3.2 -3.2 38.40 38.40",version:"1.1",xmlns:"http://www.w3.org/2000/svg",stroke:"#334155",transform:"rotate(0)"},s.a.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),s.a.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#CCCCCC",strokeWidth:"0.8960000000000001"}),s.a.createElement("g",{id:"SVGRepo_iconCarrier"},s.a.createElement("path",{d:"M23.845 8.124c-1.395-3.701-4.392-6.045-8.921-6.045-5.762 0-9.793 4.279-10.14 9.86-2.778 0.889-4.784 3.723-4.784 6.933 0 3.93 3.089 7.249 6.744 7.249h2.889c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2.889c-2.572 0-4.776-2.404-4.776-5.249 0-2.514 1.763-4.783 3.974-5.163l0.907-0.156-0.080-0.916-0.008-0.011c0-4.871 3.205-8.545 8.161-8.545 3.972 0 6.204 1.957 7.236 5.295l0.214 0.688 0.721 0.015c3.715 0.078 6.972 3.092 6.972 6.837 0 3.408-2.259 7.206-5.678 7.206h-2.285c-0.552 0-1 0.448-1 1s0.448 1 1 1l2.277-0.003c5-0.132 7.605-4.908 7.605-9.203 0-4.616-3.617-8.305-8.14-8.791zM16.75 16.092c-0.006-0.006-0.008-0.011-0.011-0.016l-0.253-0.264c-0.139-0.146-0.323-0.219-0.508-0.218-0.184-0.002-0.368 0.072-0.509 0.218l-0.253 0.264c-0.005 0.005-0.006 0.011-0.011 0.016l-3.61 3.992c-0.28 0.292-0.28 0.764 0 1.058l0.252 0.171c0.28 0.292 0.732 0.197 1.011-0.095l2.128-2.373v10.076c0 0.552 0.448 1 1 1s1-0.448 1-1v-10.066l2.199 2.426c0.279 0.292 0.732 0.387 1.011 0.095l0.252-0.171c0.279-0.293 0.279-0.765 0-1.058z"})))))),s.a.createElement("div",{className:y.formControl+" flex-grow-1"},s.a.createElement(Pe.a,{htmlFor:`${e.linkId}-${B[e.linkType].id}`},B[e.linkType].label),s.a.createElement(Ba.a,{key:e.linkType,placeholder:B[e.linkType].placeholder,fullWidth:!0,id:`${e.linkId}-${B[e.linkType].id}`,name:`${e.linkId}-${B[e.linkType].id}`,value:Ro(e),onChange:B[e.linkType].onChange,error:e.linkTypeInputError}),e.linkTypeInputError&&s.a.createElement(Ie.a,{variant:"subtitle2",className:"error"},B[e.linkType].error)))));var a,i})),s.a.createElement("button",{id:"add-link",onClick:()=>{const e={linkId:"link"+(g.length+1),title:"Link "+(g.length+1),name:"Link "+(g.length+1),linkType:"regular",openLink:"_blank",url:"https://",isExpanded:!0,email:"",phone:""};w.current.push(null),u([...g,e])},className:y.addLinkBtn},s.a.createElement(Ja.a,{htmlColor:"#64748B",style:{height:20,width:20}}),"Add link")),s.a.createElement(Qa,{onClose:d,loading:o,onSaveClick:()=>b()})))}function To(){return s.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("rect",{x:"0.5",y:"0.5",width:"19",height:"19",rx:"9.5",stroke:"#64748B"}))}function ko(){return s.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("rect",{width:"20",height:"20",rx:"10",fill:"#51ABB3"}),s.a.createElement("circle",{cx:"10",cy:"10",r:"4",fill:"white"}))}const{MuiTypographyStyle:No,MuiFormLabelRootStyle:Oo,MuiInputBaseRootStyle:Lo,MuiOutlinedInputRootStyle:Ho,drawerCard:_o}=ka,Vo=Object(Yt.a)({container:_o.container,drawerContent:_o.drawerContent,formControl:_o.formControl,formErrorOrInfo:{display:"flex",justifyContent:"space-between",gap:4,"&.error":{color:"#D97706"}},botContainer:{padding:"16px 8px 16px 16px",display:"flex",flexDirection:"column",gap:12,borderRadius:8,backgroundColor:"#F6F7FF"},starRatingTitle:{display:"flex",gap:8,alignItems:"center",color:"#21272A",fontFamily:"Cairo",fontSize:14,fontWeight:400,lineHeight:"20px"},starRating:{width:195,display:"flex",gap:8,justifyContent:"flex-end"},checkboxBotContainer:{display:"flex",gap:8,alignItems:"center"}}),Uo=Object(De.a)({typography:No,overrides:{MuiFormLabel:{root:{...Oo,"&.Mui-bot":{fontWeight:400,fontSize:16,lineHeight:"24px",color:"#0F172A"}}},MuiOutlinedInput:{root:{...Ho},notchedOutline:{borderWidth:1,borderColor:"#CBD5E1"},input:{padding:0}},MuiInputBase:Lo}});function Wo(e){let{onClose:t,onSave:a,loading:i,title:o="",message:n="",fieldName:r="",id:l,onDrawerClose:d,botContext:c}=e;const h=c.filter(e=>e!==r),{handleSubmit:p,values:g,errors:u,getFieldProps:m,touched:C,handleChange:b,setFieldValue:A}=Object(us.b)({initialValues:{name:o,message:n,saveIntoBotContext:!!r,fieldName:r},validationSchema:Ds(h),onSubmit:e=>a({id:l,...e})}),f=Vo(),x=!!u.name&&!!C.name,E=!!u.message&&!!C.message,v=!!u.fieldName&&!!C.fieldName;return s.a.createElement(Be.a,{theme:Uo},s.a.createElement("div",{className:f.container},s.a.createElement(Va,{"data-testid":"cardHeader",title:"Rating",id:l,onClose:t}),s.a.createElement("div",{className:f.drawerContent},s.a.createElement("div",{className:f.formControl},s.a.createElement(Pe.a,{htmlFor:"title"},"Name*"),s.a.createElement(Ba.a,{placeholder:"Rating card",fullWidth:!0,id:"name",name:"name",value:g.name,inputProps:{...m("name"),maxLength:50},error:x}),s.a.createElement("div",{className:f.formErrorOrInfo},x&&s.a.createElement(Ie.a,{"data-test-id":"nameError",className:"error",variant:"subtitle2"},u.name),s.a.createElement(Ie.a,{style:{marginLeft:"auto"},variant:"subtitle2"},g.name.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{getFieldProps:m,hasMessageError:E,messageErrorText:u.message,botContext:c,value:g.message,setFieldValue:A}),s.a.createElement("div",{className:f.botContainer},s.a.createElement("div",{className:f.checkboxBotContainer},s.a.createElement(ws.a,{style:{padding:0},icon:s.a.createElement(Is,null),checkedIcon:s.a.createElement(Ps,null),id:"saveIntoBotContext",name:"saveIntoBotContext",checked:g.saveIntoBotContext,onChange:e=>{b(e),e.target.checked||A("fieldName","")},"data-testid":"saveIntoBotCheckbox",disableRipple:!0}),s.a.createElement(Pe.a,{htmlFor:"saveIntoBotContext",className:"Mui-bot"},"Save in bot context")),g.saveIntoBotContext&&s.a.createElement("div",{className:f.formControl},s.a.createElement(Pe.a,{htmlFor:"fieldName"},"Field name*"),s.a.createElement(Ba.a,{placeholder:"Type here",fullWidth:!0,id:"fieldName",name:"fieldName",className:"secondary",inputProps:{...m("fieldName"),maxLength:50},error:v,"data-testid":"txtFieldName"}),s.a.createElement("div",{className:f.formErrorOrInfo},v&&s.a.createElement(Ie.a,{"data-test-id":"fieldNameError",className:"error",variant:"subtitle2"},u.fieldName),s.a.createElement(Ie.a,{style:{marginLeft:"auto"},variant:"subtitle2"},g.fieldName.trimStart().trimEnd().length,"/50")))),s.a.createElement("div",{className:f.formControl},s.a.createElement(Pe.a,null,"Type"),s.a.createElement("div",{className:f.starRatingTitle},s.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99935 1.6665C5.39935 1.6665 1.66602 5.39984 1.66602 9.99984C1.66602 14.5998 5.39935 18.3332 9.99935 18.3332C14.5993 18.3332 18.3327 14.5998 18.3327 9.99984C18.3327 5.39984 14.5993 1.6665 9.99935 1.6665ZM9.16602 5.83317V7.49984H10.8327V5.83317H9.16602ZM10.8327 13.3332C10.8327 13.7915 10.4577 14.1665 9.99935 14.1665C9.54102 14.1665 9.16602 13.7915 9.16602 13.3332V9.99984C9.16602 9.5415 9.54102 9.1665 9.99935 9.1665C10.4577 9.1665 10.8327 9.5415 10.8327 9.99984V13.3332ZM3.33268 9.99984C3.33268 13.6748 6.32435 16.6665 9.99935 16.6665C13.6743 16.6665 16.666 13.6748 16.666 9.99984C16.666 6.32484 13.6743 3.33317 9.99935 3.33317C6.32435 3.33317 3.33268 6.32484 3.33268 9.99984Z",fill:"#475569"})),s.a.createElement("span",null,"Rating type: Star Rating (5)")),s.a.createElement("div",{className:f.starRating},[1,2,3,4,5].map((e,t)=>s.a.createElement("svg",{key:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M7.99956 11.6795L10.7662 13.3529C11.2729 13.6595 11.8929 13.2062 11.7596 12.6329L11.0262 9.48619L13.4729 7.36619C13.9196 6.97952 13.6796 6.24619 13.0929 6.19952L9.87289 5.92619L8.61289 2.95285C8.38623 2.41285 7.61289 2.41285 7.38623 2.95285L6.12623 5.91952L2.90623 6.19285C2.31956 6.23952 2.07956 6.97285 2.52623 7.35952L4.97289 9.47952L4.23956 12.6262C4.10623 13.1995 4.72623 13.6529 5.23289 13.3462L7.99956 11.6795Z",fill:"#F59E0B"})))))),s.a.createElement(Qa,{onClose:d,onSaveClick:()=>p(),loading:i})))}var jo=a(1756),zo=a(1757);const Qo=Object(Yt.a)({errorContainer:{borderLeft:"4px solid #F59E0B",backgroundColor:"#FEF3C7",display:"flex",gap:8,alignItems:"center",padding:"8px 8px 8px 16px",borderRadius:4},errorText:{margin:0,fontFamily:"Cairo",fontSize:12,lineHeight:"18px",fontWeight:400,color:"#F59E0B"},closeButton:{all:"unset",cursor:"pointer",marginLeft:"auto"}});function Go(e){let{error:t,handleClose:a}=e;const i=Qo();return t?s.a.createElement("div",{className:i.errorContainer},s.a.createElement(jo.a,{htmlColor:"#F59E0B"}),s.a.createElement("p",{className:i.errorText},t),s.a.createElement("button",{"aria-label":"close error",className:i.closeButton,onClick:a},s.a.createElement(zo.a,{htmlColor:"#F59E0B"}))):null}const{MuiFormLabelRootStyle:qo,MuiTypographyStyle:Zo,MuiOutlinedInputRootStyle:Jo,MuiInputBaseRootStyle:Yo,drawerCard:Ko}=ka,Xo=Object(Yt.a)({container:Ko.container,drawerContent:Ko.drawerContent,textArea:Ko.textArea,botContainer:{padding:"16px 8px 16px 16px",display:"flex",flexDirection:"column",gap:12,borderRadius:8,backgroundColor:"#F6F7FF"},formControl:Ko.formControl}),$o=Object(De.a)({typography:Zo,overrides:{MuiFormLabel:{root:{...qo,"&.Mui-bot":{fontSize:16,fontWeight:400,color:"#0F172A",lineHeight:"24px"}}},MuiInputBase:Yo,MuiOutlinedInput:{root:Jo,notchedOutline:{borderColor:"#CBD5E1",borderWidth:1},input:{padding:0}}}});function en(e){let{onClose:t,onDrawerClose:a,onSave:o,loading:n,title:r="",message:l="",options:d=[],fieldName:c="",id:h,botContext:p}=e;const g=Xo(),[u,m]=Object(i.useState)(null),{values:C,getFieldProps:b,handleChange:A,handleSubmit:f,errors:x,touched:E,setFieldValue:v}=Object(us.b)({initialValues:{title:r,message:l,saveIntoBotContext:!!c,fieldName:c,options:d.join("\n")},onSubmit:e=>{const t=e.options.split("\n");if(t.length>50)return void m("You already added the maximum number of options");t.some(e=>""===e.trim())?m("Please add valid option"):o({id:h,...e,options:t})},validationSchema:Bs(p.filter(e=>e!==c))}),y=C.options.split("\n").filter(e=>""!==e.trim()).length,w=!!x.message&&!!E.message,I=!!x.title&&!!E.title,P=!!x.options&&!!E.options,S=!!x.fieldName&&!!E.fieldName;return s.a.createElement(Be.a,{theme:$o},s.a.createElement(we.a,{className:g.container},s.a.createElement(Va,{"data-testid":"cardHeader",onClose:t,title:"Dropdown",id:h}),s.a.createElement(we.a,{className:g.drawerContent},s.a.createElement(we.a,{className:g.formControl},s.a.createElement(Pe.a,{htmlFor:"title"},"Name*"),s.a.createElement(Ba.a,{placeholder:"Dropdown card",fullWidth:!0,id:"title",name:"title",inputProps:{...b("title"),maxLength:50},error:I,"data-test-id":"txtTitle"}),s.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",gap:4}},I&&s.a.createElement(Ie.a,{className:"error",variant:"subtitle2"},x.title),s.a.createElement(Ie.a,{variant:"subtitle2",style:{marginLeft:"auto"}},C.title.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{getFieldProps:b,hasMessageError:w,messageErrorText:x.message,value:C.message,botContext:p,setFieldValue:v}),s.a.createElement(we.a,{className:g.botContainer},s.a.createElement(we.a,{style:{display:"flex",gap:8,alignItems:"center"}},s.a.createElement(ws.a,{style:{padding:0},icon:s.a.createElement(Is,null),checkedIcon:s.a.createElement(Ps,null),id:"saveIntoBotContext",name:"saveIntoBotContext",checked:C.saveIntoBotContext,onChange:e=>{A(e),e.target.checked||v("fieldName","")},disableRipple:!0}),s.a.createElement(Pe.a,{htmlFor:"saveIntoBotContext",className:"Mui-bot"},"Save in bot context")),C.saveIntoBotContext&&s.a.createElement(we.a,{className:g.formControl},s.a.createElement(Pe.a,{htmlFor:"fieldName"},"Field name*"),s.a.createElement(Ba.a,{placeholder:"Type here",fullWidth:!0,id:"fieldName",name:"fieldName",className:"secondary",inputProps:{...b("fieldName"),maxLength:50},error:S}),s.a.createElement("div",{style:{display:"flex",justifyContent:S?"space-between":"flex-end",gap:4}},S&&s.a.createElement(Ie.a,{className:"error",variant:"subtitle2"},x.fieldName),s.a.createElement(Ie.a,{variant:"subtitle2"},C.fieldName.trimStart().trimEnd().length,"/50")))),s.a.createElement(we.a,{className:g.formControl,style:{gap:8}},s.a.createElement(Pe.a,{htmlFor:"options"},`Option(s) (${y})*`),s.a.createElement(Ie.a,{variant:"subtitle2"},"Maximum 50 options"),s.a.createElement(Go,{error:u,handleClose:()=>m(null)}),s.a.createElement(Ss.a,Object.assign({id:"options",placeholder:"Type your options here",className:`${g.textArea} ${P?"error":""}`,style:{height:101}},b("options"))),s.a.createElement(Ie.a,{variant:"subtitle2",className:P?"error":""},P?x.options:"Separate your options by a new line"))),s.a.createElement(Qa,{onClose:a,onSaveClick:()=>f(),loading:n})))}const{MuiFormLabelRootStyle:tn,MuiInputBaseRootStyle:an,MuiOutlinedInputRootStyle:sn,drawerCard:on,MuiTypographyStyle:nn}=ka,rn=e=>e.map((e,t)=>({id:"option-"+(t+1),value:e,name:"option-"+(t+1)})),ln=Object(Ta.a)("div")({display:"flex",gap:4,alignItems:"center"}),dn=Object(Ta.a)("div")({display:"flex",flexDirection:"column",gap:8}),cn=Object(Yt.a)({container:on.container,drawerContent:on.drawerContent,botContainer:on.botContainer,formControl:on.formControl,addOptionButton:{...on.addLinkOrOptionButton,fontFamily:"Cairo"},iconButton:on.iconButton}),hn=Object(De.a)({typography:nn,overrides:{MuiFormLabel:{root:{...tn,"&.Mui-bot":{lineHeight:"24px",color:"#0F172A",fontWeight:400,fontSize:16}}},MuiInputBase:an,MuiOutlinedInput:{root:sn,notchedOutline:{borderColor:"#CBD5E1",borderWidth:1},input:{padding:0}}}});function pn(e){let{onClose:t,onSave:a,loading:o,title:n,type:r,name:l="",message:d="",fieldName:c="",initialOptions:h=["Option 1","Option 2","Option 3"],id:p,onDrawerClose:g,botContext:u}=e;const m=cn(),[C,b]=Object(i.useState)(null),[A,f]=Object(i.useState)(()=>rn(h)),x=Object(i.useRef)(!1),E=Object(i.useRef)(rn(h).length),{values:v,getFieldProps:y,handleChange:w,handleSubmit:I,errors:P,touched:S,setFieldValue:M}=Object(us.b)({initialValues:{name:l,message:d,saveIntoBotContext:!!c,fieldName:c},onSubmit:e=>{if(0===A.length)return void b("Please add a option");A.some(e=>""===e.value.trim())?b("Please fill all options"):(b(null),a({id:p,...e,options:A.map(e=>e.value.trim()),type:r}))},validationSchema:Ds(u.filter(e=>e!==c))}),F=!!P.message&&!!S.message,R=!!P.name&&!!S.name,D=!!P.fieldName&&!!S.fieldName;return s.a.createElement(Be.a,{theme:hn},s.a.createElement(we.a,{className:m.container},s.a.createElement(Va,{id:p,onClose:t,title:n,"data-testid":"cardHeader"}),s.a.createElement(we.a,{className:m.drawerContent},s.a.createElement(we.a,{className:m.formControl},s.a.createElement(Pe.a,{htmlFor:"title"},"Name*"),s.a.createElement(Ba.a,{placeholder:"single_choice"===r?"Single choice card":"Multi choice card",fullWidth:!0,id:"name",name:"name",inputProps:{...y("name"),maxLength:50},error:R}),s.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",gap:4}},R&&s.a.createElement(Ie.a,{className:"error",variant:"subtitle2"},P.name),s.a.createElement(Ie.a,{variant:"subtitle2",style:{marginLeft:"auto"}},v.name.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{botContext:u,getFieldProps:y,hasMessageError:F,messageErrorText:P.message,value:v.message,setFieldValue:M}),s.a.createElement(we.a,{className:m.botContainer},s.a.createElement(we.a,{style:{display:"flex",gap:8,alignItems:"center"}},s.a.createElement(ws.a,{icon:s.a.createElement(Is,null),style:{padding:0},id:"saveIntoBotContext",name:"saveIntoBotContext",checked:v.saveIntoBotContext,onChange:e=>{w(e),e.target.checked||M("fieldName","")},disableRipple:!0,checkedIcon:s.a.createElement(Ps,null)}),s.a.createElement(Pe.a,{className:"Mui-bot",htmlFor:"saveIntoBotContext"},"Save in bot context")),v.saveIntoBotContext&&s.a.createElement(we.a,{className:m.formControl},s.a.createElement(Pe.a,{htmlFor:"fieldName"},"Field name*"),s.a.createElement(Ba.a,{placeholder:"Type here",error:D,fullWidth:!0,id:"fieldName",inputProps:{...y("fieldName"),maxLength:50},name:"fieldName",className:"secondary"}),s.a.createElement("div",{style:{display:"flex",gap:4,justifyContent:D?"space-between":"flex-end"}},D&&s.a.createElement(Ie.a,{className:"error",variant:"subtitle2"},P.fieldName),s.a.createElement(Ie.a,{variant:"subtitle2"},v.fieldName.trimStart().trimEnd().length,"/50")))),s.a.createElement(we.a,{className:m.formControl,style:{gap:8}},s.a.createElement(Pe.a,{htmlFor:"options"},`Option(s) (${A.length})*`),s.a.createElement(Ie.a,{variant:"subtitle2"},"Maximum 10 options"),s.a.createElement(Go,{error:C,handleClose:()=>b(null)}),s.a.createElement("button",{id:"add-link","aria-disabled":x.current,onClick:()=>{if(10===A.length)return x.current=!0,void b("You already added the maximum number of options");E.current=E.current+1;const e={id:"option-"+E.current,value:"Option "+E.current,name:"option-"+E.current};f([...A,e])},className:m.addOptionButton},s.a.createElement(Ja.a,{htmlColor:"currentColor",style:{height:20,width:20}}),"Add option"),A.length>0&&s.a.createElement(gn,{options:A,onRemoveOption:e=>()=>{const t=A.filter(t=>t.id!==e);x.current=!1,f(t)},onValueChange:e=>{const{name:t,value:a}=e.target,i=[...A],s=i.findIndex(e=>e.name===t);i[s]={...i[s],value:a},f(i)},handleSwapOptions:e=>f(e)}))),s.a.createElement(Qa,{onClose:g,onSaveClick:()=>I(),loading:o})))}function gn(e){let{options:t,onValueChange:a,onRemoveOption:i,handleSwapOptions:o}=e;const n=cn();return s.a.createElement(Ga.a,{onDragEnd:e=>{if(!e.destination)return;if(e.destination.index===e.source.index)return;const a=[...t],[i]=a.splice(e.source.index,1);a.splice(e.destination.index,0,i),o(a)}},s.a.createElement(Ga.c,{droppableId:"options"},e=>s.a.createElement(dn,Object.assign({ref:e.innerRef},e.droppableProps),t.map((e,t)=>s.a.createElement(Ga.b,{key:e.id,index:t,draggableId:e.id},t=>s.a.createElement(ln,Object.assign({ref:t.innerRef},t.draggableProps),s.a.createElement("button",Object.assign({},t.dragHandleProps,{"aria-label":"drag "+e.name,className:n.iconButton}),s.a.createElement(qa.a,{style:{cursor:"grab"},htmlColor:"#64748B"})),s.a.createElement(Ba.a,{placeholder:"Type your option here",fullWidth:!0,id:e.id,name:e.name,value:e.value,onChange:a,inputProps:{"aria-label":e.id}}),s.a.createElement("button",{"aria-label":"remove "+e.id,onClick:i(e.id),className:n.iconButton+" pointer"},s.a.createElement(oi.a,{htmlColor:"#DC2626"}))))))))}const{drawerCard:un,MuiFormLabelRootStyle:mn,MuiButtonRootStyle:Cn,MuiTypographyStyle:bn,MuiOutlinedInputStyle:An,MuiInputBaseRootStyle:fn}=ka,xn=Object(De.a)({typography:bn,overrides:{MuiButton:{text:{padding:"10px 16px"},root:Cn},MuiFormLabel:{root:mn},MuiInputBase:fn,MuiOutlinedInput:An}}),En=Object(Yt.a)({container:un.container,drawerContent:un.drawerContent,formControl:un.formControl,formErrorOrInfo:un.formErrorOrInfo}),vn=gs.d().shape({name:gs.f().trim().required("Please add a name"),message:gs.f().trim().required("Please add a message"),videoURL:gs.f().trim().required("Please add a video URL").matches(/^https:\/\/(?:vimeo\.com|www\.youtube\.com|youtu\.be)\/[a-zA-Z0-9-_.~%]+(?:\/[a-zA-Z0-9-_.~%]*)*(?:\?[a-zA-Z0-9-_.~%=&,]*)?(?:#[\w-]*)?$/,{message:"Please enter a valid video URL"})});function yn(e){let{onClose:t,onSave:a,loading:i,title:o="",message:n="",videoURL:r="https://",id:l,onDrawerClose:d,botContext:c}=e;const h=En(),{getFieldProps:p,errors:g,values:u,touched:m,handleSubmit:C,setFieldValue:b}=Object(us.b)({initialValues:{name:o,message:n,videoURL:r},validationSchema:vn,onSubmit:e=>a({id:l,...e})}),A=!!g.name&&!!m.name,f=!!g.message&&!!m.message,x=!!g.videoURL&&!!m.videoURL;return s.a.createElement(Be.a,{theme:xn},s.a.createElement("div",{className:h.container},s.a.createElement(Va,{id:l,"data-testid":"cardHeader",onClose:t,title:"Share video"}),s.a.createElement("div",{className:h.drawerContent},s.a.createElement("div",{className:h.formControl},s.a.createElement(Pe.a,{htmlFor:"name"},"Name*"),s.a.createElement(Ba.a,{id:"name",name:"name",value:u.name,error:A,inputProps:{...p("name"),maxLength:50},placeholder:"Send video card"}),s.a.createElement("div",{className:h.formErrorOrInfo},A&&s.a.createElement(Ie.a,{variant:"subtitle2",className:"error"},g.name),s.a.createElement(Ie.a,{variant:"subtitle2",className:"ml-auto"},u.name.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{getFieldProps:p,hasMessageError:f,messageErrorText:g.message,value:u.message,botContext:c,setFieldValue:b,"data-testid":"share-video-message"}),s.a.createElement("div",{className:h.formControl+" gap-8"},s.a.createElement(Pe.a,{htmlFor:"videoURL"},"Video URL*"),s.a.createElement(Ie.a,{variant:"subtitle2"},"Youtube or Vimeo links are supported"),s.a.createElement(Ba.a,{id:"videoURL",name:"videoURL",value:u.videoURL,error:x,inputProps:{...p("videoURL")},placeholder:"Type your video URL here"}),x&&s.a.createElement(Ie.a,{variant:"subtitle2",className:"error"},g.videoURL))),s.a.createElement(Qa,{onClose:d,onSaveClick:()=>C(),loading:i})))}const wn=a(1361),In=a(1362);a(1363),a(1364),a(1365),a(1366),a(1367),a(1368),a(1369),a(1370),a(1371),a(1372),a(1373),a(1374),a(1375),a(1376),a(1377);var Pn=a(735);const Sn=(e,t,a)=>{if(0!==e.children.length||["go_to_tile","end_chat","criteria_routing","add_node"].includes(e.node.data.type))"go_to_tile"===e.node.data.type||"end_chat"===e.node.data.type?e.node.className="no-handle":e.children.forEach(e=>Sn(e,t,a));else{if(!a.get(e.node.id)){const a={id:"end-"+e.node.id,type:"addNode",position:{x:0,y:0},data:{id:1234*e.node.data.id,title:"Add node",message:"Add node message",type:"add_node",status:"connected",source:[e.node.id],height:44,connectorCardType:e.node.data.connectorCardType,onClick:t}};e.node.data.error||(e.node.className="primary"),e.children.push({node:a,children:[]})}}},Mn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:157,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:478,i=!1;"start"!==e.node.id&&(e.node.position.x=t,t+=a,e.children.length>1&&(i=!0)),e.children.forEach((e,s)=>{let o=t;i&&s>0&&(o-=30*s),Mn(e,o,a)})};const Fn=(e,t)=>{let a="#51ABB3";return e||(a="#334155"),t&&(a="#DC2626"),a},Rn=(e,t)=>{const a=[],i=new Set,s=new Set;return function t(o){const n=o.node.id.startsWith("end"),r=n?"":"smooth-edge",l=n?"dashed":"solid";o.node.data.source.forEach(t=>{var d;const c=e.get(t);let h=null===c||void 0===c||null===(d=c.data)||void 0===d?void 0:d.error;if((null===c||void 0===c?void 0:c.data.criteriaRoutings)&&c.data.criteriaRoutings.length>0){c.data.criteriaRoutings.forEach(e=>{let s="dashed",o=`end-${t}-${e.criteria_routing_id}`;e.nextCardId&&(o=e.nextCardId,s="solid");const n=`e-${t}-${o}-criteria-${e.criteria_routing_id}`;if(!i.has(n)){const l={id:n,source:t,target:o,type:"smoothDashEdge",markerEnd:{type:Pn.d.ArrowClosed,color:Fn(!e.nextCardId,h)},data:{strokeStyle:s,hasError:h,rule:e},className:r,sourceHandle:""+e.criteria_routing_id};i.add(n),a.push(l)}})}else if("openai"===(null===c||void 0===c?void 0:c.data.type)){c.data.followUpActions.forEach((e,i)=>{(e=>{let{action:t,sourceId:a,followUpActionVisitedSet:i,hasErrorInSourceNode:s,actionIndex:o,edgeClassName:n,edges:r}=e,l="dashed",d=`end-${a}-${t.id}`;t.redirectCardId&&(d=t.redirectCardId,l="solid");const c=`e-${a}-${d}-follow-up-action-${t.id}`;if(!i.has(c)){const e={id:c,source:a,target:d,type:"smoothDashEdge",markerEnd:{type:Pn.d.ArrowClosed,color:Fn(!t.redirectCardId,s)},data:{strokeStyle:l,hasError:s,followUpAction:{id:t.id,title:"Follow-up action "+(o+1)}},className:n,sourceHandle:""+t.id};i.add(c),r.push(e)}})({action:e,actionIndex:i,followUpActionVisitedSet:s,edgeClassName:r,edges:a,hasErrorInSourceNode:h,sourceId:t})})}else{const e={id:`e-${t}-${o.node.id}`,source:t,target:o.node.id,type:"smoothDashEdge",markerEnd:{type:Pn.d.ArrowClosed,color:Fn(n,h)},data:{strokeStyle:l,hasError:h},className:r};a.push(e)}}),o.children.forEach(e=>t(e))}(t),a};const Dn={getNewNodesWithNewEdges:e=>{let{nodes:t,onAddNodeClick:a,checkForError:i}=e;const s=new Map,o=[],n=[],r=new Map,l=new Map,d=t.map(e=>({...e,position:{...e.position},className:"",data:{...e.data,error:""}}));d.forEach(e=>{r.set(e.id,e),e.data.source.forEach(t=>{s.has(t)||s.set(t,[]),s.get(t).push(e)})});let c=138;return function(e,t,a){const i=[],s=new Set;return e.forEach(e=>{if(!s.has(e.id)){let o=e;for(const t of e.data.source)if(!s.has(t)){o=a.get(t);break}const n=function(e,t,a){const i=[e];let s=[e];for(a.add(e.id);s.length>0;){const e=s.shift().id;t.has(e)&&t.get(e).forEach(e=>{if(!a.has(e.id)){const t={...e,position:{...e.position},data:{...e.data}};i.push(t),s.push(t),a.add(e.id)}})}return i}(o,t,s);i.push(n)}}),i}(d,s,r).forEach((e,t)=>{const d=function(e,t,a,i){return function t(s,o){var n,r;const l=null!==(n=null===(r=document.getElementById(s.id))||void 0===r?void 0:r.offsetHeight)&&void 0!==n?n:96;if(s.data.height=s.data.height?s.data.height:l,o.has(s.id))return{node:{...s,position:{x:0,y:0},data:{...s.data,type:"go_to_tile",source:[]}},children:[]};o.add(s.id);let d=[];var c;"criteria_routing"===s.data.type?null===(c=s.data.criteriaRoutings)||void 0===c||c.map(e=>{const t={id:`end-${s.id}-${e.criteria_routing_id}`,type:"addNode",position:{x:0,y:0},data:{id:1235*s.data.id,title:"Add node",message:"Add node",type:"add_node",status:"connected",source:[s.id],criteriaRoutingId:e.criteria_routing_id,height:44,connectorCardType:s.data.connectorCardType,onClick:a}};if(null===e.nextCardId)d.push(t);else{const a=i.get(e.nextCardId);a?d.push(a):d.push(t)}}):d="openai"===s.data.type?((e,t,a)=>{var i;const s=[];return null===(i=e.data.followUpActions)||void 0===i||i.map(i=>{const o={id:`end-${e.id}-${i.id}`,type:"addNode",position:{x:0,y:0},data:{id:1235*e.data.id,title:"Add node",message:"Add node",type:"add_node",status:"connected",source:[e.id],followUpActionId:i.id,height:44,connectorCardType:e.data.connectorCardType,onClick:a}};if(null===i.redirectCardId)s.push(o);else{const e=t.get(i.redirectCardId);e?s.push(e):s.push(o)}}),s})(s,i,a):e.filter(e=>e.data.source.includes(s.id));const h=d.map(e=>t(e,o));return{node:s,children:h}}(t,new Set)}(e,e[0],a,r);i&&(0===t?(e=>{const t=new Set,a=e=>{if("end_chat"===e.node.data.type||"go_to_tile"===e.node.data.type||t.has(e.node.id))return!0;t.add(e.node.id);let i=!1,s=!1;e.children.forEach(e=>{e.node.id.startsWith("end")?s=!0:a(e)&&(i=!0)}),e.node.data.error="",e.node.className="";return(0===e.children.length&&!i||s)&&(e.node.data.error="This branch is incomplete, please add a 'end chat' tile before publication",e.node.className="danger"),"start"===e.node.id&&(e.node.className="",e.node.data.error=""),i};a(e)})(d):(e=>{const t=e=>{e.node.data.error="This tile is unconnected to the flow, please connect or delete it",e.node.className="danger",e.children.forEach(e=>t(e))};t(e)})(d)),Sn(d,a,s),Mn(d,157,478);const h=function(e,t){let a=t,i=0;return function e(t,s){"start"!==t.node.id&&(t.node.position.y=s,i=Math.max(i,t.node.position.y),a=Math.max(a,t.node.position.y+t.node.data.height));let o=s;return t.children.forEach((t,a)=>{let s=o;a>0&&(s+=70);const n=e(t,s);o=i+n}),t.node.data.height}(e,t),a}(d,c);c=h+50;const p=((e,t)=>{const a=e=>{t.set(e.node.id,e.node);const i={node:{...e.node,position:{...e.node.position},data:{...e.node.data}},children:[]};return i.children=e.children.map(a),i};return a(e)})(d,l);n.push((e=>{const t=[],a=new Set;return function e(i){a.has(i.node.id)||(t.push({...i.node,position:{...i.node.position},data:{...i.node.data}}),a.add(i.node.id)),i.children.forEach(t=>e(t))}(e),t})(p)),o.push(Rn(l,p))}),{newNodes:n.flatMap(e=>e),newEdges:o.flatMap(e=>e)}}},Bn=a(639);class Tn extends K{constructor(e){super(e),this.currentDeletedNodeId=null,this.currentTargetNodeId=null,this.currentSourceId="",this.nodeDeleteTitle="",this.headerRef=s.a.createRef(),this.sidebarTop=void 0,this.nodeIdsToBeDeleted=[],this.criteriaRoutingId=void 0,this.connectorCardCallId=null,this.botContext=[],this.criteriaRoutingCardId=void 0,this.botStatusUpdateCallId=null,this.followUpActionId=void 0,this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?wn:In}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?wn:In},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.handleBotStatusUpdateResponse=async e=>{var t;this.setState({publishLoading:!1,saveDraftLoading:!1});const a=e.getData(q(Z.RestAPIResponceSuccessMessage));a?(null===(t=a.errors)||void 0===t?void 0:t[0].token)?await this.handleLogout():a.message&&Pi.b.success("Successfully updated the bot status",{className:"success__toast"}):Pi.b.error("Failed to update the status of bot",{className:"error__toast"})},this.handleCreateTemplateResponse=async e=>{var t,a,i;this.setState({templateCreateLoading:!1});const s=e.getData(q(Z.RestAPIResponceSuccessMessage));if(s)if("Card templates cannot exceed 12 card templates"!==(null===(t=s.errors)||void 0===t?void 0:t[0])){if(null===(a=s.errors)||void 0===a||null===(i=a[0])||void 0===i?void 0:i.token)await this.handleLogout();else if(s.data){const e=new Q(q(Z.NavigationProjectTemplatesEditMessage));e.addData(q(Z.NavigationPropsMessage),this.props),e.addData(q(Z.NavigationScreenNameMessage),s.data.id),this.send(e)}}else Pi.b.error("You already added the maximum number of templates",{className:"error__toast"});else Pi.b.error("Failed to create template!",{className:"error__toast"})},this.handleDeleteMultipleCardsResponse=async e=>{var t,a;this.setState({cardDeleteLoading:!1});const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.success){Pi.b.success("Cards successfully deleted",{className:"success__toast"});const e=new Set([...this.nodeIdsToBeDeleted]),t=this.state.actions.filter(t=>!e.has(t.id)).map(t=>{const a=t.source.some(t=>e.has(+t)),i=t.source.filter(t=>!e.has(+t)),s=i.length>0?"connected":"disconnected";return{...t,source:i,status:a?s:t.status}});this.nodeDeleteTitle="",this.nodeIdsToBeDeleted=[],this.handleSaveIntoBotContext(t);const a=xo.getContextVariableFromNodes(t);this.setState({actions:t,selectedCard:null,openDeleteConfirmDialog:!1,selectedNodeId:void 0,selectedNodeData:void 0,isDrawerOpen:!1,deleteMultipleNode:!1,contextVariables:a})}}else Pi.b.error("Failed to delete cards!",{className:"error__toast"})},this.handleAddConnectorCardsFromTemplateToChatbotResponse=async e=>{var t,a;this.setState({isAddingCardsFromTemplate:!1});const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.connector_cards){const e=i.connector_cards.data.map(e=>xo.getNodeDataFromConnectorCardAttributes(e));this.criteriaRoutingId=void 0,this.followUpActionId=void 0;const t=xo.getContextVariableFromNodes(e);this.setState({actions:e,contextVariables:t})}}else Pi.b.error("Failed to add cards from template",{className:"error__toast"})},this.handleSaveIntoBotContext=e=>{const t=e.map(e=>e.fieldName);this.botContext=t.filter(e=>"string"===typeof e&&0!==e.length)},this.handleDrawerClose=()=>{this.setState({isDrawerOpen:!1,selectedCard:null,selectedNodeData:void 0,source:[],selectedNodeId:void 0})},this.handleOpenConfirmationDialog=e=>{this.currentDeletedNodeId=e.id,this.nodeDeleteTitle=e.title,this.setState({openDeleteConfirmDialog:!0})},this.handleCloseConfirmationDialog=()=>{this.currentDeletedNodeId=null,this.nodeDeleteTitle="",this.nodeIdsToBeDeleted=[],this.setState({openDeleteConfirmDialog:!1,deleteMultipleNode:!1})},this.handleDeleteCardNode=()=>{this.setState({cardDeleteLoading:!0});const e=new Q(q(Z.RestAPIRequestMessage));if(this.state.deleteMultipleNode){const t={connector_card:{card_ids:this.nodeIdsToBeDeleted}};e.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(t)),e.addData(q(Z.RestAPIResponceEndPointMessage),Bn.deleteMultipleCards),e.addData(q(Z.NavigationPropsMessage),{title:"DeleteMultipleCards"})}else e.addData(q(Z.RestAPIResponceEndPointMessage),`${Bn.connectorCardsEndPoint}/${this.currentDeletedNodeId}`),e.addData(q(Z.NavigationPropsMessage),{title:"DeleteConnectorCard"});e.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify({token:this.state.token,"Content-Type":Bn.validationApiContentType})),e.addData(q(Z.RestAPIRequestMethodMessage),"DELETE"),this.send(e)},this.handleAddCardData=e=>{let t=[...this.state.actions];if(this.criteriaRoutingId){const a=t.findIndex(e=>e.id===+this.state.source[0]),i=t[a],s=i.criteriaRoutings.findIndex(e=>e.criteria_routing_id===this.criteriaRoutingId);i.criteriaRoutings[s]={...i.criteriaRoutings[s],nextCardId:""+e.id},t[a]=i,"openai"===e.type?t=xo.addOrEditActions(t,e):t.push(e)}else if(this.followUpActionId){const a=t.findIndex(e=>e.id===+this.state.source[0]),i=t[a],s=i.followUpActions.findIndex(e=>e.id===this.followUpActionId);i.followUpActions[s]={...i.followUpActions[s],redirectCardId:""+e.id},t[a]=i,t.push(e)}else t=xo.addOrEditActions(t,e);this.criteriaRoutingId=void 0,this.followUpActionId=void 0,this.handleSaveIntoBotContext(t);const a=xo.getContextVariableFromNodes(t);this.setState({actions:t,selectedNodeData:{[e.id]:e},selectedNodeId:e.id,source:[],contextVariables:a})},this.handleNavigateToBotSettingsPage=()=>{const e=new Q(q(Z.NavigationSettingsMessage));e.addData(q(Z.NavigationPropsMessage),this.props),e.addData(q(Z.NavigationScreenNameMessage),this.props.navigation.getParam("navigationBarTitleText")),this.send(e)},this.handleNavigateToBotsPage=()=>{const e=new Q(q(Z.NavigationBotsMessage));e.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),this.send(e)},this.handleUpdateBotStatusRequestMessage=(e,t)=>()=>{this.setState(e);const a={"Content-Type":"application/json",token:this.state.token},i=this.props.navigation.getParam("navigationBarTitleText"),s=new Q(q(Z.RestAPIRequestMessage));s.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),s.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify({status:t})),s.addData(q(Z.RestAPIResponceEndPointMessage),`${Bn.chatbotEndpoint}/${i}/update_status`),s.addData(q(Z.RestAPIRequestMethodMessage),"POST"),s.addData(q(Z.NavigationPropsMessage),{title:"BotStatus"}),this.send(s)},this.handlePublishBot=()=>{if(0===this.state.actions.length)return void Pi.b.error("Please add a card",{className:"error__toast"});let e=[{id:"start",type:"homeNode",position:{x:24,y:24},data:{title:"Home",message:"Home",status:"disconnected",source:[],type:"send_message",id:Date.now(),connectorCardType:this.props.isTemplate?"template":"chatbot"}}];this.state.actions.forEach(t=>{e.push({id:""+t.id,position:{x:0,y:0},type:"cardNode",data:{...t,onClick:this.handleCardNodeClick,onCardNodeDelete:this.handleOpenConfirmationDialog}})});const{newNodes:t}=Dn.getNewNodesWithNewEdges({nodes:e,onAddNodeClick:this.handleShowCardsDrawer,checkForError:!0});if(t.some(e=>!!e.data.error)){let e=[];return t.forEach(t=>{"start"===t.id||t.id.startsWith("end")||e.push(t.data)}),void this.setState({showChatbotErrorDialog:!0,hasErrorInTheChatbot:!0})}this.state.hasErrorInChatbotSettings?this.setState({showChatbotErrorDialog:!0,hasErrorInTheChatbot:!1}):this.handleUpdateBotStatusRequestMessage({publishLoading:!0,saveDraftLoading:!1},"active")()},this.handleOpenSelectedCard=e=>{this.setState({selectedCard:e})},this.handleCloseSelectedCard=()=>{this.setState({selectedCard:null})},this.handleCloseChatbotErrorDialog=()=>{this.setState({showChatbotErrorDialog:!1})},this.onTemplateCreate=(e,t)=>{const a={card_template:{name:t,connector_cards_ids:e.map(e=>e.data.id)}},i={token:this.state.token,"Content-Type":Bn.validationApiContentType};this.setState({templateCreateLoading:!0});const s=new Q(q(Z.RestAPIRequestMessage));s.addData(q(Z.RestAPIRequestMethodMessage),"POST"),s.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(a)),s.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(i)),s.addData(q(Z.RestAPIResponceEndPointMessage),Bn.createTemplateEndpoint),s.addData(q(Z.NavigationPropsMessage),{title:"CreateTemplateWithDefaultNodeIDs"}),this.send(s)},this.handleUpdateCriteriaRouting=e=>{let{newActions:t,criteriaCardId:a,criteriaRoutingId:i,nextCardId:s}=e;const o=t.findIndex(e=>e.id===a);if(-1!==o){const e=t[o],a=e.criteriaRoutings.findIndex(e=>e.criteria_routing_id===i);e.criteriaRoutings[a]={...e.criteriaRoutings[a],nextCardId:s},t[o]=e}},this.handleUpdateOpenAI=e=>{let{newActions:t,openAICardId:a,followUpActionId:i,redirectCardId:s}=e;const o=t.findIndex(e=>e.id===a);if(-1!==o){const e=t[o],a=e.followUpActions.findIndex(e=>e.id===i);e.followUpActions[a]={...e.followUpActions[a],redirectCardId:s},t[o]=e}},this.handleConnectionTypeCard=(e,t,a)=>{const i=this.state.actions.findIndex(t=>t.id===e),s=this.state.actions[i],o=[...this.state.actions];o[i]={...s,source:[...s.source,...this.state.source],status:"connected",criteriaRoutingId:t},t&&this.handleUpdateCriteriaRouting({newActions:o,criteriaRoutingId:t,criteriaCardId:+this.state.source[0],nextCardId:""+e}),a&&this.handleUpdateOpenAI({newActions:o,openAICardId:+this.state.source[0],followUpActionId:a,redirectCardId:""+e}),this.setState({actions:o,isDrawerOpen:!1,selectedCard:null,selectedNodeData:void 0,selectedNodeId:void 0,source:[]})},this.handleConnectNode=(e,t,a,i)=>{this.setState({source:t}),this.handleConnectionTypeCard(+e,a,i),this.currentTargetNodeId=+e,this.currentSourceId=t[0],this.criteriaRoutingId=a,this.followUpActionId=i;const s={token:this.state.token,"Content-Type":Bn.validationApiContentType},o={card_id:e,connector_card_ids:+t[0]};a&&(o.previous_card_id=a),i&&(o.follow_up_id=i);const n=new Q(q(Z.RestAPIRequestMessage));n.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(o)),n.addData(q(Z.RestAPIResponceEndPointMessage),Bn.updateSource),n.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(s)),n.addData(q(Z.RestAPIRequestMethodMessage),"PUT"),n.addData(q(Z.NavigationPropsMessage),{title:"SourceUpdateInConnectorCard"}),this.send(n)},this.handleDeleteMultipleCards=e=>{const t=[];e.forEach(e=>{this.nodeIdsToBeDeleted.push(e.data.id),t.push(e.data.title)}),this.nodeDeleteTitle=t.join(", "),this.setState({openDeleteConfirmDialog:!0,deleteMultipleNode:!0})},this.handleAddConnectorCardsFromTemplateToChatbot=e=>{const t=new Q(q(Z.RestAPIRequestMessage)),a=this.props.navigation.getParam("navigationBarTitleText"),i={token:this.state.token,"Content-Type":"application/json"},s={connector_cards_ids:e,source_id:this.state.source[0]};this.criteriaRoutingId&&(s.previous_card_id=this.criteriaRoutingId),this.setState({isAddingCardsFromTemplate:!0}),t.addData(q(Z.RestAPIResponceEndPointMessage),`${Bn.chatbotEndpoint}/${a}/create_connector_cards_for_chatbot`),t.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(s)),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(i)),t.addData(q(Z.RestAPIRequestMethodMessage),"POST"),t.addData(q(Z.NavigationPropsMessage),{title:"AddConnectorCardsFromTemplate"}),this.send(t)},this.handleSetEdattWithChatbotSettingsError=(e,t)=>{this.setState({isUserEdatt:e,hasErrorInChatbotSettings:t})},this.receive=this.receive.bind(this),this.handleShowCardsDrawer=this.handleShowCardsDrawer.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess),q(Z.NavigationScreenNameMessage),q(Z.RestAPIResponceMessage)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1,isDrawerOpen:!1,selectedCard:null,actions:[],selectedNodeData:void 0,token:"",connectorCardLoading:!1,source:[],selectedNodeId:void 0,cardDeleteLoading:!1,openDeleteConfirmDialog:!1,showChatbotErrorDialog:!1,hasErrorInTheChatbot:!1,templateCreateLoading:!1,deleteMultipleNode:!1,contextVariables:{subFields:[],subFieldValue:{}},isAddingCardsFromTemplate:!1,isUserEdatt:!!this.props.isTemplate,hasErrorInChatbotSettings:!1,publishLoading:!1,saveDraftLoading:!1},z.attachBuildingBlock(this,this.subScribedMessages),this.handleFetchConnectorCards=this.handleFetchConnectorCards.bind(this),this.handleRestApiResponse=this.handleRestApiResponse.bind(this),this.handleConnectorCardResponse=this.handleConnectorCardResponse.bind(this),this.handleLogout=this.handleLogout.bind(this),this.handleCardNodeClick=this.handleCardNodeClick.bind(this),this.handleConnectorCardDeleteResponse=this.handleConnectorCardDeleteResponse.bind(this),this.handleRemoveSourceFromConnectorCard=this.handleRemoveSourceFromConnectorCard.bind(this),this.handleUpdateSourceInConnectorCardResponse=this.handleUpdateSourceInConnectorCardResponse.bind(this)}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}t.id===q(Z.RestAPIResponceMessage)&&this.handleRestApiResponse(t)}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}async componentDidMount(){var e;const t=null!==(e=await B("authToken"))&&void 0!==e?e:sessionStorage.getItem("authToken");this.setState({token:t}),this.handleFetchConnectorCards(t)}handleRestApiResponse(e){const t={},{title:a}=e.getData(q(Z.NavigationPropsMessage)),i=e.getData(q(Z.RestAPIResponceDataMessage)),s=null!==this.connectorCardCallId&&this.connectorCardCallId===i;"DeleteConnectorCard"===a&&(t.DeleteConnectorCard=this.handleConnectorCardDeleteResponse),"RemoveSourceFromConnectorCardData"===a&&(t.RemoveSourceFromConnectorCardData=this.handleRemoveSourceFromConnectorCard),"SourceUpdateInConnectorCard"===a&&(t.SourceUpdateInConnectorCard=this.handleUpdateSourceInConnectorCardResponse),"CreateTemplateWithDefaultNodeIDs"===a&&(t.CreateTemplateWithDefaultNodeIDs=this.handleCreateTemplateResponse),"DeleteMultipleCards"===a&&(t.DeleteMultipleCards=this.handleDeleteMultipleCardsResponse),"AddConnectorCardsFromTemplate"===a&&(t.AddConnectorCardsFromTemplate=this.handleAddConnectorCardsFromTemplateToChatbotResponse),"BotStatus"===a&&(t.BotStatus=this.handleBotStatusUpdateResponse),(s||"ConnectorCard"===a)&&(this.handleConnectorCardResponse(e),this.connectorCardCallId=null);const o=t[a];o&&o(e)}async handleConnectorCardResponse(e){var t,a;this.setState({connectorCardLoading:!1});const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.data){const e=i.data;if(Array.isArray(e)){const t=e.map(e=>xo.getNodeDataFromConnectorCardAttributes(e));this.handleSaveIntoBotContext(t);const a=xo.getContextVariableFromNodes(t);this.setState({actions:t,contextVariables:a})}}}else Pi.b.error("Failed to fetch data",{className:"error__toast"})}async handleUpdateSourceInConnectorCardResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(i)(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)&&await this.handleLogout(),this.currentSourceId="",this.currentTargetNodeId=null,this.criteriaRoutingId=void 0,this.followUpActionId=void 0;else if(Pi.b.error("Internal server error",{className:"error__toast"}),this.currentTargetNodeId){const e=this.state.actions.findIndex(e=>e.id===this.currentTargetNodeId),t=this.state.actions[e],a=t.source.filter(e=>e!==this.currentSourceId),i={...t,source:a},s=[...this.state.actions];s[e]=i,this.criteriaRoutingId&&this.handleUpdateCriteriaRouting({newActions:s,criteriaCardId:+this.currentSourceId,criteriaRoutingId:this.criteriaRoutingId,nextCardId:null}),this.followUpActionId&&this.handleUpdateOpenAI({newActions:s,openAICardId:+this.currentSourceId,followUpActionId:this.followUpActionId,redirectCardId:null}),this.currentTargetNodeId=null,this.currentSourceId="",this.criteriaRoutingId=void 0,this.followUpActionId=void 0,this.setState({actions:s})}}async handleRemoveSourceFromConnectorCard(e){var t,a;const{criteriaRoutingId:i,cardId:s,followUpActionId:o}=e.getData(q(Z.NavigationPropsMessage)),n=e.getData(q(Z.RestAPIResponceSuccessMessage));if(!n)return Pi.b.error("Internal server error",{className:"error__toast"}),void this.handleFetchConnectorCards(this.state.token);if(null===(t=n.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(n.connector_card){const e=n.connector_card.data.attributes.id,t=this.state.actions.findIndex(t=>t.id===e),a=[...this.state.actions];a[t]=xo.getNodeDataFromConnectorCardAttributes(n.connector_card.data),i&&this.handleUpdateCriteriaRouting({newActions:a,criteriaCardId:s,criteriaRoutingId:i,nextCardId:null}),o&&this.handleUpdateOpenAI({newActions:a,openAICardId:s,followUpActionId:o,redirectCardId:null}),this.setState({actions:a})}}async handleConnectorCardDeleteResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(this.setState({cardDeleteLoading:!1}),i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.message){Pi.b.success("The card successfully deleted!",{className:"success__toast"});const e=xo.getFilteredNodeData(this.currentDeletedNodeId,this.state.actions);this.currentDeletedNodeId=null,this.nodeDeleteTitle="",this.handleSaveIntoBotContext(e);const t=xo.getContextVariableFromNodes(e);this.setState({actions:e,openDeleteConfirmDialog:!1,selectedCard:null,selectedNodeData:void 0,selectedNodeId:void 0,isDrawerOpen:!1,contextVariables:t})}}else Pi.b.error("Failed to delete card!",{className:"error__toast"})}handleFetchConnectorCards(e){this.setState({connectorCardLoading:!0});const t=this.props.navigation.getParam("navigationBarTitleText"),a={"Content-Type":Bn.validationApiContentType,token:e},i=new Q(q(Z.RestAPIRequestMessage));i.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),i.addData(q(Z.RestAPIRequestMethodMessage),Bn.validationApiMethodType),i.addData(q(Z.RestAPIResponceEndPointMessage),`${Bn.connectorCardsEndPoint}?${this.props.isTemplate?"card_template_id":"chatbot_id"}=${t}`),i.addData(q(Z.NavigationPropsMessage),{title:"ConnectorCard"}),this.connectorCardCallId=i.messageId,this.send(i)}handleShowCardsDrawer(e){var t;this.criteriaRoutingId=e.criteriaRoutingId,this.followUpActionId=e.followUpActionId,this.state.isDrawerOpen?this.setState({source:e.source,selectedCard:null,selectedNodeData:void 0,selectedNodeId:void 0}):(this.sidebarTop=null===(t=this.headerRef.current)||void 0===t?void 0:t.offsetHeight,this.setState({isDrawerOpen:!0,source:e.source}))}handleCardNodeClick(e){var t;this.sidebarTop=null===(t=this.headerRef.current)||void 0===t?void 0:t.offsetHeight,this.state.selectedNodeId===e.id&&this.state.selectedCard===e.type||this.setState({isDrawerOpen:!0,selectedNodeData:{[e.id]:e},selectedNodeId:e.id,selectedCard:e.type,source:e.source})}async handleLogout(){await T("authToken"),await T("userId"),sessionStorage.clear();const e=new Q(q(Z.NavigationSignupLoginMessage));e.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),this.send(e)}}class kn extends K{constructor(e){super(e),this.perPage=15,this.constVal={share_user_guide:{title:"Share user guide",namePlaceholder:"Send user guide card",selectLabel:"User guide*",selectPlaceholder:"Select user guide",selectedText:"Selected user guide",createNewText:"Create new user guide",message:Z.NavigationUserGuideMessage},embed_form:{title:"Embed form",namePlaceholder:"Add Embed form",selectLabel:"Embed form*",selectPlaceholder:"Select embed form",selectedText:"Selected embed form",createNewText:"Create new embed form",message:Z.NavigationAutomaticFormCreationMessage}},this.handleCreateUserGuideNavigation=()=>{const e=this.props.navigation.getParam("navigationBarTitleText");sessionStorage.setItem("redirectTo","bot"),sessionStorage.setItem("botId",""+e);const t=new Q(q(this.constVal[this.props.type].message));t.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),z.sendMessage(t.id,t)},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.RestAPIResponceMessage)],this.state={options:[],cardLoading:!0},z.attachBuildingBlock(this,this.subScribedMessages),this.handleRestApiResponse=this.handleRestApiResponse.bind(this),this.handleGetAllFormsResponse=this.handleGetAllFormsResponse.bind(this),this.handleGetAllUserGuidesResponse=this.handleGetAllUserGuidesResponse.bind(this)}async receive(e,t){t.id===q(Z.RestAPIResponceMessage)&&this.handleRestApiResponse(t)}async componentDidMount(){"share_user_guide"===this.props.type&&this.handleFetchUserGuidesOrForms({endPoint:""+Bn.userGuideEndPoint,title:"UserGuide"}),"embed_form"===this.props.type&&this.handleFetchUserGuidesOrForms({endPoint:""+Bn.formsEndPoint,title:"Forms"})}handleRestApiResponse(e){const t={},{title:a}=e.getData(q(Z.NavigationPropsMessage));"Forms"===a&&(t.Forms=this.handleGetAllFormsResponse),"UserGuide"===a&&(t.UserGuide=this.handleGetAllUserGuidesResponse);const i=t[a];i&&i(e)}async handleGetAllFormsResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(this.setState({cardLoading:!1}),i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.props.handleLogout();else if(Array.isArray(i)){const e=i.map(e=>({label:e.form_name,value:""+e.id}));this.setState({options:e})}}else Pi.b.error("Failed to fetch forms",{className:"error__toast"})}async handleGetAllUserGuidesResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(this.setState({cardLoading:!1}),i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.props.handleLogout();else if(Array.isArray(i)){const e=i.map(e=>({label:e.title,value:""+e.id}));this.setState({options:e})}}else Pi.b.error("Failed to fetch user guides",{className:"error__toast"})}handleFetchUserGuidesOrForms(e){let{endPoint:t,title:a}=e;const i={"Content-Type":Bn.validationApiContentType,token:this.props.token},s=new Q(q(Z.RestAPIRequestMessage));s.addData(q(Z.RestAPIRequestHeaderMessage),i),s.addData(q(Z.RestAPIRequestMethodMessage),Bn.validationApiMethodType),s.addData(q(Z.RestAPIResponceEndPointMessage),t),s.addData(q(Z.NavigationPropsMessage),{title:a}),this.send(s)}}const Nn=gs.d().shape({name:gs.f().trim().required("Please add a name"),message:gs.f().trim().required("Please add a message"),selectedOptions:gs.a().of(gs.f()).required("Please select user guide").min(1,"Please select atleast one user guide")}),On=gs.d().shape({message:gs.f().trim().required("Please add a message"),name:gs.f().trim().required("Please add a name"),selectedOptions:gs.a().of(gs.f()).required("Please select embed form").min(1,"Please select atleast one embed form")}),{MuiFormLabelRootStyle:Ln,MuiTypographyStyle:Hn,MuiOutlinedInputStyle:_n,MuiInputBaseRootStyle:Vn}=ka,Un=Object(De.a)({typography:Hn,overrides:{MuiFormLabel:{root:Ln},MuiOutlinedInput:_n,MuiInputBase:Vn,MuiIconButton:{root:{padding:0,"&:hover":{backgroundColor:"#E5E9FF"}}}}}),Wn=Object(Ta.a)("div")({position:"absolute",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#FFFFFF",zIndex:3}),jn=Object(Ta.a)("div")({display:"flex",gap:8,flexWrap:"wrap"}),zn=Object(Ta.a)("div")({padding:"4px 8px",backgroundColor:"#E5E9FF",display:"flex",gap:4,borderRadius:26,width:"max-content"}),Qn=Object(Ta.a)("div")({width:440,display:"flex",flexDirection:"column",height:"100%",backgroundColor:"#fff",scrollbarWidth:"none",overflowY:"auto","&::-webkit-scrollbar":{width:0}}),Gn=Object(Ta.a)("div")({backgroundColor:"#FFFFFF",padding:"0px 48px 24px",display:"flex",gap:12,flexDirection:"column",flexGrow:1}),qn=Object(Ta.a)("div")({display:"flex",gap:4,flexDirection:"column","&. gap-8":{gap:8}}),Zn=Object(Ta.a)("div")({display:"flex",gap:4,justifyContent:"space-between","&.error":{color:"#D97706"}}),Jn=Object(Ta.a)("button")({all:"unset",display:"flex",alignItems:"center",gap:8,cursor:"pointer",lineHeight:"24px",fontFamily:"Cairo",fontSize:16,fontWeight:700,color:"#64748B",'&[aria-disabled="true"]':{color:"#94A3B8",pointerEvents:"none"}});class Yn extends kn{constructor(e){super(e),this.hasError=(e,t)=>!!e&&!!t,this.selectedOptionsWithLabel=e=>{const t=new Set(e);return this.state.options.filter(e=>t.has(e.value))}}render(){var e,t,a;const i=this.constVal[this.props.type];return s.a.createElement(Be.a,{theme:Un},this.state.cardLoading&&s.a.createElement(Wn,null,s.a.createElement(Kt.a,{style:{height:40,width:40,color:"#51ABB3"}})),s.a.createElement(us.a,{initialValues:{name:null!==(e=this.props.title)&&void 0!==e?e:"",message:null!==(t=this.props.message)&&void 0!==t?t:"",selectedOptions:null!==(a=this.props.selectedOptions)&&void 0!==a?a:[]},onSubmit:e=>this.props.onSave({id:this.props.id,type:this.props.type,...e}),validationSchema:"share_user_guide"===this.props.type?Nn:On},e=>{let{getFieldProps:t,errors:a,touched:o,values:n,handleSubmit:r,setFieldValue:l}=e;return s.a.createElement(Qn,null,s.a.createElement(Va,{id:this.props.id,"data-testid":"cardHeader",onClose:this.props.onClose,title:i.title}),s.a.createElement(Gn,null,s.a.createElement(qn,null,s.a.createElement(Pe.a,{htmlFor:"name"},"Name*"),s.a.createElement(Ba.a,{inputProps:{...t("name"),maxLength:50},placeholder:i.namePlaceholder,error:this.hasError(a.name,o.name),fullWidth:!0,id:"name",name:"name"}),s.a.createElement(Zn,null,this.hasError(a.name,o.name)&&s.a.createElement(Ie.a,{className:"error",variant:"subtitle2"},a.name),s.a.createElement(Ie.a,{variant:"subtitle2",className:"ml-auto"},n.name.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{getFieldProps:t,hasMessageError:this.hasError(a.message,o.message),messageErrorText:a.message,value:n.message,botContext:this.props.botContext,setFieldValue:l}),s.a.createElement(qn,{className:"gap-8"},s.a.createElement(Pe.a,{id:"multi-select-option"},i.selectLabel),s.a.createElement(ii,{selectBoxWidth:344,labelId:"multi-select-option",id:"multi-select-popover",placeholder:i.selectPlaceholder,value:n.selectedOptions,options:this.state.options,onChange:e=>l("selectedOptions",e),disabled:0===this.state.options.length,error:this.hasError(a.selectedOptions,o.selectedOptions),hasSearch:!0,searchPlaceholder:"Search..."}),this.hasError(a.selectedOptions,o.selectedOptions)&&s.a.createElement(Ie.a,{className:"error",variant:"subtitle2"},a.selectedOptions)),n.selectedOptions.length>0&&s.a.createElement(qn,{"data-testid":"selected-options",className:"gap-8"},s.a.createElement(Ie.a,{variant:"body2"},`${i.selectedText} (${n.selectedOptions.length})`),s.a.createElement(jn,null,this.selectedOptionsWithLabel(n.selectedOptions).map(e=>s.a.createElement(zn,{key:e.value},s.a.createElement(Ie.a,{"data-testid":e.label,component:"span",variant:"body2",className:"primary"},e.label),s.a.createElement(Fe.a,{onClick:()=>{const t=n.selectedOptions.filter(t=>t!==e.value);l("selectedOptions",t)},"aria-label":"remove "+e.label,"data-testid":"remove "+e.label},s.a.createElement(Ki.a,{htmlColor:"#51ABB3",style:{height:16,width:16}})))))),s.a.createElement(Jn,{id:"create",onClick:this.handleCreateUserGuideNavigation},s.a.createElement(Ja.a,{htmlColor:"#64748B",style:{height:20,width:20}}),i.createNewText)),s.a.createElement(Qa,{onClose:this.props.onDrawerClose,onSaveClick:()=>r(),loading:this.props.onSaveLoading}))}))}}var Kn=a(1763);const Xn=Object(Yt.a)({errorContainer:{borderLeft:"4px solid #F59E0B",padding:"8px 8px 8px 16px",backgroundColor:"#FEF3C7",display:"flex",gap:8,alignItems:"center",borderRadius:4},closeButton:{all:"unset",cursor:"pointer",marginLeft:"auto"},errorText:{color:"#F59E0B",margin:0,fontFamily:"Cairo",fontSize:12,lineHeight:"18px",fontWeight:400}});function $n(e){let{error:t,handleCloseError:a,errorTextClassName:i=""}=e;const o=Xn();return s.a.createElement("div",{className:o.errorContainer},s.a.createElement(jo.a,{htmlColor:"#F59E0B"}),s.a.createElement("p",{className:`${o.errorText} ${i}`},t),s.a.createElement("button",{"aria-label":"Close "+t,className:o.closeButton,onClick:a},s.a.createElement(zo.a,{htmlColor:"#F59E0B"})))}const er=Object(Yt.a)({categoryTemplatePaper:{backgroundColor:"#FFFFFF",borderRadius:"24px !important",boxShadow:"0px 8px 32px 0px rgba(0, 0, 0, 0.06),0px 4px 8px 0px rgba(0, 0, 0, 0.03), 0px 25px 50px 0px rgba(0, 0, 0, 0.09) !important",maxWidth:669,width:669,maxHeight:563,scrollbarWidth:"none",padding:0,margin:0,"&::-webkit-scrollbar":{width:0}},backdropProps:{backgroundColor:"rgba(15, 23, 42, 0.4)"},header:{padding:"24px 40px",position:"sticky",top:0,zIndex:2,backgroundColor:"#FFFFFF",display:"flex",justifyContent:"space-between",gap:10,alignItems:"center",borderBottom:"1px solid #CBD5E1",width:"100%",boxSizing:"border-box","& > h3":{margin:0,fontFamily:"Cairo",fontWeight:700,fontSize:24,lineHeight:"32px",color:"#0F172A"},"& > button":{all:"unset",cursor:"pointer"}},footer:{borderTop:"1px solid #CBD5E1",position:"sticky",bottom:0,zIndex:2,padding:"24px 40px",backgroundColor:"#FFFFFF",display:"flex",gap:10,justifyContent:"flex-end",width:"100%",boxSizing:"border-box"},footerBtn:{all:"unset",cursor:"pointer",width:105,textAlign:"center",padding:16,borderRadius:8,fontFamily:"Cairo",fontWeight:700,fontSize:16,lineHeight:"24px",color:"#51ABB3",backgroundColor:"#E5F6FF","&.primary":{backgroundColor:"#51ABB3",color:"#FFFFFF"},'&[aria-disabled="true"]':{pointerEvents:"none"}},dialogBody:{padding:"24px 40px",height:379,display:"flex",flexDirection:"column",gap:12,width:"100%",boxSizing:"border-box"},label:{fontFamily:"Cairo",fontWeight:700,fontSize:14,lineHeight:"22px",color:"#475569"},input:{boxSizing:"border-box",padding:"16px 8px",border:"1px solid #CBD5E1",borderRadius:8,fontFamily:"Inter",fontWeight:400,fontSize:16,lineHeight:"24px",color:"#64748B","&:focus":{outline:0,borderColor:"#51ABB3"},"&:placeholder":{opacity:.7},'&[aria-invalid="true"]':{borderColor:"#F59E0B"}},error:{color:"#D97706",fontSize:14,lineHeight:"18px",fontWeight:400,margin:0}}),tr={category:{button:"Create",error:"Please enter a category name",title:"Create new Category"},template:{button:"Go to",error:"Please enter a template name",title:"Create new Template"}},ar={template:{title:"Edit Template",button:"Save",error:"Please enter a template name"},category:{button:"Save",title:"Edit Category",error:"Please enter a category name"}};function ir(e){let{type:t,open:a,handleClose:o,isEdit:n=!1,onSubmit:r,initialName:l="",isCreateOrUpdateLoading:d}=e;const c=er(),[h,p]=Object(i.useState)(l),[g,u]=Object(i.useState)(!1),m=n?ar[t]:tr[t];Object(i.useEffect)(()=>{a||p("")},[a]);return s.a.createElement(Ji.a,{open:a,PaperProps:{className:c.categoryTemplatePaper},BackdropProps:{className:c.backdropProps},disableEnforceFocus:!0,onClose:o},s.a.createElement("div",{className:c.header},s.a.createElement("h3",null,m.title),s.a.createElement("button",{onClick:o},s.a.createElement(Ki.a,{htmlColor:"#334155"}))),s.a.createElement("div",{className:c.dialogBody},s.a.createElement("label",{className:c.label},"Name*"),s.a.createElement("input",{autoFocus:!0,type:"text",placeholder:"Type the name here",className:c.input,value:h,onChange:e=>{const{value:t}=e.target,a=0===t.trim().length;p(e.target.value),u(a)},"aria-invalid":g,"data-testid":"name-input"}),g&&s.a.createElement("p",{"data-testid":"error",className:c.error},m.error)),s.a.createElement("div",{className:c.footer},s.a.createElement("button",{"data-testid":"cancel-btn",className:c.footerBtn,onClick:o},"Cancel"),s.a.createElement("button",{"aria-disabled":d,"data-testid":"createOrSaveBtn",className:c.footerBtn+" primary",onClick:()=>{if(0===h.trim().length)return Pi.b.error(m.error,{className:"error__toast"}),void u(!0);r(h)}},d?s.a.createElement(Kt.a,{"data-testid":"loader",style:{height:24,width:24,color:"#FFFFFF"}}):m.button)))}var sr=a(1758),or=a(1759);const nr={MuiPopover:{paper:{minWidth:0,maxWidth:"108px",width:108,border:"1px solid #E2E8F0",padding:4,boxSizing:"border-box",display:"flex",flexDirection:"column",gap:2,backgroundColor:"#FFFFFF","& > button":{all:"unset",cursor:"pointer",display:"flex",gap:8,alignItems:"center",padding:"9px 16px",fontFamily:"Cairo",fontWeight:400,fontSize:14,lineHeight:"22px",color:"#0F172A",'&:hover, &[data-active="true"]':{backgroundColor:"#F1F5F9",borderRadius:8}}}},MuiPaper:{elevation8:{boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008"},rounded:{borderRadius:8}}},rr=Object(Yt.a)({card:{display:"flex",flexDirection:"column",gap:6,width:100,backgroundColor:"#FFFFFF",cursor:"pointer","& > p":{margin:"0px 6px",fontFamily:"Cairo",fontWeight:600,fontSize:14,lineHeight:"18px",color:"#0F172A",textAlign:"center"}},templateBox:{position:"relative",width:100,height:100,boxShadow:"0px 2px 8px 0px #00000014",display:"grid",placeItems:"center",border:"1px solid #CBD5E1",borderRadius:12},verticalIconButton:{all:"unset",cursor:"pointer",position:"absolute",zIndex:2,top:4,right:4,height:32,width:32,borderRadius:24,padding:4,boxSizing:"border-box",color:"#475569",'&[aria-haspopup="true"]':{backgroundColor:"#0F172A8C",color:"#FFFFFF"}},moveToCardContainer:{position:"fixed",zIndex:-1,backgroundColor:"#FFFFFF",padding:4,border:"1px solid #E2E8F0",boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008",display:"flex",flexDirection:"column",opacity:0,gap:2,maxWidth:200,boxSizing:"border-box",borderRadius:8,"& > button":{all:"unset",display:"flex",alignItems:"center",cursor:"pointer",gap:8,padding:"7px 8px",fontFamily:"Cairo",fontSize:14,lineHeight:"22px",color:"#0F172A",fontWeight:400,"&:hover":{borderRadius:8,backgroundColor:"#F1F5F9"}},'&[data-show="true"]':{opacity:1,zIndex:2e3}}}),lr=Object(De.a)({overrides:{MuiPopover:nr.MuiPopover,MuiPaper:nr.MuiPaper}});function dr(e){let{id:t,name:a,onDeleteTemplate:o,onEditTemplate:n,categories:r,onTemplateMoveToAnotherCategory:l,nodes:d,handleAddConnectorCardsFromTemplateToChatbot:c}=e;const[h,p]=Object(i.useState)(null),g=rr(),u=Object(i.useRef)(null),[m,C]=Object(i.useState)(!1),b=Object(i.useRef)(null),[A,f]=Object(i.useState)({top:void 0,left:void 0}),x=()=>{p(null),C(!1)};return s.a.createElement(Be.a,{theme:lr},s.a.createElement("div",{className:g.card,onClick:()=>{const e=new Map;d.forEach(t=>{t.source.forEach(a=>{e.has(a)||e.set(a,[]),e.get(a).push(t)})});const t=function(e,t){const a=[],i=new Set;return e.forEach(e=>{if(!i.has(e.id)){const s=function(e,t,a){const i=[e];let s=[e];for(a.add(e.id);s.length>0;){const e=s.shift().id;t.has(e)&&t.get(e).forEach(e=>{a.has(e.id)||(i.push(e),s.push(e),a.add(e.id))})}return i}(e,t,i).filter(e=>"start"!==e.id).map(e=>+e.id);a.push(...s)}}),a}([{id:"start",source:[]},...d],e);c(t)}},s.a.createElement("div",{className:g.templateBox},s.a.createElement("button",{"aria-controls":"template-"+t,"aria-haspopup":Boolean(h),"aria-label":`show ${a} action list`,"data-testid":"show "+a,onClick:e=>{e.stopPropagation(),p(e.currentTarget)},className:g.verticalIconButton},s.a.createElement(sr.a,{htmlColor:"currentColor"})),s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 3H14.82C14.4 1.84 13.3 1 12 1C10.7 1 9.6 1.84 9.18 3H5C3.9 3 3 3.9 3 5V21C3 22.1 3.9 23 5 23H19C20.1 23 21 22.1 21 21V5C21 3.9 20.1 3 19 3ZM12 3C12.55 3 13 3.45 13 4C13 4.55 12.55 5 12 5C11.45 5 11 4.55 11 4C11 3.45 11.45 3 12 3ZM5 20C5 20.55 5.45 21 6 21H18C18.55 21 19 20.55 19 20V6C19 5.45 18.55 5 18 5H17V6C17 7.1 16.1 8 15 8H9C7.9 8 7 7.1 7 6V5H6C5.45 5 5 5.45 5 6V20Z",fill:"#475569"}))),s.a.createElement("p",null,a)),s.a.createElement(Mt.a,{open:Boolean(h),id:"template-"+t,anchorEl:h,onClose:x,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},"data-testid":a+" popover"},s.a.createElement("button",{"data-testid":"edit "+a,onClick:e=>{e.stopPropagation(),n(t),x()}},s.a.createElement(or.a,{htmlColor:"#0F172A"}),"Edit"),s.a.createElement("button",{onClick:()=>{o(t),x()},"data-testid":"delete "+a},s.a.createElement(Za.a,{htmlColor:"#0F172A"}),"Delete"),s.a.createElement("button",{"data-testid":`move ${a} to category`,"data-active":m,ref:u,onClick:e=>{var t,a,i,s;e.stopPropagation();const o=null===(t=(a=u.current).getBoundingClientRect)||void 0===t?void 0:t.call(a),n=o.right,r=o.top,l=null!==(i=null===(s=b.current)||void 0===s?void 0:s.offsetHeight)&&void 0!==i?i:0,d=window.innerHeight-r>l+30?r:r-l+42,c=window.innerWidth-n>200?n+7:n-212;C(!0),f({top:d,left:c})}},s.a.createElement(cs.a,{htmlColor:"#0F172A"}),"Move"),s.a.createElement("div",{ref:b,"data-testid":"move to categories list",className:g.moveToCardContainer,"data-show":m,style:{...A}},r.map(e=>s.a.createElement("button",{key:e.id,"data-testid":"move to "+e.name,onClick:i=>{i.stopPropagation();l({template:{id:t,name:a,nodes:d},toCategory:e})}},e.name)))))}var cr=a(1761),hr=a(1762);const pr=Object(Yt.a)({accordianContainer:{borderTop:"1px solid #CBD5E1"},accordianSummary:{padding:"24px 48px",display:"flex",gap:4,alignItems:"center",cursor:"pointer","& > button":{all:"unset",cursor:"pointer",width:32,height:32,padding:4,borderRadius:24,color:"#475569",boxSizing:"border-box",'&[aria-haspopup="true"]':{color:"#FFFFFF",backgroundColor:"#0F172A8C"}},"& > .icon":{display:"inline-block",marginLeft:"auto"},"& > .catgory-title":{fontFamily:"Cairo",fontWeight:400,fontSize:16,lineHeight:"28px",color:"#0F172A",margin:0}},accordianDetails:{display:"none",flexWrap:"wrap",gap:"24px 17px",padding:"0px 48px 24px",minHeight:148,boxSizing:"border-box",'&[aria-expanded="true"]':{display:"flex"}}}),gr=Object(De.a)({overrides:{MuiPopover:nr.MuiPopover,MuiPaper:nr.MuiPaper}});function ur(e){let{id:t,name:a,templates:o,onEditCategory:n,onDeleteCategory:r,onDeleteTemplate:l,onEditTemplate:d,categories:c,onMoveTemplateFromCategory:h,handleAddConnectorCardsFromTemplateToChatbot:p}=e;const[g,u]=Object(i.useState)(null),[m,C]=Object(i.useState)(!1),b=pr(),A=()=>{u(null)},f=e=>{l(e,t)},x=e=>{h({...e,fromCategory:{id:t,name:a,templates:o}})},E=Boolean(g),v=c.filter(e=>e.id!==t);return s.a.createElement(Be.a,{theme:gr},s.a.createElement("div",{className:b.accordianContainer},s.a.createElement("div",{className:b.accordianSummary,"data-testid":a+" accordian summary",onClick:()=>C(!m)},s.a.createElement("button",{"aria-controls":"category-"+t,"aria-haspopup":E,"aria-label":`show ${a} action list`,onClick:e=>{u(e.currentTarget)},"data-testid":"show "+a},s.a.createElement(sr.a,{htmlColor:"currentColor"})),s.a.createElement("span",{className:"catgory-title"},a),s.a.createElement("span",{className:"icon"},m?s.a.createElement(cr.a,{htmlColor:"#64748B"}):s.a.createElement(hr.a,{htmlColor:"#64748B"}))),(null===o||void 0===o?void 0:o.length)>0&&s.a.createElement("div",{"data-testid":a+" accordian detail",className:b.accordianDetails,"aria-expanded":m},o.map(e=>s.a.createElement(dr,Object.assign({key:e.id},e,{onEditTemplate:d,onDeleteTemplate:f,categories:v,"data-testid":"Template "+e.id,handleAddConnectorCardsFromTemplateToChatbot:p,onTemplateMoveToAnotherCategory:x}))))),s.a.createElement(Mt.a,{open:E,id:"category-"+t,onClose:A,anchorEl:g,anchorOrigin:{horizontal:"left",vertical:"bottom"},transformOrigin:{horizontal:"left",vertical:"top"},PaperProps:{style:{maxWidth:212,width:212}},"data-testid":a+" popover"},s.a.createElement("button",{onClick:()=>{n({id:t,name:a}),A()},"data-testid":"edit "+a},s.a.createElement(or.a,{htmlColor:"#0F172A"}),"Edit category"),s.a.createElement("button",{"data-testid":"delete "+a,onClick:()=>{r(t),A()}},s.a.createElement(Za.a,{htmlColor:"#0F172A"}),"Delete category")))}const mr=a(1380);class Cr extends K{constructor(e){super(e),this.getProjectApiCallId="",this.selectedCategoryName="",this.selectedCategoryId=null,this.selectedTemplateId=null,this.createCategoryCallId=null,this.createTemplateCallId=null,this.allCategoriesCallId=null,this.allTemplatesCallId=null,this.editCategoryCallId=null,this.deleteCategoryCallId=null,this.deleteTemplateCallId=null,this.selectedCategory=void 0,this.selectedCategoryIndex=null,this.templatesInDeletedCategory=[],this.deletedTemplate=void 0,this.deletedTemplateIndex=null,this.categoryOfDeletedTemplate=void 0,this.categoryIndexOfDeletedTemplate=null,this.currentMovedTemplate=void 0,this.currentMovedTemplateIndex=-1,this.templateMovedFromCategory=void 0,this.templateMovedToCategory=void 0,this.isTemplateBeingMoved=!1,this.handleCreateCategoryResponse=async e=>{var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(this.setState({isCreateTemplateOrCategoryLoading:!1}),i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.data){const{attributes:e}=i.data,t={id:e.id,name:e.name,templates:e.template_categories};this.setState({categories:[...this.state.categories,t],isCategoryModalOpen:!1})}}else Pi.b.error("Failed to create category!",{className:"error__toast"})},this.handleCreateTemplateResponse=async e=>{var t,a,i;this.setState({isCreateTemplateOrCategoryLoading:!1});const s=e.getData(q(Z.RestAPIResponceSuccessMessage));if(s)if("Card templates cannot exceed 12 card templates"!==(null===(t=s.errors)||void 0===t?void 0:t[0])){if(null===(a=s.errors)||void 0===a||null===(i=a[0])||void 0===i?void 0:i.token)await this.handleLogout();else if(s.data){const e=new Q(q(Z.NavigationProjectTemplatesEditMessage));e.addData(q(Z.NavigationPropsMessage),this.props),e.addData(q(Z.NavigationScreenNameMessage),s.data.id),this.send(e)}}else Pi.b.error("You already added the maximum number of templates",{className:"error__toast"});else Pi.b.error("Failed to create template!",{className:"error__toast"})},this.handleEditCategoryResponse=async e=>{var t,a;this.setState({isCreateTemplateOrCategoryLoading:!1});const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(!i){if(Pi.b.error("Failed to update category!",{className:"error__toast"}),!this.isTemplateBeingMoved)return;let e=[...this.state.categories],t=[...this.state.templates];if(-1!==this.currentMovedTemplateIndex&&this.currentMovedTemplate&&t.splice(this.currentMovedTemplateIndex,0,this.currentMovedTemplate),this.templateMovedFromCategory){const t=e.findIndex(e=>{var t;return e.id===(null===(t=this.templateMovedFromCategory)||void 0===t?void 0:t.id)});e[t]=this.templateMovedFromCategory}if(this.templateMovedToCategory){const t=e.findIndex(e=>{var t;return e.id===(null===(t=this.templateMovedToCategory)||void 0===t?void 0:t.id)});e[t]=this.templateMovedToCategory}return this.setState({templates:t,categories:e}),this.currentMovedTemplateIndex=-1,this.currentMovedTemplate=void 0,this.templateMovedFromCategory=void 0,void(this.templateMovedToCategory=void 0)}if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.message){const{attributes:e}=i.category.data,t=e.template_categories.map(e=>({id:e.data.attributes.id,name:e.data.attributes.name})),a={id:e.id,name:e.name,templates:t},s=this.state.categories.findIndex(e=>e.id===a.id),o=[...this.state.categories];o[s]=a,this.selectedCategoryId=null,this.selectedCategoryName="",this.currentMovedTemplate=void 0,this.currentMovedTemplateIndex=-1,this.templateMovedToCategory=void 0,this.templateMovedFromCategory=void 0,this.setState({categories:o,isCategoryModalOpen:!1})}},this.handleDeleteTemplateResponse=async e=>{var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(i)(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)&&await this.handleLogout(),i.message&&(this.deletedTemplate=void 0,this.deletedTemplateIndex=null,this.categoryIndexOfDeletedTemplate=null,this.categoryOfDeletedTemplate=void 0);else{if(Pi.b.error("Failed to delete template!",{className:"error__toast"}),this.deletedTemplate&&null!==this.deletedTemplateIndex){const e=[...this.state.templates];return e.splice(this.deletedTemplateIndex,0,this.deletedTemplate),this.deletedTemplate=void 0,this.deletedTemplateIndex=null,void this.setState({templates:e})}if(null!==this.categoryIndexOfDeletedTemplate&&this.categoryOfDeletedTemplate){const e=[...this.state.categories];e[this.categoryIndexOfDeletedTemplate]=this.categoryOfDeletedTemplate,this.categoryIndexOfDeletedTemplate=null,this.categoryOfDeletedTemplate=void 0,this.setState({categories:e})}}},this.getAllCategoriesOrTemplates=async(e,t)=>{const a={token:e,"Content-Type":mr.validationApiContentType},i=new Q(q(Z.RestAPIRequestMessage));i.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),i.addData(q(Z.RestAPIRequestMethodMessage),"GET"),i.addData(q(Z.RestAPIResponceEndPointMessage),t?mr.allTemplatesEndpoint:mr.allCategoriesEndpoint),t?this.allTemplatesCallId=i.messageId:this.allCategoriesCallId=i.messageId,this.send(i)},this.handleToggleTemplatePopup=()=>{this.state.categories.reduce((e,t)=>e+t.templates.length,this.state.templates.length)>12?this.setState({showMaxTemplateError:!0,isCreateTemplateButtonDisabled:!0}):this.setState({isTemplateModalOpen:!this.state.isTemplateModalOpen})},this.handleCloseMaxTemplateError=()=>{this.setState({showMaxTemplateError:!1})},this.handleToggleCategoryPopup=()=>{this.categoryEditName="",this.setState({isCategoryModalOpen:!this.state.isCategoryModalOpen})},this.handleCreateTemplateOrCategoryRequest=(e,t)=>{this.setState({isCreateTemplateOrCategoryLoading:!0});const a={token:this.state.token,"Content-Type":"application/json"};let i={card_template:{name:e}},s=mr.createTemplateEndpoint;const o=new Q(q(Z.RestAPIRequestMessage));t?(i={category:{name:e}},s=mr.createCategoryEndpoint,this.createCategoryCallId=o.messageId):this.createTemplateCallId=o.messageId,o.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),o.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(i)),o.addData(q(Z.RestAPIRequestMethodMessage),"POST"),o.addData(q(Z.RestAPIResponceEndPointMessage),s),this.send(o)},this.handleEditCategoryRequest=e=>{this.setState({isCreateTemplateOrCategoryLoading:!0});const t={token:this.state.token,"Content-Type":"application/json"};let a=`${mr.createCategoryEndpoint}/${this.selectedCategoryId}`;const i=new Q(q(Z.RestAPIRequestMessage));this.editCategoryCallId=i.messageId,i.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(e)),i.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),i.addData(q(Z.RestAPIResponceEndPointMessage),a),i.addData(q(Z.RestAPIRequestMethodMessage),"PUT"),this.send(i)},this.handleTemplateSubmit=e=>{this.handleCreateTemplateOrCategoryRequest(e)},this.handleCategorySubmit=e=>{if(this.selectedCategoryId){const t={category:{name:e}};this.handleEditCategoryRequest(t)}else this.handleCreateTemplateOrCategoryRequest(e,!0)},this.handleEditCategory=e=>{this.selectedCategoryName=e.name,this.selectedCategoryId=e.id,this.setState({isCategoryModalOpen:!0})},this.handleDeleteCategoryOrTemplateRequest=e=>{const t={"Content-Type":"application/json",token:this.state.token};let a=`${mr.allTemplatesEndpoint}/${this.selectedTemplateId}`;const i=new Q(q(Z.RestAPIRequestMessage));e?(a=`${mr.allCategoriesEndpoint}/${this.selectedCategoryId}`,this.deleteCategoryCallId=i.messageId):this.deleteTemplateCallId=i.messageId,i.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),i.addData(q(Z.RestAPIResponceEndPointMessage),a),i.addData(q(Z.RestAPIRequestMethodMessage),"DELETE"),this.send(i)},this.handleDeleteCategory=e=>{this.selectedCategoryId=e;const t=this.state.categories.findIndex(t=>t.id===e);this.selectedCategory=this.state.categories[t],this.selectedCategoryIndex=t,this.templatesInDeletedCategory=this.state.categories[t].templates;const a=[...this.state.templates,...this.templatesInDeletedCategory],i=this.state.categories.filter(t=>t.id!==e);this.setState({categories:i,templates:a}),this.handleDeleteCategoryOrTemplateRequest(!0)},this.handleEditTemplate=e=>{const t=new Q(q(Z.NavigationProjectTemplatesEditMessage));t.addData(q(Z.NavigationPropsMessage),this.props),t.addData(q(Z.NavigationScreenNameMessage),""+e),this.send(t)},this.handleDeleteTemplate=(e,t)=>{if(this.selectedTemplateId=e,!t){this.deletedTemplateIndex=this.state.templates.findIndex(t=>t.id===e),this.deletedTemplate=this.state.templates[this.deletedTemplateIndex];const t=this.state.templates.filter(t=>t.id!==e);return this.setState({templates:t}),void this.handleDeleteCategoryOrTemplateRequest(!1)}this.deletedTemplate=void 0,this.deletedTemplateIndex=void 0;const a=this.state.categories.reduce((a,i,s)=>{if(i.id!==t)return a.push(i),a;this.categoryOfDeletedTemplate=i,this.categoryIndexOfDeletedTemplate=s;const o=i.templates.filter(t=>t.id!==e);return a.push({...i,templates:o}),a},[]);this.setState({categories:a}),this.handleDeleteCategoryOrTemplateRequest(!1)},this.handleMoveTemplateFromCategoryToAnotherCategory=e=>{const{template:t,fromCategory:a,toCategory:i}=e;this.isTemplateBeingMoved=!0,this.currentMovedTemplateIndex=this.state.templates.findIndex(e=>e.id===t.id);let s=[...this.state.categories],o=[...this.state.templates];const n=[...i.templates.map(e=>e.id),t.id];this.templateMovedFromCategory=a,this.templateMovedToCategory=i,this.currentMovedTemplate=t,-1!==this.currentMovedTemplateIndex&&(o=o.filter(e=>e.id!==t.id)),a&&(s=s.map(e=>e.id===a.id?{...e,templates:e.templates.filter(e=>e.id!==t.id)}:e)),s=s.map(e=>e.id===i.id?{...e,templates:[...e.templates,t]}:e),this.setState({templates:o,categories:s}),this.selectedCategoryId=i.id;const r={category:{template_categories:n}};this.handleEditCategoryRequest(r)},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess),q(Z.SessionResponseMessage),q(Z.RestAPIResponceMessage)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1,showLoader:!1,productList:[],isCategoryModalOpen:!1,isTemplateModalOpen:!1,showMaxTemplateError:!1,templates:[],categories:[],isCreateTemplateButtonDisabled:!1,token:"",isCreateTemplateOrCategoryLoading:!1,showCategoriesLoading:!0},z.attachBuildingBlock(this,this.subScribedMessages),this.handleLogout=this.handleLogout.bind(this),this.handleRestApiResponse=this.handleRestApiResponse.bind(this),this.handleAllCategoriesResponse=this.handleAllCategoriesResponse.bind(this),this.handleAllTemplatesResponse=this.handleAllTemplatesResponse.bind(this),this.handleDeleteCategoryResponse=this.handleDeleteCategoryResponse.bind(this)}async receive(e,t){z.debugLog("Message Recived",t),q(Z.RestAPIResponceMessage)===t.id&&this.handleRestApiResponse(t)}async componentDidMount(){var e;const t=null!==(e=await B("authToken"))&&void 0!==e?e:sessionStorage.getItem("authToken");this.setState({token:t}),this.getAllCategoriesOrTemplates(t,!1),this.getAllCategoriesOrTemplates(t,!0)}async handleRestApiResponse(e){const t={},a=e.getData(q(Z.RestAPIResponceDataMessage));null!==this.allCategoriesCallId&&this.allCategoriesCallId===a&&(t[this.allCategoriesCallId]=this.handleAllCategoriesResponse),null!==this.allTemplatesCallId&&this.allTemplatesCallId===a&&(t[this.allTemplatesCallId]=this.handleAllTemplatesResponse),null!==this.createCategoryCallId&&this.createCategoryCallId===a&&(t[this.createCategoryCallId]=this.handleCreateCategoryResponse),null!==this.createTemplateCallId&&this.createTemplateCallId===a&&(t[this.createTemplateCallId]=this.handleCreateTemplateResponse),null!==this.editCategoryCallId&&this.editCategoryCallId===a&&(t[this.editCategoryCallId]=this.handleEditCategoryResponse),null!==this.deleteCategoryCallId&&this.deleteCategoryCallId===a&&(t[this.deleteCategoryCallId]=this.handleDeleteCategoryResponse),null!==this.deleteTemplateCallId&&this.deleteTemplateCallId===a&&(t[this.deleteTemplateCallId]=this.handleDeleteTemplateResponse);const i=t[a];i&&i(e)}async handleDeleteCategoryResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(i)(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)&&await this.handleLogout(),i.message&&(this.selectedCategory=void 0,this.selectedCategoryIndex=null,this.selectedCategoryId=null);else if(Pi.b.error("Failed to delete category!",{className:"error__toast"}),this.selectedCategory&&null!==this.selectedCategoryIndex){const e=this.templatesInDeletedCategory.map(e=>e.id),t=this.state.templates.filter(t=>!e.includes(t.id)),a=[...this.state.categories];a.splice(this.selectedCategoryIndex,0,this.selectedCategory),this.setState({categories:[...a],templates:t})}}async handleAllCategoriesResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(this.setState({showCategoriesLoading:!1}),i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.data){const e=i.data.map(e=>{const t=e.attributes.template_categories.filter(Boolean).map(e=>({id:e.data.attributes.id,name:e.data.attributes.name,nodes:e.data.attributes.connector_cards.filter(Boolean).map(e=>({id:""+e.data.attributes.id,source:e.data.attributes.source}))}));return{id:e.attributes.id,name:e.attributes.name,templates:t}});this.setState({categories:e})}}else Pi.b.error("Failed to fetch categories",{className:"error__toast"})}async handleAllTemplatesResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.data){const e=i.data.map(e=>({id:e.attributes.id,name:e.attributes.name,nodes:e.attributes.connector_cards.filter(Boolean).map(e=>({id:""+e.data.attributes.id,source:e.data.attributes.source}))}));this.setState({templates:e})}}else Pi.b.error("Failed to fetch templates",{className:"error__toast"})}async handleLogout(){await T("authToken"),await T("userId"),sessionStorage.clear();const e=new Q(q(Z.NavigationSignupLoginMessage));e.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),this.send(e)}}const br=Object(De.a)({overrides:{}}),Ar=Object(Ta.a)("div")({"&.card-layout":{display:"flex",flexDirection:"column",gap:24,padding:"24px 48px","& .title":{fontWeight:400,fontFamily:"Cairo",lineHeight:"28px",color:"#0F172A",fontSize:16,margin:0}},"&.gap-12":{gap:12},"&.border-t":{borderTop:"1px solid #CBD5E1"},"&.pt-0":{paddingTop:0}}),fr=Object(Ta.a)("div")({"&.card-layout-header":{display:"flex",justifyContent:"space-between",gap:4,"&.justify-initial":{justifyContent:"initial"},"& .h5":{fontFamily:"Cairo",fontWeight:700,fontSize:20,lineHeight:"28px",color:"#0F172A",margin:0,"&.font-400":{fontWeight:400}}}}),xr=Object(Ta.a)("button")({"&.create-template":{all:"unset",cursor:"pointer",display:"flex",flexDirection:"column",justifyContent:"center",gap:6,width:100,"& .icon":{display:"grid",placeItems:"center",width:100,height:100,boxSizing:"border-box",border:"2px solid #51ABB3",borderRadius:12,color:"#51ABB3"},"& .template-text":{fontFamily:"Cairo",fontWeight:600,fontSize:14,lineHeight:"18px",color:"#64748B",padding:6,textAlign:"center"},"&:hover":{"& .template-text":{color:"#51ABB3"}},'&[aria-disabled="true"]':{"& .icon":{color:"#94A3B8",border:"1px solid #94A3B8"},"& .template-text":{color:"#64748B !important"}}}}),Er=Object(Ta.a)("button")({"&.create-category":{all:"unset",cursor:"pointer",display:"flex",gap:8,alignItems:"center",fontFamily:"Roboto",fontWeight:500,fontSize:14,lineHeight:"14px",color:"#51ABB3"}}),vr=Object(Ta.a)("div")({"&.loader-container":{display:"grid",placeItems:"center"}});class yr extends Cr{constructor(e){super(e)}render(){return s.a.createElement(Be.a,{theme:br},s.a.createElement(ir,{type:"template",open:this.state.isTemplateModalOpen,handleClose:this.handleToggleTemplatePopup,onSubmit:this.handleTemplateSubmit,isCreateOrUpdateLoading:this.state.isCreateTemplateOrCategoryLoading,"data-testid":"template-popup"}),s.a.createElement(ir,{key:this.selectedCategoryName,type:"category",open:this.state.isCategoryModalOpen,handleClose:this.handleToggleCategoryPopup,onSubmit:this.handleCategorySubmit,initialName:this.selectedCategoryName,isEdit:!!this.selectedCategoryId,isCreateOrUpdateLoading:this.state.isCreateTemplateOrCategoryLoading,"data-testid":"category-popup"}),s.a.createElement(Ar,{className:"card-layout gap-12 pt-0"},s.a.createElement(fr,{className:"card-layout-header"},s.a.createElement("h5",{className:"h5"},"New template"),s.a.createElement(Er,{className:"create-category","data-testid":"create-category-btn",onClick:this.handleToggleCategoryPopup},s.a.createElement(Kn.a,{htmlColor:"#51ABB3"}),"Create category")),this.state.showMaxTemplateError&&s.a.createElement($n,{"data-testid":"max-template-error",error:"You already added the maximum number of templates",handleCloseError:this.handleCloseMaxTemplateError}),s.a.createElement(xr,{className:"create-template","data-testid":"create-template-btn","aria-disabled":this.state.isCreateTemplateButtonDisabled,onClick:this.handleToggleTemplatePopup},s.a.createElement("span",{className:"icon"},s.a.createElement(Ja.a,{htmlColor:"currentColor"})),s.a.createElement("span",{className:"template-text"},"Create Template"))),this.state.showCategoriesLoading?s.a.createElement(vr,{className:"loader-container"},s.a.createElement(Kt.a,{"data-testid":"loader",style:{height:40,width:40,color:"#51ABB3"}})):s.a.createElement(s.a.Fragment,null,this.state.templates.length>0?s.a.createElement(Ar,{className:"card-layout gap-12 border-t"},s.a.createElement("p",{className:"title"},"Templates"),s.a.createElement("div",{style:wr.templateLayout},this.state.templates.map(e=>s.a.createElement(dr,Object.assign({key:e.id},e,{onDeleteTemplate:this.handleDeleteTemplate,onEditTemplate:this.handleEditTemplate,"data-testid":"Template "+e.id,categories:this.state.categories,handleAddConnectorCardsFromTemplateToChatbot:this.props.handleAddConnectorCardsFromTemplateToChatbot,onTemplateMoveToAnotherCategory:this.handleMoveTemplateFromCategoryToAnotherCategory}))))):null,this.state.categories.length>0?this.state.categories.map(e=>s.a.createElement(ur,Object.assign({key:e.id},e,{onEditCategory:this.handleEditCategory,onDeleteCategory:this.handleDeleteCategory,onDeleteTemplate:this.handleDeleteTemplate,onEditTemplate:this.handleEditTemplate,"data-testid":"Category "+e.id,categories:this.state.categories,handleAddConnectorCardsFromTemplateToChatbot:this.props.handleAddConnectorCardsFromTemplateToChatbot,onMoveTemplateFromCategory:this.handleMoveTemplateFromCategoryToAnotherCategory}))):null))}}const wr={templateLayout:{display:"flex",flexWrap:"wrap",gap:"24px 17px"}};class Ir extends K{constructor(e){super(e),this.perPage=15,this.targetCard=null,this.handleAddOrUpdateConnectorCard=e=>{this.setState({loading:!0});let t="POST",a="bx_block_chatbot6/connector_cards";const i={token:this.props.token,"Content-Type":Bn.validationApiContentType},s={connector_card:{...e.body}};e.ruleIds&&(s.rule_ids=e.ruleIds),e.criteriaRoutingIds&&(s.criteria_routing_ids=e.criteriaRoutingIds),this.props.isTemplate?(s.connector_card.card_template_id=this.props.navigation.getParam("navigationBarTitleText"),s.connector_card.connector_card_type="template"):(s.connector_card.chatbot_id=this.props.navigation.getParam("navigationBarTitleText"),s.connector_card.connector_card_type="chatbot"),e.id&&(t="PUT",a="bx_block_chatbot6/connector_cards/"+e.id),this.props.previousCardId&&(s.connector_card.previous_card_id=this.props.previousCardId),this.props.followUpActionId&&(s.connector_card.follow_up_action_id=this.props.followUpActionId),e.id||(s.connector_card.source=this.props.source[0]);const o=new Q(q(Z.RestAPIRequestMessage));o.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(s)),o.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(i)),o.addData(q(Z.RestAPIRequestMethodMessage),t),o.addData(q(Z.RestAPIResponceEndPointMessage),a),o.addData(q(Z.NavigationPropsMessage),{title:"AddOrUpdatConnectorCard"}),this.send(o)},this.handleCloseDrawer=()=>{this.props.onDrawerClose(),this.setState({tab:"cards"})},this.handleAddBotIdToFormData=e=>{this.props.isTemplate?(e.append("connector_card[card_template_id]",this.props.navigation.getParam("navigationBarTitleText")),e.append("connector_card[connector_card_type]","template")):(e.append("connector_card[chatbot_id]",this.props.navigation.getParam("navigationBarTitleText")),e.append("connector_card[connector_card_type]","chatbot"))},this.handleShareLinkSave=e=>{const t="connector_card[connector_card_links_attributes]",a=new FormData,i=[];e.links.forEach(e=>{e.icon||e.iconFile||!e.id||i.push(e.id)}),a.append("connector_card_link_ids",i.join(",")),a.append("connector_card[name]",e.name.trimStart().trimEnd()),e.id||a.append("connector_card[source]",""+this.props.source[0]),this.props.previousCardId&&a.append("connector_card[previous_card_id]",""+this.props.previousCardId),a.append("connector_card[card_type]","share_link"),a.append("connector_card[message]",e.message.trimStart().trimEnd()),e.links.forEach((e,i)=>{a.append(`${t}[${i}][link_name]`,e.name),a.append(`${t}[${i}][link_type]`,e.linkType),a.append(`${t}[${i}][open_link]`,e.openLink),"regular"===e.linkType&&e.url?a.append(`${t}[${i}][link_url]`,e.url):a.append(`${t}[${i}][destination]`,""+e.destination),e.iconFile&&a.append(`${t}[${i}][connector_icon_image]`,e.iconFile),e.id&&a.append(`${t}[${i}][id]`,""+e.id)}),this.handleAddBotIdToFormData(a);const s={token:this.props.token};this.setState({loading:!0});let o="POST",n="bx_block_chatbot6/connector_cards";e.id&&(n="bx_block_chatbot6/connector_cards/"+e.id,o="PUT");const r=new Q(q(Z.RestAPIRequestMessage));r.addData(q(Z.RestAPIRequestMethodMessage),o),r.addData(q(Z.RestAPIRequestBodyMessage),a),r.addData(q(Z.RestAPIResponceEndPointMessage),n),r.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(s)),r.addData(q(Z.NavigationPropsMessage),{title:"AddOrUpdatConnectorCard"}),this.send(r)},this.handleDropdownCardSave=e=>{const t={message:e.message.trimStart().trimEnd(),card_type:"dropdown",field_name:e.fieldName.trimStart().trimEnd(),name:e.title.trimStart().trimEnd(),option:e.options};this.handleAddOrUpdateConnectorCard({id:e.id,body:t})},this.handleSingleChoiceSave=e=>{const t={name:e.name.trimStart().trimEnd(),message:e.message.trimStart().trimEnd(),field_name:e.fieldName.trimStart().trimEnd(),card_type:e.type,option:e.options};this.handleAddOrUpdateConnectorCard({id:e.id,body:t})},this.handleShareGuideOrEmbedFormSave=e=>{const t={name:e.name.trimStart().trimEnd(),message:e.message.trimStart().trimEnd(),card_type:e.type};"share_user_guide"===e.type?t.user_guides=e.selectedOptions.map(e=>+e):t.embeded_forms=e.selectedOptions.map(e=>+e),this.handleAddOrUpdateConnectorCard({id:e.id,body:{...t}})},this.handleShareVideoSave=e=>{const t={name:e.name.trimStart().trimEnd(),message:e.message.trimStart().trimEnd(),card_type:"share_video",video_link:e.videoURL};this.handleAddOrUpdateConnectorCard({id:e.id,body:t})},this.handleSendMessageSave=e=>{const t={name:e.name.trimStart().trimEnd(),message:e.message.trimStart().trimEnd(),card_type:e.type,card_wait_time:e.cardWaitTimeChecked?e.waitTime:0};this.handleAddOrUpdateConnectorCard({id:e.id,body:t})},this.handleRatingSave=e=>{const t={name:e.name.trimStart().trimEnd(),message:e.message.trimStart().trimEnd(),card_type:"rating",field_name:e.fieldName.trimStart().trimEnd()};this.handleAddOrUpdateConnectorCard({id:e.id,body:t})},this.handleSliderScaleSave=e=>{const t={name:e.title.trimStart().trimEnd(),message:e.message.trimStart().trimEnd(),card_type:"slider_scale",field_name:e.fieldName.trimStart().trimEnd(),minimum_selection:+e.minValue,maximum_selection:+e.maxValue};this.handleAddOrUpdateConnectorCard({id:e.id,body:t})},this.handleGoToTileSave=e=>{if("individual"===e.selectedCardType){const t={name:e.cardName.trimStart().trimEnd(),connection_type:e.selectedCardType,target_card:+e.targetCard,card_type:"go_to_tile"};return void this.handleAddOrUpdateConnectorCard({id:e.id,body:t})}this.setState({loading:!0});const t={"Content-Type":Bn.validationApiContentType,token:this.props.token},a=new Q(q(Z.RestAPIRequestMessage));a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t));const i={card_id:e.targetCard,connector_card_ids:+this.props.source[0]};this.props.previousCardId&&(i.previous_card_id=this.props.previousCardId),a.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(i)),a.addData(q(Z.RestAPIRequestMethodMessage),"PUT"),a.addData(q(Z.RestAPIResponceEndPointMessage),Bn.updateSource),a.addData(q(Z.NavigationPropsMessage),{title:"UpdateSourceInConnectorCard"}),this.targetCard=+e.targetCard,this.send(a)},this.handleCriteriaRoutingSave=e=>{this.handleAddOrUpdateConnectorCard({id:e.cardId,criteriaRoutingIds:e.criteriaRoutingIds,ruleIds:e.ruleIds,body:{name:e.name,message:"",card_type:"criteria_routing",criteria_routings_attributes:e.criteriaRoutings}})},this.handleOpenAiSave=e=>{this.handleAddOrUpdateConnectorCard({id:e.cardId,body:{...e,card_type:"openai"}})},this.onTabChange=(e,t)=>{this.setState({tab:t})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess),q(Z.RestAPIResponceMessage)],this.state={loading:!1,tab:"cards",cardUpdateTime:Date.now()},z.attachBuildingBlock(this,this.subScribedMessages),this.handleLogout=this.handleLogout.bind(this),this.handleRestApiResponse=this.handleRestApiResponse.bind(this),this.handleUpdateSourceInConnectorCard=this.handleUpdateSourceInConnectorCard.bind(this),this.handleAddOrUpdateConnectorCardResponse=this.handleAddOrUpdateConnectorCardResponse.bind(this)}async receive(e,t){const a={[q(Z.RestAPIResponceMessage)]:this.handleRestApiResponse}[t.id];a&&a(t)}handleRestApiResponse(e){const t={},{title:a}=e.getData(q(Z.NavigationPropsMessage));"AddOrUpdatConnectorCard"===a&&(t.AddOrUpdatConnectorCard=this.handleAddOrUpdateConnectorCardResponse),"UpdateSourceInConnectorCard"===a&&(t.UpdateSourceInConnectorCard=this.handleUpdateSourceInConnectorCard);const i=t[a];i&&i(e)}async handleAddOrUpdateConnectorCardResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(this.setState({loading:!1}),i){if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else if(i.data){const e=xo.getNodeDataFromConnectorCardAttributes(i.data);this.props.handleAddCard(e),this.setState({cardUpdateTime:Date.now()})}}else Pi.b.error("Internal server error",{className:"error__toast"})}async handleUpdateSourceInConnectorCard(e){var t,a;this.setState({loading:!1});const i=e.getData(q(Z.RestAPIResponceSuccessMessage));i?(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)?await this.handleLogout():i.message&&this.targetCard&&this.props.handleConnectionTypeCard(this.targetCard,this.props.previousCardId):Pi.b.error("Internal server error",{className:"error__toast"})}async handleLogout(){await T("authToken"),await T("userId"),sessionStorage.clear();const e=new Q(q(Z.NavigationSignupLoginMessage));e.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),this.send(e)}}const{MuiFormLabelRootStyle:Pr,MuiTypographyStyle:Sr,MuiOutlinedInputStyle:Mr,MuiInputBaseRootStyle:Fr,drawerCard:Rr}=ka,Dr=Object(De.a)({typography:{...Sr},overrides:{MuiFormLabel:{root:{...Pr}},MuiInputBase:Fr,MuiOutlinedInput:Mr,MuiSwitch:{root:{borderRadius:40,padding:0,width:48,height:28},input:{width:48,left:0,height:28},switchBase:{left:2,top:2,padding:0,"&.Mui-checked":{"& input":{left:"-24px"}}},thumb:{backgroundColor:"#FFFFFF",height:24,boxShadow:"0px 2px 8px 0px #00000014",width:24},track:{backgroundColor:"#E2E8F0",opacity:1},colorSecondary:{"&.Mui-checked + $track":{opacity:1,backgroundColor:"#51ABB3"}}},MuiIconButton:{root:{padding:12}}}}),Br=Object(Yt.a)({drawerContentType:Rr.drawerContent,formControls:Rr.formControl,endMessageContainer:Rr.container,formErrorInfo:{display:"flex",gap:4,justifyContent:"flex-end","&.spaceBetween":{justifyContent:"space-between"},"&.error":{color:"#D97706"}},switchContainers:{display:"flex",marginBottom:8,alignItems:"flex-end",justifyContent:"space-between"}}),Tr=gs.d().shape({name:gs.f().trim().required("Please add a name"),message:gs.f().trim().required("Please add a message")}),kr=[{label:"5 seconds",value:"5"},{label:"6 seconds",value:"6"},{label:"7 seconds",value:"7"},{label:"8 seconds",value:"8"},{label:"9 seconds",value:"9"},{label:"10 seconds",value:"10"}];function Nr(e){let{onClose:t,onSubmit:a,loading:i,title:o="",message:n="",waitTime:r=5,id:l,onDrawerClose:d,botContext:c}=e;const h=Br();return s.a.createElement(Be.a,{theme:Dr},s.a.createElement("div",{className:h.endMessageContainer},s.a.createElement(Va,{id:l,onClose:t,title:"End Chat","data-testid":"cardHeader"}),s.a.createElement(us.a,{initialValues:{name:o,message:n,waitTime:r||5,cardWaitTimeChecked:!1},validationSchema:Tr,onSubmit:e=>a({id:l,type:"end_chat",...e}),"data-test-id":"formik"},e=>{let{handleSubmit:t,values:a,errors:o,getFieldProps:n,setFieldValue:r,touched:l}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:h.drawerContentType},s.a.createElement("div",{className:h.formControls},s.a.createElement(Pe.a,{htmlFor:"title"},"Name*"),s.a.createElement(Ba.a,{placeholder:"End chat card",fullWidth:!0,id:"name",name:"name",inputProps:{...n("name"),maxLength:50},error:!!o.name&&l.name,"data-test-id":"name"}),s.a.createElement("div",{className:`${h.formErrorInfo} ${o.name&&l.name?"spaceBetween":""}`},o.name&&l.name&&s.a.createElement(Ie.a,{"data-test-id":"nameError",id:"name-error",className:"error",variant:"subtitle2"},o.name),s.a.createElement(Ie.a,{variant:"subtitle2",id:"name-value-length"},a.name.trimStart().trimEnd().length,"/50"))),s.a.createElement(Rs,{value:a.message,hasMessageError:!!o.message&&!!l.message,messageErrorText:o.message,getFieldProps:n,botContext:c,setFieldValue:r}),s.a.createElement("div",{className:h.formControls,style:{gap:0}},s.a.createElement(Pe.a,{id:"waitTime",htmlFor:"title"},"Card wait time"),s.a.createElement("div",{className:h.switchContainers},s.a.createElement(Ie.a,{variant:"subtitle2"},"The card will be executed after the specified wait time"),s.a.createElement(zs.a,{checked:a.cardWaitTimeChecked,disableRipple:!0,id:"cardWaitTimeChecked",inputProps:{...n("cardWaitTimeChecked")}})),s.a.createElement(ti,{labelId:"waitTime",placeholder:"Wait Time",id:"waitTime-select",options:kr,value:""+a.waitTime,onChange:e=>r("waitTime",+e),disabled:!a.cardWaitTimeChecked,selectBoxWidth:344}))),s.a.createElement(Qa,{onSaveClick:()=>t(),onClose:d,loading:i}))})))}var Or=()=>s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M3 19.3598V4.64035C3 4.22518 3.16356 3.9089 3.49067 3.69151C3.81779 3.47487 4.16308 3.44203 4.52654 3.593L21.3185 10.9527C21.7728 11.1603 22 11.5094 22 12.0001C22 12.4907 21.7728 12.8399 21.3185 13.0474L4.52654 20.4072C4.16308 20.5582 3.81779 20.5249 3.49067 20.3076C3.16356 20.0909 3 19.775 3 19.3598ZM5.18077 17.6614L18.1019 12.0001L5.18077 6.33875V10.3017L11.7231 12.0001L5.18077 13.6985V17.6614Z",fill:"currentColor"}));var Lr=()=>s.a.createElement("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M8.5 18H16.5V16H8.5V18ZM8.5 14H16.5V12H8.5V14ZM6.5 22C5.95 22 5.47933 21.8043 5.088 21.413C4.696 21.021 4.5 20.55 4.5 20V4C4.5 3.45 4.696 2.979 5.088 2.587C5.47933 2.19567 5.95 2 6.5 2H14.5L20.5 8V20C20.5 20.55 20.3043 21.021 19.913 21.413C19.521 21.8043 19.05 22 18.5 22H6.5ZM13.5 9V4H6.5V20H18.5V9H13.5Z",fill:"currentColor"}));var Hr=()=>s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M4 20C3.45 20 2.97917 19.8042 2.5875 19.4125C2.19583 19.0208 2 18.55 2 18V6C2 5.45 2.19583 4.97917 2.5875 4.5875C2.97917 4.19583 3.45 4 4 4H16C16.55 4 17.0208 4.19583 17.4125 4.5875C17.8042 4.97917 18 5.45 18 6V10.5L22 6.5V17.5L18 13.5V18C18 18.55 17.8042 19.0208 17.4125 19.4125C17.0208 19.8042 16.55 20 16 20H4ZM4 18H16V6H4V18Z",fill:"currentColor"}));var _r=()=>s.a.createElement("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M14.5 9.9V8.2C15.05 7.96667 15.6125 7.79167 16.1875 7.675C16.7625 7.55833 17.3667 7.5 18 7.5C18.4333 7.5 18.8583 7.53333 19.275 7.6C19.6917 7.66667 20.1 7.75 20.5 7.85V9.45C20.1 9.3 19.6958 9.1875 19.2875 9.1125C18.8792 9.0375 18.45 9 18 9C17.3667 9 16.7583 9.07917 16.175 9.2375C15.5917 9.39583 15.0333 9.61667 14.5 9.9ZM14.5 15.4V13.7C15.05 13.4667 15.6125 13.2917 16.1875 13.175C16.7625 13.0583 17.3667 13 18 13C18.4333 13 18.8583 13.0333 19.275 13.1C19.6917 13.1667 20.1 13.25 20.5 13.35V14.95C20.1 14.8 19.6958 14.6875 19.2875 14.6125C18.8792 14.5375 18.45 14.5 18 14.5C17.3667 14.5 16.7583 14.575 16.175 14.725C15.5917 14.875 15.0333 15.1 14.5 15.4ZM14.5 12.65V10.95C15.05 10.7167 15.6125 10.5417 16.1875 10.425C16.7625 10.3083 17.3667 10.25 18 10.25C18.4333 10.25 18.8583 10.2833 19.275 10.35C19.6917 10.4167 20.1 10.5 20.5 10.6V12.2C20.1 12.05 19.6958 11.9375 19.2875 11.8625C18.8792 11.7875 18.45 11.75 18 11.75C17.3667 11.75 16.7583 11.8292 16.175 11.9875C15.5917 12.1458 15.0333 12.3667 14.5 12.65ZM7 16C7.78333 16 8.54583 16.0875 9.2875 16.2625C10.0292 16.4375 10.7667 16.7 11.5 17.05V7.2C10.8167 6.8 10.0917 6.5 9.325 6.3C8.55833 6.1 7.78333 6 7 6C6.4 6 5.80417 6.05833 5.2125 6.175C4.62083 6.29167 4.05 6.46667 3.5 6.7V16.6C4.08333 16.4 4.6625 16.25 5.2375 16.15C5.8125 16.05 6.4 16 7 16ZM13.5 17.05C14.2333 16.7 14.9708 16.4375 15.7125 16.2625C16.4542 16.0875 17.2167 16 18 16C18.6 16 19.1875 16.05 19.7625 16.15C20.3375 16.25 20.9167 16.4 21.5 16.6V6.7C20.95 6.46667 20.3792 6.29167 19.7875 6.175C19.1958 6.05833 18.6 6 18 6C17.2167 6 16.4417 6.1 15.675 6.3C14.9083 6.5 14.1833 6.8 13.5 7.2V17.05ZM12.5 20C11.7 19.3667 10.8333 18.875 9.9 18.525C8.96667 18.175 8 18 7 18C6.3 18 5.6125 18.0917 4.9375 18.275C4.2625 18.4583 3.61667 18.7167 3 19.05C2.65 19.2333 2.3125 19.225 1.9875 19.025C1.6625 18.825 1.5 18.5333 1.5 18.15V6.1C1.5 5.91667 1.54583 5.74167 1.6375 5.575C1.72917 5.40833 1.86667 5.28333 2.05 5.2C2.81667 4.8 3.61667 4.5 4.45 4.3C5.28333 4.1 6.13333 4 7 4C7.96667 4 8.9125 4.125 9.8375 4.375C10.7625 4.625 11.65 5 12.5 5.5C13.35 5 14.2375 4.625 15.1625 4.375C16.0875 4.125 17.0333 4 18 4C18.8667 4 19.7167 4.1 20.55 4.3C21.3833 4.5 22.1833 4.8 22.95 5.2C23.1333 5.28333 23.2708 5.40833 23.3625 5.575C23.4542 5.74167 23.5 5.91667 23.5 6.1V18.15C23.5 18.5333 23.3375 18.825 23.0125 19.025C22.6875 19.225 22.35 19.2333 22 19.05C21.3833 18.7167 20.7375 18.4583 20.0625 18.275C19.3875 18.0917 18.7 18 18 18C17 18 16.0333 18.175 15.1 18.525C14.1667 18.875 13.3 19.3667 12.5 20Z",fill:"currentColor"}));var Vr=()=>s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M6.5 11L12 2L17.5 11H6.5ZM17.5 22C16.25 22 15.1875 21.5625 14.3125 20.6875C13.4375 19.8125 13 18.75 13 17.5C13 16.25 13.4375 15.1875 14.3125 14.3125C15.1875 13.4375 16.25 13 17.5 13C18.75 13 19.8125 13.4375 20.6875 14.3125C21.5625 15.1875 22 16.25 22 17.5C22 18.75 21.5625 19.8125 20.6875 20.6875C19.8125 21.5625 18.75 22 17.5 22ZM3 21.5V13.5H11V21.5H3ZM17.5 20C18.2 20 18.7917 19.7583 19.275 19.275C19.7583 18.7917 20 18.2 20 17.5C20 16.8 19.7583 16.2083 19.275 15.725C18.7917 15.2417 18.2 15 17.5 15C16.8 15 16.2083 15.2417 15.725 15.725C15.2417 16.2083 15 16.8 15 17.5C15 18.2 15.2417 18.7917 15.725 19.275C16.2083 19.7583 16.8 20 17.5 20ZM5 19.5H9V15.5H5V19.5ZM10.05 9H13.95L12 5.85L10.05 9Z",fill:"currentColor"}));var Ur=()=>s.a.createElement("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 1H5C3.9 1 3 1.9 3 3V16C3 16.55 3.45 17 4 17C4.55 17 5 16.55 5 16V4C5 3.45 5.45 3 6 3H16C16.55 3 17 2.55 17 2C17 1.45 16.55 1 16 1ZM20 5H9C7.9 5 7 5.9 7 7V21C7 22.1 7.9 23 9 23H20C21.1 23 22 22.1 22 21V7C22 5.9 21.1 5 20 5ZM10 21H19C19.55 21 20 20.55 20 20V8C20 7.45 19.55 7 19 7H10C9.45 7 9 7.45 9 8V20C9 20.55 9.45 21 10 21Z",fill:"currentColor"}));const Wr=a(1381),jr=a(1382);a(1383);class zr extends K{constructor(e){super(e),this.actionCards=[],this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?Wr:jr}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?Wr:jr},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.onAddAction=()=>{const e={id:Date.now(),redirectCardId:"",buttonText:"",isExpanded:!0};this.setState({followUpActions:[...this.state.followUpActions,e]})},this.onActionChange=e=>{const t=[...this.state.followUpActions],a=t.findIndex(t=>t.id===e.id);t[a]={...t[a],...e},this.setState({followUpActions:[...t]})},this.onActionCardChange=e=>t=>{this.setState({selectedActionId:e,selectedRedirectCardId:t})},this.onActionButtonTextChange=e=>t=>{t.stopPropagation();const{value:a}=t.target;this.onActionChange({id:e,buttonText:a,buttonTextError:0===a.trim().length})},this.onActionExpandToggle=e=>t=>{t.stopPropagation();const a=[...this.state.followUpActions],i=a.findIndex(t=>t.id===e),s=a[i];let o=!s.isExpanded;0!==s.buttonText.trim().length&&s.redirectCardId||(o=!0),a[i]={...s,isExpanded:o},this.setState({followUpActions:a})},this.onActionDelete=e=>t=>{t.stopPropagation();const a=this.state.followUpActions.filter(t=>t.id!==e);this.setState({followUpActions:a})},this.handleOpenAiSubmit=e=>{const t=this.state.followUpActions.map(e=>({...e,buttonTextError:0===e.buttonText.trim().length,cardIdError:!e.redirectCardId}));if(t.some(e=>e.buttonTextError||e.cardIdError))return void this.setState({followUpActions:t});const a=this.state.followUpActions.map((e,t)=>{const a={title:"Follow-up action "+(t+1),redirect_user:e.redirectCardId,button_text:e.buttonText};return e.actionId&&(a.id=e.actionId),a});this.props.onSaveClick({name:e.name.trimStart().trimEnd(),message:e.message.trimStart().trimEnd(),follow_ups_attributes:a,cardId:this.props.cardId})},this.receive=this.receive.bind(this),this.actionCards=this.props.allActionCards,this.props.cardId&&(this.actionCards=this.props.allActionCards.filter(e=>e.value!==""+this.props.cardId)),this.subScribedMessages=[q(Z.AccoutLoginSuccess)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1,followUpActions:[{id:Date.now(),redirectCardId:"",buttonText:"",isExpanded:!0}],selectedActionId:null,selectedRedirectCardId:""},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}async componentDidMount(){if(this.props.initialFollowUpActions){const e=this.props.initialFollowUpActions.map(e=>{var t;return{id:e.id,actionId:e.id,redirectCardId:null!==(t=e.redirectCardId)&&void 0!==t?t:"",buttonText:e.buttonText,isExpanded:!1}});this.setState({followUpActions:e})}}componentDidUpdate(e,t,a){t.selectedRedirectCardId!==this.state.selectedRedirectCardId&&this.state.selectedActionId&&(this.onActionChange({id:this.state.selectedActionId,redirectCardId:this.state.selectedRedirectCardId,cardIdError:!1}),this.setState({selectedActionId:null,selectedRedirectCardId:""}))}}const{MuiFormLabelRootStyle:Qr,MuiTypographyStyle:Gr,MuiOutlinedInputStyle:qr,MuiInputBaseRootStyle:Zr,drawerCard:Jr}=ka,Yr=Object(Ta.a)("div")({display:"flex",gap:4,justifyContent:"space-between","&.error":{color:"#D97706"}}),Kr=Object(Ta.a)("div")({display:"flex",flexDirection:"column",gap:2,padding:"16px",backgroundColor:"#F6F7FF",borderRadius:6,boxShadow:"0px 2px 8px 0px #00000014","& .flex":{display:"flex"},"& .gap-4":{gap:4},"& .items-center":{alignItems:"center"},"& .flex-column":{flexDirection:"column"},"& .title":{fontFamily:"Inter",fontWeight:700,fontSize:14,color:"#334155",lineHeight:"14px"},"& .action-text":{margin:0,color:"#0F172A",fontFamily:"Cairo",fontWeight:500,fontSize:14,lineHeight:"24px"},'&[aria-expanded="true"]':{gap:8,"& .title":{lineHeight:"24px"}}}),Xr=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:Gr,overrides:{MuiFormLabel:{root:Qr},MuiOutlinedInput:qr,MuiInputBase:Zr,MuiIconButton:{root:{padding:0}},MuiContainer:{root:{width:440,marginLeft:0,marginRight:0,backgroundColor:"#FFFFFF",display:"flex",height:"100%",overflowY:"auto",flexDirection:"column",scrollbarWidth:"none",paddingRight:0,paddingLeft:0,"&::-webkit-scrollbar":{width:0},"@media (min-width: 600px)":{paddingLeft:0,paddingRight:0},"& .content":{flexGrow:1,backgroundColor:"#FFFFFF",display:"flex",gap:12,padding:"0px 48px 24px",flexDirection:"column"},"& .form-control":{display:"flex",gap:4,flexDirection:"column","&.gap-8":{gap:8},"&.items-start":{alignItems:"flex-start"},"& .add-action":{...Jr.addLinkOrOptionButton,fontFamily:"Cairo"}}}}}});class $r extends zr{constructor(e){super(e),this.hasError=(e,t)=>!!e&&!!t}render(){var e,t;return s.a.createElement(Be.a,{theme:Xr},s.a.createElement(ye.a,null,s.a.createElement(Va,{id:this.props.cardId,onClose:this.props.onClose,title:" Open AI integration"}),s.a.createElement(us.a,{initialValues:{name:null!==(e=this.props.name)&&void 0!==e?e:"",message:null!==(t=this.props.message)&&void 0!==t?t:""},onSubmit:this.handleOpenAiSubmit,validationSchema:Fo,"data-testid":"formik"},e=>{let{handleSubmit:t,getFieldProps:a,errors:i,touched:o,values:n,setFieldValue:r}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:"content"},s.a.createElement("div",{className:"form-control"},s.a.createElement(Pe.a,{htmlFor:"name"},"Name*"),s.a.createElement(Ba.a,{inputProps:{...a("name"),maxLength:50},placeholder:"Open AI tile",error:this.hasError(i.name,o.name),fullWidth:!0,id:"name",name:"name"}),s.a.createElement(Yr,null,this.hasError(i.name,o.name)&&s.a.createElement(Ie.a,{className:"error",variant:"subtitle2"},i.name),s.a.createElement(Ie.a,{variant:"subtitle2",className:"ml-auto"},n.name.trim().length,"/50"))),s.a.createElement(Rs,{"data-testid":"openai-message",getFieldProps:a,hasMessageError:this.hasError(i.message,o.message),messageErrorText:i.message,value:n.message,botContext:this.props.botContext,setFieldValue:r,description:"This card will enable the user to enter free text input, and the chatbot will respond to it based on its training"}),s.a.createElement("div",{className:"form-control gap-8","data-testid":"actions"},s.a.createElement(Pe.a,{htmlFor:"name"},"Follow-up action(s) (",this.state.followUpActions.length,")*"),s.a.createElement(Ie.a,{variant:"subtitle2"},"Here you can re-direct users back to the main chatbot flow, without the use of AI"),this.state.followUpActions.map((e,t)=>s.a.createElement(Kr,{key:e.id,"aria-expanded":e.isExpanded,onClick:this.onActionExpandToggle(e.id)},s.a.createElement("div",{className:"flex gap-4 items-center"},s.a.createElement("div",{className:"title"},"Follow-up action "+(t+1)),!e.isExpanded&&s.a.createElement(Fe.a,{"aria-label":"delete action "+(t+1),onClick:this.onActionDelete(e.id)},s.a.createElement(Za.a,{htmlColor:"#0F172A",style:{height:18,width:18}}))),e.isExpanded?s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:"flex flex-column gap-4"},s.a.createElement(Pe.a,{id:"action-"+e.id},"Redirect user to card*"),s.a.createElement(ti,{id:"action-"+e.id,hasSearch:!0,searchPlaceholder:"Search...",selectBoxWidth:312,placeholder:"Select a card",value:e.redirectCardId,options:this.actionCards,labelId:"action-"+e.id,onChange:this.onActionCardChange(e.id),error:e.cardIdError})),s.a.createElement("div",{className:"flex flex-column gap-4"},s.a.createElement(Pe.a,{htmlFor:"action-text-"+e.id},"Button Text*"),s.a.createElement(Ba.a,{inputProps:{maxLength:50},placeholder:"Please add a button text",error:!!e.buttonTextError,fullWidth:!0,id:"action-text-"+e.id,name:"action-text-"+e.id,value:e.buttonText,onChange:this.onActionButtonTextChange(e.id),onClick:e=>{e.stopPropagation()}}))):s.a.createElement("p",{className:"action-text"},e.buttonText))),s.a.createElement("button",{type:"button",className:"add-action",onClick:this.onAddAction},s.a.createElement(Ja.a,{htmlColor:"#64748B",style:{height:20,width:20}}),"Add Follow-up action"))),s.a.createElement(Qa,{onClose:this.props.onDrawerClose,onSaveClick:()=>t(),loading:this.props.loading}))})))}}const el=Object(Ta.a)(we.a)({padding:"24px 40px",display:"flex",position:"sticky",top:0,zIndex:4,backgroundColor:"#FFFFFF"}),tl=Object(Ta.a)(we.a)({display:"flex",flexDirection:"column",alignItems:"center",gap:6,width:100,cursor:"pointer","& .icon-box":{width:"100%",height:100,border:"1px solid #CBD5E1",borderRadius:12,backgroundColor:"#FFFFFF",boxShadow:"0px 2px 8px 0px #00000014",display:"grid",placeItems:"center",boxSizing:"border-box",color:"#334155"},"&:hover .icon-box":{borderColor:"#51ABB3",color:"#51ABB3"},"&:hover .card-label":{color:"#51ABB3"},'&[aria-disabled="true"]':{pointerEvents:"none"}}),al=Object(Ta.a)(we.a)({all:"unset",cursor:"pointer",position:"absolute",top:24,zIndex:5,right:464,display:"grid",placeItems:"center",height:44,width:44,borderRadius:100,backgroundColor:"#FFFFFF",boxShadow:"0px 2px 8px 0px #00000014"}),il=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{body1:{"&.card-label":{width:"65px",textAlign:"center",fontFamily:"Cairo",fontWeight:600,fontSize:14,lineHeight:"18px",color:"#0F172A"}}},overrides:{MuiPaper:{root:{backgroundColor:"transparent",minHeight:"calc(100vh - 92px)"}},MuiDrawer:{paperAnchorDockedRight:{borderLeftWidth:0},paper:{top:95,height:"80%",background:"white",width:440,boxShadow:"0px 2px 8px 0px #00000014",overflowY:"visible","& .zero-scroll-width":{scrollbarWidth:"none"},"& .zero-scroll-width::-webkit-scrollbar":{width:0}}},MuiTabs:{root:{minHeight:32,height:32},indicator:{height:1,backgroundColor:"#51ABB3"}},MuiTab:{root:{fontFamily:"Cairo",fontWeight:700,fontSize:16,lineHeight:"24px",textTransform:"none",minHeight:"32px",minWidth:0,padding:"4px 10px",color:"#334155",letterSpacing:"0.015em","@media (min-width: 600px)":{minWidth:0},"&.Mui-selected":{color:"#51ABB3"}}},MuiList:{root:{display:"grid",gridTemplateColumns:"auto auto auto",gap:"24px 14px",justifyContent:"space-between"},padding:{paddingTop:0,paddingBottom:24,paddingLeft:48,paddingRight:48}}}});class sl extends Ir{constructor(e){super(e),this.sidePanelCards2=[{title:"Send Message",value:"send_message",icon:s.a.createElement(Or,null)},{title:"Share User guide",value:"share_user_guide",icon:s.a.createElement(Lr,null)},{title:"Share Video",value:"share_video",icon:s.a.createElement(Hr,null)},{title:"Share Link(s)",value:"share_link",icon:s.a.createElement(ss.a,{htmlColor:"currentColor"})},{title:"Single Choice",value:"single_choice",icon:s.a.createElement(os.a,{htmlColor:"currentColor"})},{title:"Multi Choice",value:"multi_choice",icon:s.a.createElement(ns.a,{htmlColor:"currentColor"})},{title:"Dropdown",value:"dropdown",icon:s.a.createElement(rs.a,{htmlColor:"currentColor"})},{title:"End chat",value:"end_chat",icon:s.a.createElement(_r,null)},{title:"Go to tile",value:"go_to_tile",icon:s.a.createElement(ls.a,{htmlColor:"currentColor"})},{title:"Criteria Routing",value:"criteria_routing",icon:s.a.createElement(ds.a,{htmlColor:"currentColor"})},{title:"Slider Scale",value:"slider_scale",icon:s.a.createElement(cs.a,{htmlColor:"currentColor"})},{title:"Rating",value:"rating",icon:s.a.createElement(hs.a,{htmlColor:"currentColor"})},{title:"OpenAI Integration",value:"openai",icon:s.a.createElement(Vr,null)},{title:"Embed Form",value:"embed_form",icon:s.a.createElement(Ur,null)}],this.renderMultiChoiceCard=()=>{var e,t,a,i,o,n,r,l,d,c;return"multi_choice"===this.props.selectedCard?s.a.createElement(pn,{key:null===(e=this.props.selectedCardData)||void 0===e?void 0:e.id,type:"multi_choice","data-testid":"multiChoiceCard",onClose:this.props.handleCloseSelectedCard,loading:this.state.loading,onSave:this.handleSingleChoiceSave,title:"Multi choice",initialOptions:null!==(t=null===(a=this.props.selectedCardData)||void 0===a?void 0:a.options)&&void 0!==t?t:["Option 1","Option 2","Option 3"],name:null!==(i=null===(o=this.props.selectedCardData)||void 0===o?void 0:o.title)&&void 0!==i?i:"",fieldName:null!==(n=null===(r=this.props.selectedCardData)||void 0===r?void 0:r.fieldName)&&void 0!==n?n:"",message:null!==(l=null===(d=this.props.selectedCardData)||void 0===d?void 0:d.message)&&void 0!==l?l:"",id:null===(c=this.props.selectedCardData)||void 0===c?void 0:c.id,onDrawerClose:this.handleCloseDrawer,botContext:this.props.botContext}):null},this.renderSingleChoiceCard=()=>{var e,t,a,i,o,n,r,l,d,c;return"single_choice"===this.props.selectedCard?s.a.createElement(pn,{key:null===(e=this.props.selectedCardData)||void 0===e?void 0:e.id,type:"single_choice","data-testid":"singleChoiceCard",onClose:this.props.handleCloseSelectedCard,loading:this.state.loading,onSave:this.handleSingleChoiceSave,title:"Single choice",name:null!==(t=null===(a=this.props.selectedCardData)||void 0===a?void 0:a.title)&&void 0!==t?t:"",message:null!==(i=null===(o=this.props.selectedCardData)||void 0===o?void 0:o.message)&&void 0!==i?i:"",id:null===(n=this.props.selectedCardData)||void 0===n?void 0:n.id,fieldName:null!==(r=null===(l=this.props.selectedCardData)||void 0===l?void 0:l.fieldName)&&void 0!==r?r:"",onDrawerClose:this.handleCloseDrawer,botContext:this.props.botContext,initialOptions:null!==(d=null===(c=this.props.selectedCardData)||void 0===c?void 0:c.options)&&void 0!==d?d:["Option 1","Option 2","Option 3"]}):null},this.renderUserGuideCard=()=>{var e,t,a,i,o;return"share_user_guide"===this.props.selectedCard?s.a.createElement(Yn,{key:null===(e=this.props.selectedCardData)||void 0===e?void 0:e.id,"data-testid":"shareUserGuideCard",navigation:this.props.navigation,onSave:this.handleShareGuideOrEmbedFormSave,onClose:this.props.handleCloseSelectedCard,type:"share_user_guide",id:null===(t=this.props.selectedCardData)||void 0===t?void 0:t.id,botContext:this.props.botContext,title:null===(a=this.props.selectedCardData)||void 0===a?void 0:a.title,message:null===(i=this.props.selectedCardData)||void 0===i?void 0:i.message,selectedOptions:null===(o=this.props.selectedCardData)||void 0===o?void 0:o.userGuides,onDrawerClose:this.handleCloseDrawer,token:this.props.token,handleLogout:this.handleLogout,onSaveLoading:this.state.loading}):null},this.renderEmbedFormCard=()=>{var e,t,a,i,o;return"embed_form"===this.props.selectedCard?s.a.createElement(Yn,{key:null===(e=this.props.selectedCardData)||void 0===e?void 0:e.id,"data-testid":"embedFormCard",botContext:this.props.botContext,navigation:this.props.navigation,onSave:this.handleShareGuideOrEmbedFormSave,onClose:this.props.handleCloseSelectedCard,onSaveLoading:this.state.loading,type:"embed_form",message:null===(t=this.props.selectedCardData)||void 0===t?void 0:t.message,title:null===(a=this.props.selectedCardData)||void 0===a?void 0:a.title,selectedOptions:null===(i=this.props.selectedCardData)||void 0===i?void 0:i.embedForms,id:null===(o=this.props.selectedCardData)||void 0===o?void 0:o.id,onDrawerClose:this.handleCloseDrawer,token:this.props.token,handleLogout:this.handleLogout}):null},this.renderCriteriaRouting=()=>{var e,t,a,i;return"criteria_routing"===this.props.selectedCard?s.a.createElement(ki,{key:this.state.cardUpdateTime,"data-testid":"criteriaRoutingCard",navigation:this.props.navigation,id:"criteria-routing",onSaveClick:this.handleCriteriaRoutingSave,onClose:this.props.handleCloseSelectedCard,onDrawerClose:this.handleCloseDrawer,loading:this.state.loading,initialCriteriaRoutings:null!==(e=null===(t=this.props.selectedCardData)||void 0===t?void 0:t.criteriaRoutings)&&void 0!==e?e:[],name:null===(a=this.props.selectedCardData)||void 0===a?void 0:a.title,cardId:null===(i=this.props.selectedCardData)||void 0===i?void 0:i.id,contextVariables:this.props.contextVariables}):null},this.renderOpenAiIntegration=()=>{var e,t,a,i,o;return"openai"===this.props.selectedCard?s.a.createElement($r,{key:null===(e=this.props.selectedCardData)||void 0===e?void 0:e.id,navigation:this.props.navigation,id:"Open AI","data-testid":"openAiCard",cardId:null===(t=this.props.selectedCardData)||void 0===t?void 0:t.id,botContext:this.props.botContext,loading:this.state.loading,onClose:this.props.handleCloseSelectedCard,onDrawerClose:this.props.onDrawerClose,onSaveClick:this.handleOpenAiSave,allActionCards:this.props.allActionCards,name:null===(a=this.props.selectedCardData)||void 0===a?void 0:a.title,message:null===(i=this.props.selectedCardData)||void 0===i?void 0:i.message,initialFollowUpActions:null===(o=this.props.selectedCardData)||void 0===o?void 0:o.followUpActions}):null},this.handleDisableOpenAiCard=e=>"openai"===e&&!this.props.isUserEdatt}render(){var e,t,a,i,o,n,r,l,d,c,h,p,g,u;return s.a.createElement(Be.a,{theme:il},s.a.createElement(es.a,{anchor:"right",open:this.props.isDrawerOpen,BackdropComponent:()=>s.a.createElement("div",{id:"backdrop"}),"data-test-id":"side-panel",style:{zIndex:999,position:"relative"},PaperProps:{style:{top:this.props.sidebarTop}}},s.a.createElement(al,{component:"button","aria-label":"close card drawer",onClick:this.handleCloseDrawer},s.a.createElement(ps.a,{htmlColor:"#0F172A"})),null===this.props.selectedCard&&s.a.createElement("div",{className:"zero-scroll-width",style:{backgroundColor:"white",overflowY:"auto"}},!this.props.isTemplate&&s.a.createElement(el,{"data-testid":"sidepanel-header"},s.a.createElement(ts.a,{value:this.state.tab,onChange:this.onTabChange},s.a.createElement(as.a,{disableRipple:!0,label:"Cards",value:"cards"}),s.a.createElement(as.a,{disableRipple:!0,label:"Templates",value:"templates"}))),"cards"===this.state.tab?s.a.createElement(is.a,{style:{paddingTop:this.props.isTemplate?"24px":0}},this.sidePanelCards2.map((e,t)=>s.a.createElement(tl,{component:"li","aria-disabled":this.handleDisableOpenAiCard(e.value),"data-testid":e.title,key:t,onClick:()=>this.props.handleOpenSelectedCard(e.value)},s.a.createElement(we.a,{className:"icon-box"},e.icon),s.a.createElement(Ie.a,{className:"card-label"},e.title)))):s.a.createElement("div",null,s.a.createElement(yr,{id:"template",navigation:this.props.navigation,handleAddConnectorCardsFromTemplateToChatbot:this.props.handleAddConnectorCardsFromTemplateToChatbot}))),this.renderSingleChoiceCard(),this.renderMultiChoiceCard(),this.renderCriteriaRouting(),this.renderOpenAiIntegration(),"go_to_tile"===this.props.selectedCard&&s.a.createElement(ys,Object.assign({key:null===(e=this.props.selectedCardData)||void 0===e?void 0:e.id,"data-testid":"goToTileCard",loading:this.state.loading,onClose:this.props.handleCloseSelectedCard,onSave:this.handleGoToTileSave,targetCardOptions:this.props.targetCards},this.props.selectedCardData,{targetCard:""+(null!==(t=null===(a=this.props.selectedCardData)||void 0===a?void 0:a.targetCard)&&void 0!==t?t:""),onDrawerClose:this.handleCloseDrawer})),"slider_scale"===this.props.selectedCard&&s.a.createElement(Ws,Object.assign({key:null===(i=this.props.selectedCardData)||void 0===i?void 0:i.id,loading:this.state.loading,"data-testid":"sliderScaleCard",onClose:this.props.handleCloseSelectedCard,onSubmit:this.handleSliderScaleSave,onDrawerClose:this.handleCloseDrawer,botContext:this.props.botContext},this.props.selectedCardData)),"send_message"===this.props.selectedCard&&s.a.createElement(eo,Object.assign({key:null===(o=this.props.selectedCardData)||void 0===o?void 0:o.id,loading:this.state.loading,"data-testid":"sendMessageCard",onClose:this.props.handleCloseSelectedCard,onSubmit:this.handleSendMessageSave,onDrawerClose:this.handleCloseDrawer,botContext:this.props.botContext},this.props.selectedCardData)),"share_link"===this.props.selectedCard&&s.a.createElement(Bo,{key:null===(n=this.props.selectedCardData)||void 0===n?void 0:n.id,loading:this.state.loading,"data-testid":"shareLinkCard",onClose:this.props.handleCloseSelectedCard,onSave:this.handleShareLinkSave,onDrawerClose:this.handleCloseDrawer,title:null===(r=this.props.selectedCardData)||void 0===r?void 0:r.title,message:null===(l=this.props.selectedCardData)||void 0===l?void 0:l.message,id:null===(d=this.props.selectedCardData)||void 0===d?void 0:d.id,initialLinks:null===(c=this.props.selectedCardData)||void 0===c?void 0:c.links,botContext:this.props.botContext}),"rating"===this.props.selectedCard&&s.a.createElement(Wo,Object.assign({key:null===(h=this.props.selectedCardData)||void 0===h?void 0:h.id,loading:this.state.loading,"data-testid":"ratingCard",onClose:this.props.handleCloseSelectedCard,onSave:this.handleRatingSave,onDrawerClose:this.handleCloseDrawer,botContext:this.props.botContext},this.props.selectedCardData)),"end_chat"===this.props.selectedCard&&s.a.createElement(Nr,Object.assign({key:null===(p=this.props.selectedCardData)||void 0===p?void 0:p.id,loading:this.state.loading,"data-testid":"endChatCard",onClose:this.props.handleCloseSelectedCard,onSubmit:this.handleSendMessageSave,onDrawerClose:this.handleCloseDrawer,botContext:this.props.botContext},this.props.selectedCardData)),"dropdown"===this.props.selectedCard&&s.a.createElement(en,Object.assign({key:null===(g=this.props.selectedCardData)||void 0===g?void 0:g.id,"data-testid":"dropdownCard",loading:this.state.loading,onClose:this.props.handleCloseSelectedCard,onSave:this.handleDropdownCardSave,onDrawerClose:this.handleCloseDrawer,botContext:this.props.botContext},this.props.selectedCardData)),this.renderUserGuideCard(),this.renderEmbedFormCard(),"share_video"===this.props.selectedCard&&s.a.createElement(yn,Object.assign({key:null===(u=this.props.selectedCardData)||void 0===u?void 0:u.id,"data-testid":"shareVideoCard",loading:this.state.loading,onClose:this.props.handleCloseSelectedCard,onSave:this.handleShareVideoSave,onDrawerClose:this.handleCloseDrawer,botContext:this.props.botContext},this.props.selectedCardData))))}}var ol=a(1842);const nl=Object(Ta.a)("aside")({backgroundColor:"#FFFFFF",height:"100vh",overflowY:"auto",borderRight:"1px solid #E2E8F0",boxShadow:"0px 2px 8px 0px #00000014",position:"sticky",top:0,flexShrink:0,padding:"24px 0px 24px 20px",scrollbarWidth:"none",width:120,boxSizing:"border-box"}),rl=Object(Ta.a)("ul")({marginTop:32,display:"flex",flexDirection:"column",gap:40,paddingLeft:0,paddingBottom:8,listStyle:"none","& li":{position:"relative",margin:0,padding:0}}),ll=Object(Ta.a)("button")({all:"unset",padding:"9px 0px 9px 0px",width:"100%",cursor:"pointer",display:"flex",flexDirection:"column",gap:1,alignItems:"center",justifyContent:"center",textTransform:"none",fontFamily:"Cairo",fontSize:12,lineHeight:"18px",fontWeight:700,"& .gradient-text":{backgroundImage:"linear-gradient(180deg, #51ABB3 0%, #314A84 100%)",backgroundClip:"text",color:"transparent"},"&.hover":{"&:hover":{borderRadius:"8px 0 0 8px",backgroundColor:"#51ABB31A"}},'&[aria-current="true"]':{backgroundColor:"#51ABB31A",borderRadius:"8px 0 0 8px"}}),dl=Object(Ta.a)("ul")({backgroundColor:"#FFFFFF",padding:"24px 12px",listStyle:"none",borderRadius:8,border:"1px solid #EEF7F7",boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008",margin:0,"& li":{margin:0,padding:0,fontFamily:"Cairo",fontWeight:700,fontSize:18,lineHeight:"26px",color:"#64748B"},"& .title":{padding:"0px 12px 24px",textAlign:"center"}}),cl=Object(Ta.a)("button")({all:"unset",cursor:"pointer",width:127,boxSizing:"border-box",display:"flex",padding:"16px 12px",gap:10,alignItems:"center",fontSize:12,'&[aria-current="true"]':{backgroundColor:"#51ABB31A",borderRadius:"8px"}}),hl=new Set(["training_hub","user_guides","forms","qa","signposting"]);class pl extends K{constructor(e){super(e),this.handleNavigation=e=>()=>{const t=new Q(q(e));t.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),this.send(t)},this.tooltilRender=()=>{const e=this.props.activeMenu,t="user_guides"===e,a="forms"===e,i="qa"===e,o="signposting"===e;return s.a.createElement(dl,null,s.a.createElement("li",{className:"title"},"Training hub"),s.a.createElement("li",null,s.a.createElement(cl,{"aria-current":t,onClick:this.handleNavigation(Z.NavigationBlogpostsManagementMessage)},s.a.createElement(xl,{isActive:t}),s.a.createElement("span",null,"User guides"))),s.a.createElement("li",null,s.a.createElement(cl,{"aria-current":a,onClick:this.handleNavigation(Z.NavigationFormsMessage)},s.a.createElement(El,{isActive:a}),s.a.createElement("span",null,"Forms"))),s.a.createElement("li",null,s.a.createElement(cl,{"aria-current":i,onClick:this.handleNavigation(Z.NavigationQAMessage)},s.a.createElement(vl,{isActive:i}),s.a.createElement("span",null,"Q&As"))),s.a.createElement("li",null,s.a.createElement(cl,{"aria-current":o,onClick:this.handleNavigation(Z.NavigationSignpostingMessage)},s.a.createElement(yl,{isActive:o}),s.a.createElement("span",null,"Signposting"))))},this.subScribedMessages=[],z.attachBuildingBlock(this,this.subScribedMessages)}render(){const e=this.props.activeMenu,t="bots"===e,a="dashboard"===e,i="chats"===e,o="audit"===e,n="analytics"===e,r=!!e&&hl.has(e);return s.a.createElement(nl,null,s.a.createElement("div",{onClick:this.handleNavigation(Z.NavigationDashboardMessage)},s.a.createElement(gl,null)),s.a.createElement(rl,null,s.a.createElement("li",null,s.a.createElement(ll,{"aria-current":a,onClick:this.handleNavigation(Z.NavigationDashboardMessage)},s.a.createElement(ul,null),s.a.createElement("span",{className:"gradient-text"},"Home"))),s.a.createElement("li",null,s.a.createElement(ll,{"aria-current":t,onClick:this.handleNavigation(Z.NavigationBotsMessage)},s.a.createElement(ml,null),s.a.createElement("span",{className:"gradient-text"},"Bots"))),s.a.createElement("li",null,s.a.createElement(ll,{"aria-current":i,onClick:this.handleNavigation(Z.NavigationChatsMessage)},s.a.createElement(Cl,null),s.a.createElement("span",{className:"gradient-text"},"Chats"))),s.a.createElement("li",null,s.a.createElement(ol.a,{title:this.tooltilRender(),interactive:!0,placement:"right"},s.a.createElement(ll,{"aria-current":r,className:"hover",onClick:this.handleNavigation(Z.NavigationTrainingHubMessage)},s.a.createElement(bl,null),s.a.createElement("span",{className:"gradient-text"},"Training hub")))),s.a.createElement("li",null,s.a.createElement(ll,{"aria-current":o,onClick:this.handleNavigation(Z.NavigationAuditMessage)},s.a.createElement(Al,null),s.a.createElement("span",{className:"gradient-text"},"Audit"))),s.a.createElement("li",null,s.a.createElement(ll,{"aria-current":n,onClick:this.handleNavigation(Z.NavigationVisualAnalyticsMessage)},s.a.createElement(fl,null),s.a.createElement("span",{className:"gradient-text"},"Analytics")))))}}function gl(){return s.a.createElement("svg",{width:"80",height:"60",viewBox:"0 0 80 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M29.0263 37.9947C30.7726 37.9947 32.1883 36.579 32.1883 34.8327C32.1883 33.0863 30.7726 31.6707 29.0263 31.6707C27.2799 31.6707 25.8643 33.0863 25.8643 34.8327C25.8643 36.579 27.2799 37.9947 29.0263 37.9947Z",fill:"url(#paint0_linear_15587_22468)"}),s.a.createElement("path",{d:"M50.9706 37.9947C52.7169 37.9947 54.1326 36.579 54.1326 34.8327C54.1326 33.0863 52.7169 31.6707 50.9706 31.6707C49.2243 31.6707 47.8086 33.0863 47.8086 34.8327C47.8086 36.579 49.2243 37.9947 50.9706 37.9947Z",fill:"url(#paint1_linear_15587_22468)"}),s.a.createElement("path",{d:"M60.2535 22.9277C58.3128 19.6525 55.6048 16.8984 52.363 14.9025C49.1212 12.9066 45.4427 11.7288 41.6445 11.4707V7.10466C42.4042 6.73269 43.0155 6.11438 43.3788 5.3505C43.742 4.58663 43.8359 3.72223 43.645 2.8982C43.4541 2.07417 42.9897 1.3391 42.3275 0.812801C41.6653 0.286499 40.8444 0 39.9985 0C39.1527 0 38.3318 0.286499 37.6696 0.812801C37.0074 1.3391 36.543 2.07417 36.3521 2.8982C36.1612 3.72223 36.255 4.58663 36.6183 5.3505C36.9816 6.11438 37.5929 6.73269 38.3525 7.10466V11.4857C34.591 11.7564 30.95 12.9298 27.7382 14.9064C24.5263 16.883 21.8382 19.6046 19.9015 22.8407C17.8847 23.9986 16.2002 25.6567 15.0106 27.6551C13.8209 29.6534 13.1662 31.9245 13.1095 34.2495C13.0528 36.5744 13.5961 38.8747 14.687 40.9286C15.7779 42.9826 17.3795 44.7208 19.3375 45.9757C19.4965 46.2837 19.6655 46.5827 19.8435 46.8817C20.8435 48.9347 18.8845 56.9887 16.5665 58.0537C11.2215 60.5127 27.5705 59.0047 30.5735 56.4047C36.0117 58.7969 42.1539 59.0413 47.7649 57.0886C53.3759 55.136 58.0395 51.1312 60.8175 45.8797C62.7327 44.6143 64.2948 42.883 65.3571 40.8483C66.4195 38.8135 66.9473 36.5422 66.8909 34.2475C66.8345 31.9528 66.1958 29.7101 65.0348 27.73C63.8738 25.7499 62.2285 24.0974 60.2535 22.9277ZM51.6355 46.3707H28.3655C26.8174 46.3708 25.2843 46.0659 23.8539 45.4735C22.4236 44.8811 21.1239 44.0128 20.0292 42.918C18.9344 41.8233 18.0661 40.5236 17.4737 39.0933C16.8813 37.6629 16.5764 36.1298 16.5765 34.5817C16.5764 33.0335 16.8813 31.5004 17.4737 30.07C18.0661 28.6397 18.9344 27.34 20.0292 26.2453C21.1239 25.1505 22.4236 24.2822 23.8539 23.6898C25.2843 23.0974 26.8174 22.7925 28.3655 22.7927H51.6355C53.1837 22.7925 54.7168 23.0974 56.1472 23.6898C57.5775 24.2822 58.8772 25.1505 59.9719 26.2453C61.0667 27.34 61.935 28.6397 62.5274 30.07C63.1198 31.5004 63.4247 33.0335 63.4245 34.5817C63.4247 36.1298 63.1198 37.6629 62.5274 39.0933C61.935 40.5236 61.0667 41.8233 59.9719 42.918C58.8772 44.0128 57.5775 44.8811 56.1472 45.4735C54.7168 46.0659 53.1837 46.3708 51.6355 46.3707Z",fill:"url(#paint2_linear_15587_22468)"}),s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_15587_22468",x1:"29.0263",y1:"31.6707",x2:"29.0263",y2:"37.9947",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"})),s.a.createElement("linearGradient",{id:"paint1_linear_15587_22468",x1:"50.9706",y1:"31.6707",x2:"50.9706",y2:"37.9947",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"})),s.a.createElement("linearGradient",{id:"paint2_linear_15587_22468",x1:"40.0002",y1:"0",x2:"40.0002",y2:"59.3013",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))))}function ul(){return s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M6 18.9995H9V12.9995H15V18.9995H18V9.99951L12 5.49951L6 9.99951V18.9995ZM6 20.9995C5.45 20.9995 4.97933 20.8038 4.588 20.4125C4.196 20.0205 4 19.5495 4 18.9995V9.99951C4 9.68285 4.071 9.38285 4.213 9.09951C4.35433 8.81618 4.55 8.58284 4.8 8.39951L10.8 3.89951C10.9833 3.76618 11.175 3.66618 11.375 3.59951C11.575 3.53284 11.7833 3.49951 12 3.49951C12.2167 3.49951 12.425 3.53284 12.625 3.59951C12.825 3.66618 13.0167 3.76618 13.2 3.89951L19.2 8.39951C19.45 8.58284 19.646 8.81618 19.788 9.09951C19.9293 9.38285 20 9.68285 20 9.99951V18.9995C20 19.5495 19.8043 20.0205 19.413 20.4125C19.021 20.8038 18.55 20.9995 18 20.9995H13V14.9995H11V20.9995H6Z",fill:"url(#paint0_linear_15587_22499)"}),s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_15587_22499",x1:"12",y1:"3.49951",x2:"12",y2:"20.9995",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))))}function ml(){return s.a.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M6.5 11.3013L12 2.30127L17.5 11.3013H6.5ZM17.5 22.3013C16.25 22.3013 15.1875 21.8638 14.3125 20.9888C13.4375 20.1138 13 19.0513 13 17.8013C13 16.5513 13.4375 15.4888 14.3125 14.6138C15.1875 13.7388 16.25 13.3013 17.5 13.3013C18.75 13.3013 19.8125 13.7388 20.6875 14.6138C21.5625 15.4888 22 16.5513 22 17.8013C22 19.0513 21.5625 20.1138 20.6875 20.9888C19.8125 21.8638 18.75 22.3013 17.5 22.3013ZM3 21.8013V13.8013H11V21.8013H3ZM17.5 20.3013C18.2 20.3013 18.7917 20.0596 19.275 19.5763C19.7583 19.0929 20 18.5013 20 17.8013C20 17.1013 19.7583 16.5096 19.275 16.0263C18.7917 15.5429 18.2 15.3013 17.5 15.3013C16.8 15.3013 16.2083 15.5429 15.725 16.0263C15.2417 16.5096 15 17.1013 15 17.8013C15 18.5013 15.2417 19.0929 15.725 19.5763C16.2083 20.0596 16.8 20.3013 17.5 20.3013ZM5 19.8013H9V15.8013H5V19.8013ZM10.05 9.30127H13.95L12 6.15127L10.05 9.30127Z",fill:"url(#paint0_linear_15587_22480)"}),s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_15587_22480",x1:"12.5",y1:"2.30127",x2:"12.5",y2:"22.3013",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))))}function Cl(){return s.a.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.8 3.30127H19.2C20.19 3.30127 21 4.11127 21 5.10127V15.9013C21 16.8913 20.19 17.7013 19.2 17.7013H6.6L3 21.3013V5.10127C3 4.11127 3.81 3.30127 4.8 3.30127ZM6.6 15.9013H18.3C18.795 15.9013 19.2 15.4963 19.2 15.0013V6.00127C19.2 5.50627 18.795 5.10127 18.3 5.10127H5.7C5.205 5.10127 4.8 5.50627 4.8 6.00127V17.7013L6.6 15.9013Z",fill:"url(#paint0_linear_15587_22484)"}),s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_15587_22484",x1:"12",y1:"3.30127",x2:"12",y2:"21.3013",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))))}function bl(){return s.a.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 6.30127H20C21.1 6.30127 22 7.20127 22 8.30127V18.3013C22 19.4013 21.1 20.3013 20 20.3013H4C2.9 20.3013 2 19.4013 2 18.3013L2.01 6.30127C2.01 5.20127 2.9 4.30127 4 4.30127H9.17C9.7 4.30127 10.21 4.51127 10.59 4.89127L12 6.30127ZM4 17.3013C4 17.8513 4.45 18.3013 5 18.3013H19C19.55 18.3013 20 17.8513 20 17.3013V9.30127C20 8.75127 19.55 8.30127 19 8.30127H5C4.45 8.30127 4 8.75127 4 9.30127V17.3013Z",fill:"url(#paint0_linear_15587_22490)"}),s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_15587_22490",x1:"12",y1:"4.30127",x2:"12",y2:"20.3013",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))))}function Al(){return s.a.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M8 18.3013H16V16.3013H8V18.3013ZM8 14.3013H16V12.3013H8V14.3013ZM6 22.3013C5.45 22.3013 4.97933 22.1056 4.588 21.7143C4.196 21.3223 4 20.8513 4 20.3013V4.30127C4 3.75127 4.196 3.28027 4.588 2.88827C4.97933 2.49694 5.45 2.30127 6 2.30127H14L20 8.30127V20.3013C20 20.8513 19.8043 21.3223 19.413 21.7143C19.021 22.1056 18.55 22.3013 18 22.3013H6ZM13 9.30127V4.30127H6V20.3013H18V9.30127H13Z",fill:"url(#paint0_linear_15587_22496)"}),s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_15587_22496",x1:"12",y1:"2.30127",x2:"12",y2:"22.3013",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))))}function fl(){return s.a.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4.30127C12.83 4.30127 13.5 4.97127 13.5 5.80127V18.8013C13.5 19.6313 12.83 20.3013 12 20.3013C11.17 20.3013 10.5 19.6313 10.5 18.8013V5.80127C10.5 4.97127 11.17 4.30127 12 4.30127ZM18.0005 14.3013C18.8305 14.3013 19.5005 14.9713 19.5005 15.8013V18.8013C19.5005 19.6313 18.8305 20.3013 18.0005 20.3013C17.1705 20.3013 16.5005 19.6313 16.5005 18.8013V15.8013C16.5005 14.9713 17.1705 14.3013 18.0005 14.3013ZM7.5 10.8013C7.5 9.97125 6.83 9.30125 6 9.30125C5.17 9.30125 4.5 9.97125 4.5 10.8013V18.8013C4.5 19.6313 5.17 20.3013 6 20.3013C6.83 20.3013 7.5 19.6313 7.5 18.8013V10.8013Z",fill:"url(#paint0_linear_15587_22504)"}),s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_15587_22504",x1:"12.0002",y1:"4.30127",x2:"12.0002",y2:"20.3013",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))))}function xl(e){let{isActive:t}=e;return s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M17 17C17.4167 17 17.7707 16.854 18.062 16.562C18.354 16.2707 18.5 15.9167 18.5 15.5C18.5 15.0833 18.354 14.7293 18.062 14.438C17.7707 14.146 17.4167 14 17 14C16.5833 14 16.2293 14.146 15.938 14.438C15.646 14.7293 15.5 15.0833 15.5 15.5C15.5 15.9167 15.646 16.2707 15.938 16.562C16.2293 16.854 16.5833 17 17 17ZM17 20C17.5 20 17.9667 19.8833 18.4 19.65C18.8333 19.4167 19.1917 19.0917 19.475 18.675C19.0917 18.4417 18.6917 18.271 18.275 18.163C17.8583 18.0543 17.4333 18 17 18C16.5667 18 16.1417 18.0543 15.725 18.163C15.3083 18.271 14.9083 18.4417 14.525 18.675C14.8083 19.0917 15.1667 19.4167 15.6 19.65C16.0333 19.8833 16.5 20 17 20ZM4 20C3.45 20 2.979 19.8043 2.587 19.413C2.19567 19.021 2 18.55 2 18V4C2 3.45 2.19567 2.979 2.587 2.587C2.979 2.19567 3.45 2 4 2H18C18.55 2 19.021 2.19567 19.413 2.587C19.8043 2.979 20 3.45 20 4V10.7C19.6833 10.55 19.3583 10.4207 19.025 10.312C18.6917 10.204 18.35 10.125 18 10.075V4H4V18H10.05C10.1 18.3667 10.1793 18.7167 10.288 19.05C10.396 19.3833 10.525 19.7 10.675 20H4ZM4 18V4V10.075V10V18ZM6 16H10.075C10.125 15.65 10.204 15.3083 10.312 14.975C10.4207 14.6417 10.5417 14.3167 10.675 14H6V16ZM6 12H12.1C12.6333 11.5 13.229 11.0833 13.887 10.75C14.5457 10.4167 15.25 10.1917 16 10.075V10H6V12ZM6 8H16V6H6V8ZM17 22C15.6167 22 14.4377 21.5127 13.463 20.538C12.4877 19.5627 12 18.3833 12 17C12 15.6167 12.4877 14.4373 13.463 13.462C14.4377 12.4873 15.6167 12 17 12C18.3833 12 19.5627 12.4873 20.538 13.462C21.5127 14.4373 22 15.6167 22 17C22 18.3833 21.5127 19.5627 20.538 20.538C19.5627 21.5127 18.3833 22 17 22Z",fill:t?"url(#paint0_linear_18146_11196)":"#64748B"}),t?s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_18146_11196",x1:"12",y1:"2",x2:"12",y2:"22",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))):null)}function El(e){let{isActive:t}=e;return s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 3H14.82C14.4 1.84 13.3 1 12 1C10.7 1 9.6 1.84 9.18 3H5C3.9 3 3 3.9 3 5V21C3 22.1 3.9 23 5 23H19C20.1 23 21 22.1 21 21V5C21 3.9 20.1 3 19 3ZM12 3C12.55 3 13 3.45 13 4C13 4.55 12.55 5 12 5C11.45 5 11 4.55 11 4C11 3.45 11.45 3 12 3ZM5 20C5 20.55 5.45 21 6 21H18C18.55 21 19 20.55 19 20V6C19 5.45 18.55 5 18 5H17V6C17 7.1 16.1 8 15 8H9C7.9 8 7 7.1 7 6V5H6C5.45 5 5 5.45 5 6V20Z",fill:t?"url(#paint0_linear_18146_11197)":"#64748B"}),t?s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_18146_11197",x1:"12",y1:"2",x2:"12",y2:"22",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))):null)}function vl(e){let{isActive:t}=e;return s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.34 15.0213C11.73 15.4113 12.36 15.4113 12.75 15.0213L19.11 8.66126C19.5 8.27126 19.5 7.64126 19.11 7.25126L14.16 2.30126C13.78 1.90126 13.15 1.90126 12.76 2.29126L6.39 8.66126C6 9.05126 6 9.68126 6.39 10.0713L11.34 15.0213ZM13.46 4.41126L17 7.95126L12.05 12.9013L8.51 9.36126L13.46 4.41126ZM18.29 13.2913L20.41 15.4113C20.79 15.7913 21 16.3013 21 16.8313V20.0013C21 21.1113 20.1 22.0013 19 22.0013H5C3.9 22.0013 3 21.1013 3 20.0013V16.8313C3 16.3013 3.21 15.7913 3.58 15.4113L5.7 13.2913C5.89 13.1113 6.14 13.0013 6.41 13.0013H6.83L8.83 15.0013H6.78L5 17.0013H19L17.23 15.0013H15.32L17.32 13.0013H17.59C17.85 13.0013 18.11 13.1113 18.29 13.2913Z",fill:t?"url(#paint0_linear_18146_11198)":"#64748B"}),t?s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_18146_11198",x1:"12",y1:"2",x2:"12",y2:"22",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))):null)}function yl(e){let{isActive:t}=e;return s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 8V4.5C4 4.22 4.22 4 4.5 4H8L4 8ZM20 8L16 4H19.5C19.78 4 20 4.22 20 4.5V8ZM20 19.5V16L16 20H19.5C19.78 20 20 19.78 20 19.5ZM8 20H4.5C4.22 20 4 19.78 4 19.5V16L8 20ZM19 12C19 8.13 15.87 5 12 5C8.13 5 5 8.13 5 12C5 15.87 8.13 19 12 19C15.87 19 19 15.87 19 12ZM7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12Z",fill:t?"url(#paint0_linear_18146_11199)":"#64748B"}),t?s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"paint0_linear_18146_11199",x1:"12",y1:"2",x2:"12",y2:"22",gradientUnits:"userSpaceOnUse"},s.a.createElement("stop",{stopColor:"#51ABB3"}),s.a.createElement("stop",{offset:"1",stopColor:"#314A84"}))):null)}var wl=a(1774);const Il=Object(Ta.a)("div")({display:"flex",alignItems:"center",gap:8,padding:"10px 16px",borderRadius:20,backgroundColor:"#FFFFFF",boxShadow:"0px 2px 8px 0px #00000014","& .title":{fontWeight:700,fontSize:16,lineHeight:"24px",color:"#0F172A",fontFamily:"Cairo"}});function Pl(e){let{data:t}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement(Pn.c,{type:"source",position:Pn.e.Bottom,style:{opacity:0,bottom:0,zIndex:-1}}),s.a.createElement(Il,null,s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M6 21C5.45 21 4.97933 20.8043 4.588 20.413C4.196 20.021 4 19.55 4 19V10C4 9.68333 4.071 9.38333 4.213 9.1C4.35433 8.81667 4.55 8.58333 4.8 8.4L10.8 3.9C10.9833 3.76667 11.175 3.66667 11.375 3.6C11.575 3.53333 11.7833 3.5 12 3.5C12.2167 3.5 12.425 3.53333 12.625 3.6C12.825 3.66667 13.0167 3.76667 13.2 3.9L19.2 8.4C19.45 8.58333 19.646 8.81667 19.788 9.1C19.9293 9.38333 20 9.68333 20 10V19C20 19.55 19.8043 20.021 19.413 20.413C19.021 20.8043 18.55 21 18 21H13V15H11V21H6Z",fill:"#059669"})),s.a.createElement("span",{className:"title"},t.title)))}const Sl=Object(Ta.a)("button")({all:"unset",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",height:44,width:44,borderRadius:100,backgroundColor:"#51ABB3",boxShadow:"0px 2px 8px 0px #00000014"});function Ml(e){let{data:t}=e;const{status:a,onClick:i,...o}=t;return s.a.createElement(s.a.Fragment,null,s.a.createElement(Pn.c,{type:"target",position:Pn.e.Left,style:{opacity:0,left:0,zIndex:-1}}),s.a.createElement(Sl,{"data-testid":"open-card",onClick:()=>null===i||void 0===i?void 0:i(o),"aria-label":"show card drawer"},s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M18 13H13V18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18V13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H11V6C11 5.45 11.45 5 12 5C12.55 5 13 5.45 13 6V11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z",fill:"white"}))))}const Fl=Object(Yt.a)({ruleName:{padding:"4px 16px",backgroundColor:"#51ABB3CC",boxShadow:"0px 2px 8px 0px #00000014",borderRadius:100,fontFamily:"Cairo",fontWeight:600,fontSize:14,lineHeight:"24px",color:"#FFFFFF"},ruleDetailContainer:{boxSizing:"border-box",padding:16,borderRadius:8,boxShadow:"0px 2px 8px 0px #00000014",backgroundColor:"#FFFFFF",minWidth:177,maxWidth:250,gap:8,display:"flex",flexDirection:"column"},ruleTitle:{fontFamily:"Cairo",fontSize:16,fontWeight:700,lineHeight:"32px",color:"#0F172A"},criteriaDetail:{"& > p":{display:"flex",gap:"4px 8px",flexWrap:"wrap",margin:0,fontFamily:"Cairo",fontSize:14,fontWeight:400,lineHeight:"22px",color:"#51ABB3","& > span":{color:"#0F172A"}}},notMatched:{backgroundColor:"#2e457b"},actionTitle:{backgroundColor:"#51ABB3",fontWeight:500}}),Rl={operating_system:"Operating system",time_of_the_day:"Time of the day",current_page_url:"Current page URL",bot_contexts:"Context variable"},Dl={android:"Android",blackberry:"Blackberry",iOS:"iOS",iPadOS:"iPadOS",linux:"Linux",windows:"Windows",nokia:"Nokia",macOS:"Mac OS"},Bl={is_equal_to:"is",is_not_equal_to:"is not",contains:"contains",between:"between",after:"after",before:"before"};var Tl=e=>{let{id:t,sourceX:a,sourceY:o,targetX:n,targetY:r,sourcePosition:l,targetPosition:d,style:c,markerEnd:h,data:p,source:g,target:u}=e;const[m,C,b]=Object(Pn.i)({sourceX:a,sourceY:o,targetX:n,targetY:r,sourcePosition:l,targetPosition:d,borderRadius:25}),A=Fl(),[f,x]=Object(i.useState)(!1);let E={strokeWidth:2,stroke:"#334155"};return"dashed"===(null===p||void 0===p?void 0:p.strokeStyle)&&(E={...E,stroke:"#51ABB3",strokeDasharray:"5",strokeLinecap:"round"}),(null===p||void 0===p?void 0:p.hasError)&&(E.stroke="#DC2626"),s.a.createElement("g",{style:{position:"relative"},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},s.a.createElement(Pn.a,{interactionWidth:10,labelX:C,labelY:b,path:m,markerEnd:h,style:{...E,...c}}),s.a.createElement(Pn.b,null,"solid"===(null===p||void 0===p?void 0:p.strokeStyle)&&"start"!==g&&f&&s.a.createElement("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${C}px,${b}px)`,pointerEvents:"all",zIndex:5},className:"nodrag"},s.a.createElement("button",{style:{all:"unset",cursor:"pointer"},onClick:async()=>{var e,t,a;const i={token:null!==(e=await B("authToken"))&&void 0!==e?e:sessionStorage.getItem("authToken"),"Content-Type":"application/json"},s={card_id:u,connector_card_ids:+g};(null===p||void 0===p?void 0:p.rule)&&(s.previous_card_id=p.rule.criteria_routing_id),(null===p||void 0===p?void 0:p.followUpAction)&&(s.follow_up_action_id=p.followUpAction.id);const o=new Q(q(Z.RestAPIRequestMessage));o.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(i)),o.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(s)),o.addData(q(Z.RestAPIRequestMethodMessage),"PUT"),o.addData(q(Z.RestAPIResponceEndPointMessage),"bx_block_chatbot6/remove_source"),o.addData(q(Z.NavigationPropsMessage),{title:"RemoveSourceFromConnectorCardData",criteriaRoutingId:null===p||void 0===p||null===(t=p.rule)||void 0===t?void 0:t.criteria_routing_id,cardId:+g,followUpActionId:null===p||void 0===p||null===(a=p.followUpAction)||void 0===a?void 0:a.id}),z.sendMessage(o.id,o)}},s.a.createElement("svg",{width:"52",height:"52",viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("g",{filter:"url(#filter0_d_14516_11937)"},s.a.createElement("rect",{x:"8",y:"6",width:"36",height:"36",rx:"18",fill:"#DC2626"}),s.a.createElement("path",{d:"M33 33L26 26L23.65 28.35C23.7833 28.6 23.875 28.8667 23.925 29.15C23.975 29.4333 24 29.7167 24 30C24 31.1 23.6083 32.0417 22.825 32.825C22.0417 33.6083 21.1 34 20 34C18.9 34 17.9583 33.6083 17.175 32.825C16.3917 32.0417 16 31.1 16 30C16 28.9 16.3917 27.9583 17.175 27.175C17.9583 26.3917 18.9 26 20 26C20.2833 26 20.5667 26.025 20.85 26.075C21.1333 26.125 21.4 26.2167 21.65 26.35L24 24L21.65 21.65C21.4 21.7833 21.1333 21.875 20.85 21.925C20.5667 21.975 20.2833 22 20 22C18.9 22 17.9583 21.6083 17.175 20.825C16.3917 20.0417 16 19.1 16 18C16 16.9 16.3917 15.9583 17.175 15.175C17.9583 14.3917 18.9 14 20 14C21.1 14 22.0417 14.3917 22.825 15.175C23.6083 15.9583 24 16.9 24 18C24 18.2833 23.975 18.5667 23.925 18.85C23.875 19.1333 23.7833 19.4 23.65 19.65L36 32V33H33ZM29 23L27 21L33 15H36V16L29 23ZM20 20C20.55 20 21.0208 19.8042 21.4125 19.4125C21.8042 19.0208 22 18.55 22 18C22 17.45 21.8042 16.9792 21.4125 16.5875C21.0208 16.1958 20.55 16 20 16C19.45 16 18.9792 16.1958 18.5875 16.5875C18.1958 16.9792 18 17.45 18 18C18 18.55 18.1958 19.0208 18.5875 19.4125C18.9792 19.8042 19.45 20 20 20ZM26 24.5C26.1333 24.5 26.25 24.45 26.35 24.35C26.45 24.25 26.5 24.1333 26.5 24C26.5 23.8667 26.45 23.75 26.35 23.65C26.25 23.55 26.1333 23.5 26 23.5C25.8667 23.5 25.75 23.55 25.65 23.65C25.55 23.75 25.5 23.8667 25.5 24C25.5 24.1333 25.55 24.25 25.65 24.35C25.75 24.45 25.8667 24.5 26 24.5ZM20 32C20.55 32 21.0208 31.8042 21.4125 31.4125C21.8042 31.0208 22 30.55 22 30C22 29.45 21.8042 28.9792 21.4125 28.5875C21.0208 28.1958 20.55 28 20 28C19.45 28 18.9792 28.1958 18.5875 28.5875C18.1958 28.9792 18 29.45 18 30C18 30.55 18.1958 31.0208 18.5875 31.4125C18.9792 31.8042 19.45 32 20 32Z",fill:"white"})),s.a.createElement("defs",null,s.a.createElement("filter",{id:"filter0_d_14516_11937",x:"0",y:"0",width:"52",height:"52",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},s.a.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),s.a.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),s.a.createElement("feOffset",{dy:"2"}),s.a.createElement("feGaussianBlur",{stdDeviation:"4"}),s.a.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),s.a.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),s.a.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_14516_11937"}),s.a.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_14516_11937",result:"shape"})))))),(null===p||void 0===p?void 0:p.rule)&&s.a.createElement("div",{style:{position:"absolute",transform:`translate(-75%, -50%) translate(${C}px,${b}px)`,pointerEvents:"all",zIndex:3},className:"nodrag"},"Not Matched"===p.rule.title?s.a.createElement("div",{className:`${A.ruleName} ${A.notMatched}`},p.rule.title):s.a.createElement(ol.a,{interactive:!0,placement:"top-start",title:(v=p.rule.rules,y=p.rule.title,s.a.createElement("div",{className:A.ruleDetailContainer},s.a.createElement("div",{className:A.ruleTitle},y),v.map((e,t)=>s.a.createElement("div",{key:t,className:A.criteriaDetail},s.a.createElement("p",null,Rl[e.field_name],e.sub_field?" "+e.sub_field:"",s.a.createElement("span",null,`${Bl[e.comparator]} ${(e=>{let t="";return"operating_system"===e.field_name&&(t=e.values.map(e=>Dl[e]).join(", ")),"time_of_the_day"===e.field_name&&(t=e.values.join(" and ")),"current_page_url"===e.field_name&&(t=e.values[0]),"bot_contexts"===e.field_name&&(t=e.values.join(", ")),t})(e)}`))))))},s.a.createElement("div",{className:`${A.ruleName} ${"Not Matched"===p.rule.title?A.notMatched:""}`},p.rule.title))),(null===p||void 0===p?void 0:p.followUpAction)&&s.a.createElement("div",{style:{position:"absolute",transform:`translate(-75%, -50%) translate(${C}px,${b}px)`,pointerEvents:"all"},className:"nodrag"},s.a.createElement("div",{className:`${A.ruleName} ${A.actionTitle}`},p.followUpAction.title))));var v,y},kl=a(1773);const Nl=Object(Yt.a)({control:{position:"absolute",zIndex:5,right:49,bottom:24,display:"flex",flexDirection:"column"},controlButton:{all:"unset",cursor:"pointer",height:44,width:44,display:"grid",placeItems:"center",boxShadow:"0px 2px 8px 0px #00000014",backgroundColor:"#FFFFFF",borderRadius:"8px 8px 0 0",borderBottom:"1px solid #94A3B8","&.minus":{borderRadius:"0 0 8px 8px",borderTop:"1px solid #94A3B8",borderBottom:0}}});function Ol(){const e=Nl(),{zoomIn:t,zoomOut:a}=Object(Pn.n)();return s.a.createElement("div",{className:e.control},s.a.createElement("button",{onClick:()=>t(),className:e.controlButton},s.a.createElement(Kn.a,{htmlColor:"#0F172A"})),s.a.createElement("button",{onClick:()=>a(),className:e.controlButton+" minus"},s.a.createElement(kl.a,{htmlColor:"#0F172A"})))}const Ll=Object(Yt.a)({card:{boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008",backgroundColor:"#94A3B8",borderRadius:12,width:327,cursor:"pointer","&:hover":{backgroundColor:"#51ABB3","& .cardContent":{border:"2px solid #51ABB3"}},"& .cardContent":{backgroundColor:"#FFFFFF",borderRadius:"12px",padding:16,border:"2px solid transparent","& > p":{margin:0,fontFamily:"Cairo",fontWeight:400,fontSize:14,lineHeight:"22px",wordWrap:"break-word",whiteSpaceCollapse:"preserve"},"& > div":{margin:"0 auto"}},'&[data-error="true"]':{backgroundColor:"#DC2626","& .cardContent":{borderColor:"#DC2626",borderRadius:"12px 12px 0 0"},"&:hover":{backgroundColor:"#DC2626","& .cardContent":{border:"2px solid #DC2626"}}}},cardHeader:{display:"flex",gap:2,alignItems:"center",justifyContent:"space-between",padding:"8px 16px","& > p":{margin:0,fontFamily:"Inter",fontWeight:700,fontSize:14,lineHeight:"22px",color:"#FFFFFF"},"& > button":{all:"unset",cursor:"pointer"}},cardFooter:{borderRadius:"0 0 12px 12px",padding:"8px 16px"},error:{border:"2px solid #DC2626",padding:"8px 16px",display:"flex",gap:8,alignItems:"center",backgroundColor:"#FEE2E2",borderRadius:"0px 0px 12px 12px","& > p":{margin:0,fontFamily:"Cairo",fontWeight:500,fontSize:10,lineHeight:"18px",color:"#DC2626"}},icon:{display:"flex",justifyContent:"center"},highlight:{color:"#51ABB3"}}),Hl={go_to_tile:s.a.createElement(ls.a,{htmlColor:"#334155"}),criteria_routing:s.a.createElement(ds.a,{htmlColor:"#334155"})},_l=/(%[^%]+%)/g,Vl=(e,t)=>{let a="secondary-handle";return e||(a="primary-handle"),(!e&&t||"This tile is unconnected to the flow, please connect or delete it"===t||"This branch is incomplete, please add a 'end chat' tile before publication"===t)&&(a="danger-handle"),a};function Ul(){return s.a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 9C1.5 4.86 4.8525 1.5 8.9925 1.5C13.14 1.5 16.5 4.86 16.5 9C16.5 13.14 13.14 16.5 8.9925 16.5C4.8525 16.5 1.5 13.14 1.5 9ZM9.75 6C9.75 5.5875 9.4125 5.25 9 5.25C8.5875 5.25 8.25 5.5875 8.25 6V9C8.25 9.4125 8.5875 9.75 9 9.75C9.4125 9.75 9.75 9.4125 9.75 9V6ZM9 15C5.685 15 3 12.315 3 9C3 5.685 5.685 3 9 3C12.315 3 15 5.685 15 9C15 12.315 12.315 15 9 15ZM8.25 11.25V12.75H9.75V11.25H8.25Z",fill:"#DC2626"}))}const Wl=Object(De.a)({overrides:{MuiPopover:{paper:{border:"1px solid #E2E8F0",minWidth:0,maxWidth:"212px",width:212,backgroundColor:"#FFFFFF",padding:0,boxSizing:"border-box",flexDirection:"column",display:"flex",gap:2,"& > button":{all:"unset",cursor:"pointer",fontWeight:400,display:"flex",gap:8,color:"#0F172A",alignItems:"center",padding:"9px 16px",fontSize:14,lineHeight:"22px",fontFamily:"Cairo"}}},MuiPaper:{rounded:{borderRadius:8},elevation8:{boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008"}}}}),jl=Object(Yt.a)({moreIconButton:{all:"unset",cursor:"pointer",width:46,height:46,boxSizing:"border-box",padding:11,borderRadius:24,color:"#0F172A8C",'&[aria-haspopup="true"]':{backgroundColor:"#0F172A8C",color:"#FFFFFF"}}});function zl(e){let{children:t}=e;const[a,o]=Object(i.useState)([]),[n,r]=Object(i.useState)(!1),[l,d]=Object(i.useState)(null),c=Object(i.useRef)({top:0,left:0}),h=Object(Pn.o)(e=>e.nodesSelectionActive),p=jl(),g=Object(i.useCallback)(e=>{const t=e.nodes.filter(e=>!e.id.startsWith("end"));o(t)},[]);Object(Pn.m)({onChange:g}),Object(i.useEffect)(()=>{if(!h)return void r(!1);const e=document.querySelector(".react-flow__nodesselection-rect");if(!e)return;const t=e.getBoundingClientRect();c.current={top:t.top,left:t.right+10},r(!0)},[h]),Object(i.useEffect)(()=>{0===a.length&&(d(null),r(!1))},[a]);const u=()=>d(null),m=Boolean(l);return s.a.createElement(Be.a,{theme:Wl},n&&s.a.createElement("button",{className:p.moreIconButton,"aria-controls":"selected-nodes-popover","aria-haspopup":m,style:{position:"fixed",zIndex:12,...c.current},onClick:e=>{d(e.currentTarget)}},s.a.createElement(sr.a,{htmlColor:"currentColor"})),s.a.createElement(Mt.a,{open:m,onClose:u,id:"selected-nodes-popover",anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},anchorEl:l},t(a,u)))}const Ql={homeNode:Pl,addNode:Ml,cardNode:function(e){var t,a;let{data:i}=e;const o=Ll(),n=i.message.split(_l).map((e,t)=>_l.test(e)?s.a.createElement("span",{key:t,className:o.highlight},e):e);let r=0;const l=90-r;let d,c=1;return"criteria_routing"===i.type&&(r=10*i.criteriaRoutings.length,c=i.criteriaRoutings.length+1,d=Math.floor(l/c)+i.criteriaRoutings.length),"openai"===i.type&&(r=10*i.followUpActions.length,c=i.followUpActions.length+1,d=Math.floor(l/c)+i.followUpActions.length),s.a.createElement(s.a.Fragment,null,s.a.createElement(Pn.c,{type:"target",position:Pn.e.Left,style:{opacity:0,left:0,zIndex:-1}}),s.a.createElement("div",{className:o.card,onClick:e=>{e.stopPropagation();const{onClick:t,status:a,...s}=i;null===t||void 0===t||t(s)},"data-error":!!i.error},s.a.createElement("div",{className:o.cardHeader},s.a.createElement("p",null,i.title),s.a.createElement("button",{onClick:e=>{var t;e.stopPropagation(),null===(t=i.onCardNodeDelete)||void 0===t||t.call(i,{id:i.id,title:i.title,source:i.source})}},s.a.createElement(Za.a,{htmlColor:"#FFFFFF"}))),s.a.createElement("div",{className:"cardContent"},"go_to_tile"===i.type||"criteria_routing"===i.type?s.a.createElement("div",{className:o.icon},Hl[i.type]):s.a.createElement("p",null,n)),i.error&&s.a.createElement("div",{className:o.error},s.a.createElement(Ul,null),s.a.createElement("p",null,i.error))),"criteria_routing"===i.type?s.a.createElement(s.a.Fragment,null,null===(t=i.criteriaRoutings)||void 0===t?void 0:t.map((e,t)=>s.a.createElement(Pn.c,{key:e.criteria_routing_id,type:"source",position:Pn.e.Right,style:{width:10,height:10,borderRadius:20,right:-7,top:10+d*(t+1)},id:""+e.criteria_routing_id,className:Vl(e.nextCardId,i.error)}))):"openai"===i.type?s.a.createElement(s.a.Fragment,null,null===(a=i.followUpActions)||void 0===a?void 0:a.map((e,t)=>s.a.createElement(Pn.c,{key:e.id,type:"source",position:Pn.e.Right,style:{width:10,height:10,borderRadius:20,right:-7,top:10+d*(t+1)},id:""+e.id,className:Vl(e.redirectCardId,i.error)}))):s.a.createElement(Pn.c,{type:"source",position:Pn.e.Right,style:{width:10,height:10,borderRadius:20,right:-7}}))}},Gl={smoothDashEdge:Tl};function ql(e){let{cardData:t,onAddNodeClick:a,onCardNodeClick:o,onCardNodeDelete:n,onTemplateCreate:r,isTemplate:l,checkForError:d,handleConnectNode:c,templateCreateLoading:h,handleDeleteMultipleCards:p}=e;const g={id:"start",type:"homeNode",position:{x:24,y:24},data:{title:"Home",message:"Home",status:"disconnected",source:[],type:"send_message",id:Date.now(),connectorCardType:l?"template":"chatbot",height:44}},u={title:"Add Node",message:"Add Node",status:"connected",type:"add_node",source:["start"],id:Date.now(),connectorCardType:l?"template":"chatbot",height:44},[m,C,b]=Object(Pn.l)([g,{id:"end",type:"addNode",position:{x:157,y:138},data:{...u,onClick:a}}]),[A,f,x]=Object(Pn.j)([{id:"e1-2",source:"start",target:"end",type:"smoothDashEdge",markerEnd:{type:Pn.d.ArrowClosed,color:"#51ABB3"},data:{strokeStyle:"dashed"}}]),[E,v]=Object(i.useState)(!1),y=Object(i.useRef)([]),{getIntersectingNodes:w}=Object(Pn.n)();Object(i.useEffect)(()=>{if(0===t.length){const e=[g,{id:"end",position:{x:157,y:138},type:"addNode",data:{...u,onClick:a}}],t=[{id:"e1-2",type:"smoothDashEdge",markerEnd:{type:Pn.d.ArrowClosed,color:"#51ABB3"},target:"end",source:"start",data:{strokeStyle:"dashed"}}];return C(e),void f(t)}const e=t.sort((e,t)=>e.id-t.id),i=[g],s=document.createElement("div");s.id="hidden-container",s.style.position="absolute",s.style.top="-99999px",document.body.appendChild(s);const r=document.createDocumentFragment();e.forEach(e=>{i.push({id:""+e.id,position:{x:0,y:0},type:"cardNode",className:e.className,data:{...e,onClick:o,onCardNodeDelete:n}}),r.appendChild((e=>{const t=document.createElement("div");t.id=""+e.id,t.style.width="327px";const a=document.createElement("p");a.textContent=e.title,a.style.padding="8px 16px",a.style.margin="0px",a.style.lineHeight="24px",a.style.boxSizing="border-box";const i=document.createElement("p");return i.textContent=e.message,i.style.padding="16px",i.style.margin="0px",i.style.lineHeight="24px",i.style.boxSizing="border-box",i.className="white-space-collapse","criteria_routing"!==e.type&&"go_to_tile"!==e.type&&"openai"!==e.type||(i.style.height="56px"),t.appendChild(a),t.appendChild(i),t})(e))}),s.appendChild(r);const{newEdges:l,newNodes:c}=Dn.getNewNodesWithNewEdges({nodes:i,onAddNodeClick:a,checkForError:d});C(c),f(l),document.body.removeChild(s)},[t,d]);const I=Object(i.useCallback)(e=>f(t=>Object(Pn.h)(e,t)),[f]),P=Object(i.useCallback)((e,t)=>{if(!t.id.startsWith("end")||t.data.source.includes("start"))return;const a=w(t)[0];if(!a)return;const i=t.data.source[0];a.id.startsWith("end")||"start"===a.id||a.id===i||c(a.id,t.data.source,t.data.criteriaRoutingId,t.data.followUpActionId)},[]);return s.a.createElement(Pn.f,{nodes:m,edges:A,proOptions:{hideAttribution:!0},nodeTypes:Ql,edgeTypes:Gl,onNodesChange:b,onEdgesChange:x,onConnect:I,"data-testid":"flow",noPanClassName:"no-pan",selectionKeyCode:l?null:"Shift",onNodeDragStop:P,maxZoom:4,minZoom:.2},s.a.createElement(zl,{"data-testid":"node-selection"},(e,t)=>s.a.createElement(s.a.Fragment,null,s.a.createElement("button",{"data-testid":"create-template",onClick:()=>{(e=>{y.current=e,v(!0)})(e),t()}},s.a.createElement(or.a,{htmlColor:"#0F172A"}),"Create as New Template"),s.a.createElement("button",{onClick:()=>{p(e),t()}},s.a.createElement(Za.a,{htmlColor:"#0F172A"}),"Delete cards"))),s.a.createElement(Ol,null),s.a.createElement(wl.a,{variant:wl.b.Dots,color:"#475569",gap:12,size:1}),s.a.createElement(ir,{"data-testid":"template-popup",type:"template",open:E,handleClose:()=>v(!1),onSubmit:e=>{r(y.current,e)},isCreateOrUpdateLoading:h}))}class Zl extends K{constructor(e){super(e),this.chatbotCallId=null,this.chatbotUpdateCallId=null,this.botId="",this.initialChatbotName="",this.templateCallId=null,this.templateNameUpdateCallId=null,this.handleEditName=()=>{this.setState({isEditingName:!0})},this.handleChatbotNameChange=e=>{this.setState({chatbotName:e.target.value})},this.handleChatbotNameBlur=e=>{const t=e.target.value;if(this.setState({isEditingName:!1}),t===this.initialChatbotName)return;const a={"Content-Type":Bn.validationApiContentType,token:this.state.token};let i={data:{attributes:{name:t}}},s=`${Bn.chatbotEndpoint}/${this.botId}`;this.props.isTemplate&&(i={card_template:{name:t}},s=`${Bn.createTemplateEndpoint}/${this.botId}`);const o=new Q(q(Z.RestAPIRequestMessage));o.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(i)),o.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),o.addData(q(Z.RestAPIRequestMethodMessage),"PUT"),o.addData(q(Z.RestAPIResponceEndPointMessage),s),this.chatbotUpdateCallId=o.messageId,this.send(o)},this.receive=this.receive.bind(this),this.botId=this.props.navigation.getParam("navigationBarTitleText"),this.subScribedMessages=[q(Z.RestAPIResponceMessage)],this.state={chatbotName:"",isEditingName:!1,token:""},z.attachBuildingBlock(this,this.subScribedMessages),this.handleRestApiResponse=this.handleRestApiResponse.bind(this),this.handleFetchChatbotDetail=this.handleFetchChatbotDetail.bind(this),this.handleChatbotDetailResponse=this.handleChatbotDetailResponse.bind(this),this.handleChatbotUpdateResponse=this.handleChatbotUpdateResponse.bind(this)}async receive(e,t){t.id===q(Z.RestAPIResponceMessage)&&this.handleRestApiResponse(t)}async componentDidMount(){var e;const t=null!==(e=await B("authToken"))&&void 0!==e?e:sessionStorage.getItem("authToken");this.setState({token:t}),this.handleFetchChatbotDetail(t,this.props.isTemplate)}handleRestApiResponse(e){const t={},a=e.getData(q(Z.RestAPIResponceDataMessage));this.chatbotCallId&&this.chatbotCallId===a&&(t[this.chatbotCallId]=this.handleChatbotDetailResponse),this.chatbotUpdateCallId&&this.chatbotUpdateCallId===a&&(t[this.chatbotUpdateCallId]=this.handleChatbotUpdateResponse);const i=t[a];i&&i(e)}async handleChatbotDetailResponse(e){const t=e.getData(q(Z.RestAPIResponceSuccessMessage));if(t.data){this.initialChatbotName=t.data.attributes.name,this.setState({chatbotName:t.data.attributes.name});const{chatbot_url:e,qr_code:a,edatt:i}=t.general_setting.data.attributes,s=!e||!a;this.props.handleSetEdattWithChatbotSettingsError(i,s)}}async handleChatbotUpdateResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));i?(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)?await this.props.handleLogout():i.message&&Pi.b.success(i.message,{className:"success__toast"}):Pi.b.error("Failed to update chatbot details",{className:"error__toast"})}handleFetchChatbotDetail(e,t){const a=new Q(q(Z.RestAPIRequestMessage));this.chatbotCallId=a.messageId;const i={token:e,"Content-Type":Bn.validationApiContentType};a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(i)),a.addData(q(Z.RestAPIResponceEndPointMessage),t?`${Bn.createTemplateEndpoint}/${this.botId}`:`${Bn.chatbotEndpoint}/${this.botId}`),a.addData(q(Z.RestAPIRequestMethodMessage),Bn.validationApiMethodType),a.addData(q(Z.NavigationPropsMessage),{title:"ChtabotName"}),this.send(a)}}var Jl=a(1775);const Yl=Object(Ta.a)("div")({gap:8,display:"flex",alignItems:"center","& .cursor-pointer":{cursor:"pointer"}}),Kl=Object(Ta.a)("input")({height:26,fontSize:18,fontFamily:"Cairo",lineHeight:"26px",fontWeight:700,color:"#0F172A",border:0,"&:focus":{outline:0}}),Xl=Object(Ta.a)(Ie.a)({fontFamily:"Cairo",fontSize:18,lineHeight:"26px",color:"#0F172A",fontWeight:700,maxWidth:"30ch",overflow:"hidden",whiteSpace:"normal",textOverflow:"ellipsis"});class $l extends Zl{constructor(e){super(e)}render(){return s.a.createElement(Yl,null,this.state.isEditingName?s.a.createElement(Kl,{name:"chatbotName","aria-label":"edit chatbot name",maxLength:50,value:this.state.chatbotName,onChange:this.handleChatbotNameChange,onBlur:this.handleChatbotNameBlur,autoFocus:!0}):s.a.createElement(s.a.Fragment,null,s.a.createElement(Xl,{variant:"body1"},this.state.chatbotName),s.a.createElement(Fe.a,{"aria-label":"Allow to edit chatbot name",style:{padding:0},onClick:this.handleEditName},this.state.chatbotName&&s.a.createElement(Jl.a,{htmlColor:"#0F172A"}))))}}var ed=function(){const[e,t]=Object(i.useState)(""),[a,o]=Object(i.useState)([]),[n,r]=Object(i.useState)(0),[l,d]=Object(i.useState)(!1),{setCenter:c}=Object(Pn.n)(),h=Object(Pn.k)(),{zoom:p}=Object(Pn.p)();return Object(i.useEffect)(()=>{const e=e=>{e.ctrlKey&&"f"===e.key&&(e.preventDefault(),d(e=>!e),e.stopImmediatePropagation())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]),Object(i.useEffect)(()=>{if(l){const e=document.getElementById("search-input");e&&e.focus()}},[l]),s.a.createElement("div",{onKeyDown:e=>{if("Enter"===e.key&&a.length>0){const e=(n+1)%a.length;r(e);const t=a[e];c(t.position.x,t.position.y,{zoom:p})}},tabIndex:0},l&&s.a.createElement("input",{id:"search-input",type:"text",value:e,onChange:e=>{const a=e.target.value;t(a),r(0);const i=h.filter(e=>e.data.title.toLowerCase().includes(a.toLowerCase()));if(o(i),i.length>0){const e=i[0];c(e.position.x,e.position.y,{zoom:p})}else c(0,0,{zoom:p})},placeholder:"Search nodes...",autoFocus:!0,style:{position:"fixed",top:90,right:15,zIndex:10,padding:"8px",fontSize:"14px",borderRadius:98,height:44,backgroundColor:"#FFFFFF",border:"1px solid #CBD5E1"},onBlur:()=>d(!1)}),a.length>0&&l&&s.a.createElement("div",{style:{position:"fixed",top:92,right:18,zIndex:10,color:"black",padding:"5px 10px",borderRadius:"10px"}},n+1," / ",a.length))};const td=Object(Ta.a)("header")({display:"flex",padding:"24px 48px",backgroundColor:"#FFFFFF",boxShadow:"0px 2px 8px 0px #00000014",justifyContent:"space-between"}),ad=Object(Ta.a)("div")({display:"flex",alignItems:"center",gap:16}),id=Object(Ta.a)("div")({gap:8,display:"flex",alignItems:"center","& .cursor-pointer":{cursor:"pointer"}}),sd=Object(Ta.a)("button")({all:"unset",cursor:"pointer",display:"flex",gap:8,alignItems:"center",fontSize:16,lineHeight:"24px",fontFamily:"Cairo",fontWeight:700,color:"#0F172A"}),od=(Object(Ta.a)("div")({width:"100vw",height:"100vh",position:"fixed",inset:0,display:"grid",backgroundColor:"rgba(15, 23, 42, 0.4)",placeItems:"center",zIndex:2500}),Object(Ta.a)("div")({alignItems:"center",display:"flex",gap:32})),nd=Object(Ta.a)("div")({width:"100%",height:"calc(100vh - 92px)",'&[data-drawer-open="true"]':{width:"calc(100% - 440px)"}}),rd=Object(Ta.a)("button")({all:"unset",cursor:"pointer",width:"100%",backgroundColor:"#DBF0F2",padding:"10px 0",display:"flex",justifyContent:"center",borderRadius:8,fontFamily:"Inter",fontSize:16,lineHeight:"24px",color:"#51ABB3",fontWeight:700,'&[aria-disabled="true"]':{pointerEvents:"none"}}),ld=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{body1:{fontSize:16,lineHeight:"24px",fontFamily:"Cairo",color:"#000000",fontWeight:400,textAlign:"center"},h2:{fontFamily:"Cairo",fontSize:24,lineHeight:"32px",color:"#0F172A",fontWeight:700}},overrides:{MuiPaper:{root:{padding:32,gap:12,alignItems:"center"},elevation24:{boxShadow:"0px 8px 32px 0px #0000000F,0px 4px 8px 0px #00000008,0px 25px 50px 0px #00000017"},rounded:{borderRadius:8}},MuiBreadcrumbs:{ol:{gap:2},separator:{marginRight:0,marginLeft:0}},MuiButton:{root:{textTransform:"none","&:hover":{boxShadow:"none",backgroundColor:"transparent"},'&[aria-disabled="true"]':{pointerEvents:"none"}},text:{fontSize:24,fontWeight:400,fontFamily:"Cairo",letterSpacing:"-0.005em",padding:"4px 8px",color:"#475569",lineHeight:"32px","&.active":{color:"#0F172A",fontWeight:700}},contained:{fontFamily:"Cairo",fontWeight:700,boxShadow:"none",fontSize:16,backgroundColor:"#E5F6FF",lineHeight:"24px",color:"#51ABB3",padding:"10px 16px",borderRadius:8,width:108,"&:hover":{boxShadow:"none",backgroundColor:"#E5F6FF",color:"#51ABB3"},"&.primary":{width:100,color:"#FFFFFF",backgroundColor:"#51ABB3"},"&.primary:hover":{color:"#FFFFFF",backgroundColor:"#51ABB3"}}},MuiIconButton:{root:{padding:0,"&.close-dialog":{position:"absolute",top:32,right:32}}},MuiDialog:{paper:{backgroundColor:"#FFFFFF",height:"auto",minHeight:"auto",boxSizing:"border-box"},paperWidthSm:{maxWidth:411,width:411}},MuiBackdrop:{root:{backgroundColor:"rgba(15, 23, 42, 0.4)"}}}});class dd extends Tn{constructor(e){super(e),this.renderArrowForward=()=>s.a.createElement("svg",{width:"24",height:"24",id:"arrow-forward",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M8.99953 6.70978C8.60953 7.09978 8.60953 7.72978 8.99953 8.11978L12.8795 11.9998L8.99953 15.8798C8.60953 16.2698 8.60953 16.8998 8.99953 17.2898C9.38953 17.6798 10.0195 17.6798 10.4095 17.2898L14.9995 12.6998C15.3895 12.3098 15.3895 11.6798 14.9995 11.2898L10.4095 6.69978C10.0295 6.31978 9.38953 6.31978 8.99953 6.70978Z",fill:"#64748B"})),this.renderErrorIcon=()=>s.a.createElement("svg",{width:"81",height:"80",viewBox:"0 0 81 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("rect",{x:"0.5",width:"80",height:"80",rx:"40",fill:"#DC2626"}),s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.16602 40.0003C7.16602 21.6003 22.066 6.66699 40.466 6.66699C58.8994 6.66699 73.8327 21.6003 73.8327 40.0003C73.8327 58.4003 58.8994 73.3337 40.466 73.3337C22.066 73.3337 7.16602 58.4003 7.16602 40.0003ZM43.8327 26.667C43.8327 24.8337 42.3327 23.3337 40.4994 23.3337C38.666 23.3337 37.166 24.8337 37.166 26.667V40.0003C37.166 41.8337 38.666 43.3337 40.4994 43.3337C42.3327 43.3337 43.8327 41.8337 43.8327 40.0003V26.667ZM40.4993 66.667C25.766 66.667 13.8327 54.7337 13.8327 40.0003C13.8327 25.267 25.766 13.3337 40.4993 13.3337C55.2327 13.3337 67.166 25.267 67.166 40.0003C67.166 54.7337 55.2327 66.667 40.4993 66.667ZM37.166 50.0003V56.667H43.8327V50.0003H37.166Z",fill:"white"}))}render(){var e;return s.a.createElement(Pn.g,null,s.a.createElement(Be.a,{theme:ld},s.a.createElement(Ji.a,{open:this.state.isAddingCardsFromTemplate,"data-testid":"overlay-loader",PaperProps:{style:{width:"100vw",height:"100vh",display:"grid",backgroundColor:"rgba(15, 23, 42, 0.4)",placeItems:"center",margin:0,maxWidth:"100vw",maxHeight:"100vh",boxShadow:"none",padding:0}}},s.a.createElement(Kt.a,{style:{height:40,width:40,color:"#FFFFFF"}})),s.a.createElement(Ji.a,{"data-testid":"delete confirmation popup",open:this.state.openDeleteConfirmDialog,onClose:this.handleCloseConfirmationDialog},s.a.createElement(Fe.a,{"aria-label":"close confirmation delete card popup",className:"close-dialog",onClick:this.handleCloseConfirmationDialog},s.a.createElement(Ki.a,{htmlColor:"#334155"})),s.a.createElement(Za.a,{style:{height:40,width:40},htmlColor:"#DC2626"}),s.a.createElement(Ie.a,{component:"p",variant:"h2"},"Delete Card"),s.a.createElement(Ie.a,{variant:"body1"},"You are about to delete a card. Are you sure that you want to delete ",s.a.createElement("strong",null,this.nodeDeleteTitle)," from this bot?"),s.a.createElement(rd,{"data-testid":"delete card","aria-disabled":this.state.cardDeleteLoading,onClick:this.handleDeleteCardNode},this.state.cardDeleteLoading?s.a.createElement(Kt.a,{style:{height:24,width:24,color:"#51ABB3"}}):"Delete")),s.a.createElement(Ji.a,{"data-testid":"chatbot-error-dialog",open:this.state.showChatbotErrorDialog,onClose:this.handleCloseChatbotErrorDialog},s.a.createElement(Fe.a,{className:"close-dialog","aria-label":"close chatbot error dialog",onClick:this.handleCloseChatbotErrorDialog},s.a.createElement(Ki.a,{htmlColor:"#334155"})),this.renderErrorIcon(),s.a.createElement(Ie.a,{component:"p",variant:"h2"},"Chatbot errors!"),s.a.createElement(Ie.a,{variant:"body1"},this.state.hasErrorInTheChatbot?"Ensure you resolve the errors before you try to publish the chatbot":"Couldn't set chatbot to active as the chatbot settings are not completed"),s.a.createElement(rd,{"data-testid":"close errors dialog",onClick:this.handleCloseChatbotErrorDialog},"Go back")),s.a.createElement(sl,{sidebarTop:this.sidebarTop,"data-testid":"sidepanel",contextVariables:this.state.contextVariables,selectedCard:this.state.selectedCard,navigation:this.props.navigation,isDrawerOpen:this.state.isDrawerOpen,onDrawerClose:this.handleDrawerClose,handleAddCard:this.handleAddCardData,handleConnectionTypeCard:this.handleConnectionTypeCard,selectedCardData:this.state.selectedNodeId?null===(e=this.state.selectedNodeData)||void 0===e?void 0:e[this.state.selectedNodeId]:void 0,token:this.state.token,source:this.state.source,isTemplate:!!this.props.isTemplate,handleCloseSelectedCard:this.handleCloseSelectedCard,handleOpenSelectedCard:this.handleOpenSelectedCard,previousCardId:this.criteriaRoutingId,botContext:this.botContext,handleAddConnectorCardsFromTemplateToChatbot:this.handleAddConnectorCardsFromTemplateToChatbot,targetCards:xo.getTargetCardOptionsForGoToTileCard(this.state.actions,+this.state.source[0]),allActionCards:xo.getAllActionCards(this.state.actions),isUserEdatt:this.state.isUserEdatt,followUpActionId:this.followUpActionId}),s.a.createElement("div",{style:{display:"flex",backgroundColor:"#FFFFFF",position:"relative"}},s.a.createElement(pl,{navigation:this.props.navigation,activeMenu:"bots"}),s.a.createElement(ed,null),s.a.createElement("div",{style:{width:"100%"}},s.a.createElement(td,{ref:this.headerRef,"data-testid":"botHeader"},s.a.createElement(ad,null,s.a.createElement(Fe.a,{onClick:this.handleNavigateToBotsPage},s.a.createElement(Xi.a,{htmlColor:"#0F172A"})),s.a.createElement(Yi.a,{"data-test-id":"breadcrumb",separator:this.renderArrowForward()},s.a.createElement(Re.a,{"data-testid":"bots-page",variant:"text",onClick:this.handleNavigateToBotsPage},"Bots"),s.a.createElement(Re.a,{className:"active",variant:"text"},"Add bot")),s.a.createElement($l,{isTemplate:!!this.props.isTemplate,navigation:this.props.navigation,handleLogout:this.handleLogout,handleSetEdattWithChatbotSettingsError:this.handleSetEdattWithChatbotSettingsError,"data-testid":"chatbot-name"})),s.a.createElement(od,null,!this.props.isTemplate&&s.a.createElement(sd,{onClick:this.handleNavigateToBotSettingsPage},s.a.createElement($i.a,{htmlColor:"#0F172A"}),"Chatbot settings"),s.a.createElement(id,{style:{gap:12}},!this.props.isTemplate&&s.a.createElement(s.a.Fragment,null,s.a.createElement(Re.a,{variant:"contained","aria-disabled":this.state.saveDraftLoading,onClick:this.handleUpdateBotStatusRequestMessage({publishLoading:!1,saveDraftLoading:!0},"inactive")},this.state.saveDraftLoading?s.a.createElement(Kt.a,{style:{height:24,width:24,color:"#51ABB3"}}):"Save draft"),s.a.createElement(Re.a,{"data-testid":"publish-bot",className:"primary",variant:"contained",onClick:this.handlePublishBot,"aria-disabled":this.state.publishLoading},this.state.publishLoading?s.a.createElement(Kt.a,{style:{height:24,width:24,color:"#FFFFFF"}}):"Publish"))))),s.a.createElement(nd,{"data-testid":"whiteboard","data-drawer-open":this.state.isDrawerOpen},this.state.connectorCardLoading?s.a.createElement("div",{style:{width:"100%",height:"100%",display:"grid",placeItems:"center"}},s.a.createElement(Kt.a,{"data-testid":"loader",style:{color:"#51ABB3"}})):s.a.createElement(ql,{cardData:this.state.actions,onAddNodeClick:this.handleShowCardsDrawer,onCardNodeClick:this.handleCardNodeClick,"data-testid":"interactive-whiteboard",onCardNodeDelete:this.handleOpenConfirmationDialog,checkForError:this.state.hasErrorInTheChatbot,onTemplateCreate:this.onTemplateCreate,isTemplate:!!this.props.isTemplate,handleConnectNode:this.handleConnectNode,templateCreateLoading:this.state.templateCreateLoading,handleDeleteMultipleCards:this.handleDeleteMultipleCards}))))))}}const cd=a(1384),hd=a(1385),pd=a(1386);class gd extends K{constructor(e){super(e),this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?cd:hd}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?cd:hd},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}}const ud=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}});const md={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},inputStyle:{borderBottom:"1px solid rgba(0, 0, 0, 0.6)",width:"100%",height:"100px",display:"flex",flexDirection:"column",justifyContent:"space-between"},buttonStyle:{width:"100%",height:"45px",marginTop:"40px",border:"none",backgroundColor:"rgb(98, 0, 238)"}};var Cd=a(736);const bd=a(1387);class Ad extends K{constructor(e){super(e),this.countryCodeApiCallId=void 0,this.countryCodesToDropDown=e=>e.map(e=>({label:` ${e.attributes.emoji_flag} ${e.attributes.name} (${e.id}) +${e.attributes.country_code}`,value:e.attributes.country_code})),this.makeRemoteRequest=()=>{const e=new Q(q(Z.RestAPIRequestMessage));this.countryCodeApiCallId=e.messageId,e.addData(q(Z.RestAPIResponceEndPointMessage),bd.apiEndPointGetCountryCodes);const t={"Content-Type":bd.contentTypeApiGetCountryCodes};e.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),e.addData(q(Z.RestAPIRequestMethodMessage),bd.apiGetCountryCodesType),z.sendMessage(e.id,e)},this.subScribedMessages=[q(Z.RestAPIResponceMessage)],this.receive=this.receive.bind(this),this.handleChange=this.handleChange.bind(this),z.attachBuildingBlock(this,this.subScribedMessages),this.state={dataSource:[],countryCodeSelected:"",mobileNo:"",token:"",placeHolder:bd.countryPlaceHolder,disable:this.props.disable,label:null}}render(){var e=-1,t=-1;return this.state.dataSource.forEach(a=>{t+=1,a.value!==this.props.value||(e=t)}),s.a.createElement(l.a,{style:{marginBottom:10,zIndex:99}},s.a.createElement(Cd.a,{style:this.props.style,options:this.state.dataSource,placeholder:this.state.placeHolder,onChange:this.handleChange,value:e>=0?this.state.dataSource[e]:null,isDisabled:this.state.disable,"data-testid":"countryCode"}))}handleChange(e){this.setState({label:e.label});const t=new Q(q(Z.CountryCodeMessage));t.addData(q(Z.CountyCodeDataMessage),e.value),z.sendMessage(q(Z.CountryCodeMessage),t)}async componentDidMount(){this.makeRemoteRequest()}async receive(e,t){if(z.debugLog("Country Code",t),q(Z.RestAPIResponceMessage)===t.id&&null!=this.countryCodeApiCallId&&this.countryCodeApiCallId===t.getData(q(Z.RestAPIResponceDataMessage))){var a=t.getData(q(Z.RestAPIResponceSuccessMessage));if(a&&!a.errors)this.setState({dataSource:this.countryCodesToDropDown(a.data)});else{var i=t.getData(q(Z.RestAPIResponceErrorMessage));this.parseApiCatchErrorResponse(i)}}}}const fd=a(1401),xd=a(1402),Ed=a(1403);class vd extends K{constructor(e){super(e),this.labelFirstName=void 0,this.lastName=void 0,this.labelArea=void 0,this.labelMobile=void 0,this.labelEmail=void 0,this.labelCurrentPassword=void 0,this.labelNewPassword=void 0,this.labelRePassword=void 0,this.btnTextCancelPasswordChange=void 0,this.btnTextSaveChanges=void 0,this.labelHeader=void 0,this.btnTextChangePassword=void 0,this.arrayholder=void 0,this.passwordReg=void 0,this.emailReg=void 0,this.apiCallMessageUpdateProfileRequestId=void 0,this.validationApiCallId="",this.apiChangePhoneValidation=void 0,this.registrationAndLoginType="",this.authToken=void 0,this.uniqueSessionRequesterId=void 0,this.userProfileGetApiCallId=void 0,this.userAttr=void 0,this.firstNameRef="",this.lastNameRef="",this.organisation="",this.email="",this.role="",this.profileImageUrlRef=void 0,this.filePickerImageRef="",this.showUserProfileApiId=null,this.saveUserProfileApiId=null,this.updatePasswordApiId=null,this.profilePicUpdateApiId=null,this.profilePicDeleteApiId=null,this.fileInputRef=s.a.createRef(),this.txtInputFirstNameProps={onChangeText:e=>{this.setState({firstName:e}),this.txtInputFirstNameProps.value=e}},this.txtInputLastNameProps={onChangeText:e=>{this.setState({lastName:e}),this.txtInputLastNameProps.value=e}},this.txtInputPhoneNumberlWebProps={onChangeText:e=>{this.txtInputPhoneNumberlWebProps.editable&&(this.setState({phoneNumber:e}),this.txtInputPhoneNumberProps.value=e)},editable:!0},this.txtInputPhoneNumberlMobileProps={...this.txtInputPhoneNumberlWebProps,autoCompleteType:"tel",keyboardType:"phone-pad"},this.txtInputPhoneNumberProps=this.isPlatformWeb()?this.txtInputPhoneNumberlWebProps:this.txtInputPhoneNumberlMobileProps,this.txtInputEmailWebProps={value:"",editable:!0,onChangeText:e=>{this.txtInputEmailProps.editable&&(this.setState({email:e}),this.txtInputEmailProps.value=e)}},this.txtInputEmailMobileProps={...this.txtInputEmailWebProps,keyboardType:"email-address"},this.txtInputEmailProps=this.isPlatformWeb()?this.txtInputEmailWebProps:this.txtInputEmailMobileProps,this.btnEnableEditPasswordProps={onPress:()=>this.enableDisableEditPassword(!0)},this.txtInputCurrentPasswordProps={onChangeText:e=>{this.setState({currentPasswordText:e}),this.txtInputCurrentPasswordProps.value=e},value:"",secureTextEntry:!0},this.btnPasswordShowHideButtonProps={onPress:()=>{this.setState({enablePasswordField:!this.txtInputCurrentPasswordProps.secureTextEntry}),this.txtInputCurrentPasswordProps.secureTextEntry=!this.txtInputCurrentPasswordProps.secureTextEntry,this.imgPasswordShowhideProps.source=this.txtInputCurrentPasswordProps.secureTextEntry?fd:xd}},this.imgPasswordShowhideProps={source:fd},this.txtInputNewPasswordProps={onChangeText:e=>{this.setState({newPasswordText:e}),this.txtInputNewPasswordProps.value=e},value:"",secureTextEntry:!0},this.btnNewPasswordShowHideButtonProps={onPress:()=>{this.setState({enableNewPasswordField:!this.txtInputNewPasswordProps.secureTextEntry}),this.txtInputNewPasswordProps.secureTextEntry=!this.txtInputNewPasswordProps.secureTextEntry,this.imgNewPasswordShowhideProps.source=this.txtInputNewPasswordProps.secureTextEntry?fd:xd}},this.imgNewPasswordShowhideProps={source:fd},this.txtInputReTypePasswordProps={onChangeText:e=>{this.setState({reTypePasswordText:e}),this.txtInputReTypePasswordProps.value=e},secureTextEntry:!0,value:""},this.imgReTypePasswordShowhideProps={source:fd},this.btnReTypePasswordShowHideProps={onPress:()=>{this.setState({enableReTypePasswordField:!this.txtInputReTypePasswordProps.secureTextEntry}),this.txtInputReTypePasswordProps.secureTextEntry=!this.txtInputReTypePasswordProps.secureTextEntry,this.imgReTypePasswordShowhideProps.source=this.txtInputNewPasswordProps.secureTextEntry?fd:xd}},this.btnDisableEditPasswordProps={onPress:()=>this.enableDisableEditPassword(!1)},this.onFirstNameInputChange=e=>{this.setState({firstName:e.target.value})},this.onLastNameChange=e=>{this.setState({lastName:e.target.value})},this.toggleConfirmLogoutModal=()=>{this.setState({showLogoutConfirmModal:!this.state.showLogoutConfirmModal})},this.toggleUpatePasswordModal=()=>{this.setState({showUpdatePasswordModal:!this.state.showUpdatePasswordModal})},this.toggleCurrentPasswordVisibility=()=>{this.setState({showCurrentPassword:!this.state.showCurrentPassword})},this.toggleNewPasswordVisibility=()=>{this.setState({showNewPassword:!this.state.showNewPassword})},this.toggleConfirmNewPasswordVisibility=()=>{this.setState({showConfirmNewPassword:!this.state.showConfirmNewPassword})},this.updatePasswordSchema=()=>gs.d().shape({currentPassword:gs.f().required("Please enter your current password"),newPassword:gs.f().required("Please enter new password").matches(new RegExp(Ed.newPasswordRegexp),"Please enter valid password"),confirmNewPassword:gs.f().required("Please enter confirm new password").oneOf([gs.e("newPassword"),null],"Passwords do not match")}),this.updatePassword=e=>{this.setState({updatePasswordLoading:!0});const t={"Content-Type":Ed.contentTypeApiGetUserProfile,token:this.state.token},a={data:{current_password:e.currentPassword,new_password:e.newPassword,confirmation_password:e.confirmNewPassword}},i=new Q(q(Z.RestAPIRequestMessage));this.updatePasswordApiId=i.messageId,i.addData(q(Z.RestAPIResponceEndPointMessage),"bx_block_profile/passwords/"+this.state.userId),i.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),i.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(a)),i.addData(q(Z.RestAPIRequestMethodMessage),Ed.apiUpdateUserType),z.sendMessage(i.id,i)},this.saveUserProfileInfo=()=>{const e=this.isNonNullAndEmpty(this.state.firstName),t=this.isNonNullAndEmpty(this.state.lastName);let a=null,i=null;const s=/\s/;if(e||(Pi.b.error("Please enter a first name",{className:"error__toast"}),a="Please enter a first name"),s.test(this.state.firstName)&&(a="First name should not contain space"),t||(Pi.b.error("Please enter a last name",{className:"error__toast"}),i="Please enter a last name"),s.test(this.state.lastName)&&(i="Last name should not contain space"),this.setState({firstNameError:a,lastNameError:i}),a||i)return;this.setState({saveProfileLoading:!0});const o={"Content-Type":Ed.contentTypeApiGetUserProfile,token:this.state.token},n={data:{first_name:this.state.firstName,last_name:this.state.lastName}},r=new Q(q(Z.RestAPIRequestMessage));this.saveUserProfileApiId=r.messageId,r.addData(q(Z.RestAPIResponceEndPointMessage),"account_block/accounts/"+this.state.userId),r.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(o)),r.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(n)),r.addData(q(Z.RestAPIRequestMethodMessage),Ed.apiUpdateUserType),z.sendMessage(r.id,r)},this.handleCancel=()=>{this.setState({firstName:this.firstNameRef,lastName:this.lastNameRef,profileImageURL:this.profileImageUrlRef})},this.handleOpenFilePicker=()=>{var e;null===(e=this.fileInputRef.current)||void 0===e||e.click()},this.onImageLoad=(e,t)=>{this.filePickerImageRef=t,this.setState({showCropDialog:!0})},this.onImageApply=e=>{this.setState({profileUpdateLoading:!0});const t={token:this.state.token},a=new FormData;a.append("profile_image",e.file);const i=new Q(q(Z.RestAPIRequestMessage));this.profilePicUpdateApiId=i.messageId,i.addData(q(Z.RestAPIResponceEndPointMessage),`account_block/accounts/${this.state.userId}/upload_profile_picture`),i.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),i.addData(q(Z.RestAPIRequestBodyMessage),a),i.addData(q(Z.RestAPIRequestMethodMessage),Ed.apiUpdateUserType),z.sendMessage(i.id,i)},this.handleCropDialogClose=()=>{this.filePickerImageRef="",this.setState({showCropDialog:!1,profileImageURL:this.profileImageUrlRef})},this.handleDeleteProfilePicture=()=>{if(!this.state.profileImageURL)return;this.setState({profileImageURL:void 0});const e={id:this.state.userId},t={"Content-Type":Ed.contentTypeApiGetUserProfile,token:this.state.token},a=new Q(q(Z.RestAPIRequestMessage));this.profilePicDeleteApiId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),`account_block/accounts/${this.state.userId}/delete_profile_picture`),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(e)),a.addData(q(Z.RestAPIRequestMethodMessage),"DELETE"),z.sendMessage(a.id,a)},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.RestAPIResponceMessage),q(Z.SessionResponseMessage),q(Z.CountryCodeMessage)],this.state={firstName:"",lastName:"",email:"",phoneNumber:"",currentCountryCode:Ed.hintCountryCode,data:[],passwordHelperText:"",enablePasswordField:!0,enableReTypePasswordField:!0,enableNewPasswordField:!0,firstNameError:null,lastNameError:null,edtEmailEnabled:!0,llDoChangePwdContainerVisible:!1,llChangePwdDummyShowContainerVisible:!1,currentPasswordText:"",newPasswordText:"",reTypePasswordText:"",edtMobileNoEnabled:!0,countryCodeEnabled:!0,saveButtonDisable:!1,showLogoutConfirmModal:!1,showUpdatePasswordModal:!1,showCurrentPassword:!1,showNewPassword:!1,showConfirmNewPassword:!1,token:"",userId:"",updatePasswordLoading:!1,saveProfileLoading:!1,profileUpdateLoading:!1,profileImageURL:void 0,showCropDialog:!1},this.arrayholder=[],this.passwordReg=new RegExp("\\w+"),this.emailReg=new RegExp("\\w+"),this.labelFirstName=Ed.labelFirstName,this.lastName=Ed.lastName,this.labelArea=Ed.labelArea,this.labelMobile=Ed.labelMobile,this.labelEmail=Ed.labelEmail,this.labelCurrentPassword=Ed.labelCurrentPassword,this.labelNewPassword=Ed.labelNewPassword,this.labelRePassword=Ed.labelRePassword,this.btnTextCancelPasswordChange=Ed.btnTextCancelPasswordChange,this.btnTextSaveChanges=Ed.btnTextSaveChanges,this.labelHeader=Ed.labelHeader,this.btnTextChangePassword=Ed.btnTextChangePassword,this.handleLogout=this.handleLogout.bind(this),this.handleGetUserProfile=this.handleGetUserProfile.bind(this),this.handleRestApiResponse=this.handleRestApiResponse.bind(this),this.handleShowUserProfileResponse=this.handleShowUserProfileResponse.bind(this),this.handleSaveUserProfileResponse=this.handleSaveUserProfileResponse.bind(this),this.handleUpdatePasswordApiResponse=this.handleUpdatePasswordApiResponse.bind(this),this.handleProfilePicDeleteResponse=this.handleProfilePicDeleteResponse.bind(this),this.handleProfilePictureUpdateResponse=this.handleProfilePictureUpdateResponse.bind(this),z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){const a={[q(Z.RestAPIResponceMessage)]:this.handleRestApiResponse}[t.id];a&&a(t)}validateMobileAndThenUpdateUserProfile(){let e=this.state.currentCountryCode,t=this.state.phoneNumber,a="";if(a=this.validateCountryCodeAndPhoneNumber(e,t),a)this.showAlert(Ed.errorTitle,a);else{if(this.userAttr){const a=this.userAttr.country_code,i=this.userAttr.phone_number;Number.parseInt(e)!==Number.parseInt(a)&&e!==Ed.hintCountryCode||(e=null),Number.parseInt(this.state.phoneNumber)===Number.parseInt(i)&&(t=null)}t&&e?this.validateMobileOnServer(this.state.currentCountryCode,this.state.phoneNumber):this.validateAndUpdateProfile()}}validateEmail(e){let t=null;return this.isValidEmail(e)||(t=Ed.errorEmailNotValid),t}validateLastName(e){return this.isNonNullAndEmpty(e)?null:"Last name "+Ed.errorBlankField}validateFirstName(e){return this.isNonNullAndEmpty(e)?null:"First name "+Ed.errorBlankField}validateCountryCodeAndPhoneNumber(e,t){let a=null;return this.isNonNullAndEmpty(t)?this.isNonNullAndEmpty(String(e))&&Ed.hintCountryCode!==e||(a=Ed.errorCountryCodeNotSelected):this.isNonNullAndEmpty(e)&&Ed.hintCountryCode!==e&&(this.isNonNullAndEmpty(t)||(a="Phone "+Ed.errorBlankField)),a}validateAndUpdateProfile(){let e=this.state.firstName,t=this.state.lastName,a=this.state.currentCountryCode,i=this.state.phoneNumber,s=this.state.email,o=this.state.currentPasswordText,n=this.state.newPasswordText,r=this.state.reTypePasswordText;const l=this.validateFirstName(e),d=this.validateLastName(t),c=this.validateCountryCodeAndPhoneNumber(a,i),h=this.validateEmail(s),p=this.validateCurrentPwd(o),g=this.validatePassword(n),u=this.validateRePassword(r);if(null!=l)return this.showAlert(Ed.errorTitle,l),!1;if(null!=d)return this.showAlert(Ed.errorTitle,d),!1;if(Ed.ACCOUNT_TYPE_EMAIL===this.registrationAndLoginType){if(null!==c)return this.showAlert(Ed.errorTitle,c),!1}else if(Ed.ACCOUNT_TYPE_SOCIAL===this.registrationAndLoginType){if(null!=c)return this.showAlert(Ed.errorTitle,c),!1}else if(Ed.ACCOUNT_TYPE_PHONE===this.registrationAndLoginType){if(null!=h)return this.showAlert(Ed.errorTitle,h),!1}else{if(null!=c)return this.showAlert(Ed.errorTitle,c),!1;if(null!=h)return this.showAlert(Ed.errorTitle,h),!1}if(Ed.ACCOUNT_TYPE_SOCIAL!==this.registrationAndLoginType&&this.state.llDoChangePwdContainerVisible){if(null!=p)return this.showAlert(Ed.errorTitle,p),!1;if(null!=g)return this.showAlert(Ed.errorTitle,g),!1;if(null!=u)return this.showAlert(Ed.errorTitle,u),!1;if(n!==r)return this.showAlert(Ed.errorTitle,Ed.errorBothPasswordsNotSame),!1;if(o===n)return this.showAlert(Ed.errorTitle,Ed.errorCurrentNewPasswordMatch),!1}if(this.userAttr){let o=this.userAttr.first_name,n=this.userAttr.last_name,r=this.userAttr.country_code+"",l=this.userAttr.phone_number+"",d=this.userAttr.email;this.registrationAndLoginType=this.userAttr.type,this.isNonNullAndEmpty(e)&&e===o&&(e=null),this.isNonNullAndEmpty(t)&&t===n&&(t=null),this.isNonNullAndEmpty(a)&&a===r&&(a=null),this.isNonNullAndEmpty(i)&&i===l&&(i=null),null==a&&null==i||(null==a&&(a=r),null==i&&(i=l)),this.isNonNullAndEmpty(s)&&s===d&&(s=null)}if(this.isNonNullAndEmpty(e)||this.isNonNullAndEmpty(t)||this.isNonNullAndEmpty(a)||this.isNonNullAndEmpty(i)||this.isNonNullAndEmpty(s)||this.isNonNullAndEmpty(o)&&this.isNonNullAndEmpty(n)){const e={"Content-Type":Ed.contentTypeApiUpdateUser,token:this.authToken};let t={first_name:this.state.firstName,last_name:this.state.lastName};this.state.edtMobileNoEnabled&&Ed.hintCountryCode!==a&&this.isNonNullAndEmpty(String(a))&&this.isNonNullAndEmpty(String(i))&&(t={...t,new_phone_number:String(a)+String(i)}),this.isNonNullAndEmpty(s)&&(t={...t,new_email:s}),this.isNonNullAndEmpty(o)&&this.isNonNullAndEmpty(n)&&(t={...t,current_password:o,new_password:n});const r={data:t},l=new Q(q(Z.RestAPIRequestMessage));this.apiCallMessageUpdateProfileRequestId=l.messageId,l.addData(q(Z.RestAPIResponceEndPointMessage),Ed.apiEndPointUpdateUser),l.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),l.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(r)),l.addData(q(Z.RestAPIRequestMethodMessage),Ed.apiUpdateUserType),z.sendMessage(l.id,l)}}validateCurrentPwd(e){return this.isNonNullAndEmpty(e)?null:Ed.errorCurrentPasswordNotValid}validatePassword(e){return this.passwordReg.test(e)?null:Ed.errorNewPasswordNotValid}validateRePassword(e){return this.passwordReg.test(e)?null:Ed.errorReTypePasswordNotValid}isNonNullAndEmpty(e){return void 0!==e&&null!==e&&"null"!==e&&e.trim().length>0}validateMobileOnServer(e,t){const a={"Content-Type":Ed.contenttypeApiValidateMobileNo,token:this.authToken},i={data:{new_phone_number:e+t}},s=new Q(q(Z.RestAPIRequestMessage));this.apiChangePhoneValidation=s.messageId,s.addData(q(Z.RestAPIResponceEndPointMessage),Ed.endPointApiValidateMobileNo),s.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),s.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(i)),s.addData(q(Z.RestAPIRequestMethodMessage),Ed.callTypeApiValidateMobileNo),z.sendMessage(s.id,s)}enableDisableEditPassword(e){Ed.ACCOUNT_TYPE_SOCIAL===this.registrationAndLoginType?this.setState({edtEmailEnabled:!1,llDoChangePwdContainerVisible:!1,llChangePwdDummyShowContainerVisible:!1}):e?this.setState({llDoChangePwdContainerVisible:!0,llChangePwdDummyShowContainerVisible:!1}):this.setState({llDoChangePwdContainerVisible:!1,llChangePwdDummyShowContainerVisible:!0,currentPasswordText:"",newPasswordText:"",reTypePasswordText:""})}goToPrivacyPolicy(){const e=new Q(q(Z.NavigationPrivacyPolicyMessage));e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)}goToTermsAndCondition(){const e=new Q(q(Z.NavigationTermAndConditionMessage));e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)}isStringNullOrBlank(e){return null===e||0===e.length}isValidEmail(e){return this.emailReg.test(e)}requestSessionData(){const e=new Q(q(Z.SessionRequestMessage));this.uniqueSessionRequesterId=e.messageId,this.send(e)}getUserProfile(){const e=new Q(q(Z.RestAPIRequestMessage));this.userProfileGetApiCallId=e.messageId,e.addData(q(Z.RestAPIResponceEndPointMessage),Ed.endPointApiGetUserProfile);const t={"Content-Type":Ed.contentTypeApiGetUserProfile,token:this.authToken};e.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),e.addData(q(Z.RestAPIRequestMethodMessage),Ed.methodTypeApiGetUserProfile),z.sendMessage(e.id,e)}getValidations(){const e={"Content-Type":Ed.validationApiContentType},t=new Q(q(Z.RestAPIRequestMessage));this.validationApiCallId=t.messageId,t.addData(q(Z.RestAPIResponceEndPointMessage),Ed.urlGetValidations),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),t.addData(q(Z.RestAPIRequestMethodMessage),Ed.validationApiMethodType),z.sendMessage(t.id,t)}async componentDidMount(){var e,t;const a=null!==(e=await B("authToken"))&&void 0!==e?e:sessionStorage.getItem("authToken"),i=null!==(t=await B("userId"))&&void 0!==t?t:sessionStorage.getItem("userId");this.setState({token:a,userId:i},()=>this.handleGetUserProfile())}handleRestApiResponse(e){const t=e.getData(q(Z.RestAPIResponceDataMessage)),a={};null!==this.showUserProfileApiId&&(a[this.showUserProfileApiId]=this.handleShowUserProfileResponse),null!==this.saveUserProfileApiId&&(a[this.saveUserProfileApiId]=this.handleSaveUserProfileResponse),null!==this.updatePasswordApiId&&(a[this.updatePasswordApiId]=this.handleUpdatePasswordApiResponse),null!==this.profilePicUpdateApiId&&(a[this.profilePicUpdateApiId]=this.handleProfilePictureUpdateResponse),null!==this.profilePicDeleteApiId&&(a[this.profilePicDeleteApiId]=this.handleProfilePicDeleteResponse);const i=a[t];i&&i(e)}async handleShowUserProfileResponse(e){var t,a,i;const s=e.getData(q(Z.RestAPIResponceSuccessMessage));if(void 0===s)return Pi.b.error("Failed to fetch the data",{className:"error__toast"});if(null===s||void 0===s||null===(t=s.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)return await this.handleLogout();const o=s.data.attributes;this.firstNameRef=o.first_name,this.lastNameRef=o.last_name,this.email=o.email,this.organisation=o.organisation,this.role=o.role,this.profileImageUrlRef=o.profile_image;const n={role:o.role,name:o.first_name+" "+o.last_name,profile_picture:o.profile_image};this.setState({firstName:o.first_name,lastName:o.last_name,profileImageURL:null!==(i=o.profile_image)&&void 0!==i?i:void 0}),sessionStorage.setItem("user",JSON.stringify(n))}async handleSaveUserProfileResponse(e){var t,a,i,s;this.setState({saveProfileLoading:!1});const o=e.getData(q(Z.RestAPIResponceSuccessMessage));if(void 0===o)return Pi.b.error("Failed to update profile",{className:"error__toast"});if((null===o||void 0===o||null===(t=o.errors)||void 0===t?void 0:t.length)>0&&(null===o||void 0===o||null===(a=o.errors)||void 0===a||null===(i=a[0])||void 0===i?void 0:i.token))return await this.handleLogout();if(null===o||void 0===o||null===(s=o.meta)||void 0===s?void 0:s.message){var n;Pi.b.success(null===o||void 0===o||null===(n=o.meta)||void 0===n?void 0:n.message,{className:"success__toast"}),this.firstNameRef=o.data.attributes.first_name,this.lastNameRef=o.data.attributes.last_name;const e=o.data.attributes,t={profile_picture:e.profile_image,role:e.role,name:this.firstNameRef+" "+this.lastNameRef};sessionStorage.setItem("user",JSON.stringify(t))}}async handleUpdatePasswordApiResponse(e){var t,a,i,s,o,n,r;const l=e.getData(q(Z.RestAPIResponceSuccessMessage));return this.setState({updatePasswordLoading:!1}),l?"current password and new password should not be the same."===(null===l||void 0===l?void 0:l.errors)?Pi.b.error("Current password and new password should not be same.",{className:"error__toast"}):(null===l||void 0===l||null===(t=l.errors)||void 0===t?void 0:t.length)>0&&(null===l||void 0===l||null===(a=l.errors)||void 0===a||null===(i=a[0])||void 0===i?void 0:i.profile)?Pi.b.error("Please enter correct current password",{className:"error__toast"}):(null===l||void 0===l||null===(s=l.errors)||void 0===s?void 0:s.length)>0&&(null===l||void 0===l||null===(o=l.errors)||void 0===o||null===(n=o[0])||void 0===n?void 0:n.token)?await this.handleLogout():(null===l||void 0===l||null===(r=l.meta)||void 0===r?void 0:r.message)?(this.setState({showUpdatePasswordModal:!1}),Pi.b.success(l.meta.message,{className:"success__toast"})):void 0:Pi.b.error("Failed to update password",{className:"error__toast"})}async handleProfilePictureUpdateResponse(e){var t,a,i;const s=e.getData(q(Z.RestAPIResponceSuccessMessage));if(this.setState({profileUpdateLoading:!1}),void 0===s)return Pi.b.error("Failed to update profile picture",{className:"error__toast"});if(null===s||void 0===s||null===(t=s.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)return await this.handleLogout();if(null===s||void 0===s||null===(i=s.meta)||void 0===i?void 0:i.message){Pi.b.success(s.meta.message,{className:"success__toast"}),this.filePickerImageRef="";const e=s.data.attributes,t={name:e.first_name+" "+e.last_name,role:e.role,profile_picture:e.profile_image};this.setState({profileImageURL:s.data.attributes.profile_image,showCropDialog:!1}),sessionStorage.setItem("user",JSON.stringify(t))}}async handleProfilePicDeleteResponse(e){var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));return void 0===i?(Pi.b.error("Failed to delete profile picture",{className:"error__toast"}),void this.setState({profileImageURL:this.profileImageUrlRef})):(null===i||void 0===i||null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)?await this.handleLogout():void((null===i||void 0===i?void 0:i.message)&&Pi.b.success(i.message,{className:"success__toast"}))}handleGetUserProfile(){const e={"Content-Type":Ed.contentTypeApiGetUserProfile,token:this.state.token},t=new Q(q(Z.RestAPIRequestMessage));this.showUserProfileApiId=t.messageId,t.addData(q(Z.RestAPIResponceEndPointMessage),Ed.showUserProfileApiEndPoint),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),t.addData(q(Z.RestAPIRequestMethodMessage),Ed.methodTypeApiGetUserProfile),z.sendMessage(t.id,t)}async handleLogout(){await T("authToken"),await T("userId"),sessionStorage.clear();const e=new Q(q(Z.NavigationSignupLoginMessage));e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)}}var yd=a(1780),wd=a(1781),Id=a(1782),Pd=a(1778),Sd=a(1779);const Md=Object(Ta.a)("p")({margin:0,fontSize:12,fontWeight:400,lineHeight:"18px",color:"#000000",fontFamily:"Cairo"}),Fd=[{text:"At least one capital letter",regex:Ed.atLeastOneCapitalLetterRegexp,ariaDescribedById:"capital"},{text:"At least one lowercase letter",regex:Ed.atLeastOnelowercaseRegexp,ariaDescribedById:"lowercase"},{text:"At least one number",regex:Ed.atLeastOneNumberRegexp,ariaDescribedById:"number"},{text:"At least one special characters like $, @, #",regex:Ed.atLeastOneSymbolRegexp,ariaDescribedById:"symbol"},{text:"Minimum character length is 8 characters",regex:Ed.minEightCharLengthRegexp,ariaDescribedById:"minLength"}];function Rd(e){let{password:t}=e;return s.a.createElement(i.Fragment,null,Fd.map(e=>{const a=0===t.trim().length?void 0:new RegExp(e.regex).test(t);return s.a.createElement("div",{key:e.ariaDescribedById,style:{display:"flex",gap:6,alignItems:"center"}},void 0===a&&s.a.createElement(Pd.a,{"aria-describedby":e.ariaDescribedById,"data-testid":"initialCheckCircle",htmlColor:"#94A3B8",style:{height:12,width:12}}),!0===a&&s.a.createElement(Pd.a,{"aria-describedby":e.ariaDescribedById,"data-testid":"greenCheckCircle",htmlColor:"#059669",style:{height:12,width:12}}),!1===a&&s.a.createElement(Sd.a,{"aria-describedby":e.ariaDescribedById,htmlColor:"#DC2626","data-testid":"redCircle",style:{height:12,width:12}}),s.a.createElement(Md,{id:e.ariaDescribedById},e.text))}))}const Dd=Object(De.a)({palette:{primary:{main:"#51ABB3",contrastText:"#fff"},secondary:{main:"#0F172A",contrastText:"#fff"}},typography:{fontFamily:"Cairo",h1:{fontWeight:700,fontSize:24,lineHeight:"32px",letterSpacing:"-0.005em",color:"#0F172A"},subtitle1:{color:"#64748B",fontSize:16,lineHeight:"24px",fontWeight:700},subtitle2:{fontSize:12,fontWeight:400,lineHeight:"18px",color:"#D97706"}},overrides:{MuiButton:{root:{fontFamily:"Cairo",fontSize:"14px",fontWeight:700,lineHeight:"22px",color:"#51ABB3",textTransform:"none",borderRadius:8,"&:hover":{backgroundColor:"transparent",boxShadow:"none"},"&.text-lg":{fontSize:16,lineHeight:"24px"},"&.inter .MuiButton-label":{fontFamily:"Inter"},"&.Mui-primary":{backgroundColor:"#E5EBFF",padding:"10px 16px 10px 16px"},"&.Mui-secondary":{color:"#FFFFFF",backgroundColor:"#51ABB3",padding:"10px 16px 10px 16px"}},text:{padding:0}},MuiFormLabel:{root:{fontFamily:"Cairo",fontSize:"14px",fontWeight:700,lineHeight:"22px",color:"#64748B","&.Mui-passwordLabel":{fontSize:16,lineHeight:"24px",color:"#334155"}}},MuiOutlinedInput:{root:{borderRadius:8,"&:hover $notchedOutline":{borderColor:"#CBD5E1"},"&.Mui-Focused $notchedOutline":{borderColor:"#51ABB3",borderWidth:1},"&.Mui-disabled $notchedOutline":{borderColor:"#F6F0FF"},"&.Mui-error $notchedOutline":{borderColor:"#F59E0B"}},notchedOutline:{borderWidth:1,borderColor:"#CBD5E1"},input:{padding:0}},MuiInputBase:{root:{backgroundColor:"#FFFFFF",padding:"16px 8px"},input:{fontFamily:"Cairo",fontSize:"16px",fontWeight:400,lineHeight:"24px",height:24,color:"#0F172A","&.Mui-disabled":{color:"#94A3B8"},"&.Mui-passwordInput":{color:"#64748B"}}},MuiBackdrop:{root:{backgroundColor:"#0F172A"}},MuiPaper:{root:{"&.confirmDialog":{padding:32,display:"flex",flexDirection:"column",gap:12}},elevation24:{boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008, 0px 25px 50px 0px #00000017"},rounded:{borderRadius:8,"&.rounded-lg":{borderRadius:24}}},MuiDialogActions:{root:{padding:"24px 40px",gap:10,borderTop:"1px solid #CBD5E1",position:"sticky",bottom:0,zIndex:2,backgroundColor:"#FFFFFF"},spacing:{"& > :not(:first-child)":{marginLeft:0}}},MuiAvatar:{root:{width:156,height:156,boxSizing:"border-box",border:"4px solid #E5E6FF",cursor:"pointer"},colorDefault:{color:"transparent",backgroundColor:"#E5E6FF"}},MuiDialog:{paper:{scrollbarWidth:"none","&::-webkit-scrollbar":{width:0}}},MuiCircularProgress:{colorPrimary:{color:"#FFFFFF"}}}});const Bd={cancelBtnStyle:{width:110,marginLeft:"auto"},profileContainerStyle:{backgroundColor:"#FFFFFF",boxShadow:"0px 2px 8px 0px #00000014",borderRadius:12,margin:"0px 48px 48px",display:"flex",flexDirection:"column",gap:24,padding:"48px 0"},profileBox:{padding:"0px 48px",display:"flex",flexDirection:"column",alignItems:"center",gap:24},profilePictureHeading:{width:"63.12%"},avatarText:{display:"inline-block",width:"100%",textAlign:"center",fontSize:56,lineHeight:"48px",fontWeight:600,color:"#51ABB3",fontFamily:"Inter"},buttonGroup:{display:"flex",gap:12,alignItems:"flex-start"},actionContainer:{width:"63.12%",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:24,margin:"0 auto 22px"},inputContainer:{display:"flex",flexDirection:"column",gap:4,width:"calc(50% - 12px)"},passwordInputContainer:{display:"flex",flexDirection:"column",gap:4},updatePasswordDialogHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"24px 40px",gap:10,borderBottom:"1px solid #CBD5E1",position:"sticky",top:0,zIndex:2,backgroundColor:"#fff"}},Td=a(1404),kd=a(1405),Nd=a(1406),Od=(a(1407),a(1408));class Ld extends K{constructor(e){super(e),this.apiEmailLoginCallId="",this.emailReg=void 0,this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?Td:kd}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?Td:kd},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.SignUpValidation=()=>gs.d().shape({email:gs.f().matches(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,"Email is not valid").email("Invalid email format").required("Email is required"),password:gs.f().required("Password is required").min(8,"Wrong password")}),this.handleNavigate=()=>{const e=new Q(q(Z.NavigationForgotPasswordMessage));e.addData(q(Z.NavigationPropsMessage),this.props),this.send(e)},this.handleClickShowPassword=()=>{this.setState({enablePasswordField:!this.state.enablePasswordField})},this.setRememberMe=e=>{this.setState({checkedRememberMe:e})},this.setEmail=e=>{this.setState({email:e})},this.setPassword=e=>{this.setState({password:e})},this.doEmailLogIn=async()=>{const e={"Content-Type":Od.loginApiContentType},t={data:{attributes:{email:this.state.email,password:this.state.password},type:"email_account"}},a=new Q(q(Z.RestAPIRequestMessage));this.apiEmailLoginCallId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),Od.loginAPiEndPoint),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),a.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestMethodMessage),Od.loginAPiMethod),z.sendMessage(a.id,a)},this.onLoginSubmit=e=>{this.setState({email:e.email,password:e.password}),this.doEmailLogIn()},this.handleCloseSuccessDialog=()=>{this.setState({showSuccessDialog:!1,successDialogBtnTitle:""}),sessionStorage.clear()},this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.AccoutLoginSuccess),q(Z.RestAPIResponceMessage),q(Z.ReciveUserCredentials)],this.state={txtInputValue:"",txtSavedValue:"A",enableField:!1,email:"",password:"",enablePasswordField:!0,checkedRememberMe:!1,error:null,showSuccessDialog:!1,successDialogBtnTitle:""},z.attachBuildingBlock(this,this.subScribedMessages),this.emailReg=new RegExp(Od.regexp),this.saveLoggedInUserData=this.saveLoggedInUserData.bind(this)}async componentDidMount(){const e=sessionStorage.getItem("from-page");e&&this.setState({showSuccessDialog:!0,successDialogBtnTitle:"reset-password"===e?"Go to log in":"Continue"})}async receive(e,t){if(z.debugLog("Message Recived",t),t.id===q(Z.AccoutLoginSuccess)){let e=t.getData(q(Z.AuthTokenDataMessage));this.showAlert("Change Value","From: "+this.state.txtSavedValue+" To: "+e),this.setState({txtSavedValue:e})}if(q(Z.RestAPIResponceMessage)===t.id){const e=t.getData(q(Z.RestAPIResponceDataMessage));let a=t.getData(q(Z.RestAPIResponceSuccessMessage)),i=t.getData(q(Z.RestAPIResponceErrorMessage));null!=e&&e===this.apiEmailLoginCallId&&(a&&a.meta&&a.meta.token?(z.unSubscribeFromMessages(this,this.subScribedMessages),await this.saveLoggedInUserData(a)):a.errors&&this.setState({error:a.errors[0].failed_login}),this.parseApiCatchErrorResponse(i))}}doButtonPressed(){let e=new Q(q(Z.AccoutLoginSuccess));e.addData(q(Z.AuthTokenDataMessage),this.state.txtInputValue),this.send(e)}async saveLoggedInUserData(e){this.state.checkedRememberMe?(await D("authToken",e.meta.token),await D("userId",e.meta.id)):(sessionStorage.setItem("authToken",""+e.meta.token),sessionStorage.setItem("userId",""+e.meta.id));const t=e.meta.new_user;t&&sessionStorage.setItem("email",this.state.email);const a=new Q(q(t?Z.NavigationNewPasswordMessage:Z.NavigationDashboardMessage));a.addData(q(Z.NavigationPropsMessage),this.props),this.send(a)}goToForgotPassword(){const e=new Q(q(Z.NavigationForgotPasswordMessage));e.addData(q(Z.NavigationPropsMessage),this.props),e.addData(q(Z.NavigationForgotPasswordPageInfo),"email"),this.send(e)}}const Hd=Object(Ta.a)("button")({all:"unset",cursor:"pointer",textAlign:"center",padding:"10px 95px",backgroundColor:"#DBF0F2",borderRadius:8,fontFamily:"Inter",fontWeight:700,fontSize:16,lineHeight:"24px",color:"#51ABB3",width:"100%",boxSizing:"border-box"}),_d=Object(De.a)({palette:{primary:{main:"#51ABB3",contrastText:"#fff"}},typography:{subtitle1:{fontWeight:400,fontSize:16,lineHeight:"24px",fontFamily:"Cairo",color:"#000000"},h1:{margin:0,fontWeight:700,fontSize:24,lineHeight:"32px",fontFamily:"Cairo",color:"#000000"}},overrides:{MuiFormLabel:{root:{color:"#334155",fontWeight:700,fontSize:16,lineHeight:"24px",fontFamily:"Cairo","&.rememberMe":{color:"#0F172A",fontWeight:400,fontSize:14,lineHeight:"22px"}}},MuiContainer:{root:{marginTop:114,"@media (min-width: 600px)":{padding:0}},maxWidthSm:{"@media (min-width: 600px)":{maxWidth:440}}},MuiOutlinedInput:{root:{borderRadius:8,"&:hover $notchedOutline":{borderColor:"#CBD5E1"},"&.Mui-Focused $notchedOutline":{borderColor:"#51ABB3",borderWidth:1}},notchedOutline:{borderWidth:1,borderColor:"#CBD5E1"},input:{padding:0}},MuiInputBase:{root:{backgroundColor:"#FFFFFF",padding:"16px 8px"},input:{fontFamily:"Cairo",fontSize:"16px",fontWeight:400,lineHeight:"24px",color:"#64748B",height:24}},MuiButton:{root:{fontFamily:"Cairo",fontSize:"14px",fontWeight:700,lineHeight:"22px",color:"#51ABB3",textTransform:"none",borderRadius:8,cursor:"pointer","&:hover":{backgroundColor:"transparent",boxShadow:"none"},"&.mr-2":{marginRight:8},"&.ml-auto":{marginLeft:"auto"},"&.loginBtn":{fontSize:16,lineHeight:"24px",color:"#FFFFFF",backgroundColor:"#51ABB3",padding:16,"&.Mui-disabled":{color:"#FFFFFF",backgroundColor:"#CBD5E1"}}},text:{padding:0},contained:{"&:hover":{boxShadow:"none",backgroundColor:"#51ABB3",color:"#FFFFFF"}}},MuiCheckbox:{root:{padding:0}},MuiBackdrop:{root:{backgroundColor:"#0F172A",opacity:"0.4 !important"}},MuiPaper:{root:{padding:32,boxSizing:"border-box",backgroundColor:"#FFFFFF",display:"flex",flexDirection:"column",gap:12,alignItems:"center"},rounded:{borderRadius:8},elevation24:{boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008, 0px 25px 50px 0px #00000017"}}}});const Vd={mainWrapper:{display:"flex",fontFamily:"Roboto-Medium",flexDirection:"column",alignItems:"center",paddingBottom:"30px",background:"#fff"},inputStyle:{borderBottom:"1px solid rgba(0, 0, 0, 0.6)",width:"100%",height:"100px",display:"flex",flexDirection:"column",justifyContent:"space-between"},buttonStyle:{width:"100%",height:"45px",marginTop:"40px",border:"none",backgroundColor:"rgb(98, 0, 238)"},loginFormContainer:{display:"flex",flexDirection:"column",padding:"40px",boxSizing:"border-box",gap:24},formContainer:{gap:16,display:"flex",flexDirection:"column"},formControl:{display:"flex",flexDirection:"column",gap:4},passwordWithRemeberContainer:{display:"flex",gap:8,flexDirection:"column"}},Ud=Object(Ta.a)("header")({padding:"24px 48px",display:"flex",justifyContent:"space-between",alignItems:"center",position:"sticky",top:0,backgroundColor:"#FAFAFA",zIndex:50}),Wd=Object(Ta.a)("h1")({fontFamily:"Cairo",fontSize:24,lineHeight:"32px",fontWeight:700,color:"#0F172A",margin:0}),jd=Object(Ta.a)("div")({border:"1px solid #CBD5E1",borderRadius:98,backgroundColor:"#FFFFFF",padding:"10px 8px",width:431,height:44,display:"flex",gap:8,boxSizing:"border-box"}),zd=Object(Ta.a)("input")({border:0,outline:0,fontFamily:"Inter",fontWeight:400,fontSize:16,lineHeight:24,color:"#64748B",caretColor:"#94A3B8"}),Qd=Object(Ta.a)("div")({display:"flex",gap:8,cursor:"pointer","& p":{margin:0,fontFamily:"Cairo"},"& .column":{display:"flex",flexDirection:"column",justifyContent:"center"},"& .clip-text":{maxWidth:"20ch",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}),Gd=Object(Ta.a)(wt.a)({height:44,width:44,boxSizing:"border-box",border:"2px solid #E5E6FF",backgroundColor:"#E5E6FF",fontFamily:"Inter",fontWeight:700,fontSize:18,lineHeight:"26px",color:"#64748B",textAlign:"center"}),qd=Object(Ta.a)("p")({color:"#334155",fontWeight:600,fontSize:14,lineHeight:"22px"}),Zd=Object(Ta.a)("p")({color:"#475569",fontWeight:400,fontSize:12,lineHeight:"18px"});class Jd extends K{constructor(e){super(e),this.showUserProfileApiId=null,this.handleUserProfileNavigation=()=>{if(this.state.loading)return;const e=new Q(q(Z.NavigationUserProfileMessage));e.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),this.send(e)},this.subScribedMessages=[q(Z.RestAPIResponceMessage)],this.state={loading:!1,user:null},z.attachBuildingBlock(this,this.subScribedMessages),this.handleGetUserProfile=this.handleGetUserProfile.bind(this),this.handleShowUserProfileResponse=this.handleShowUserProfileResponse.bind(this)}async receive(e,t){const a=q(Z.RestAPIResponceMessage);t.id===a&&null!==this.showUserProfileApiId&&await this.handleShowUserProfileResponse(t)}async componentDidMount(){var e;const t=sessionStorage.getItem("user");if(t)return void this.setState({user:JSON.parse(t)});const a=null!==(e=await B("authToken"))&&void 0!==e?e:sessionStorage.getItem("authToken");this.handleGetUserProfile(a)}async handleShowUserProfileResponse(e){const t=e.getData(q(Z.RestAPIResponceSuccessMessage));if(!t)return;if(t.errors){await T("authToken"),await T("userId"),sessionStorage.clear();const e=new Q(q(Z.NavigationSignupLoginMessage));return e.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),void this.send(e)}if(!t.data)return;const a=t.data.attributes,i={name:a.first_name+" "+a.last_name,role:a.role,profile_picture:a.profile_image};this.setState({user:i,loading:!1}),sessionStorage.setItem("user",JSON.stringify(i))}handleGetUserProfile(e){this.setState({loading:!0});const t={"Content-Type":"application/json",token:e},a=new Q(q(Z.RestAPIRequestMessage));this.showUserProfileApiId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),"account_block/accounts/show_profile"),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestMethodMessage),"GET"),z.sendMessage(a.id,a)}render(){var e,t,a,i,o,n;return s.a.createElement(Ud,null,s.a.createElement(Wd,null,this.props.title),this.props.showSearchBox?s.a.createElement(jd,null,s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1872 14.4715H15.9772L20.2172 18.7315C20.6272 19.1415 20.6272 19.8115 20.2172 20.2215C19.8072 20.6315 19.1372 20.6315 18.7272 20.2215L14.4772 15.9715V15.1815L14.2072 14.9015C12.8072 16.1015 10.8972 16.7215 8.86719 16.3815C6.08719 15.9115 3.86719 13.5915 3.52719 10.7916C3.00719 6.56158 6.56719 3.00157 10.7972 3.52157C13.5972 3.86157 15.9172 6.08158 16.3872 8.86158C16.7272 10.8916 16.1072 12.8016 14.9072 14.2015L15.1872 14.4715ZM5.47719 9.97157C5.47719 12.4616 7.48719 14.4716 9.97719 14.4716C12.4672 14.4716 14.4772 12.4616 14.4772 9.97157C14.4772 7.48157 12.4672 5.47157 9.97719 5.47157C7.48719 5.47157 5.47719 7.48157 5.47719 9.97157Z",fill:"#94A3B8"})),s.a.createElement(zd,{type:"text",value:this.props.searchInputVal,onChange:this.props.onSearchInputChange,placeholder:"Search"})):null,s.a.createElement(Qd,{role:"button",onClick:this.handleUserProfileNavigation},s.a.createElement(Gd,{src:null!==(e=null===(t=this.state.user)||void 0===t?void 0:t.profile_picture)&&void 0!==e?e:void 0},this.state.loading?s.a.createElement(Kt.a,{style:{height:24,width:24,color:"#64748B"}}):s.a.createElement("span",null,null===(a=this.state.user)||void 0===a||null===(i=a.name)||void 0===i?void 0:i[0])),s.a.createElement("div",{className:"column"},this.state.loading?s.a.createElement(qd,null,"Loading..."):s.a.createElement(s.a.Fragment,null,s.a.createElement(qd,{className:"clip-text"},null===(o=this.state.user)||void 0===o?void 0:o.name),s.a.createElement(Zd,null,null===(n=this.state.user)||void 0===n?void 0:n.role)))))}}var Yd=a(113);const Kd=Object(Yt.a)({container:{display:"flex",gap:40},chatModeTitle:{color:"#0F172A",lineHeight:"34px",fontSize:"16px",fontWeight:700,margin:0},chatMode:{display:"flex",gap:8,alignItems:"center","& > span":{fontFamily:"Cairo",fontSize:12,lineHeight:"16px",fontWeight:400,"&:first-child":{display:"inline-block",height:12,width:12,borderRadius:20,backgroundColor:"#51ABB3",'&[data-mode="web"]':{backgroundColor:"#314A84"}},"&:last-child":{fontWeight:700}}}}),Xd={id:"drawPlugin",afterDraw:e=>{const t=e.ctx,a=e.data.datasets;a.forEach((i,s)=>{e.getDatasetMeta(s).data.forEach((e,i)=>{if(0===a[s].data[e.$context.dataIndex])return;const{x:o,y:n}=e.tooltipPosition();t.beginPath(),t.arc(o,n,6,0,2*Math.PI,!1),t.fillStyle="transparent",t.fill(),t.lineWidth=2,t.strokeStyle="#FFFFFF",t.stroke()})})}},$d=function(e){return{labelTextColor:function(){return"#0F172A"},label:function(t){let a=e.labels[t.dataIndex]||"";return a&&(a+=": "),a+=e.datasets[t.datasetIndex].data[t.dataIndex]+"%",a}}};function ec(e){let{mobilePercentage:t,desktopPercentage:a}=e;const i=Kd(),o=[{id:1,mode:"mobile",percentage:t,label:"Mobile"},{id:2,mode:"web",percentage:a,label:"Web"}],n={labels:o.map(e=>e.label),datasets:[{label:"My First Dataset",data:o.map(e=>e.percentage),backgroundColor:["#4DA2AA","#314A84"],hoverOffset:4}]};return s.a.createElement("div",{className:i.container},s.a.createElement("div",{style:{width:149,height:149}},s.a.createElement(Yd.b,{data:n,plugins:[Xd],options:{cutout:"60%",plugins:{legend:{display:!1},tooltip:{enabled:!0,backgroundColor:"#F1F5F9",bodyColor:"#F1F5F9",borderColor:"#F1F5F9",borderWidth:1,titleFont:{weight:"bold"},callbacks:$d(n)},datalabels:{display:!1}}}})),s.a.createElement("div",null,s.a.createElement("h3",{className:i.chatModeTitle},"Mode"),o.map(e=>s.a.createElement("div",{key:e.id,className:i.chatMode},s.a.createElement("span",{"data-mode":e.mode}),s.a.createElement("span",null,e.label+" - "),s.a.createElement("span",null,e.percentage+"%")))))}var tc=a(1788),ac=a(1789),ic=a(1835),sc=a(1783),oc=a(1784),nc=a(1836),rc=a(1785),lc=a(1786),dc=a(1787),cc=a(318),hc=a.n(cc);const pc=Object(Yt.a)({container:{display:"flex",gap:4,padding:4,backgroundColor:"#F8FAFC",borderRadius:50},filterBtn:{all:"unset",cursor:"pointer",padding:"2px 12px",borderRadius:50,display:"flex",alignItems:"center",gap:4,border:"1px solid #F8FAFC",color:"#64748B",fontFamily:"Cairo",fontWeight:700,fontSize:14,lineHeight:"22px",'&[aria-selected="true"]':{borderColor:"#51ABB3",backgroundColor:"#E3EFFD",color:"#51ABB3"}},calendarPopover:{boxSizing:"border-box",width:364,maxWidth:364,boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF",borderRadius:8,padding:24,scrollbarWidth:"none","&::-webkit-scrollbar":{width:0},"& > div":{display:"flex",flexDirection:"column",gap:16,"& > h4":{margin:0,fontFamily:"Cairo",fontWeight:700,fontSize:14,lineHeight:"22px",color:"#64748B"}}},calendarSelectBtnContainer:{display:"flex",gap:10,padding:2,borderRadius:50,backgroundColor:"#F8FAFC","& > button":{all:"unset",cursor:"pointer",flex:1,fontFamily:"Cairo",textAlign:"center",fontSize:14,fontWeight:700,color:"#64748B",lineHeight:"22px",padding:"3px 30px",'&[aria-selected="true"]':{color:"#51ABB3",backgroundColor:"#E4F0FE",borderRadius:50}}},calendarFooterBtn:{display:"flex",gap:8,"& > button":{all:"unset",cursor:"pointer",flex:1,textAlign:"center",color:"#51ABB3",backgroundColor:"#E5EBFF",borderRadius:8,fontFamily:"Inter",fontWeight:700,fontSize:16,LineHeight:"24px",padding:"6px 10px","&.primary":{backgroundColor:"#51ABB3",color:"#FFFFFF"}}},calendar:{"& .rmdp-wrapper":{width:"auto",borderRadius:0},"& .rmdp-border":{border:0},"& .rmdp-calendar":{padding:0,width:"100%",display:"flex",flexDirection:"column",gap:16},"& .rmdp-ym":{height:"auto",gap:2},"& .rmdp-day, & .rmdp-week-day":{height:44,width:"auto",flex:1,cursor:"pointer",position:"relative",color:"#0F172A",display:"flex",alignItems:"center",justifyContent:"center"},"& .rmdp-week-day":{height:20,color:"#64748B",fontSize:14,fontFamily:"Cairo",fontWeight:400,lineHeight:"22px"}},arrowIconBtn:{padding:0,"&:hover":{backgroundColor:"transparent"}}});function gc(e){let{onDateRangeSelect:t,onLastYearSelect:a}=e;const o=pc(),[n,r]=Object(i.useState)(null),[l,d]=Object(i.useState)(void 0),[c,h]=Object(i.useState)("days"),[p,g]=Object(i.useState)(null),u=()=>{g(null),d(void 0)},m=(e,t)=>s.a.createElement(Fe.a,{className:o.arrowIconBtn,onClick:t},"left"===e?s.a.createElement(tc.a,{htmlColor:"#94A3B8"}):s.a.createElement(ac.a,{htmlColor:"#94A3B8"})),C=e=>()=>{h(e),d(void 0)};return s.a.createElement("div",{className:o.container},s.a.createElement("button",{"aria-selected":null===n,className:o.filterBtn,onClick:()=>{r(null);const e=new Date,a=Object(dc.a)(e,9);t(a,e)}},"Overall"),s.a.createElement("button",{"aria-selected":"last-month"===n,className:o.filterBtn,onClick:()=>{const e=new Date,a=Object(ic.a)(e,1),i=Object(sc.a)(a),s=Object(oc.a)(a);d({startDate:i,endDate:s}),r("last-month"),t(i,s)}},"Last month"),s.a.createElement("button",{"aria-selected":"last-week"===n,className:o.filterBtn,onClick:()=>{const e=new Date,a=Object(nc.a)(e,1),i=Object(rc.a)(a),s=Object(lc.a)(a);d({startDate:i,endDate:s}),r("last-week"),t(i,s)}},"Last week"),s.a.createElement("button",{"aria-selected":"last-year"===n,className:o.filterBtn,onClick:()=>{d(void 0),r("last-year"),a(["year"])}},"Last year"),s.a.createElement("button",{"aria-selected":"custom"===n,className:o.filterBtn,onClick:e=>{r("custom"),g(e.currentTarget),d(void 0)}},"Custom",s.a.createElement(Ya.a,{htmlColor:"currentColor",style:{height:22,width:22}})),s.a.createElement(Mt.a,{open:Boolean(p),anchorEl:p,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:u,PaperProps:{className:o.calendarPopover}},s.a.createElement("div",null,s.a.createElement("h4",null,"Select Date"),s.a.createElement("div",{className:o.calendarSelectBtnContainer},s.a.createElement("button",{"aria-selected":"days"===c,onClick:C("days")},"Days"),s.a.createElement("button",{"aria-selected":"week"===c,onClick:C("week")},"Week"),s.a.createElement("button",{"aria-selected":"month"===c,onClick:C("month")},"Month")),s.a.createElement("div",{className:o.calendar},"days"===c||"week"===c?s.a.createElement(cc.Calendar,{key:c,range:!0,showOtherDays:!0,shadow:!1,highlightToday:!1,hideWeekDays:!1,monthYearSeparator:" ",weekStartDayIndex:1,renderButton:m,rangeHover:!0,disableMonthPicker:!0,disableYearPicker:!0,weekPicker:"week"===c,onChange:e=>{if(!e||!Array.isArray(e))return;if(2!==e.length)return;const t=new Date(e[0].format()),a=new Date(e[1].format());d({startDate:t,endDate:a})}}):null,"month"===c?s.a.createElement(cc.Calendar,{key:c,range:!1,shadow:!1,highlightToday:!1,renderButton:m,disableMonthPicker:!1,disableYearPicker:!0,onlyMonthPicker:!0,hideMonth:!0,onChange:e=>{if(e&&!Array.isArray(e)){const{year:t,month:{number:a}}=e,i=new Date(t,a-1),s=Object(ic.a)(i,0),o=Object(sc.a)(s),n=Object(oc.a)(s);d({startDate:o,endDate:n})}}}):null),s.a.createElement("div",{className:o.calendarFooterBtn},s.a.createElement("button",{onClick:u},"Cancel"),s.a.createElement("button",{className:"primary",onClick:()=>{l&&(g(null),t(l.startDate,l.endDate))}},"Done")))))}var uc=a(271),mc=a(56);mc.e.register(uc.a);const Cc={width:500};function bc(e){let{patientsData:t,chartLabels:a}=e;const i=e=>t.filter(t=>t.question===e).map(e=>e.patients),o={labels:a,datasets:[{label:"Appointments",data:i("Appointments"),backgroundColor:"#314A84",borderRadius:4},{label:"General Enquiries",data:i("General Enquiries"),backgroundColor:"#FF606B",borderRadius:4},{label:"Manage/check referrals",data:i("Manage/check referrals"),backgroundColor:"#F59E0B",borderRadius:4},{label:"Prescriptions",data:i("Prescriptions"),backgroundColor:"#34D399",borderRadius:4},{label:"Sick/Fit Notes",data:i("Sick/Fit Notes"),backgroundColor:"#C1C7CD",borderRadius:4},{label:"Test Results",data:i("Test Results"),backgroundColor:"#7D6AEB",borderRadius:4}]};return s.a.createElement("div",{style:{flex:1,overflowX:"hidden"}},s.a.createElement(Yd.a,Object.assign({data:o,options:{plugins:{legend:{display:!1},tooltip:{enabled:!0,backgroundColor:"#F1F5F9",bodyColor:"#F1F5F9",titleColor:"#0F172A",borderColor:"#F1F5F9",borderWidth:1,titleFont:{weight:"bold"},callbacks:{labelTextColor:function(e){return"#0F172A"}}},datalabels:{display:function(e){return e.datasetIndex===e.chart.data.datasets.length-1},align:"end",anchor:"end",font:{weight:600,family:"Cairo",size:12,lineHeight:"16px"},color:"#0F172A",formatter:function(e,t){const a=t.chart.data.datasets.map(e=>e.data[t.dataIndex]).reduce((e,t)=>e+t,0);return new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(a)}}},scales:{x:{stacked:!0,grid:{display:!1}},y:{stacked:!0,grid:{borderDash:[5,5],borderColor:"transparent",tickColor:"transparent"},ticks:{callback:function(e){return new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(+e)}}}},responsive:!0}},Cc,{className:"stacked-canvas"})))}var Ac=a(1790),fc=a(1827);a(1411);class xc extends K{constructor(e){super(e),this.apiGetDataCallId=void 0,this.getToken=()=>{const e=new Q(q(Z.SessionRequestMessage));this.send(e)},this.isLastYearSelected=!1,this.handleRestApiResponse=e=>{const t={},{title:a}=e.getData(q(Z.NavigationPropsMessage));"CHATBOT_AGGREGATE_DATA"===a&&(t.CHATBOT_AGGREGATE_DATA=this.handleChatbotAggregateDataResponse);const i=t[a];i&&i(e)},this.handleChatbotAggregateDataResponse=async e=>{var t,a;const i=e.getData(q(Z.RestAPIResponceSuccessMessage));if(this.setState({loading:!1}),i)if(null===(t=i.errors)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.token)await this.handleLogout();else{if(i.monthly_counts){const{patientStackData:e,chartLabelDataSet:t}=this.formatPatientsData(i.monthly_counts,this.isLastYearSelected);this.setState({patientsData:e,chartLabels:[...t]})}if(i.mobile_percentage){const{mobile_percentage:e,desktop_percentage:t,most_popular_hour:a,message_count:s,daily_keyword_counts:o}=i,{patientStackData:n,chartLabelDataSet:r}=this.formatPatientsData(o);this.setState({mobilePercentage:e,desktopPercentage:t,mostPopularHour:a,totalChats:s,patientsData:n,chartLabels:[...r]})}}else Pi.b.error("Failed to fetch data",{className:"error__toast"})},this.getChatbotAggregateData=e=>{this.setState({loading:!0});const t=new Q(q(Z.RestAPIRequestMessage)),a={"Content-Type":"application/json",token:e};t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(a)),t.addData(q(Z.RestAPIResponceEndPointMessage),"bx_block_visual_analytics/audiences/aggregate_data"),t.addData(q(Z.RestAPIRequestMethodMessage),"GET"),t.addData(q(Z.NavigationPropsMessage),{title:"CHATBOT_AGGREGATE_DATA"}),this.send(t)},this.onLastYearSelect=e=>{this.isLastYearSelected=!0,this.getKeywordCountsForDates(e)},this.onDateRangeSelect=(e,t)=>{this.isLastYearSelected=!1;const a=Object(Ac.a)({start:e,end:t}).map(e=>Object(fc.a)(e,"yyyy-MM-dd"));this.getKeywordCountsForDates(a)},this.getKeywordCountsForDates=e=>{const t={"Content-Type":"application/json",token:this.state.token},a={dates:e};this.setState({loading:!0});const i=new Q(q(Z.RestAPIRequestMessage));i.addData(q(Z.RestAPIRequestMethodMessage),"POST"),i.addData(q(Z.RestAPIResponceEndPointMessage),"bx_block_visual_analytics/audiences/keyword_counts_for_dates"),i.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),i.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify(a)),i.addData(q(Z.NavigationPropsMessage),{title:"CHATBOT_AGGREGATE_DATA"}),this.send(i)},this.formatPatientsData=(e,t)=>{let a=[],i=1,s=new Set([]);return Object.keys(e).forEach(o=>{const n=e[o];let r={day:"2-digit",month:"short"};t&&(r={year:"numeric",month:"short"});const l=new Intl.DateTimeFormat("en",r).format(new Date(o));s.add(l),Object.keys(n).forEach(e=>{"total count"!==e&&(a.push({id:i,date:l,patients:n[e],question:e}),i++)})}),{patientStackData:a,chartLabelDataSet:s}},this.handleLogout=async()=>{await T("authToken"),await T("userId"),sessionStorage.clear();const e=new Q(q(Z.NavigationSignupLoginMessage));e.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),this.send(e)},this.formatNumber=e=>new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(e),this.receive=this.receive.bind(this),this.subScribedMessages=[q(Z.SessionResponseMessage),q(Z.RestAPIResponceMessage)],this.state={token:"",info:{labels:[],data:[],barColors:[]},data:{weekly:{labels:["week1","week2","week3","week4","week5"],data:[[5],[9],[3],[6],[2]],barColors:["#7db6b0"]},monthly:{labels:["Jun","Fab","Mar","Apr","Jun","Jul","Aug","Sep","Oct","Nom","Dec"],data:[[9],[5],[6],[3],[2],[7],[1],[4],[2],[6],[]],barColors:["#7db6b0"]}},googleChartData:["Title","Value"],mobilePercentage:0,desktopPercentage:0,mostPopularHour:"00:00 - 00:00",totalChats:0,loading:!1,patientsData:[],chartLabels:[]},z.attachBuildingBlock(this,this.subScribedMessages)}async receive(e,t){t.id===q(Z.RestAPIResponceMessage)&&this.handleRestApiResponse(t)}async componentDidMount(){var e;super.componentDidMount(),this.getToken(),!1===this.isPlatformWeb()&&this.props.navigation.addListener("willFocus",()=>{this.getToken()});const t=null!==(e=await B("authToken"))&&void 0!==e?e:sessionStorage.getItem("authToken");this.setState({token:t}),this.getChatbotAggregateData(t)}}const Ec=Object(Ta.a)("div")({position:"fixed",inset:0,zIndex:100,width:"100vw",height:"100dvh",display:"grid",placeItems:"center",backgroundColor:"#0F172A70",backdropFilter:"blur(4px)"}),vc=Object(Ta.a)(we.a)({backgroundColor:"#FAFAFA",display:"flex"}),yc=Object(Ta.a)(we.a)({margin:"14px 48px",display:"flex",flexDirection:"column",gap:24,borderRadius:8}),wc=Object(Ta.a)("section")({display:"flex",flexDirection:"column",gap:24,borderRadius:8,backgroundColor:"#FFFFFF",padding:24,boxShadow:"0px 2px 8px 0px #00000014",boxSizing:"border-box","& .chart-section-header":{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:"12px 24px","&.items-center":{alignItems:"center"}},"&.chart-1":{flex:"1 0 502px",height:241},"&.chart-2":{flex:"1 0 300px",height:241,justifyContent:"center","& .value":{fontFamily:"Cairo",fontSize:40,lineHeight:"31px",fontWeight:700,color:"#64748B"}},"& .chart-heading":{margin:0,fontFamily:"Cairo",fontSize:16,lineHeight:"20px",fontWeight:700,color:"#64748B"},"& .chart-subheading":{margin:0,color:"#64748B",fontFamily:"Cairo",fontSize:14,lineHeight:"18px",fontWeight:400},"& .text-center":{textAlign:"center"},"& .labels":{display:"flex",gap:8,flexDirection:"column",fontFamily:"Cairo",fontSize:12,fontWeight:400,lineHeight:"16px",color:"#0F172A","& > h3":{margin:0,color:"#6F96AA",fontSize:14,lineHeight:"26px",fontWeight:700},"& > div":{display:"flex",gap:8,alignItems:"center","& > span:first-child":{display:"inline-block",width:12,height:12,borderRadius:20}}}}),Ic=["Appointments","General Enquiries","Manage/check referrals","Prescriptions","Sick/Fit Notes","Test Results"],Pc={Appointments:"#314A84","General Enquiries":"#FF606B","Manage/check referrals":"#F59E0B",Prescriptions:"#34D399","Sick/Fit Notes":"#C1C7CD","Test Results":"#7D6AEB"};const Sc=Object(De.a)({palette:{primary:{main:"#fff",contrastText:"#fff"}},typography:{h6:{fontWeight:500},subtitle1:{margin:"20px 0px"}}}),Mc=Object(Yt.a)({tabButtonGroup:{borderRadius:50,backgroundColor:"#F8FAFC",width:155,display:"flex",padding:4,boxSizing:"border-box"},tabButton:{width:"50%",display:"flex",gap:5,justifyContent:"center",alignItems:"center",fontFamily:"Cairo",fontWeight:700,fontSize:14,lineHeight:"22px",color:"#64748B",border:0,backgroundColor:"transparent",padding:0,cursor:"pointer",boxSizing:"border-box","&:focus":{outline:"0"},"&[data-selected='true']":{backgroundColor:"#E5F1FF",border:"1px solid #96CED3",color:"#51ABB3",borderRadius:50}}});function Fc(e){let{value:t,onValueChange:a}=e;const i=Mc();return s.a.createElement("div",{role:"tablist",className:i.tabButtonGroup},s.a.createElement("button",{role:"tab","aria-controls":"content-grid",id:"trigger-grid","aria-selected":"grid"===t,"data-selected":"grid"===t,className:i.tabButton,onClick:()=>a("grid")},s.a.createElement("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.31185 8.64575H3.18685C2.79727 8.64575 2.47852 8.327 2.47852 7.93742V5.10408C2.47852 4.7145 2.79727 4.39575 3.18685 4.39575H5.31185C5.70144 4.39575 6.02019 4.7145 6.02019 5.10408V7.93742C6.02019 8.327 5.70144 8.64575 5.31185 8.64575ZM5.31185 13.6041H3.18685C2.79727 13.6041 2.47852 13.2853 2.47852 12.8958V10.0624C2.47852 9.67284 2.79727 9.35409 3.18685 9.35409H5.31185C5.70144 9.35409 6.02019 9.67284 6.02019 10.0624V12.8958C6.02019 13.2853 5.70144 13.6041 5.31185 13.6041ZM7.43685 13.6041H9.56185C9.95144 13.6041 10.2702 13.2853 10.2702 12.8958V10.0624C10.2702 9.67284 9.95144 9.35409 9.56185 9.35409H7.43685C7.04727 9.35409 6.72852 9.67284 6.72852 10.0624V12.8958C6.72852 13.2853 7.04727 13.6041 7.43685 13.6041ZM13.8118 13.6041H11.6868C11.2973 13.6041 10.9785 13.2853 10.9785 12.8958V10.0624C10.9785 9.67284 11.2973 9.35409 11.6868 9.35409H13.8118C14.2014 9.35409 14.5202 9.67284 14.5202 10.0624V12.8958C14.5202 13.2853 14.2014 13.6041 13.8118 13.6041ZM7.43685 8.64575H9.56185C9.95144 8.64575 10.2702 8.327 10.2702 7.93742V5.10408C10.2702 4.7145 9.95144 4.39575 9.56185 4.39575H7.43685C7.04727 4.39575 6.72852 4.7145 6.72852 5.10408V7.93742C6.72852 8.327 7.04727 8.64575 7.43685 8.64575ZM10.9785 7.93742V5.10408C10.9785 4.7145 11.2973 4.39575 11.6868 4.39575H13.8118C14.2014 4.39575 14.5202 4.7145 14.5202 5.10408V7.93742C14.5202 8.327 14.2014 8.64575 13.8118 8.64575H11.6868C11.2973 8.64575 10.9785 8.327 10.9785 7.93742Z",fill:"currentColor"})),"Grid"),s.a.createElement("button",{role:"tab","aria-controls":"content-list",id:"trigger-list","aria-selected":"list"===t,"data-selected":"list"===t,className:i.tabButton,onClick:()=>a("list")},s.a.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.00065 5.99992H4.33398C4.70065 5.99992 5.00065 5.69992 5.00065 5.33325V3.99992C5.00065 3.63325 4.70065 3.33325 4.33398 3.33325H3.00065C2.63398 3.33325 2.33398 3.63325 2.33398 3.99992V5.33325C2.33398 5.69992 2.63398 5.99992 3.00065 5.99992ZM4.33398 9.33326H3.00065C2.63398 9.33326 2.33398 9.03326 2.33398 8.66658V7.33325C2.33398 6.96659 2.63398 6.66659 3.00065 6.66659H4.33398C4.70065 6.66659 5.00065 6.96659 5.00065 7.33325V8.66658C5.00065 9.03326 4.70065 9.33326 4.33398 9.33326ZM4.33398 12.6666H3.00065C2.63398 12.6666 2.33398 12.3666 2.33398 11.9999V10.6666C2.33398 10.2999 2.63398 9.99992 3.00065 9.99992H4.33398C4.70065 9.99992 5.00065 10.2999 5.00065 10.6666V11.9999C5.00065 12.3666 4.70065 12.6666 4.33398 12.6666ZM13.0006 9.33326H6.33398C5.96732 9.33326 5.66732 9.03326 5.66732 8.66658V7.33325C5.66732 6.96659 5.96732 6.66659 6.33398 6.66659H13.0006C13.3673 6.66659 13.6673 6.96659 13.6673 7.33325V8.66658C13.6673 9.03326 13.3673 9.33326 13.0006 9.33326ZM6.33398 12.6666H13.0006C13.3673 12.6666 13.6673 12.3666 13.6673 11.9999V10.6666C13.6673 10.2999 13.3673 9.99992 13.0006 9.99992H6.33398C5.96732 9.99992 5.66732 10.2999 5.66732 10.6666V11.9999C5.66732 12.3666 5.96732 12.6666 6.33398 12.6666ZM5.66732 5.33325V3.99992C5.66732 3.63325 5.96732 3.33325 6.33398 3.33325H13.0006C13.3673 3.33325 13.6673 3.63325 13.6673 3.99992V5.33325C13.6673 5.69992 13.3673 5.99992 13.0006 5.99992H6.33398C5.96732 5.99992 5.66732 5.69992 5.66732 5.33325Z",fill:"currentColor"})),"List"))}var Rc=a(1791);const Dc=Object(De.a)({overrides:{MuiPaper:{root:{border:"1px solid #E2E8F0",width:200,padding:4,boxSizing:"border-box",scrollbarWidth:"none","&::-webkit-scrollbar":{width:0}},elevation8:{boxShadow:"0px 2px 8px 0px #00000014"},rounded:{borderRadius:8}},MuiCheckbox:{root:{padding:0}},MuiFormLabel:{root:{fontFamily:"Inter",fontWeight:400,fontSize:14,lineHeight:"22px",color:"#0F172A",margin:0,"&.Mui-focused":{color:"#0F172A"},"&.sub-title":{fontSize:10,lineHeight:"15px"}}},MuiButton:{root:{padding:"8px 10px",borderRadius:8,fontFamily:"Inter",fontWeight:700,fontSize:16,lineHeight:"24px",textTransform:"none"},contained:{backgroundColor:"#F8FAFC",color:"#51ABB3",boxShadow:"none","&:hover":{backgroundColor:"#F8FAFC",color:"#51ABB3",boxShadow:"none"},"&.primary":{backgroundColor:"#F1F5F9",color:"#64748B"},"&.primary:hover":{backgroundColor:"#F1F5F9",color:"#64748B"}}},MuiFormControl:{root:{display:"flex",flexDirection:"row",padding:"9px 0px 9px 16px",alignItems:"center",gap:8,cursor:"pointer","&.menu":{'&[aria-expanded="true"]':{borderRadius:8,backgroundColor:"#EEF7F7"}},"&.border-b":{borderBottom:"1px solid #E2E8F0"}}}}}),Bc=Object(Ta.a)("div")({display:"flex",gap:5,fontFamily:"Inter",fontWeight:400,fontSize:16,lineHeight:"24px",color:"#475569"}),Tc=Object(Ta.a)("button")({display:"flex",gap:8,border:0,padding:0,outline:0,cursor:"pointer",backgroundColor:"transparent",fontWeight:700,color:"#475569","&:focus":{outline:0}}),kc=Object(Ta.a)("button")({all:"unset",cursor:"pointer",marginLeft:"auto",height:24}),Nc=Object(Ta.a)("div")({borderBottom:"1px solid #E2E8F0","&.header":{margin:4,padding:"12px 16px",color:"#94A3B8",fontFamily:"Inter",fontWeight:700,fontSize:16,lineHeight:"18px"}}),Oc=Object(Ta.a)("div")({display:"flex",justifyContent:"flex-end",gap:6,padding:12}),Lc=Object(Ta.a)("button")({all:"unset",cursor:"pointer",fontFamily:"Inter",fontWeight:400,fontSize:14,linHheight:22,color:"#0F172A",padding:"9px 16px"}),Hc=Object(Ta.a)("div")({display:"flex",flexDirection:"column",gap:2}),_c={theme:Dc,styledComponent:{MenuContainer:Bc,MenuButton:Tc,StyledArrowButton:kc,PopoverStyledFooter:Oc,PopoverStyledHeader:Nc,ClearButton:Lc,SubMenu:Object(Ta.a)("div")({position:"fixed",backgroundColor:"#FFFFFF",width:200,boxSizing:"border-box",borderRadius:8,padding:4,border:"1px solid #E2E8F0",boxShadow:"0px 2px 8px 0px #00000014",zIndex:2e3}),FormControlGroup:Object(Ta.a)("div")({display:"flex",flexDirection:"column",gap:2}),Column:Hc}},{theme:Vc,styledComponent:{MenuContainer:Uc,MenuButton:Wc,StyledArrowButton:jc,PopoverStyledFooter:zc,PopoverStyledHeader:Qc,SubMenu:Gc,FormControlGroup:qc,Column:Zc,ClearButton:Jc}}=_c,Yc=[{label:"IBC 1",value:"ibc1"},{label:"IBC 2",value:"ibc2"}],Kc=[{label:"PCN",value:"pcn",subTitle:"All"},{label:"GP Surgery",value:"gp_surgery",subTitle:"All"},{label:"Chatbot",value:"chatbot",subTitle:"All"}],Xc=()=>s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M16.59 8.29498L12 12.875L7.41 8.29498L6 9.70498L12 15.705L18 9.70498L16.59 8.29498Z",fill:"#475569"})),$c=()=>s.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("rect",{x:"0.5",y:"0.5",width:"19",height:"19",rx:"5.5",stroke:"#64748B"})),eh=()=>s.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("rect",{width:"20",height:"20",rx:"6",fill:"#51ABB3"}),s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.0611 5.42226C15.5183 5.73217 15.6376 6.35399 15.3277 6.81112L10.2432 14.3111C10.0771 14.5561 9.8111 14.7149 9.51671 14.7448C9.22232 14.7748 8.92977 14.6728 8.71777 14.4664L4.80234 10.6535C4.40667 10.2682 4.39827 9.63508 4.78358 9.23941C5.16888 8.84374 5.80199 8.83534 6.19766 9.22065L9.25771 12.2006L13.6723 5.68883C13.9822 5.2317 14.604 5.11235 15.0611 5.42226Z",fill:"white"}));function th(){const[e,t]=Object(i.useState)(null),[a,o]=Object(i.useState)(null),n=e=>t=>{o({name:e,anchor:t.currentTarget})},r=()=>o(null),l=[{label:"Horizon PCN",value:"horizon"},{label:"Heinlein PCN",value:"heinlein"}],d=[{label:"Mile Lane",value:"1"},{label:"Peel",value:"2"},{label:"Red Bank",value:"3"}],c=[{label:"Chatbot1",value:"1"},{label:"Chatbot2",value:"2"},{label:"Chatbot3",value:"3"}];return s.a.createElement(Be.a,{theme:Vc},s.a.createElement(Mt.a,{id:"popover",open:Boolean(null===a||void 0===a?void 0:a.anchor),anchorEl:null===a||void 0===a?void 0:a.anchor,onClose:r,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},"pcn"===(null===a||void 0===a?void 0:a.name)&&s.a.createElement(ih,{options:l,title:"PCN",handleCancel:r,showSelectHeader:!0}),"gp_surgery"===(null===a||void 0===a?void 0:a.name)&&s.a.createElement(ih,{options:d,title:"GP Surgery",handleCancel:r,showSelectHeader:!0}),"chatbot"===(null===a||void 0===a?void 0:a.name)&&s.a.createElement(ih,{options:c,title:"Chatbot",handleCancel:r,showSelectHeader:!0})),s.a.createElement(ah,{handleClose:()=>{t(null)},anchorEl:e,pcnOptions:l,gpSurgeryOptions:d,chatbotOptions:c}),s.a.createElement(Uc,null,s.a.createElement("span",{id:"select-ibc"},"ICB:"),s.a.createElement(Wc,{"aria-labelledby":"select-ibc",onClick:e=>{t(e.currentTarget)}},"All",s.a.createElement(Xc,null))),s.a.createElement(Uc,null,s.a.createElement("span",{id:"select-pcn"},"PCN:"),s.a.createElement(Wc,{"aria-labelledby":"select-pcn",onClick:n("pcn")},"All",s.a.createElement(Xc,null))),s.a.createElement(Uc,null,s.a.createElement("span",{id:"select-gpsurgery"},"GP Surgery:"),s.a.createElement(Wc,{"aria-labelledby":"select-gpsurgery",onClick:n("gp_surgery")},"All",s.a.createElement(Xc,null))),s.a.createElement(Uc,null,s.a.createElement("span",{id:"select-chatbot"},"Chatbot:"),s.a.createElement(Wc,{"aria-labelledby":"select-chatbot",onClick:n("chatbot")},"All",s.a.createElement(Xc,null))))}const ah=e=>{var t,a,o,n;let{anchorEl:r,handleClose:l,pcnOptions:d,gpSurgeryOptions:c,chatbotOptions:h}=e;const p=Object(i.useRef)(null),g=Object(i.useRef)(null),[u,m]=Object(i.useState)(null),[C,b]=Object(i.useState)(null),[A,f]=Object(i.useState)(new Set([])),x=()=>{m(null),b(null),l()},E=()=>b(null),v=null===(t=p.current)||void 0===t?void 0:t.getBoundingClientRect(),y=null===(a=g.current)||void 0===a?void 0:a.getBoundingClientRect(),w=null===y||void 0===y?void 0:y.top,I=(null!==(o=null===y||void 0===y?void 0:y.left)&&void 0!==o?o:0)+194,P=Yc.every(e=>A.has(e.value));return s.a.createElement(Be.a,{theme:Vc},s.a.createElement(Mt.a,{id:"popover",open:Boolean(r),anchorEl:r,onClose:x,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},s.a.createElement(Qc,null,s.a.createElement(so.a,null,s.a.createElement(oo.a,{component:"span"},"IBC: select"),s.a.createElement(jc,null,s.a.createElement(cr.a,{htmlColor:"#0F172A"})))),s.a.createElement(qc,null,s.a.createElement(so.a,{ref:p},s.a.createElement(ws.a,{icon:s.a.createElement($c,null),checkedIcon:s.a.createElement(eh,null),id:"all",checked:P,onChange:e=>{const{checked:t}=e.target;if(t){const e=new Set(Yc.map(e=>e.value));f(e)}else f(new Set([]))},inputProps:{"aria-checked":P,"aria-label":"IBC-All"}}),s.a.createElement(oo.a,{htmlFor:"all"},"All")),Yc.map(e=>{return s.a.createElement(so.a,{key:e.value,className:"menu","data-testid":e.value,onClick:(t=e.value,e=>{m(t),b(null)}),"aria-expanded":u===e.value,"aria-haspopup":"ibc1"===u},s.a.createElement(ws.a,{icon:s.a.createElement($c,null),checkedIcon:s.a.createElement(eh,null),id:`ibc-${e.value}-checkbox`,checked:A.has(e.value),inputProps:{"aria-checked":A.has(e.value)},onChange:t=>((e,t)=>{const a=new Set([...A]);e?a.add(t):a.delete(t),f(a)})(t.target.checked,e.value)}),s.a.createElement(oo.a,{htmlFor:`ibc-${e.value}-checkbox`,style:{width:"100%"}},e.label),s.a.createElement(jc,null,s.a.createElement(Rc.a,{htmlColor:"#0F172A"})));var t}),s.a.createElement(Jc,{onClick:()=>f(new Set([]))},"Clear"),s.a.createElement(zc,null,s.a.createElement(Re.a,{variant:"contained","data-testid":"cancelIBCPopover",onClick:x},"Cancel"),s.a.createElement(Re.a,{variant:"contained",className:"primary"},"Apply"))),u&&s.a.createElement(Gc,{"data-testid":u+"-popover",style:{top:null===v||void 0===v?void 0:v.top,left:(null!==(n=null===v||void 0===v?void 0:v.left)&&void 0!==n?n:0)+195}},s.a.createElement(qc,null,s.a.createElement(Qc,{className:"header"},"ibc1"===u?"IBC 1":"IBC 2"),s.a.createElement(so.a,{ref:g},s.a.createElement(ws.a,{icon:s.a.createElement($c,null),checkedIcon:s.a.createElement(eh,null),id:"all",checked:!0}),s.a.createElement(oo.a,{htmlFor:"all"},"All")),Kc.map(e=>{return s.a.createElement(so.a,{key:e.value,className:"menu border-b","aria-expanded":C===e.value,onClick:(t=e.value,()=>{b(t)}),"data-testid":`open-${e.value}-popover`},s.a.createElement(Zc,null,s.a.createElement(oo.a,{component:"p"},e.label),s.a.createElement(oo.a,{component:"p",className:"sub-title"},e.subTitle)),s.a.createElement(jc,null,s.a.createElement(Rc.a,{htmlColor:"#0F172A"})));var t}),s.a.createElement(Jc,null,"Clear"),s.a.createElement(zc,null,s.a.createElement(Re.a,{variant:"contained","data-testid":"cancel-"+u,onClick:()=>{m(null),b(null)}},"Cancel"),s.a.createElement(Re.a,{variant:"contained",className:"primary"},"Apply")))),"pcn"===C&&s.a.createElement(Gc,{"data-testid":"PCN-popover",style:{top:w,left:I}},s.a.createElement(ih,{options:d,title:"PCN",handleCancel:E})),"gp_surgery"===C&&s.a.createElement(Gc,{"data-testid":"GP Surgery-popover",style:{top:w,left:I}},s.a.createElement(ih,{options:c,title:"GP Surgery",handleCancel:E})),"chatbot"===C&&s.a.createElement(Gc,{"data-testid":"Chatbot-popover",style:{top:w,left:I}},s.a.createElement(ih,{options:h,title:"Chatbot",handleCancel:E}))))},ih=e=>{let{showSelectHeader:t,title:a,options:o,handleCancel:n}=e;const[r,l]=Object(i.useState)(new Set([])),d=o.every(e=>r.has(e.value));return s.a.createElement(Be.a,{theme:Vc},s.a.createElement(s.a.Fragment,null,t&&s.a.createElement(Qc,null,s.a.createElement(so.a,null,s.a.createElement(oo.a,{component:"span"},a,": select"),s.a.createElement(jc,null,s.a.createElement(cr.a,{htmlColor:"#0F172A"})))),s.a.createElement(qc,null,!t&&s.a.createElement(Qc,{className:"header"},a),s.a.createElement(so.a,null,s.a.createElement(ws.a,{icon:s.a.createElement($c,null),checkedIcon:s.a.createElement(eh,null),id:a+"-all",checked:d,onChange:e=>{const{checked:t}=e.target;if(t){const e=new Set(o.map(e=>e.value));l(e)}else l(new Set([]))},inputProps:{"aria-checked":d,"aria-label":`Check ${a}-all`}}),s.a.createElement(oo.a,{htmlFor:a+"-all"},"All")),o.map(e=>s.a.createElement(so.a,{key:e.value,className:"menu"},s.a.createElement(ws.a,{icon:s.a.createElement($c,null),checkedIcon:s.a.createElement(eh,null),id:`${a}-${e.value}`,checked:r.has(e.value),inputProps:{"aria-checked":r.has(e.value)},onChange:t=>((e,t)=>{const a=new Set([...r]);e?a.add(t):a.delete(t),l(a)})(t.target.checked,e.value)}),s.a.createElement(oo.a,{htmlFor:`${a}-${e.value}`},e.label))),s.a.createElement(Jc,{onClick:()=>l(new Set([]))},"Clear"),s.a.createElement(zc,null,s.a.createElement(Re.a,{variant:"contained",onClick:n},"Cancel"),s.a.createElement(Re.a,{variant:"contained",className:"primary"},"Apply")))))};var sh=a(1793),oh=a(717);const nh=Object(De.a)({overrides:{MuiBackdrop:{root:{backgroundColor:"#0F172A"}},MuiPaper:{root:{scrollbarWidth:"none","&::-webkit-scrollbar":{width:0}},elevation24:{boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008, 0px 25px 50px 0px #00000017"},rounded:{borderRadius:24}},MuiDialog:{paperWidthSm:{width:568}},MuiDialogActions:{root:{padding:"24px 40px",gap:10,borderTop:"1px solid #CBD5E1",position:"sticky",bottom:0,zIndex:2,backgroundColor:"#FFFFFF",fontWeight:700,fontSize:16,lineHeight:"24px"},spacing:{"& > :not(:first-child)":{marginLeft:0}}}}}),rh=Object(Yt.a)({dialogHeader:{padding:"24px 40px",borderBottom:"1px solid #CBD5E1",display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,position:"sticky",top:0,zIndex:2,backgroundColor:"#FFFFFF","& > h4":{margin:0,fontFamily:"Cairo",fontWeight:700,fontSize:24,lineHeight:"32px",color:"#0F172A"},"& > button":{all:"unset",cursor:"pointer"}},dialogContent:{padding:"24px 40px","& > p":{margin:"0 0 24px",fontFamily:"Cairo",fontWeight:400,fotnSize:18,fontSize:26,color:"#0F172A"},"& > img":{display:"block",margin:"auto",border:0}},download:{all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:16,width:137,justifyContent:"center",padding:"16px 0",boxSizing:"border-box",fontFamily:"Cairo",color:"#334155"},actionButton:{all:"unset",cursor:"pointer",boxSizing:"border-box",width:105,padding:16,borderRadius:8,textAlign:"center",backgroundColor:"#E5F6FF",color:"#51ABB3","&.primary":{backgroundColor:"#51ABB3",color:"#FFFFFF"}}});var lh=e=>{let{botName:t,id:a,botQRCodeLink:o}=e;const[n,r]=Object(i.useState)(!1),l=rh(),d=()=>{r(!n)};return s.a.createElement(Be.a,{theme:nh},s.a.createElement("button",{"aria-label":"show qr code dialog of "+t,onClick:d},s.a.createElement("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M3.59453 7.21196C3.22641 7.21196 2.91355 7.08315 2.65593 6.82553C2.39833 6.56791 2.26953 6.25505 2.26953 5.88693V2.84453C2.26953 2.47641 2.39833 2.16355 2.65593 1.90593C2.91355 1.64833 3.22641 1.51953 3.59453 1.51953H6.63693C7.00505 1.51953 7.31791 1.64833 7.57553 1.90593C7.83315 2.16355 7.96196 2.47641 7.96196 2.84453C7.96196 3.21266 7.83315 3.52553 7.57553 3.78313C7.31791 4.04075 7.00505 4.16956 6.63693 4.16956H4.91956V5.88693C4.91956 6.25505 4.79075 6.56791 4.53313 6.82553C4.27553 7.08315 3.96266 7.21196 3.59453 7.21196ZM3.59453 22.4805C3.22641 22.4805 2.91355 22.3516 2.65593 22.094C2.39833 21.8364 2.26953 21.5235 2.26953 21.1554V18.113C2.26953 17.7449 2.39833 17.432 2.65593 17.1744C2.91355 16.9168 3.22641 16.788 3.59453 16.788C3.96266 16.788 4.27553 16.9168 4.53313 17.1744C4.79075 17.432 4.91956 17.7449 4.91956 18.113V19.8304H6.63693C7.00505 19.8304 7.31791 19.9592 7.57553 20.2168C7.83315 20.4744 7.96196 20.7873 7.96196 21.1554C7.96196 21.5235 7.83315 21.8364 7.57553 22.094C7.31791 22.3516 7.00505 22.4804 6.63693 22.4804L3.59453 22.4805ZM18.863 22.4805C18.4949 22.4805 18.182 22.3516 17.9244 22.094C17.6668 21.8364 17.538 21.5235 17.538 21.1554C17.538 20.7873 17.6668 20.4744 17.9244 20.2168C18.182 19.9592 18.4949 19.8304 18.863 19.8304H20.5804V18.113C20.5804 17.7449 20.7092 17.432 20.9668 17.1744C21.2244 16.9168 21.5373 16.788 21.9054 16.788C22.2735 16.788 22.5864 16.9168 22.844 17.1744C23.1016 17.432 23.2304 17.7449 23.2304 18.113V21.1554C23.2304 21.5235 23.1016 21.8364 22.844 22.094C22.5864 22.3516 22.2735 22.4804 21.9054 22.4804L18.863 22.4805ZM21.9054 7.21196C21.5373 7.21196 21.2244 7.08315 20.9668 6.82553C20.7092 6.56791 20.5804 6.25505 20.5804 5.88693V4.16956H18.863C18.4949 4.16956 18.182 4.04075 17.9244 3.78313C17.6668 3.52553 17.538 3.21266 17.538 2.84453C17.538 2.47641 17.6668 2.16355 17.9244 1.90593C18.182 1.64833 18.4949 1.51953 18.863 1.51953H21.9054C22.2735 1.51953 22.5864 1.64833 22.844 1.90593C23.1016 2.16355 23.2304 2.47641 23.2304 2.84453V5.88693C23.2304 6.25505 23.1016 6.56791 22.844 6.82553C22.5864 7.08315 22.2735 7.21196 21.9054 7.21196ZM18.25 19V17.5H19.75V19H18.25ZM18.25 16V14.5H19.75V16H18.25ZM16.75 17.5V16H18.25V17.5H16.75ZM15.25 19V17.5H16.75V19H15.25ZM13.75 17.5V16H15.25V17.5H13.75ZM16.75 14.5V13H18.25V14.5H16.75ZM15.25 16V14.5H16.75V16H15.25ZM13.75 14.5V13H15.25V14.5H13.75ZM15.075 11C14.7069 11 14.394 10.8712 14.1364 10.6136C13.8788 10.356 13.75 10.0431 13.75 9.67496V6.32501C13.75 5.95687 13.8788 5.64401 14.1364 5.38641C14.394 5.12879 14.7069 4.99998 15.075 4.99998H18.425C18.7931 4.99998 19.106 5.12879 19.3636 5.38641C19.6212 5.64401 19.75 5.95687 19.75 6.32501V9.67496C19.75 10.0431 19.6212 10.356 19.3636 10.6136C19.106 10.8712 18.7931 11 18.425 11H15.075ZM7.07501 19C6.70687 19 6.39401 18.8712 6.13641 18.6136C5.87879 18.356 5.74998 18.0431 5.74998 17.675V14.325C5.74998 13.9569 5.87879 13.644 6.13641 13.3864C6.39401 13.1288 6.70687 13 7.07501 13H10.425C10.7931 13 11.106 13.1288 11.3636 13.3864C11.6212 13.644 11.75 13.9569 11.75 14.325V17.675C11.75 18.0431 11.6212 18.356 11.3636 18.6136C11.106 18.8712 10.7931 19 10.425 19H7.07501ZM7.07501 11C6.70687 11 6.39401 10.8712 6.13641 10.6136C5.87879 10.356 5.74998 10.0431 5.74998 9.67496V6.32501C5.74998 5.95687 5.87879 5.64401 6.13641 5.38641C6.39401 5.12879 6.70687 4.99998 7.07501 4.99998H10.425C10.7931 4.99998 11.106 5.12879 11.3636 5.38641C11.6212 5.64401 11.75 5.95687 11.75 6.32501V9.67496C11.75 10.0431 11.6212 10.356 11.3636 10.6136C11.106 10.8712 10.7931 11 10.425 11H7.07501ZM7.46196 17.288H10.038V14.712H7.46196V17.288ZM7.46196 9.28801H10.038V6.71196H7.46196V9.28801ZM15.462 9.28801H18.038V6.71196H15.462V9.28801Z",fill:"#475569"}))),s.a.createElement(Ji.a,{open:n,onClose:d,PaperProps:{className:"rounded-lg"},BackdropProps:{style:{opacity:.4}}},s.a.createElement("div",{className:l.dialogHeader},s.a.createElement("h4",null,"QR Code"),s.a.createElement("button",{"aria-label":"close qr code dialog",onClick:d},s.a.createElement(go.a,{htmlColor:"#334155"}))),s.a.createElement("div",{className:l.dialogContent},s.a.createElement("p",null,"Copy, download or save QR code"),s.a.createElement("img",{src:o,width:203,height:203})),s.a.createElement(po.a,null,s.a.createElement("button",{className:l.download,onClick:async()=>{Object(oh.saveAs)(o,`chatbot_${a}.png`)}},s.a.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M12 15.889C11.8667 15.889 11.7417 15.868 11.625 15.826C11.5083 15.7846 11.4 15.714 11.3 15.614L7.7 12.014C7.51667 11.8306 7.425 11.5973 7.425 11.314C7.425 11.0306 7.51667 10.7973 7.7 10.614C7.88333 10.4306 8.12067 10.3346 8.412 10.326C8.704 10.318 8.94167 10.4056 9.125 10.589L11 12.464V5.31396C11 5.03063 11.096 4.79297 11.288 4.60097C11.4793 4.40963 11.7167 4.31396 12 4.31396C12.2833 4.31396 12.521 4.40963 12.713 4.60097C12.9043 4.79297 13 5.03063 13 5.31396V12.464L14.875 10.589C15.0583 10.4056 15.296 10.318 15.588 10.326C15.8793 10.3346 16.1167 10.4306 16.3 10.614C16.4833 10.7973 16.575 11.0306 16.575 11.314C16.575 11.5973 16.4833 11.8306 16.3 12.014L12.7 15.614C12.6 15.714 12.4917 15.7846 12.375 15.826C12.2583 15.868 12.1333 15.889 12 15.889ZM6 20.314C5.45 20.314 4.97933 20.1183 4.588 19.727C4.196 19.335 4 18.864 4 18.314V16.314C4 16.0306 4.09567 15.793 4.287 15.601C4.479 15.4096 4.71667 15.314 5 15.314C5.28333 15.314 5.521 15.4096 5.713 15.601C5.90433 15.793 6 16.0306 6 16.314V18.314H18V16.314C18 16.0306 18.096 15.793 18.288 15.601C18.4793 15.4096 18.7167 15.314 19 15.314C19.2833 15.314 19.5207 15.4096 19.712 15.601C19.904 15.793 20 16.0306 20 16.314V18.314C20 18.864 19.8043 19.335 19.413 19.727C19.021 20.1183 18.55 20.314 18 20.314H6Z",fill:"#334155"})),"Download"),s.a.createElement("button",{className:l.actionButton,onClick:d},"Cancel"),s.a.createElement("button",{className:l.actionButton+" primary",onClick:d},"Done"))))};const dh={copytoClipboard:async(e,t)=>{try{await navigator.clipboard.writeText(e),Pi.b.success(t,{className:"success__toast"})}catch(a){Pi.b.error("Failed to copy to clipboard",{className:"error__toast"})}}};var ch=a(1792);const hh=Object(De.a)({overrides:{MuiPopover:{paper:{minWidth:0,maxWidth:"231px",width:231,border:"1px solid #E2E8F0",padding:4,boxSizing:"border-box"}},MuiPaper:{rounded:{borderRadius:8},elevation8:{boxShadow:"0px 8px 32px 0px #0000000F, 0px 4px 8px 0px #00000008"}},MuiList:{padding:{padding:4}},MuiMenuItem:{root:{gap:8,padding:"7px 16px",fontFamily:"Cairo",fontWeight:400,fontSize:14,lineHeight:"22px",color:"#0F172A"}},MuiListItem:{button:{"&:hover":{backgroundColor:"transparent"}}},MuiSvgIcon:{root:{"&.size-18":{height:18,width:18}}}}}),ph=Object(Yt.a)({cardMoreActionsButton:{all:"unset",padding:4,cursor:"pointer",height:32,width:32,borderRadius:24,boxSizing:"border-box",color:"#475569",'&[aria-haspopup="true"]':{backgroundColor:"#0F172A8C",color:"#FFFFFF"}}});function gh(e){let{id:t,navigateToEditPage:a,handleDeleteBot:o,handleDuplicateBot:n}=e;const r=Object(i.useRef)(null),[l,d]=Object(i.useState)(null),c=ph(),h=()=>{d(null)},p=Boolean(l),g=!!l&&window.innerHeight-l.getBoundingClientRect().bottom>240;return s.a.createElement(Be.a,{theme:hh},s.a.createElement("button",{ref:r,"aria-controls":""+t,"aria-haspopup":p,"aria-label":"show more action list of chatbot "+t,className:c.cardMoreActionsButton,onClick:e=>{d(e.currentTarget)}},s.a.createElement(sr.a,null)),s.a.createElement(Mt.a,{open:p,id:""+t,anchorEl:l,onClose:h,anchorOrigin:{vertical:g?"bottom":"top",horizontal:"right"},transformOrigin:{vertical:g?"top":"bottom",horizontal:"right"}},s.a.createElement(Sa.a,null,s.a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.75 2.25H14.25C15.075 2.25 15.75 2.925 15.75 3.75V14.25C15.75 15.075 15.075 15.75 14.25 15.75H3.75C2.925 15.75 2.25 15.075 2.25 14.25V3.75C2.25 2.925 2.925 2.25 3.75 2.25ZM4.5 14.25C4.0875 14.25 3.75 13.9125 3.75 13.5V4.5C3.75 4.0875 4.0875 3.75 4.5 3.75H13.5C13.9125 3.75 14.25 4.0875 14.25 4.5V13.5C14.25 13.9125 13.9125 14.25 13.5 14.25H4.5ZM9 12.75C8.5875 12.75 8.25 12.4125 8.25 12V6C8.25 5.5875 8.5875 5.25 9 5.25C9.4125 5.25 9.75 5.5875 9.75 6V12C9.75 12.4125 9.4125 12.75 9 12.75ZM6 12.75C5.5875 12.75 5.25 12.4125 5.25 12V8.25C5.25 7.8375 5.5875 7.5 6 7.5C6.4125 7.5 6.75 7.8375 6.75 8.25V12C6.75 12.4125 6.4125 12.75 6 12.75ZM11.25 12C11.25 12.4125 11.5875 12.75 12 12.75C12.4125 12.75 12.75 12.4125 12.75 12V10.5C12.75 10.0875 12.4125 9.75 12 9.75C11.5875 9.75 11.25 10.0875 11.25 10.5V12Z",fill:"#0F172A"})),"Analytics"),s.a.createElement(Sa.a,{onClick:()=>{n(t),h()}},s.a.createElement(ch.a,{className:"size-18"}),"Duplicate Bot"),s.a.createElement(Sa.a,{onClick:()=>a(t)},s.a.createElement(Jl.a,{className:"size-18"}),"Edit Bot"),s.a.createElement(Sa.a,{onClick:()=>{o(t),h()}},s.a.createElement(Za.a,{className:"size-18"}),"Delete Bot")))}const{copytoClipboard:uh}=dh,mh=Object(Yt.a)({card:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:4,padding:24,backgroundColor:"#FFFFFF",border:"1px solid #CBD5E1",borderRadius:8,boxSizing:"border-box",height:"100%","& p":{margin:0}},cardBody:{display:"flex",flexDirection:"column",gap:8,height:"100%"},cardDetail:{display:"flex",gap:8,"& .relative":{position:"relative",height:"max-content"}},cardAvatar:{height:44,width:44,boxSizing:"border-box",backgroundColor:"#F0E5FF",border:"2px solid #E5E6FF","& > span":{color:"#A666FF",fontFamily:"Inter",fontWeight:700,fontSize:18,lineHeight:"26px"},'&[data-active="true"]':{border:"2px solid #34D399",backgroundColor:"#D1FAE5","& > span":{color:"#059669"}}},circleDot:{position:"absolute",bottom:-1,right:-3,height:14,width:14,border:"2px solid #FFFFFF",borderRadius:20,zIndex:2,backgroundColor:"#CBD5E1",'&[data-active="true"]':{backgroundColor:"#51ABB3"}},chatbotTitle:{fontFamily:"Inter",fontWeight:700,fontSize:16,lineHeight:"22px",color:"#0F172A"},chatbotCreatorName:{fontFamily:"Cairo",fontWeight:400,fontSize:14,lineHeight:"22px",color:"#64748B"},cardActions:{display:"flex",gap:8,paddingLeft:52,flex:1,alignItems:"flex-end","& button":{all:"unset",cursor:"pointer"}}});function Ch(e){let{id:t,name:a,organisation:i,code:o,link:n,qrcode:r,image:l,active:d,navigateToEditPage:c,handleDeleteBot:h,handleDuplicateBot:p}=e;const g=mh();return s.a.createElement(St.a,{item:!0,xl:2,lg:3,md:4,sm:6,xs:12},s.a.createElement("div",{className:g.card},s.a.createElement("div",{className:g.cardBody},s.a.createElement("div",{className:g.cardDetail},s.a.createElement("div",{className:"relative"},s.a.createElement(wt.a,{"data-active":d,"data-testid":a+" avatar",className:g.cardAvatar,alt:a,src:null!==l&&void 0!==l?l:void 0},s.a.createElement("span",null,""+a.charAt(0))),s.a.createElement("div",{className:g.circleDot,"data-active":d})),s.a.createElement("div",null,s.a.createElement("p",{className:g.chatbotTitle},a),s.a.createElement("p",{className:g.chatbotCreatorName},i))),s.a.createElement("div",{className:g.cardActions},s.a.createElement("button",{onClick:()=>uh(o,"iFrame code copied to clipboard"),"aria-label":"copy iframe code of "+a},s.a.createElement(sh.a,{htmlColor:"#475569"})),s.a.createElement("button",{onClick:()=>uh(n,"URL copied to clipboard"),"aria-label":"copy link of "+a},s.a.createElement(ss.a,{htmlColor:"#475569"})),r&&d&&s.a.createElement(lh,{id:t,botName:a,botQRCodeLink:r}))),s.a.createElement(gh,{id:t,navigateToEditPage:c,handleDeleteBot:h,handleDuplicateBot:p})))}const{copytoClipboard:bh}=dh,Ah=Object(De.a)({overrides:{MuiAvatar:{root:{boxSizing:"border-box",width:44,height:44,border:"2px solid #34D399","& > span":{color:"#059669",lineHeight:"26px",fontWeight:700,fontSize:18,fontFamily:"Inter"}},colorDefault:{color:"#059669",backgroundColor:"#D1FAE5"}},MuiSwitch:{root:{padding:0,width:32,height:16,borderRadius:33},input:{left:0,width:32,height:12},switchBase:{padding:0,top:1.6,left:2,"&.Mui-checked":{transform:"none",right:-13.5}},thumb:{width:12,height:12,backgroundColor:"#FFFFFF",boxShadow:"none"},track:{backgroundColor:"#E2E8F0",opacity:1},colorSecondary:{"&.Mui-checked + $track":{backgroundColor:"#51ABB3",opacity:1}}}}}),fh=Object(Yt.a)({tableContainer:{height:576,width:"100%",overflow:"auto",position:"relative",boxSizing:"border-box",scrollbarWidth:"none","&::-webkit-scrollbar":{width:0}},table:{width:"100%",textIndent:0,borderColor:"inherit",borderCollapse:"collapse",captionSide:"bottom"},tableHead:{backgroundColor:"#FFFFFF","& tr":{backgroundColor:"#FFFFFF",borderBottom:"1px solid #E2E8F0",position:"sticky",top:0,zIndex:2}},tableHeading:{fontFamily:"Cairo",fontWeight:700,fontSize:14,lineHeight:"22px",color:"#64748B",padding:"24px 24px 8px",textAlign:"left",width:"max-content",verticalAlign:"bottom",height:54,boxSizing:"border-box","&:last-child":{padding:0}},tableCell:{"&.embedOptions":{"& button":{all:"unset",cursor:"pointer"}}},tableBody:{"& tr":{boxSizing:"border-box",borderBottom:"1px solid #E2E8F0","& td":{height:78,padding:"12px 24px",boxSizing:"border-box",width:"max-content",verticalAlign:"bottom","& .data-cell":{height:44,display:"flex",alignItems:"center"}},"&:last-child":{borderBottom:0},"&:first-child":{"& td":{height:90}}}},embedOptionsCell:{height:44,display:"flex",alignItems:"center",gap:10,"& > button":{all:"unset",cursor:"pointer"}},chatbotDetailCell:{height:44,display:"flex",gap:10,alignItems:"center","& p":{margin:0,fontFamily:"Cairo",lineHeight:"22px"},"& p:first-child":{fontSize:16,fontWeight:700,color:"#1E293B"},"& p:last-child":{fontWeight:400,color:"#64748B",fontSize:14}},memebersCell:{height:44,display:"flex",alignItems:"center",gap:10,"& > span":{fontFamily:"Cairo",lineHeight:"22px",fontWeight:400,color:"#0F172A",fontSize:14}},moreActionsCell:{textAlign:"end","& > button":{all:"unset",cursor:"pointer",display:"inline-block",boxSizing:"border-box",padding:4,width:32,height:32,color:"#475569",borderRadius:24,'&[aria-haspopup="true"]':{color:"#FFFFFF",backgroundColor:"#0F172A8C"}}}});function xh(){return s.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("path",{d:"M16.2455 13.3026C17.4909 14.1483 18.3636 15.2941 18.3636 16.8219V19.55H22V16.8219C22 14.8394 18.7545 13.6663 16.2455 13.3026Z",fill:"#475569"}),s.a.createElement("path",{d:"M14.7273 12.275C16.7364 12.275 18.3636 10.6472 18.3636 8.6375C18.3636 6.62778 16.7364 5 14.7273 5C14.3 5 13.9 5.09094 13.5182 5.21825C14.2727 6.15491 14.7273 7.34619 14.7273 8.6375C14.7273 9.92881 14.2727 11.1201 13.5182 12.0568C13.9 12.1841 14.3 12.275 14.7273 12.275Z",fill:"#475569"}),s.a.createElement("path",{d:"M9.27273 12.275C11.2818 12.275 12.9091 10.6472 12.9091 8.6375C12.9091 6.62778 11.2818 5 9.27273 5C7.26364 5 5.63636 6.62778 5.63636 8.6375C5.63636 10.6472 7.26364 12.275 9.27273 12.275ZM9.27273 6.81875C10.2727 6.81875 11.0909 7.63719 11.0909 8.6375C11.0909 9.63781 10.2727 10.4563 9.27273 10.4563C8.27273 10.4563 7.45455 9.63781 7.45455 8.6375C7.45455 7.63719 8.27273 6.81875 9.27273 6.81875Z",fill:"#475569"}),s.a.createElement("path",{d:"M9.27273 13.1844C6.84545 13.1844 2 14.4029 2 16.8219V19.55H16.5455V16.8219C16.5455 14.4029 11.7 13.1844 9.27273 13.1844ZM14.7273 17.7312H3.81818V16.831C4 16.1762 6.81818 15.0031 9.27273 15.0031C11.7273 15.0031 14.5455 16.1762 14.7273 16.8219V17.7312Z",fill:"#475569"}))}var Eh=e=>{let{chatbots:t,navigateToEditPage:a,handleDeleteBot:i,handleDuplicateBot:o,handleBotStatusChange:n}=e;const r=fh();return s.a.createElement(Be.a,{theme:Ah},s.a.createElement("div",{style:{width:"100%",overflow:"hidden"}},s.a.createElement("div",{role:"tabpanel","data-value":"list",className:r.tableContainer},s.a.createElement("table",{className:r.table},s.a.createElement("thead",{className:r.tableHead},s.a.createElement("tr",null,s.a.createElement("th",{scope:"col",className:r.tableHeading},"Bot Name"),s.a.createElement("th",{scope:"col",colSpan:2,className:r.tableHeading},s.a.createElement("span",{style:{display:"inline-block",width:"max-content"}},"Total number of chats")),s.a.createElement("th",{scope:"col",className:r.tableHeading},"Embed Options"),s.a.createElement("th",{scope:"col",className:r.tableHeading},"Status"),s.a.createElement("th",{scope:"col",className:r.tableHeading}))),s.a.createElement("tbody",{className:r.tableBody},t.map(e=>{var t;return s.a.createElement("tr",{key:e.id},s.a.createElement("td",null,s.a.createElement("div",{className:r.chatbotDetailCell},s.a.createElement(wt.a,{alt:e.name,src:null!==(t=e.image)&&void 0!==t?t:void 0},s.a.createElement("span",null,""+e.name.charAt(0))),s.a.createElement("div",null,s.a.createElement("p",null,e.name),s.a.createElement("p",null,e.organisation)))),s.a.createElement("td",{colSpan:2},s.a.createElement("div",{className:r.memebersCell},s.a.createElement(xh,null),s.a.createElement("span",null,"00"))),s.a.createElement("td",null,s.a.createElement("div",{className:r.embedOptionsCell},s.a.createElement("button",{onClick:()=>bh(e.code,"iFrame code copied to clipboard"),"aria-label":"copy iframe code of "+e.name},s.a.createElement(sh.a,{htmlColor:"#475569"})),s.a.createElement("button",{onClick:()=>bh(e.link,"URL copied to clipboard"),"data-testid":"copy link of "+e.name,"aria-label":"copy link of "+e.name},s.a.createElement(ss.a,{htmlColor:"#475569"})),e.qrcode&&e.active&&s.a.createElement(lh,{id:e.id,botName:e.name,botQRCodeLink:e.qrcode}))),s.a.createElement("td",null,s.a.createElement("div",{className:"data-cell"},s.a.createElement(zs.a,{disableRipple:!0,id:"change status of "+e.name,checked:e.active,onClick:()=>n(e.id)}))),s.a.createElement("td",{className:r.moreActionsCell,style:{width:"auto"}},s.a.createElement("div",{className:"data-cell"},s.a.createElement(gh,{id:e.id,navigateToEditPage:a,handleDeleteBot:i,handleDuplicateBot:o}))))}))))))};const vh=a(1412),yh=a(1413),{getNodeDataFromConnectorCardAttributes:wh}=xo,{getNewNodesWithNewEdges:Ih}=Dn,Ph=a(1414);class Sh extends K{constructor(e){super(e),this.getAllChatBotId="",this.deleteChatBotId="",this.duplicateChatBotId="",this.updateChatBotId="",this.txtInputWebProps={onChangeText:e=>{this.setState({txtInputValue:e})},secureTextEntry:!1},this.txtInputMobileProps={...this.txtInputWebProps,autoCompleteType:"email",keyboardType:"email-address"},this.txtInputProps=this.isPlatformWeb()?this.txtInputWebProps:this.txtInputMobileProps,this.btnShowHideProps={onPress:()=>{this.setState({enableField:!this.state.enableField}),this.txtInputProps.secureTextEntry=!this.state.enableField,this.btnShowHideImageProps.source=this.txtInputProps.secureTextEntry?vh:yh}},this.btnShowHideImageProps={source:this.txtInputProps.secureTextEntry?vh:yh},this.btnExampleProps={onPress:()=>this.doButtonPressed()},this.setInputValue=e=>{this.setState({txtInputValue:e})},this.setEnableField=()=>{this.setState({enableField:!this.state.enableField})},this.onTabChange=e=>{this.setState({tabValue:e})},this.onPageChange=(e,t)=>{this.setState(e=>({pagination:{...e.pagination,currentPage:t}}),()=>this.getAllChatbots())},this.onToggleCreateBotDialog=()=>{this.setState({showCreateBotDialog:!this.state.showCreateBotDialog})},this.handleOpenDeleteBotConfirmModal=e=>{const t=this.state.chatbots.find(t=>t.id===e);this.setState({selectedChatbot:t})},this.handleCloseDeleteBotConfirmModal=()=>{this.setState({selectedChatbot:void 0})},this.handleDeleteChatBot=()=>{if(this.state.selectedChatbot){const e=this.state.selectedChatbot.id;this.setState({chatBotId:e,isLoading:!0,selectedChatbot:void 0}),this.deleteChatbot(e)}},this.handleDuplicateBotId=e=>{this.setState({chatBotId:e,isLoading:!0},()=>this.duplicateChatbot(e))},this.handleCheckErrorInConnectorCards=e=>{var t;const a=null!==(t=this.state.connectorCardsMap.get(e))&&void 0!==t?t:[];let i=[{id:"start",type:"homeNode",position:{x:24,y:24},data:{title:"Home",message:"Home",status:"disconnected",source:[],type:"send_message",id:Date.now(),connectorCardType:"chatbot"}}];a.forEach(e=>{i.push({id:""+e.id,position:{x:0,y:0},type:"cardNode",data:{...e,onClick:()=>{},onCardNodeDelete:()=>{}}})});const{newNodes:s}=Dn.getNewNodesWithNewEdges({nodes:i,onAddNodeClick:()=>{},checkForError:!0});return s.some(e=>!!e.data.error)||0===a.length},this.handleCloseSettingsError=()=>{this.setState({hasChatbotSettingsError:!1,chatBotId:null})},this.handleCloseBotConnectorCardsError=()=>{this.setState({hasChatbotCardsError:!1,chatBotId:null})},this.handleEditChatbot=()=>{null!==this.state.chatBotId&&this.navigateToEditPage(this.state.chatBotId)},this.handleNavigateToBotSettingsPage=()=>{const e=new Q(q(Z.NavigationSettingsMessage));e.addData(q(Z.NavigationPropsMessage),this.props),e.addData(q(Z.NavigationScreenNameMessage),this.state.chatBotId),this.send(e)},this.handleBotStatusChange=e=>{const t=this.state.chatbots.find(t=>t.id===e);if(!t.active){if(this.handleCheckErrorInConnectorCards(e))return void this.setState({hasChatbotCardsError:!0,chatBotId:e});const t=this.state.generalSettingsMap.get(e),{chatbot_url:a,qr_code:i}=t.data.attributes;if(!a||!i)return void this.setState({hasChatbotSettingsError:!0,chatBotId:e})}const a=this.state.chatbots.map(t=>+t.id===e?{...t,active:!t.active}:t);this.setState({chatbots:a,chatBotId:e},()=>this.updateChatbotStatus(e,t.active))},this.handleSearchChange=e=>{sessionStorage.removeItem("search"),this.setState({search:e.target.value},()=>this.getAllChatbots())},this.navigateToEditPage=e=>{const t=new Q(q(Z.NavigationIndividualBotMessage));t.addData(q(Z.NavigationScreenNameMessage),e),t.addData(q(Z.NavigationPropsMessage),{navigation:this.props.navigation}),this.send(t)},this.getAllChatbots=async()=>{const e={"Content-Type":Ph.validationApiContentType,token:this.state.token},t=new Q(q(Z.RestAPIRequestMessage));this.getAllChatBotId=t.messageId,t.addData(q(Z.RestAPIResponceEndPointMessage),`${Ph.createBotApiEndpoint}?search=${this.state.search}&per_page=${this.state.pagination.itemPerPage}&page=${this.state.pagination.currentPage}`),t.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(e)),t.addData(q(Z.RestAPIRequestMethodMessage),Ph.validationApiMethodType),z.sendMessage(t.id,t)},this.deleteChatbot=async e=>{const t={"Content-Type":Ph.validationApiContentType,token:this.state.token},a=new Q(q(Z.RestAPIRequestMessage));this.deleteChatBotId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),`${Ph.createBotApiEndpoint}/${e}`),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestMethodMessage),Ph.delete),z.sendMessage(a.id,a)},this.duplicateChatbot=async e=>{const t={"Content-Type":Ph.validationApiContentType,token:this.state.token},a=new Q(q(Z.RestAPIRequestMessage));this.duplicateChatBotId=a.messageId,a.addData(q(Z.RestAPIResponceEndPointMessage),`${Ph.createBotApiEndpoint}/${e}/create_duplicate_bot`),a.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(t)),a.addData(q(Z.RestAPIRequestMethodMessage),Ph.post),z.sendMessage(a.id,a)},this.updateChatbotStatus=async(e,t)=>{const a=t?"inactive":"active",i={"Content-Type":Ph.validationApiContentType,token:this.state.token},s=new Q(q(Z.RestAPIRequestMessage));this.updateChatBotId=s.messageId,s.addData(q(Z.RestAPIResponceEndPointMessage),`${Ph.createBotApiEndpoint}/${e}/update_status`),s.addData(q(Z.RestAPIRequestHeaderMessage),JSON.stringify(i)),s.addData(q(Z.RestAPIRequestBodyMessage),JSON.stringify({status:a})),s.addData(q(Z.RestAPIRequestMethodMessage),Ph.post),z.sendMessage(s.id,s)},this.handleResponseForGetAllChatbotsData=async e=>{if(null!==this.getAllChatBotId&&this.getAllChatBotId===e.getData(q(Z.RestAPIResponceDataMessage))){var t,a,i;const s=e.getData(q(Z.RestAPIResponceSuccessMessage));if(null===s||void 0===s?void 0:s.chatbots){const e=new Map,t=new Map,a=new Map,i=s.chatbots.map(i=>{const s=i.data;e.set(s.attributes.id,i.general_setting),t.set(s.attributes.id,i.design_setting);const o=i.connector_cards.data.map(e=>wh(e));a.set(s.attributes.id,o);const n=i.general_setting.data.attributes.chatbot_url,r=`\n \n\n
\n \n
\n\n