<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* @public_path/build/client.67a0ea33.js */
class __TwigTemplate_241d09aa85f195fbae17cfde0f2d94940e5ada1f7840466d97a50064e763c259 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@public_path/build/client.67a0ea33.js"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@public_path/build/client.67a0ea33.js"));

        yield "(self.webpackChunk=self.webpackChunk||[]).push([[47],{53829:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__(82772),__webpack_require__(26699),__webpack_require__(32023),__webpack_require__(89554),__webpack_require__(54747),__webpack_require__(32564),__webpack_require__(69826),__webpack_require__(21249),__webpack_require__(68309),__webpack_require__(73210);var \$=__webpack_require__(19755);function unsaveChanged(e){var t=null;if(t=-1!==navigator.userAgent.indexOf(\"Chrome\")?document.activeElement:e.originalTarget.activeElement,window.formChanged&&(!t||\"btn-save-client\"!=t.id&&\"save-pref-planification\"!=t.id&&!\$(t).hasClass(\"btn-success\"))){if(!window.confirm(\"Attention, si vous quitter la page, vos modifications en cours ne seront pas sauvegardées\"))return void e.preventDefault();window.formChanged=!1}var i=\$(\"#lock-id\").val();if(i){var n=new XMLHttpRequest;n.open(\"DELETE\",\"/lock/\"+i,!1),n.send()}}function toggleDateFormatForMultipleInputs(e,t){var i=document.getElementById(t),n=\$(\"#\"+t)[0].checked?\"dd MM\":\"dd/mm/yy\";e.forEach((function(e){\$(\"#\"+e).datepicker(\"option\",\"dateFormat\",n)})),i.addEventListener(\"change\",(function(){var i=\$(\"#\"+t)[0].checked?\"dd MM\":\"dd/mm/yy\";e.forEach((function(e){\$(\"#\"+e).datepicker(\"option\",\"dateFormat\",i)}))}))}function loadClient(e){window.formChanged=!1;var t=localStorage.getItem(\"scrollClient\");t>0&&(setTimeout((function(){\$(\"html, body\").animate({scrollTop:t})}),750),localStorage.setItem(\"scrollClient\",0)),\$(\".input-datepicker\").each((function(){var e=\$(this).data(\"format\"),t=\$(this).data(\"min\"),i=\$(this).data(\"max\");\$(this).datepicker({format:e,language:\"fr\",showButtonPanel:!0,minDate:t,maxDate:i,clearText:\"Effacer\",beforeShow:function(e,t){setTimeout((function(){var i=\$(t.dpDiv).find(\".ui-datepicker-buttonpane\");\$(\"<button>\",{text:\"Effacer\",click:function(){\$(e).val(\"\"),\$(e).datepicker(\"setDate\",null),\$(e).trigger(\"change\")}}).appendTo(i).addClass(\"ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all\")}),1)}})})),toggleDateFormatForMultipleInputs([\"planification_entre_debut\",\"planification_entre_fin\"],\"inclusion_recurrente\"),toggleDateFormatForMultipleInputs([\"date_apres_le\"],\"apres_recurrente\"),toggleDateFormatForMultipleInputs([\"date_avant_le\"],\"avant_recurrente\"),\$(\".input_tel:not(.not_fr)\").mask(\"00.00.00.00.00\",{translation:{0:{pattern:/[0-9]/,recursive:!1}}}),\$(\".input_tel.not_fr\").mask(\"9999999999\"),\$(\".input_numero_serie\").mask(\"SSSS SSSSSS SSSS\",{translation:{S:{pattern:/[A-Za-z0-9]/}}}),localStorage.setItem(\"activeTab\",\"\"),\$(\".form_resilier_contrat\").each((function(e){\$(this)[0].reset()})),\"2\"==\$(\"#type_client option:selected\").val()&&(\$(\"#categorie_pro\").parent().removeClass(\"hide\"),\$(\"#client_entreprise\").parent().removeClass(\"hide\"),\$(\"#equipement_tva\").val(4)),\$(\"input,select\").change((function(){\$(this).data(\"formchanged\")||(window.formChanged=!0)})),document.removeEventListener(\"turbo:before-visit\",unsaveChanged),document.addEventListener(\"turbo:before-visit\",unsaveChanged),document.addEventListener(\"turbo:link\",(function(e){window.formChanged=!1})),6==\$(\"select[name=equipement_zone_1] option:selected\").val()&&\$(\$(\"select[name=equipement_zone_1]\").data(\"target\")).css(\"visibility\",\"inherit\"),6==\$(\"select[name=equipement_zone_2] option:selected\").val()&&\$(\$(\"select[name=equipement_zone_2]\").data(\"target\")).css(\"visibility\",\"inherit\"),6==\$(\"select[name=equipement_zone_3] option:selected\").val()&&\$(\$(\"select[name=equipement_zone_3]\").data(\"target\")).css(\"visibility\",\"inherit\"),\$(\"input[name=client_adresse_auto]\").autocomplete({source:function(e,t){\$.ajax({method:\"GET\",url:\"https://api-adresse.data.gouv.fr/search/?q=\"+\$(\"input[name='client_adresse_auto']\").val()+\"&type=housenumber&autocomplete=1&limit10&lat&lon\",dataType:\"json\",success:function(e){t(\$.map(e.features,(function(e){var t=[];if(-1==\$.inArray(e.properties.label,t)&&e.properties.housenumber&&e.properties.postcode)return t.push(e.properties.label),{label:e.properties.label,city:e.properties.city,postcode:e.properties.postcode,name:e.properties.name,coordinates:e.geometry.coordinates}})))}})},select:function(e,t){var i=\$(this).data(\"idsite\"),n=\$(this);\$(\"input[name='souscripteur_code_postal']\").val(t.item.postcode),\$(\"input[name='souscripteur_ville']\").val(t.item.city),\$(\"input[name='souscripteur_adresse']\").val(t.item.name),\$(\"input[name='souscripteur_coordinates']\").val(t.item.coordinates),\"\"!=i&&\$.ajax({method:\"POST\",url:\"/secteur/compare/secteur_site/\"+i,dataType:\"json\",data:{coordinates:t.item.coordinates},success:function(e){1==e.error?(\$(n).next().show(),\$(n).next().addClass(\"alert alert-danger\"),\$(n).next().css(\"display\",\"flex\"),\$(n).next().css(\"align-items\",\"center\"),\$(n).next().html('<i class=\"fa fa-warning\"></i>'+e.message)):(\$(n).next().removeClass(\"alert alert-danger\"),\$(n).next().hide())}})}}),\$(\"input[name=equipement_localisation_add]\").autocomplete({source:function(e,t){\$.ajax({method:\"GET\",url:\"https://api-adresse.data.gouv.fr/search/?q=\"+\$(\"input[name='equipement_localisation_add']\").val()+\"&type=housenumber&autocomplete=1&limit10&lat&lon\",dataType:\"json\",success:function(e){t(\$.map(e.features,(function(e){var t=[];if(-1==\$.inArray(e.properties.label,t)&&e.properties.housenumber)return t.push(e.properties.label),{label:e.properties.label,city:e.properties.city,postcode:e.properties.postcode,name:e.properties.name,coordinates:e.geometry.coordinates}})))}})},select:function(e,t){\$(this);\$(\"input[name='code_postal_add']\").val(t.item.postcode),\$(\"input[name='ville_add']\").val(t.item.city),\$(\"input[name='adresse_add']\").val(t.item.name),\$(\"input[name='coordinates_add']\").val(t.item.coordinates)}}),\$(\"body\").on(\"click\",\".btn-cp\",(function(e){\$(\".btn-cp\").removeClass(\"bg-vert\"),\$(this).addClass(\"bg-vert\");var t=\$(this).data(\"equipement\");\$(this).attr(\"id\")==\"btn-chantier-\"+t?(\$(\"#cp-num-chantier-\"+t).prop(\"required\",!0),\$(\"#salarie_chantier-\"+t).val(\"chantier\")):(\$(\"#cp-num-chantier-\"+t).prop(\"required\",!1),\$(\"#salarie_chantier-\"+t).val(\"salarie\"))})),\$(\"body\").on(\"click\",\".detail-client\",(function(e){var t=\$(this).data(\"select-id\"),i=\$(\"#\"+t).val();\$(this).data(\"content-template-ajax\",\"/clients/detail_client/\"+i)})),\$(\"body\").on(\"click\",\"#salarie-frisquet\",(function(e){\$(this).attr(\"disabled\")?e.preventDefault():\$(this).hasClass(\"active\")?(\$(this).removeClass(\"active\"),\$(\"input[name=salarie_frisquet]\").val(!1)):(\$(this).addClass(\"active\"),\$(\"input[name=salarie_frisquet]\").val(!0))})),\$(\"body\").on(\"click\",\"#client-chantier\",(function(e){\$(this).attr(\"disabled\")?e.preventDefault():\$(this).hasClass(\"active\")?(\$(this).removeClass(\"active\"),\$(\"input[name=equipement_chantier]\").prop(\"disabled\",!0),\$(\"input[name=equipement_chantier]\").val(\"\")):(\$(this).addClass(\"active\"),\$(\"input[name=equipement_chantier]\").prop(\"disabled\",!1))})),\$(document).click((function(e){\"show-equipements\"!=\$(e.target).attr(\"id\")&&\"show-equipements\"!=\$(e.target).parent().attr(\"id\")&&(\$(e.target).closest(\"#list-equipements\").length||\$(\"#list-equipements\").is(\":hidden\")||\$(\"#list-equipements\").hide())})),\$(\"body\").on(\"click\",\"#show-equipements\",(function(e){\$(\"#list-equipements\").is(\":hidden\")?\$(\"#list-equipements\").show():\$(\"#list-equipements\").hide()})),\$(\"#list-equipements\").click((function(e){e.stopPropagation()})),\$(\"body\").on(\"click\",\"#reset-preferences\",(function(e){e.preventDefault(),\$(\"#form-preferences-planification\")[0].reset(),\$(\".planification\").val(\"\"),\$(\"#form-preferences-planification select\").each((function(e){\$(this).find(\"option:first\").prop(\"selected\",!0)})),\$(\"#form-preferences-planification input[type=checkbox]\").each((function(e){\$(this).prop(\"checked\",!1),\$(this).removeAttr(\"checked\")})),\$(\".input-datepicker\").each((function(){\$(this).datepicker(\"setDate\",null),\$(this).datepicker(\"option\",\"minDate\",null),\$(this).datepicker(\"option\",\"maxDate\",null)}))})),\$(\"body\").on(\"click\",\"#submit-gestion-pref\",(function(e){if(!\$('input[name=\"equipement_dupliquer[]\"]').is(\":checked\"))return e.preventDefault(),!1})),\$(\"#popup-changement-souscripteur input[name=numero_client]\").mask(\"00 00 00000\",{translation:{0:{pattern:/[0-9]/,recursive:!1}}}),\$(\"#popup-add-utilisateur input[name=numero_client]\").mask(\"00 00 00000\",{translation:{0:{pattern:/[0-9]/,recursive:!1}}}),\$(\".input_affecter_equipement\").prop(\"disabled\",\"disabled\"),\$(\".input_creer_client\").prop(\"disabled\",\"disabled\"),\$(\".input_affecter_equipement\").on(\"change\",(function(e){var t=\"#\"+\$(this).attr(\"form\");\$(this).is(\":checked\")?(\$(t+\" .span_affecter_equipement\").addClass(\"color-primary\"),\$(t+\" .nouveau_client_creation\").hide(),\$(t+\" .nouveau_client_recherche\").show(),\$(t+\" .submit-form\").removeAttr(\"disabled\"),\$(t+\" input[name=type_add]\").val(\"recherche\"),\$(t+\" .input_creer_client\").prop(\"checked\",!1),\$(t+\" .span_creer_client\").removeClass(\"color-primary\")):(\$(t+\" .submit-form\").attr(\"disabled\"),\$(t+\" .submit-form\").prop(\"disabled\",\"disabled\"),\$(t+\" .span_affecter_equipement\").removeClass(\"color-primary\"),\$(t+\" .nouveau_client_recherche\").hide(),\$(t+\" input[name=type_add]\").val(\"\"))})),\$(\".input_creer_client\").on(\"change\",(function(e){if(\$(this).is(\":checked\")){var t=\"#\"+\$(this).attr(\"form\");\$(t+\" .span_creer_client\").addClass(\"color-primary\"),\$(t+\" .submit-form\").removeAttr(\"disabled\"),\$(t+\" input[name=type_add]\").val(\"new\"),\$(t+\" .nouveau_client_creation--title\").text(\"Numero Client : -\"),\$(t+\" input[name=client_nom]\").is(\":visible\")?\$(t+\" .nouveau_client_creation--nom\").text(\$(t+\" input[name=etat_civil]:selected\").text()+\" \"+\$(t+\" input[name=client_nom\").val()+\" \"+\$(t+\" input[name=client_prenom\").val()):\$(t+\" .nouveau_client_creation--nom\").text(\$(t+\" input[name=client_entreprise\").val()),\$(t+\" .nouveau_client_creation--emails\").text(\$(t+\" input[name=email\").val()),\$(t+\" .nouveau_client_creation--adresse\").text(\"\"),\$(t+\" .nouveau_client_creation\").show(),\$(t+\" .nouveau_client_recherche\").hide(),\$(t+\" input[name=input_affecter_equipement]\").prop(\"checked\",!1),\$(t+\" .span_affecter_equipement\").removeClass(\"color-primary\")}else \$(t+\" .span_creer_client\").removeClass(\"color-primary\"),\$(t+\" .nouveau_client_creation\").hide(),\$(t+\" .submit-form\").attr(\"disabled\"),\$(t+\" .submit-form\").prop(\"disabled\",\"disabled\"),\$(t+\" input[name=type_add]\").val(\"\")})),\$(\"body\").on(\"click\",\"#reset-form-change-souscripteur,#reset-form-change-utilisateur\",(function(e){\$(\"#form-changement-souscripteur\")[0].reset(),\$(\"#form-add-utilisateur\")[0].reset(),\$(\".result-souscripteur-client\").hide(),\$(\".nouveau_client_recherche\").hide(),\$(\".nouveau_client_creation\").hide(),\$(\".input_affecter_equipement\").prop(\"checked\",!1),\$(\".input_creer_client\").prop(\"checked\",!1)}));var i,n=null;\$(\"body\").on(\"input\",\"input[name=client_nom],input[name=client_entreprise],input[name=client_prenom],input[name=email],input[name=numero_client],select[name=categorie_pro]\",(function(e){var t=\"#\"+\$(this).attr(\"form\");clearTimeout(i),1==\$(t+\" select[name=type_client]\").val()&&\$(t+\" input[name=client_nom]\").val().trim().length>2||2==\$(t+\" select[name=type_client]\").val()&&\$(t+\" input[name=client_entreprise]\").val().trim().length>2&&\"\"!=\$(t+\" select[name=categorie_pro]\").val()?\$(t+\" input[name=input_creer_client]\").removeAttr(\"disabled\"):(\$(t+\" input[name=input_creer_client]\").attr(\"disabled\"),\$(t+\" input[name=input_creer_client]\").prop(\"disabled\",\"disabled\"));var a=\$(\"#\"+\$(this).attr(\"form\")).serialize();i=setTimeout((function(){\$(t+\" input[name=client_nom]\").val().trim().length>2||\$(t+\" input[name=client_prenom]\").val().trim().length>2||\$(t+\" input[name=email]\").val().trim().length>2||\$(t+\" input[name=client_entreprise]\").val().trim().length>2||\$(t+\" input[name=numero_client]\").val().trim().length>2?(null!=n&&n.abort(),n=\$.ajax({method:\"POST\",url:\"/clients/recherche\",dataType:\"json\",data:a,processData:!1,success:function(e){e.source?(\$(t+\" .result-souscripteur-client\").css(\"max-height\",\"229px\").css(\"min-height\",\"229px\"),\$(t+\" input[name=input_affecter_equipement]\").prop(\"disabled\",\"disabled\"),\$(t+\" .result-souscripteur-client\").show()):(\$(t+\" input[name=input_affecter_equipement]\").prop(\"disabled\",\"disabled\"),\$(t+\" input[name=input_affecter_equipement]\").prop(\"checked\",!1),\$(t+\" .nouveau_client_recherche\").hide(),\$(t+\" .nouveau_client_recherche--title\").text(\"\"),\$(t+\" .nouveau_client_recherche--nom\").text(\"\"),\$(t+\" .nouveau_client_recherche--adresse\").text(\"\"),\$(t+\" .nouveau_client_recherche--emails\").text(\"\")),\$(t+\" .result-souscripteur-client\").dxDataGrid({dataSource:e.source,columns:e.colonnes,columnAutoWidth:!0,showBorders:!0,onInitialized:function(e){e.component.beginCustomLoading()},onContentReady:function(e){e.component.endCustomLoading()},selection:{mode:\"single\"},onSelectionChanged:function(e){var i=e.selectedRowsData;0!=i.length&&(\$(t+\" input[name=input_affecter_equipement]\").removeAttr(\"disabled\"),\$(t+\" .nouveau_client_recherche--title\").text(\"Numero Client : \"+i[0].numero_client),\$(t+\" .nouveau_client_recherche--nom\").text(i[0].nom_complet),\$(t+\" .nouveau_client_recherche--adresse\").text(i[0].adresse),\$(t+\" .nouveau_client_recherche--emails\").text(i[0].email),\$(t+\" input[name=new_client_souscripteur]\").val(i[0].id_client),\$(t+\" input[name=input_affecter_equipement\").is(\":checked\")||\$(t+\" input[name=input_affecter_equipement]\").click())}})}})):\$(t+\" .result-souscripteur-client\").is(\":visible\")&&\$(t+\" .result-souscripteur-client\").dxDataGrid(\"instance\").option(\"dataSource\",[])}),300)})),\$(\"body\").on(\"change\",\"select[name=planifier_preference], select[name=planifier_partie_journee], select[name=planifier_agent]\",(function(){r()}));var a=\$(\"#lock-id\").val();function r(){\"Indifférent\"==\$(\"select[name=planifier_preference] option:selected\").val()?(\$('input[name=\"planifier_jour[]\"]').attr(\"disabled\"),\$('input[name=\"planifier_jour[]\"]').prop(\"disabled\",!0),\$('input[name=\"planifier_jour[]\"]').prop(\"checked\",!1)):(\$('input[name=\"planifier_jour[]\"]').removeAttr(\"disabled\"),\$('input[name=\"planifier_jour[]\"]').prop(\"disabled\",!1)),\"Indifférent\"==\$(\"select[name=planifier_partie_journee] option:selected\").val()?(\$(\"input[name=premiere_visite]\").prop(\"disabled\",!0),\$(\"input[name=premiere_visite]\").attr(\"disabled\"),\$(\"input[name=premiere_visite]\").prop(\"checked\",!1),\$(\"select[name=planifier_plage_horaire] option:first\").prop(\"selected\",!0),\$(\"select[name=planifier_plage_horaire]\").prop(\"disabled\",!0),\$(\"select[name=planifier_plage_horaire]\").attr(\"disabled\")):(\$(\"input[name=premiere_visite]\").removeAttr(\"disabled\"),\$(\"input[name=premiere_visite]\").prop(\"disabled\",!1),\$(\"select[name=planifier_plage_horaire]\").prop(\"disabled\",!1),\$(\"select[name=planifier_plage_horaire]\").removeAttr(\"disabled\")),\"Indifférent\"==\$(\"select[name=planifier_agent] option:selected\").val()?(\$(\"select[name=preference_agent]\").prop(\"disabled\",!0),\$(\"select[name=preference_agent] option:first\").prop(\"selected\",!0),\$(\"select[name=preference_agent]\").attr(\"disabled\")):(\$(\"select[name=preference_agent]\").prop(\"disabled\",!1),\$(\"select[name=preference_agent]\").removeAttr(\"disabled\"))}setInterval((function(){a?\$.ajax({url:\"/check_expiration_lock/\".concat(a),method:\"GET\",dataType:\"json\",success:function(e){if(e.expired&&\$(\"#popup-lock-expired-\"+\$(\"#id_equipement_update\").val()).is(\":hidden\")){var t=\$(\"#popup-lock-expired-\"+\$(\"#id_equipement_update\").val()).dxPopup({width:\"auto\",height:\"auto\",maxHeight:\"90vh\",container:\".dx-viewport\",showTitle:!0,title:\"Inactivité\",visible:!1,dragEnabled:!0,dragOutsideBoundary:!0,closeOnOutsideClick:!1,showCloseButton:!0,elementAttr:{class:\"nobutton dark_shadow\"},position:{at:\"center\",my:\"center\",collision:\"fit\"}}).dxPopup(\"instance\");\$(\"#popup-lock-expired-\"+\$(\"#id_equipement_update\").val()).show(),t.show()}},error:function(){console.error(\"Erreur lors de la vérification du lock.\")}}):console.log(\"pas de lock\")}),6e4),r(),\$(\".intervention_client\").length>0&&\$(\".intervention_client\").first().trigger(\"click\")}window.formChanged=!1,window.addEventListener(\"beforeunload\",unsaveChanged),\$(\"body\").on(\"change\",\"#check_meme_adresse_equipement_existant\",(function(e){\$(this).is(\":checked\")?(\$(\"#list_equipement_existant\").show(),\$(\"#add_equipement_new\").hide()):(\$(\"#list_equipement_existant\").hide(),\$(\"#equipement_existant_select\").val(\"\"),\$(\"#add_equipement_new\").show())})),\$(\"body\").on(\"click\",\"#add_agent_qualification\",(function(e){\$(\"#agent-grid-qualification\").dxDataGrid(\"instance\").addRow()})),\$(\"body\").on(\"change\",\"#type_client\",(function(e){\"2\"==\$(this).val()?(\$(\"#categorie_pro\").parent().removeClass(\"hide\"),\$(\"#client_entreprise\").parent().removeClass(\"hide\"),\$(\"#equipement_tva\").val(\"4\")):(\$(\"#categorie_pro\").parent().addClass(\"hide\"),\$(\"#client_entreprise\").parent().addClass(\"hide\"),\$(\"#equipement_tva\").val(\"5\"))})),\$(\"body\").on(\"change\",\".equipement-zone\",(function(e){6==\$(this).val()?\$(\$(this).data(\"target\")).css(\"visibility\",\"inherit\"):\$(\$(this).data(\"target\")).css(\"visibility\",\"hidden\")})),\$(\"body\").on(\"click\",\".add_complement_adresse\",(function(e){\$(\$(this).data(\"target-grid\")).dxDataGrid(\"instance\").addRow()})),\$(\"body\").on(\"change\",\".form-input-change\",(function(e){var t=\$(this).attr(\"form\"),i=\$(\"#\"+t).data(\"idequipement\");\$(\"#simulateur_data_change-\"+i).val(\$(e.target).attr(\"name\"));\$(\"#\"+t).submit()})),\$(\"body\").on(\"changed.bs.select\",(function(e,t,i,n){var a=e.target.options[t].value,r=e.target.options[t].text;if(0!=\$(\"#tr-\"+a).length||n.includes(a))\$(\"#tr-\"+a).remove();else{var o=document.createElement(\"tr\");\$(o).attr(\"id\",\"tr-\"+a),o.innerHTML=\"<td>\"+r+\"</td><td></td>\",\$(\"#simulateur-table-options tbody\").append(o.outerHTML)}})),\$(\"body\").on(\"click\",\".choix-block\",(function(e){var t=\$(\".choix-block.bg-vert\").data(\"target\"),i=\$(this).data(\"target\");\$(\".choix-block\").removeClass(\"bg-vert border-vert\").addClass(\"border-grey-medium\"),\$(this).addClass(\"border-vert\").addClass(\"bg-vert\"),null!=t&&t!=i&&\$(t).hide(),\$(\"#form_add_equipement_type\").val(i),\$(i).show(),\$(\"#submit-add-equipement\").show()})),\$(\"#submit-add-equipement\").on(\"click\",(function(e){if(e.preventDefault(),\"#choix-recherche-equipement\"==\$(\"#form_add_equipement_type\").val()){var t=\$(\"select[name=equipement_search_value] option:selected\");if(1==t.length&&1==t.data(\"actif\")){var i=\"Attention, cet équipement est toujours actif chez un autre client : \"+('<a href=\"'+t.data(\"link\")+'\" target=\"_blank\">allez voir</a>')+\". <br>Voulez vous tout de même ajouter cet équipement à ce client ?\";return DevExpress.ui.dialog.confirm(i,\"Equipement actif\").done((function(e){e&&(window.formChanged=!1,\$(\"#form-add-equipement\").submit())})),!1}}return!0})),\$(\"body\").on(\"submit\",\"#form-change-souscripteur\",(function(e){return null!=\$(\"#new_client_souscripteur\").val()&&\"\"!=\$(\"#new_client_souscripteur\").val()||\"new\"==\$(\"#form-change-souscripteur-type\").val()&&(\"\"!=\$(\"#client_nom-nouveau_souscripteur\").val()||\"\"!=\$(\"#client_entreprise-nouveau_souscripteur\").val())&&0!=\$('input[name=\"change-equipements[]\"]:checked').length?(\$(\"#close-popup-changement-souscripteur\").click(),window.formChanged=!1,!0):(\$(\"#messages-popup-change\").show(),\$(\"#messages-popup-change .alert\").html(\$(\"#message-to-display\").html()),\$(\"#messages-popup-change .alert\").show(),!1)})),\$(\"body\").on(\"submit\",\".submit-add-utilisateur\",(function(e){var t=\$(this).data(\"id-equipement\"),i=\$(\"#form-add-utilisateur-type-\"+t).val();if(\"recherche\"==i)return null!=\$(\"#new_client_utilisateur-\"+t).val()&&\"\"!=\$(\"#new_client_utilisateur-\"+t).val()||(\$(\"#messages-popup-change\").show(),\$(\"#messages-popup-change .alert\").html(\$(\"#message-to-display-recherche\"+t).html()),\$(\"#messages-popup-change .alert\").show(),!1);if(\"new\"==i){var n=\$(\"#type_client-\"+t).val();return 1==n&&null!=\$(\"#client_nom-\"+t).val()&&\"\"!=\$(\"#client_nom-\"+t).val()||2==n&&null!=\$(\"#client_entreprise-\"+t).val()&&\"\"!=\$(\"#client_entreprise-\"+t).val()||(\$(\"#messages-popup-add-utilisateur-\"+t).show(),\$(\"#messages-popup-add-utilisateur-\"+t+\" .alert\").html(\$(\"#message-to-display-new\"+t).html()),\$(\"#messages-popup-add-utilisateur-\"+t+\" .alert\").show(),!1)}return!1})),\$(\"body\").on(\"change\",\".change_equipement\",(function(e){var t=\$(this).data(\"form-change\"),i=\$(this).attr(\"name\"),n=\$(this).data(\"idequipement\");\$(t+\" > input[name=type_change]\").val(i),\$(t+\" > input[name=data_value]\").val(\$(this).val()),\$(t).data(\"target-html\",\$(this).data(\"target\")),\$(t).submit(),\"10\"==\$(this).val()?\$(\"#numero_serie_secondaire-\"+n).removeClass(\"hide\"):\$(\"#numero_serie_secondaire-\"+n).addClass(\"hide\")})),\$(\"body\").on(\"click\",\"#btn-save-client\",(function(e){e.preventDefault();var t=\$(this).attr(\"form\"),i=!1,n=\$('input[name=\"id_equipement_update\"]').val();0==\$(\"#\"+t)[0].checkValidity()?(\$(\"#\"+t)[0].reportValidity(),\$(\"#\"+t)[0].forEach((function(e){0==e.validity.valid&&(\$(e).data(\"idequipement\")==n||null==\$(e).data(\"idequipement\")&&\$(e).is(\":visible\"))&&(i=!0)})),i?e.preventDefault():\$(\"#\"+t).submit()):\$(\"#\"+t).submit()})),\$(\"body\").on(\"submit\",\".form-cas-particulier\",(function(e){eval(\$(this).data(\"js\"))})),\$(\"body\").on(\"click\",\"#btn-modif-client-equipement\",(function(e){localStorage.setItem(\"scrollClient\",window.scrollY)})),\$(\"body\").on(\"click\",\".telephone-fr\",(function(e){var t='input[name=\"'+\$(this).data(\"target-mask\")+'\"]',i='input[name=\"'+\$(this).data(\"target-input-fr\")+'\"]';\$(this).hasClass(\"opacity-25\")?(\$(this).removeClass(\"opacity-25\"),\$(t).mask(\"00.00.00.00.00\",{translation:{0:{pattern:/[0-9]/,recursive:!1}}}),\$(t).attr(\"minlength\",\"14\").attr(\"pattern\",\"[0-9]{2}.[0-9]{2}.[0-9]{2}.[0-9]{2}.[0-9]{2}\"),\$(i).val(1)):(\$(i).val(0),\$(this).addClass(\"opacity-25\"),\$(t).mask(\"9999999999\"),\$(t).removeAttr(\"minlength\").removeAttr(\"pattern\"))})),\$(\"body\").on(\"click\",\"#btn-open-change-souscripteur\",(function(e){\$('input[name=\"change-equipements[]\"]:checked').each((function(e){\$(this).prop(\"checked\",!0),\$(this).attr(\"checked\",\"\"),\$(\$(this).data(\"change-target\")).show()})),\$('input[name=\"change-equipements[]\"]:not(:checked)').each((function(e){\$(this).prop(\"checked\",!1),\$(this).removeAttr(\"checked\"),\$(\$(this).data(\"change-target\")).hide()}))})),\$(\"body\").on(\"change\",\".pref_a_partir_du\",(function(e){var t=\"input[name=date_avant_le]\",i=\"input[name=date_entre_debut]\",n=\"input[name=date_entre_fin]\",a=\"input[name=date_a_partir_du]\";if(\$(this).val()){var r=\$(this).datepicker(\"getDate\");\$(t).val()||\$(t).datepicker(\"option\",\"minDate\",r),\$(i).val()||\$(i).datepicker(\"option\",\"minDate\",r),\$(n).val()||\$(n).datepicker(\"option\",\"minDate\",r)}else\"\"!=\$(i).val()?\$(a).datepicker(\"option\",\"minDate\",\$(i).datepicker(\"getDate\")):(\$(t).datepicker(\"option\",\"minDate\",null),\$(i).datepicker(\"option\",\"minDate\",null),\$(n).datepicker(\"option\",\"minDate\",null),\$(a).datepicker(\"option\",\"minDate\",null))})),\$(\"body\").on(\"change\",\".pref_avant_le\",(function(e){var t=\"input[name=date_a_partir_du]\",i=\"input[name=date_entre_debut]\",n=\"input[name=date_entre_fin]\";if(\$(this).val()){var a=\$(this).datepicker(\"getDate\");a.setDate(a.getDate()-1),\$(t).datepicker(\"option\",\"maxDate\",a),\$(i).val()||\$(i).datepicker(\"option\",\"maxDate\",a),\$(n).val()||\$(n).datepicker(\"option\",\"maxDate\",a),a<\$(t).datepicker(\"getDate\")&&\$(t).val(\"\")}else\"\"!=\$(n).val()?\$(t).datepicker(\"option\",\"maxDate\",\$(n).datepicker(\"getDate\")):(\$(t).datepicker(\"option\",\"maxDate\",null),\$(i).datepicker(\"option\",\"maxDate\",null),\$(n).datepicker(\"option\",\"maxDate\",null),\$(\"input[name=date_avant_le]\").datepicker(\"option\",\"maxDate\",null))})),\$(\"body\").on(\"change\",\".pref_entre_debut\",(function(e){var t=\"input[name=date_a_partir_du]\",i=\"input[name=date_avant_le]\",n=\"input[name=date_entre_fin]\";if(\$(this).val()){var a=\$(this).datepicker(\"getDate\");\$(n).datepicker(\"option\",\"minDate\",a),a>\$(n).datepicker(\"getDate\")&&\$(n).val(\"\"),\$(t).datepicker(\"option\",\"minDate\",a),\$(i).datepicker(\"option\",\"minDate\",a)}else\"\"!=\$(t).val()?\$(n).datepicker(\"option\",\"minDate\",\$(t).datepicker(\"getDate\")):(\$(n).datepicker(\"option\",\"minDate\",null),\$(t).datepicker(\"option\",\"minDate\",null),\$(i).datepicker(\"option\",\"minDate\",null),\$(\"input[name=date_entre_debut]\").datepicker(\"option\",\"minDate\",null))})),\$(\"body\").on(\"change\",\".pref_entre_fin\",(function(e){var t=\"input[name=date_a_partir_du]\",i=\"input[name=date_avant_le]\",n=\"input[name=date_entre_debut]\";if(\$(this).val()){var a=\$(this).datepicker(\"getDate\");\$(n).datepicker(\"option\",\"maxDate\",a),a<\$(n).datepicker(\"getDate\")&&\$(n).val(\"\"),\$(t).datepicker(\"option\",\"maxDate\",a),\$(i).datepicker(\"option\",\"maxDate\",a)}else\"\"!=\$(i).val()?\$(n).datepicker(\"option\",\"maxDate\",\$(i).datepicker(\"getDate\")):(\$(n).datepicker(\"option\",\"maxDate\",null),\$(t).datepicker(\"option\",\"maxDate\",null),\$(i).datepicker(\"option\",\"maxDate\",null),\$(\"input[name=date_entre_fin]\").datepicker(\"option\",\"maxDate\",null))})),\$(\"body\").on(\"click\",\".picto-group-contrat\",(function(e){\$.ajax({method:\"GET\",url:\$(this).data(\"path\"),dataType:\"json\",success:function(e){e.forEach((function(e){window.open(e)}))}})})),\$(\"body\").on(\"click\",\".intervention_client\",(function(){\$(\".intervention_client\").css(\"background\",\"\"),\$(this).css(\"background\",\"#F2F2F2\");var e=\$(this).data(\"id\");\$.ajax({url:\"/equipement/intervention/result/\"+e,type:\"GET\",success:function(e){\$(\"#result_intervention_client\").html(e)}}),\$.ajax({url:\"/equipement/intervention/facturation/\"+e,type:\"GET\",success:function(e){\$(\"#result_intervention_client_facturation\").html(e)}})})),document.removeEventListener(\"ready turbo:load\",loadClient),\$(document).on(\"ready turbo:load\",loadClient)}},e=>{\"use strict\";e.O(0,[818,755,949],(()=>{return t=53829,e(e.s=t);var t}));e.O()}]);";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "@public_path/build/client.67a0ea33.js";
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array ();
    }

    public function getSourceContext()
    {
        return new Source("(self.webpackChunk=self.webpackChunk||[]).push([[47],{53829:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__(82772),__webpack_require__(26699),__webpack_require__(32023),__webpack_require__(89554),__webpack_require__(54747),__webpack_require__(32564),__webpack_require__(69826),__webpack_require__(21249),__webpack_require__(68309),__webpack_require__(73210);var \$=__webpack_require__(19755);function unsaveChanged(e){var t=null;if(t=-1!==navigator.userAgent.indexOf(\"Chrome\")?document.activeElement:e.originalTarget.activeElement,window.formChanged&&(!t||\"btn-save-client\"!=t.id&&\"save-pref-planification\"!=t.id&&!\$(t).hasClass(\"btn-success\"))){if(!window.confirm(\"Attention, si vous quitter la page, vos modifications en cours ne seront pas sauvegardées\"))return void e.preventDefault();window.formChanged=!1}var i=\$(\"#lock-id\").val();if(i){var n=new XMLHttpRequest;n.open(\"DELETE\",\"/lock/\"+i,!1),n.send()}}function toggleDateFormatForMultipleInputs(e,t){var i=document.getElementById(t),n=\$(\"#\"+t)[0].checked?\"dd MM\":\"dd/mm/yy\";e.forEach((function(e){\$(\"#\"+e).datepicker(\"option\",\"dateFormat\",n)})),i.addEventListener(\"change\",(function(){var i=\$(\"#\"+t)[0].checked?\"dd MM\":\"dd/mm/yy\";e.forEach((function(e){\$(\"#\"+e).datepicker(\"option\",\"dateFormat\",i)}))}))}function loadClient(e){window.formChanged=!1;var t=localStorage.getItem(\"scrollClient\");t>0&&(setTimeout((function(){\$(\"html, body\").animate({scrollTop:t})}),750),localStorage.setItem(\"scrollClient\",0)),\$(\".input-datepicker\").each((function(){var e=\$(this).data(\"format\"),t=\$(this).data(\"min\"),i=\$(this).data(\"max\");\$(this).datepicker({format:e,language:\"fr\",showButtonPanel:!0,minDate:t,maxDate:i,clearText:\"Effacer\",beforeShow:function(e,t){setTimeout((function(){var i=\$(t.dpDiv).find(\".ui-datepicker-buttonpane\");\$(\"<button>\",{text:\"Effacer\",click:function(){\$(e).val(\"\"),\$(e).datepicker(\"setDate\",null),\$(e).trigger(\"change\")}}).appendTo(i).addClass(\"ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all\")}),1)}})})),toggleDateFormatForMultipleInputs([\"planification_entre_debut\",\"planification_entre_fin\"],\"inclusion_recurrente\"),toggleDateFormatForMultipleInputs([\"date_apres_le\"],\"apres_recurrente\"),toggleDateFormatForMultipleInputs([\"date_avant_le\"],\"avant_recurrente\"),\$(\".input_tel:not(.not_fr)\").mask(\"00.00.00.00.00\",{translation:{0:{pattern:/[0-9]/,recursive:!1}}}),\$(\".input_tel.not_fr\").mask(\"9999999999\"),\$(\".input_numero_serie\").mask(\"SSSS SSSSSS SSSS\",{translation:{S:{pattern:/[A-Za-z0-9]/}}}),localStorage.setItem(\"activeTab\",\"\"),\$(\".form_resilier_contrat\").each((function(e){\$(this)[0].reset()})),\"2\"==\$(\"#type_client option:selected\").val()&&(\$(\"#categorie_pro\").parent().removeClass(\"hide\"),\$(\"#client_entreprise\").parent().removeClass(\"hide\"),\$(\"#equipement_tva\").val(4)),\$(\"input,select\").change((function(){\$(this).data(\"formchanged\")||(window.formChanged=!0)})),document.removeEventListener(\"turbo:before-visit\",unsaveChanged),document.addEventListener(\"turbo:before-visit\",unsaveChanged),document.addEventListener(\"turbo:link\",(function(e){window.formChanged=!1})),6==\$(\"select[name=equipement_zone_1] option:selected\").val()&&\$(\$(\"select[name=equipement_zone_1]\").data(\"target\")).css(\"visibility\",\"inherit\"),6==\$(\"select[name=equipement_zone_2] option:selected\").val()&&\$(\$(\"select[name=equipement_zone_2]\").data(\"target\")).css(\"visibility\",\"inherit\"),6==\$(\"select[name=equipement_zone_3] option:selected\").val()&&\$(\$(\"select[name=equipement_zone_3]\").data(\"target\")).css(\"visibility\",\"inherit\"),\$(\"input[name=client_adresse_auto]\").autocomplete({source:function(e,t){\$.ajax({method:\"GET\",url:\"https://api-adresse.data.gouv.fr/search/?q=\"+\$(\"input[name='client_adresse_auto']\").val()+\"&type=housenumber&autocomplete=1&limit10&lat&lon\",dataType:\"json\",success:function(e){t(\$.map(e.features,(function(e){var t=[];if(-1==\$.inArray(e.properties.label,t)&&e.properties.housenumber&&e.properties.postcode)return t.push(e.properties.label),{label:e.properties.label,city:e.properties.city,postcode:e.properties.postcode,name:e.properties.name,coordinates:e.geometry.coordinates}})))}})},select:function(e,t){var i=\$(this).data(\"idsite\"),n=\$(this);\$(\"input[name='souscripteur_code_postal']\").val(t.item.postcode),\$(\"input[name='souscripteur_ville']\").val(t.item.city),\$(\"input[name='souscripteur_adresse']\").val(t.item.name),\$(\"input[name='souscripteur_coordinates']\").val(t.item.coordinates),\"\"!=i&&\$.ajax({method:\"POST\",url:\"/secteur/compare/secteur_site/\"+i,dataType:\"json\",data:{coordinates:t.item.coordinates},success:function(e){1==e.error?(\$(n).next().show(),\$(n).next().addClass(\"alert alert-danger\"),\$(n).next().css(\"display\",\"flex\"),\$(n).next().css(\"align-items\",\"center\"),\$(n).next().html('<i class=\"fa fa-warning\"></i>'+e.message)):(\$(n).next().removeClass(\"alert alert-danger\"),\$(n).next().hide())}})}}),\$(\"input[name=equipement_localisation_add]\").autocomplete({source:function(e,t){\$.ajax({method:\"GET\",url:\"https://api-adresse.data.gouv.fr/search/?q=\"+\$(\"input[name='equipement_localisation_add']\").val()+\"&type=housenumber&autocomplete=1&limit10&lat&lon\",dataType:\"json\",success:function(e){t(\$.map(e.features,(function(e){var t=[];if(-1==\$.inArray(e.properties.label,t)&&e.properties.housenumber)return t.push(e.properties.label),{label:e.properties.label,city:e.properties.city,postcode:e.properties.postcode,name:e.properties.name,coordinates:e.geometry.coordinates}})))}})},select:function(e,t){\$(this);\$(\"input[name='code_postal_add']\").val(t.item.postcode),\$(\"input[name='ville_add']\").val(t.item.city),\$(\"input[name='adresse_add']\").val(t.item.name),\$(\"input[name='coordinates_add']\").val(t.item.coordinates)}}),\$(\"body\").on(\"click\",\".btn-cp\",(function(e){\$(\".btn-cp\").removeClass(\"bg-vert\"),\$(this).addClass(\"bg-vert\");var t=\$(this).data(\"equipement\");\$(this).attr(\"id\")==\"btn-chantier-\"+t?(\$(\"#cp-num-chantier-\"+t).prop(\"required\",!0),\$(\"#salarie_chantier-\"+t).val(\"chantier\")):(\$(\"#cp-num-chantier-\"+t).prop(\"required\",!1),\$(\"#salarie_chantier-\"+t).val(\"salarie\"))})),\$(\"body\").on(\"click\",\".detail-client\",(function(e){var t=\$(this).data(\"select-id\"),i=\$(\"#\"+t).val();\$(this).data(\"content-template-ajax\",\"/clients/detail_client/\"+i)})),\$(\"body\").on(\"click\",\"#salarie-frisquet\",(function(e){\$(this).attr(\"disabled\")?e.preventDefault():\$(this).hasClass(\"active\")?(\$(this).removeClass(\"active\"),\$(\"input[name=salarie_frisquet]\").val(!1)):(\$(this).addClass(\"active\"),\$(\"input[name=salarie_frisquet]\").val(!0))})),\$(\"body\").on(\"click\",\"#client-chantier\",(function(e){\$(this).attr(\"disabled\")?e.preventDefault():\$(this).hasClass(\"active\")?(\$(this).removeClass(\"active\"),\$(\"input[name=equipement_chantier]\").prop(\"disabled\",!0),\$(\"input[name=equipement_chantier]\").val(\"\")):(\$(this).addClass(\"active\"),\$(\"input[name=equipement_chantier]\").prop(\"disabled\",!1))})),\$(document).click((function(e){\"show-equipements\"!=\$(e.target).attr(\"id\")&&\"show-equipements\"!=\$(e.target).parent().attr(\"id\")&&(\$(e.target).closest(\"#list-equipements\").length||\$(\"#list-equipements\").is(\":hidden\")||\$(\"#list-equipements\").hide())})),\$(\"body\").on(\"click\",\"#show-equipements\",(function(e){\$(\"#list-equipements\").is(\":hidden\")?\$(\"#list-equipements\").show():\$(\"#list-equipements\").hide()})),\$(\"#list-equipements\").click((function(e){e.stopPropagation()})),\$(\"body\").on(\"click\",\"#reset-preferences\",(function(e){e.preventDefault(),\$(\"#form-preferences-planification\")[0].reset(),\$(\".planification\").val(\"\"),\$(\"#form-preferences-planification select\").each((function(e){\$(this).find(\"option:first\").prop(\"selected\",!0)})),\$(\"#form-preferences-planification input[type=checkbox]\").each((function(e){\$(this).prop(\"checked\",!1),\$(this).removeAttr(\"checked\")})),\$(\".input-datepicker\").each((function(){\$(this).datepicker(\"setDate\",null),\$(this).datepicker(\"option\",\"minDate\",null),\$(this).datepicker(\"option\",\"maxDate\",null)}))})),\$(\"body\").on(\"click\",\"#submit-gestion-pref\",(function(e){if(!\$('input[name=\"equipement_dupliquer[]\"]').is(\":checked\"))return e.preventDefault(),!1})),\$(\"#popup-changement-souscripteur input[name=numero_client]\").mask(\"00 00 00000\",{translation:{0:{pattern:/[0-9]/,recursive:!1}}}),\$(\"#popup-add-utilisateur input[name=numero_client]\").mask(\"00 00 00000\",{translation:{0:{pattern:/[0-9]/,recursive:!1}}}),\$(\".input_affecter_equipement\").prop(\"disabled\",\"disabled\"),\$(\".input_creer_client\").prop(\"disabled\",\"disabled\"),\$(\".input_affecter_equipement\").on(\"change\",(function(e){var t=\"#\"+\$(this).attr(\"form\");\$(this).is(\":checked\")?(\$(t+\" .span_affecter_equipement\").addClass(\"color-primary\"),\$(t+\" .nouveau_client_creation\").hide(),\$(t+\" .nouveau_client_recherche\").show(),\$(t+\" .submit-form\").removeAttr(\"disabled\"),\$(t+\" input[name=type_add]\").val(\"recherche\"),\$(t+\" .input_creer_client\").prop(\"checked\",!1),\$(t+\" .span_creer_client\").removeClass(\"color-primary\")):(\$(t+\" .submit-form\").attr(\"disabled\"),\$(t+\" .submit-form\").prop(\"disabled\",\"disabled\"),\$(t+\" .span_affecter_equipement\").removeClass(\"color-primary\"),\$(t+\" .nouveau_client_recherche\").hide(),\$(t+\" input[name=type_add]\").val(\"\"))})),\$(\".input_creer_client\").on(\"change\",(function(e){if(\$(this).is(\":checked\")){var t=\"#\"+\$(this).attr(\"form\");\$(t+\" .span_creer_client\").addClass(\"color-primary\"),\$(t+\" .submit-form\").removeAttr(\"disabled\"),\$(t+\" input[name=type_add]\").val(\"new\"),\$(t+\" .nouveau_client_creation--title\").text(\"Numero Client : -\"),\$(t+\" input[name=client_nom]\").is(\":visible\")?\$(t+\" .nouveau_client_creation--nom\").text(\$(t+\" input[name=etat_civil]:selected\").text()+\" \"+\$(t+\" input[name=client_nom\").val()+\" \"+\$(t+\" input[name=client_prenom\").val()):\$(t+\" .nouveau_client_creation--nom\").text(\$(t+\" input[name=client_entreprise\").val()),\$(t+\" .nouveau_client_creation--emails\").text(\$(t+\" input[name=email\").val()),\$(t+\" .nouveau_client_creation--adresse\").text(\"\"),\$(t+\" .nouveau_client_creation\").show(),\$(t+\" .nouveau_client_recherche\").hide(),\$(t+\" input[name=input_affecter_equipement]\").prop(\"checked\",!1),\$(t+\" .span_affecter_equipement\").removeClass(\"color-primary\")}else \$(t+\" .span_creer_client\").removeClass(\"color-primary\"),\$(t+\" .nouveau_client_creation\").hide(),\$(t+\" .submit-form\").attr(\"disabled\"),\$(t+\" .submit-form\").prop(\"disabled\",\"disabled\"),\$(t+\" input[name=type_add]\").val(\"\")})),\$(\"body\").on(\"click\",\"#reset-form-change-souscripteur,#reset-form-change-utilisateur\",(function(e){\$(\"#form-changement-souscripteur\")[0].reset(),\$(\"#form-add-utilisateur\")[0].reset(),\$(\".result-souscripteur-client\").hide(),\$(\".nouveau_client_recherche\").hide(),\$(\".nouveau_client_creation\").hide(),\$(\".input_affecter_equipement\").prop(\"checked\",!1),\$(\".input_creer_client\").prop(\"checked\",!1)}));var i,n=null;\$(\"body\").on(\"input\",\"input[name=client_nom],input[name=client_entreprise],input[name=client_prenom],input[name=email],input[name=numero_client],select[name=categorie_pro]\",(function(e){var t=\"#\"+\$(this).attr(\"form\");clearTimeout(i),1==\$(t+\" select[name=type_client]\").val()&&\$(t+\" input[name=client_nom]\").val().trim().length>2||2==\$(t+\" select[name=type_client]\").val()&&\$(t+\" input[name=client_entreprise]\").val().trim().length>2&&\"\"!=\$(t+\" select[name=categorie_pro]\").val()?\$(t+\" input[name=input_creer_client]\").removeAttr(\"disabled\"):(\$(t+\" input[name=input_creer_client]\").attr(\"disabled\"),\$(t+\" input[name=input_creer_client]\").prop(\"disabled\",\"disabled\"));var a=\$(\"#\"+\$(this).attr(\"form\")).serialize();i=setTimeout((function(){\$(t+\" input[name=client_nom]\").val().trim().length>2||\$(t+\" input[name=client_prenom]\").val().trim().length>2||\$(t+\" input[name=email]\").val().trim().length>2||\$(t+\" input[name=client_entreprise]\").val().trim().length>2||\$(t+\" input[name=numero_client]\").val().trim().length>2?(null!=n&&n.abort(),n=\$.ajax({method:\"POST\",url:\"/clients/recherche\",dataType:\"json\",data:a,processData:!1,success:function(e){e.source?(\$(t+\" .result-souscripteur-client\").css(\"max-height\",\"229px\").css(\"min-height\",\"229px\"),\$(t+\" input[name=input_affecter_equipement]\").prop(\"disabled\",\"disabled\"),\$(t+\" .result-souscripteur-client\").show()):(\$(t+\" input[name=input_affecter_equipement]\").prop(\"disabled\",\"disabled\"),\$(t+\" input[name=input_affecter_equipement]\").prop(\"checked\",!1),\$(t+\" .nouveau_client_recherche\").hide(),\$(t+\" .nouveau_client_recherche--title\").text(\"\"),\$(t+\" .nouveau_client_recherche--nom\").text(\"\"),\$(t+\" .nouveau_client_recherche--adresse\").text(\"\"),\$(t+\" .nouveau_client_recherche--emails\").text(\"\")),\$(t+\" .result-souscripteur-client\").dxDataGrid({dataSource:e.source,columns:e.colonnes,columnAutoWidth:!0,showBorders:!0,onInitialized:function(e){e.component.beginCustomLoading()},onContentReady:function(e){e.component.endCustomLoading()},selection:{mode:\"single\"},onSelectionChanged:function(e){var i=e.selectedRowsData;0!=i.length&&(\$(t+\" input[name=input_affecter_equipement]\").removeAttr(\"disabled\"),\$(t+\" .nouveau_client_recherche--title\").text(\"Numero Client : \"+i[0].numero_client),\$(t+\" .nouveau_client_recherche--nom\").text(i[0].nom_complet),\$(t+\" .nouveau_client_recherche--adresse\").text(i[0].adresse),\$(t+\" .nouveau_client_recherche--emails\").text(i[0].email),\$(t+\" input[name=new_client_souscripteur]\").val(i[0].id_client),\$(t+\" input[name=input_affecter_equipement\").is(\":checked\")||\$(t+\" input[name=input_affecter_equipement]\").click())}})}})):\$(t+\" .result-souscripteur-client\").is(\":visible\")&&\$(t+\" .result-souscripteur-client\").dxDataGrid(\"instance\").option(\"dataSource\",[])}),300)})),\$(\"body\").on(\"change\",\"select[name=planifier_preference], select[name=planifier_partie_journee], select[name=planifier_agent]\",(function(){r()}));var a=\$(\"#lock-id\").val();function r(){\"Indifférent\"==\$(\"select[name=planifier_preference] option:selected\").val()?(\$('input[name=\"planifier_jour[]\"]').attr(\"disabled\"),\$('input[name=\"planifier_jour[]\"]').prop(\"disabled\",!0),\$('input[name=\"planifier_jour[]\"]').prop(\"checked\",!1)):(\$('input[name=\"planifier_jour[]\"]').removeAttr(\"disabled\"),\$('input[name=\"planifier_jour[]\"]').prop(\"disabled\",!1)),\"Indifférent\"==\$(\"select[name=planifier_partie_journee] option:selected\").val()?(\$(\"input[name=premiere_visite]\").prop(\"disabled\",!0),\$(\"input[name=premiere_visite]\").attr(\"disabled\"),\$(\"input[name=premiere_visite]\").prop(\"checked\",!1),\$(\"select[name=planifier_plage_horaire] option:first\").prop(\"selected\",!0),\$(\"select[name=planifier_plage_horaire]\").prop(\"disabled\",!0),\$(\"select[name=planifier_plage_horaire]\").attr(\"disabled\")):(\$(\"input[name=premiere_visite]\").removeAttr(\"disabled\"),\$(\"input[name=premiere_visite]\").prop(\"disabled\",!1),\$(\"select[name=planifier_plage_horaire]\").prop(\"disabled\",!1),\$(\"select[name=planifier_plage_horaire]\").removeAttr(\"disabled\")),\"Indifférent\"==\$(\"select[name=planifier_agent] option:selected\").val()?(\$(\"select[name=preference_agent]\").prop(\"disabled\",!0),\$(\"select[name=preference_agent] option:first\").prop(\"selected\",!0),\$(\"select[name=preference_agent]\").attr(\"disabled\")):(\$(\"select[name=preference_agent]\").prop(\"disabled\",!1),\$(\"select[name=preference_agent]\").removeAttr(\"disabled\"))}setInterval((function(){a?\$.ajax({url:\"/check_expiration_lock/\".concat(a),method:\"GET\",dataType:\"json\",success:function(e){if(e.expired&&\$(\"#popup-lock-expired-\"+\$(\"#id_equipement_update\").val()).is(\":hidden\")){var t=\$(\"#popup-lock-expired-\"+\$(\"#id_equipement_update\").val()).dxPopup({width:\"auto\",height:\"auto\",maxHeight:\"90vh\",container:\".dx-viewport\",showTitle:!0,title:\"Inactivité\",visible:!1,dragEnabled:!0,dragOutsideBoundary:!0,closeOnOutsideClick:!1,showCloseButton:!0,elementAttr:{class:\"nobutton dark_shadow\"},position:{at:\"center\",my:\"center\",collision:\"fit\"}}).dxPopup(\"instance\");\$(\"#popup-lock-expired-\"+\$(\"#id_equipement_update\").val()).show(),t.show()}},error:function(){console.error(\"Erreur lors de la vérification du lock.\")}}):console.log(\"pas de lock\")}),6e4),r(),\$(\".intervention_client\").length>0&&\$(\".intervention_client\").first().trigger(\"click\")}window.formChanged=!1,window.addEventListener(\"beforeunload\",unsaveChanged),\$(\"body\").on(\"change\",\"#check_meme_adresse_equipement_existant\",(function(e){\$(this).is(\":checked\")?(\$(\"#list_equipement_existant\").show(),\$(\"#add_equipement_new\").hide()):(\$(\"#list_equipement_existant\").hide(),\$(\"#equipement_existant_select\").val(\"\"),\$(\"#add_equipement_new\").show())})),\$(\"body\").on(\"click\",\"#add_agent_qualification\",(function(e){\$(\"#agent-grid-qualification\").dxDataGrid(\"instance\").addRow()})),\$(\"body\").on(\"change\",\"#type_client\",(function(e){\"2\"==\$(this).val()?(\$(\"#categorie_pro\").parent().removeClass(\"hide\"),\$(\"#client_entreprise\").parent().removeClass(\"hide\"),\$(\"#equipement_tva\").val(\"4\")):(\$(\"#categorie_pro\").parent().addClass(\"hide\"),\$(\"#client_entreprise\").parent().addClass(\"hide\"),\$(\"#equipement_tva\").val(\"5\"))})),\$(\"body\").on(\"change\",\".equipement-zone\",(function(e){6==\$(this).val()?\$(\$(this).data(\"target\")).css(\"visibility\",\"inherit\"):\$(\$(this).data(\"target\")).css(\"visibility\",\"hidden\")})),\$(\"body\").on(\"click\",\".add_complement_adresse\",(function(e){\$(\$(this).data(\"target-grid\")).dxDataGrid(\"instance\").addRow()})),\$(\"body\").on(\"change\",\".form-input-change\",(function(e){var t=\$(this).attr(\"form\"),i=\$(\"#\"+t).data(\"idequipement\");\$(\"#simulateur_data_change-\"+i).val(\$(e.target).attr(\"name\"));\$(\"#\"+t).submit()})),\$(\"body\").on(\"changed.bs.select\",(function(e,t,i,n){var a=e.target.options[t].value,r=e.target.options[t].text;if(0!=\$(\"#tr-\"+a).length||n.includes(a))\$(\"#tr-\"+a).remove();else{var o=document.createElement(\"tr\");\$(o).attr(\"id\",\"tr-\"+a),o.innerHTML=\"<td>\"+r+\"</td><td></td>\",\$(\"#simulateur-table-options tbody\").append(o.outerHTML)}})),\$(\"body\").on(\"click\",\".choix-block\",(function(e){var t=\$(\".choix-block.bg-vert\").data(\"target\"),i=\$(this).data(\"target\");\$(\".choix-block\").removeClass(\"bg-vert border-vert\").addClass(\"border-grey-medium\"),\$(this).addClass(\"border-vert\").addClass(\"bg-vert\"),null!=t&&t!=i&&\$(t).hide(),\$(\"#form_add_equipement_type\").val(i),\$(i).show(),\$(\"#submit-add-equipement\").show()})),\$(\"#submit-add-equipement\").on(\"click\",(function(e){if(e.preventDefault(),\"#choix-recherche-equipement\"==\$(\"#form_add_equipement_type\").val()){var t=\$(\"select[name=equipement_search_value] option:selected\");if(1==t.length&&1==t.data(\"actif\")){var i=\"Attention, cet équipement est toujours actif chez un autre client : \"+('<a href=\"'+t.data(\"link\")+'\" target=\"_blank\">allez voir</a>')+\". <br>Voulez vous tout de même ajouter cet équipement à ce client ?\";return DevExpress.ui.dialog.confirm(i,\"Equipement actif\").done((function(e){e&&(window.formChanged=!1,\$(\"#form-add-equipement\").submit())})),!1}}return!0})),\$(\"body\").on(\"submit\",\"#form-change-souscripteur\",(function(e){return null!=\$(\"#new_client_souscripteur\").val()&&\"\"!=\$(\"#new_client_souscripteur\").val()||\"new\"==\$(\"#form-change-souscripteur-type\").val()&&(\"\"!=\$(\"#client_nom-nouveau_souscripteur\").val()||\"\"!=\$(\"#client_entreprise-nouveau_souscripteur\").val())&&0!=\$('input[name=\"change-equipements[]\"]:checked').length?(\$(\"#close-popup-changement-souscripteur\").click(),window.formChanged=!1,!0):(\$(\"#messages-popup-change\").show(),\$(\"#messages-popup-change .alert\").html(\$(\"#message-to-display\").html()),\$(\"#messages-popup-change .alert\").show(),!1)})),\$(\"body\").on(\"submit\",\".submit-add-utilisateur\",(function(e){var t=\$(this).data(\"id-equipement\"),i=\$(\"#form-add-utilisateur-type-\"+t).val();if(\"recherche\"==i)return null!=\$(\"#new_client_utilisateur-\"+t).val()&&\"\"!=\$(\"#new_client_utilisateur-\"+t).val()||(\$(\"#messages-popup-change\").show(),\$(\"#messages-popup-change .alert\").html(\$(\"#message-to-display-recherche\"+t).html()),\$(\"#messages-popup-change .alert\").show(),!1);if(\"new\"==i){var n=\$(\"#type_client-\"+t).val();return 1==n&&null!=\$(\"#client_nom-\"+t).val()&&\"\"!=\$(\"#client_nom-\"+t).val()||2==n&&null!=\$(\"#client_entreprise-\"+t).val()&&\"\"!=\$(\"#client_entreprise-\"+t).val()||(\$(\"#messages-popup-add-utilisateur-\"+t).show(),\$(\"#messages-popup-add-utilisateur-\"+t+\" .alert\").html(\$(\"#message-to-display-new\"+t).html()),\$(\"#messages-popup-add-utilisateur-\"+t+\" .alert\").show(),!1)}return!1})),\$(\"body\").on(\"change\",\".change_equipement\",(function(e){var t=\$(this).data(\"form-change\"),i=\$(this).attr(\"name\"),n=\$(this).data(\"idequipement\");\$(t+\" > input[name=type_change]\").val(i),\$(t+\" > input[name=data_value]\").val(\$(this).val()),\$(t).data(\"target-html\",\$(this).data(\"target\")),\$(t).submit(),\"10\"==\$(this).val()?\$(\"#numero_serie_secondaire-\"+n).removeClass(\"hide\"):\$(\"#numero_serie_secondaire-\"+n).addClass(\"hide\")})),\$(\"body\").on(\"click\",\"#btn-save-client\",(function(e){e.preventDefault();var t=\$(this).attr(\"form\"),i=!1,n=\$('input[name=\"id_equipement_update\"]').val();0==\$(\"#\"+t)[0].checkValidity()?(\$(\"#\"+t)[0].reportValidity(),\$(\"#\"+t)[0].forEach((function(e){0==e.validity.valid&&(\$(e).data(\"idequipement\")==n||null==\$(e).data(\"idequipement\")&&\$(e).is(\":visible\"))&&(i=!0)})),i?e.preventDefault():\$(\"#\"+t).submit()):\$(\"#\"+t).submit()})),\$(\"body\").on(\"submit\",\".form-cas-particulier\",(function(e){eval(\$(this).data(\"js\"))})),\$(\"body\").on(\"click\",\"#btn-modif-client-equipement\",(function(e){localStorage.setItem(\"scrollClient\",window.scrollY)})),\$(\"body\").on(\"click\",\".telephone-fr\",(function(e){var t='input[name=\"'+\$(this).data(\"target-mask\")+'\"]',i='input[name=\"'+\$(this).data(\"target-input-fr\")+'\"]';\$(this).hasClass(\"opacity-25\")?(\$(this).removeClass(\"opacity-25\"),\$(t).mask(\"00.00.00.00.00\",{translation:{0:{pattern:/[0-9]/,recursive:!1}}}),\$(t).attr(\"minlength\",\"14\").attr(\"pattern\",\"[0-9]{2}.[0-9]{2}.[0-9]{2}.[0-9]{2}.[0-9]{2}\"),\$(i).val(1)):(\$(i).val(0),\$(this).addClass(\"opacity-25\"),\$(t).mask(\"9999999999\"),\$(t).removeAttr(\"minlength\").removeAttr(\"pattern\"))})),\$(\"body\").on(\"click\",\"#btn-open-change-souscripteur\",(function(e){\$('input[name=\"change-equipements[]\"]:checked').each((function(e){\$(this).prop(\"checked\",!0),\$(this).attr(\"checked\",\"\"),\$(\$(this).data(\"change-target\")).show()})),\$('input[name=\"change-equipements[]\"]:not(:checked)').each((function(e){\$(this).prop(\"checked\",!1),\$(this).removeAttr(\"checked\"),\$(\$(this).data(\"change-target\")).hide()}))})),\$(\"body\").on(\"change\",\".pref_a_partir_du\",(function(e){var t=\"input[name=date_avant_le]\",i=\"input[name=date_entre_debut]\",n=\"input[name=date_entre_fin]\",a=\"input[name=date_a_partir_du]\";if(\$(this).val()){var r=\$(this).datepicker(\"getDate\");\$(t).val()||\$(t).datepicker(\"option\",\"minDate\",r),\$(i).val()||\$(i).datepicker(\"option\",\"minDate\",r),\$(n).val()||\$(n).datepicker(\"option\",\"minDate\",r)}else\"\"!=\$(i).val()?\$(a).datepicker(\"option\",\"minDate\",\$(i).datepicker(\"getDate\")):(\$(t).datepicker(\"option\",\"minDate\",null),\$(i).datepicker(\"option\",\"minDate\",null),\$(n).datepicker(\"option\",\"minDate\",null),\$(a).datepicker(\"option\",\"minDate\",null))})),\$(\"body\").on(\"change\",\".pref_avant_le\",(function(e){var t=\"input[name=date_a_partir_du]\",i=\"input[name=date_entre_debut]\",n=\"input[name=date_entre_fin]\";if(\$(this).val()){var a=\$(this).datepicker(\"getDate\");a.setDate(a.getDate()-1),\$(t).datepicker(\"option\",\"maxDate\",a),\$(i).val()||\$(i).datepicker(\"option\",\"maxDate\",a),\$(n).val()||\$(n).datepicker(\"option\",\"maxDate\",a),a<\$(t).datepicker(\"getDate\")&&\$(t).val(\"\")}else\"\"!=\$(n).val()?\$(t).datepicker(\"option\",\"maxDate\",\$(n).datepicker(\"getDate\")):(\$(t).datepicker(\"option\",\"maxDate\",null),\$(i).datepicker(\"option\",\"maxDate\",null),\$(n).datepicker(\"option\",\"maxDate\",null),\$(\"input[name=date_avant_le]\").datepicker(\"option\",\"maxDate\",null))})),\$(\"body\").on(\"change\",\".pref_entre_debut\",(function(e){var t=\"input[name=date_a_partir_du]\",i=\"input[name=date_avant_le]\",n=\"input[name=date_entre_fin]\";if(\$(this).val()){var a=\$(this).datepicker(\"getDate\");\$(n).datepicker(\"option\",\"minDate\",a),a>\$(n).datepicker(\"getDate\")&&\$(n).val(\"\"),\$(t).datepicker(\"option\",\"minDate\",a),\$(i).datepicker(\"option\",\"minDate\",a)}else\"\"!=\$(t).val()?\$(n).datepicker(\"option\",\"minDate\",\$(t).datepicker(\"getDate\")):(\$(n).datepicker(\"option\",\"minDate\",null),\$(t).datepicker(\"option\",\"minDate\",null),\$(i).datepicker(\"option\",\"minDate\",null),\$(\"input[name=date_entre_debut]\").datepicker(\"option\",\"minDate\",null))})),\$(\"body\").on(\"change\",\".pref_entre_fin\",(function(e){var t=\"input[name=date_a_partir_du]\",i=\"input[name=date_avant_le]\",n=\"input[name=date_entre_debut]\";if(\$(this).val()){var a=\$(this).datepicker(\"getDate\");\$(n).datepicker(\"option\",\"maxDate\",a),a<\$(n).datepicker(\"getDate\")&&\$(n).val(\"\"),\$(t).datepicker(\"option\",\"maxDate\",a),\$(i).datepicker(\"option\",\"maxDate\",a)}else\"\"!=\$(i).val()?\$(n).datepicker(\"option\",\"maxDate\",\$(i).datepicker(\"getDate\")):(\$(n).datepicker(\"option\",\"maxDate\",null),\$(t).datepicker(\"option\",\"maxDate\",null),\$(i).datepicker(\"option\",\"maxDate\",null),\$(\"input[name=date_entre_fin]\").datepicker(\"option\",\"maxDate\",null))})),\$(\"body\").on(\"click\",\".picto-group-contrat\",(function(e){\$.ajax({method:\"GET\",url:\$(this).data(\"path\"),dataType:\"json\",success:function(e){e.forEach((function(e){window.open(e)}))}})})),\$(\"body\").on(\"click\",\".intervention_client\",(function(){\$(\".intervention_client\").css(\"background\",\"\"),\$(this).css(\"background\",\"#F2F2F2\");var e=\$(this).data(\"id\");\$.ajax({url:\"/equipement/intervention/result/\"+e,type:\"GET\",success:function(e){\$(\"#result_intervention_client\").html(e)}}),\$.ajax({url:\"/equipement/intervention/facturation/\"+e,type:\"GET\",success:function(e){\$(\"#result_intervention_client_facturation\").html(e)}})})),document.removeEventListener(\"ready turbo:load\",loadClient),\$(document).on(\"ready turbo:load\",loadClient)}},e=>{\"use strict\";e.O(0,[818,755,949],(()=>{return t=53829,e(e.s=t);var t}));e.O()}]);", "@public_path/build/client.67a0ea33.js", "/builds/dev/refonte_sav/public/build/client.67a0ea33.js");
    }
}
