(()=>{var e,t={"./src/views/website/fragments/contracts/view.html.erb":e=>{e.exports='<div>\n    \x3c!-- ko with: contract() --\x3e\n        <div class="public_header">\n            <div class="public_header_right">\n                <button id="btnPrint" href="#" class="js-button public_action_btn button-print" data-bind="event: {\'click\' : $root.print }"><i class="icon-print"></i>Print</button>\n            </div>\n            <h1 data-bind="text: display_name() || ($root.brand_customization().contract ? $root.brand_customization().contract.title : \'Contract\')"></h1>\n        </div>\n        <div class="paper">\n          <div class="paper-content">\n          \x3c!-- ko if: $root.accountinfo().account.header_info.document_header_image && $root.accountinfo().account.header_info.document_header_image.length --\x3e\n            <div class="document-header-container">\n              <img data-bind="attr: {alt: $root.accountinfo().account.name, src: $root.accountinfo().account.header_info.document_header_image + \'?size=original\'}" />\n            </div>\n          \x3c!-- /ko --\x3e\n\n\n          <div class="client_invoice client_contract">\n\t\t      \x3c!-- ko if: status() == \'voided\' --\x3e\n            <div class="voided">\n                <img src="/images/scribble-void.svg" alt=\'Void\'/>\n            </div>\n\t\t      \x3c!-- /ko --\x3e\n                \x3c!-- ko if: !$root.accountinfo().account.logo_yn && !$root.accountinfo().account.header_info.hide_document_logo --\x3e\n                    <div class="client_logo js-font_family" data-bind="text: $root.accountinfo().account.name"></div>\n                \x3c!-- /ko --\x3e\n                \x3c!-- ko if: $root.accountinfo().account.logo_yn && !$root.accountinfo().account.header_info.hide_document_logo--\x3e\n                    <div class="client_logo" data-bind="css: {\'combo\' : $root.contract_logo && $root.contract_logo()}"><img data-bind="attr: {alt: $root.accountinfo().account.name, \'src\': dataModel.accountinfo().account.logo_path  + \'?size=original\'}" /></div>\n                \x3c!-- /ko --\x3e\n                <form id="contract">\n\t                <div data-bind="template: {\'afterRender\': function() {\n\t                    if(dataModel.contract().status() == \'voided\')\n\t\t                {\n\t\t\t             \t$(\'input, textarea\').attr(\'disabled\',\'true\')\n\t\t\t            }\n\n\t                    }\n\t                 }">\n\t                    <div class="contract_content col-12" data-bind="html: tokenized">\n\t                    </div>\n\t                </div>\n                </form>\n                \x3c!-- ko if: location.pathname == \'/p\' --\x3e\n                    \x3c!-- ko if: status() != \'voided\' && (($root.quote() && $root.quote().accepted_at()) || (!$root.quote())) --\x3e\n                        <div class="sign">\n                            \x3c!-- ko if: !signed_at() --\x3e\n                                <p class="js-font_color js-font_family">To indicate your acceptance of the above, sign electronically below.</p>\n                            \x3c!-- /ko --\x3e\n\n                            <div class="signatures">\n                                <ul data-bind="foreach: signatures">\n                                    \x3c!-- ko if: !signed_yn() --\x3e\n                                        <li>\n                                            <label data-bind="text: name"></label>\n                                            \x3c!-- ko if: ($data.type == \'user\') --\x3e\n                                                <input type="text" disabled/>\n                                                <button id="acceptContract" class="js-button" data-bind="{click: $root.acceptContract, text: ($root.brand_customization().contract && $root.brand_customization().contract.sign) ? $root.brand_customization().contract.sign : \'Sign Contract\'}" style="opacity:0.4;" disabled></button>\n                                            \x3c!-- /ko --\x3e\n                                            \x3c!-- ko if: !($data.type == \'user\') --\x3e\n                                                <input type="text" placeholder="Type your name" data-bind="value: $data.signature"/>\n                                                <button id="acceptContract" class="js-button" data-bind="{click: $root.acceptContract, text: ($root.brand_customization().contract && $root.brand_customization().contract.sign) ? $root.brand_customization().contract.sign : \'Sign Contract\'}"></button>\n                                            \x3c!-- /ko --\x3e\n                                        </li>\n                                    \x3c!-- /ko --\x3e\n                                    \x3c!-- ko if: signed_yn() --\x3e\n                                        <li class="signed">\n                                            <label data-bind="text: name"></label>\n                                            <input type="text" data-bind="value: $data.signature" disabled />\n                                            <span class="js-font_family js-font_color signed-span">\n                                                <i class="icon-check js-font_color"></i> Signed <em data-bind="text: $root.parseDate(signed_at(), \'MMM dS, yyyy\')"></em>\n                                            </span>\n                                        </li>\n                                    \x3c!-- /ko --\x3e\n                                </ul>\n                            </div>\n                            <div class="next">\n                                \x3c!-- ko if: $root.quote() && $root.quote().invoice_yn() --\x3e\n                                    \x3c!-- ko if: !client_signed() --\x3e\n                                        \x3c!-- ko if: signatures.length > 1 --\x3e\n                                            <small>After all parties have signed</small>\n                                        \x3c!-- /ko --\x3e\n                                    \x3c!-- /ko --\x3e\n                                    \x3c!-- ko if: client_signed() --\x3e\n                                        <button class="js-button" onClick="quoteShow(\'invoice\')"><i class="fa fa-arrow-right mr-2"></i>Next &#8211; <span data-bind="text: ($root.quote().invoice_settings.display_name && $root.quote().invoice_settings.display_name())? \'View \' + $root.quote().invoice_settings.display_name() : (($root.brand_customization().invoice && $root.brand_customization().invoice.title) ? \'View \' + $root.brand_customization().invoice.title : \'View Invoice\')"></span></button>\n                                    \x3c!-- /ko --\x3e\n                                \x3c!-- /ko --\x3e\n                            </div>\n                        </div>\n                    \x3c!-- /ko --\x3e\n                \x3c!-- /ko --\x3e\n                \x3c!-- ko if: location.pathname !== \'/p\' --\x3e\n                    <div class="sign">\n                        <div class="signatures">\n                            <ul data-bind="foreach: signatures">\n                                <li data-bind="css: {\'signed\' : signed_at()}">\n                                    <label data-bind="text: name"></label>\n                                    <input type="text" data-bind="value: $data.signature" disabled />\n                                    \x3c!-- ko if: !signed_at() --\x3e\n                                        <button class="js-button_color" data-bind="text: (dataModel.brand_customization().contract && $root.brand_customization().contract.sign) ? $root.brand_customization().contract.sign : \'Sign Contract\'"></button>\n                                    \x3c!-- /ko --\x3e\n                                    \x3c!-- ko if: signed_at() --\x3e\n                                        <span class="js-font_family js-font_color signed-span">\n                                          <i class="icon-check js-font_color"></i> Signed <em data-bind="text: $root.parseDate(signed_at(), \'MMM dS, yyyy\')"></em>\n                                        </span>\n                                    \x3c!-- /ko --\x3e\n                                </li>\n                            </ul>\n                        </div>\n                    </div>\n                \x3c!-- /ko --\x3e\n             </div>\n          </div>\n        </div>\n\n\t  \x3c!-- ko if: $root.account().show_logo_footer_yn --\x3e\n\t\t  <a class="public_footer" target="_blank" href="https://www.17hats.com"><img src="/images/logo-poweredby-17hats.png" style="width:150px"></a>\n\t  \x3c!-- /ko --\x3e\n    \x3c!-- /ko --\x3e\n</div>\n'},"./src/views/website/fragments/invoices/invoice_print.html.erb":e=>{e.exports='\n<div id="main" class="clearfix greyTextureBg" data-bind="template: {\'if\' : invoice, \'data\': invoice}">\n\t<form id="checkoutReview" class="clearfix">\n\t\t<h1 class="mainTitle">\n\t\t\t<strong data-bind="text: \'Invoice #\' + id"></strong>\n\t\t\t<a href="" title="">\n\t\t\t\t<SCRIPT  LANGUAGE="JavaScript" TYPE="text/javascript" SRC="//smarticon.geotrust.com/si.js"><\/SCRIPT>\n\t\t\t</a>\n\t\t</h1>\n\t\t<fieldset class="checkoutBlock">\n\t\t\t<div class="leftCol">\n\t\t\t\t<ul class="address">\n\t\t\t\t\t<li data-bind="text: client.name" style="font-weight: bold"></li>\n\t\t\t\t\t\x3c!-- ko if: email_address --\x3e\n\t\t\t\t\t<li data-bind="text: email_address.email"></li>\n\t\t\t\t\t\x3c!-- /ko --\x3e\n\t\t\t\t\t\x3c!-- ko if: client_address --\x3e\n\t\t\t\t\t<li data-bind="text: client_address"></li>\n\t\t\t\t\t\x3c!-- /ko --\x3e\n\t\t\t\t</ul>\n\t\t\t\t\x3c!-- ko if: message --\x3e\n\t\t\t\t&nbsp;\n        <div style="margin-top:0px;font-size:14px;color:black" data-bind="text: message"></div>\n\t\t\t\t\x3c!-- /ko --\x3e\n\t\t\t</div>\n\t\t\t\x3c!-- end left col --\x3e\n\t\t</fieldset>\n\t\t\x3c!-- end checkout block --\x3e\n\t\t<h3 class="invoice_items">Invoiced Items</h3>\n\t\t<table width="100%" cellpadding="0" cellspacing="0" summary="Invoice Items" class="uni">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th width="30%">Item</th>\n\t\t\t\t\t<th width="30%">Description</th>\n\t\t\t\t\t<th width="15%">Price</th>\n\t\t\t\t\t<th width="15%">Quantity</th>\n\t\t\t\t\t<th width="10%">Total</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody data-bind="foreach: products">\n\t\t\t\t<tr>\n\t\t\t\t\t<td data-bind="text: name"></td>\n\t\t\t\t\t<td data-bind="text: description"></td>\n\t\t\t\t\t<td data-bind="text: amount.formatted"></td>\n\t\t\t\t\t<td data-bind="text: quantity"></td>\n\t\t\t\t\t<td><strong><span data-bind="text: accounting.formatMoney(amount.value * quantity)"></span></strong></td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\x3c!-- end Select Products --\x3e\n\t\t<fieldset id="productsInCart">\n\t\t\t<div class="total">\n\t\t\t\t<ul>\n          <li><strong>Subtotal:</strong><span data-bind="text: $root.invoiceSubTotal"></span></li>\n          <li><strong id="taxrate">Tax:</strong><span data-bind="text: $root.invoiceTaxAmount"></span></li>\n\t\t\t\t\t\x3c!-- ko if: (total_paid*1) > 0 && status != \'paid\' --\x3e\n          <li><strong>Previously paid:</strong><span data-bind="text: \'- \' + accounting.formatMoney(total_paid)"></span></li>\n\t\t\t\t\t\x3c!-- /ko --\x3e\n          <li><strong><h3>Total</h3></strong><span><h3 data-bind="text: $root.invoiceTotal"></h3></span></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</fieldset>\n\t\t<div class="clear"></div>\n\t\t\x3c!-- ko if: upsell_products.length > 0 && payments.length == 0 --\x3e\n\t\t<h3 class="invoice_items">Add-on Items</h3>\n\t\t\t<table width="100%" cellpadding="0" cellspacing="0" summary="Add On Items" class="uni">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th width="30%">Item</th>\n\t\t\t\t\t\t<th width="30%">Description</th>\n\t\t\t\t\t\t<th width="15%">Price</th>\n\t\t\t\t\t\t<th width="15%">Regular Price</th>\n\t\t\t\t\t\t<th width="10%">Add</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody data-bind="foreach: upsell_products">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td data-bind="text: product.name"></td>\n\t\t\t\t\t\t<td data-bind="text: description"></td>\n\t\t\t\t\t\t<td data-bind="text: discount.value > 0 ? discount.formatted : amount.formatted"></td>\n\t\t\t\t\t\t<td data-bind="text: amount.formatted"></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<a href="" title="" class="btnBlue" data-bind="event: {\'click\' : $root.upsellItemClick }"><strong data-bind="text: replace_product?\'Replace\':\'Add on\'"></strong></a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\x3c!-- /ko --\x3e\n\t\t<div class="clear"></div>\n\t\t\x3c!-- ko if: payments.length > 0 --\x3e\n\t\t<h3 class="invoice_items" style="border-top: 0px">Payments Made</h3>\n\t\t\t<table width="100%" cellpadding="0" cellspacing="0" class="uni">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th width="10%">ID</th>\n\t\t\t\t\t\t<th width="30%">Date</th>\n\t\t\t\t\t\t<th width="30%">Method</th>\n\t\t\t\t\t\t<th width="15%">Reference</th>\n\t\t\t\t\t\t<th width="15%">Amount</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody data-bind="foreach: payments">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td data-bind="text: id"></td>\n\t\t\t\t\t\t<td data-bind="text: $root.parseDate(date, \'MMM dS, yyyy\')"></td>\n\t\t\t\t\t\t<td data-bind="text: payment_method==\'1\'?\'Check\':payment_method"></td>\n\t\t\t\t\t\t<td data-bind="text: payment_reference"></td>\n\t\t\t\t\t\t<td data-bind="text: amount.formatted"></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\x3c!-- /ko --\x3e\n\n\t</form>\x3c!-- end checkout review --\x3e\n</div>\x3c!-- end main --\x3e\n'},"./src/views/website/fragments/invoices/view.html.erb":(e,t,n)=>{const a=n("./src/views/fragments/invoices/client.html.erb");e.exports='<div data-bind="if: invoice">\n\x3c!-- ko with: invoice() --\x3e\n<div class="public_header">\n  <payment-header params="invoice: $root.invoice, payment_methods: $root.payment_methods"></payment-header>\n</div>\n  <div  class="view_summary"><div>'+a+'</div></div>\n  \x3c!-- ko if: $root.account().show_logo_footer_yn --\x3e\n\t  <a class="public_footer" target="_blank" href="https://www.17hats.com"><img src="/images/logo-poweredby-17hats.png" style="width:150px"></a>\n  \x3c!-- /ko --\x3e\n\x3c!-- /ko --\x3e\n</div>\n'},"./src/views/website/fragments/lead_forms/form.html.erb":e=>{e.exports="<div id=\"lc_form\" class=\"paper\">\n  <div class=\"paper-content\">\n\n\n    \x3c!-- ko if: $root.leadForm().header_uri --\x3e\n      <div class=\"document-header-container\">\n        <img class=\"header-image\"data-bind=\"attr: {alt: $root.accountinfo().account.name, src: $root.leadForm().header_uri  + '?size=original'}\" />\n      </div>\n    \x3c!-- /ko --\x3e\n\n\n    \x3c!-- ko if: !$root.leadForm().header_uri && $root.accountinfo().account.header_info.lcf_header_image --\x3e\n      <div class=\"document-header-container\">\n        <img data-bind=\"attr: {alt: $root.accountinfo().account.name, src: $root.accountinfo().account.header_info.lcf_header_image + '?size=original'}\" />\n      </div>\n    \x3c!-- /ko --\x3e\n\n\n\n    <div class=\"paper-wrapper client_lead_form\" data-bind=\"template: { if: leadForm() && leadForm().id, afterRender: function () {\n      $('.answerdate').datepicker({ dateFormat: 'MM dd, yy' });\n    }}, leadFormStyle: true\">\n\n\n\n      \x3c!-- ko if: !$root.accountinfo().account.logo_yn &&\n                  (!$root.leadForm().hide_logo_yn && $root.leadForm().header_uri\n                    ||\n                  !$root.leadForm().header_uri &&\n                  !$root.accountinfo().account.header_info.hide_lcf_logo &&\n                  $root.accountinfo().account.header_info.lcf_header_image\n                    ||\n                  !$root.leadForm().header_uri &&\n                  !$root.accountinfo().account.header_info.lcf_header_image)\n      --\x3e\n        <div class=\"client_logo js-font_family\" data-bind=\"text: $root.accountinfo().account.name\"></div>\n      \x3c!-- /ko --\x3e\n      \x3c!-- ko if: $root.accountinfo().account.logo_yn &&\n            (!$root.leadForm().hide_logo_yn && $root.leadForm().header_uri\n              ||\n            !$root.leadForm().header_uri &&\n            !$root.accountinfo().account.header_info.hide_lcf_logo &&\n            $root.accountinfo().account.header_info.lcf_header_image\n              ||\n            !$root.leadForm().header_uri &&\n            !$root.accountinfo().account.header_info.lcf_header_image\n            ) --\x3e\n        <div class=\"client_logo\"><img data-bind=\"attr: {'src': dataModel.accountinfo().account.logo_path}\" /></div>\n      \x3c!-- /ko --\x3e\n\n\n\n      <form id=\"lead_form\" class=\"paper-form lc_form\" data-bind=\"event: { keypress: function(data, event) { if(event.keyCode == 13 && event.target.tagName != 'TEXTAREA'){ event.preventDefault(); return false;} else {return true;} } }\">\n        <ul data-bind=\"foreach: leadForm().questions\" class=\"questions\">\n          <li>\n\n            \x3c!-- ko if: type != 'header' && type != 'div' --\x3e\n              <label><span class=\"question-label js-font_family\" data-bind=\"text: question\"></span><small data-bind=\"if: !required\">(Optional)</small></label>\n            \x3c!-- /ko --\x3e\n\n            <div>\n\n              \x3c!-- ko if: type == 'text' --\x3e\n                <textarea data-bind=\"attr: { 'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false'), 'data-parsley-type': (($data.maps_to === 'email') ? 'email' : null) }, value: $data.answer\" class=\"answer\"></textarea>\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'input' && (maps_to == 'job_date' || maps_to == 'birthday') --\x3e\n                <input type=\"text\" data-parsley-date data-parsley-date-message=\"Please enter a valid date.\" data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false') }, value: $data.answer\">\n              \x3c!-- /ko --\x3e\n              \x3c!-- ko if: type == 'input' && maps_to != 'job_date' && maps_to != 'birthday' --\x3e\n                <input type=\"text\" data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false'), 'data-parsley-type': (($data.maps_to === 'email') ? 'email' : null) }, value: $data.answer\">\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'checkbox' --\x3e\n                <label class=\"inlineLabel\">\n                  <input class=\"answer\" type=\"radio\" value=\"yes\" data-bind=\"checked: $data.answer, attr: {'name' : 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}\" > Yes\n                </label>\n                <label class=\"inlineLabel\">\n                  <input class=\"answer\" type=\"radio\" value=\"no\" data-bind=\"checked: $data.answer, attr: {'name' : 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}\"> No\n                </label>\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'header' --\x3e\n                <h2 data-bind=\"text: question\" class=\"js-font_family js-font_color\"></h2>\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'div' --\x3e\n                <p class=\"static-text js-font_family js-font_color\" data-bind=\"html: question.replace(/(?:\\r\\n|\\r|\\n)/g, '<br>')\"></p>\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'select' || maps_to == 'lead_source' --\x3e\n                <select data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}, options: options, optionsValue: 'option', optionsCaption: '-- Select --', value: $data.answer\"></select>\n              \x3c!-- /ko --\x3e\n\n\n              \x3c!-- ko if: type == 'multi' --\x3e\n                \x3c!-- ko foreach: options --\x3e\n                  <div>\n                    <label class=\"inlineLabel\">\n                      <input type=\"checkbox\" data-bind=\"attr: {'name': 'q' + $parent.id, 'data-parsley-required' : ($parent.required?'true':'false'), 'value': option}, checked: $parent.answers\">\n                      <span data-bind=\"text: option\"></span>\n                    </label>\n                  </div>\n                \x3c!-- /ko --\x3e\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'date' --\x3e\n                <input type=\"text\" class=\"answerdate frmTextbox\" readonly data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}, value: $data.answer\">\n              \x3c!-- /ko --\x3e\n\n            </div>\n\n\n          </li>\n        </ul>\n\n        <div class=\"submit_form\">\n          <button id=\"lc_form_submit\" class=\"btn btn-success btn-lg js-font_family\" data-bind=\"click: function() { dataModel.saveLeadForm($('#lead_form'), leadForm()) }, text: $root.brand_customization().lead_capture ? $root.brand_customization().lead_capture.submit : 'Submit'\"></button>\n\n          <small class=\"legal\">\n            This form is protected by reCAPTCHA and the Google\n            <a target=\"_blank\" href=\"https://policies.google.com/privacy\">Privacy Policy</a> and\n            <a target=\"_blank\" href=\"https://policies.google.com/terms\">Terms of Service</a> apply.\n          </small>\n        </div>\n\n      </form>\n\n    <div class=\"submit_msg js-font_family js-font_color\" id=\"lc_submit_msg\" style=\"display:none;\">\n      <center>\n        <p class=\"msg\"></p>\n      </center>\n    </div>\n\n   </div>\n\n  </div>\n</div>\n"},"./src/views/website/fragments/lead_forms/form_embed.html.erb":e=>{e.exports="    <div id=\"lc_form\" class=\"paper\">\n      <div>\n        <div class=\"client_lead_form\" data-bind=\"template: { if: leadForm() && leadForm().id, afterRender: function () {\n      $('.answerdate').datepicker({ dateFormat: 'MM dd, yy' });\n    }}, embedFormStyle: true\">\n      <form id=\"lead_form\" class=\"paper-form lc_form\" data-bind=\"event: { keypress: function(data, event) { if(event.keyCode == 13 && event.target.tagName != 'TEXTAREA'){ event.preventDefault(); return false;} else {return true;} } }\">\n        <ul data-bind=\"foreach: leadForm().questions\" class=\"questions\">\n          <li>\n\n            \x3c!-- ko if: type != 'header' && type != 'div' --\x3e\n              <label><span class=\"question-label js-font_family\" data-bind=\"text: question\"></span><small data-bind=\"if: !required\">(Optional)</small></label>\n            \x3c!-- /ko --\x3e\n\n            <div>\n\n              \x3c!-- ko if: type == 'text' --\x3e\n                <textarea data-bind=\"attr: { 'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false'), 'data-parsley-type': (($data.maps_to === 'email') ? 'email' : null) }, value: $data.answer\" class=\"answer\"></textarea>\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'input' && (maps_to == 'job_date' || maps_to == 'birthday') --\x3e\n                <input type=\"text\" data-parsley-date data-parsley-date-message=\"Please enter a valid date.\" data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false') }, value: $data.answer\">\n              \x3c!-- /ko --\x3e\n              \x3c!-- ko if: type == 'input' && maps_to != 'job_date' && maps_to != 'birthday' --\x3e\n                <input type=\"text\" data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false'), 'data-parsley-type': (($data.maps_to === 'email') ? 'email' : null) }, value: $data.answer\">\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'checkbox' --\x3e\n                <label class=\"inlineLabel\">\n                  <input class=\"answer\" type=\"radio\" value=\"yes\" data-bind=\"checked: $data.answer, attr: {'name' : 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}\" > Yes\n                </label>\n                <label class=\"inlineLabel\">\n                  <input class=\"answer\" type=\"radio\" value=\"no\" data-bind=\"checked: $data.answer, attr: {'name' : 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}\"> No\n                </label>\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'header' --\x3e\n                <h2 data-bind=\"text: question\" class=\"js-font_family js-font_color\"></h2>\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'div' --\x3e\n                <p class=\"static-text js-font_family js-font_color\" data-bind=\"html: question.replace(/(?:\\r\\n|\\r|\\n)/g, '<br>')\"></p>\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'select' || maps_to == 'lead_source' --\x3e\n                <select data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}, options: options, optionsValue: 'option', optionsCaption: '-- Select --', value: $data.answer\"></select>\n              \x3c!-- /ko --\x3e\n\n\n              \x3c!-- ko if: type == 'multi' --\x3e\n                \x3c!-- ko foreach: options --\x3e\n                  <div>\n                    <label class=\"inlineLabel\">\n                      <input type=\"checkbox\" data-bind=\"attr: {'name': 'q' + $parent.id, 'data-parsley-required' : ($parent.required?'true':'false'), 'value': option}, checked: $parent.answers\">\n                      <span data-bind=\"text: option\"></span>\n                    </label>\n                  </div>\n                \x3c!-- /ko --\x3e\n              \x3c!-- /ko --\x3e\n\n              \x3c!-- ko if: type == 'date' --\x3e\n                <input type=\"text\" class=\"answerdate frmTextbox\" readonly data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}, value: $data.answer\">\n              \x3c!-- /ko --\x3e\n\n            </div>\n\n\n          </li>\n        </ul>\n\n        <div class=\"submit_form\">\n          <button id=\"lc_form_submit\" class=\"btn btn-success btn-lg js-font_family\" data-bind=\"click: function() {\n              dataModel.saveLeadForm($('#lead_form'), leadForm())\n            },\n            text: $root.brand_customization().lead_capture ? $root.brand_customization().lead_capture.submit : 'Submit'\n          \"></button>\n\n          <small class=\"legal\">\n            This form is protected by reCAPTCHA and the Google\n            <a target=\"_blank\" href=\"https://policies.google.com/privacy\">Privacy Policy</a> and\n            <a target=\"_blank\" href=\"https://policies.google.com/terms\">Terms of Service</a> apply.\n          </small>\n        </div>\n\n      </form>\n\n    <div class=\"submit_msg js-font_family js-font_color\" id=\"lc_submit_msg\" style=\"display:none;\">\n      <center>\n        <p class=\"msg pb-2\"></p>\n        <button type=\"button\" id=\"lc_close_form\" class=\"btn btn-success btn-lg js-button js-font_color\" data-bind=\"click: function() { dataModel.resetLeadForm($('#lead_form')); dataModel.showLeadForm(); } \">OK</button>\n      </center>\n    </div>\n\n   </div>\n\n  </div>\n</div>\n"},"./src/views/website/fragments/quotes/view.html.erb":(e,t,n)=>{const a=n("./src/views/fragments/quotes/client.html.erb"),o=n("./src/views/fragments/invoices/client.html.erb");e.exports='<div>\n  \x3c!-- ko template: {\'if\': quote() } --\x3e\n    <div class="public_header">\n      <quote-header params="quote: quote, invoice: invoice, contract: contract, payment_methods: payment_methods"></quote-header>\n    </div>\n\n    <div class="view_summary" id="quote_view"  data-bind="visible: $root.active_quote_view() == \'quote\'"><div>'+a+'</div></div>\n\n    \x3c!-- ko with: $root.contract() --\x3e\n      <div class="view_summary" id="contract_view" data-bind="visible: $root.contract() && $root.active_quote_view() == \'contract\'">\n        <div class="paper">\n          <div class="paper-content">\n            \x3c!-- ko if: $root.accountinfo().account.header_info.document_header_image && $root.accountinfo().account.header_info.document_header_image.length --\x3e\n              <div class="document-header-container">\n               <img data-bind="attr: {alt: $root.accountinfo().account.name, src: $root.accountinfo().account.header_info.document_header_image + \'?size=original\'}" />\n              </div>\n            \x3c!-- /ko --\x3e\n\t\t        \x3c!-- ko if: status() == \'voided\' --\x3e\n              <div class="voided">\n                <img src="/images/scribble-void.svg" alt=\'Void\'/>\n              </div>\n\t\t        \x3c!-- /ko --\x3e\n\n            <div class="client_invoice client_contract">\n              \x3c!-- ko if: !$root.accountinfo().account.logo_yn && !$root.accountinfo().header_info.hide_document_logo --\x3e\n                <div class="client_logo js-font_family js-font_color" data-bind="text: $root.accountinfo().account.name"></div>\n              \x3c!-- /ko --\x3e\n              \x3c!-- ko if: $root.accountinfo().account.logo_yn && !$root.accountinfo().account.header_info.hide_document_logo --\x3e\n                <div class="client_logo" data-bind="css: {\'combo\' :$root.contract_logo && $root.contract_logo()}"><img data-bind="attr: {alt: $root.accountinfo().account.name, \'src\': dataModel.accountinfo().account.logo_path  + \'?size=original\'}" /></div>\n              \x3c!-- /ko --\x3e\n              <form id="contract">\n\t\t            <div data-bind="template: {\'afterRender\': function() {\n                    if(dataModel.contract().status() == \'voided\'){\n                      $(\'input, textarea\').attr(\'disabled\',\'true\')\n                    }\n                  }\n\t\t            }">\n\t                <div class="contract_content" data-bind="html: tokenized"></div>\n\t\t            </div>\n              </form>\n              \x3c!-- ko if: location.pathname == \'/p\' --\x3e\n                \x3c!-- ko if: status() != \'voided\' && (($root.quote() && $root.quote().accepted_at()) || (!$root.quote())) --\x3e\n                  <div class="sign">\n                    \x3c!-- ko if: !signed_at() --\x3e\n                      <p class="js-font_color js-font_family">To indicate your acceptance of the above, sign electronically below.</p>\n                    \x3c!-- /ko --\x3e\n                    <div class="signatures">\n                      <ul data-bind="foreach: signatures">\n                        \x3c!-- ko if: !signed_yn() --\x3e\n                          <li>\n                            <label data-bind="text: name"></label>\n                            \x3c!-- ko if: ($data.type == \'user\') --\x3e\n                              <input type="text" disabled/>\n                              <button id="acceptContract" class="js-button" data-bind="{click: $root.acceptContract, text: $root.brand_customization().contract ? $root.brand_customization().contract.sign : \'Sign Contract\' }" style="opacity:0.4;" disabled></button>\n                            \x3c!-- /ko --\x3e\n                            \x3c!-- ko if: !($data.type == \'user\') --\x3e\n                              <input type="text" placeholder="Type your name" data-bind="value: $data.signature"/>\n                              <button id="acceptContract" class="js-button" data-bind="{click: $root.acceptContract, text: $root.brand_customization().contract ? $root.brand_customization().contract.sign : \'Sign Contract\' }"></button>\n                            \x3c!-- /ko --\x3e\n                          </li>\n                        \x3c!-- /ko --\x3e\n                        \x3c!-- ko if: signed_yn() --\x3e\n                          <li class="signed">\n                            <label data-bind="text: name"></label>\n                            <input type="text" data-bind="value: $data.signature" disabled />\n                            <span class="js-font_color js-font_family signed-span">\n                              <i class="icon-check js-font_color"></i> Signed <em data-bind="text: $root.parseDate(signed_at(), \'MMM dS, yyyy\')"></em>\n                            </span>\n                          </li>\n                        \x3c!-- /ko --\x3e\n                      </ul>\n                    </div>\n                    <div class="next">\n                      \x3c!-- ko if: $root.quote() && $root.quote().invoice_yn() --\x3e\n                        \x3c!-- ko if: !client_signed() --\x3e\n                          \x3c!-- ko if: signatures.length > 1 --\x3e\n                            <small>After all parties have signed</small>\n                          \x3c!-- /ko --\x3e\n                        \x3c!-- /ko --\x3e\n                        \x3c!-- ko if: client_signed() --\x3e\n                          <button class="js-button" onClick="quoteShow(\'invoice\', \'From quote acceptance\')"><i class="fa fa-arrow-right mr-2"></i>Next &#8211; <span data-bind="text: ($root.quote().invoice_settings.display_name && $root.quote().invoice_settings.display_name())? \'View \' + $root.quote().invoice_settings.display_name() : ($root.brand_customization().invoice ? \'View \' + $root.brand_customization().invoice.title : \'View Invoice\')"></span></button>\n                        \x3c!-- /ko --\x3e\n                      \x3c!-- /ko --\x3e\n                    </div>\n                  </div>\n                \x3c!-- /ko --\x3e\n              \x3c!-- /ko --\x3e\n              \x3c!-- ko if: location.pathname !== \'/p\' --\x3e\n                <div class="sign">\n                  <div class="signatures">\n                    <ul data-bind="foreach: signatures">\n                      <li data-bind="css: {\'signed\' : signed_at()}">\n                        <label data-bind="text: name"></label>\n                        <input type="text" data-bind="value: $data.signature" disabled />\n                        \x3c!-- ko if: !signed_at() --\x3e\n                          <button class="js-button_color" data-bind="text: $root.brand_customization().contract ? $root.brand_customization().contract.sign : \'Sign Contract\' "></button>\n                        \x3c!-- /ko --\x3e\n                        \x3c!-- ko if: signed_at() --\x3e\n                          <span class="js-font_family js-font_color signed-span">\n                            <i class="icon-check js-font_color"></i> Signed <em data-bind="text: $root.parseDate(signed_at(), \'MMM dS, yyyy\')"></em>\n                          </span>\n                        \x3c!-- /ko --\x3e\n                      </li>\n                    </ul>\n                  </div>\n                </div>\n              \x3c!-- /ko --\x3e\n            </div>\n          </div>\n        </div>\n      </div>\n    \x3c!-- /ko --\x3e\n\n    \x3c!-- ko with: $root.invoice() --\x3e\n        <div class="view_summary" id="invoice_view"  data-bind="visible: $root.active_quote_view() == \'invoice\'"><div>'+o+'</div></div>\n    \x3c!-- /ko --\x3e\n\n\t  \x3c!-- ko if: $root.account().show_logo_footer_yn --\x3e\n\t\t  <a class="public_footer" target="_blank" href="https://www.17hats.com"><img src="/images/logo-poweredby-17hats.png" style="width:150px"></a>\n\t  \x3c!-- /ko --\x3e\n  \x3c!-- /ko --\x3e\n</div>\n'},"./src/views/website/fragments/scheduling/booking.html.erb":e=>{e.exports='<section id="schedule-services-cp" data-bind="with: $root.booking()">\n  <div class="hats-cp-container">\n    <div class="hats-cp-inner">\n        \x3c!-- ko if: !$root.accountinfo().account.logo_yn --\x3e\n            <div class="business-title" data-bind="text: $root.accountinfo().account.name"></div>\n        \x3c!-- /ko --\x3e\n        \x3c!-- ko if: $root.accountinfo().account.logo_yn --\x3e\n            <img class="cp-business-logo" data-bind="attr: {alt: $root.accountinfo().account.name, src: dataModel.accountinfo().account.logo_path + \'?size=original\'}" />\n        \x3c!-- /ko --\x3e\n\n      <div class="hats-cp-content p-0">\n        <ul class="hats-cp-services-menu d-none"></ul>\n\n\t        \x3c!--Confirmation screen--\x3e\n\t        <div class="cp-services-offered">\n\t          <div class="hats-cp-confirmation" id="booking_status">\n\t            <h1 class="mt-0 pt-1">Your <span data-bind="text: scheduled_service.name"></span> is <span data-bind="text: status == \'tentative\'?\'Pending\':(status==\'confirmed\'?\'Confirmed\':\'Cancelled\')"></span></h1>\n                    \x3c!-- ko ifnot: status == "cancelled" || $data.invoice_public_id --\x3e\n\t\t\t\t\t<div class="cp-confirmation-content">\n\t\t            <table class="confirmation-messages">\n                    <tbody>\n                        \x3c!-- ko ifnot: status == "cancelled" --\x3e\n    \t\t                <tr class="d-flex flex-row justify-content-start align-items-center">\n    \t\t                  <td class="cp-confirmation-icon"><i class="icon icon-user"></i></td>\n    \t\t                  <td data-bind="text: _.map(attendees, function(data){ return data.display_name }).join(\', \')"></td>\n    \t\t                </tr>\n    \t\t                <tr class="d-flex flex-row justify-content-start align-items-center">\n    \t\t                  <td class="cp-confirmation-icon"><i class="fa-regular fa-clock"></i></td>\n    \t\t                  <td><b data-bind="text: $root.parseDate(calendar_event.start, \'MMM d, yyyy @ h:mm tt\')"></b></td>\n    \t\t                </tr>\n    \t\t                \x3c!-- ko if: status == \'confirmed\' && $data.scheduled_service.location_id && $root.service_location() --\x3e\n                              <tr class="d-flex flex-row justify-content-start align-items-center">\n                                <td class="cp-confirmation-icon"><i class="icon icon-location"></i></td>\n                                <td><b data-bind="text: $root.service_location().name"></b>\n                                    \x3c!-- ko if: $root.service_location().location --\x3e\n                                        \x3c!-- ko if: dataModel.physical_yn() --\x3e\n                                            <br>\n                            \t              \x3c!-- ko if: $root.service_location().kind == \'in_person\' --\x3e\n                                                <a onclick="window.open(\'https://www.google.com/maps/search/?api=1&query=\' + dataModel.service_location().location)" href="#"data-bind="text: $root.service_location().location"></a>\n                            \t              \x3c!-- /ko --\x3e\n                            \t              \x3c!-- ko if: $root.service_location().kind != \'in_person\' --\x3e\n                                                  <span data-bind="text: $root.service_location().location"></span>\n                            \t              \x3c!-- /ko --\x3e\n                                        \x3c!-- /ko --\x3e\n                                        \x3c!-- ko if: !dataModel.physical_yn() --\x3e\n                \t\t\t                 <br>\n                                             <a onclick="dataModel.web_address()" href="#"data-bind="text: $root.service_location().location"></a>\n                                        \x3c!-- /ko --\x3e\n                                    \x3c!-- /ko --\x3e\n                                </td>\n                             </tr>\n                                  \x3c!-- ko if: $root.service_location().description --\x3e\n                                    <tr class="d-flex flex-row justify-content-start align-items-center">\n                                      <td class="cp-confirmation-icon"></td>\n                                        <td class="cp-confirmation-format" ><span id="confirmation" data-bind="html: $root.service_location().description"></span></td>\n                                    </tr>\n                                  \x3c!-- /ko --\x3e\n\t\t\t\t\t              \x3c!-- ko if: $root.booking_zoom_info() && $root.booking_zoom_info().zoom_url  --\x3e\n\t\t\t\t\t                  <tr class="d-flex flex-row justify-content-start align-items-center">\n\t\t\t\t\t                      <td class="cp-confirmation-icon">&nbsp;</td>\n\t\t\t\t\t\t                  <td class="cp-confirmation-format"><span>Zoom URL:</span><br><a data-bind="attr: {\'href\' : $root.booking_zoom_info().zoom_url}, text: $root.booking_zoom_info().zoom_url"></a></td>\n\t\t\t\t\t                  </tr>\n\t\t\t\t\t              \x3c!-- /ko --\x3e\n\n    \t\t                \x3c!-- /ko --\x3e\n    \t\t                \x3c!-- ko if: $data.scheduled_service.confirmation_message --\x3e\n    \t\t\t                <tr class="d-flex flex-row justify-content-start align-items-center">\n    \t\t\t                  <td class="cp-confirmation-icon"><i class="fa-solid fa-comment"></i></td>\n    \t\t\t                  <td id="confirmation" data-bind="html: scheduled_service.confirmation_message.content"></td>\n    \t\t\t                </tr>\n                            \x3c!-- /ko --\x3e\n                        \x3c!-- /ko --\x3e\n                        \x3c!-- ko if: $data.invoice_public_id --\x3e\n                        <tr class="d-flex flex-row justify-content-start align-items-center">\n                          <td class="cp-confirmation-icon"><i class="fa-solid fa-dollar-sign"></i></td>\n                          <td class="cp-confirmation-format" id="invoice-link">\n                            <a data-bind="attr: { href: \'/p#/i/\' + invoice_public_id }">View your invoice</a>\n                          </td>\n                        </tr>\n                        \x3c!-- /ko --\x3e\n\t\t                </tbody>\n\t\t              </table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!-- /ko --\x3e\n\t            \x3c!-- ko if: dataModel.reschedulingAllowedYn() --\x3e\n\t\t            <div class="hats-cp-confirmation-actions">\n\t\t              <button data-bind="click: dataModel.rescheduleBooking">Reschedule</button>\n\t\t              <button data-bind="click: dataModel.cancelBooking">Cancel</button>\n\t\t            </div>\n\t\t        \x3c!-- /ko --\x3e\n\t          </div>\n            <div class="cp-services-offered cp-contact-information" id="booking_cancelation" style="display:none">\n              <div class="d-flex flex-column">\n                <div class="cp-contact-form-wrapper">\n                  <h1>Cancel <span data-bind="text: scheduled_service.name"></span></h1>\n                </div>\n                  <div class="cp-cancellation-content">\n                    <label>Cancellation Reason</label><br>\n                    <textarea placeholder="Write Your Message Here" id="cancel_reason"></textarea>\n                  </div>\n                  <div class="hats-cp-confirmation-actions pb-5">\n                    <button data-bind="click: dataModel.keepBooking">Keep As Is</button>\n                    <button data-bind="click: dataModel.confirmCancelBooking">Confirm Cancellation</button>\n                  </div>\n\n              </div>\n            </div>\n\n\t        </div>\n\n      </div>\n    </div>\n  </div>\n</section>\n\n'},"./src/views/website/fragments/scheduling/scheduling-confirmation.html.erb":e=>{e.exports='\x3c!-- ko if: $root.bookingTab() == \'confirm\' --\x3e\n\x3c!--Confirmation screen--\x3e\n<div class="cp-services-offered">\n  <div class="hats-cp-confirmation">\n    \x3c!-- ko if: !$data.selected_service().confirm_yn || ($data.selected_service().confirm_yn === "1" && $root.schedule_booking())--\x3e\n    <h1>Your <span data-bind="text: $root.selected_service().name"></span> Has Been Successfully <span\n        data-bind="text: $root.schedule_booking()?\'Rescheduled\':\'Booked\'"></span></h1>\n    \x3c!-- /ko --\x3e\n    \x3c!-- ko if: ($data.selected_service().confirm_yn === "1" && !$root.schedule_booking()) --\x3e\n    <h1>Your <span data-bind="text: $root.selected_service().name"></span> Has Been Tentatively <span\n        data-bind="text: $root.schedule_booking()?\'Rescheduled\':\'Scheduled\'"></span></h1>\n    \x3c!-- /ko --\x3e\n    <div class="cp-confirmation-content">\n      <table class="confirmation-messages">\n        <tbody>\n          <tr class="d-flex flex-row justify-content-start align-items-center">\n            <td class="cp-confirmation-icon"><i class="fa-regular fa-clock"></i></td>\n            <td class="cp-confirmation-format"><b class="cp-confirmation-format"\n                data-bind="text: $root.parseDate(dataModel.convertToUTC($root.selected_time()), \'MMM d, yyyy @ h:mm tt\')"></b>\n            </td>\n          </tr>\n          \x3c!-- ko if: !$data.selected_service().confirm_yn && $data.selected_service().location_id && $root.service_location() --\x3e\n\t          <tr class="d-flex flex-row justify-content-start align-items-center">\n\t            <td class="cp-confirmation-icon"><i class="icon icon-location"></i></td>\n\t            <td><b data-bind="text: $root.service_location().name"></b>\n\t              \x3c!-- ko if: $root.service_location().location --\x3e\n    \t              \x3c!-- ko if: dataModel.physical_yn() --\x3e\n        \t              <br>\n        \t              \x3c!-- ko if: $root.service_location().kind == \'in_person\' --\x3e\n        \t              <a onclick="window.open(\'https://www.google.com/maps/search/?api=1&query=\' + dataModel.service_location().location)"\n        \t                href="#" data-bind="text: $root.service_location().location"></a>\n        \t               \x3c!-- /ko --\x3e\n        \t              \x3c!-- ko if: $root.service_location().kind != \'in_person\' --\x3e\n                              <span data-bind="text: $root.service_location().location"></span>\n        \t              \x3c!-- /ko --\x3e\n    \t              \x3c!-- /ko --\x3e\n    \t              \x3c!-- ko if: !dataModel.physical_yn() --\x3e\n        \t              <br>\n        \t              <a onclick="dataModel.web_address()" href="#" data-bind="text: $root.service_location().location"></a>\n    \t              \x3c!-- /ko --\x3e\n\t              \x3c!-- /ko --\x3e\n\t            </td>\n\t          </tr>\n\t          \x3c!-- ko if: $root.service_location().description --\x3e\n\t          <tr class="d-flex flex-row justify-content-start align-items-center">\n\t            <td class="cp-confirmation-icon"></td>\n\t            <td class="cp-confirmation-format"><span data-bind="html: $root.service_location().description"\n\t                id="confirmation"></span></td>\n\t          </tr>\n\t          \x3c!-- /ko --\x3e\n              \x3c!-- ko if: $root.booking_zoom_info() && $root.booking_zoom_info().zoom_url  --\x3e\n                  <tr class="d-flex flex-row justify-content-start align-items-center">\n                      <td class="cp-confirmation-icon">&nbsp;</td>\n\t                  <td class="cp-confirmation-format"><span>Zoom URL:</span><br><a data-bind="attr: {\'href\' : $root.booking_zoom_info().zoom_url}, text: $root.booking_zoom_info().zoom_url"></a></td>\n                  </tr>\n              \x3c!-- /ko --\x3e\n          \x3c!-- /ko --\x3e\n          \x3c!-- ko if: $root.confirmation_message() --\x3e\n          <tr class="d-flex flex-row justify-content-start align-items-center">\n            <td class="cp-confirmation-icon"><i class="fa-solid fa-comment"></i></td>\n            <td class="cp-confirmation-format" data-bind="html: $root.confirmation_message().content" id="confirmation">\n            </td>\n          </tr>\n          \x3c!-- /ko --\x3e\n          \x3c!-- ko if: $root.invoice_public_id  --\x3e\n          <tr class="d-flex flex-row justify-content-start align-items-center">\n            <td class="cp-confirmation-icon"><i class="fa-solid fa-dollar-sign"></i></td>\n            <td class="cp-confirmation-format" id="invoice-link">\n              <a data-bind="attr: { href: \'/p#/i/\' + $root.invoice_public_id() }">View your invoice</a>\n            </td>\n          </tr>\n          \x3c!-- /ko --\x3e\n          \x3c!-- ko if: $root.booking() && $root.booking().invoice_public_id  --\x3e\n          <tr class="d-flex flex-row justify-content-start align-items-center">\n            <td class="cp-confirmation-icon"><i class="fa-solid fa-dollar-sign"></i></td>\n            <td class="cp-confirmation-format" id="invoice-link">\n              <a data-bind="attr: { href: \'/p#/i/\' + $root.booking().invoice_public_id }">View your invoice</a>\n            </td>\n          </tr>\n          \x3c!-- /ko --\x3e\n        </tbody>\n      </table>\n    </div>\n    <div class="hats-cp-confirmation-actions">\n      <button onClick="location.href.indexOf(\'embed=true\') == -1?dataModel.scheduleNewSlot():dataModel.scheduleNewSlotEmbed()">Book Another Appointment</button>\n    </div>\n  </div>\n</div>\n\x3c!-- /ko --\x3e'},"./src/views/website/fragments/scheduling/scheduling-contact-info.html.erb":e=>{e.exports='\x3c!-- ko if: $root.bookingTab() == \'contact_info\' --\x3e\n\x3c!--Contact information form--\x3e\n<div class="cp-services-offered">\n  <div class="cp-services-offered cp-contact-information">\n    <div class="cp-contact-form-wrapper">\n      <div class="hats-row">\n        <p class="osDefaultCursor productScheduleHeader">\n          Your <span class="font-weight-bold" data-bind="text: $root.selected_service().name"></span> will be on\n          <span class="font-weight-bold"\n            data-bind="text: $root.parseDate(dataModel.convertToUTC($root.selected_time()), \'MMM d, yyyy @ h:mm tt\')"></span>\n        </p>\n      </div>\n      <form id="schedule-signup-form" class="parsley-form">\n        <div class="contactInfo">\n          <div class="hats-row">\n            <p class="osDefaultCursor p-0 cp-select-service-title"><u>Contact Information:</u></p>\n          </div>\n          <div class="hats-row">\n            \x3c!-- ko if: !$root.schedule_booking() --\x3e\n            <div class="hats-col-6 md-100">\n              <label>First Name</label>\n              <input type="text" tabindex="3" data-bind="value: $root.booking_info.first_name"\n                data-parsley-error-message="First name required" required>\n            </div>\n            <div class="hats-col-6 md-100">\n              <label>Last Name</label>\n              <input type="text" tabindex="4" data-bind="value: $root.booking_info.last_name"\n                data-parsley-error-message="Last name required" required>\n            </div>\n            \x3c!-- /ko --\x3e\n            \x3c!-- ko if: $root.schedule_booking() --\x3e\n            <div class="hats-col-6 md-100">\n              <label>Name</label>\n              <p data-bind="text: $root.booking_info.name"></p>\n            </div>\n            \x3c!-- /ko --\x3e\n          </div>\n\n          <div class="hats-row">\n            <div class="hats-col-6 md-100">\n              <label>Email</label>\n              <input type="text" tabindex="5" data-bind="value: $root.booking_info.email" data-parsley-type="email"\n                data-parsley-required-message="Email is required"\n                data-parsley-error-message="Please enter a valid email" required>\n            </div>\n            \x3c!-- ko if: !$root.accountinfo().account.scheduling_require_phonenumber_yn --\x3e\n            <div class="hats-col-6 md-100">\n              <label>Phone Number (optional)</label>\n              <input type="text" tabindex="6" class="cp-form-text" data-bind="value: $root.booking_info.phonenumber"\n                data-parsley-pattern="^[\\d\\+\\-\\.\\(\\)\\/\\s]*$">\n            </div>\n            \x3c!-- /ko --\x3e\n            \x3c!-- ko if: $root.accountinfo().account.scheduling_require_phonenumber_yn --\x3e\n            <div class="hats-col-6 md-100">\n              <label>Phone Number</label>\n              <input type="text" tabindex="6" class="cp-form-text" data-bind="value: $root.booking_info.phonenumber"\n                data-parsley-required-message="Phone number is required" data-parsley-pattern="^[\\d\\+\\-\\.\\(\\)\\/\\s]*$"\n                required>\n            </div>\n            \x3c!-- /ko --\x3e\n          </div>\n          <label>Message (optional)</label>\n          <textarea tabindex="7" placeholder="Write Your Message Here" data-bind="value: $root.booking_info.notes"\n            style="resize:vertical"></textarea>\n        </div>\n        <div class="alternateBg">\n          \x3c!-- ko if: $root.booking_can_be_paid() && $root.selected_service().products && $root.selected_service().products.length > 0 && !($root.booking() && $root.booking().invoice_public_id) --\x3e\n          <p class="osDefaultCursor font-size-3 productScheduleHeader font-weight-bold cp-select-service-title">Please enter your payment information below:</p>\n          <div class="payment-information ">\n            <div class="payment-totals">\n              <ul class="itemize" data-bind="foreach: $root.selected_service().products">\n                <li class="row no-gutters d-flex flex-row justify-content-between">\n                  <div class="col-9 font-weight-bold paymentLabels" data-bind="text: name"></div>\n                  <div class="paymentLabels"\n                    data-bind="text: accounting.formatMoney(price ? price.value || price : 0)"></div>\n                </li>\n              </ul>\n              <ul class="itemize">\n                <li class="row no-gutters d-flex flex-row justify-content-between">\n                  <div class="font-weight-bold paymentLabels">Tax:</div>\n                  <div class="paymentLabels" data-bind="text: accounting.formatMoney(selected_service().total_tax)"></div>\n                </li>\n                <li class="row no-gutters d-flex flex-row justify-content-between totalBorders">\n                  <div class="font-weight-bold text-uppercase paymentLabels">Total:</div>\n                  <div class="paymentLabels font-weight-bold"\n                    data-bind="text: accounting.formatMoney(\n                      parseFloat(selected_service().price) +\n                      parseFloat(selected_service().total_tax)\n                    )"></div>\n                </li>\n                <li class="row no-gutters d-flex flex-row justify-content-between">\n                  \x3c!-- ko ifnot: selected_service().upfront_type == "percentage" --\x3e\n                  <div class="font-weight-bold paymentLabels">Payment Today:</div>\n                  \x3c!-- /ko --\x3e\n                  \x3c!-- ko if: selected_service().upfront_type == "percentage" --\x3e\n                  <div class="font-weight-bold paymentLabels">Payment Today (<span class="paymentLabels"\n                      data-bind="text: selected_service().upfront_amount"></span>%):</div>\n                  \x3c!-- /ko --\x3e\n                  <div class="paymentLabels"\n                    data-bind="text: accounting.formatMoney($root.service_payment_amount())"></div>\n                </li>\n              </ul>\n            </div>\n            <div class="form__cc-logos"></div>\n            <div id="payment-options" class="os-payment-details">\n            \x3c!-- ko if: (\n                $root.service_payment_amount() > 0\n                && $root.accountinfo().account.merchant_account_gateway in { Stripe: true, Square: true, \'17hats Payments\': true }\n                && !$root.accountinfo().account.disable_creditcard\n            ) --\x3e\n              <div id="cc">\n                \x3c!-- ko component: {\n                  name: \'payment-widget\',\n                  params: {\n                    merchant_gateway: $root.accountinfo().account.merchant_account_gateway,\n                    merchant_country: $root.accountinfo().account.merchant_account_country,\n                    square_application_id: window.$RESELLER_CONFIG.config.Square.application_id,\n                    stripe_publishable_key: window.$RESELLER_CONFIG.config.Stripe.publishable_key,\n                    stripe_allow_ach: !!$root.accountinfo().account.allow_ach,\n                    stripe_allow_link: false,\n                    stripe_disable_cc: !!$root.accountinfo().account.disable_creditcard,\n                    merchant_account_login: $root.accountinfo().account.merchant_account_login,\n                    wallets_yn: $root.accountinfo().account.wallets_yn,\n                    zip: null,\n                    name_on_card: null,\n                    online_scheduling: true,\n                    payment_in_progress: $root.payment_in_progress,\n                    currency: $root.account().currency,\n                    can_save_cards_yn: false,\n                    amount: $root.service_payment_amount,\n                    selected_user: $root.selected_user,\n                    selected_service: $root.selected_service,\n                    selected_slot: $root.selected_slot,\n                    schedule_project: $root.schedule_project,\n                    schedule: $root.schedule,\n                    booking_info: $root.booking_info,\n                    tabindex_start: 8,\n                    client_email: $root.booking_info.email,\n                    payment_error: $root.payment_error,\n                    states: $root.states,\n                  }\n                } --\x3e\x3c!-- /ko --\x3e\n                \x3c!-- ko if: payment_error --\x3e\n                <div class="form__form-group">\n                  <div class="form__flex">\n                    <div class="form__cc-data form__flex--item_1_1 errors" data-bind="text: payment_error">\n                    </div>\n                  </div>\n                </div>\n                \x3c!-- /ko --\x3e\n                <div id="paymentOverlay" style="display:none;">\n                  <div class="spinner"></div>\n                  <br>\n                  <span data-bind="text: $root.payment_status_text() || \'Payment Processing...\'"></span>\n                </div>\n              </div>\n            \x3c!-- /ko --\x3e\n            </div>\n          </div>\n          \x3c!-- /ko --\x3e\n          \x3c!-- ko if: dataModel.service_policy() --\x3e\n          <div class="cp-services-action-button-container terms-agreement">\n            <div class=\'termsScroll\'>\n              <div data-bind="html: dataModel.service_policy().content" id=\'termsBox\'></div>\n            </div>\n\n            <div class="checkbox-container">\n              <input id="checkbox1" type="checkbox" name="checkbox1" data-parsley-errors-container="#error"\n                data-parsley-required="true" data-parsley-trigger="click"\n                data-parsley-error-message="Must agree to the Terms of Services">\n              <label for="checkbox1" id="error">I agree with the Terms of Service</label>\n            </div>\n          </div>\n          \x3c!-- /ko --\x3e\n        </div>\n        <div class="hats-cp-confirmation-actions my-3">\n          <button id="bookOne" data-bind="click: dataModel.scheduleSlot, disable: $root.checkingSlots">Book</button>\n        </div>\n      </form>\n    </div>\n  </div>\n</div>\n\x3c!-- /ko --\x3e\n'},"./src/views/website/fragments/scheduling/scheduling-date-selector.html.erb":e=>{e.exports='\x3c!--Select a date screen--\x3e\n\x3c!-- ko template: {\n    \'if\': $root.bookingTab() == \'select_slot\' && $root.schedulingDateRange(),\n    \'afterRender\' : function(){\n        $(\'#datepicker\').datepicker({\n            \'startDate\': moment($root.schedulingDateRange().first_date).format(\'MM/DD/YYYY\'),\n            \'beforeShowDay\' : $root.checkDateAvailable\n        }).on(\'changeDate\', $root.updateDateForAvailableSlots);\n        $(\'#datepicker\').datepicker().on(\'changeMonth\', $root.setDateRange);\n        if(dataModel.selected_date()) {\n            $(\'#datepicker\').datepicker(\'setDate\', moment(dataModel.selected_date()).format(\'MM/DD/YYYY\'));\n        } else {\n            $(\'#datepicker\').datepicker(\'setDate\', moment($root.schedulingDateRange().first_date).format(\'MM/DD/YYYY\'));\n        }\n    }\n} --\x3e\n\n<div class="cp-services-offered hats-row cp-services-offered hats-cp-booking ">\n    <div class="hats-col-6 md-100">\n        <div class="schedule-services-calendar-wrapper">\n            <div id="datepicker" class="hats-datepicker"></div>\n        </div>\n    </div>\n    <div id="calendarLoadingSpinner" >\n    <div class="spinner"></div>\n    </div>\n    \x3c!-- ko if: location.href.indexOf("hide_desc=true") == -1 --\x3e\n    <div class="hats-col-6 md-100 osDefaultCursor">\n        <h3 class="osDefaultCursor cp-title" data-bind="text: dataModel.selected_service().name"></h3>\n        <p class="osDefaultCursor cp-description" id="readmore"\n            data-bind="text: dataModel.selected_service().description"></p>\n    </div>\n    \x3c!-- /ko --\x3e\n    <div class="hats-col-6 md-100">\n        \x3c!-- ko if: $root.schedule().users && $root.schedule().users.length > 1 && !$root.schedule().group_users_yn --\x3e\n        <div class="hats-cp-custom-select-wrapper">\n            <i class="fa-solid dropdown-caret fa-caret-down"></i>\n            <label>Select Team Member</label>\n            <select\n                data-bind="options: $root.schedule().users, optionsText: \'display_name\', optionsValue: \'user_id\', optionsCaption: \'Any Team Member\', value: $root.selected_user">\n            </select>\n        </div>\n        \x3c!-- /ko --\x3e\n        \x3c!-- ko if: !($root.accountinfo().account.scheduling_no_timezone_preview) --\x3e\n        <div class="hats-cp-custom-select-wrapper">\n            <i class="fa-solid dropdown-caret fa-caret-down"></i>\n            <label>Select Your Time Zone</label>\n            <select data-bind="value: $root.schedule_tz">\n                <option value="Pacific/Honolulu">Hawaii Time</option>\n                <option value="America/Anchorage">Alaska Time</option>\n                <option value="America/Los_Angeles">U.S. Pacific Time</option>\n                <option value="America/Denver">U.S. Mountain Time</option>\n                <option value="America/Phoenix">U.S. Mountain Time (Phoenix)</option>\n                <option value="America/Chicago">U.S. Central Time</option>\n                <option value="America/Winnipeg">U.S. Central Time (Winnepeg)</option>\n                <option value="America/Regina">Canada Central Standard Time</option>\n                <option value="America/New_York">U.S. Eastern Time</option>\n                <option value="America/Cayman">U.S. Eastern Time (Cayman Islands)</option>\n                <option value="America/Moncton">Canada Atlantic Standard Time</option>\n                <option value="America/St_Johns">Newfoundland Time</option>\n                <option value="America/Argentina/Buenos_Aires">Argentina Time</option>\n                <option value="Africa/Casablanca">Western European Time (Casablanca)</option>\n                <option value="Europe/Dublin">Western European Time (Dublin)</option>\n                <option value="Africa/Lusaka">Central Africa Time</option>\n                <option value="Europe/London">British Time</option>\n                <option value="Europe/Amsterdam">Central European Time (Amsterdam)</option>\n                <option value="Europe/Berlin">Central European Time (Berlin)</option>\n                <option value="Europe/Stockholm">Central European Time (Stockholm)</option>\n                <option value="Europe/Moscow">Moscow Time</option>\n                <option value="Asia/Dubai">Gulf Time</option>\n                <option value="Asia/Tehran">Iran Time</option>\n                <option value="Asia/Tashkent">Uzbekistan Time</option>\n                <option value="Asia/Kolkata">Indian Time</option>\n                <option value="Asia/Kathmandu">Nepal Time</option>\n                <option value="Asia/Dhaka">Bangladesh Time</option>\n                <option value="Asia/Jakarta">Western Indonesian Time</option>\n                <option value="Asia/Hong_Kong">China Time</option>\n                <option value="Asia/Tokyo">Japan Standard Time</option>\n                <option value="Australia/Perth">Australian Western Time</option>\n                <option value="Australia/Adelaide">Australian Central Time</option>\n                <option value="Australia/Darwin">Australian Central Standard Time</option>\n                <option value="Australia/Brisbane">Australian Eastern Standard Time (Brisbane)</option>\n                <option value="Australia/Melbourne">Australian Eastern Time (Melbourne)</option>\n                <option value="Australia/Sydney">Australian Eastern Time (Sydney)</option>\n                <option value="Pacific/Auckland">New Zealand Time</option>\n            </select>\n        </div>\n        \x3c!-- /ko --\x3e\n        \x3c!-- ko if: $root.availableMorningSlots().length --\x3e\n        <div class="cp-times-section">\n            <label>Morning:</label>\n            \x3c!-- ko template: { name: \'slot-html\', foreach: $root.availableMorningSlots() } --\x3e\n            \x3c!-- /ko --\x3e\n        </div>\n        \x3c!-- /ko --\x3e\n        \x3c!-- ko if: $root.availableAfternoonSlots().length --\x3e\n        <div class="cp-times-section">\n            <label>Afternoon:</label>\n            \x3c!-- ko template: { name: \'slot-html\', foreach: $root.availableAfternoonSlots() } --\x3e\n            \x3c!-- /ko --\x3e\n        </div>\n        \x3c!-- /ko --\x3e\n        \x3c!-- ko if: $root.availableEveningSlots().length --\x3e\n        <div class="cp-times-section">\n            <label>Evening:</label>\n            \x3c!-- ko template: { name: \'slot-html\', foreach: $root.availableEveningSlots() } --\x3e\n            \x3c!-- /ko --\x3e\n        </div>\n        \x3c!-- /ko --\x3e\n\n        \x3c!-- ko if: !$root.availableMorningSlots().length && !$root.availableAfternoonSlots().length && !$root.availableEveningSlots().length --\x3e\n        <div id="timeColor" class="cp-times-section">\n            Please select a date on the calendar with available times. Dates with availability will appear in black.\n        </div>\n        \x3c!-- /ko --\x3e\n\n        \x3c!-- ko if: $root.accountinfo().account.scheduling_no_timezone_preview && ($root.availableMorningSlots().length || $root.availableAfternoonSlots().length || $root.availableEveningSlots().length) --\x3e\n        <div id="timeColor" class="cp-times-section">\n            All times are displayed in <span data-bind="text: $root.readableTimezone()"></span>.\n        </div>\n        \x3c!-- /ko --\x3e\n    </div>\n</div>\n\x3c!-- /ko --\x3e\n'},"./src/views/website/fragments/scheduling/scheduling-footer.html.erb":e=>{e.exports='\x3c!-- ko if: dataModel.deviceType() !== \'xs\' --\x3e\n<div class="cp-footer-content" id="iframeFooterRemoval">\n  <h4 class=" osDefaultCursor" data-bind="text: $root.accountinfo().account.name"></h4>\n  <ul class="cp-contact">\n    \x3c!-- ko if: $root.accountinfo().account.contact.primary_email_address --\x3e\n    <li class="osDefaultCursor" data-bind="text: $root.accountinfo().account.contact.primary_email_address"></li>\n    \x3c!-- /ko --\x3e\n    \x3c!-- ko if: $root.accountinfo().account.phone_number --\x3e\n    <li class="osDefaultCursor" data-bind="text: $root.accountinfo().account.phone_number"></li>\n    \x3c!-- /ko --\x3e\n    \x3c!-- ko if: $root.accountinfo().account.website --\x3e\n    <li class="osLinkCursor"><a onClick="dataModel.checkWebaddress()" data-bind="\n      text: $root.accountinfo().account.website\n    "></a></li>\n    \x3c!-- /ko --\x3e\n  </ul>\n</div>\n\x3c!-- /ko --\x3e\n\x3c!-- ko if: dataModel.deviceType() === \'xs\' --\x3e\n<div class="cp-footer-content footerPhone" id="iframeFooterRemoval">\n  <div>\n    <h4 class=" osDefaultCursor" data-bind="text: $root.accountinfo().account.name"></h4>\n  </div>\n  \x3c!-- ko if: $root.accountinfo().account.website --\x3e\n  <div>\n    <p class="osLinkCursor cp-contact"><a onClick="dataModel.checkWebaddress()"\n    data-bind="\n      text: $root.accountinfo().account.website\n    "></a>\n    </p>\n  </div>\n  \x3c!-- /ko --\x3e\n  \x3c!-- ko if: $root.accountinfo().account.contact.primary_email_address --\x3e\n  <div>\n    <p class="osDefaultCursor cp-contact" data-bind="text: $root.accountinfo().account.contact.primary_email_address">\n    </p>\n  </div>\n  \x3c!-- /ko --\x3e\n  \x3c!-- ko if: $root.accountinfo().account.phone_number --\x3e\n  <div>\n    <p class="osDefaultCursor cp-contact" data-bind="text: $root.accountinfo().account.phone_number"></p>\n  </div>\n  \x3c!-- /ko --\x3e\n</div>\n\x3c!-- /ko --\x3e\n'},"./src/views/website/fragments/scheduling/scheduling-service-selector.html.erb":e=>{e.exports='\x3c!--Service screen--\x3e\n<div class="cp-services-offered" data-bind="visible: !$root.selected_service()">\n  <ul class="cp-services-list" data-bind="foreach: $root.schedule().services">\n    <li class="cp-product-offering" data-bind="click: function(data){ $root.selected_service(data) }">\n      <div class="hats-col-7 md-100 osLinkCursor">\n        \x3c!-- ko ifnot: $root.booking_can_be_paid() && price !== null --\x3e\n          <h2 class="osLinkCursor" data-bind="text: name"></h2>\n        \x3c!-- /ko --\x3e\n        \x3c!-- ko if: $root.booking_can_be_paid() && price !== null --\x3e\n          <h2 class="osLinkCursor" data-bind="text: name + \' — \' + accounting.formatMoney(price)"></h2>\n        \x3c!-- /ko --\x3e\n        <p class="osLinkCursor" data-bind="text: description"></p>\n      </div>\n      <div class="hats-col-3 md-100">\n        <button class="cp-select-product-button osLinkCursor">Select</button>\n      </div>\n    </li>\n  </ul>\n</div>\n'},"./src/views/website/fragments/scheduling/scheduling-services-menu.html.erb":e=>{e.exports='\x3c!-- ko if: $root.bookingTab() != \'canceled\' --\x3e\n<ul class="hats-cp-services-menu">\n\n  \x3c!-- ko if: $root.schedule().services.length > 1 && $root.bookingTab() == \'select_service\' --\x3e\n    <li class="active" data-bind="click: function() {\n      $root.selected_time(undefined);\n      $root.selected_slot(undefined);\n      $root.selected_service(undefined);\n      $root.questions_answered(false);\n    }">Service</li>\n    <li>Date &amp; Time</li>\n    <li data-bind="visible: $root.questions_enabled">Questions</li>\n    <li>Contact Info</li>\n    <li>Confirmation</li>\n  \x3c!-- /ko --\x3e\n\n  \x3c!-- ko if: $root.bookingTab() == \'select_slot\' --\x3e\n    <li data-bind="click: function() {\n      $root.selected_time(undefined);\n      $root.selected_slot(undefined);\n      $root.selected_service(undefined);\n      $root.questions_answered(false);\n    }, visible: $root.schedule().services.length > 1"><a href="#">Service</a></li>\n    <li class="active">Date &amp; Time</li>\n    <li data-bind="visible: $root.questions_enabled">Questions</li>\n    <li>Contact Info</li>\n    <li>Confirmation</li>\n  \x3c!-- /ko --\x3e\n\n  \x3c!-- ko if: $root.bookingTab() == \'questions\' --\x3e\n    <li data-bind="click: function() {\n      $root.selected_service(undefined);\n      $root.selected_time(undefined);\n      $root.selected_slot(undefined)\n      $root.questions_answered(false);\n    }, visible: $root.schedule().services.length > 1"><a tabindex="1" href="#">Service</a></li>\n    <li data-bind="click: function() { $root.selected_time(undefined); $root.selected_slot(undefined) }"><a tabindex="2" href="#">Date &amp; Time</a></li>\n    <li class="active" data-bind="visible: $root.questions_enabled">Questions</li>\n    <li>Contact Info</li>\n    <li>Confirmation</li>\n  \x3c!-- /ko --\x3e\n\n  \x3c!-- ko if: $root.bookingTab() == \'contact_info\' --\x3e\n    <li data-bind="click: function() {\n      $root.selected_service(undefined);\n      $root.selected_time(undefined);\n      $root.selected_slot(undefined);\n      $root.questions_answered(false);\n    }, visible: $root.schedule().services.length > 1"><a tabindex="1" href="#">Service</a></li>\n    <li data-bind="click: function() {\n      $root.selected_time(undefined);\n      $root.selected_slot(undefined);\n      $root.questions_answered(false);\n      }"><a tabindex="2" href="#">Date &amp; Time</a></li>\n    <li data-bind="click: function() {\n      $root.questions_answered(false);\n    }, visible: $root.questions_enabled"><a tabindex="2" href="#">Questions</a></li>\n    <li class="active">Contact Info</li>\n    <li>Confirmation</li>\n  \x3c!-- /ko --\x3e\n\n  \x3c!-- ko if: $root.bookingTab() == \'confirm\' --\x3e\n    <li data-bind="visible: $root.schedule().services.length > 1">Service</li>\n    <li>Date &amp; Time</li>\n    <li data-bind="visible: $root.questions_enabled">Questions</li>\n    <li>Contact Info</li>\n    <li class="active">Confirmation</li>\n  \x3c!-- /ko --\x3e\n</ul>\n\x3c!-- /ko --\x3e\n'},"./src/views/website/fragments/scheduling/scheduling-title.html.erb":e=>{e.exports='\x3c!-- ko if: $root.schedule().header_uri --\x3e\n  <div>\n    <img class="header-image"data-bind="attr: {alt: $root.accountinfo().account.name, src: $root.schedule().header_uri  + \'?size=original\'}" />\n  </div>\n\x3c!-- /ko --\x3e\n\x3c!-- ko if: !$root.schedule().header_uri && $root.accountinfo().account.header_info.online_scheduling_header_image --\x3e\n  <div>\n    <img class="header-image"data-bind="attr: {alt: $root.accountinfo().account.name, src: $root.accountinfo().account.header_info.online_scheduling_header_image  + \'?size=original\'}" />\n  </div>\n\x3c!-- /ko --\x3e\n\n\n\x3c!-- ko if: !$root.accountinfo().account.logo_yn &&\n            (!$root.schedule().hide_logo_yn && $root.schedule().header_uri\n              ||\n            !$root.schedule().header_uri &&\n            !$root.accountinfo().account.header_info.hide_online_scheduling_logo &&\n            $root.accountinfo().account.header_info.online_scheduling_header_image\n              ||\n            !$root.schedule().header_uri &&\n            !$root.accountinfo().account.header_info.online_scheduling_header_image\n            ) --\x3e\n  <div class="business-title" id="iframeTitleRemoval" data-bind="text: $root.accountinfo().account.name"></div>\n\x3c!-- /ko --\x3e\n\x3c!-- ko if: $root.accountinfo().account.logo_yn &&\n            (!$root.schedule().hide_logo_yn && $root.schedule().header_uri\n              ||\n            !$root.schedule().header_uri &&\n            !$root.accountinfo().account.header_info.hide_online_scheduling_logo &&\n            $root.accountinfo().account.header_info.online_scheduling_header_image\n              ||\n            !$root.schedule().header_uri &&\n            !$root.accountinfo().account.header_info.online_scheduling_header_image\n            ) --\x3e\n  <img class="cp-business-logo" id="iframeLogoRemoval" data-bind="attr: {alt: $root.accountinfo().account.name, src: dataModel.accountinfo().account.logo_path + \'?size=resized4x\'}" />\n\x3c!-- /ko --\x3e\n'},"./src/views/website/fragments/scheduling/scheduling.html.erb":(e,t,n)=>{const a=n("./src/views/website/fragments/scheduling/scheduling-title.html.erb"),o=n("./src/views/website/fragments/scheduling/scheduling-services-menu.html.erb"),i=n("./src/views/website/fragments/scheduling/scheduling-service-selector.html.erb"),s=n("./src/views/website/fragments/scheduling/scheduling-date-selector.html.erb"),c=n("./src/views/website/fragments/scheduling/scheduling-questions.html"),r=n("./src/views/website/fragments/scheduling/scheduling-contact-info.html.erb"),d=n("./src/views/website/fragments/scheduling/scheduling-confirmation.html.erb"),l=n("./src/views/website/fragments/scheduling/scheduling-canceled.html"),u=n("./src/views/website/fragments/scheduling/scheduling-footer.html.erb");e.exports='\x3c!-- Note that there is two files here this on for regular OS and for embed change scheduling_embed as well --\x3e\n<section id="schedule-services-cp" data-bind="visible: $root.schedule()">\n  <div class="hats-cp-container">\n    \x3c!-- <img src="https://7.17hats.com/perl/client/account/0/logo/1" class="cp-business-logo"> --\x3e\n    <div class="hats-cp-inner">\n      '+a+'\n      <div class="hats-cp-content">\n        '+o+"\n        "+i+"\n        "+s+"\n        "+c+"\n        "+r+"\n        "+d+"\n        "+l+"\n        "+u+'\n      </div>\n    </div>\n  </div>\n</section>\n\n<script type="text/html" id="slot-html">\n\t<button data-bind="text: time, click: $root.selectSlot"></button>\n<\/script>'},"./src/views/website/fragments/scheduling/scheduling_embed.html.erb":(e,t,n)=>{const a=n("./src/views/website/fragments/scheduling/scheduling-services-menu.html.erb"),o=n("./src/views/website/fragments/scheduling/scheduling-service-selector.html.erb"),i=n("./src/views/website/fragments/scheduling/scheduling-date-selector.html.erb"),s=n("./src/views/website/fragments/scheduling/scheduling-questions.html"),c=n("./src/views/website/fragments/scheduling/scheduling-contact-info.html.erb"),r=n("./src/views/website/fragments/scheduling/scheduling-confirmation.html.erb"),d=n("./src/views/website/fragments/scheduling/scheduling-canceled.html");e.exports='\x3c!-- Note that there is two files here this on for regular OS and for embed change scheduling.html.erb as well --\x3e\n<section id="schedule-services-cp" data-bind="visible: $root.schedule()">\n  <div class="hats-cp-container">\n    \x3c!-- <img src="https://7.17hats.com/perl/client/account/0/logo/1" class="cp-business-logo"> --\x3e\n    <div class="hats-cp-inner">\n\n      <div class="hats-cp-content">\n        '+a+"\n        "+o+"\n        "+i+"\n        "+s+"\n        "+c+"\n        "+r+"\n        "+d+'\n      </div>\n    </div>\n  </div>\n</section>\n\n<script type="text/html" id="slot-html">\n\t<button data-bind="text: time, click: $root.selectSlot"></button>\n<\/script>'},"./src/views/website/fragments/surveys/view.html.erb":(e,t,n)=>{const a=n("./src/views/fragments/forms/client.html.erb");e.exports='<style>\n  li.parsley-required {color: orange}\n</style>\n<div>\n\t<div class="public_header">\n\t\t<div class="public_header_right">\n\t\t\t\x3c!--<button class="public_action_btn"><i class="icon-download"></i>Download PDF</button>--\x3e\n\t\t\t<button id="btnPrint" href="#" class="js-button public_action_btn button-print" data-bind="click : $root.print "><i class="icon-print js-button_text_color"></i>Print</button>\n\t\t</div>\n\t\t<h1 data-bind="text: questionnaire().display_name ? questionnaire().display_name : ($root.brand_customization().questionnaire ? $root.brand_customization().questionnaire.title : \'Questionnaire\')"></h1>\n    \x3c!-- ko if: $root.questionnaire() && $root.questionnaire().answer_by --\x3e\n      <span>Due date: <span data-bind="text: $root.parseDate(questionnaire().answer_by, \'MMMM dd, yyyy\')"></span></span>\n    \x3c!-- /ko --\x3e\n\t</div>\n\t\x3c!-- ko if: questionnaire() --\x3e\n\t\t<div ><div>'+a+'</div></div>\n\t\x3c!-- /ko --\x3e\n  \x3c!-- ko if: $root.account().show_logo_footer_yn --\x3e\n\t  <a class="public_footer" target="_blank" href="https://www.17hats.com"><img src="/images/logo-poweredby-17hats.png" style="width:150px"></a>\n  \x3c!-- /ko --\x3e  \n</div>\n'},"./src/views/dialogs/website/card_setup.html":e=>{e.exports='<fieldset class="form--payment" data-bind="with: payment_settings">\n\n    <p>\n        Here you can save a new card, remove the cards you no longer want to be using, or\n        cancel automatic payments.\n    </p>\n    \x3c!-- ko if: !$root.account().disable_creditcard --\x3e\n      <div class="form__cc-logos"></div>\n    \x3c!-- /ko --\x3e\n  \x3c!-- ko if: $root.accountinfo().account.merchant_account_gateway in { Stripe: true, Square: true, \'17hats Payments\': true} --\x3e\n    \x3c!-- ko component: {\n      name: \'payment-method-selector\',\n      params: {\n        invoice: $root.invoice,\n        payment_in_progress: $root.payment_in_progress,\n        payment_error: $root.payment_error,\n        cards_only: true,\n        payment_methods: $root.payment_methods,\n      }\n    } --\x3e\x3c!-- /ko --\x3e\n    \x3c!-- ko component: {\n      name: \'card-setup-widget\',\n      params: {\n        merchant_gateway: $root.accountinfo().account.merchant_account_gateway,\n        merchant_country: $root.accountinfo().account.merchant_account_country,\n        square_application_id: window.$RESELLER_CONFIG.config.Square.application_id,\n        stripe_publishable_key: window.$RESELLER_CONFIG.config.Stripe.publishable_key,\n        stripe_allow_ach: !!$root.accountinfo().account.allow_ach,\n        stripe_allow_link: !!$root.accountinfo().account.allow_link,\n        stripe_disable_cc: !!$root.accountinfo().account.disable_creditcard,\n        merchant_account_login: $root.accountinfo().account.merchant_account_login,\n        payment_methods: $root.payment_methods,\n        zip: null,\n        name_on_card: null,\n        online_scheduling: false,\n        invoice: $root.invoice,\n        payment_in_progress: $root.payment_in_progress,\n        currency: $root.account().currency,\n        can_save_cards_yn: $root.account().save_cards_yn,\n      }\n    } --\x3e\x3c!-- /ko --\x3e\n  \x3c!-- /ko --\x3e\n  <div class="errorsContainer">\n    <div id="errorBlock" class="errors"></div>\n    <div class="errors" data-bind="if: $root.payment_error">\n      <span class="fa fa-exclamation-circle"></span>&nbsp;<div data-bind="text: $root.payment_error"></div>\n    </div>\n  </div>\n\n  <div id="paymentOverlay" style="display:none;">\n      <div class="spinner"></div>\n      <br/>\n      Processing...\n  </div>\n  </fieldset>\n'},"./src/views/dialogs/website/payment.html":e=>{e.exports='<fieldset class="form--payment">\n  \x3c!-- ko if: !$root.account().disable_creditcard --\x3e\n  <div class="form__cc-logos"></div>\n  \x3c!-- /ko --\x3e\n  \x3c!-- ko component: {\n    name: \'amount-widget\',\n    params: {\n      invoice: $root.invoice,\n      allow_tips_yn: $root.allow_tips_yn\n    }\n  }\n  --\x3e\x3c!-- /ko --\x3e\n\n\x3c!-- ko if: $root.accountinfo().account.merchant_account_gateway in { Stripe: true, Square: true, \'17hats Payments\': true } --\x3e\n  \x3c!-- ko component: {\n    name: \'payment-method-selector\',\n    params: {\n      invoice: $root.invoice,\n      payment_in_progress: $root.payment_in_progress,\n      payment_error: $root.payment_error,\n      payment_methods: $root.payment_methods,\n    }\n  } --\x3e\x3c!-- /ko --\x3e\n  \x3c!-- ko component: {\n    name: \'payment-widget\',\n    params: {\n      merchant_gateway: $root.accountinfo().account.merchant_account_gateway,\n      merchant_country: $root.accountinfo().account.merchant_account_country,\n      square_application_id: window.$RESELLER_CONFIG.config.Square.application_id,\n      stripe_publishable_key: window.$RESELLER_CONFIG.config.Stripe.publishable_key,\n      stripe_allow_ach: !!$root.accountinfo().account.allow_ach,\n      stripe_allow_link: !!$root.accountinfo().account.allow_link,\n      stripe_disable_cc: !!$root.accountinfo().account.disable_creditcard,\n      merchant_account_login: $root.accountinfo().account.merchant_account_login,\n      wallets_yn: $root.accountinfo().account.wallets_yn,\n      zip: null,\n      name_on_card: $root.invoice().client.name,\n      online_scheduling: false,\n      invoice: $root.invoice,\n      payment_in_progress: $root.payment_in_progress,\n      currency: $root.account().currency,\n      can_save_cards_yn: $root.account().save_cards_yn,\n      tabindex_start: 5,\n      client_email: $root.invoice().client.primary_email_address,\n      payment_error: $root.payment_error,\n      states: $root.states,\n    }\n  } --\x3e\x3c!-- /ko --\x3e\n\x3c!-- /ko --\x3e\n\x3c!-- ko if: $root.accountinfo().account.merchant_account_gateway == "AuthorizeNet" --\x3e\n  \x3c!-- ko component: {\n    name: \'payment-method-selector\',\n    params: {\n      invoice: $root.invoice,\n      payment_in_progress: $root.payment_in_progress,\n      payment_error: $root.payment_error,\n    }\n  } --\x3e\x3c!-- /ko --\x3e\n  \x3c!-- ko component: {\n    name: \'payment-widget\',\n    params: {\n      merchant_gateway: $root.accountinfo().account.merchant_account_gateway,\n      invoice: $root.invoice,\n      zip: null,\n      name_on_card: null,\n      online_scheduling: false,\n      payment_error: $root.payment_error,\n    }\n  } --\x3e\x3c!-- /ko --\x3e\n\x3c!-- /ko --\x3e\n\x3c!-- ko ifnot: $root.accountinfo().account.merchant_account_gateway in { Stripe: true, Square: true, AuthorizeNet: true, \'17hats Payments\': true } --\x3e\n  <div id="payment-options"></div>\n\x3c!-- /ko --\x3e\n<div class="errorsContainer">\n  <div id="errorBlock" class="errors"></div>\n  <div class="errors" data-bind="if: $root.payment_error">\n    <span class="fa fa-exclamation-circle"></span>&nbsp;<div data-bind="text: $root.payment_error"></div>\n  </div>\n</div>\n\n<div id="paymentOverlay" style="display:none;">\n    <div class="spinner"></div>\n    <br/>\n    Payment Processing...\n</div>\n</fieldset>\n'},"./src/views/dialogs/website/payment_success.html":e=>{e.exports='<p class="success_message">\n  \x3c!-- ko ifnot: $data.payment_success_message --\x3e\n  Thank you for your payment of <span class="success_message__amount" data-bind="text: $data.payment_amount()"></span>.\n  \x3c!-- /ko --\x3e\n  \x3c!-- ko if: $data.payment_success_message --\x3e\n  <span data-bind="text: $data.payment_success_message"></span>\n  \x3c!-- /ko --\x3e\n  \x3c!-- ko if: $data.ach_payment --\x3e\n  <br />Please note that ACH (eCheck) payments can take up to 5 days to complete.\n  \x3c!-- /ko --\x3e\n</p>\n'},"./src/views/website/fragments/scheduling/scheduling-canceled.html":e=>{e.exports='\x3c!-- ko if: $root.bookingTab() == \'canceled\' --\x3e\n<div class="hats-cp-booking">\n  <div class="canceled-booking">Your Booking has been Cancelled</div>\n  <div class="cp-services-offered">\n    <div class="hats-cp-confirmation-actions">\n      <button onClick="dataModel.scheduleNewSlot()">Book Another Appointment</button>\n    </div>\n  </div>\n</div>\n\x3c!-- /ko --\x3e\n'},"./src/views/website/fragments/scheduling/scheduling-questions.html":e=>{e.exports="\x3c!-- ko if: $root.bookingTab() == 'questions' --\x3e\n<div class=\"cp-services-offered cp-contact-information\" data-bind=\"with: $root.selected_service\">\n    <div class=\"cp-contact-form-wrapper\" data-bind=\"template: {'afterRender': function() {$('.answerdate').datepicker({ dateFormat: 'MM dd, yy' });}}\">\n        <div class=\"hats-row\">\n            <p class=\"osDefaultCursor productScheduleHeader\">\n                Your <span class=\"font-weight-bold\" data-bind=\"text: $root.selected_service().name\"></span> will be on\n                <span class=\"font-weight-bold\"\n                    data-bind=\"text: $root.parseDate(dataModel.convertToUTC($root.selected_time()), 'MMM d, yyyy @ h:mm tt')\"></span>\n            </p>\n        </div>\n        <form id=\"service-questions\" class=\"parsley-form cp-contact-form-wrapper\" data-bind=\"foreach: $data.questions\">\n            <div>\n                \x3c!-- ko if: type != 'div' --\x3e\n                <label><span data-bind=\"text: $data.question\"></span><small\n                        data-bind=\"if: !required\">(Optional)</small></label>\n                \x3c!-- /ko --\x3e\n\n                \x3c!-- ko if: type == 'text' --\x3e\n                <textarea\n                    data-bind=\"attr: { 'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false'), 'data-parsley-type': (($data.maps_to === 'email') ? 'email' : null) }, value: $data.answer\"\n                    class=\"answer\"></textarea>\n                \x3c!-- /ko --\x3e\n\n                \x3c!-- ko if: type == 'input' && (maps_to == 'job_date' || maps_to == 'birthday') --\x3e\n                <input type=\"text\" data-parsley-date data-parsley-date-message=\"Please enter a valid date.\"\n                    data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false') }, value: $data.answer\">\n                \x3c!-- /ko --\x3e\n\n                \x3c!-- ko if: type == 'input' && maps_to != 'job_date' && maps_to != 'birthday' --\x3e\n                <input type=\"text\"\n                    data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false'), 'data-parsley-type': (($data.maps_to === 'email') ? 'email' : null) }, value: $data.answer\">\n                \x3c!-- /ko --\x3e\n\n                \x3c!-- ko if: type == 'checkbox' --\x3e\n                <label class=\"inlineLabel\">\n                    <input class=\"answer\" type=\"radio\" value=\"yes\"\n                        data-bind=\"checked: $data.answer, attr: {'name' : 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}\">\n                    Yes\n                </label>\n                <label class=\"inlineLabel\">\n                    <input class=\"answer\" type=\"radio\" value=\"no\"\n                        data-bind=\"checked: $data.answer, attr: {'name' : 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}\">\n                    No\n                </label>\n                \x3c!-- /ko --\x3e\n\n                \x3c!-- ko if: type == 'select' || maps_to == 'lead_source' --\x3e\n                <select\n                    data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}, options: options, optionsValue: 'option', optionsCaption: '-- Select --', value: $data.answer\"></select>\n                \x3c!-- /ko --\x3e\n\n                \x3c!-- ko if: type == 'multi' --\x3e\n                \x3c!-- ko foreach: options --\x3e\n                <div>\n                    <label class=\"inlineLabel\">\n                        <input type=\"checkbox\"\n                            data-bind=\"attr: {'name': 'q' + $parent.id, 'data-parsley-required' : ($parent.required?'true':'false'), 'value': option}, checked: $parent.answers\">\n                        <span data-bind=\"text: option\"></span>\n                    </label>\n                </div>\n                \x3c!-- /ko --\x3e\n                \x3c!-- /ko --\x3e\n\n                \x3c!-- ko if: type == 'date' --\x3e\n                <input type=\"text\" class=\"answerdate frmTextbox\" readonly\n                    data-bind=\"attr: {'name': 'q' + id, 'data-parsley-required' : ($data.required?'true':'false')}, value: $data.answer\">\n                \x3c!-- /ko --\x3e\n\n                \x3c!-- ko if: type == 'div' --\x3e\n                <p class=\"static-text js-font_family js-font_color\" data-bind=\"html: question.replace(/(?:\\r\\n|\\r|\\n)/g, '<br>')\"></p>\n                \x3c!-- /ko --\x3e\n\n            </div>\n        </form>\n        <div class=\"hats-cp-confirmation-actions my-3\">\n            <button id=\"answer-service-questions\" data-bind=\"click: dataModel.answerQuestions\">Next</button>\n        </div>\n    </div>\n</div>\n\x3c!-- /ko --\x3e\n"},"./node_modules/script-loader/index.js!./vendor/iframeResizer.contentWindow.min.js":(e,t,n)=>{n("./node_modules/script-loader/addScript.js")(n("./node_modules/script-loader/node_modules/raw-loader/index.js!./vendor/iframeResizer.contentWindow.min.js"))},"./node_modules/script-loader/index.js!./vendor/scrollto/jquery.localscroll-1.2.7-min.js":(e,t,n)=>{n("./node_modules/script-loader/addScript.js")(n("./node_modules/script-loader/node_modules/raw-loader/index.js!./vendor/scrollto/jquery.localscroll-1.2.7-min.js"))},"./node_modules/script-loader/node_modules/raw-loader/index.js!./vendor/iframeResizer.contentWindow.min.js":e=>{e.exports='/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v3.5.14 - 2017-03-30\n *  *  Desc: Include this file in any page being loaded into an iframe\n *   *        to force the iframe to resize to the content size.\n *    *  Requires: iframeResizer.min.js on host page.\n *     *  Copyright: (c) 2017 David J. Bradshaw - dave@bradshaw.net\n *      *  License: MIT\n *       */\n\n!function(a){"use strict";function b(a,b,c){"addEventListener"in window?a.addEventListener(b,c,!1):"attachEvent"in window&&a.attachEvent("on"+b,c)}function c(a,b,c){"removeEventListener"in window?a.removeEventListener(b,c,!1):"detachEvent"in window&&a.detachEvent("on"+b,c)}function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}function e(a){var b,c,d,e=null,f=0,g=function(){f=Ha(),e=null,d=a.apply(b,c),e||(b=c=null)};return function(){var h=Ha();f||(f=h);var i=xa-(h-f);return b=this,c=arguments,0>=i||i>xa?(e&&(clearTimeout(e),e=null),f=h,d=a.apply(b,c),e||(b=c=null)):e||(e=setTimeout(g,i)),d}}function f(a){return ma+"["+oa+"] "+a}function g(a){la&&"object"==typeof window.console&&console.log(f(a))}function h(a){"object"==typeof window.console&&console.warn(f(a))}function i(){j(),g("Initialising iFrame ("+location.href+")"),k(),n(),m("background",W),m("padding",$),A(),s(),t(),o(),C(),u(),ia=B(),N("init","Init message from host page"),Da()}function j(){function b(a){return"true"===a?!0:!1}var c=ha.substr(na).split(":");oa=c[0],X=a!==c[1]?Number(c[1]):X,_=a!==c[2]?b(c[2]):_,la=a!==c[3]?b(c[3]):la,ja=a!==c[4]?Number(c[4]):ja,U=a!==c[6]?b(c[6]):U,Y=c[7],fa=a!==c[8]?c[8]:fa,W=c[9],$=c[10],ua=a!==c[11]?Number(c[11]):ua,ia.enable=a!==c[12]?b(c[12]):!1,qa=a!==c[13]?c[13]:qa,Aa=a!==c[14]?c[14]:Aa}function k(){function a(){var a=window.iFrameResizer;g("Reading data from page: "+JSON.stringify(a)),Ca="messageCallback"in a?a.messageCallback:Ca,Da="readyCallback"in a?a.readyCallback:Da,ta="targetOrigin"in a?a.targetOrigin:ta,fa="heightCalculationMethod"in a?a.heightCalculationMethod:fa,Aa="widthCalculationMethod"in a?a.widthCalculationMethod:Aa}function b(a,b){return"function"==typeof a&&(g("Setup custom "+b+"CalcMethod"),Fa[b]=a,a="custom"),a}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(a(),fa=b(fa,"height"),Aa=b(Aa,"width")),g("TargetOrigin for parent set to: "+ta)}function l(a,b){return-1!==b.indexOf("-")&&(h("Negative CSS value ignored for "+a),b=""),b}function m(b,c){a!==c&&""!==c&&"null"!==c&&(document.body.style[b]=c,g("Body "+b+\' set to "\'+c+\'"\'))}function n(){a===Y&&(Y=X+"px"),m("margin",l("margin",Y))}function o(){document.documentElement.style.height="",document.body.style.height="",g(\'HTML & body height set to "auto"\')}function p(a){var e={add:function(c){function d(){N(a.eventName,a.eventType)}Ga[c]=d,b(window,c,d)},remove:function(a){var b=Ga[a];delete Ga[a],c(window,a,b)}};a.eventNames&&Array.prototype.map?(a.eventName=a.eventNames[0],a.eventNames.map(e[a.method])):e[a.method](a.eventName),g(d(a.method)+" event listener: "+a.eventType)}function q(a){p({method:a,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),p({method:a,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),p({method:a,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),p({method:a,eventType:"Input",eventName:"input"}),p({method:a,eventType:"Mouse Up",eventName:"mouseup"}),p({method:a,eventType:"Mouse Down",eventName:"mousedown"}),p({method:a,eventType:"Orientation Change",eventName:"orientationchange"}),p({method:a,eventType:"Print",eventName:["afterprint","beforeprint"]}),p({method:a,eventType:"Ready State Change",eventName:"readystatechange"}),p({method:a,eventType:"Touch Start",eventName:"touchstart"}),p({method:a,eventType:"Touch End",eventName:"touchend"}),p({method:a,eventType:"Touch Cancel",eventName:"touchcancel"}),p({method:a,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),p({method:a,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),p({method:a,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===qa&&p({method:a,eventType:"IFrame Resized",eventName:"resize"})}function r(a,b,c,d){return b!==a&&(a in c||(h(a+" is not a valid option for "+d+"CalculationMethod."),a=b),g(d+\' calculation method set to "\'+a+\'"\')),a}function s(){fa=r(fa,ea,Ia,"height")}function t(){Aa=r(Aa,za,Ja,"width")}function u(){!0===U?(q("add"),F()):g("Auto Resize disabled")}function v(){g("Disable outgoing messages"),ra=!1}function w(){g("Remove event listener: Message"),c(window,"message",S)}function x(){null!==Z&&Z.disconnect()}function y(){q("remove"),x(),clearInterval(ka)}function z(){v(),w(),!0===U&&y()}function A(){var a=document.createElement("div");a.style.clear="both",a.style.display="block",document.body.appendChild(a)}function B(){function c(){return{x:window.pageXOffset!==a?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==a?window.pageYOffset:document.documentElement.scrollTop}}function d(a){var b=a.getBoundingClientRect(),d=c();return{x:parseInt(b.left,10)+parseInt(d.x,10),y:parseInt(b.top,10)+parseInt(d.y,10)}}function e(b){function c(a){var b=d(a);g("Moving to in page link (#"+e+") at x: "+b.x+" y: "+b.y),R(b.y,b.x,"scrollToOffset")}var e=b.split("#")[1]||b,f=decodeURIComponent(e),h=document.getElementById(f)||document.getElementsByName(f)[0];a!==h?c(h):(g("In page link (#"+e+") not found in iFrame, so sending to parent"),R(0,0,"inPageLink","#"+e))}function f(){""!==location.hash&&"#"!==location.hash&&e(location.href)}function i(){function a(a){function c(a){a.preventDefault(),e(this.getAttribute("href"))}"#"!==a.getAttribute("href")&&b(a,"click",c)}Array.prototype.forEach.call(document.querySelectorAll(\'a[href^="#"]\'),a)}function j(){b(window,"hashchange",f)}function k(){setTimeout(f,ba)}function l(){Array.prototype.forEach&&document.querySelectorAll?(g("Setting up location.hash handlers"),i(),j(),k()):h("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return ia.enable?l():g("In page linking not enabled"),{findTarget:e}}function C(){g("Enable public methods"),Ba.parentIFrame={autoResize:function(a){return!0===a&&!1===U?(U=!0,u()):!1===a&&!0===U&&(U=!1,y()),U},close:function(){R(0,0,"close"),z()},getId:function(){return oa},getPageInfo:function(a){"function"==typeof a?(Ea=a,R(0,0,"pageInfo")):(Ea=function(){},R(0,0,"pageInfoStop"))},moveToAnchor:function(a){ia.findTarget(a)},reset:function(){Q("parentIFrame.reset")},scrollTo:function(a,b){R(b,a,"scrollTo")},scrollToOffset:function(a,b){R(b,a,"scrollToOffset")},sendMessage:function(a,b){R(0,0,"message",JSON.stringify(a),b)},setHeightCalculationMethod:function(a){fa=a,s()},setWidthCalculationMethod:function(a){Aa=a,t()},setTargetOrigin:function(a){g("Set targetOrigin: "+a),ta=a},size:function(a,b){var c=""+(a?a:"")+(b?","+b:"");N("size","parentIFrame.size("+c+")",a,b)}}}function D(){0!==ja&&(g("setInterval: "+ja+"ms"),ka=setInterval(function(){N("interval","setInterval: "+ja)},Math.abs(ja)))}function E(){function b(a){function b(a){!1===a.complete&&(g("Attach listeners to "+a.src),a.addEventListener("load",f,!1),a.addEventListener("error",h,!1),k.push(a))}"attributes"===a.type&&"src"===a.attributeName?b(a.target):"childList"===a.type&&Array.prototype.forEach.call(a.target.querySelectorAll("img"),b)}function c(a){k.splice(k.indexOf(a),1)}function d(a){g("Remove listeners from "+a.src),a.removeEventListener("load",f,!1),a.removeEventListener("error",h,!1),c(a)}function e(b,c,e){d(b.target),N(c,e+": "+b.target.src,a,a)}function f(a){e(a,"imageLoad","Image loaded")}function h(a){e(a,"imageLoadFailed","Image load failed")}function i(a){N("mutationObserver","mutationObserver: "+a[0].target+" "+a[0].type),a.forEach(b)}function j(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return m=new l(i),g("Create body MutationObserver"),m.observe(a,b),m}var k=[],l=window.MutationObserver||window.WebKitMutationObserver,m=j();return{disconnect:function(){"disconnect"in m&&(g("Disconnect body MutationObserver"),m.disconnect(),k.forEach(d))}}}function F(){var a=0>ja;window.MutationObserver||window.WebKitMutationObserver?a?D():Z=E():(g("MutationObserver not supported in this browser!"),D())}function G(a,b){function c(a){var c=/^\\d+(px)?$/i;if(c.test(a))return parseInt(a,V);var d=b.style.left,e=b.runtimeStyle.left;return b.runtimeStyle.left=b.currentStyle.left,b.style.left=a||0,a=b.style.pixelLeft,b.style.left=d,b.runtimeStyle.left=e,a}var d=0;return b=b||document.body,"defaultView"in document&&"getComputedStyle"in document.defaultView?(d=document.defaultView.getComputedStyle(b,null),d=null!==d?d[a]:0):d=c(b.currentStyle[a]),parseInt(d,V)}function H(a){a>xa/2&&(xa=2*a,g("Event throttle increased to "+xa+"ms"))}function I(a,b){for(var c=b.length,e=0,f=0,h=d(a),i=Ha(),j=0;c>j;j++)e=b[j].getBoundingClientRect()[a]+G("margin"+h,b[j]),e>f&&(f=e);return i=Ha()-i,g("Parsed "+c+" HTML elements"),g("Element position calculated in "+i+"ms"),H(i),f}function J(a){return[a.bodyOffset(),a.bodyScroll(),a.documentElementOffset(),a.documentElementScroll()]}function K(a,b){function c(){return h("No tagged elements ("+b+") found on page"),document.querySelectorAll("body *")}var d=document.querySelectorAll("["+b+"]");return 0===d.length&&c(),I(a,d)}function L(){return document.querySelectorAll("body *")}function M(b,c,d,e){function f(){da=m,ya=n,R(da,ya,b)}function h(){function b(a,b){var c=Math.abs(a-b)<=ua;return!c}return m=a!==d?d:Ia[fa](),n=a!==e?e:Ja[Aa](),b(da,m)||_&&b(ya,n)}function i(){return!(b in{init:1,interval:1,size:1})}function j(){return fa in pa||_&&Aa in pa}function k(){g("No change in size detected")}function l(){i()&&j()?Q(c):b in{interval:1}||k()}var m,n;h()||"init"===b?(O(),f()):l()}function N(a,b,c,d){function e(){a in{reset:1,resetPage:1,init:1}||g("Trigger event: "+b)}function f(){return va&&a in aa}f()?g("Trigger event cancelled: "+a):(e(),Ka(a,b,c,d))}function O(){va||(va=!0,g("Trigger event lock on")),clearTimeout(wa),wa=setTimeout(function(){va=!1,g("Trigger event lock off"),g("--")},ba)}function P(a){da=Ia[fa](),ya=Ja[Aa](),R(da,ya,a)}function Q(a){var b=fa;fa=ea,g("Reset trigger event: "+a),O(),P("reset"),fa=b}function R(b,c,d,e,f){function h(){a===f?f=ta:g("Message targetOrigin: "+f)}function i(){var h=b+":"+c,i=oa+":"+h+":"+d+(a!==e?":"+e:"");g("Sending message to host page ("+i+")"),sa.postMessage(ma+i,f)}!0===ra&&(h(),i())}function S(a){function c(){return ma===(""+a.data).substr(0,na)}function d(){return a.data.split("]")[1].split(":")[0]}function e(){return a.data.substr(a.data.indexOf(":")+1)}function f(){return!("undefined"!=typeof module&&module.exports)&&"iFrameResize"in window}function j(){return a.data.split(":")[2]in{"true":1,"false":1}}function k(){var b=d();b in m?m[b]():f()||j()||h("Unexpected message ("+a.data+")")}function l(){!1===ca?k():j()?m.init():g(\'Ignored message of type "\'+d()+\'". Received before initialization.\')}var m={init:function(){function c(){ha=a.data,sa=a.source,i(),ca=!1,setTimeout(function(){ga=!1},ba)}document.body?c():(g("Waiting for page ready"),b(window,"readystatechange",m.initFromParent))},reset:function(){ga?g("Page reset ignored by init"):(g("Page size reset by host page"),P("resetPage"))},resize:function(){N("resizeParent","Parent window requested size check")},moveToAnchor:function(){ia.findTarget(e())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var a=e();g("PageInfoFromParent called from parent: "+a),Ea(JSON.parse(a)),g(" --")},message:function(){var a=e();g("MessageCallback called from parent: "+a),Ca(JSON.parse(a)),g(" --")}};c()&&l()}function T(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}if("undefined"!=typeof window){var U=!0,V=10,W="",X=0,Y="",Z=null,$="",_=!1,aa={resize:1,click:1},ba=128,ca=!0,da=1,ea="bodyOffset",fa=ea,ga=!0,ha="",ia={},ja=32,ka=null,la=!1,ma="[iFrameSizer]",na=ma.length,oa="",pa={max:1,min:1,bodyScroll:1,documentElementScroll:1},qa="child",ra=!0,sa=window.parent,ta="*",ua=0,va=!1,wa=null,xa=16,ya=1,za="scroll",Aa=za,Ba=window,Ca=function(){h("MessageCallback function not defined")},Da=function(){},Ea=function(){},Fa={height:function(){return h("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return h("Custom width calculation function not defined"),document.body.scrollWidth}},Ga={},Ha=Date.now||function(){return(new Date).getTime()},Ia={bodyOffset:function(){return document.body.offsetHeight+G("marginTop")+G("marginBottom")},offset:function(){return Ia.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return Fa.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,J(Ia))},min:function(){return Math.min.apply(null,J(Ia))},grow:function(){return Ia.max()},lowestElement:function(){return Math.max(Ia.bodyOffset(),I("bottom",L()))},taggedElement:function(){return K("bottom","data-iframe-height")}},Ja={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return Fa.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Ja.bodyScroll(),Ja.documentElementScroll())},max:function(){return Math.max.apply(null,J(Ja))},min:function(){return Math.min.apply(null,J(Ja))},rightMostElement:function(){return I("right",L())},taggedElement:function(){return K("right","data-iframe-width")}},Ka=e(M);b(window,"message",S),T()}}();\n//# sourceMappingURL=iframeResizer.contentWindow.map\n'},"./node_modules/script-loader/node_modules/raw-loader/index.js!./vendor/scrollto/jquery.localscroll-1.2.7-min.js":e=>{e.exports="/**\n * jQuery.LocalScroll - Animated scrolling navigation, using anchors.\n * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com\n * Dual licensed under MIT and GPL.\n * Date: 3/11/2009\n * @author Ariel Flesler\n * @version 1.2.7\n **/\n;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery);"},"./src/app/app/hats.js":(e,t,n)=>{const a={store:new class{actions={};ready(){const e=n("./src/app/redux/index.js").A;this.store=e}dispatch(e,t){const a={type:e,data:t};n("./src/app/redux/index.js").A.dispatch(a)}addGroup(e,t){t.reducer||(t.reducer=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(!n.type.startsWith(e))return t;const{type:a,...o}=n;return{...t,...n.data}});n("./src/app/redux/ReducerRegistry.js").register(e,t.reducer),a.store.dispatch(`${e}__init`,t.state),t.actions&&Object.assign(this.actions,t.actions)}get state(){return n("./src/app/redux/index.js").A.getState()}}};window.hats=a},"./src/app/constants/countries.js":(e,t,n)=>{"use strict";n.d(t,{AU:()=>a,CA:()=>o,US:()=>i});const a=13,o=38,i=207},"./src/app/redux/index.js":(e,t,n)=>{"use strict";n.d(t,{A:()=>b});n("./src/app/app/hats.js");var a=n("./src/app/redux/reducers/index.js"),o=n("./src/app/redux/createStore.js"),i=n("./node_modules/redux/es/index.js"),s=n("./src/app/redux/ReducerRegistry.js");const c={device:{reactNative:!1,type:"",size:0}},r=e=>{const t=Object.keys(e);return Object.keys(c).forEach((n=>{-1===t.indexOf(n)&&(e[n]=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:null})})),(0,i.HY)(e)},d=r(s.default.getReducers());let l,u={},m={},p={};const f={QuickLookSidebar:n("./src/app/modules/QuickLook/index.js").A};Object.keys(f).forEach((e=>{const t=f[e]();if(t.initialState){if(!t.stateKey)throw new Error('hats-module: Must also define a "stateKey" when using "initialState"');c[t.stateKey]=t.initialState}let n;if(t.actions&&(n=t.actions(hats.store.dispatch),window.hats.store.actions[t.stateKey]||(window.hats.store.actions[t.stateKey]={}),Object.keys(n).forEach((e=>{window.hats.store.actions[t.stateKey][e]=n[e]})),m={actions:m,...n}),n){let e;e=t.reducer?t.reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.initialState||{},n=arguments.length>1?arguments[1]:void 0;const{type:a,data:o}=n;return a.startsWith(t.stateKey)?{...e,...o}:e},p[t.stateKey]=e}t.sagas&&(u={...u,...t.sagas})})),l=(0,i.HY)({...a.A,...p,...d});const _=(0,o.A)(l,m,c,u);s.default.setChangeListener((e=>{_.replaceReducer(r(e))}));const b=_},"./src/app/services/EducationService.js":(e,t,n)=>{"use strict";n.d(t,{completeItem:()=>j,eduDeeplinkClick:()=>F,getMaximumScore:()=>S,getPowerBarConfig:()=>M,getTotalScore:()=>q,isEducationNewUser:()=>z,isItemCompleted:()=>A,isRequired:()=>D,uncompleteItem:()=>T});n("./node_modules/react-dom/index.js");var a=n("./node_modules/react/react.js"),o=n.n(a),i=(n("./src/app/redux/index.js"),n("./node_modules/react-redux/es/index.js")),s=n("./node_modules/autobind-decorator/lib/esm/index.js"),c=n("./src/app/components/general/Accordion.jsx"),r=n("./src/app/components/general/power-bar/PowerBar.jsx"),d=n("./src/app/components/EDU/EDUSection.jsx"),l=n("./src/app/redux/actions/education.js"),u=n("./node_modules/redux/es/index.js");const m=[{label:"Organization",labelExtra:" — Everything you need, one click away",value:"organization",className:"edu-module-organization",icon:"fa fa-th"},{label:"Lead Management",labelExtra:" — Know leads are the right fit before you ever pick up the phone",value:"lead_management",className:"edu-module-lead_management",icon:"fa fa-th"},{label:"Booking",labelExtra:" — Create a seamless Booking System and book more clients",value:"booking",className:"edu-module-booking",icon:"fa fa-th"},{label:"Client Onboarding",labelExtra:" — Automate the sending and gathering of information",value:"onboarding",className:"edu-module-onboarding",icon:"fa fa-th"},{label:"Fulfillment",labelExtra:" — The ‘less- stress’ way to prepare, complete and deliver your Product or Service",value:"fulfillment",className:"edu-module-fulfillment",icon:"fa fa-th"}];class p extends a.Component{static displayName="EDUModules";state={opened:!1,completedPoints:11,completedSections:[],activeModule:null,activeModuleIndex:-1,activeSection:null,activeSectionIndex:-1};isEducationActive(){return!this.props.isPrimary||"true"===window.localStorage.getItem("education-active")}setEducationActive(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.props.isPrimary&&window.localStorage.setItem("education-active",e)}async componentWillMount(){this.setState({powerBarConfig:[10,10,10,10,10,10,10,10,10,10],totalScore:q(),opened:this.isEducationActive(),sections:[n("./src/app/components/EDU/OrganizationSection.jsx").A,n("./src/app/components/EDU/LeadSection.jsx").A,n("./src/app/components/EDU/BookingSection.jsx").A,n("./src/app/components/EDU/OnboardingSection.jsx").A,n("./src/app/components/EDU/FulfillmentSection.jsx").A]}),this.props.setCompletedItems(dataModel.completedEducationItems()),(()=>{let e=null;dataModel.completedEducationItems.subscribe((()=>{e&&window.clearTimeout(e),e=window.setTimeout((()=>{this.props.setCompletedItems(dataModel.completedEducationItems()),this.setState({totalScore:q()},(()=>{window.clearTimeout(e)}))}),200)}))})()}componentDidMount(){setTimeout((async()=>{await this.findActiveModule(),await this.findActiveSection(),this.updateScroll()}),100)}onDiveIn(){this.setState({opened:!this.state.opened}),this.setEducationActive(!this.state.opened)}parseCompletedItems(e){const{sections:t}=this.state,{completedItems:n}=this.props,a=[];return t?(t.map((t=>{const o=[];t.sections.map((t=>{const a=[];t.tasks&&t.tasks.map((t=>{const o=[];t.todos&&t.todos.map((t=>{const a=!z()&&t.existing_user_id?t.existing_user_id:t.id;if(e)if("string"==typeof a)n[a]&&o.push(a);else{let e=!0;a.map((t=>{n[t]||(e=!1)})),e&&o.push(a)}else if("string"==typeof a)!n[a]&&D(a)||o.push(a);else{let e=!0;a.map((t=>{!n[t]&&D(t)&&(e=!1)})),e&&o.push(a)}})),a.push(o.length>=t.todos.length)})),o.push(-1===a.indexOf(!1))})),a.push(-1===o.indexOf(!1))})),e||a.map(((e,t)=>{if(!e)return;const n=m[t];window.localStorage.getItem(`education-completedModule-${n.value}`)||(window.localStorage.setItem(`education-completedModule-${n.value}`,"1"),j(`COMPLETED_${n.value}`))})),a):[]}onTodoClick(e){const t=!z()&&e.existing_user_id?e.existing_user_id:e.id;A(t)?"string"==typeof t?T(t):t.map((e=>{T(e)})):"string"==typeof t?j(t):t.map((e=>{j(e)}))}async onSelectModule(e){window.localStorage.getItem(`education-startedModule-${e.value}`)||(window.localStorage.setItem(`education-startedModule-${e.value}`,"1"),j(`STARTED_${e.value}`)),window.localStorage.setItem("education-activeModule",e.value),window.localStorage.setItem("education-activeSection",null),await this.findActiveModule(),this.updateScroll()}async onUnselectModule(){window.localStorage.setItem("education-activeModule",null),window.localStorage.setItem("education-activeSection",null),await this.setState({activeModule:null,activeModuleIndex:-1})}async onSelectSection(e){window.localStorage.setItem("education-activeSection",e.value),await this.findActiveSection(),this.updateScroll()}async onUnselectSection(){window.localStorage.setItem("education-activeSection",null),await this.setState({activeSection:null,activeSectionIndex:-1})}async findActiveModule(){let e,t=-1;window.localStorage.getItem("education-activeModule")?(m.forEach(((n,a)=>{n.value===window.localStorage.getItem("education-activeModule")&&(t=a,e=n)})),await this.setState({activeModule:e,activeModuleIndex:t})):await this.setState({activeModule:e,activeModuleIndex:t})}async findActiveSection(){const{activeModuleIndex:e,sections:t}=this.state;let n,a=-1;e<0||!window.localStorage.getItem("education-activeSection")||t[e].menuItems.forEach(((e,t)=>{e.value===window.localStorage.getItem("education-activeSection")&&(a=t,n=e)})),await this.setState({activeSection:n,activeSectionIndex:a})}updateScroll(e){const{activeModule:t,activeSection:n}=this.state,{rootElSelector:a}=this.props;e||(e=n),e||(e=t),e&&setTimeout((()=>{$(`${a} .edu-modules-content`).scrollTo($(`${a} .${e.className}`),100)}),50)}isPowerBarTextVisible(){return q()/100>=1}render(){const{sections:e,opened:t,powerBarConfig:n,totalScore:a,activeModuleIndex:i}=this.state,{completedItems:s,isPrimary:l,secondaryModulesSelectors:u}=this.props,p=(this.parseCompletedItems(),this.parseCompletedItems(!0)),f=(z(),{completedItems:s,onTodoClick:this.onTodoClick});return m.map(((e,t)=>{Object.assign(e,{completed:p[t],disabled:!1})})),o().createElement("div",null,!this.props.modulesOnly&&o().createElement("div",null,o().createElement("h3",null,"Get Started Here"),o().createElement("div",{className:"powerbar-bg"},this.isPowerBarTextVisible()&&o().createElement("p",{className:"powerbar-text"},"Congrats! You’re using the full power of the 17hats system."),o().createElement(r.A,{completedPoints:a,className:"success-tracker",config:n})),o().createElement("p",null,"Congratulations! You have just joined the community of 17hats. Our community consists of 20,000+ successful small business owners that now have a business which works for them even when they are not around. How do they do that? By implementing 17hats of course!  Use the steps below to get started on your journey of business organization, systemization, and automation.")),t&&o().createElement("div",{className:"edu-modules-content custom-scrollbars"},o().createElement(c.A,{onUnselect:this.onUnselectModule,onSelect:this.onSelectModule,collapsible:!0,selectedIndex:i,items:m},e.map(((e,t)=>o().createElement(d.A,{onUnselectSection:this.onUnselectSection,onSelectSection:this.onSelectSection,completedItems:!0,key:t,isPrimary:l,secondaryModulesSelectors:u,parentModuleClassName:m[t].className,...e,...f}))))),!this.props.modulesOnly&&o().createElement("div",{className:"edu-modules-dive-in",onClick:this.onDiveIn},!t&&o().createElement("i",{className:"caret caret-down"}),t&&o().createElement("i",{className:"caret caret-up"}),o().createElement("span",{className:"Select-clear"},"Click here for your steps to success."),!t&&o().createElement("i",{className:"caret caret-down"}),t&&o().createElement("i",{className:"caret caret-up"})))}}(0,i.Ng)((e=>({completedItems:e.education.completedItems})),(e=>(0,u.zH)({setCompletedItems:l.q4},e)))((0,s.Zw)(p));var f=n("./node_modules/postal/lib/postal.js"),_=n.n(f);const b=_().channel("hats"),h=_().channel("edu"),g={STATE:"state"};hats.mainChannel=b,hats.eduChannel=h;let v=null;const y={},x={};let w={};async function k(){w=await async function(){const e=SuiteSetup.route_config.perl+"/education_constants";return await $.getSS(e)}();for(let e of w){y[e.name]=e;for(let t of e.items){let e=t.name;x[e]||(x[e]={score:t.score,required:t.required,completed:!1})}}}function M(){return[10,10,10,10,10,10,10,10,10,10]}function S(){return 100}function q(){let e={};if(null===v){Object.keys(x).length||k();let t=0;for(let n of w)for(let a of n.items){let n=a.name;if(e[n])continue;let o=x[n];o.completed&&(t+=o.score),e[n]=!0}v=t}return v}var C=!1;function j(e,t){let n;if(n=/^(?:STARTED_|COMPLETED_)(.+)/.exec(e)){if(n=n[1],!y[n])throw new Error("Cannot start/stop a nonexistent section "+n)}else if(!x[e])throw new Error("Cannot complete a nonexistent item "+e);let a=dataModel.completedEducationItems()||{};a[e]||(a[e]=!0,n||(x[e].completed=!0),dataModel.completedEducationItems(a),t||C||(C=window.setTimeout(P,3e3)))}async function T(e){if(!x[e])throw new Error("Cannot uncomplete a nonexistent item "+e);const t=`${SuiteSetup.route_config.perl}/account/0/education_progress`,n={};n[e]=!1,await $.delete_(t,n);let a=dataModel.completedEducationItems()||{};a[e]=!1,x[e].completed=!1,v=null,dataModel.completedEducationItems(a)}function A(e){return!!x[e]&&x[e].completed}function D(e){return!!x[e]&&x[e].required}function E(){const e="1"==dataModel.education_properties().education_opted_in,t="xs"!==dataModel.deviceType(),n=SuiteSetup.user_is_admin(),a=null!=dataModel.accountinfo().account.subscription.tier.match(/^17hats(.*)|Level\s3/i);return t&&e&&n&&a}function z(){return"1"==dataModel.education_properties().education_new_user}function I(e){v=null,dataModel.educationSyncInFlight(!0);let t=!1;for(let n of Object.keys(e))x[n]&&(x[n].completed||(j(n,!0),t=!0));dataModel.educationSyncInFlight(!1),t&&(dataModel.completedEducationItems.valueHasMutated(),dataModel.lastEducationSync(new Date));let n=dataModel.completedEducationItems();return dataModel.previousCompletedEducationItems(JSON.parse(JSON.stringify(n))),n}async function O(){const e=`${SuiteSetup.route_config.perl}/account/0/education_progress`;let t=dataModel.completedEducationItems();if(Object.keys(t).length&&function(){let e=dataModel.completedEducationItems(),t=dataModel.previousCompletedEducationItems(),n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!0;for(let o of[].concat(n,a))if(!e[o]||!t[o]||e[o]!==t[o])return!0;return!1}()){return I(await $.postSS(e,t))}return t}async function L(){let e=!1;try{e="/fragments/dashboard/overview.html"==fragments.current_fragment.settings.url}catch(e){}e&&E()&&(dataModel.pauseEducationSyncing()||dataModel.educationSyncInFlight()||(await O(),await async function(e){const t=`${SuiteSetup.route_config.perl}/account/0/education_progress`;let n=await $.getSS(t,{}),a={};if(e){let e=window.localStorage.getItem("education-progress");e||(e="{}");let t=JSON.parse(e);a=Object.assign({},n,t),window.localStorage.setItem("education-progress",JSON.stringify(a))}else a=n;return I(a)}(!0)))}async function P(){await L(),C=null}async function F(e,t){let{isPrimary:n=!0,secondaryModulesSelectors:a=["#quicklook-edu-modules"],parentModuleClassName:o,parentSectionClassName:i,tabSelector:s="a.quicklook-edu-tab"}=t;n&&await a.forEach((async e=>{const t=await h.subscribe(g.STATE,(n=>{if(void 0===n){$(s)[0].click();const n=$(`${e} .${o}`),a=$(`${e} .${i}`);a.is(":visible")||n.children()[0].click(),a.parent().hasClass("hats-accordion-item--active")||a.click(),$(`${e} .edu-modules-content`).scrollTo(a),t.unsubscribe()}}));await h.publish(g.STATE,{open:!0})})),e&&SuiteSetup.gotoPage(e)}},"./src/app/uimagic/index.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{$dialog:()=>i.PE,ConfirmDialog:()=>i.TM,Fragment:()=>a.FK,alert_dialog:()=>i.w4,awaitableConfirmDialog:()=>i.rK,bindFragment:()=>a.Mg,blockTimeout:()=>{},clearBlockTimeout:()=>{},closeDialog:()=>i.zU,createDataContainer:()=>o.ER,dataContainer:()=>o.iy,dcLoaded:()=>o.HX,dialog_options:()=>i.EP,finishFragment:()=>a.eJ,hideSubtabs:()=>a.xm,isDialogOpening:()=>i.ri,mobileBrowser:()=>d,openImageDialog:()=>i.YK,prepareFragment:()=>a.cB,setMainTab:()=>a.Tz,showSubtab:()=>a.Rk,trackEngagement:()=>r,unbindFragment:()=>a.ZO,updateClasses:()=>a.aK});var a=n("./src/app/uimagic/fragment.js"),o=n("./src/app/uimagic/datacontainer.js"),i=n("./src/app/uimagic/dialog.js"),s=n("./src/app/uimagic/knockout.js"),c={};for(const e in s)["default","blockTimeout","clearBlockTimeout","trackEngagement","mobileBrowser","Fragment","bindFragment","finishFragment","hideSubtabs","prepareFragment","setMainTab","showSubtab","unbindFragment","updateClasses","createDataContainer","dataContainer","dcLoaded","$dialog","ConfirmDialog","alert_dialog","awaitableConfirmDialog","closeDialog","dialog_options","isDialogOpening","openImageDialog"].indexOf(e)<0&&(c[e]=()=>s[e]);function r(){!window.engagementTimer&&dataModel.accountinfo()&&(analytics.track("engaged"),window.engagementTimer=setTimeout((function(){window.engagementTimer=null}),78e4))}function d(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t}n.d(t,c),$(document).ajaxComplete((function(){window.trackEngagementYN&&r()}))},"./src/app/utils/ResilientAxios.js":(e,t,n)=>{"use strict";n.d(t,{ve:()=>i});n("./src/app/utils/promise.js");var a=n("./node_modules/axios/index.js"),o=n.n(a);const i=10;o().defaults.headers.get.Accept="application/json"},"./src/app/utils/commBridge.js":(e,t,n)=>{"use strict";n.d(t,{default:()=>o});let a=new class{postMessage(e,t){if(window.ReactNativeWebView&&window.ReactNativeWebView.postMessage)window.ReactNativeWebView.postMessage(e);else if(window.postMessage)try{window.postMessage(e,t||"*")}catch(e){console.error("postMessage error:",e)}}postJSON(e,t){this.postMessage(JSON.stringify(e),t)}postAction(e,t,n){this.postMessage(JSON.stringify({__action__:e,data:t}),n)}receiveMessage(e,t){alert(e)}receiveJSON(e,t){alert(JSON.stringify(e))}receiveAction(e,t){"navigateTo"!==e?alert(e+": "+JSON.stringify(t)):SuiteSetup.gotoPage(t)}};window.commBridge=a;const o=a},"./src/app/utils/device.js":(e,t,n)=>{"use strict";function a(){var e=!1;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))&&(e=!0),e}n.d(t,{F:()=>a})},"./src/app/utils/environment.js":(e,t,n)=>{"use strict";function a(){return-1!==window.location.host.indexOf("17hats.full")}function o(){return function(){const e=window.location.host.match(/admin\.staging(.*)\.17hats\.io/);return!!e&&e.index>-1}()}n.d(t,{Cu:()=>a,YG:()=>o})},"./src/app/utils/general.js":(e,t,n)=>{"use strict";n.d(t,{Nx:()=>c,Zn:()=>i});var a=n("./node_modules/color/index.js"),o=n.n(a);function i(e){return null==e&&(e=""),e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function s(e){try{var t=o()(e).rgb();return.2126*t.color[0]+.7152*t.color[1]+.0722*t.color[2]}catch(e){return null}}function c(e){let t;try{t=o()(e)}catch(e){t=o()("#FFFFFF")}return{background:t.hex(),border:t.darken(.1).hex(),text:s(e)>180?"#444444":"#FFFFFF"}}},"./src/app/utils/requests.js":(e,t,n)=>{"use strict";n.d(t,{Em:()=>l});var a=n("./node_modules/underscore/modules/index-all.js");const o=n("./node_modules/rfdc/index.js")();let i={};function s(e,t,n){const a=i[e].callbacks;for(var s=0;s<a.length;s++){const e=a[s];e&&window.setTimeout((function(){e(o(t),n)}),0)}return delete i[e],t}function c(e,t){var n=i[e].errbacks;for(var a=0;a<n.length;a++){var o=n[a];o?window.setTimeout((function(){o(t)}),0):0}delete i[e]}function r(e,t){return t||""!=e?e:null}function d(e,t,n,a,o){jQuery.isFunction(t)&&(n=t,t={});const d="object"==typeof t?JSON.stringify(t):t,l=`${a} ${e} ${d}`;let u;if(l in i)u=i[l],u.callbacks.push(n),u.errbacks.push(o);else{jQuery.ajaxSetup({cache:!1});let m={type:a,contentType:"application/json",url:e,success:function(e,t){return s(l,e,t)},error:function(e){return c(l,e)},xhrFields:{withCredentials:"POST"===a},dataFilter:r};"GET"!==a&&"DELETE"!==a?(m.contentType="application/json",m.data=d,m.processData=!1):m.data=t,u={callbacks:[n],errbacks:[o],promise:jQuery.ajax(m)},i[l]=u}return u.promise}const l={get:(e,t,n,a)=>d(e,t,n,"GET",a),post:(e,t,n,a)=>d(e,t,n,"POST",a),put:(e,t,n,a)=>d(e,t,n,"PUT",a),del:(e,t,n,o)=>((0,a.Im)(t)&&(t=""),d(e,t,n,"DELETE",o))}},"./src/client_pages/components/payment-widget/constants.js":(e,t,n)=>{"use strict";n.d(t,{$r:()=>v,JR:()=>g,L$:()=>$,LX:()=>l,N7:()=>C,OV:()=>S,Oj:()=>x,P5:()=>M,R6:()=>d,Sr:()=>b,VA:()=>c,Xv:()=>o,YS:()=>j,a9:()=>a,aT:()=>q,eX:()=>f,kM:()=>y,lG:()=>w,nY:()=>i,nu:()=>_,o9:()=>s,qj:()=>m,qm:()=>r,uY:()=>u,xU:()=>k,yO:()=>h,yn:()=>p});const a="payment/ended",o="paymentsetup/ended",i="paymentdialog/submit",s="setupdialog/submit",c="paymentdialog/close",r="setupdialog/close",d="paymentmethod/selected",l="paymentmethod/reload",u="paymentmethod/removed",m="paymentmethod/new",p="paymentmethod/gather",f="payment/confirm",_="payment/confirmationcomplete",b="payment/confirmationerror",h="payment/error",g="paymentsetup/error",v="payment/success",y="paymentsetup/success",x="paymentmethod/removed/complete",w="payment/verify",k="payment/verify/complete",$="payment/cardvalid",M="payment/amountchanged",S="payment/remember_card_yn",q="payment/charge_automatically_yn",C="payment/method/modified",j="payment/email/updated"},"./src/client_pages/executeScripts.js":()=>{$(document).ready((function(){$("input.clearAndColor").each((function(){var e=$(this).val(),t=$(this).css("color");$(this).focus((function(){$(this).val()==e&&$(this).css("color","#000").val("")})),$(this).blur((function(){""==$(this).val()&&$(this).css("color",t).val(e)}))})),$("textarea.clearAndColor").each((function(){var e=$(this).text();$(this).focus((function(){$(this).text()==e&&$(this).css("color","#000").text("")}))}));var e="#search",t="#search .textInput input";$(t).focus((function(){$(e).addClass("focus"),$(this).animate({width:"160"},200)})),$(t).change((function(){""==$(this).val()?$(this).removeClass("searchHasText"):$(this).addClass("searchHasText")})),$(t).blur((function(){$(this).hasClass("searchHasText")||($(e).removeClass("focus"),$(t).animate({width:"95"},200))}))}))},"./src/client_pages/fragments.js":(e,t,n)=>{"use strict";var a=n("./src/app/constants/Currencies.js"),o=n("./src/app/constants/webfonts.js"),i=n("./node_modules/webfontloader/webfontloader.js"),s=n.n(i),c=n("./node_modules/color/index.js"),r=n.n(c),d=n("./src/app/utils/general.js");var l=n("./src/app/utils/environment.js"),u=n("./src/app/constants/account.js"),m=n("./node_modules/moment-timezone/index.js"),p=n.n(m),f=n("./src/client_pages/states.js"),b=n("./src/app/constants/countries.js"),h=n("./src/client_pages/modules/invoice.js"),g=n("./src/client_pages/modules/contract.js"),v=n("./src/client_pages/modules/quote.js"),y=n("./src/client_pages/modules/lead_form.js"),x=n("./src/client_pages/modules/schedule.js"),w=n("./src/client_pages/modules/form.js"),k=n("./src/client_pages/components/payment-widget/constants.js");n("./node_modules/underscore/modules/index-all.js");window.$RESELLER_CONFIG.config.Square.application_id;window.current_timezone=p().tz.guess(),window.css_remove={},window.css_remove["#main"]="twoColFixedLeft twoColFixedRight",window.fragments={},window.dialogs={},window.dataContainers={},window.dataModel=new function(){var e=this;e.invoice_installments_require_project_date=ko.observable(!1),e.active_quote_view=ko.observable("quote"),e.invoice=ko.observable(),e.invoice.subscribe((function(t){if(t){t.due_date=ko.observable(dataModel.parseDate(ko.toJS(t.due_date),"yyyy-MM-ddThh:mm:ss")),t.tax_rate=ko.observable(t.tax_rate),t.discount_type=ko.observable(t.discount_type),t.discount_amount=ko.observable(t.discount_amount),t.type=ko.observable(t.type),t.products=ko.observableArray(ko.toJS(t.products)),t.payment_schedule_yn=ko.observable(!1),ko.isObservable(t.taxsettings)||(t.taxsettings=ko.observableArray(t.taxsettings)),t.taxsettings().map((function(e){e.amount=ko.observable(0)}));var n=ko.toJS(t.installments);if(n.length){for(var a=0;a<n.length;a++){var o={type:ko.observable(n[a].type),amount_to_pay:accounting.toFixed(n[a].amount_to_pay,2),due_date:n[a].due_date,due_when_trigger:n[a].due_when};n[a].due_when_trigger&&n[a].due_when_trigger.match(/project/)&&e.invoice_installments_require_project_date(!0),n[a]=o}t.payment_schedule_yn(!0)}t.installments=ko.observableArray(n),E()}})),e.print=function(){return window.print(),!0},e.invoice_payment=ko.observable(),(0,h.invoiceMethods)(e),e.quote=ko.observable(),e.contract=ko.observable(),(0,g.contractMethods)(e),(0,x.scheduleMethods)(e),e.convertToUTC=function(e,t){try{var n=e instanceof Date?e.toString("yyyy-MM-dd HH:mm:ss"):Date.parse(e).toString("yyyy-MM-dd HH:mm:ss"),a=p()(n);t&&(a=a.endOf("day")),n=a.format("YYYY-MM-DD HH:mm:ss");var o=dataModel.schedule_tz()||dataModel.accountinfo().account.contact.timezone||current_timezone;return e=p().tz(n,o).clone().tz("UTC").format("YYYY-MM-DD HH:mm:ss")}catch(e){return""}},e.survey=ko.observable(),e.survey.subscribe((function(e){e&&E()})),(0,w.surveyMethods)(e),e.leadForm=ko.observable(),y.LeadFormMethods.init(e),e.payment_settings=ko.observable({payamount:ko.observable("full"),amount_to_pay:ko.observable(0),tip_amount:0,cc_number:"",cc_code:"",cc_month:"01",cc_year:"2022",firstname:"",lastname:"",name_on_card:"",address:"",city:"",state:"",zip:"",country:ko.observable()}),ko.postbox.subscribe(k.P5,(t=>{const n=e.payment_settings();n.payamount(t.mode),n.amount_to_pay(t.amount),n.tip_amount=t.tip_amount})),e.states=ko.observableArray(),e.payment_settings().country.subscribe((function(e){dataModel.states(f.x[e])})),e.fragments=0,e.shortcut="",e.account=ko.observable({name:"",social:{},icons:[]}),e.accountinfo=ko.observable({account:{}}),e.account_timezone=ko.observable(),e.account.subscribe((function(t){var n=e.accountinfo();if(n.account=t,e.accountinfo(n),E(),e.accountinfo().account){var a=(new Date).getTime();S.route_config.perl,e.accountinfo().account.id;const n=t.contact.timezone;-1!==p().tz.names().indexOf(n)&&(current_timezone=n),t.contact&&t.contact.timezone!=e.account_timezone()&&e.account_timezone(t.contact.timezone)}})),e.schedule_tz=ko.observable(),e.schedule_tz.subscribe((function(){dataModel.schedule()&&(dataModel.updateDateForAvailableSlots(),dataModel.updateAvailableDays())})),e.convertDate=function(t){return t instanceof Date&&(t=t.toString("yyyy-MM-dd HH:mm")),-1!=t.indexOf(" ")?p().tz(t,"UTC").clone().tz(e.schedule_tz()||e.account_timezone()||current_timezone).format("LLL"):t},e.parseDate=function(t,n){if(!t)return"";void 0===n&&(n="MMM dS, yyyy - hh:mm tt"),t=e.convertDate(t);var a,o=Date.parse(t);return o&&(a=o.toString(n)),a=a.replace("@","at")},e.installment_due_when_trigger_types=ko.observableArray([{id:"sign:on",label:"On Receipt"},{id:"sign:after",label:"After Receipt"},{id:"project:on",label:"On Project Date"},{id:"project:after",label:"After Project Date"},{id:"project:before",label:"Before Project Date"},{id:"due:on",label:"On Due Date"},{id:"due:after",label:"After Due Date"},{id:"due:before",label:"Before Due Date"},{id:"equal:after",label:"Equally"},{id:"due:custom",label:"On Custom Date"}]),e.payment_amount=ko.observable(),e.payment_success_message=ko.observable(""),e.payment_status=ko.observable(),e.payment_status_text=ko.observable(),e.payment_error=ko.observable(),e.payment_card_valid=ko.observable(!0),e.payment_public_id=ko.observable(),e.invoice_public_id=ko.observable(),e.booking_invoice_timed_out=ko.observable(!1),e.booking_payment_id=ko.observable(),e.walletsAvailableYN=ko.observable(!1),e.service_payment_amount=ko.pureComputed((()=>{if(!dataModel.selected_service())return 0;const e=dataModel.selected_service(),t=parseFloat(e.price),n=parseFloat(e.total_tax);if(!(e.products&&e.products.length>0))return 0;switch(e.upfront_type){case"full":return t+n;case"percentage":return(t+n)*(e.upfront_amount/100);case"fixed":return e.upfront_amount;default:return 0}}))},window.have_session_cookie_yn=!0,jQuery.ajaxSetup({cache:!1});var M,S={route_config:{perl:"/perl",ruby:"/ruby"}};fragments.survey=new Fragment({name:"survey",url:"/website/fragments/surveys/view.html",content:n("./src/views/website/fragments/surveys/view.html.erb"),classes:"fixedWidth noLightboxBg",dataContainers:["styles","brand_customization"],afterLoad:function(){O()}});var q=["Pacific/Honolulu","America/Anchorage","America/Los_Angeles","America/Denver","America/Phoenix","America/Moncton","America/Halifax","America/Chicago","America/Winnipeg","America/New_York","America/St_Johns","America/Puerto_Rico","America/Argentina/Buenos_Aires","America/Cayman","Africa/Casablanca","Africa/Lusaka","Europe/London","Europe/Amsterdam","Europe/Berlin","Europe/Dublin","Europe/Moscow","Europe/Stockholm","Asia/Dubai","Asia/Tehran","Asia/Tashkent","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Jakarta","Asia/Hong_Kong","Australia/Perth","Australia/Adelaide","Australia/Darwin","Australia/Brisbane","Australia/Melbourne","Australia/Sydney","Pacific/Auckland"];function C(){var e=dataModel.account_timezone();if(!_.find(q,(function(t){return t==e}))){var t=[p()(),p()().add(3,"months"),p()().add(6,"months"),p()().add(9,"months")];_.find(q,(function(n){return!!_.every(t,(function(e){return p().tz(e,dataModel.account_timezone()).format("YYYY-MM-DD HH:mm")==p().tz(e,n).format("YYYY-MM-DD HH:mm")}))&&(e=n,!0)}))}dataModel.schedule_tz(e)}function j(){$("#dialogSubmit").attr("disabled",!0)}function T(){$("#dialogSubmit").removeAttr("disabled")}function A(){const e=dataModel.payment_settings();let t=0;const n=ko.toJS(e.amount_to_pay);t=utils.unformatCurrency(n);const a=utils.unformatCurrency(e.tip_amount||0);return{products:ko.toJS(dataModel.invoice().products),amount:t,tip_amount:a,amount_localized:accounting.formatMoney(t),gateway:dataModel.account().merchant_account_gateway}}dataModel.contract_logo=ko.observable(!1),fragments.scheduling=new Fragment({name:"scheduling",url:"/website/fragments/scheduling/scheduling.html",content:n("./src/views/website/fragments/scheduling/scheduling.html.erb"),dataContainers:["schedule","styles","brand_customization"],beforeLoad:function(){C()},afterLoad:function(){O()}}),fragments.scheduling_embed=new Fragment({name:"scheduling_embed",url:"/website/fragments/scheduling/scheduling_embed.html",content:n("./src/views/website/fragments/scheduling/scheduling_embed.html.erb"),dataContainers:["schedule","styles","brand_customization"],beforeLoad:function(){C()},afterLoad:function(){O()}}),fragments.booking=new Fragment({name:"booking",url:"/website/fragments/scheduling/booking.html",content:n("./src/views/website/fragments/scheduling/booking.html.erb"),dataContainers:["booking","styles","brand_customization"],afterLoad:function(){O(),C()}}),fragments.quote=new Fragment({name:"quote",url:"/website/fragments/quotes/view.html",content:n("./src/views/website/fragments/quotes/view.html.erb"),dataContainers:["quote","styles","brand_customization"],afterLoad:function(){O(),dataModel.contract_logo(!0),dataModel.quote()?.invoice_public_id&&dataContainers.payment_methods.loadData({args:{pid:dataModel.quote().invoice_public_id}}).catch((function(e){return[]}))}}),fragments.contract=new Fragment({name:"contract",url:"/website/fragments/contracts/view.html",content:n("./src/views/website/fragments/contracts/view.html.erb"),dataContainers:["contract","styles","brand_customization"],afterLoad:function(){O()}}),fragments.lead_form=new Fragment({name:"contract",url:"/website/fragments/lead_forms/form.html",content:n("./src/views/website/fragments/lead_forms/form.html.erb"),dataContainers:["lead_form","styles","brand_customization"],afterLoad:function(){O("lcf")}}),fragments.lead_form_embed=new Fragment({name:"contract",url:"/website/fragments/lead_forms/form_embed.html",content:n("./src/views/website/fragments/lead_forms/form_embed.html.erb"),dataContainers:["lead_form","styles","brand_customization"],afterLoad:function(){O("embed")}}),fragments.invoice=new Fragment({name:"invoice",url:"/website/fragments/invoices/view.html",content:n("./src/views/website/fragments/invoices/view.html.erb"),dataContainers:["styles","brand_customization"],classes:"fixedWidth noLightboxBg",afterLoad:function(e){O(),dataContainers.invoice.loadData({args:{pid:e.pid}}).catch((function(e){$("#wrapper").hide(),$(".no_content").show()})),dataContainers.payment_methods.loadData({args:{pid:e.pid}}).catch((function(e){return[]}))}}),fragments.invoice_print=new Fragment({name:"invoice_print",url:"/website/fragments/invoices/invoice_print.html",content:n("./src/views/website/fragments/invoices/invoice_print.html.erb"),dataContainers:["invoice","styles","brand_customization"],classes:"fixedWidth noLightboxBg",afterLoad:function(){O()}}),dialogs.payment_success=new dialog({url:"/dialogs/website/payment_success.html",content:n("./src/views/dialogs/website/payment_success.html"),title:"Payment Successful!",submitBtnText:"OK",cancelButtonYn:!1,icon:"icon-money",width:340,submit:async function(){$dialog.dialog("close"),await dataContainers.invoice.loadData(dataModel.invoice().public_id)}}),dataContainers.account=new dataContainer({url:S.route_config.perl+"/client_account/0",item:"account",subscribe:function(e){var t=a.A[e.currency||"USD"];accounting.settings={currency:{symbol:t.symbol,format:"%s%v",decimal:t.formatting.decimal,thousand:t.formatting.thousand,precision:t.formatting.precision},number:{precision:0,decimal:t.formatting.decimal,thousand:t.formatting.thousand}}}}),dataContainers.invoice_payment=new dataContainer({url:S.route_config.perl+"/client_invoice/$pid/payment/$sid",item:"invoice_payment"}),dataContainers.payment_methods=new dataContainer({url:S.route_config.perl+"/client_invoice/$pid/payment_methods",item:"payment_methods",type:"array"}),dataContainers.answer=new dataContainer({url:S.route_config.perl+"/client_answer/$pid",item:"survey"}),dataContainers.invoice=new dataContainer({url:S.route_config.perl+"/client_invoice/$pid",item:"invoice",render:function(e){if(dataModel.nextPayment=ko.observable(),e&&e.id){e.due_amount&&dataModel.payment_settings().payamount("due"),e.installment_config&&(e.installment_config=ko.observable(ko.mapping.fromJS(e.installment_config))),dataModel.invoice(e),$RESELLER_CONFIG.config.PayPal&&dataModel.invoice().paypal_yn&&(n=$RESELLER_CONFIG.config.PayPal.production_container_id,function(e,t,n,a,o){e[a]=e[a]||[],e[a].push({t:(new Date).getTime(),event:"snippetRun"});var i=t.getElementsByTagName(n)[0],s=t.createElement(n);s.async=!0,s.src="https://www.paypal.com/tagmanager/pptm.js?id="+o,i.parentNode.insertBefore(s,i)}(window,document,"script","paypalDDL",n)),$("#wrapper").show(),$(".no_content").hide();var t=P("paid");t&&(dataModel.payment_amount(accounting.formatMoney(t)),dialogs.payment_success.open())}else $("#wrapper").hide(),$(".no_content").show();var n}}),dataContainers.questionnaire=new dataContainer({url:S.route_config.perl+"/client_questionnaire/$pid",item:"questionnaire",render:function(e){if(e&&e.id){if(e.questions){let t={};for(let n of e.questions)t[n.id]=n;for(let n of e.questions){if(n.hide_yn||(n.hide_yn=ko.observable(!1)),n.type.match(/select|multi|checkbox/))for(let e of n.options)if("checkbox"==n.type&&(e.option=e.option.toLowerCase()),"multi"==n.type&&Object.assign(e,{answer:ko.observable(1==e.answer)}),e.show_questions&&e.show_questions.length)for(let a of e.show_questions){let o=t[a];o&&("multi"==n.type?o.hide_yn=ko.observable(!e.answer()):1==n.hide_yn||n.hide_yn()?o.hide_yn=ko.observable(!0):o.hide_yn=ko.observable(n.answer!=e.option))}"checkbox"==n.type&&n.answer&&(n.answer=n.answer.toLowerCase()),n.answer=ko.observable(n.answer),(n.answer().length&&"completed"==e.status&&!n.maps_to||"completed"==e.status&&n.maps_to&&!n.hide_yn())&&n.hide_yn(!1)}e.questions=ko.observableArray(e.questions)}dataModel.questionnaire(e),$("#wrapper").show(),$(".no_content").hide()}else $("#wrapper").hide(),$(".no_content").show()}}),dataContainers.lead_form=new dataContainer({url:S.route_config.perl+"/client/lead-capture-form/$pid",item:"lead_form",render:function(e){e&&e.id&&e.questions&&e.questions.length?(document.title=e.title,e.questions.forEach((function(e){e.answer="",e.answers=[]})),e.hide_logo_yn=e.hide_logo_yn>0,dataModel.leadForm(e),$("#wrapper").show(),$(".no_content").hide()):($("#wrapper").hide(),$(".no_content").show())}}),dataContainers.quote=new dataContainer({url:S.route_config.perl+"/client_quote/$pid",item:"quote",render:function(e){if(e&&e.id){var t=(0,v._parseQuoteData)(e);dataModel.quote(t),$("#wrapper").show(),$(".no_content").hide()}else $("#wrapper").hide(),$(".no_content").show()}}),dataContainers.contract=new dataContainer({url:S.route_config.perl+"/client_contract/$pid",item:"contract",render:function(e){e&&e.id?((0,g._parseContractData)(e),$("#wrapper").show(),$(".no_content").hide()):($("#wrapper").hide(),$(".no_content").show())}}),dataContainers.brand_customization=new dataContainer({url:S.route_config.perl+"/client/account/0/brand_customization",item:"brand_customizationRaw",subscribe:function(e){dataModel.brand_customization=ko.observable(Object.assign({},u.Z,JSON.parse(JSON.stringify(e)))),E()}}),dataContainers.styles=new dataContainer({url:S.route_config.perl+"/client/account/0/styles",item:"stylesRaw",subscribe:function(e){dataModel.styles=ko.observable(Object.assign({},u.f,JSON.parse(JSON.stringify(e))))}}),dataContainers.schedule=new dataContainer({url:S.route_config.perl+"/client/schedule/$pid",item:"schedule",subscribe:function(e){if(e&&!e.id)$("#wrapper").hide(),$(".no_content").show();else{if(e.hide_logo_yn=e.hide_logo_yn>0,dataModel.schedule_service){var t=_.find(e.services,(function(e){return e.id==dataModel.schedule_service}));t&&(e.services=[t])}1==e.services.length&&dataModel.selected_service(e.services[0]),$("#wrapper").show(),$(".no_content").hide()}}}),dataContainers.service_policy=new dataContainer({url:S.route_config.perl+"/client/schedule/$pid/service_policy",item:"service_policy"}),dataContainers.service_location=new dataContainer({url:S.route_config.perl+"/client/schedule/$pid/location",item:"service_location"}),dataContainers.confirmation_message=new dataContainer({url:S.route_config.perl+"/client/schedule/$pid/confirmation_message",item:"confirmation_message"}),dataContainers.booking=new dataContainer({url:S.route_config.perl+"/client/booking/$pid",item:"booking",subscribe:function(e){e&&!e.id?($("#wrapper").hide(),$(".no_content").show()):($("#wrapper").show(),$(".no_content").hide(),dataModel.booking_info={name:ko.observable(e.contact.name),email:ko.observable(e.contact.primary_email_address),phonenumber:ko.observable(e.contact.primary_phone_number)},dataModel.selected_service(e.scheduled_service),e.metadata?dataModel.booking_zoom_info(JSON.parse(e.metadata)):dataModel.booking_zoom_info(void 0))}}),dataContainers.job_for_booking=new dataContainer({url:S.route_config.perl+"/client/booking/$pid/job",item:"job_for_booking",subscribe:function(e){dataModel.booking_info={first_name:ko.observable(e.contact.first_name),last_name:ko.observable(e.contact.last_name),email:ko.observable(e.contact.primary_email_address),phonenumber:ko.observable(e.contact.primary_phone_number)}}}),dataModel.payment_amount=ko.observable(),dataModel.allow_tips_yn=ko.computed((function(){if(!(dataModel.accountinfo()&&dataModel.accountinfo().account&&dataModel.accountinfo().account.properties&&dataModel.invoice()))return!1;const e=dataModel.accountinfo().account.properties,t=(dataModel.accountinfo().account.merchant_account_gateway||"").toLowerCase();return e.allow_tips_yn&&1==dataModel.invoice().allow_tips_yn&&("stripe"==t||"square"==t||"17hats payments"==t)})),dataModel.checkingSlots=ko.observable(!1),dataModel.payment_in_progress=ko.observable(!1),dataModel.payment_in_progress.subscribe((e=>{const t=$("#paymentOverlay"),n=$(".ui-dialog-titlebar-close");e?(n.fadeOut(),t.fadeIn()):(n.fadeIn(),t.fadeOut())})),dataModel.selected_service=ko.observable(),dataModel.selected_service.subscribe((function(e){if(dataModel.schedule()){var t=Date.parse(dataModel.convertDate(dataModel.schedule().rrules[0].starts_at));-1==Date.compare(t,Date.today())&&(t=Date.today()),t=t.toString("yyyy-MM-dd");var n=dataModel.convertToUTC(p()(t).startOf("month").add(-14,"days").format("YYYY-MM-DD")),a=dataModel.convertToUTC(p()(t).endOf("month").add(14,"days").format("YYYY-MM-DD"));dataModel.schedulingDateRange({start:n,end:a,first_date:t})}if(e&&e.service_policy_id?dataContainers.service_policy.loadData(e.service_policy_id):dataModel.service_policy(void 0),e&&e.location_id?dataContainers.service_location.loadData(e.location_id):dataModel.service_location(void 0),e&&e.confirmation_message_id?dataContainers.confirmation_message.loadData(e.confirmation_message_id):dataModel.confirmation_message(void 0),e&&e.questions){let t=dataModel.booking(),n=t?t.answers:null;e.questions.forEach((e=>{if(e.answer="",e.answers=[],n){let t=n.find((t=>t.question.id==e.id));t&&("multi"==e.type?e.answers=`${t.answer}`.split(", "):"date"==e.type&&""!=t.answer?e.answer=p()(t.answer).format("MM/DD/YYYY"):e.answer=t.answer)}}))}})),dataModel.questions_enabled=ko.pureComputed((()=>{let e=dataModel.selected_service();return e&&"1"==e.enable_questions_yn&&e.questions.length>0})),dataModel.questions_answered=ko.observable(!1),dataModel.selected_service.subscribe((e=>{e&&dataModel.questions_answered("1"!=e.enable_questions_yn)})),dataModel.bookingTab=ko.pureComputed((()=>dataModel.canceled_yn()?"canceled":dataModel.booked_yn()?"confirm":dataModel.selected_service()?dataModel.selected_slot()?dataModel.questions_enabled()&&!dataModel.questions_answered()?"questions":"contact_info":"select_slot":"select_service")),dataModel.selected_date=ko.observable(),dataModel.selected_time=ko.observable(),dataModel.selected_slot=ko.observable(),dataModel.selected_slot.subscribe((function(){window.scrollTo(0,0),dataModel.booked_yn(!1)})),dataModel.selected_user=ko.observable(),dataModel.selected_user.subscribe((function(e){dataModel.updateDateForAvailableSlots(),dataModel.updateAvailableDays()})),dataModel.canceled_yn=ko.observable(!1),dataModel.booked_yn=ko.observable(!1),dataModel.booking_info={first_name:ko.observable(""),last_name:ko.observable(""),email:ko.observable(""),phonenumber:ko.observable(""),notes:ko.observable("")},dataModel.booking_info.email.subscribe((e=>{ko.postbox.publish(k.YS,e)})),dataModel.schedule_booking=ko.observable(),dataModel.availableMorningSlots=ko.observableArray(),dataModel.availableAfternoonSlots=ko.observableArray(),dataModel.availableEveningSlots=ko.observableArray(),dataModel.booking_zoom_info=ko.observable(),dataModel.booking_can_be_paid=ko.pureComputed((()=>{let e;try{e=dataModel.accountinfo().account.merchant_account_gateway.toLowerCase()}catch(e){}return"square"==e||"stripe"==e||"17hats payments"==e})),createDataContainer({url:S.route_config.perl+"/client/schedule/$pid/available_slots/$sid",item:"available_slots",subscribe:function(e){var t=[],n=[],a=[];if(e&&e.length){var o=dataModel.parseDate(e[0].start,"yyyy-MM-dd");_.map(e,(function(e){var i=p()(dataModel.parseDate(e.start,"yyyy-MM-dd HH:mm"));i.isBefore(o+" 12:00")?t.push({slot:e,time:i.format("h:mm A")}):i.isBefore(o+" 18:00")?n.push({slot:e,time:i.format("h:mm A")}):i.isBefore(o+" 23:59:59")&&a.push({slot:e,time:i.format("h:mm A")})}))}dataModel.availableMorningSlots(t),dataModel.availableAfternoonSlots(n),dataModel.availableEveningSlots(a)}}),createDataContainer({url:S.route_config.perl+"/client/schedule/$pid/available_days/$sid",item:"available_days"}),dataModel.schedulingDateRange=ko.observable(),dataModel.schedulingDateRange.subscribe((function(e){dataModel.calendarStart=e.start,dataModel.calendarEnd=e.end,dataModel.updateAvailableDays()}));const D={payment:null,success:null,error:null,card_valid:null};function E(){if(!dataModel.brand_customization)return dataContainers.brand_customization.loadData();const e=dataModel.account(),t=dataModel.brand_customization();dataModel.invoice()&&dataModel.invoice().id?document.title=`${t.invoice.title} #${dataModel.invoice().number} - ${e.name}`:dataModel.questionnaire()?document.title=`${e.name} - ${t.questionnaire.title}`:dataModel.contract()?document.title=`${e.name} - ${t.contract.title}`:dataModel.quote()?document.title=`${e.name} - ${t.quote.title}`:dataModel.schedule()?document.title=`${e.name} - Online Scheduling`:document.title=dataModel.account().name}function z(e,t,n,a,o){return jQuery.isFunction(t)&&(n=t,t={}),jQuery.ajax({type:a,contentType:"application/json",url:e,data:"object"==typeof t?JSON.stringify(t):t,success:n,processData:!1,onerror:o})}function I(e){var t=(0,d.Nx)(e),n=function(e,t){var n=parseInt(e.slice(1),16),a=Math.round(2.55*t),o=(n>>16)+a,i=(n>>8&255)+a,s=(255&n)+a;return"#"+(16777216+65536*(o<255?o<1?0:o:255)+256*(i<255?i<1?0:i:255)+(s<255?s<1?0:s:255)).toString(16).slice(1)},a=e=e||"#11cfa1",o=n(a,10),i=n(a,-10),s=t.text;return{cssString:`\n    color: ${s};\n    background: ${a};\n    border-color: ${i};\n  `,buttonColor:a,buttonColorLight:o,buttonColorDark:i,fontColor:s}}function O(e){if(E(),dataModel.account().properties&&dataModel.styles()){var t=Object.assign({},dataModel.styles());if("lcf"===e){const e=Object.assign({},JSON.parse(dataModel.leadForm().user_options));t.font_color=e.fontColor,t.button_color=e.buttonColor,t.background_color=e.bgColor}else if("embed"===e){const e=document.getElementById("wrapper");e.style.maxWidth="100%",e.style.minWidth="100%";const n=Object.assign({},JSON.parse(dataModel.leadForm().user_options));t.font_color=n.fontColor,t.button_color=n.buttonColor,t.background_color=n.bgTransparency||"transparent"==n.bgColor?"transparent":"#FFF"}var n="string"==typeof t?$.parseJSON(t).button_color:t.button_color;const a=o.p.find((e=>e.name===t.font_family)),i=a?a.name:"open_sansregular",c=a&&a.sizeratio?a.sizeratio:"1",d=!(!a||!a.staticweight)&&a.staticweight;let l=`\n\n          #main .client_invoice .client_logo, .client_lead_form .client_logo, .icon-check {\n            color: ${t.font_color};\n          }\n          #main .client_invoice .client_logo{\n            font-weight: 600 !important;\n          }\n          body {\n            background: ${t.background_color};\n          }\n          .public_header {\n            font-family: ${i};\n            color: ${t.font_color};\n          }\n          .public_header h1 {\n            color: ${t.font_color};\n            font-size: ${c+.5}rem!important;\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n          body .js-button,\n          #main .js-button,\n          body .js-button:hover,\n          #main .js-button:hover,\n          body .js-button:active,\n          #main .js-button:active\n          {\n            ${I(n).cssString};\n\n            font-family: ${i};\n            font-size: ${c}rem!important;\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n\n          #main .js-button_color .icon-check,\n          body .js-button_color .icon-check {\n            color: baseColor;\n          }\n          #main .js-button_text_color,\n          body .js-button_text_color {\n            color: ${I(n).fontColor};\n          }\n          #main .js-font_color,\n          body .js-font_color {\n            color: ${t.font_color};\n          }\n          #main .js-font_color a,\n          body .js-font_color a {\n            color: ${t.font_color};\n            text-decoration: underline;\n          }\n          #main .js-font_family,\n          body .js-font_family {\n            font-family: ${i};\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n          #main .js-font_family.user-answer,\n          body .js-font_family.user-answer{\n            font-size: ${c}rem!important;\n          }\n          #main .js-font_family ul.parsley-errors-list,\n          body .js-font_family ul.parsley-errors-list {\n            font-family: 'open_sansregular';\n          }\n\n          #dialogSettings #dialogButton1,\n          #dialogSettings #dialogSubmit {\n            ${I(n).cssString};\n            &:hover, &:active {\n              ${I(n).cssString};\n            }\n          }\n          #dialogSettings #dialogButton1,\n          #dialogSettings #dialogSubmit,\n          #dialogSettings #dialogCancel{\n            font-family: ${i}!important;\n            font-size: ${c}rem!important;\n          }\n\n          #lc_form .submit_form .btn,\n          .questions .js-font_family {\n            font-size: ${c}rem!important;\n          }\n\n          #main .quote_selector_btn .icon-check {\n            color: ${n};\n          }\n\n          #main .quote_selector_btn {\n            font-family: ${i};\n            font-size: ${c}rem!important;\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n          #main .quote_selector_btn.selected {\n            ${I(n).cssString};\n          }\n          #main .quote_selector_btn.selected .icon-check {\n            color: ${I(n).fontColor};\n          }\n          #main .client_invoice table.selection tbody tr:hover td {\n            background-color: ${r().rgb(t.accent_color).alpha(.8).toString()} !important;\n            color: ${I(t.accent_color).fontColor} !important;\n          }\n          #main .client_invoice table.selection tbody tr.selected td,\n          #main .client_invoice table.selection tbody tr.selected:hover td, div.selected, #customColor div.selected {\n            background-color: ${r().rgb(t.accent_color).toString()} !important;\n            color: ${I(t.accent_color).fontColor} !important;\n          }\n          #main .client_invoice .product-item-selectable:hover,\n          #main .client_invoice .product-item-selectable.selected,\n          #main .client_invoice .product-item-selectable.selected:hover{\n            background-color: ${r().rgb(t.accent_color).toString()} !important;\n            color: ${I(t.accent_color).fontColor} !important;\n          }\n          #main .client_invoice .client_head_right .js-font_family,\n          #main .client_invoice .product-title,\n          #contract .contract_content .js-font_family,\n          .sign p.js-font_family {\n            font-size: ${c+.15}rem!important;\n          }\n\n          form#questionnaire .js-font_family {\n            font-size: ${c}rem!important;\n          }\n          form#questionnaire .file_upload{\n            font-size: 13px !important;\n          }\n          form#questionnaire .file_upload:hover{\n            font-size: 13px !important;\n          }\n          .new_questions .uploaded_file{\n            color: ${n} !important;\n            text-decoration: underline;\n          }\n          form#questionnaire .js-font_family.surveyHeader {\n            font-size: ${c+.2}rem!important;\n          }\n          .sign .next button b {\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n          #main .client_invoice .sign .signed-span,\n          #main .client_invoice .total .js-font_family,\n          #main .client_invoice .balance-due .js-font_family {\n            font-size: ${c+.1}rem!important;\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n          #main .lc_form .static-text {\n            font-size: ${c}rem!important;\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n          .public_header .invoice-total{\n            font-size: ${c+.5}rem!important;\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n          #main .client_invoice table thead tr th:first-child h3{\n            font-size: ${c+.2}rem!important;\n            ${d?"font-weight: 600 !important;":""}\n          }\n          #main .client_invoice #product-item .product-item-header-left div:first-child{\n            font-size: ${c}rem!important;\n            ${d?"font-weight: 600 !important;":""}\n          }\n          .next h2{\n            font-size: ${c+.2}rem!important;\n            ${d?`font-weight: ${d}!important;`:""}\n          }\n          .hats-cp-booking .cp-times-section button, ul.payment-methods li.interactive.selected, ul.payment-methods li:not(.interactive).selected {\n            border-color: ${n} !important;\n          }\n          #hats-modal.terms-modal .actions-container .hats-button, .cp-services-offered .hats-cp-confirmation-actions button, .cp-services-offered .cp-services-action-button-container button, #schedule-services-cp .hats-cp-inner .hats-cp-content ul.cp-services-list li.cp-product-offering button, .hats-cp-booking .schedule-services-calendar-wrapper #datepicker .ui-datepicker .ui-state-active, .hats-cp-booking .schedule-services-calendar-wrapper #datepicker .ui-datepicker .ui-widget-content .ui-state-active, .hats-cp-booking .schedule-services-calendar-wrapper #datepicker .ui-datepicker .ui-widget-header .ui-state-active{\n            background-color: ${n} !important;\n            color: ${I(n).cssString} !important;\n          border-color: ${n} !important;}\n            #schedule-services-cp .hats-cp-inner .hats-cp-content h1, #schedule-services-cp .hats-cp-inner .hats-cp-content ul.cp-services-list li.cp-product-offering h2, div.business-title, div.cp-footer-content, p.cp-contact, .canceled-booking {\n          color: ${t.font_color} !important;\n          font-family: ${i} !important;}\n          #schedule-services-cp .hats-cp-inner .hats-cp-content ul.hats-cp-services-menu li a {\n            color: ${t.font_color} !important;\n          }\n          #schedule-services-cp .hats-cp-inner .hats-cp-content ul.hats-cp-services-menu li.active {\n            color: ${n} !important;}\n          .hats-cp-booking .schedule-services-calendar-wrapper #datepicker td.day.active::after,#datepicker.hats-datepicker table tr td.day:hover:after, #datepicker.hats-datepicker table tr td.day.focused:after, #datepicker.hats-datepicker table tr td.day.active:after {\n            background-color: ${n} ;\n            }\n            div.border-inherit {\n              border-color: ${t.font_color} !important;\n            }\n            #payment-schedule-details .fa-caret-right,#payment-schedule-details .fa-caret-down{\n              color: ${I(n).buttonColor} !important;\n            }\n            #payment-schedule-details .payment-toggle{\n              color: ${I(n).buttonColor} !important;\n            }\n            #main .public_header .js-button{\n              font-size: 16px !important;\n            }\n        `;$("<style>").prop("type","text/css").html(l).appendTo("head"),function(e){if(e){let t=o.p.find((t=>t.name===e));t&&"google"===t.source&&s().load({google:{families:[t.value]}})}}(t.font_family)}}async function L(){function e(e){dataModel.deviceSize()>588?$(e).css({"max-height":"55px",height:"55px"}):dataModel.deviceSize()>378?$(e).css({"max-height":"45px",height:"45px"}):dataModel.deviceSize()<378&&$(e).css({"max-height":"35px",height:"35px"})}if("Square"==dataModel.account().merchant_account_gateway)$(".ui-dialog-title").css("padding-right","137px");else if("Stripe"==dataModel.account().merchant_account_gateway);else if(dataModel.invoice().paypal_yn){$("#dialogSubmit").hide(),$("#dialogSettings").addClass("paypal-dialog"),$("<div/>",{id:"dialogPaypal"}).appendTo(".centerButton"),$("#dialogCancel").css({"vertical-align":"top",padding:"6px 0 6px 0","max-height":"35px",height:"35px"}),"xs"===dataModel.deviceType()?($("div.form__cc-logos").hide(),e("#dialogCancel"),$("#dialogPaypal").css({width:"100%"}),$("#dialogCancel").css({width:"100%"}).parent().css({"text-align":"center"}),$("<br/>").appendTo(".centerButton"),$("#dialogCancel").appendTo(".centerButton"),$(window).resize((function(){e("#dialogCancel")}))):dataModel.invoice().check_address&&dataModel.invoice().check_address.country.id!=b.US&&($("div.form__cc-logos").hide(),$("fieldset.form--payment").css({width:"350px",margin:"auto",position:"relative"}),$("#dialogCancel").css({width:"350px"}).parent().css({"text-align":"center"}),$("#dialogCancel").css({"max-height":"45px",height:"45px"}),$("<br/>").appendTo(".centerButton"),$("#dialogCancel").appendTo(".centerButton"));let t="production";((0,l.Cu)()||(0,l.YG)())&&(t="sandbox");const n=$(".paypal-dialog"),a=$('<button type="reset" class="btnGrey closeDialog" id="dialogCancel"><strong>OK</strong></button>');a.click((()=>{$dialog.dialog("close")}));const o=(e,t)=>{let o=e;t&&(o=`<span class="warning">Error: ${e}</span>`),n.find(".centerButton").html(o),n.find(".centerButton").after(a)};let i=[window.paypal.FUNDING.CARD],s=[];!function(){try{const e=dataModel.invoice().check_address&&dataModel.invoice().check_address.country.id==b.US,t=dataModel.invoice().outstanding_amount>99,n=1==dataModel.accountinfo().account.paypal_credit_yn;return!!(e&&t&&n)}catch(e){console.error(e)}return!1}()?s=[window.paypal.FUNDING.CREDIT]:i.push(window.paypal.FUNDING.CREDIT),window.paypal.Button.render({env:t,client:{sandbox:$RESELLER_CONFIG.config.PayPal?$RESELLER_CONFIG.config.PayPal.sandbox_client_id:null,production:$RESELLER_CONFIG.config.PayPal?$RESELLER_CONFIG.config.PayPal.production_client_id:null},funding:{allowed:i,disallowed:s},locale:"en_US",style:{layout:dataModel.invoice().check_address&&dataModel.invoice().check_address.country.id!=b.US||"xs"===dataModel.deviceType()?"vertical":"horizontal",size:dataModel.invoice().check_address&&dataModel.invoice().check_address.country.id!=b.US&&"xs"!==dataModel.deviceType()?"large":"xs"===dataModel.deviceType()?"responsive":"medium",color:"white",shape:"rect",label:"pay",tagline:!1},payment:function(e,t){const n=A(),a=n.amount,i=n.amount_localized;return $.postSS(S.route_config.perl+"/client_invoice/"+dataModel.account().id+"/paypal_payment_intent/"+dataModel.invoice().public_id,{amount:a,amount_localized:i}).then((function(e){if(e.success)return e.id;{const t=e.error?e.error.message:"";o(t||"Please contact administrator",!0)}}))},onAuthorize:function(e,t){const a=A();return console.log("paypal authorize data",e),$.postSS(S.route_config.perl+"/client_invoice/"+dataModel.accountinfo().account.id+"/pay/"+dataModel.invoice().public_id,{token:e.paymentID,payer_id:e.payerID,payment_method:"paypal",amount:a.amount,amount_localized:a.amount_localized}).then((function(e){n.removeClass("loading"),e.success?(o("Your payment has been successfully completed"),ko.postbox.publish(k.$r,{amount:a.amount,tip_amount:a.tip_amount})):e.error&&o(e.error.message||"Please contact administrator",!0)}))},onError:function(e){console.debug(e)}},"#dialogPaypal")}}dialogs.invoice_payment=new dialog({url:"/dialogs/website/payment.html",content:n("./src/views/dialogs/website/payment.html"),title:"Pay Invoice",submitBtnText:"Pay",icon:"icon-due-date",dialogClass:"form_dialog--client-invoice",width:575,afterOpen:function(){dataModel.payment_error(""),L(),O(),D.payment=ko.postbox.subscribe(k.a9,(function(){T(),dataModel.payment_in_progress(!1)})),D.success=ko.postbox.subscribe(k.$r,(async function(e){let t=dataModel.invoice().payments.length,n=dataModel.invoice().public_id,a=10;for(;a>0;){if(t!=((await $.get(`${S.route_config.perl}/client/invoice/${n}/payments_count`)).count||0))break;await new Promise((e=>{window.setTimeout(e,2e3)})),a--}await async function(e,t,n,a,o){n=parseFloat(n)||0,t=parseFloat(t)||0,analytics.track("Invoice Payment",{invoice_paid_amount:t,event_type:"Invoice Payment"}),await dataContainers.invoice.loadData({args:{pid:dataModel.invoice().public_id}}),dataModel.quote()&&(0,v.quoteShow)("invoice"),t&&dataModel.payment_amount(accounting.formatMoney(t+n)),dataModel.payment_success_message(a||"");try{e.dialog("close")}catch(e){}dialogs.payment_success.open({title:o||"Payment Successful!"})}($dialog,e.amount,e.tip_amount,e.message,e.title),dataContainers.payment_methods.loadData({args:{pid:dataModel.invoice().public_id}}).catch((function(e){return[]})),ko.postbox.publish(k.a9,[])})),D.error=ko.postbox.subscribe(k.yO,(async function(e){dataModel.payment_error(e),ko.postbox.publish(k.a9,[])})),D.card_valid=ko.postbox.subscribe(k.L$,(async function(e){dataModel.payment_card_valid(!!e)}))},beforeOpen:function(){return dataContainers.account.loadData()},submit:function(e){return dataModel.payment_card_valid()?!!e.parsley().validate()&&(j(),dataModel.payment_error(""),ko.postbox.publish(k.nY,!1),dataModel.payment_in_progress(!0),!1):(dataModel.payment_error()||(console.error("Please fill in your card data to proceed"),dataModel.payment_error("Please fill in your card data to proceed")),!1)},beforeClose:function(){if(dataModel.payment_in_progress())return!1},onClose:function(e){if(dataModel.payment_in_progress())return!1;ko.postbox.publish(k.VA,[]);for(let e in D)D[e]&&(D[e].dispose(),D[e]=null)}}),dialogs.card_setup=new dialog({url:"/dialogs/website/card_setup.html",content:n("./src/views/dialogs/website/card_setup.html"),title:"Manage Cards",submitBtnText:"Save",icon:"icon-due-date",dialogClass:"form_dialog--client-invoice",width:575,afterOpen:function(e){dataModel.payment_error(""),L(),O(),D.setup=ko.postbox.subscribe(k.Xv,(function(t){T(),dataModel.payment_in_progress(!1),t&&t.close&&e.dialog("close")})),D.success=ko.postbox.subscribe(k.kM,(async function(e){})),D.error=ko.postbox.subscribe(k.JR,(async function(e){dataModel.payment_error(e),ko.postbox.publish(k.Xv,[])})),D.card_valid=ko.postbox.subscribe(k.L$,(async function(e){dataModel.payment_card_valid(!!e)}))},beforeOpen:function(){return dataContainers.account.loadData()},submit:function(e){if(!dataModel.payment_card_valid())return dataModel.payment_error()||dataModel.payment_error("Please fill in your card data to proceed"),!1;dataModel.payment_in_progress(!0),j(),dataModel.payment_error(""),ko.postbox.publish(k.o9,[])},beforeClose:function(){if(dataModel.payment_in_progress())return!1},onClose:function(e){if(dataModel.payment_in_progress())return!1;ko.postbox.publish(k.qm,[]);for(let e in D)D[e]&&(D[e].dispose(),D[e]=null)}}),$(document).ready((function(){!function(){var e=window.location.href;if(e.includes("?fbclid")){var t=e.split("?")[0],n=e.indexOf("%23");if(-1!==n){var a=e.substring(n).split("&")[0],o=t+decodeURIComponent(a);window.history.replaceState({},"",o)}}M=$.sammy("body",(function(){this.get("#/",(function(){fragments.home.load()})),this.get("#/quote/:id",(function(){fragments.quote.load({pid:this.params.id})})),this.get("#/i/:id",(function(){fragments.invoice.load({pid:this.params.id}),window.analytics&&analytics.track("View Invoice"),dataModel.payment_settings().country(b.US)})),this.get("#/i/:id/print",(function(){fragments.invoice_print.load({invoice:{pid:this.params.id}}),window.analytics&&analytics.track("Print Invoice")})),this.get("#/i/:id/p/:sid",(function(){fragments.invoice_receipt.load({invoice:{pid:this.params.id},payment:{pid:this.params.id,sid:this.params.sid}})})),this.get("#/q/:cmd/:id",(function(){var e=this.params.cmd;this.params.id,window.analytics&&analytics.track("View Survey");var t=function(){dataModel.questionnaire(),fragments.survey.load({afterLoad:function(){if("ap"===e){var t=dataModel.survey();t.preview=!0,dataModel.questionnaire(t)}}})};"s"===e?dataContainers.questionnaire.loadData({args:{pid:this.params.id},onLoad:t}):"aq"!==e&&"ap"!==e||dataContainers.questionnaire.loadData({args:{pid:this.params.id},onLoad:t})})),this.get("#/contract/:id",(function(){fragments.contract.load({pid:this.params.id})})),this.get("#/scheduling/:id/booking/:booking",(function(){var e=this.params.id;dataContainers.booking.loadData({args:{pid:this.params.booking}}).then((function(){fragments.scheduling.load({pid:e,afterLoad:function(){var e=dataModel.schedule(),t=dataModel.schedule().services,n=dataModel.booking().scheduled_service_id,a=_.find(t,(function(e){return e.id==n}));e.services=[a],dataModel.schedule(e),dataModel.selected_service(a)}})})),dataModel.schedule_booking(this.params.booking)})),this.get("#/booking/:id",(function(){fragments.booking.load({pid:this.params.id}),dataModel.schedule_booking(this.params.id)})),this.get("#/scheduling/:id/s/:service/:project",(function(){fragments.scheduling.load({pid:this.params.id}),dataContainers.job_for_booking.loadData(this.params.project),dataModel.schedule_project=ko.observable(this.params.project),dataModel.schedule_service=this.params.service})),this.get("#/scheduling/:id/:project",(function(){fragments.scheduling.load({pid:this.params.id}),dataContainers.job_for_booking.loadData(this.params.project),dataModel.schedule_project=ko.observable(this.params.project)})),this.get("#/scheduling/:id/s/:service",(function(){fragments.scheduling.load({pid:this.params.id}),dataModel.schedule_service=this.params.service})),this.get("#/scheduling/:id",(function(){-1==location.href.indexOf("embed=true")?fragments.scheduling.load({pid:this.params.id}):fragments.scheduling_embed.load({pid:this.params.id,afterLoad:function(){-1==location.href.indexOf("tp=true")&&$("body").css("background-color","white"),location.href.indexOf("tp=true")>0&&$("<style/>",{text:".embedColor { color: "+P("fg")+" !important;}"}).appendTo("head")}})})),this.get("#/lcf/:id",(function(e){fragments.lead_form.load({pid:this.params.id}),window.analytics&&analytics.track("View Lead Capture Form")})),this.get("#/embed/:id",(function(e){fragments.lead_form_embed.load({pid:this.params.id}),window.analytics&&analytics.track("View Lead Capture Form")})),this.bind("run",(function(e,t){}))})),$((function(){dataContainers.account.loadData().then((function(){M.run("#/")})).catch((function(e){$("#wrapper").hide(),$(".no_content").show()}))}))}(),ko.options.foreachHidesDestroyed=!0,ko.applyBindings(dataModel);var e=window.location.hash.split("?")[1];e&&(e.split("&").reduce((function(e,t){var n=t.split("=");return e[n[0]]=n[1],e}),{}).embed&&$(document.body).addClass("embedded"));window.analytics&&dataModel.account.subscribe((function(e){e&&(analytics.identify(e.id,{name:e.name}),E())}))})),jQuery.extend({postSS:function(e,t,n,a){return z(e,t,n,"POST",a)},put:function(e,t,n,a,o){return z(e,t,n,"PUT",o)},delete_:function(e,t,n,a,o){return z(e,t,n,"DELETE",o)}});var P=function(e){var t,n,a=decodeURIComponent(window.location.hash.split("?")[1]).split("&");for(n=0;n<a.length;n++)if((t=a[n].split("="))[0]===e)return void 0===t[1]||t[1]}},"./src/client_pages/index.js":(e,t,n)=>{"use strict";var a=n("./src/app/utils/environment.js"),o=n("./node_modules/underscore/modules/index-all.js");function i(e){for(let[t,n]of Object.entries(e))window[t]=n}window._=o.Ay,(0,a.Cu)()&&(window.SS_VERSION=function(){return""});const s=n("./node_modules/moment-timezone/index.js");window.moment=s,(0,a.Cu)()?n("./node_modules/script-loader/index.js!./vendor/jquery/jquery-3.6.0.js"):n("./node_modules/script-loader/index.js!./vendor/jquery/jquery-3.6.0.min.js"),n("./src/app/app.js"),n("./src/app/app/breakpoints.js"),n("./node_modules/script-loader/index.js!./vendor/jquery/jquery-ui.min.js"),n("./node_modules/script-loader/index.js!./vendor/jquery/jquery.singleclick.js"),n("./node_modules/script-loader/index.js!./vendor/jquery/jquery.cookie.js"),n("./node_modules/script-loader/index.js!./src/app/custom_parsley_methods.js"),n("./node_modules/script-loader/index.js!./vendor/parsley.min.js"),n("./node_modules/script-loader/index.js!./vendor/sammy.js"),n("./node_modules/script-loader/index.js!./vendor/knockout/knockout-3.5.1.js"),n("./node_modules/script-loader/index.js!./vendor/knockout/knockout-mapping.js"),n("./node_modules/script-loader/index.js!./vendor/scrollto/jquery.localscroll-1.2.7-min.js"),n("./node_modules/script-loader/index.js!./vendor/scrollto/jquery.scrollTo-min.js"),n("./node_modules/script-loader/index.js!./vendor/iframeResizer.contentWindow.min.js"),n("./node_modules/script-loader/index.js!./src/app/app/util.js"),n("./node_modules/script-loader/index.js!./vendor/accounting.js"),n("./node_modules/script-loader/index.js!./vendor/date.js"),n("./node_modules/script-loader/index.js!./src/app/utils/QuestionnaireHelper.js"),n("./node_modules/script-loader/index.js!./vendor/datepicker/bootstrap-datepicker.js"),n("./node_modules/script-loader/index.js!./node_modules/plupload/js/moxie.min.js"),n("./node_modules/script-loader/index.js!./node_modules/plupload/js/plupload.full.min.js"),n("./node_modules/script-loader/index.js!./vendor/knockout/knockout-postbox.js"),ko.postbox.serializer=function(e){return e},i(n("./src/app/uimagic/index.js")),i(n("./src/client_pages/modules/invoice.js")),i(n("./src/client_pages/modules/quote.js")),i(n("./src/client_pages/modules/contract.js")),i(n("./src/client_pages/modules/form.js")),i(n("./src/client_pages/modules/lead_form.js")),i(n("./src/client_pages/modules/schedule.js")),n("./src/client_pages/fragments.js"),n("./src/client_pages/executeScripts.js"),n("./src/client_pages/components/payment-widget/index.js"),n("./src/components/index.js")},"./src/client_pages/modules/contract.js":(e,t,n)=>{"use strict";function a(){return{id:0,public_id:"",name:ko.observable(),display_name:ko.observable(),client_signed:ko.observable(),content:ko.observable(),tokenized:ko.observable(),signed_at:ko.observable(),due_at:ko.observable(Date.parse("t").add({days:7}).toString("yyyy-MM-dd")),signatures:ko.observableArray(),created_at:void 0,updated_at:void 0,user_sign_type:ko.observable(),status:ko.observable()}}function o(e){e.acceptContract=function(t){var n=t.signature;$("#contract").parsley().validate()&&(n&&n.length>2?t.name.toLowerCase().trim()!=n.toLowerCase().trim()?ConfirmDialog.open({text:"Your signature does not match your name. If this was intentional click 'OK'.",title:"Signature Mismatch",icon:"icon-warning",submitBtnText:"OK"}).done((function(){e.processContract(t)})):e.processContract(t):alert_dialog("Please enter a valid signature. Thank you!"))},e.processContract=function(e){$("#acceptContract").prop("disabled",!0);var t=ko.mapping.toJS(e);return t.form_tokens={},$(".contract_input").each((function(){"checkbox"!=$(this)[0].type?$(this).data("id")&&$(this).val()?(t.form_tokens[$(this).data("id")]=t.form_tokens[$(this).data("id")]||[],t.form_tokens[$(this).data("id")].push($(this).val())):t.form_tokens[$(this).attr("id")]=$(this).val():$(this).is(":checked")&&(t.form_tokens[$(this).attr("id")]="X")})),$.put(SuiteSetup.route_config.perl+"/client_contract/"+dataModel.contract().public_id+"/sign",t,(function(){dataContainers.contract.loadData(dataModel.contract().public_id).then((function(){$("#contract_view").show()})),dataModel.quote()&&dataModel.quote().invoice_yn()&&dataModel.contract().id==dataModel.quote().contract&&dataContainers.invoice.loadData(dataModel.quote().invoice_public_id)}))}}function i(e){dataModel.contract(a()),dataModel.contract().id=e.id,dataModel.contract().public_id=e.public_id,dataModel.contract().name(e.name),dataModel.contract().display_name(e.display_name),dataModel.contract().content(e.content),dataModel.contract().tokenized(e.tokenized),dataModel.contract().user_sign_type(e.user_sign_type),dataModel.contract().signed_at(e.signed_at),dataModel.contract().client_signed(e.client_signed),dataModel.contract().status(e.status),dataModel.contract().created_at=e.created_at,dataModel.contract().updated_at=e.updated_at;var t=e.signatures.map((function(e){return e.signed_yn=ko.observable(e.signed_yn),e.signed_at=ko.observable(e.signed_at),e}));dataModel.contract().signatures(t)}n.r(t),n.d(t,{_parseContractData:()=>i,blankContract:()=>a,contractMethods:()=>o})},"./src/client_pages/modules/form.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{surveyMethods:()=>o});var a=n("./node_modules/underscore/modules/index-all.js");function o(e){function t(){var e=dataModel.questionnaire();"final"==e.saving_type?(window.analytics&&analytics.track("Survey Answered"),e.answered_at=new Date,dataContainers.questionnaire.loadData(dataModel.questionnaire().public_id).then((function(){alert_dialog({message:" ",title:"Sent successfully!"})}))):(window.analytics&&analytics.track("Survey Saved as Draft"),e.saved_draft=!0,dataContainers.questionnaire.loadData(dataModel.questionnaire().public_id).then((function(){alert_dialog({message:"Your answers are safe and sound. Whenever you’re ready to finish this document,                 just click the original link you received in your email.",title:"Saved successfully!"})})))}e.showButtons=!0,e.setupFileUploader=function(){dataModel.file_uploaders=new Object;var e=new Array;_.map(dataModel.questionnaire().questions(),(function(t){if("file"==t.type){dataModel.file_uploaders.length;let n=t.id;e[e.length]=new Promise(((e,a)=>{dataModel.file_uploaders[t.id]=new Object,dataModel.file_uploaders[t.id].required=t.required,dataModel.file_uploaders[t.id].resolve=e,dataModel.file_uploaders[t.id].reject=a,dataModel.file_uploaders[t.id].uploader=new plupload.Uploader({runtimes:"html5,html4",browse_button:"q"+t.id,url:"/perl/client_questionnaire/"+dataModel.questionnaire().public_id+"/file/"+t.id,multi_selection:!1,filters:{mime_types:[{title:"Files",extensions:"jpeg,jpg,png,pdf,doc,docx,ppt,pptx,xls,xlsx,csv,txt,mov,m4a,mp4,qt"}],max_file_size:"10mb"},init:{PostInit:function(){},Browse:function(){$("#file_too_large_message_"+n).hide()},FilesAdded:function(e,n){$("#file_upload_container_"+t.id).hide(),$("#file_"+t.id).text(n[0].name),$("#file_remove_"+t.id).show(),t.answer=n[0].name,plupload.each(n,(function(e){var t=new window.FileReader;t.readAsDataURL(e.getNative()),t.onload=function(){var n=t.result;n=n.substring(n.indexOf(",")+1);var a="data:"+e.type+";base64,"+n;dataModel.file_link=a}}))},FilesRemoved:function(e,n){$("#file_upload_container_"+t.id).show(),$("#file_"+t.id).text(""),$("#file_remove_"+t.id).hide()},Error:function(e,t){$("#file_too_large_message_"+n).show()},UploadProgress:function(e,t){},FileUploaded:function(e,t,n){},UploadComplete:function(t,n){e(1)}}}),dataModel.file_uploaders[t.id].uploader.init()})),t.answers.length&&($("#file_upload_container_"+t.id).hide(),$("#file_remove_"+t.id).show())}})),e.length&&Promise.all(e).then((function(){"final"==dataModel.questionnaire().saving_type?$.postSS("/perl/client_questionnaire/"+dataModel.questionnaire().public_id+"/complete",{}).done((function(e){t()})):t()}))},e.removeFile=function(e){e=e.replace("file_remove_",""),dataModel.file_uploaders[e].uploader.splice(0,1);var t=_.find(dataModel.questionnaire().questions(),(function(t){return t.id==e}));t&&t.answer&&(t.answer=void 0)},e.saveQuestionnaire=function(e){var n=e?$("#btn_save"):$("#btn_submit"),o=e?"Saving...":"Sending...",i=dataModel.brand_customization().questionnaire?dataModel.brand_customization().questionnaire.title.toLowerCase():"questionnaire",s=$("#questionnaire").parsley().validate();if((0,a.kH)(ko.toJS(dataModel.questionnaire().questions()),(function(e){"file"!=e.type||!e.required||e.answer&&e.answer.length||e.hide_yn||(s=!1)})),e||s){n.html(o),n.attr("disabled",!0);var c={},r=ko.toJS(dataModel.questionnaire().questions()),d=SuiteSetup.route_config.perl+"/client_questionnaire/"+dataModel.questionnaire().public_id;c.questions=r.map((function(e){return e.options&&e.options.__ko_mapping__&&(e.options.__ko_mapping__=void 0),e.hide_yn&&("multi"==e.type?(0,a.kH)(e.options,(function(e){e.answer=!1})):e.maps_to&&"notes"!=e.maps_to&&!e.maps_to.match(/^custom\.(contact|job)\.(\d*)/)||(e.answer="")),e})),e&&(c.draft=!0);var l=function(e,a){return $.postSS(e,a).done((function(e){var n=dataModel.questionnaire();a.draft?n.saving_type="draft":n.saving_type="final";var o=!(!dataModel.file_uploaders||!Object.values(dataModel.file_uploaders).length);_.map(Object.values(dataModel.file_uploaders),(function(e){e.uploader.files.length?e.uploader.start():e.resolve(1)})),o||t()})).fail((function(e){dataContainers.questionnaire.loadData(dataModel.questionnaire().public_id).then((function(){alert_dialog("Unfortunately this "+i+" changed while you were answering. That means we cannot save your questions and you will have to start over."),n.html("Save Answers"),n.attr("disabled",!1)}))}))};if(c.draft||!window.questionnaireIsEmpty(r))return l(d,c);alert_dialog({message:"The "+i+" hasn't been answered. Are you sure you want to submit?",onClose:function(){return l(d,c)},onCancel:function(){dataModel.brand_customization().questionnaire.save_and_send.length?n.html(dataModel.brand_customization().questionnaire.save_and_send):n.html("Submit"),n.attr("disabled",!1)}})}else s?n.attr("disabled",!1):alert_dialog({message:"Please review your answers. One or more required questions still has to be answered. Thanks!"})},e.displayBranches=function(t){(0,a.kH)(t.options,(function(n){n.show_questions&&n.show_questions.length&&(0,a.kH)(n.show_questions,(function(o){var i=(0,a.I6)(dataModel.questionnaire().questions(),(function(e){return e.id==o}));n.option.toLowerCase()==t.answer().toLowerCase()&&!t.hide_yn()||"multi"==t.type&&n.answer()&&!t.hide_yn()?(i.hide_yn(!1),"image"==i.type&&i.answer("1")):(i.hide_yn(!0),i.maps_to&&"notes"!=i.maps_to&&i.answer(i.answer())),"contact"!=i.type&&e.displayBranches(i)}))}))}}},"./src/client_pages/modules/invoice.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{invoiceMethods:()=>c,invoiceSetup:()=>s});var a=n("./src/app/uimagic/index.js"),o=n("./node_modules/underscore/modules/index-all.js"),i=n("./src/app/utils/general.js");function s(){}function c(e){e.invoice_subtotal=ko.computed((function(){var t=0;return e.invoice()&&e.invoice().products().map((function(e){e.attachments&&e.attachments.length&&(e.image=(0,o.HV)(e.attachments).asset.uri),t+=proper_round(e.amount*parseFloat(e.quantity),2)})),t})),e.invoice_tax_total=ko.computed((function(){if(e.invoice()){var t=0,n=1;e.invoice_discount_total()&&e.invoice_subtotal()&&(n=(e.invoice_subtotal()-e.invoice_discount_total())/e.invoice_subtotal());var a=e.invoice().total_tax?e.invoice().total_tax.value:0;return e.invoice().taxsettings().map((function(e){e.amount(0)})),$.each(e.invoice().products(),(function(a,o){if(o.taxable_yn){var i=o.amount*parseFloat(o.quantity),s=0;$.each(o.selected_taxes,(function(t,a){var o=_.find(e.invoice().taxsettings(),(function(e){return e.tax_setting==a}));if(o){var c,r=proper_round(i*(o.rate/100)*n,2);s+=1*r,c=parseFloat(o.amount())+parseFloat(r),o.amount(c)}})),t+=1*proper_round(s,2)}})),$.each(e.invoice().products(),(function(t,n){n.taxable_yn&&$.each(n.selected_taxes,(function(t,n){var o=_.find(e.invoice().taxsettings(),(function(e){return e.tax_setting==n}));o&&o.amount(Math.min(o.amount(),a))}))})),Math.min(t,a)}return 0})),e.invoice_discount_total=ko.computed((function(){if(e.invoice()){if("fixed"==e.invoice().discount_type())return utils.unformatCurrency(e.invoice().discount_amount());e.invoice().discount_amount()>100&&e.invoice().discount_amount(100);var t=e.invoice_subtotal();return proper_round(t*(utils.unformatCurrency(e.invoice().discount_amount())/100),2)}return 0})),e.invoice_total=ko.computed((function(){return proper_round(e.invoice_subtotal()-e.invoice_discount_total()+e.invoice_tax_total(),2)})),e.cancelAutomaticPayments=function(){return a.ConfirmDialog.open({text:"\n        This will stop automatic payments to the future invoices from this series, and you will need to pay them manually.\n      ",title:"Are You Sure?",showConfirmCheck:!1,submitBtnText:"No! Go Back.",cancelBtnText:"Yes"}).done((()=>{})).fail((()=>{$.postSS(`${SuiteSetup.route_config.perl}/client/invoice/${dataModel.invoice().public_id}/manage_recurrence`,{charge_automatically_yn:0,payment_method_id:null}).done((()=>{dataContainers.invoice.loadData(dataModel.invoice().public_id)}))})),!1},e.accountInactive=ko.pureComputed((()=>{const t=e.accountinfo(),n=t.account.status,a=t.account.subscription.end_date;return"cancelled"==n&&Date.parse(a).isBefore(Date.parse("t"))||"suspended"==n})),e.payInvoice=function(){if(e.accountInactive())return alert_dialog("This user's account is no longer active. Please contact the user directly to arrange payment."),!1;{let e="Pay Invoice",t="Pay";dataModel.brand_customization()&&dataModel.brand_customization().invoice&&(e="Pay "+dataModel.brand_customization().invoice.title||0,t=dataModel.brand_customization().invoice.pay||t),e=(0,i.Zn)(e),dialogs.invoice_payment.open({title:e,submitBtnText:t})}},e.paymentSettings=function(){dialogs.card_setup.open({title:"Payment Settings",submitBtnText:"Save"})},e.getPaymentMethod=function(e){return{1:"Check",2:"Cash",3:"Credit card",4:"Bank transfer",5:"Gift card",6:"Deposit",creditcard:"Credit card",card:"Credit card",paypal:"PayPal",ach:"E-check",ach_debit:"E-check",fundy:"Fundy",proselect:"ProSelect",shootproof:"ShootProof",square:"Square"}[e]||"Unknown"}}},"./src/client_pages/modules/lead_form.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{LeadFormMethods:()=>a});var a=function(){var e={},t=!1;if(!window.grecaptcha){var n=document.createElement("script");n.setAttribute("src","https://www.google.com/recaptcha/api.js?render=6Lff6_wUAAAAAGTrQMf5kCRAK9spEggJvShAUYh7"),document.head.appendChild(n)}var a=function(e,n){if(e.parsley().validate()&&!t){t=!0,e.find(".submit_form > button").attr("disabled","disabled");var a={answers:ko.toJS(n.questions).map((function(e){var t;return t="multi"==e.type?e.answers.join(", "):"date"===e.type&&""!==e.answer?{orig:e.answer,formatted:new Date(e.answer).toString("yyyy-MM-ddT00:00:00")}:e.answers.length?e.answers:e.answer,void 0===e.answer&&(t=""),{question:e.id,answer:t}}))};n.lead_funnel_form_id&&(a.lead_funnel_form_id=n.lead_funnel_form_id),grecaptcha.execute("6Lff6_wUAAAAAGTrQMf5kCRAK9spEggJvShAUYh7",{action:"lcf/send"}).then((function(i){var r,d,l;a.recaptcha_response=i,r=n,d=a,l=e,$.postSS(SuiteSetup.route_config.perl+"/client/lead-capture-form/"+dataModel.leadForm().public_id,d).done((function(e){switch(window.analytics&&analytics.track("Lead Capture Form submitted"),r.after_submit){case"display_message":s(r.after_submit_value),o(l);break;case"custom_page":window.top.location.href=c(r.after_submit_value);break;default:o(l)}l.find(".submit_form > button").removeAttr("disabled"),t=!1})).fail((function(e){l.find(".submit_form > button").removeAttr("disabled"),t=!1,"404"==e.status?alert_dialog("This form is no longer active, it has been disabled by the owner."):alert_dialog("Unfortunately there was a problem saving your information. Please try resubmitting in a little bit.")}))}))}},o=function(e){e.find("input:text, input:password, input:file, select, textarea").val(""),e.find("input:radio, input:checkbox").removeAttr("checked").removeAttr("selected")},i=function(){$("#lc_submit_msg").hide(),$("#lead_form").show()},s=function(e){$("#lc_submit_msg .msg").html(e),$("#lc_submit_msg").show(),$("#lead_form").hide()},c=function(e){return-1==e.search(/^http[s]?\:\/\//)&&(e="http://"+e),e};return e.init=function(e){e.saveLeadForm=a,e.resetLeadForm=o,e.showLeadForm=i},e}()},"./src/client_pages/modules/quote.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{_normalizeDueWhenTrigger:()=>h,_parseProduct:()=>l,_parseQuoteData:()=>u,_processQuote:()=>p,acceptQuote:()=>m,blankQuote:()=>d,installmentText:()=>b,quoteShow:()=>g});var a=n("./node_modules/underscore/modules/index-all.js"),o=n("./src/client_pages/modules/contract.js");function i(){function e(e){if(e.taxable_yn){var a=e.amount*parseFloat(e.quantity()),o=0;e.selected_taxes.map((function(e){var t=_.find(dataModel.quote().taxsettings(),(function(t){return t.tax_setting==e}));t&&(e=proper_round(a*(t.rate/100)*n,2),o+=1*e,t.amount(parseFloat(t.amount())+parseFloat(e)))})),e.tax=o,t+=1*proper_round(o,2)}}if(dataModel.quote()){var t=0,n=1;return s()&&r()&&(n=(r()-s())/r()),dataModel.quote().taxsettings().map((function(e){e.amount(0)})),dataModel.quote().standard_items().map(e),dataModel.quote().choose_any_items().map((function(t){var n=ko.mapping.toJS(t);(!dataModel.quote().accepted_at&&n.select_by_default_yn||n.selected_by_client)&&e(t)})),dataModel.quote().choose_one_items().map((function(t){t.id==dataModel.quote().choose_one_selected_by_client()&&e(t)})),t}return 0}function s(){if(dataModel.quote()){if("fixed"==dataModel.quote().discount_type())return utils.unformatCurrency(dataModel.quote().discount_amount());dataModel.quote().discount_amount()>100&&dataModel.quote().discount_amount(100);var e=dataModel.quote().subtotal();return proper_round(e*(utils.unformatCurrency(dataModel.quote().discount_amount())/100),2)}return 0}function c(){let e=dataModel.quote();return proper_round(e.subtotal()-e.discount_total()+e.tax_total(),2)}function r(){var e=0;return dataModel.quote()&&(dataModel.quote().standard_items().map((function(t){t=ko.mapping.toJS(t),e+=t.amount*parseFloat(t.quantity)})),dataModel.quote().choose_any_items().map((function(t){t=ko.mapping.toJS(t),(!dataModel.quote().accepted_at&&t.select_by_default_yn||t.selected_by_client)&&(e+=t.amount*parseFloat(t.quantity||t.min_quantity))})),dataModel.quote().choose_one_items().map((function(t){t.id==dataModel.quote().choose_one_selected_by_client()&&(e+=1*t.amount)}))),e}function d(){return{id:0,public_id:"",name:"",display_name:"",valid_until:ko.observable(""),accepted_at:ko.observable(),accepted_by:ko.observable(),contract_yn:ko.observable(!1),invoice_yn:ko.observable(!1),survey_yn:ko.observable(!1),discount_type:ko.observable("percentage"),discount_amount:ko.observable(0),choose_one_selected_by_client:ko.observable(0),payment_schedule_yn:ko.observable(!1),standard_items:ko.observableArray([]),choose_one_items:ko.observableArray([]),choose_any_items:ko.observableArray([]),invoice:void 0,contract:void 0,invoice_settings:{allow_online_payment_yn:ko.observable(!0),allow_tips_yn:ko.observable(dataModel.allow_tips_yn()),message:ko.observable(""),po:ko.observable("")},installments:ko.observableArray([{due_when_trigger:ko.observable("sign_after"),due_when_amount:7,due_when_period:"days",amount:"100",type:"percentage"}]),taxsettings:ko.observableArray(),total:ko.pureComputed(c),discount_total:ko.pureComputed(s),subtotal:ko.pureComputed(r),tax_total:ko.pureComputed(i),installments_text:ko.computed({read:f,pure:!0,deferEvaluation:!0})}}function l(e){let t;return e.attachments&&e.attachments.length&&(t=(0,a.HV)(e.attachments).asset.uri),{id:e.id,amount:proper_round(e.amount,2),choose_quantity_yn:1==e.choose_quantity_yn,description:e.description,description_tokenized:e.description_tokenized,quantity:ko.observable(1*e.quantity),max_quantity:1*e.max_quantity,min_quantity:1*e.min_quantity,product:e.product||void 0,name:e.name,attachments:e.attachments,display_name_tokenized:e.display_name_tokenized,display_name:e.display_name,taxable_yn:1==e.taxable_yn,select_by_default_yn:1==e.select_by_default_yn,selected_by_client:ko.observable(1==e.selected_by_client),selected_taxes:e.selected_taxes,image:t}}function u(e){var t=d();if(t.id=e.id,t.display_name=e.display_name,t.public_id=e.public_id,t.discount_type(e.discount_type),t.discount_amount(e.discount_amount),e.template_yn&&e.valid_until_when){var n=e.valid_until_when.split("-"),a={};a[n[0]]=parseInt(n[1]);var i=Date.parse("t").add(a).toString("yyyy-MM-dd");t.valid_until(i)}else t.valid_until(e.valid_until);if(t.sent_at=e.sent_at,t.accepted_at(e.accepted_at),t.accepted_by(e.accepted_by),t.created_at=e.created_at,t.status=e.status,t.invoice=e.invoice,t.invoice_public_id=e.invoice_public_id,t.contract=e.contract,t.contract_public_id=e.contract_public_id,t.valid_until_when=e.valid_until_when,t.client=e.client,t.client_address=e.client_address,t.check_address=e.check_address,e.taxsettings.map((function(e){e.amount=ko.observable(0)})),t.taxsettings=ko.observableArray(e.taxsettings),e.installments&&e.installments.length&&(t.payment_schedule_yn(!0),t.installments([]),e.installments.map((function(e){var n=e.due_when.split("-");t.installments.push({due_date:e.due_date,due_when_trigger:ko.observable(n[0]),due_when_period:n[2],due_when_amount:utils.unformatCurrency(n[1]),amount:proper_round(e.amount,2),type:e.type})})),t.number_of_installments=e.installments.length),t.invoice_yn(e.invoice_yn),e.installment_config&&!_.isEmpty(e.installment_config)?t.installment_config=ko.observable(e.installment_config):t.installment_config=ko.observable({start_date:new Date,equal_start_date:new Date,equal_start_period:"days",equal_start_interval:0,due_date:new Date,installment_type:e.installments.length?"custom":"",installment_message_yn:!1,installment_message:"",due_interval:1,due_period:"months",number_of_equal_installments:12}),e.invoice_yn&&(t.invoice_settings=ko.mapping.fromJS(e.invoice_settings)),t.contract_yn(e.contract_yn),e.contract_yn){dataModel.contract((0,o.blankContract)()),dataModel.contract().id=e.contract,dataModel.contract().public_id=e.contract_public_id,dataModel.contract().name(e.contract_settings.name),dataModel.contract().display_name(e.contract_settings.display_name),dataModel.contract().client_signed(e.contract_settings.client_signed),dataModel.contract().content(e.contract_settings.content),dataModel.contract().tokenized(e.contract_settings.tokenized),dataModel.contract().signed_at(e.contract_settings.signed_at),dataModel.contract().status(e.contract_settings.status);var s=e.contract_settings.signatures.map((function(e){return e.signed_yn=ko.observable(e.signed_yn),e.signed_at=ko.observable(e.signed_at),e}));dataModel.contract().signatures(s),dataModel.contract().signatures().length||dataModel.contract().signatures.push({id:t.client.id,name:t.client.name,signed_yn:ko.observable(!1),signed_at:ko.observable()})}return e.accepted_at&&e.choose_one_items.length&&e.choose_one_items.map((function(e){1==e.selected_by_client&&t.choose_one_selected_by_client(e.id)})),e.invoice_yn&&e.accepted_at&&(!e.contract_yn||dataModel.contract().client_signed())&&dataContainers.invoice.loadData(e.invoice_public_id),e.standard_items=e.standard_items.map(l),e.choose_any_items=e.choose_any_items.map(l),e.choose_one_items=e.choose_one_items.map(l),t.accepted_at()||e.choose_any_items.map((function(e){e.selected_by_client(e.select_by_default_yn)})),t.standard_items(e.standard_items),t.choose_any_items(e.choose_any_items),t.choose_one_items(e.choose_one_items),t}function m(){var e=dataModel.quote().accepted_by()||"";dataModel.quote().contract_yn()?p():e.length>2?e.toLowerCase()!=dataModel.quote().client.name.toLowerCase()?ConfirmDialog.open({text:"Your signature does not match your name. If this was intentional click 'OK'.",title:"Signature Mismatch",icon:"icon-warning",submitBtnText:"OK"}).done((function(){setTimeout(p,0)})):p():alert_dialog("Please enter a valid signature. Thank you!")}function p(){$("#acceptQuote").prop("disabled",!0);var e={choose_any_items:[]};if(dataModel.quote().choose_one_items().length){if(!dataModel.quote().choose_one_selected_by_client())return $dialog&&$dialog.remove(),alert_dialog("Please select a package"),$("#acceptQuote").prop("disabled",!1),!1;e.choose_one_selected_by_client=dataModel.quote().choose_one_selected_by_client()}if(dataModel.quote().choose_any_items().length){var t=!1,n=!1;if(dataModel.quote().choose_any_items().map((function(a){if(a.selected_by_client()){n=!0;var o=1*a.quantity();if(a.choose_quantity_yn&&!(o>=a.min_quantity&&o<=a.max_quantity)){let e=a.display_name&&a.display_name.length?a.display_name:a.name;return alert_dialog("The quantity for '"+e+"' should be between "+a.min_quantity+" and "+a.max_quantity+"."),t=!0,$("#acceptQuote").prop("disabled",!1),!1}e.choose_any_items.push({id:a.id,quantity:a.quantity()||a.min_quantity})}})),!n&&!dataModel.quote().choose_one_items().length&&!dataModel.quote().standard_items().length)return alert_dialog("Please select a package"),$("#acceptQuote").prop("disabled",!1),!1}return dataModel.quote().accepted_by()&&(e.accepted_by=dataModel.quote().accepted_by()),!t&&$.put(SuiteSetup.route_config.perl+"/client_quote/"+dataModel.quote().public_id,e,(function(e){e.success?(dataModel.quote().accepted_at(Date.parse("t").toString("yyyy-MM-dd")),dataModel.quote().contract_yn()&&dataContainers.contract.loadData(dataModel.quote().contract_public_id),dataModel.quote().invoice_yn()&&dataContainers.invoice.loadData(dataModel.quote().invoice_public_id)):$("#acceptQuote").prop("disabled",!1)}))}function f(){var e=[],t=dataModel.quote();if(!t)return e;var n=t.installments();if(n.length&&"equal"==t.installment_config().installment_type)return e.push(b(n[0],0)),e;var a=n.length>1,o=0;for(var i in n){var s=b(n[i],o);o++,a&&(s+="."),e.push(s)}return e}function b(e,t){e=ko.toJS(e);var n="",a=dataModel.quote().installment_config();if(e&&e.due_when_trigger&&"custom"===a.installment_type){var o=e.amount;o=t+1<ko.toJS(dataModel.quote().installments()).length?"percentage"==e.type?utils.formatNumber(o).toString()+"%":accounting.formatMoney(o):"Remainder";var i=h(e.due_when_trigger),s=dataModel.installment_due_when_trigger_types(),c=e.due_when_period,r=e.due_when_amount,d=dataModel.template_yn?"invoice due date":dataModel.parseDate(a.due_date,"MMM dS, yyyy"),l=dataModel.parseDate(e.due_date,"MMM dS, yyyy");i.match("on")||i.match("custom")||("1"==r&&c&&(c=c.replace("s","")),n+=r+" "+c+" "),n=o+" "+(n=(n=(n=(n+=_.find(s,(e=>e.id===i)).label.toLowerCase()).replace("due date",d)).replace("project date","project start date")).replace("custom date",l))}else{var u=a.number_of_equal_installments,m=(a.start_date,a.equal_start_date),p=dataModel.template_yn?"invoice start date (if set) or invoice creation date.":dataModel.parseDate(m,"MMM dS, yyyy"),f=a.due_period,b=a.due_interval;"1"==b&&f&&(f=f.replace("s",""),b=""),n+=u+" equal payments repeating every "+b+" "+f+" after "+p}return n}function h(e){switch(e){case"sign_on":return"sign:on";case"sign_after":return"sign:after";case"project_before":return"due:before";case"project_on":return"due:on";case"project_after":return"due:after";default:return e}}function g(e){dataModel.active_quote_view(e),$(window).scrollTop(0)}},"./src/client_pages/modules/schedule.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{scheduleMethods:()=>c});var a=n("./node_modules/moment-timezone/index.js"),o=n.n(a),i=n("./node_modules/underscore/modules/index-all.js"),s=n("./src/client_pages/components/payment-widget/constants.js");function c(e){var t={"Pacific/Honolulu":"Hawaii Time","America/Anchorage":"Alaska Time","America/Los_Angeles":"U.S. Pacific Time","America/Denver":"U.S. Mountain Time","America/Phoenix":"U.S. Mountain Time (Phoenix)","America/Chicago":"U.S. Central Time","America/Winnipeg":"U.S. Central Time (Winnipeg)","America/New_York":"U.S. Eastern Time","America/Cayman":"U.S. Eastern Time (Cayman Islands)","America/St_Johns":"Newfoundland Time","America/Puerto_Rico":"Atlantic Standard Time (Puerto Rico)","America/Argentina/Buenos_Aires":"Argentina Time","Africa/Casablanca":"Western European Time (Casablanca)","Europe/Dublin":"Western European Time (Dublin)","Africa/Lusaka":"Central Africa Time","Europe/London":"British Time","Europe/Amsterdam":"Central European Time (Amsterdam)","Europe/Berlin":"Central European Time (Berlin)","Europe/Moscow":"Moscow Time","Europe/Stockholm":"Central European Time (Stockholm)","Asia/Dubai":"Gulf Time","Asia/Tehran":"Iran Time","Asia/Tashkent":"Uzbekistan Time","Asia/Kolkata":"Indian Time","Asia/Kathmandu":"Nepal Time","Asia/Dhaka":"Bangladesh Time","Asia/Jakarta":"Western Indonesian Time","Asia/Hong_Kong":"China Time","Asia/Tokyo":"Japan Standard Time","Australia/Perth":"Australian Western Time","Australia/Adelaide":"Australian Central Time","Australia/Darwin":"Australian Central Standard Time","Australia/Brisbane":"Australian Eastern Standard Time (Brisbane)","Australia/Melbourne":"Australian Eastern Time (Melbourne)","Australia/Sydney":"Australian Eastern Time (Sydney)","Pacific/Auckland":"New Zealand Time","America/Halifax":"Canada Atlantic Standard Time","America/Moncton":"Canada Atlantic Standard Time","America/Regina":"Canada Central Standard Time"};e.daysLoading=!1,e.slotsLoading=!1,e.updateDateForAvailableSlots=function(t){if(dataModel.schedule()&&dataModel.selected_service())if($("#datepicker").datepicker("getDate")&&"Invalid Date"!=$("#datepicker").datepicker("getDate")){var n=$.datepicker.formatDate("yy-mm-dd",$("#datepicker").datepicker("getDate"));dataModel.selected_date(n),$("#calendarLoadingSpinner").show(),e.slotsLoading=!0,dataContainers.available_slots.loadData({args:{pid:dataModel.schedule().public_id,sid:dataModel.selected_service().id,postData:{from:dataModel.convertToUTC(n),to:dataModel.convertToUTC(o()(n).add(1,"days").format("YYYY-MM-DD")),user:dataModel.selected_user()}}}).then((function(){e.slotsLoading=!1,e.daysLoading||$("#calendarLoadingSpinner").hide()})),t&&e.setDateRange(t,!0)}else $("#datepicker").datepicker("update",o()(dataModel.selected_date()).format("MM/DD/YYYY"))},e.updateAvailableDays=function(){dataModel.schedule()&&dataModel.selected_service()&&dataModel.calendarStart&&dataModel.calendarEnd&&($("th.next").css("visibility","hidden"),$("th.prev").css("visibility","hidden"),$("#calendarLoadingSpinner").show(),e.daysLoading=!0,dataContainers.available_days.loadData({args:{pid:dataModel.schedule().public_id,sid:dataModel.selected_service().id,postData:{from:dataModel.calendarStart,to:dataModel.calendarEnd,user:dataModel.selected_user(),tz:dataModel.schedule_tz()||dataModel.accountinfo().account.contact.timezone||current_timezone}}}).then((function(){$("th.next").css("visibility","visible"),$("th.prev").css("visibility","visible"),e.daysLoading=!1,e.slotsLoading||$("#calendarLoadingSpinner").hide();var t=dataModel.selected_date();o()(t).hour(1).isBetween(o()(dataModel.calendarStart).add(1,"month").startOf("month").hour(0).minute(0),o()(dataModel.calendarStart).add(1,"month").endOf("month"))?$("#datepicker").datepicker("update",o()(t).format("MM/DD/YYYY")):$("#datepicker").datepicker("update")})))},e.selectSlot=function(e){dataModel.selected_slot(e);var t=e.time;dataModel.selected_time(dataModel.selected_date()+" "+t)},e.payBooking=function(e){return new Promise(((t,n)=>{let a,o,i;i=ko.postbox.subscribe(s.a9,(e=>(i.dispose(),a.dispose(),o.dispose(),t(e)))),a=ko.postbox.subscribe(s.$r,(e=>(i.dispose(),a.dispose(),o.dispose(),t(e)))),o=ko.postbox.subscribe(s.yO,(e=>(dataModel.payment_error(e),i.dispose(),a.dispose(),o.dispose(),n(e)))),ko.postbox.publish(s.nY,e)}))},e.answerQuestions=async function(e,t){t&&t.preventDefault&&t.preventDefault(),$("#service-questions").parsley().validate()&&dataModel.questions_answered(!0)},e.scheduleSlot=async function(t,n){if(n&&n.preventDefault&&n.preventDefault(),dataModel.checkingSlots())return;if(dataModel.checkingSlots(!0),!$("#schedule-signup-form").parsley().validate())return dataModel.checkingSlots(!1),!1;if(!dataModel.schedule()||!dataModel.selected_service())return!1;let a=dataModel.selected_date();await dataContainers.available_slots.loadData({args:{pid:dataModel.schedule().public_id,sid:dataModel.selected_service().id,postData:{from:dataModel.convertToUTC(a),to:dataModel.convertToUTC(o()(a).add(1,"days").format("YYYY-MM-DD")),user:dataModel.selected_user()}}});const s=dataModel.available_slots(),c=dataModel.selected_slot().slot;if(!(0,i.XB)(s,c))return alert_dialog({message:"The time slot you selected is no longer available.  Please select another",onClose:function(){dataModel.selected_time(void 0),dataModel.selected_slot(void 0)}}),dataModel.checkingSlots(!1),!1;let r=ko.toJS(dataModel.selected_service),d={user:dataModel.selected_user(),availability_schedule_id:dataModel.schedule().public_id,service:r.id,start:dataModel.selected_slot().slot.start,booking_info:ko.toJS(dataModel.booking_info),project_id:dataModel.schedule_project?dataModel.schedule_project():void 0};"1"==r.enable_questions_yn&&(d.answers=ko.toJS(r.questions).map((e=>{var t;return"div"==e.type?null:(t="multi"==e.type?e.answers.join(", "):"date"===e.type&&""!==e.answer?{orig:e.answer,formatted:new Date(e.answer).toString("yyyy-MM-ddT00:00:00")}:e.answers&&e.answers.length?e.answers:e.answer,void 0===e.answer&&(t=""),{question:e.id,answer:t})})));if(dataModel.booking_can_be_paid()&&dataModel.selected_service().products&&dataModel.selected_service().products.length>0&&dataModel.service_payment_amount()>0&&!(dataModel.booking()&&dataModel.booking().invoice_public_id)){dataModel.payment_in_progress(!0),dataModel.payment_status_text("Please wait..."),dataModel.payment_error(""),dataModel.payment_amount(accounting.formatMoney(dataModel.service_payment_amount()));try{await e.payBooking(d),dataModel.payment_in_progress(!1),dataModel.booked_yn(!0)}catch(n){let e,t=n;console.error("In:",n),n.responseJSON&&(t=n.responseJSON),e=t.error&&t.error.error?t.error.error:t.message?t.message:t.error?t.error:t,console.error(e),dataModel.payment_error(e)}finally{dataModel.payment_in_progress(!1),dataModel.checkingSlots(!1)}return!1}{const e=dataModel.schedule().public_id;let t;t=dataModel.schedule_booking()?await $.put(`${SuiteSetup.route_config.perl}/client/schedule/${e}/booking/${dataModel.schedule_booking()}`,d,(function(e){e.metadata&&dataModel.booking_zoom_info(JSON.parse(e.metadata))})):await $.postSS(`${SuiteSetup.route_config.perl}/client/schedule/${e}/schedule_slot`,d,(function(e){e.metadata&&dataModel.booking_zoom_info(JSON.parse(e.metadata))})),dataModel.booking(t)}dataModel.checkingSlots(!1),dataModel.booked_yn(!0)},e.scheduleNewSlot=function(){dataModel.booked_yn(!1),dataModel.questions_answered(!1),dataModel.canceled_yn(!1),dataModel.schedule_booking(void 0)&&(dataModel.schedule_booking(void 0),location.href="/p#/scheduling/"+dataModel.schedule().public_id),dataModel.selected_user(void 0),dataModel.selected_date(void 0),dataModel.selected_time(void 0),dataModel.selected_slot(void 0),dataModel.schedule().services.length>1&&dataModel.selected_service(void 0),dataModel.availableMorningSlots([]),dataModel.availableAfternoonSlots([]),dataModel.availableEveningSlots([])},e.scheduleNewSlotEmbed=function(){dataModel.booked_yn(!1),dataModel.questions_answered(!1),dataModel.schedule_booking()&&(dataModel.schedule_booking(void 0),window.history.back()),dataModel.selected_user(void 0),dataModel.selected_date(void 0),dataModel.selected_time(void 0),dataModel.selected_slot(void 0),dataModel.schedule().services.length>1&&dataModel.selected_service(void 0),dataModel.availableMorningSlots([]),dataModel.availableAfternoonSlots([]),dataModel.availableEveningSlots([])},e.reschedulingAllowedYn=function(){return!("cancelled"==dataModel.booking().status||dataModel.booking().availability_schedule.prevent_late_cancelation_yn>0&&!o()().isBefore(o()(dataModel.parseDate(dataModel.booking().calendar_event.start,"yyyy-MM-dd hh:mm")).subtract(dataModel.booking().availability_schedule.prevent_late_cancelation_time,"hours")))},e.rescheduleBooking=function(e){location.href="#/scheduling/"+dataModel.booking().availability_schedule.public_id+"/booking/"+dataModel.booking().public_id},e.cancelBooking=function(){$("#booking_status").fadeOut("slow",(function(){$("#booking_cancelation").fadeIn()}))},e.keepBooking=function(){$("#booking_cancelation").fadeOut("slow",(function(){$("#booking_status").fadeIn()}))},e.confirmCancelBooking=function(){let e=dataModel.booking().availability_schedule.public_id;$.put(SuiteSetup.route_config.perl+"/client/booking/"+dataModel.booking().public_id,{status:"cancelled",cancel_reason:$("#cancel_reason").val()},(function(t){$("#booking_cancelation").fadeOut("slow"),window.location.href="/p#/scheduling/"+e,dataModel.canceled_yn(!0),dataModel.booked_yn(!1)}))},e.checkDateAvailable=function(e){var t=Date.parse(e).toString("yyyy-MM-dd"),n=dataModel.available_days();return!!n&&!!n[t]},e.setDateRange=function(e,t){if(!e.date)return!1;var n=Date.parse(e.date).toString("yyyy-MM-dd"),a=dataModel.convertToUTC(o()(n).startOf("month").add(-14,"days").format("YYYY-MM-DD")),i=dataModel.convertToUTC(o()(n).endOf("month").add(14,"days").format("YYYY-MM-DD"));if(!t){var s=Date.parse(dataModel.schedule().rrules[0].starts_at);1==Date.compare(s,Date.parse(o()(n).startOf("month").format("YYYY-MM-DD")))?(n=s.toString("yyyy-MM-dd"),dataModel.selected_date(o()(n).format("YYYY-MM-DD"))):dataModel.selected_date(o()(n).startOf("month").format("YYYY-MM-DD"))}dataModel.schedulingDateRange({start:a,end:i})},e.readableTimezone=function(){return t[dataModel.schedule_tz()]},e.physical_yn=function(){if(dataModel.service_location().location){var e=dataModel.service_location().location;return 1!=/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/gim.test(e)}},e.web_address=function(){if(dataModel.service_location().location){var e=dataModel.service_location().location;return 1==new RegExp("^(http|https)://","i").test(e)?window.open(dataModel.service_location().location,"_blank","noopener"):window.open("http://"+dataModel.service_location().location,"_blank","noopener")}},e.checkWebaddress=function(){if(dataModel.accountinfo().account.website){var e=dataModel.accountinfo().account.website;return 1==new RegExp("^(http|https)://","i").test(e)?window.open(dataModel.accountinfo().account.website,"_blank","noopener"):window.open("http://"+dataModel.accountinfo().account.website,"_blank","noopener")}}}}},n={};function a(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,a),i.loaded=!0,i.exports}a.m=t,a.amdO={},e=[],a.O=(t,n,o,i)=>{if(!n){var s=1/0;for(l=0;l<e.length;l++){for(var[n,o,i]=e[l],c=!0,r=0;r<n.length;r++)(!1&i||s>=i)&&Object.keys(a.O).every((e=>a.O[e](n[r])))?n.splice(r--,1):(c=!1,i<s&&(s=i));if(c){e.splice(l--,1);var d=o();void 0!==d&&(t=d)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,o,i]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={75:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[s,c,r]=n,d=0;if(s.some((t=>0!==e[t]))){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(r)var l=r(a)}for(t&&t(n);d<s.length;d++)i=s[d],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return a.O(l)},n=self.webpackChunk_17hats_app=self.webpackChunk_17hats_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=a.O(void 0,[876,742,54,810,904,308,668,945,196,340,260,320],(()=>a("./src/client_pages/index.js")));o=a.O(o)})();