PageSourceSearch

https://topnanny.es/packs/js/6879-adc2d69650ff3ba483f5.chunk.js

js topnanny.es collected 2026-10-03 21:33:35 UTC 21,233 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d279c4ca-a572-47f3-aefe-44ad4fc5f30f",e._sentryDebugIdIdentifier="sentry-dbid-d279c4ca-a572-47f3-aefe-44ad4fc5f30f")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"6ffbd01cf0691a08705f62d968183afee02bdfcf"},(globalThis.webpackChunktop_webgroup=globalThis.webpackChunktop_webgroup||[]).push([[6879],{66879(e,t,n){n.d(t,{initContractScheduleForm:()=>a});var s=n(95616);const a=async function(){const e=await async function(){const e=await Promise.resolve().then(n.bind(n,45365)),t=e.dayjs||e,{default:s}=await n.e(358).then(n.t.bind(n,90358,23)),{default:a}=await n.e(6973).then(n.t.bind(n,6973,23)),{default:i}=await n.e(8809).then(n.t.bind(n,88809,23));return t.extend(a),t.extend(i),t.extend(s),t}();s(".contract-schedule__location input:radio").change(function(){"decided"===s(this).val()&&s(this).is(":checked")?s(".contract-schedule__location-details").show("slow"):s(".contract-schedule__location-details").hide("slow")}).change();const t=function(){return"assmat"===s("#schedule-edit-form").attr("contract_type")},a=function(){return"ged"===s("#schedule-edit-form").attr("contract_type")},i=function(){return"person"===s("#schedule-edit-form").attr("contract_type")},r=function(){return s('input[name="contract_schedules[known_end_date]"]').length>0},c=parseInt(s(".end-date-field").data("limitedMaxMonths"),10)||18,o={minTotal:52,regular:36,holidays:16,minNotWorked:5,limitedContractMax:Math.round(78*c/18)};let d;d=r()?{strategy:void 0,ready:function(){return this.$end_date().length>0},$start_date:function(){return this._start_date||(this._start_date=s('#schedule-edit-form input[name="contract_schedules[start_date]"]')),this._start_date},$end_date:function(){return this._end_date||(this._end_date=s('input[name="contract_schedules[considered_end_date]"]')),this._end_date},end_date:function(){this.$end_date().val()},$end_date_field:function(){return this._end_date_field||(this._end_date_field=s(".end-date-field")),this._end_date_field},ends_before_one_year:function(){return this.before_one_year.total_weeks()<o.minTotal?"yes":"no"},$ends_before_one_year:function(){return this._ends_before_one_year||(this._ends_before_one_year=s('input[name="contract_schedules[ends_before_one_year]"]')),this._ends_before_one_year},set_ends_before_one_year:function(){this.$ends_before_one_year().prop("value",this.ends_before_one_year())},$weeks_worked_hint:function(){return s(".message.weeks_worked")},$weeks_worked_values:function(){return s("span.weeks_worked")},$short_duration_hint:function(){return s(".short_duration")},$weeks_worked_error:function(){return s(".weeks_worked_error")},has_errors:function(){return this.$weeks_worked_error().is(":visible")},cdd_duration_cap_applies:function(){if(!0===this.$end_date_field().data("cddDurationCapAlways"))return!0;const e=s('input[name="contract_schedules[known_end_date]"]'),t=e.filter(":radio");return t.length?"true"===t.filter(":checked").val():"true"===String(e.val())},update_strategy:function(){this.before_one_year.deactivate(),this.later.deactivate(),this.set_ends_before_one_year(),"yes"===this.ends_before_one_year()?this.strategy=this.before_one_year:this.strategy=this.later,this.strategy.activate()},total_weeks_changed:function(){this.update_strategy();const e=this.strategy;this.$end_date_field().removeClass("is-invalid");const t=this.before_one_year.total_weeks();if(null!=t){let e="";t<=0?e="La date de fin doit \xeatre apr\xe8s la date de d\xe9but du contrat !":this.cdd_duration_cap_applies()&&t>o.limitedContractMax&&(e=`Un contrat \xe0 dur\xe9e d\xe9termin\xe9e ne peut exc\xe9der ${c} mois.`),""!==e?(this.$weeks_worked_error().html(e),this.$weeks_worked_error().show(),this.$end_date_field().addClass("is-invalid")):(t<=10&&this.$short_duration_hint().show(),this.$weeks_worked_values().text(t+" semaine"+(t>1?"s":"")),this.$weeks_worked_hint().show())}e.$absence_weeks_label().show(),_.update_not_worked_weeks()},before_one_year:{container:function(){return s(".contract_ends")},$absence_weeks_label:function(){return s(".before_one_year")},$conclusion:function(){return s(".help-notice")},activate:function(){this.$absence_weeks_label().show(),this.container().show()},deactivate:function(){d.$weeks_worked_hint().hide(),d.$weeks_worked_error().hide(),d.$short_duration_hint().hide(),this.$absence_weeks_label().hide(),this.container().hide()},total_weeks:function(){const t=d.$start_date().val(),n=d.$end_date().val();if(t&&n){const s=e(t,"DD/MM/YYYY",!0),a=e(n,"DD/MM/YYYY",!0);let i=parseFloat(e.duration(a-s).asWeeks().toFixed(1));return i>0&&a.isoWeekday()<=s.isoWeekday()&&(i+=1),Math.ceil(i)}},minimum_not_worked_weeks:function(){return Math.max(0,o.minNotWorked-(o.minTotal-Math.min(this.total_weeks(),o.minTotal)))}},later:{container:function(){return s(".contract_ends")},$absence_weeks_label:function(){return s(".later")},has_errors:function(){return!1},$end_date:function(){return this._end_date||(this._end_date=s('input[name="contract_schedules[considered_end_date]"]')),this._end_date},activate:function(){this.$absence_weeks_label().show(),this.container().show()},deactivate:function(){d.$weeks_worked_hint().hide(),d.$weeks_worked_error().hide(),d.$short_duration_hint().hide(),this.$absence_weeks_label().hide(),this.container().hide()},total_weeks:function(){return o.minTotal},minimum_not_worked_weeks:function(){return o.minNotWorked}}}:{strategy:void 0,$radios:function(){return this._radios||(this._radios=s('input[name="contract_schedules[ends_before_one_year]"]')),this._radios},$selectedRadio:function(){return this.$radios().filter('[type="radio"]').length>0?this.$radios().filter(":checked"):this.$radios()},ready:function(){return this.$radios().length>0},update_strategy:function(){this.before_one_year.deactivate(),this.later.deactivate(),0===this.$selectedRadio().length&&this.$radios().filter("[value=no]").prop("checked",!0);const e=this.$selectedRadio().val();"yes"===e?this.strategy=this.before_one_year:(this.strategy=this.later,this.strategy.unknown="unknown"===e),this.strategy.activate()},before_one_year:{container:function(){return this._container||(this._container=s(".contract_ends.before_one_year")),this._container}
1,$start_date:function(){return s('#schedule-edit-form input[name="contract_schedules[start_date]"]')},$end_date:function(){return this.container().find('input[name="contract_schedules[considered_end_date]"]')},$weeks_worked_hint:function(){return this.container().find(".message.weeks_worked")},$weeks_worked_error:function(){return this.container().find(".weeks_worked_error")},$weeks_worked_values:function(){return this.container().find("span.weeks_worked")},$short_duration_hint:function(){return s(".short_duration")},$conclusion:function(){return this.container().find(".help-notice")},has_errors:function(){return this.$weeks_worked_error().is(":visible")},activate:function(){this.$start_date().on("changeDate",this,this.total_weeks_changed),this.$end_date().on("changeDate",this,this.total_weeks_changed).trigger("changeDate"),(a()||i())&&h.update_strategy(),this.container().show()},deactivate:function(){this.$start_date().off("change"),this.$end_date().off("change"),this.$short_duration_hint().hide(),this.$weeks_worked_hint().hide(),this.$weeks_worked_error().hide(),this.container().hide()},total_weeks_changed:function(e){const t=e.data;t.$short_duration_hint().hide(),t.$weeks_worked_hint().hide(),t.$weeks_worked_error().hide(),s(".end-date-field").removeClass("is-invalid");const n=t.total_weeks();if(null!=n)if(n>0&&n<o.minTotal)n<=10&&t.$short_duration_hint().show(),t.$weeks_worked_values().text(n+" semaine"+(n>1?"s":"")),t.$weeks_worked_hint().show();else{let e="";e=n<=0?"La date de fin doit \xeatre apr\xe8s la date de d\xe9but du contrat !":"Votre contrat fera finalement 52 semaines au moins. Veuillez choisir l'option <i>Oui, un an au moins</i>.",t.$weeks_worked_error().html(e),t.$weeks_worked_error().show(),s(".end-date-field").addClass("is-invalid")}s("#contract_schedule_form").trigger("contract_ends:total_weeks_changed")},total_weeks:function(){const t=this.$start_date().val(),n=this.$end_date().val();if(t&&n){const s=e(t,"DD/MM/YYYY",!0),a=e(n,"DD/MM/YYYY",!0);let i=parseFloat(e.duration(a-s).asWeeks().toFixed(1));return i>0&&a.isoWeekday()<=s.isoWeekday()&&(i+=1),Math.ceil(i)}},minimum_not_worked_weeks:function(){return Math.max(0,o.minNotWorked-(o.minTotal-this.total_weeks()))}},later:{container:function(){return s(".contract_ends.later")},unknown:void 0,unknown_container:function(){return this.container().filter(".unknown")},has_errors:function(){return!1},activate:function(){this.container().show(),this.unknown||this.unknown_container().hide(),(a()||i())&&h.update_strategy(),s("#contract_schedule_form").trigger("contract_ends:total_weeks_changed")},deactivate:function(){this.container().hide()},total_weeks:function(){return o.minTotal},minimum_not_worked_weeks:function(){return o.minNotWorked}}};const _={$hidden_childminder_absence_weeks:function(){return s(".contract-schedule__childminder-absence-ged")},$childminder_absence_weeks:function(){return this._childminder_absence_weeks||(this._childminder_absence_weeks=s(".contract-schedule__childminder-absence")),this._childminder_absence_weeks},$childminder_absence_weeks_parent:function(){return this._childminder_absence_weeks_parent||(this._childminder_absence_weeks_parent=this.$childminder_absence_weeks().parent()),this._childminder_absence_weeks_parent},childminder_absence_weeks:function(){return parseInt(this.$childminder_absence_weeks().find("option:selected").val()||this.$childminder_absence_weeks().val())},ready:function(){return this.$year_type().length>0},max_childminder_absence_weeks:function(){return this.$childminder_absence_weeks().attr("max_childminder_absence_weeks")},$child_absence_weeks:function(){return this._child_absence_weeks||(this._child_absence_weeks=s(".contract-schedule__child-absence")),this._child_absence_weeks},$child_absence_weeks_parent:function(){return this._child_absence_weeks_parent||(this._child_absence_weeks_parent=this.$child_absence_weeks().parent()),this._child_absence_weeks_parent},child_absence_weeks:function(){return this.$child_absence_weeks().filter("select").length>0?parseInt(this.$child_absence_weeks().find("option:selected").val()):parseInt(this.$child_absence_weeks().val())},absence_weeks:function(){let e=this.childminder_absence_weeks()+this.child_absence_weeks();return a()?e=parseInt(s(".contract-schedule__ged-absence").val()):i()&&(e=parseInt(s(".contract-schedule__person-absence").val())),e},$conclusion:function(){return this._conclusion||(this._conclusion=s(".contract_ends.conclusion")),this._conclusion},$year_type:function(){return s(".contract-schedule__year-type")},selected:function(){return this.$year_type().val()},update_week_select:function(e,t,n){if(0===e.filter("select").length)return;const a=e.find("option:selected").val();let i="";(r()||d.strategy.total_weeks()<o.minTotal)&&(i+=s("<option>").val("").text("").wrap("<p>").parent().html());for(let r=t;r<=n;r++)i+=s("<option>").val(r).text(r+(r>1?" semaines":" semaine")).wrap("<p>").parent().html();e.html(i),e.children('[value="'+a+'"]').prop("selected",!0)},update_not_worked_weeks:function(){this.$childminder_absence_weeks_parent().hide(),this.$child_absence_weeks_parent().hide();const e=d.strategy;if(!e)return;let t;t=a()||i()?Math.min(o.minNotWorked,e.total_weeks()):e.total_weeks(),t&&t>0&&((a()||i())&&this.$hidden_childminder_absence_weeks()?this.$hidden_childminder_absence_weeks().val(t===e.total_weeks()?t-1:t):(this.update_week_select(this.$childminder_absence_weeks(),e.minimum_not_worked_weeks(),t),this.update_week_select(this.$child_absence_weeks(),0,t),this.$childminder_absence_weeks().parent().show(),this.$child_absence_weeks().parent().show())),this.$childminder_absence_weeks().change()},conclude:function(){this.$conclusion().hide();if(!d.strategy||""===this.$childminder_absence_weeks().val())return void h.hideScheduleDispatcher();const e=this.childminder_absence_weeks()>o.minNotWorked||this.child_absence_weeks()>0?"partial":"full";if(this.$conclusion().find(".year_type").hide(),this.$conclusion().find(".year_type."+e).show(),!r()){const e=this.childminder_absence_weeks()+this.child_absence_weeks(),t=e>1?" semaines":" semaine",n=a()||i()?" d'absence":" d'absence planifi\xe9e";this.$conclusion().find(".not_worked_weeks_number").html("("+e+t+n+")")}this.$conclusion().show(),this.$year_type().val(e).trigger("change")}},h={year_type:function(){return this[_.selected()]},ready:function(){return this.$schedules_dispatch().length>0},$schedules_dispatch:function(){return s("#schedules-dispatch")},$schedules_weeks:function(){return s(".contract-schedule__schedule-weeks")},schedule_type:function(){return s(".contract-schedule__schedule-type").val()},$schedules_change:function(){return s("#schedulesChange")},dispatchable_weeks:function(){return d.strategy.total_weeks()-(this.year_type()?this.year_type().weeks_not_paid():0)},hideScheduleDispatcher:function(){t()&&this.$schedules_dispatch().hide()},update_strategy:function(){this.full.deactivate(),this.partial.deactivate();const e=this.year_type();e&&e.activate(),this.autofill(),this.validate()},autofill:function(){this.$schedules_dispatch().show(),this.$schedules_change().show(),this.year_type()?1===this.$schedules_weeks().length?(this.$schedules_weeks().val(this.dispatchable_weeks()),this.hideScheduleDispatcher(),0===this.year_type().weeks_not_paid()&&this.$schedules_change().hide()):"holidays"===this.schedule_type()&&this.dispatchable_weeks()===o.minTotal?(this.$schedules_weeks().filter(".regular").val(o.regular),this.$schedules_weeks().filter(".holidays").val(o.holidays),this.hideScheduleDispatcher()):this.$schedules_weeks().each(function(){const e=s(this);e.val()||e.val(0)}):this.hideScheduleDispatcher()},validate:function(){if(!this.ready())return;const e=s(".too-many-weeks"),t=s(".not-enough-weeks"),n=s(".weeks-ok"),a=s("span.alert_text"),i=s("span.alert_total");if(e.hide(),t.hide(),n.hide(),r()){if(d.has_errors())return}else if(d.strategy.has_errors())return;let c=0;this.$schedules_weeks().each(function(){c+=parseInt(s(this).val()||0)});const o=this.dispatchable_weeks();let _=o-c;_>0?(1===_?a.html(" semaine reste \xe0 r\xe9partir"):a.html(" semaines restent \xe0 r\xe9partir"),i.html(_),t.show()):_<0?(_=Math.abs(_),1===_?a.html(" semaine en trop, r\xe9duisez le nombre :)"):a.html(" semaines en trop, r\xe9duisez le nombre :)"),i.html(_),e.show()):(i.html(o),n.show())},full:{$message:function(){return s("#full-message")},$schedules_notice:function(){return s("#full-year-schedules-notice")},weeks_not_paid:function(){return t()?0:a()?parseInt(s(".contract-schedule__ged-absence").val()):i()?parseInt(s(".contract-schedule__person-absence").val()):0},activate:function(){this.$message().show(),this.$schedules_notice().show()},deactivate:function(){this.$schedules_notice().hide(),this.$message().hide()}},partial:{$message:function(){return s("#partial-message")},$schedules_notice:function(){return s("#partial-year-schedules-notice")},weeks_not_paid:function(){return _.absence_weeks()},activate:function(){this.$message().show(),this.$schedules_notice().show()},deactivate:function(){this.$schedules_notice().hide(),this.$message().hide()}}};r()?(s('input[name="contract_schedules[known_end_date]"], .date_picker').change(function(){d.total_weeks_changed()}).change(),s("#contract_schedules_known_end_date_true, #contract_schedules_known_end_date_false").on("change",function(){s(".known_end_date_label").toggle(s("#contract_schedules_known_end_date_true").prop("checked")),s(".unknown_end_date_label").toggle(s("#contract_schedules_known_end_date_false").prop("checked"))}).change()):(d.$radios().change(function(){d.update_strategy()}).change(),s("#contract_schedule_form").on("contract_ends:total_weeks_changed",function(){_.update_not_worked_weeks()}).trigger("contract_ends:total_weeks_changed"));const l=s("#table-contract-schedules");if(l.length&&h.validate(),l.on("propertychange paste keyup change","td.week-column .onchange",function(){h.validate()}),_.$child_absence_weeks().change(function(){_.conclude()}).change(),_.$childminder_absence_weeks().change(function(){_.conclude()}).change(),s(".contract-schedule__start-date").on("changeDate",function(){h.update_strategy()}),s('input[name="contract_schedules[considered_end_date]"]').on("changeDate",function(){h.update_strategy()}),s('input[name="contract_schedules[year_type]"]').change(function(){h.update_strategy()}).change(),s("#contract_schedules_standalone_deductible_days, #schedules_contract_standalone_deductible_days").on("change",function(){const e=s(this).val();s(".standalone_deductible_days_presence").toggle("0"!==e),"0"!==e&&function(){const e=s(".planned-dates-picker");
1if(!e.length||e.data("plannedDatesInitialized"))return;e.data("plannedDatesInitialized",!0);const t=["Janvier","F\xe9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xfbt","Septembre","Octobre","Novembre","D\xe9cembre"],n=e.find(".planned-dates-picker__input"),a=e.find(".planned-dates-picker__hidden"),i=e.find(".planned-dates-picker__tags"),r=e.find(".planned-dates-picker__counter"),c=e.find(".planned-dates-picker__error"),o=new Set,d=a.val();d&&d.split(",").map(e=>e.trim()).filter(Boolean).forEach(e=>o.add(e));function _(e,t){let n=s(`#${e}`);if(n.length||(n=s(`#${t}`)),n.is("select"))return n;const a=n.find("select");return a.length?a:n}function h(){const e=parseInt(_("contract_schedules_standalone_deductible_days","schedules_contract_standalone_deductible_days").val(),10);return isNaN(e)?null:e}function l(){const e=parseInt(_("contract_schedules_max_standalone_deductible_days_per_month","schedules_contract_max_standalone_deductible_days_per_month").val(),10);return isNaN(e)?null:e}function u(e){if(!e)return null;const t=e.split("/");return 3!==t.length?null:`${t[2]}-${t[1].padStart(2,"0")}-${t[0].padStart(2,"0")}`}function f(e){const t=e.split("-");return`${t[2]}/${t[1]}/${t[0]}`}function w(e){return e.substring(0,7)}function k(e){const[n,s]=e.split("-");return`${t[parseInt(s,10)-1]} ${n}`}function p(){const e={};return o.forEach(t=>{const n=w(t);e[n]=(e[n]||0)+1}),e}function m(){a.val([...o].sort().join(","))}function b(){const e=h(),t=l(),n=[...o].sort(),s=p(),a=null!==e?e:"\u2014",d=null!==e&&o.size>e;r.html(`<span class="${d?"text-danger fw-bold":""}">${o.size} / ${a} jour(s) s\xe9lectionn\xe9(s)</span>`);const _=[];d&&_.push(`Vous avez s\xe9lectionn\xe9 ${o.size} jour(s), mais le maximum est de ${e}. Veuillez retirer ${o.size-e} jour(s).`);const u=new Set;if(null!==t&&Object.keys(s).forEach(e=>{s[e]>t&&(u.add(e),_.push(`${k(e)} : ${s[e]} jour(s) s\xe9lectionn\xe9(s), maximum ${t}.`))}),_.length?c.html(`<div class="alert alert-danger alert--small mt-2 mb-0"><ul class="mb-0">${_.map(e=>`<li>${e}</li>`).join("")}</ul></div>`):c.empty(),0===n.length)i.html('<span class="form-text">Aucune date s\xe9lectionn\xe9e.</span>');else{const e={};n.forEach(t=>{const n=w(t);e[n]||(e[n]=[]),e[n].push(t)});let s="";Object.keys(e).sort().forEach(n=>{const a=u.has(n),i=a?"text-danger fw-bold":"text-muted",r=null!==t?` (${e[n].length}/${t})`:"";s+='<div class="mb-2">',s+=`<div class="small ${i} mb-1">${k(n)}${r}</div>`,s+='<div class="d-flex flex-wrap gap-1">',e[n].forEach(e=>{s+=`<span class="tag tag--small ${a?"tag--danger":"tag--blue"}">`,s+=`${f(e)}`,s+=`<button type="button" class="planned-dates-picker__remove" data-date="${e}" aria-label="Retirer ${f(e)}" style="background:none;border:none;margin-left:4px;font-weight:bold;cursor:pointer;opacity:0.7;">&times;</button>`,s+="</span>"}),s+="</div></div>"}),i.html(s)}m()}let g="";n.on("changeDate change",function(){const e=n.val();if(!e||e===g)return;g=e;const t=u(e);t&&!o.has(t)?(o.add(t),n.val(""),g="",b()):n.val("")}),i.on("click",".planned-dates-picker__remove",function(){o.delete(s(this).data("date")),b()}),s("#contract_schedules_standalone_deductible_days, #schedules_contract_standalone_deductible_days, #contract_schedules_max_standalone_deductible_days_per_month, #schedules_contract_max_standalone_deductible_days_per_month").on("change.plannedDates",function(){b()}),b()}()}).change(),s("#contract_schedules_allow_schedule_change_true").on("change",function(){s(".schedule_change_notice_period_wrapper").toggle(s(this).prop("checked"))}).change(),s("#contract_schedules_allow_schedule_change_false").on("change",function(){s(this).prop("checked")&&s(".schedule_change_notice_period_wrapper").hide()}).change(),a()){const e=await async function(){const{default:e}=await n.e(7543).then(n.bind(n,67543));return e}();e.init(d,o),e.bindEvents(h)}if(i()){const e=await async function(){const{default:e}=await n.e(3102).then(n.bind(n,43102));return e}();e.init(d,o),e.bindEvents(h)}}}}]);
2//# sourceMappingURL=6879-adc2d69650ff3ba483f5.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.