billjee divers
authorKilian Saffran <ksaffran@dks.lu>
Sat, 10 Aug 2019 08:29:50 +0000 (10:29 +0200)
committerKilian Saffran <ksaffran@dks.lu>
Sat, 10 Aug 2019 08:29:50 +0000 (10:29 +0200)
124 files changed:
.htaccess
backoffice/api/lib/session.pm
backoffice/api/process.cgi
backoffice/css/w3pro.css
backoffice/images/faces/.DS_Store [deleted file]
backoffice/images/faces/face1.jpg [deleted file]
backoffice/images/faces/face10.jpg [deleted file]
backoffice/images/faces/face11.jpg [deleted file]
backoffice/images/faces/face12.jpg [deleted file]
backoffice/images/faces/face13.jpg [deleted file]
backoffice/images/faces/face14.jpg [deleted file]
backoffice/images/faces/face15.jpg [deleted file]
backoffice/images/faces/face16.jpg [deleted file]
backoffice/images/faces/face17.jpg [deleted file]
backoffice/images/faces/face18.jpg [deleted file]
backoffice/images/faces/face19.jpg [deleted file]
backoffice/images/faces/face2.jpg [deleted file]
backoffice/images/faces/face20.jpg [deleted file]
backoffice/images/faces/face21.jpg [deleted file]
backoffice/images/faces/face22.jpg [deleted file]
backoffice/images/faces/face23.jpg [deleted file]
backoffice/images/faces/face24.jpg [deleted file]
backoffice/images/faces/face25.jpg [deleted file]
backoffice/images/faces/face26.jpg [deleted file]
backoffice/images/faces/face27.jpg [deleted file]
backoffice/images/faces/face3.jpg [deleted file]
backoffice/images/faces/face4.jpg [deleted file]
backoffice/images/faces/face5.jpg [deleted file]
backoffice/images/faces/face6.jpg [deleted file]
backoffice/images/faces/face7.jpg [deleted file]
backoffice/images/faces/face8.jpg [deleted file]
backoffice/images/faces/face9.jpg [deleted file]
backoffice/images/icons/chevron-left.svg [new file with mode: 0644]
backoffice/images/icons/chevron-right.svg [new file with mode: 0644]
backoffice/images/icons/edit.svg [new file with mode: 0644]
backoffice/images/icons/list.svg [new file with mode: 0644]
backoffice/images/icons/plus.svg [new file with mode: 0644]
backoffice/images/icons/publish.svg [new file with mode: 0644]
backoffice/images/icons/remove.svg [new file with mode: 0644]
backoffice/images/icons/search.svg [new file with mode: 0644]
backoffice/images/icons/send.svg [new file with mode: 0644]
backoffice/images/icons/settings.svg [new file with mode: 0644]
backoffice/images/icons/unpublish.svg [new file with mode: 0644]
backoffice/index.cgi
backoffice/js/backoffice.js
backoffice/js/request.js
backoffice/tmpl/block/calendar.tt [new file with mode: 0644]
backoffice/tmpl/block/dlgcontactpublisher.tt [new file with mode: 0644]
backoffice/tmpl/block/dlgdelete.tt [new file with mode: 0644]
backoffice/tmpl/block/dlgpublish.tt [new file with mode: 0644]
backoffice/tmpl/block/dlgunpublish.tt [new file with mode: 0644]
backoffice/tmpl/block/form.tt [new file with mode: 0644]
backoffice/tmpl/block/javascript.tt
backoffice/tmpl/block/toolbar.tt [new file with mode: 0644]
backoffice/tmpl/module/applications/index.js
backoffice/tmpl/module/applications/index.tt
backoffice/tmpl/module/billjee/css.tt
backoffice/tmpl/module/billjee/form_attendees.tt [deleted file]
backoffice/tmpl/module/billjee/form_billet.js [new file with mode: 0644]
backoffice/tmpl/module/billjee/form_billet.tt [new file with mode: 0644]
backoffice/tmpl/module/billjee/form_offer.js [deleted file]
backoffice/tmpl/module/billjee/form_offer.tt [deleted file]
backoffice/tmpl/module/billjee/form_request.js [deleted file]
backoffice/tmpl/module/billjee/form_request.tt [deleted file]
backoffice/tmpl/module/billjee/form_settings.js [new file with mode: 0644]
backoffice/tmpl/module/billjee/form_settings.tt [new file with mode: 0644]
backoffice/tmpl/module/billjee/form_template.js [deleted file]
backoffice/tmpl/module/billjee/form_template.tt [deleted file]
backoffice/tmpl/module/billjee/index.js
backoffice/tmpl/module/billjee/index.tt
backoffice/tmpl/module/billjee/javascript.tt
backoffice/tmpl/module/billjee/mytickets.js
backoffice/tmpl/module/billjee/mytickets.tt
backoffice/vendors/choices/choices.css
backoffice/vendors/datepicker/datepicker.css [new file with mode: 0644]
backoffice/vendors/datepicker/datepicker.js [new file with mode: 0644]
backoffice/vendors/datepicker/datepicker_fr.js [new file with mode: 0644]
backoffice/vendors/flatpickr/flatpickr.css [new file with mode: 0644]
backoffice/vendors/flatpickr/flatpickr.js [new file with mode: 0644]
backoffice/vendors/flatpickr/flatpickr.min.css [new file with mode: 0644]
backoffice/vendors/flatpickr/flatpickr.min.js [new file with mode: 0644]
backoffice/vendors/flatpickr/ie.css [new file with mode: 0644]
backoffice/vendors/flatpickr/index.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/l10n/de.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/l10n/de.js [new file with mode: 0644]
backoffice/vendors/flatpickr/l10n/default.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/l10n/default.js [new file with mode: 0644]
backoffice/vendors/flatpickr/l10n/fr.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/l10n/fr.js [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.css [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.js [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/labelPlugin/labelPlugin.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/labelPlugin/labelPlugin.js [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/minMaxTimePlugin.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/minMaxTimePlugin.js [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/monthSelect/index.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/monthSelect/index.js [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/monthSelect/style.css [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/monthSelect/tests.spec.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/rangePlugin.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/rangePlugin.js [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/scrollPlugin.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/scrollPlugin.js [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/weekSelect/weekSelect.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/plugins/weekSelect/weekSelect.js [new file with mode: 0644]
backoffice/vendors/flatpickr/themes/airbnb.css [new file with mode: 0644]
backoffice/vendors/flatpickr/themes/confetti.css [new file with mode: 0644]
backoffice/vendors/flatpickr/themes/dark.css [new file with mode: 0644]
backoffice/vendors/flatpickr/themes/light.css [new file with mode: 0644]
backoffice/vendors/flatpickr/themes/material_blue.css [new file with mode: 0644]
backoffice/vendors/flatpickr/themes/material_green.css [new file with mode: 0644]
backoffice/vendors/flatpickr/themes/material_orange.css [new file with mode: 0644]
backoffice/vendors/flatpickr/themes/material_red.css [new file with mode: 0644]
backoffice/vendors/flatpickr/types/globals.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/types/instance.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/types/locale.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/types/options.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/typings.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/utils/dates.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/utils/dom.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/utils/formatting.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/utils/index.d.ts [new file with mode: 0644]
backoffice/vendors/flatpickr/utils/polyfills.d.ts [moved from backoffice/tmpl/module/billjee/form_attendees.js with 100% similarity]

index 82289e5..83ded76 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,7 +1,7 @@
 
 #AddType application/octet-stream .pdf
 RewriteEngine on
-
+SetEnv PERL5LIB "/home/kilian/perl5/lib/perl5"
 DirectoryIndex  index.cgi  index.html
 AddHandler cgi-script .cgi
 
index bd22f6d..6756691 100644 (file)
@@ -172,6 +172,9 @@ sub admindeleteuser(){
 "DELETE FROM public.lawyercatalog WHERE id_user=".$id_user.";",
 "DELETE FROM public.modulepreferences WHERE id_user=".$id_user.";",
 "DELETE FROM public.clients WHERE id_user=".$id_user.";",
+"DELETE FROM public.billjeebooking WHERE id_user=".$id_user.";",
+"DELETE FROM public.billjeetickets WHERE id_user=".$id_user.";",
+"DELETE FROM public.billjee WHERE id_user=".$id_user.";",
 "DELETE FROM public.exceptions WHERE id_user=".$id_user.";",
 "DELETE FROM public.sessions WHERE id_user=".$id_user.";",
 "delete from users where id=".$id_user.";");
index c2ced29..e46c558 100644 (file)
@@ -114,7 +114,15 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){
       }
       
     }
-
+    elsif($p->{fn} eq "setbilljeeemail"){
+      my $bid = $db->dbquery("select * from billjee where id_user=".$sess->{id}.";");
+      my $sql = "insert into billjee (id_user,senderemail) VALUES (".$sess->{id}.",'".$db->securetext($p->{email_moderated})."');";
+      if (exists($bid->{0})){
+        $sql = "update billjee set senderemail='".$db->securetext($p->{email_moderated})."' where id=".$bid->{0}->{id};
+      }
+      $db->dbexec($sql);
+      $html->{result}->{senderemail} = "ok";
+    }
     elsif ($p->{fn} eq "savefield"){
       # $html->{p} = $p;
       my $sf = dkssavefile->new();
@@ -191,7 +199,7 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){
       #$p->{table},#$p->{field},$p->{value},$p->{id},$p->{type}
     }
     elsif ($p->{fn} eq "saveform"){
-      $html->{p} = $p;
+      $html->{p} = $p;
       $html->{result}->{ident} = $p->{ident};
       delete $p->{ident};
       delete $p->{fn};
@@ -199,8 +207,8 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){
       my $retid=undef;
       my $type = "upd";
       foreach my $px (keys(%{$p})){
-        $html->{result}->{datafield} = $px;
-        #$p->{$px} = $db->securetext($p->{$px});
+        #$html->{result}->{datafield} = $px;
+        # $p->{$px} = $db->securetext($p->{$px});
         if (($px =~ /\_id$/) && ($p->{$px} eq "")){
           $type = "ins";
         }
@@ -213,16 +221,12 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){
         @sql = $db->create_ddl_update($p);
       } 
       # $html->{sql} = \@sql;
+      # $retid->{0}=undef;
       foreach my $s (@sql){
-        #if ($type eq "ins"){
-          $retid= $db->dbquerysorted($s);
-        #}else {
-          
-        #}
-        
+           $retid= $db->dbquerysorted($s);
       }
       $html->{result}->{id} = $retid->{0}; 
-      #$p->{table},#$p->{field},$p->{value},$p->{id},$p->{type}
+      
     }
     elsif ($p->{fn} eq "paypal_payement"){
       my $inv = dksinvoice->new();
@@ -258,17 +262,68 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){
     #   $html->{result}->{sql} = $sql;
     #   $html->{result}->{events} = $res;
     # }
+    elsif($p->{fn} eq "getmonthbilljees"){
+      
+      my $sql = "select eventdate,count(*) from billjeetickets where eventdate between date('".$p->{startdate}."') and date(date('".$p->{startdate}."') + interval '41 days') and isdisabled is null group by eventdate order by eventdate;";
+      my $res = $db->dbquerybykey("eventdate",$sql);
+      $html->{result}->{events} = $res;
+    } 
+    elsif($p->{fn} eq "getbilljeeeditor"){
+      my $sqlins = "INSERT INTO billjeebooking (".$p->{id}.", ".$sess->{id}.", bookingtime) VALUES(0, 0, current_timestamp);";
+      $db->dbexec($sqlins);
+      my $sql = "select bt.court,bt.room,to_char(bt.eventdate,'DD.MM.YYYY') as dspdate,eventtype,case when eventtype ='offer' then 'offre' else 'demande' end as dspeventtype,bt.dayperiod,bj.senderemail as recipient from billjeetickets bt join billjee bj on (bt.id_user=bj.id_user and bt.id=".$p->{id}.")";
+      my $res = $db->dbquerysorted($sql);
+      if (exists($res->{0})){
+        $sql = "select msg".$res->{0}->{eventtype}." as bodymsg from billjee where id_user=".$sess->{id}.";";
+        my $res2 =  $db->dbquerysorted($sql);
+        $res->{0}->{bodymsg} = $res2->{0}->{bodymsg};
+      }
+      $html->{result}->{contact} = $res->{0};
+    } 
+    elsif($p->{fn} eq "getmonthbilljeesbyuser"){
+      
+      my $sql = "select eventdate,count(*) from billjeetickets where eventdate between date('".$p->{startdate}."') and date(date('".$p->{startdate}."') + interval '41 days') and id_user=".$sess->{id}." group by eventdate order by eventdate;";
+      my $res = $db->dbquerybykey("eventdate",$sql);
+      $html->{result}->{events} = $res;
+    } 
     elsif($p->{fn} eq "getbilljeeevents"){
       #ownevents
-       my $sql = "select bt.id,bt.court,bt.room,bt.eventdate,to_char(bt.eventdate,'DD.MM.YYYY') as dspeventdate,bt.eventstarttime,bt.eventendtime,bt.eventmsg,us.surname,us.prename,bt.eventtype
-from billjeetickets bt 
+      my $olyf = "";
+      if ($p->{onlyfuture} eq "true"){
+        $olyf = "and bt.eventdate >= CURRENT_DATE";
+      }
+      my $sql ="select bt.id,bt.id_user,bt.isdisabled,bt.court,bt.room,to_char(bt.eventdate,'DD.MM.YYYY') as dspdate,bt.dayperiod,bt.eventmsg as msg ,bt.eventtype,case when bt.eventtype ='offer' then 'offre' else 'demande' end as dspeventtype,us.prename,us.surname 
+from billjeetickets  bt 
+join billjee bj on (bj.id_user=bt.id_user)
+join (select users.id,users.prename,users.surname,appaccess.privateenabled from users join appaccess on (appaccess.id_user=users.id) and appaccess.id_app=7) us on (bt.id_user=us.id)
+where bt.eventdate between date('".$p->{startdate}."') and date('".$p->{enddate}."') and us.privateenabled=true and isdisabled is null ".$olyf." order by bt.eventdate,us.surname,us.prename;";
+
+       my $res = $db->dbquerysorted($sql);
+       $html->{result}->{onlyfuture} = $p->{onlyfuture};
+       $html->{result}->{events} = $res;
+    }
+    elsif($p->{fn} eq "getbilljeeeventsbyuser"){
+      #ownevents
+      my $sql ="select bt.id,bt.id_user,bt.isdisabled,bt.court,bt.room,to_char(bt.eventdate,'DD.MM.YYYY') as dspdate,bt.dayperiod,bt.eventmsg as msg ,bt.eventtype,us.prename,us.surname 
+from billjeetickets  bt 
 join billjee bj on (bj.id_user=bt.id_user)
 join (select users.id,users.prename,users.surname,appaccess.privateenabled from users join appaccess on (appaccess.id_user=users.id) and appaccess.id_app=7) us on (bt.id_user=us.id)
-where bt.eventdate between date('".$p->{startdate}."') and date('".$p->{enddate}."') and us.privateenabled = true;";
+where bt.eventdate between date('".$p->{startdate}."') and date('".$p->{enddate}."') and us.privateenabled=true and us.id=".$sess->{id}.";";
+
        my $res = $db->dbquerysorted($sql);
-      #  $html->{result}->{sql} = $sql;
+   
        $html->{result}->{events} = $res;
     }
+    elsif($p->{fn} eq "billjeepublishevent"){
+      $sql = "UPDATE billjeetickets set isdisabled=null where id=".$p->{id}." and id_user=".$sess->{id}.";";
+      $db->dbexec($sql);
+      $html->{result}->{publish} = "ok";
+    }
+    elsif($p->{fn} eq "billjeeunpublishevent"){
+      $sql = "UPDATE billjeetickets set isdisabled=true where id=".$p->{id}." and id_user=".$sess->{id}.";";
+      $db->dbexec($sql);
+      $html->{result}->{unpublish} = $p->{id};
+    }
   }
   
 }
index 2fc5d32..a9a7f24 100644 (file)
@@ -34,6 +34,7 @@ hr{border:0;border-top:1px solid #eee;margin:20px 0}
 .w3-table-all tr:nth-child(odd){background-color:#fff}.w3-table-all tr:nth-child(even){background-color:#f1f1f1}
 .w3-hoverable tbody tr:hover,.w3-ul.w3-hoverable li:hover{background-color:#ccc}.w3-centered tr th,.w3-centered tr td{text-align:center}
 .w3-table td,.w3-table th,.w3-table-all td,.w3-table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top}
+.w3-no-padding { padding: 0!important; }
 .w3-table th:first-child,.w3-table td:first-child,.w3-table-all th:first-child,.w3-table-all td:first-child{padding-left:16px}
 .w3-btn,.w3-button{border:none;display:inline-block;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap}
 .w3-btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)}
@@ -259,6 +260,7 @@ hr{border:0;border-top:1px solid #eee;margin:20px 0}
   #main { margin-left: 0px;} 
 }
 
+
 .w3-select {
   display: block;
   font-size: 16px;
diff --git a/backoffice/images/faces/.DS_Store b/backoffice/images/faces/.DS_Store
deleted file mode 100644 (file)
index 7a7a61d..0000000
Binary files a/backoffice/images/faces/.DS_Store and /dev/null differ
diff --git a/backoffice/images/faces/face1.jpg b/backoffice/images/faces/face1.jpg
deleted file mode 100644 (file)
index a7bd9cb..0000000
Binary files a/backoffice/images/faces/face1.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face10.jpg b/backoffice/images/faces/face10.jpg
deleted file mode 100644 (file)
index 8c0cbe0..0000000
Binary files a/backoffice/images/faces/face10.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face11.jpg b/backoffice/images/faces/face11.jpg
deleted file mode 100644 (file)
index 097e0e7..0000000
Binary files a/backoffice/images/faces/face11.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face12.jpg b/backoffice/images/faces/face12.jpg
deleted file mode 100644 (file)
index 75c7282..0000000
Binary files a/backoffice/images/faces/face12.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face13.jpg b/backoffice/images/faces/face13.jpg
deleted file mode 100644 (file)
index 8a5faa4..0000000
Binary files a/backoffice/images/faces/face13.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face14.jpg b/backoffice/images/faces/face14.jpg
deleted file mode 100644 (file)
index a5764fc..0000000
Binary files a/backoffice/images/faces/face14.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face15.jpg b/backoffice/images/faces/face15.jpg
deleted file mode 100644 (file)
index e895153..0000000
Binary files a/backoffice/images/faces/face15.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face16.jpg b/backoffice/images/faces/face16.jpg
deleted file mode 100644 (file)
index ec1a6cb..0000000
Binary files a/backoffice/images/faces/face16.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face17.jpg b/backoffice/images/faces/face17.jpg
deleted file mode 100644 (file)
index 082d165..0000000
Binary files a/backoffice/images/faces/face17.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face18.jpg b/backoffice/images/faces/face18.jpg
deleted file mode 100644 (file)
index 259a288..0000000
Binary files a/backoffice/images/faces/face18.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face19.jpg b/backoffice/images/faces/face19.jpg
deleted file mode 100644 (file)
index 7c1486b..0000000
Binary files a/backoffice/images/faces/face19.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face2.jpg b/backoffice/images/faces/face2.jpg
deleted file mode 100644 (file)
index cef2297..0000000
Binary files a/backoffice/images/faces/face2.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face20.jpg b/backoffice/images/faces/face20.jpg
deleted file mode 100644 (file)
index 8cb74b3..0000000
Binary files a/backoffice/images/faces/face20.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face21.jpg b/backoffice/images/faces/face21.jpg
deleted file mode 100644 (file)
index 452d233..0000000
Binary files a/backoffice/images/faces/face21.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face22.jpg b/backoffice/images/faces/face22.jpg
deleted file mode 100644 (file)
index 929a146..0000000
Binary files a/backoffice/images/faces/face22.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face23.jpg b/backoffice/images/faces/face23.jpg
deleted file mode 100644 (file)
index c2b5169..0000000
Binary files a/backoffice/images/faces/face23.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face24.jpg b/backoffice/images/faces/face24.jpg
deleted file mode 100644 (file)
index f3dcc1f..0000000
Binary files a/backoffice/images/faces/face24.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face25.jpg b/backoffice/images/faces/face25.jpg
deleted file mode 100644 (file)
index 722d502..0000000
Binary files a/backoffice/images/faces/face25.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face26.jpg b/backoffice/images/faces/face26.jpg
deleted file mode 100644 (file)
index 69ef971..0000000
Binary files a/backoffice/images/faces/face26.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face27.jpg b/backoffice/images/faces/face27.jpg
deleted file mode 100644 (file)
index 48faade..0000000
Binary files a/backoffice/images/faces/face27.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face3.jpg b/backoffice/images/faces/face3.jpg
deleted file mode 100644 (file)
index a45915d..0000000
Binary files a/backoffice/images/faces/face3.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face4.jpg b/backoffice/images/faces/face4.jpg
deleted file mode 100644 (file)
index 105bb22..0000000
Binary files a/backoffice/images/faces/face4.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face5.jpg b/backoffice/images/faces/face5.jpg
deleted file mode 100644 (file)
index ed52098..0000000
Binary files a/backoffice/images/faces/face5.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face6.jpg b/backoffice/images/faces/face6.jpg
deleted file mode 100644 (file)
index 2fc0702..0000000
Binary files a/backoffice/images/faces/face6.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face7.jpg b/backoffice/images/faces/face7.jpg
deleted file mode 100644 (file)
index 2f3adef..0000000
Binary files a/backoffice/images/faces/face7.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face8.jpg b/backoffice/images/faces/face8.jpg
deleted file mode 100644 (file)
index 61276ba..0000000
Binary files a/backoffice/images/faces/face8.jpg and /dev/null differ
diff --git a/backoffice/images/faces/face9.jpg b/backoffice/images/faces/face9.jpg
deleted file mode 100644 (file)
index 831eabc..0000000
Binary files a/backoffice/images/faces/face9.jpg and /dev/null differ
diff --git a/backoffice/images/icons/chevron-left.svg b/backoffice/images/icons/chevron-left.svg
new file mode 100644 (file)
index 0000000..f1c6f0e
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-halflings" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
+  <path id="chevron-thin-left" d="M5.43949,9.64645l5.99993-5.99993a.5.5,0,0,1,.7071,0l.707.707a.5.5,0,0,1,0,.7071L7.91406,10l4.93942,4.93942a.5.5,0,0,1,0,.7071l-.707.707a.5.5,0,0,1-.7071,0L5.43949,10.35355A.5.5,0,0,1,5.43949,9.64645Z"/>
+</svg>
diff --git a/backoffice/images/icons/chevron-right.svg b/backoffice/images/icons/chevron-right.svg
new file mode 100644 (file)
index 0000000..a75f8fa
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-halflings" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
+  <path id="chevron-thin-right" d="M14.56051,10.35355,8.56058,16.35348a.5.5,0,0,1-.7071,0l-.707-.707a.5.5,0,0,1,0-.7071L12.08594,10,7.14652,5.06058a.5.5,0,0,1,0-.7071l.707-.707a.5.5,0,0,1,.7071,0l5.99993,5.99993A.5.5,0,0,1,14.56051,10.35355Z"/>
+</svg>
diff --git a/backoffice/images/icons/edit.svg b/backoffice/images/icons/edit.svg
new file mode 100644 (file)
index 0000000..c0bb9ac
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="square-edit" d="M24,16.65674l3-3V23.5A3.50424,3.50424,0,0,1,23.5,27H8.5A3.50424,3.50424,0,0,1,5,23.5V8.5A3.50424,3.50424,0,0,1,8.5,5h15a3.48475,3.48475,0,0,1,.756.08728L21.34326,8H8.5a.50641.50641,0,0,0-.5.5v15a.50641.50641,0,0,0,.5.5h15a.50641.50641,0,0,0,.5-.5ZM13.81323,20.63306c-.20654.5122.04108.76013.55316.55322,1.38123-.55786,3.8205-1.54492,3.84064-1.56519,0,0-2.82855-2.82812-2.85669-2.80029Zm12.8938-9.512L23.8786,8.293l-7.08588,7.08545L19.62128,18.207Zm2.92462-3.63183-2.12127-2.1211a.49991.49991,0,0,0-.7071,0L25.29285,6.87842,28.12128,9.707l1.51037-1.51025A.50052.50052,0,0,0,29.63165,7.48926Z"/>
+</svg>
diff --git a/backoffice/images/icons/list.svg b/backoffice/images/icons/list.svg
new file mode 100644 (file)
index 0000000..ea3f0e2
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="thumbnails-list" d="M11,14v4a1,1,0,0,1-1,1H6a1,1,0,0,1-1-1V14a1,1,0,0,1,1-1h4A1,1,0,0,1,11,14Zm-1,7H6a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V22A1,1,0,0,0,10,21ZM10,5H6A1,1,0,0,0,5,6v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V6A1,1,0,0,0,10,5Zm17,6H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H27a1,1,0,0,0,1-1V12A1,1,0,0,0,27,11Zm0-6H14a1,1,0,0,0-1,1V7a1,1,0,0,0,1,1H27a1,1,0,0,0,1-1V6A1,1,0,0,0,27,5Zm0,18H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H27a1,1,0,0,0,1-1V24A1,1,0,0,0,27,23Zm0-6H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H27a1,1,0,0,0,1-1V18A1,1,0,0,0,27,17Z"/>
+</svg>
diff --git a/backoffice/images/icons/plus.svg b/backoffice/images/icons/plus.svg
new file mode 100644 (file)
index 0000000..08e85b5
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="square-empty-plus" d="M24.5,4H7.5A3.50424,3.50424,0,0,0,4,7.5v17A3.50424,3.50424,0,0,0,7.5,28h17A3.50424,3.50424,0,0,0,28,24.5V7.5A3.50424,3.50424,0,0,0,24.5,4ZM25,24.5a.50641.50641,0,0,1-.5.5H7.5a.50641.50641,0,0,1-.5-.5V7.5A.50641.50641,0,0,1,7.5,7h17a.50641.50641,0,0,1,.5.5ZM22,15v2a1,1,0,0,1-1,1H18v3a1,1,0,0,1-1,1H15a1,1,0,0,1-1-1V18H11a1,1,0,0,1-1-1V15a1,1,0,0,1,1-1h3V11a1,1,0,0,1,1-1h2a1,1,0,0,1,1,1v3h3A1,1,0,0,1,22,15Z"/>
+</svg>
diff --git a/backoffice/images/icons/publish.svg b/backoffice/images/icons/publish.svg
new file mode 100644 (file)
index 0000000..d217cc1
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="eye" d="M30.30762,14.36768C28.25488,12.002,22.751,6.5,16,6.5S3.74512,12.002,1.69336,14.36572a2.49922,2.49922,0,0,0-.001,3.2666C3.74512,19.99805,9.249,25.5,16,25.5s12.25488-5.502,14.30762-7.86768A2.49888,2.49888,0,0,0,30.30762,14.36768ZM9.24042,20.25977A25.33965,25.33965,0,0,1,4.25391,16a25.33613,25.33613,0,0,1,4.98657-4.25977,7.93436,7.93436,0,0,0-.00006,8.51954ZM16,22a6,6,0,1,1,6-6A6.00657,6.00657,0,0,1,16,22Zm6.75952-1.74023a7.93436,7.93436,0,0,0,.00006-8.51954A25.33965,25.33965,0,0,1,27.74609,16,25.33613,25.33613,0,0,1,22.75952,20.25977ZM19,16a3.00014,3.00014,0,1,1-5.80646-1.03174,1.49952,1.49952,0,0,0,1.77472-1.77466A2.97577,2.97577,0,0,1,19,16Z"/>
+</svg>
diff --git a/backoffice/images/icons/remove.svg b/backoffice/images/icons/remove.svg
new file mode 100644 (file)
index 0000000..e459477
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="square-empty-remove" d="M24.5,4H7.5A3.50424,3.50424,0,0,0,4,7.5v17A3.50424,3.50424,0,0,0,7.5,28h17A3.50424,3.50424,0,0,0,28,24.5V7.5A3.50424,3.50424,0,0,0,24.5,4ZM25,24.5a.50641.50641,0,0,1-.5.5H7.5a.50641.50641,0,0,1-.5-.5V7.5A.50641.50641,0,0,1,7.5,7h17a.50641.50641,0,0,1,.5.5ZM21.30328,13.52515,18.82843,16l2.47485,2.47485a.50007.50007,0,0,1,0,.70716L19.182,21.30328a.50007.50007,0,0,1-.70716,0L16,18.82843l-2.47485,2.47485a.50007.50007,0,0,1-.70716,0L10.69672,19.182a.50007.50007,0,0,1,0-.70716L13.17157,16l-2.47485-2.47485a.50007.50007,0,0,1,0-.70716L12.818,10.69672a.50007.50007,0,0,1,.70716,0L16,13.17157l2.47485-2.47485a.50007.50007,0,0,1,.70716,0L21.30328,12.818A.50007.50007,0,0,1,21.30328,13.52515Z"/>
+</svg>
diff --git a/backoffice/images/icons/search.svg b/backoffice/images/icons/search.svg
new file mode 100644 (file)
index 0000000..f4416ed
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="search" d="M27.207,24.37866,20.6106,17.78235a9.03069,9.03069,0,1,0-2.82825,2.82825L24.37878,27.207a1,1,0,0,0,1.41425,0l1.414-1.41418A1,1,0,0,0,27.207,24.37866ZM13,19a6,6,0,1,1,6-6A6.00657,6.00657,0,0,1,13,19Z"/>
+</svg>
diff --git a/backoffice/images/icons/send.svg b/backoffice/images/icons/send.svg
new file mode 100644 (file)
index 0000000..c1dca7c
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="send" d="M27.863,6.91364l-2.76691,18.4458a.5.5,0,0,1-.69141.38537L16.6,22.4l-3.74646,3.74646A.5.5,0,0,1,12,25.79291V20.83765l8.63281-7.06324a1.00008,1.00008,0,1,0-1.26562-1.54882l-9.11194,7.4552L5.03656,17.44421a.5.5,0,0,1-.01141-.91412l22.135-10.1452A.5.5,0,0,1,27.863,6.91364Z"/>
+</svg>
diff --git a/backoffice/images/icons/settings.svg b/backoffice/images/icons/settings.svg
new file mode 100644 (file)
index 0000000..8589630
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="settings" d="M5.82422,9.7417,4.1626,7.01428a1.25777,1.25777,0,0,1,.26269-1.3728L5.62744,4.43921a1.25029,1.25029,0,0,1,1.333-.28284L9.71826,5.83228a1.26387,1.26387,0,0,1,.50147.65478l.70654,2.15674a.75682.75682,0,0,0,.18213.29639L13.055,10.88672a8.3693,8.3693,0,0,0,.07392.91308l-1.76245,1.76246-2.4397-2.4397a.75292.75292,0,0,0-.29688-.1825l-2.15625-.7063A1.25417,1.25417,0,0,1,5.82422,9.7417Zm17.17078,9.011c-.07172.01293-.14057.03613-.21277.04711a8.60662,8.60662,0,0,1-1.28516.09717,8.46862,8.46862,0,0,1-1.23242-.09033l-2.85034,2.8501,5.75744,5.75744a1,1,0,0,0,1.41425-.00012l2.82806-2.82837a.99979.99979,0,0,0-.00006-1.41406Zm-.51337-1.93042A6.49961,6.49961,0,0,0,27.405,12.919a6.22047,6.22047,0,0,0,.50262-2.85059.49455.49455,0,0,0-.8446-.30078l-2.419,2.41894a.49613.49613,0,0,1-.469.13135l-3.38068-.82959a.49592.49592,0,0,1-.36365-.36328L19.6015,7.74414a.49561.49561,0,0,1,.131-.46875L22.15,4.85791a.49873.49873,0,0,0-.34015-.84863,6.22819,6.22819,0,0,0-2.77825.49121,6.40457,6.40457,0,0,0-3.69947,7.9248L4.586,23.17139a1.00038,1.00038,0,0,0-.00006,1.41455L7.414,27.41406a.99985.99985,0,0,0,1.41425,0L19.62183,16.62061A6.50731,6.50731,0,0,0,22.48163,16.82227Z"/>
+</svg>
diff --git a/backoffice/images/icons/unpublish.svg b/backoffice/images/icons/unpublish.svg
new file mode 100644 (file)
index 0000000..9e657b7
--- /dev/null
@@ -0,0 +1,3 @@
+<svg id="glyphicons-basic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+  <path id="eye-off" d="M30.30762,17.63232C28.25488,19.99805,22.751,25.5,16,25.5a13.7622,13.7622,0,0,1-4.67548-.85767l2.90863-2.90857a5.99943,5.99943,0,0,0,7.50068-7.50036l1.54126-1.54126a7.92362,7.92362,0,0,1-.51557,7.56763A25.33613,25.33613,0,0,0,27.74609,16a26.04838,26.04838,0,0,0-4.10992-3.669l2.16009-2.16015a29.01579,29.01579,0,0,1,4.51136,4.19678A2.49888,2.49888,0,0,1,30.30762,17.63232ZM27.21484,5.06055,5.06055,27.21436a1.49984,1.49984,0,0,1-2.1211-2.1211l3.26917-3.269a28.95112,28.95112,0,0,1-4.51624-4.1919,2.49922,2.49922,0,0,1,.001-3.2666C3.74512,12.002,9.249,6.5,16,6.5a13.716,13.716,0,0,1,4.67529.85779l4.41846-4.41834a1.49984,1.49984,0,0,1,2.12109,2.1211ZM8,16a7.94246,7.94246,0,0,1,1.24048-4.25977A25.33613,25.33613,0,0,0,4.25391,16,26.04838,26.04838,0,0,0,8.36383,19.669l.36108-.36109A7.9049,7.9049,0,0,1,8,16Zm9.764-5.731A5.93635,5.93635,0,0,0,16,10a6.00657,6.00657,0,0,0-6,6,5.9363,5.9363,0,0,0,.269,1.76392Z"/>
+</svg>
index 872b292..6d6d4c1 100644 (file)
@@ -166,5 +166,7 @@ if ($skl ne "skeleton/login.tt" && $vars->{page} =~ /^module/){
 
 $template->process($skl,$vars) || die "Template process failed: ", $template->error(), "\n";
 
+# print "/*".Dumper($vars)."*/";
+
 
 
index af04bee..80641ea 100644 (file)
@@ -1,9 +1,14 @@
 var backoffice = {
   loadpage: function(modulepage,modulename = ''){
-    //console.log("Load module:" + modulepage);
+    console.log("Load module:" + modulepage);
     $("#modulename").html(modulename);
     $("#moduleframe").attr('src',modulepage);
   },
+  loadnewwindow: function(url){
+    console.log("New Window load URL:" + url);
+    window.open(url);
+    return false;
+  },
   logout: function(){
     $.ajax({
       encoding:"UTF-8",
index 5b7ef99..bbd44f2 100644 (file)
@@ -39,6 +39,7 @@ var req = {
         console.log("Status returned: " + request.status + "resp:" + request.getResponseHeader("Content-Type"));
         if (request.getResponseHeader("Content-Type").indexOf('application/json') == 0){
           var xparse = JSON.parse(request.responseText);
+          console.log(xparse);
           ret = xparse.result;
         }else if (request.getResponseHeader("Content-Type").indexOf('application/vnd.ms-excel') == 0){
           var filename = "";
@@ -87,6 +88,7 @@ var req = {
     };
     if (method.toUpperCase() == 'POST'){
       request.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
+      console.log(rdata);
       request.send(rdata);
     } else {
       //request.withCredentials = true;
diff --git a/backoffice/tmpl/block/calendar.tt b/backoffice/tmpl/block/calendar.tt
new file mode 100644 (file)
index 0000000..723bc5a
--- /dev/null
@@ -0,0 +1,156 @@
+<table class="w3-table w3-border w3-centered">
+        <thead class="w3-light-grey">
+          <tr>
+            <th class="w3-border w3-no-padding"><button class="w3-button w3-theme w3-block" id="prevmonth" onclick="previousMonth();return false;"><img src="[% abspath %]images/icons/chevron-left.svg" style="height: 24px;"></button></th>
+            <th  class="w3-border w3-no-padding" colspan="6" id="monthlabel" ></th>
+            <th class="w3-border w3-no-padding"><button class="w3-button w3-theme w3-block" onclick="nextMonth();return false;"><img src="[% abspath %]images/icons/chevron-right.svg" style="height: 24px;"></button></th></tr>
+          <tr>
+            <th class="w3-border">CW</th>
+            <th class="w3-border">Lu</th>
+            <th class="w3-border">Ma</th>
+            <th class="w3-border">Me</th>
+            <th class="w3-border">Je</th>
+            <th class="w3-border">Ve</th>
+            <th class="w3-border">Sa</th>
+            <th class="w3-border">Di</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr><td class="w3-border w3-no-padding calweek" id="week0">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day00">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day01">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day02">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day03">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day04">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day05">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day06">&nbsp;</td></tr>
+          <tr><td class="w3-border w3-no-padding calweek" id="week1">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day10">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day11">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day12">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day13">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day14">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day15">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day16">&nbsp;</td></tr>
+          <tr><td class="w3-border w3-no-padding calweek" id="week2">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day20">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day21">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day22">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day23">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day24">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day25">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day26">&nbsp;</td></tr>
+          <tr><td class="w3-border w3-no-padding calweek" id="week3">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day30">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day31">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day32">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day33">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day34">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day35">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day36">&nbsp;</td></tr>
+          <tr><td class="w3-border w3-no-padding calweek" id="week4">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day40">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day41">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day42">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day43">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day44">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day45">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day46">&nbsp;</td></tr>
+          <tr><td class="w3-border w3-no-padding calweek" id="week5">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day50">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day51">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day52">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day53">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day54">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day55">&nbsp;</td><td  class="w3-border w3-no-padding calday" id="day56">&nbsp;</td></tr>
+          <tr><td colspan="2"><label class="w3-label">Jour(s) selectionné(s):</label></td><td colspan="6" id="selectedperiod"></td></tr>
+        </tbody>
+      </table>
+      <input type="hidden" id="filterdatefrom" name="filterdatefrom"/><input type="hidden" id="filterdateto" name="filterdateto"/>
+<script>
+var initdate = new Date();
+initdate.setHours(12,0,0);
+var monthnames = ['Janvier','Février','Mars','Avril','May','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'];
+
+
+function previousMonth(){
+  initdate = new Date(initdate.getFullYear(),initdate.getMonth() -1 , 1);
+  loadcalendars();
+  return false;
+}
+
+function nextMonth(){
+  initdate = new Date(initdate.getFullYear(),initdate.getMonth() +1 , 1);
+  loadcalendars();
+  return false;
+}
+
+function loadcalendars(){
+  
+  var lmday = new Date(initdate.getFullYear(), initdate.getMonth() + 1, 0,12);
+  lmday.setHours(12,0,0);
+  var fmday = new Date(initdate.getFullYear(), initdate.getMonth(), 1,12);
+  fmday.setHours(12,0,0);
+  var today = new Date();today.setHours(12,0,0);
+  document.getElementById("monthlabel").innerHTML='<button class="w3-button w3-block w3-theme-l2" data-datefrom="'+fmday.toJSON().substring(0,10)+'" data-dateto="'+lmday.toJSON().substring(0,10)+'" onclick="selectPeriod(this);return false;">'+ monthnames[initdate.getMonth()] + " " +initdate.getFullYear() +'</button>' + "";
+  //console.log(fmday.getWeek());
+  var weeks = fmday.getWeek();
+  var fmonday = new Date(fmday.getFullYear(), fmday.getMonth(), -1 * fmday.getDay() + 2,12);
+  
+  if (fmonday > initdate){
+    fmonday = new Date(fmday.getFullYear(), fmday.getMonth(), fmonday.getDate() - 7,12);
+  }
+  //console.log(today.toJSON().substring(0,7) + " <= " + fmday.toJSON().substring(0,7))
+  if ((onlyfuture) &&(today.toJSON().substring(0,7) == fmday.toJSON().substring(0,7))){
+    document.getElementById("prevmonth").setAttribute("disabled", "disabled");
+  } else {
+    document.getElementById("prevmonth").removeAttribute("disabled");
+  }
+  
+  var cdate = new Date(fmonday.getFullYear(),fmonday.getMonth(),fmonday.getDate(),12);
+  for (var w=0;w<=5;w++){
+    //console.log("CDATE:" + cdate);
+    var wdatemon = null; 
+    var wdatesun = null;
+    var disabled = "";
+    for (var d=0;d<=6; d++){
+      var wd = cdate.getDay();
+      var dayclass="";
+      var utcdate = new Date(cdate.toJSON());
+      //console.log(utcdate);
+      if (cdate.getUTCDay() == 1){
+        //console.log("Weekday" + cdate.getUTCDay() + " (must Be Monday) -->" + cdate.toJSON().substring(0,10));
+        dtnsun = new Date (cdate.getFullYear(),cdate.getMonth(),cdate.getDate() + 6,12);
+        wdatesun = dtnsun.toJSON().substring(0,10);
+        wdatemon = cdate.toJSON().substring(0,10);
+
+      }
+      disabled = "";
+      if ((onlyfuture) && (utcdate < today)){
+        //console.log(utcdate + " < " + today);
+        disabled = "disabled";
+      }
+      if (cdate.getMonth()!=initdate.getMonth()){
+        dayclass="w3-opacity-max";
+      }
+      document.getElementById("day" + w + d).innerHTML = '<button class="w3-button w3-block '+ dayclass+'" id="btn_'+ utcdate.toJSON().substring(0,10) +'" onclick="selectPeriod(this); return false;" data-day="' + utcdate.toJSON().substring(0,10) +'" '+ disabled +'>'+ cdate.getDate() +'</button>';
+      var nday = cdate.getDate() + 1;
+      // console.log(cdate);
+      // console.log(nday);
+      cdate.setDate(nday);
+    }
+    document.getElementById("week" + w).innerHTML = '<button class="w3-button w3-block w3-orange" data-datefrom="'+wdatemon+'" data-dateto="'+wdatesun+'" onclick="selectPeriod(this);return false;" '+ disabled+'>'+ weeks +'</button>';
+    weeks++;
+  }
+  //console.log(lmday);
+  //console.log("LAST DAY: DATE:" + lmday.getUTCDate() + "DOW:" + lmday.getUTCDay());
+  //console.log("First DAY: DATE:" + fmday.getUTCDate() + "DOW:" + fmday.getUTCDay());
+  var evfn = "getmonthbilljees";
+  if (onlyuser && onlyuser==true){
+    evfn = "getmonthbilljeesbyuser";
+  }
+    req.reqdata("POST","process.cgi",{fn:evfn,"startdate":fmday.toJSON().substring(0,10),"enddate":lmday.toJSON().substring(0,10)},set_calendarevents);
+    return false;
+ }
+
+ function set_calendarevents(data){
+  console.log("calendar events");
+  console.log(data);
+  var cmpdate = new Date().toJSON().substring(0,10);
+  var nev = null;
+  for (var i in data.events){
+    var btn = document.getElementById("btn_" + i);
+    if (btn){
+      btn.classList.add("w3-green");
+      
+    }
+  }
+  if (setnearest && setnearest == true){
+    selectPeriod(document.getElementById("btn_"+ cmpdate));
+  }
+  setnearest = false;
+  return false;
+}
+function selectPeriod(obj){
+  //console.log(obj.dataset);
+  if (obj.dataset.day){
+    document.getElementById('filterdatefrom').value=obj.dataset.day.substring(0,10);
+    document.getElementById('filterdateto').value=obj.dataset.day.substring(0,10);
+    var dd = new Date(obj.dataset.day);
+    //dd.toLocaleDateString()
+    document.getElementById('selectedperiod').innerHTML = dd.toLocaleDateString();
+    // document.getElementById('dateto').innerHTML = "";
+  } else {
+    document.getElementById('filterdatefrom').value=obj.dataset.datefrom.substring(0,10);
+    document.getElementById('filterdateto').value=obj.dataset.dateto.substring(0,10);
+    var df = new Date(obj.dataset.datefrom);
+    var dt = new Date(obj.dataset.dateto);
+    document.getElementById('selectedperiod').innerHTML = df.toLocaleDateString() + " - " + dt.toLocaleDateString();
+    
+    // document.getElementById('datefrom').innerHTML = obj.dataset.datefrom;
+    // document.getElementById('dateto').innerHTML = "- " + obj.dataset.dateto;
+  }
+  //console.log(obj);
+  search_data();
+  return false;
+}
+</script>
\ No newline at end of file
diff --git a/backoffice/tmpl/block/dlgcontactpublisher.tt b/backoffice/tmpl/block/dlgcontactpublisher.tt
new file mode 100644 (file)
index 0000000..e260057
--- /dev/null
@@ -0,0 +1,57 @@
+<div id="dlgcontactpublisher" class="w3-modal">
+  <div class="w3-modal-content w3-animate-top w3-card-4">
+    <header class="w3-container"> 
+      <span onclick="document.getElementById('dlgcontactpublisher').style.display='none'; return false;" 
+      class="w3-button w3-display-topright">&times;</span>
+      <h2>Êtes-vous sûre de contacter l'éditeur de ce billjee?</h2>
+    </header>
+    <div class="w3-container" >
+      <div class="w3-container w3-border" id="dlgcontactpublisher_details"></div>
+      <p style="font-size: 11pt;"><strong>en cliquant sur "oui"</strong><br/>
+      - Vous acceptez les <a href="javascript:parent.backoffice.loadnewwindow('[% siteurl %]/conditions-generales.html');">conditions générales</a> de JuriDig.lu et vous déclarez avoir lu et compris notre politique de <a href="javascript:parent.backoffice.loadnewwindow('[% siteurl %]/protection-des-donnees.html');">protection des données</a> ;<br/>
+      - Vous Ãªtes d’accord que l'avocat choisi sera informé sur le portail JuriDig.lu que vous allez lui transmettre des instructions par e-mail au sujet du Â« Billjee Â» en question ;<br/>
+      - Vous remarquez que JuriDig.lu n'a Ã  aucun moment accès Ã  vos communications e-mail.<br/>
+      L’utilisation du portail JuriDig.lu est conforme Ã  la règlementation en vigueur concernant la confidentialité et le secret professionnel.
+      </p>
+    </div>
+    <footer class="w3-container w3-right-align w3-padding-16">
+      <input type="hidden" value="" id="dlgcontactpublisher_billjee_id" />
+      <button class="w3-button w3-theme-light w3-margin-right w3-border" onclick="document.getElementById('dlgcontactpublisher').style.display='none'; return false;">Non</button>
+      <button class="w3-button w3-theme-l2 w3-margin-right w3-border" onclick="save_contact_event();">Oui</button>
+    </footer>
+  </div>
+</div>
+<script>
+function contact_publisher(id){
+  //console.log("delete event " + id);
+  //
+  document.getElementById('dlgcontactpublisher_billjee_id').value= id;
+  document.getElementById('dlgcontactpublisher_details').innerHTML = document.getElementById('event_' + id + '_info1').innerHTML + '<br/>' + document.getElementById('event_' + id + '_info2').innerHTML;
+  document.getElementById('dlgcontactpublisher').style.display='block';
+  return false;
+}
+
+function save_contact_event(){
+  var evtid = document.getElementById('dlgcontactpublisher_billjee_id').value;
+  req.reqdata("POST","process.cgi",{"fn":"getbilljeeeditor","id":evtid},open_mail);
+  document.getElementById('dlgcontactpublisher').style.display='none';
+  return false;
+  
+  //req.reqdata("POST","process.cgi",{"fn":"deleteevent","id":evtid},null);
+  //document.getElementById('event_' + evtid).remove;
+  
+}
+
+function open_mail(data){
+  if ((data) && (data.contact)){
+    var ct = data.contact;
+    var subject= "Concerne juridig.lu "+ct.dspeventtype+": " + ct.dspdate + ' ' + ct.dayperiod + ' - ' +  ct.court + ((ct.room)?'(' + ct.room + ')':'');
+    window.location.href="mailto:" + ct.recipient + "?subject=" + encodeURIComponent(subject) +  "&body=" + encodeURIComponent(ct.bodymsg);
+  }else {
+
+  }
+  
+  //document.getElementById('dlgcontactpublisher_details').innerHTML = '';
+  
+}
+</script>
\ No newline at end of file
diff --git a/backoffice/tmpl/block/dlgdelete.tt b/backoffice/tmpl/block/dlgdelete.tt
new file mode 100644 (file)
index 0000000..c2c2a8a
--- /dev/null
@@ -0,0 +1,36 @@
+<div id="dlgdelete" class="w3-modal">
+  <div class="w3-modal-content w3-animate-top w3-card-4">
+    <header class="w3-container"> 
+      <span onclick="document.getElementById('dlgdelete').style.display='none'; return false;" 
+      class="w3-button w3-display-topright">&times;</span>
+      <h2>Êtes-vous sûre de supprimer ce billjee?</h2>
+    </header>
+    <div class="w3-container" id="dlgdelete_details">
+      
+    </div>
+    <footer class="w3-container w3-right-align w3-padding-16">
+      <input type="hidden" value="" id="dlgdelete_event_id" />
+      <button class="w3-button w3-theme-light w3-margin-right w3-border" onclick="document.getElementById('dlgdelete').style.display='none'; return false;">Non</button>
+      <button class="w3-button w3-theme-l2 w3-margin-right w3-border" onclick="send_delete_event();">Oui</button>
+    </footer>
+  </div>
+</div>
+<script>
+function delete_event(id){
+  //console.log("delete event " + id);
+  //
+  document.getElementById('dlgdelete_event_id').value= id;
+  document.getElementById('dlgdelete_details').innerHTML = '';
+  document.getElementById('dlgdelete').style.display='block';
+  return false;
+}
+
+function send_delete_event(){
+  console.log("really delete event " + id);
+  var evtid = document.getElementById('dlgdelete_event_id').value;
+  document.getElementById('dlgdelete_details').innerHTML = '';
+  //req.reqdata("POST","process.cgi",{"fn":"deleteevent","id":evtid},null);
+  document.getElementById('event_' + evtid).remove;
+  
+}
+</script>
\ No newline at end of file
diff --git a/backoffice/tmpl/block/dlgpublish.tt b/backoffice/tmpl/block/dlgpublish.tt
new file mode 100644 (file)
index 0000000..3051cc0
--- /dev/null
@@ -0,0 +1,42 @@
+<div id="dlgpublish" class="w3-modal">
+  <div class="w3-modal-content w3-animate-top w3-card-4">
+    <header class="w3-container"> 
+      <span onclick="document.getElementById('dlgpublish').style.display='none'; return false;" 
+      class="w3-button w3-display-topright">&times;</span>
+      <h2>Êtes-vous sûre de publier ce billjee?</h2>
+    </header>
+    <div class="w3-container" id="dlgpublish_details">
+      
+    </div>
+    <footer class="w3-container w3-right-align w3-padding-16">
+      <input type="hidden" value="" id="dlgpublish_event_id" />
+      <button class="w3-button w3-theme-light  w3-margin-right w3-border" onclick="document.getElementById('dlgpublish').style.display='none'; return false;">Non</button>
+      <button class="w3-button w3-theme-l2  w3-margin-right w3-border" onclick="send_publish_event();return false;">Oui</button>
+    </footer>
+  </div>
+</div>
+<script>
+function publish_event(id){
+  document.getElementById('dlgpublish_event_id').value= id;
+  document.getElementById('dlgpublish_details').innerHTML = '';
+  document.getElementById('dlgpublish').style.display='block';
+  return false;
+}
+
+function send_publish_event(){
+  var evtid = document.getElementById('dlgpublish_event_id').value;
+  document.getElementById('dlgpublish_details').innerHTML = '';
+  req.reqdata("POST","process.cgi",{"fn":"billjeepublishevent","id":evtid},publish_result);
+  return false;
+}
+
+function publish_result(data){
+  if (document.getElementById("btnunpublish_" + data.result.unpublish)){
+    document.getElementById("btnunpublish_" + data.result.unpublish).style.display = 'block';
+    document.getElementById("btnpublish_" + data.result.unpublish).style.display = 'none';
+  } else {
+    document.getElementById("event_" + data.result.unpublish).remove;
+  }
+  return false;
+}
+</script>
\ No newline at end of file
diff --git a/backoffice/tmpl/block/dlgunpublish.tt b/backoffice/tmpl/block/dlgunpublish.tt
new file mode 100644 (file)
index 0000000..222d1ba
--- /dev/null
@@ -0,0 +1,44 @@
+<div id="dlgunpublish" class="w3-modal">
+  <div class="w3-modal-content w3-animate-top w3-card-4">
+    <header class="w3-container"> 
+      <span onclick="document.getElementById('dlgunpublish').style.display='none';" 
+      class="w3-button w3-display-topright">&times;</span>
+      <h2>Êtes-vous sûre d'enlever ce billjee?</h2>
+    </header>
+    <div class="w3-container" id="dlgunpublish_details">
+      
+    </div>
+    <footer class="w3-container w3-right-align w3-padding-16">
+      <input type="hidden" value="" id="dlgunpublish_event_id" />
+      <button class="w3-button w3-theme-light w3-margin-right w3-border" onclick="document.getElementById('dlgunpublish').style.display='none';">Non</button>
+      <button class="w3-button w3-theme-l2 w3-margin-right w3-border" onclick="send_unpublish_event();">Oui</button>
+    </footer>
+  </div>
+</div>
+<script>
+function unpublish_event(id){
+  console.log("TEST");
+  document.getElementById('dlgunpublish_event_id').value= id;
+  document.getElementById('dlgunpublish_details').innerHTML = '';
+  document.getElementById('dlgunpublish').style.display='block';
+  return false;
+}
+
+function send_unpublish_event(){
+  var evtid = document.getElementById('dlgunpublish_event_id').value;
+  document.getElementById('dlgunpublish_details').innerHTML = '';
+  req.reqdata("POST","process.cgi",{"fn":"billjeeunpublishevent","id":evtid},null);
+  //document.getElementById('event_' + evtid).remove;
+  return false;
+}
+
+function unpublish_result(data){
+  if (document.getElementById("btnpublish_" + data.result.unpublish)){
+    document.getElementById("btnunpublish_" + data.result.unpublish).style.display = 'none';
+    document.getElementById("btnpublish_" + data.result.unpublish).style.display = 'block';
+  } else {
+    document.getElementById("event_" + data.result.unpublish).remove;
+  }
+  return false;
+}
+</script>
\ No newline at end of file
diff --git a/backoffice/tmpl/block/form.tt b/backoffice/tmpl/block/form.tt
new file mode 100644 (file)
index 0000000..64c5e86
--- /dev/null
@@ -0,0 +1,30 @@
+[% MACRO formeditbox(id,name,title,size,state,datavalue) BLOCK -%]
+  
+  <div class="w3-container [% IF size %]w3-cell[% END %]" [% IF size > 1 %]style="width: [% size %]px;"[% END %]>
+        <input type="text" class="w3-input fieldsave [% IF state == 'disabled' %]w3-disabled[% END %]" id="[% id %]" name="[% name %]" value="[% datavalue %]" />
+        <label for="[% id %]" class="w3-label">[% title %]</label>
+      </div>
+[% END -%]
+[% MACRO formselectbox(id,name,title,size,selected,options) BLOCK -%]
+  <div class="w3-container">
+        
+        <select class="w3-select" id="[% id %]" name="[% name %]" >
+        
+        </select>
+        <label for="[% id %]" class="w3-label">[% title %]</label>
+      </div>
+[% END -%]
+[% MACRO formdatebox(id,name,title,size,value) BLOCK -%]
+  <div class="w3-container [% IF size %]w3-cell[% END %]" [% IF size > 1 %]style="width: [% size %]px;"[% END %]>
+        
+        <input type="date" class="w3-input fieldsave" id="[% id %]" name="[% name %]" value="[% value %]" />
+        <label for="[% id %]" class="w3-label">[% title %]</label>
+      </div>
+[% END -%]
+[% MACRO formrichtextarea(id,name,title,size,height,value) BLOCK -%]
+  <div class="w3-container">
+        <label for="[% id %]" class="w3-label">[% title %]</label>
+        <textarea class="w3-input fieldsave richeditarea" style="width: 100%; height: [% height %];" id="[% id %]" name="[% name %]"  
+        >[% value %]</textarea>
+      </div>
+[% END -%]
index 3ea575a..e2a755a 100644 (file)
@@ -1,4 +1,4 @@
 <script src="vendors/jquery/jquery.min.js"></script>
 <script src="vendors/bootstrap/js/bootstrap.bundle.min.js"></script>
-<script src="js/backoffice.js"></script>
+<script src="js/backoffice.js?v=1"></script>
  
\ No newline at end of file
diff --git a/backoffice/tmpl/block/toolbar.tt b/backoffice/tmpl/block/toolbar.tt
new file mode 100644 (file)
index 0000000..12016c0
--- /dev/null
@@ -0,0 +1,8 @@
+[% IF module == 'billjee' %]
+<header class="w3-top w3-bar w3-border-bottom w3-theme-light tblshort">
+        <button class="w3-bar-item w3-button w3-border" id="btnsidebar" onclick="parent.backoffice.loadpage('module/[% module %]/index.html','Billjee');"><img src="[% abspath %]images/icons/search.svg" style="width: 24px;"/></button>
+        <button class="w3-bar-item w3-button w3-border" id="btnsidebar" onclick="parent.backoffice.loadpage('module/[% module %]/mytickets.html','Mes billets');"><img src="[% abspath %]images/icons/list.svg" style="width: 24px;"/></button>
+        <button class="w3-bar-item w3-button w3-border" id="btnsidebar" onclick="parent.backoffice.loadpage('module/[% module %]/form_billet.html','Nouveau billet');"><img src="[% abspath %]images/icons/plus.svg" style="width: 24px;" /></button>
+        <button class="w3-bar-item w3-button w3-border" id="btnsidebar" onclick="parent.backoffice.loadpage('module/[% module %]/form_settings.html','Configuration');"><img src="[% abspath %]images/icons/settings.svg" style="width: 24px;" /></button>
+      </header>
+[% END %]
\ No newline at end of file
index 132796b..03a1c3d 100644 (file)
@@ -183,3 +183,16 @@ var frmvalidate =new Validator(document.querySelector('#frm_invoicedata'), funct
   //console.log("Validator: " + res);
   return res;
 });
+
+function sendmodrequest(idapp){
+  var seml = document.getElementById("email_moderated").value;
+  if (!seml.endsWith("@barreau.lu")){
+    return;
+  }
+
+  process_data({"fn":"setbilljeeemail":"email_moderated":seml},reload_application);
+}
+
+function reload_application(data){
+  parent.location.reload();
+}
index 1d71da0..adca085 100644 (file)
@@ -1,10 +1,10 @@
 <!--  -->
 [% prices = dksdb.prepare("select duration,price,evaluation,package,vatpercent from prices where id_app=? order by duration;") %]
-[% userapps = dksdb.prepare("select ap.id, ap.name, ap.app,case when uap.expiration >= CURRENT_DATE then  true else null end as activated, ap.description, uap.id as access_id, uap.expiration, to_char(uap.expiration, 'DD.MM.YYYY') as expdisplay, uap.publicenabled,uap.privateenabled, case when uap.expiration - interval '1 month' <= now() then true else false end as renew,ap.moderated,ap.moderatedmsg from apps ap left join appaccess uap on (ap.id = uap.id_app and uap.id_user=?) where ap.activated = true;
+[% userapps = dksdb.prepare("select ap.id, ap.name, ap.app,case when uap.expiration >= CURRENT_DATE then  true else null end as activated, ap.description, uap.id as access_id, uap.expiration, to_char(uap.expiration, 'DD.MM.YYYY') as expdisplay, uap.publicenabled,uap.privateenabled, case when uap.expiration - interval '1 month' <= now() then true else false end as renew,ap.moderated,ap.moderatedmsg,case when ap.moderated = true then (select senderemail from billjee where id_user= ?) else null end as moderatedval from apps ap left join appaccess uap on (ap.id = uap.id_app and uap.id_user=?) where ap.activated = true;
 ")%]
 <section id="apps">
 <div class="row" style="margin-top: 5px;">
-  [% FOREACH modules = userapps.execute(session.id) %]
+  [% FOREACH modules = userapps.execute(session.id,session.id) %]
   
   <div class="col-md-12 grid-margin stretch-card">
     <div class="card">
@@ -45,6 +45,7 @@
                     [% END %]
                   </div>
               </div>
+              [% END %]
               [% IF modules.renew %]
               <div class="row">
                   <div class="col">
                   </div>
                   [% END %] 
                 
-                  [%END %]
+                  [% END %]
               
               </div>
-              [% END %]
+              
               [% ELSE %]
               <div class="row">
                   
-                  [% IF modules.moderated %]
+                  [% IF modules.moderated && modules.moderatedval == undef %]
                   <div class="row col-sm-12" id="moderatedmsg" style="margin-bottom: 15px;">
                   <div class="card bg-danger text-white w-100">
                   <div class="card-body">
-                  [% modules.moderatedmsg %]<br/>
+                  [% modules.moderatedmsg %] <br/>[% modules.moderatedval %]
                   </div>
                   </div>
                   </div>
@@ -80,7 +81,7 @@
                   </div>
                   [% ELSE %]
                   <div class="col">
-                      <button class="btn btn-primary" id="btn_appvoucher" type="button" onclick="subscribeplan('[% modules.id %]',null,'voucher');return false;">j'ai un coupon </button>
+                      <button class="btn btn-primary" id="btn_appvoucher" type="button" onclick="subscribeplan('[% modules.id %]',null,'voucher');return false;">j'ai un coupon</button>
                   </div>
                   [% FOREACH price = prices.execute(modules.id) %]
                   <div class="col">
index 699e364..a248ce7 100644 (file)
@@ -1,4 +1,5 @@
 <!-- <link rel="stylesheet" href="[% abspath %]vendors/fontawesome/css/all.min.css" > -->
-<link rel="stylesheet" href="[% abspath %]vendors/vcalendar/vcalendar.css">
+<link rel="stylesheet" href="[% abspath %]vendors/flatpickr/flatpickr.min.css">
+<link rel="stylesheet" href="[% abspath %]vendors/flatpickr/themes/airbnb.css">
 <link rel="stylesheet" href="[% abspath %]vendors/choices/choices.css">
 
diff --git a/backoffice/tmpl/module/billjee/form_attendees.tt b/backoffice/tmpl/module/billjee/form_attendees.tt
deleted file mode 100644 (file)
index f54529e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
-        
-      <ul class="navbar-nav mr-auto">
-          <li class="nav-item">
-              <button class="btn btn-primary" onclick="parent.backoffice.loadpage('module/[% module %]/index.html','Billjee');">Offres et Demandes</button>
-              <button class="btn btn-primary" onclick="parent.backoffice.loadpage('module/[% module %]/mytickets.html','Mes Billjees');">Mes Billjees</button>
-        </li>
-          
-      </ul>
-      <ul class="navbar-nav ml-auto">
-          <li class="nav-item">
-            <div class="custom-control custom-switch">
-              <input type="checkbox" class="custom-control-input fieldsave" data-ident_appaccess_id="[% modules.access_id %]" data-ident_appaccess_id_user="[% session.id %]"  value="1" id="appaccess_[% modules.id %]" name="appaccess_[% module %]-privateenabled"
-              [% IF modules.privateenabled %]
-                checked
-              [% END %]
-              >
-              <label class="custom-control-label justify-content-start" for="appaccess_[% modules.id %]">visible aux autres profiles autorisés</label>
-            </div>
-          </li>
-        </ul>
-    </nav>
-<main style="margin-top: 55px;">
-<div class="row">
-[% attendees = dksdb.prepare("select us.id as id_user,us.prename, us.surname,ba.id from appaccess ap 
-join users us on (ap.id_user=us.id) 
-left join billjeeinvisible ba on (ba.id_attendee=us.id)
-where ap.id_app='7' and us.\"blocked\" is null and us.id != ? and ap.expiration >= CURRENT_DATE order by us.surname,us.prename;") %]
-<form id="frm_attendee">
-<div class="col-sm-12"> 
-    <div class="form-group">
-      <label for="specialisations">Abonnées Ã  exclure</label>
-      <div class="form-inline">
-      [% FOREACH aa IN attendees.execute(session.id) %]
-        <div class="custom-control custom-switch" style="width: 200px;"><!--  --><!-- -->
-          <input type="checkbox" class="custom-control-input fieldsave" data-ident_billjeeinvisible_id_attendee="[% aa.id_attendee %]" data-ident_lawyercategories_id_user="[% session.id %]"  value="1" id="billjeeinvisible_[% aa.id_attendee %]" name="billjeeinvisible_id"
-          [% IF aa.id %]
-          checked
-          [% END %]
-          >
-          <label class="custom-control-label justify-content-start" for="billjeeinvisible_id">[% aa.surname %] [% aa.prename %]</label>
-      </div>
-      [% END %]
-      </div>
-    </div> 
-</div>
-</form>
-</div>
-
-
-
-
-</main>
\ No newline at end of file
diff --git a/backoffice/tmpl/module/billjee/form_billet.js b/backoffice/tmpl/module/billjee/form_billet.js
new file mode 100644 (file)
index 0000000..2be853f
--- /dev/null
@@ -0,0 +1,114 @@
+function initpage(){
+  console.log("et:" + JSON.stringify(document.getElementById("eventtype").dataset));
+  //console.log("vet:" + document.getElementById("eventtype").value);
+  const onlychoices = new Choices('.onlyselect',{
+    searchEnabled: false,
+    itemSelectText: 'Sélectionner...',
+    
+  });
+  // const onlychoices = new Choices('#eventtype',{
+  //   searchEnabled: false,
+  //   itemSelectText: 'Sélectionner...',
+    
+  // }).setChoices([
+  //   { value: 'offer', label: 'Label Four', disabled: true },
+  //   { value: 'request', label: 'Label Five' },
+  //   { value: 'Six', label: 'Label Six', selected: true },
+  // ], 'value', 'label', false);;
+  // const multiplechoices = new Choices('.onlyselectmultiple',{
+  //   removeItems: true,
+  //   removeItemButton: true,
+  //   searchEnabled: false,
+  //   itemSelectText: 'Sélectionner...',
+    
+  // });
+  const choicesedit = new Choices('.selectedit',{
+    removeItems: true,
+    removeItemButton: true,
+    searchEnabled: false,
+    addItems: true,
+    addItemText: (value) => {
+      return `Appuyer "Entrée" pour ajouter <b>"${value}"</b>`;
+    },
+  });
+
+  tinymce.init({
+    selector: '.richeditarea',
+    branding: false,
+    menubar:false,
+    statusbar: true,
+    plugins: 'searchreplace autolink directionality visualblocks visualchars advlist lists textcolor colorpicker textpattern wordcount',
+    toolbar: 'bold italic underline strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent  | removeformat',
+    image_advtab: true,
+    language: 'fr_FR',
+    init_instance_callback: function (editor) {
+      editor.on('blur', function (e) {
+        // console.log('Editor was blurred!');
+        console.log(e.target.id);
+        document.getElementById(e.target.id).innerHTML = editor.getContent(); 
+        // $("#" + e.target.id).html(editor.getContent());
+        //console.log(editor.getContent());
+        // if (savefield){
+          // savefield(e.target.id);
+        // }
+      });
+    }
+  });
+  var cdate =  new Date();
+  var evid = document.getElementById("id").value;
+  var mindate = "today";
+  var evdate = document.getElementById("eventdate").value;
+  if ((evid != "") && (evdate < cdate.toJSON().substring(0,10))){
+    mindate = document.getElementById("eventdate").value;
+  }
+  flatpickr("#eventdate",{altInput: true,
+    altFormat: "F j, Y",
+    dateFormat: "Y-m-d",
+    "locale": "fr",
+    minDate: mindate
+    //defaultDate: evdate
+  });
+  //console.log("TEXT: evdate" + evdate);
+  
+  //console.log("et:" + JSON.stringify(document.getElementById("eventtype").dataset));
+}
+
+
+function save_billet(){
+  var rfields = []
+  var tdata = {"fn":"saveform","ident":"ident_billjeetickets_id"};
+  var inp = document.querySelectorAll('input,select,textarea');
+  for (var i in inp){
+    if ((inp[i].name) && (inp[i].name.startsWith("billjeetickets") || inp[i].name.startsWith("ident_billjeetickets"))){
+      if (inp[i].name == "billjeetickets_invites"){
+        var addr =  inp[i].value.split(",");
+        tdata[inp[i].name] = addr;
+      }else {
+        tdata[inp[i].name] = inp[i].value;
+        
+      }
+      
+    }
+
+  }
+  
+  req.reqdata("POST","process.cgi",tdata,saved_result);
+  //console.log(JSON.stringify(tdata));
+  return false;
+}
+
+function saved_result(data){
+  console.log("Retrned data!");
+  console.log(data);
+  return false;
+}
+
+function getStats(id) {
+  var body = tinymce.get(id).getBody(), text = tinymce.trim(body.innerText || body.textContent);
+
+  return {
+      chars: text.length,
+      words: text.split(/[\w\u2019\'-]+/).length
+  };
+}
\ No newline at end of file
diff --git a/backoffice/tmpl/module/billjee/form_billet.tt b/backoffice/tmpl/module/billjee/form_billet.tt
new file mode 100644 (file)
index 0000000..f01d72a
--- /dev/null
@@ -0,0 +1,97 @@
+
+[% IF params.id %]
+ [% qbill = dksdb.prepare("select bt.id,bt.id_user,bt.court,bt.room,bt.eventdate,bt.dayperiod,
+bt.eventmsg, bt.eventtype,  binv.invites
+from billjeetickets  bt 
+join billjee bj on (bj.id_user=bt.id_user)
+left join (select id,string_agg(invites,',') as invites from (select id,json_array_elements_text(invites) as invites from billjeetickets ) as x group by id ) binv on (bt.id=binv.id)
+join (select users.id,users.prename,users.surname,appaccess.privateenabled from users join appaccess on (appaccess.id_user=users.id) and appaccess.id_app=7) us on (bt.id_user=us.id)
+where bt.id = ? group by bt.id,binv.invites;") %]
+  [% rbill = qbill.execute(params.id) %]
+  [% bill = rbill.get_first(); %]
+
+[% END %]
+<div class="w3-display-container" >
+      
+    <div class="w3-container"  style="margin: 0px;  padding: 0px;">
+        [% INCLUDE block/toolbar.tt %]
+        <div class="w3-container" style="margin-top: 50px;" >
+
+  <form id="frmbillet" name="frmbillet" method="POST">
+    <input type="hidden" id="id_user" name="billjeetickets_id_user" value="[% session.id %]"/>
+    <input type="hidden" id="id" name="ident_billjeetickets_id" value="[% bill.0.id %]"/>
+  <div class="w3-row">
+    <div class="w3-row">
+        <div class="w3-container m4 w3-col ">
+            <label for="eventtype" class="w3-label">Type [% bill.0.eventtype %]</label>
+            <select class="w3-select onlyselect" id="eventtype" name="billjeetickets_eventtype"  >
+            [% etypes = {offer = 'Offre',request = 'Demande' } %]
+            [% FOREACH k IN etypes.keys %]
+            <option value="[% k %]" [% IF k == bill.0.eventtype %] selected[% END %]>[% etypes.$k %]</option>
+            [% END %]
+              
+            </select>
+            
+          </div>
+          <div class="w3-container m4 w3-col ">
+              <label for="eventdate" class="w3-label">Date [% bill.0.eventdate %]</label>
+              <input type="date" class="choices__inner  dateselect" id="eventdate" name="billjeetickets_eventdate" value="[% bill.0.eventdate %]" />
+              
+          </div>
+          <div class="w3-container m4 w3-col ">
+              <label for="times" class="w3-label">Heures</label>
+              <select class="w3-select onlyselect" id="times" name="billjeetickets_dayperiod" value="[% bill.0.dayperiod %]">
+              [% etimes = {'matin' = 'matin','après-midi' = 'après-midi' } %]
+            [% FOREACH k IN etimes.keys %]
+            <option value="[% k %]" [% IF k == bill.0.dayperiod %] selected[% END %]>[% etimes.$k %]</option>
+            [% END %] 
+              </select>
+              
+            </div>
+    </div>
+    <div class="w3-row">
+        <div class="w3-container m6 w3-col">
+            <label class="w3-label">Tribunal</label>
+          <select  class="w3-select onlyselect" id="court"  name="billjeetickets_court" value="[% bill.0.court %]">
+           [% ecourt = {
+             'jp-luxembourg' = 'justices de paix - Luxembourg',
+             'jp-esch' = 'justices de paix - Esch/Alzette',
+              'jp-diekirch' = 'justices de paix - Diekirch',
+              'ta-luxembourg' = 'tribunal d\'arrondissement - Luxembourg',
+              'ta-diekirch' = 'tribunal d\'arrondissement - Diekirch'
+            } %]
+            [% FOREACH k IN ecourt.keys %]
+            <option value="[% k %]" [% IF k == bill.0.court %] selected[% END %]>[% ecourt.$k %]</option>
+            [% END %] 
+        
+          </select>
+        </div>
+        <div class="w3-container m6 w3-col">
+            <label class="w3-label">Chambre(s)</label>
+          <input class="w3-input selectedit" id="room"  name="billjeetickets_room" value="[% bill.0.room %]">
+          
+          </div>
+    </div>
+      
+      
+      
+      
+        <div class="w3-container">
+            <label for="eventmsg" class="w3-label">Message</label>
+            
+            <textarea type="date" style="height: 300px;" class="w3-input richeditarea" id="eventmsg" name="billjeetickets_eventmsg" >[% bill.0.eventmsg %]</textarea>
+
+        </div>
+        <div class="w3-container">
+            <label class="w3-label">visible pour tous ou ...</label>
+            
+          <input class="w3-input selectedit" id="invites"  name="billjeetickets_invites" value="[% bill.0.invites %]" placeholder="ajouter des emails...@barreau.lu" />
+        <div class="w3-container w3-padding">
+            <button class="w3-button w3-theme w3-xxlarge w3-block" onclick="save_billet();return false;">Sauvegarder</button>
+          </div> 
+        
+    </form>
+  </div>
+  
+</div>
+</div>
\ No newline at end of file
diff --git a/backoffice/tmpl/module/billjee/form_offer.js b/backoffice/tmpl/module/billjee/form_offer.js
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/backoffice/tmpl/module/billjee/form_offer.tt b/backoffice/tmpl/module/billjee/form_offer.tt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/backoffice/tmpl/module/billjee/form_request.js b/backoffice/tmpl/module/billjee/form_request.js
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/backoffice/tmpl/module/billjee/form_request.tt b/backoffice/tmpl/module/billjee/form_request.tt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/backoffice/tmpl/module/billjee/form_settings.js b/backoffice/tmpl/module/billjee/form_settings.js
new file mode 100644 (file)
index 0000000..55285bb
--- /dev/null
@@ -0,0 +1,73 @@
+function initpage(){
+
+  const choicesedit = new Choices('.selectedit',{
+    removeItems: true,
+    removeItemButton: true,
+    searchEnabled: false,
+    addItems: true,
+    addItemText: (value) => {
+      return `Appuyer "Entrée" pour ajouter <b>"${value}"</b>`;
+    },
+  });
+
+  // tinymce.init({
+  //   selector: '.richeditarea',
+  //   branding: false,
+  //   menubar:false,
+  //   statusbar: true,
+  //   plugins: 'searchreplace autolink directionality visualblocks visualchars advlist lists textcolor colorpicker textpattern wordcount',
+  //   toolbar: 'bold italic underline strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent  | removeformat',
+  //   image_advtab: true,
+  //   language: 'fr_FR',
+  //   init_instance_callback: function (editor) {
+  //     editor.on('blur', function (e) {
+  //       // console.log('Editor was blurred!');
+  //       console.log(e.target.id);
+  //       document.getElementById(e.target.id).innerHTML = editor.getContent(); 
+  //       // $("#" + e.target.id).html(editor.getContent());
+  //       //console.log(editor.getContent());
+  //       // if (savefield){
+  //         // savefield(e.target.id);
+  //       // }
+  //     });
+  //   }
+  // });
+
+}
+
+function save_settings(){
+  var rfields = []
+  var tdata = {"fn":"saveform","ident":"ident_billjee_id"};
+  var inp = document.querySelectorAll('input,select,textarea');
+  for (var i in inp){
+    if ((inp[i].name) && (inp[i].name.startsWith("billjee") || inp[i].name.startsWith("ident_billjee"))){
+      if (inp[i].name == "billjee_invites"){
+        var addr =  inp[i].value.split(",");
+        tdata[inp[i].name] = addr;
+      }else {
+        tdata[inp[i].name] = inp[i].value;
+        
+      }
+      
+    }
+
+  }
+  
+  req.reqdata("POST","process.cgi",tdata,saved_result);
+  console.log(JSON.stringify(tdata));
+  return false;
+}
+
+function saved_result(data){
+  console.log(data);
+  return false;
+}
+
+function getStats(id) {
+  var body = tinymce.get(id).getBody(), text = tinymce.trim(body.innerText || body.textContent);
+
+  return {
+      chars: text.length,
+      words: text.split(/[\w\u2019\'-]+/).length
+  };
+}
diff --git a/backoffice/tmpl/module/billjee/form_settings.tt b/backoffice/tmpl/module/billjee/form_settings.tt
new file mode 100644 (file)
index 0000000..8710a43
--- /dev/null
@@ -0,0 +1,45 @@
+[% qcfg = dksdb.prepare("SELECT bj.id, bj.id_user, bj.senderemail, bj.msgoffer, bj.msgrequest, binv.invites FROM billjee bj 
+ left join (select id,string_agg(invites,',') as invites from (select id,json_array_elements_text(invites) as invites from billjee ) as x group by id ) binv on (bj.id=binv.id)
+ where bj.id_user= ?;") %]
+  [% rcfg = qcfg.execute(session.id) %]
+  [% cfg = rcfg.get_first(); %]
+
+<div class="w3-display-container" >
+      
+    <div class="w3-container"  style="margin: 0px;  padding: 0px;">
+        [% INCLUDE block/toolbar.tt %]
+        <div class="w3-container" style="margin-top: 50px;" >
+   [% Dumper.dump(cfg) %]
+  <form id="frmbillet" name="frmbillet" method="POST">
+    <input type="hidden" id="id_user" name="billjee_id_user" value="[% session.id %]"/>
+    <input type="hidden" id="id" name="ident_billjee_id" value="[% cfg.0.id %]"/>
+  <div class="w3-row">
+    <div class="w3-container  ">
+      <label for="senderemail" class="w3-label">Email (...@barreau.lu)</label>
+      <input type="text" class="w3-input w3-border" id="senderemail" name="billjee_senderemail" value="[% cfg.0.senderemail %]" />
+    </div>
+    <div class="w3-container">
+            <label for="eventmsg" class="w3-label">Message pour des demandes</label>
+            
+            <textarea  style="height: 200px;" class="w3-input w3-border" id="msgrequest" name="billjee_msgrequest" >[% cfg.0.msgrequest %]</textarea>
+
+        </div>
+        <div class="w3-container">
+            <label for="eventmsg" class="w3-label">Message pour des offres</label>
+            
+            <textarea style="height: 200px;" class="w3-input w3-border" id="msgoffer" name="billjee_msgoffer" >[% cfg.0.msgoffer %]</textarea>
+
+        </div>
+        <div class="w3-container">
+            <label class="w3-label">visible par défault pour ...</label>
+            
+          <input class="w3-input selectedit" id="invites"  name="billjee_invites" value="[% cfg.0.invites %]" placeholder="ajouter des emails...@barreau.lu" />
+        <div class="w3-container w3-padding">
+            <button class="w3-button w3-theme w3-xxlarge w3-block" onclick="save_settings();return false;">Sauvegarder</button>
+          </div> 
+        
+    </form>
+  </div>
+  
+</div>
+</div>
\ No newline at end of file
diff --git a/backoffice/tmpl/module/billjee/form_template.js b/backoffice/tmpl/module/billjee/form_template.js
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/backoffice/tmpl/module/billjee/form_template.tt b/backoffice/tmpl/module/billjee/form_template.tt
deleted file mode 100644 (file)
index e69de29..0000000
index 124e013..aadbce2 100644 (file)
-var offcal= null;
-var reqcal = null;
-var events = [];
-var initdate = new Date();
-var monthnames = ['Janvier','Février','Mars','Avril','May','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'];
-// var calendar = null;
-// var calheight = window.innerHeight - 60;
-function initpage(){
-  const choices = new Choices('select',{
-    removeItems: true,
-    removeItemButton: true,
-    searchEnabled: false
-  });
-  //$('select').selectpicker();
-  //console.log(calheight);
-  loadcalendars();
-  loaddata();
-}
-
 
-function loadcalendars(){
-  document.getElementById("monthlabel").innerHTML=monthnames[initdate.getMonth()] + " " +initdate.getFullYear();
-  var lmday = new Date(initdate.getFullYear(), initdate.getMonth() + 1, 0);
-  var fmday = new Date(initdate.getFullYear(), initdate.getMonth(), 1);
-  console.log(fmday.getWeek());
-  var weeks = fmday.getWeek();
-  var fmonday = new Date(fmday.getFullYear(), fmday.getMonth(), -1 * fmday.getDay() + 2);
-  // if (fmonday > initdate) {
-  //   fmonday = new Date(initdate.getFullYear(), initdate.getMonth(),fmonday.getDate()-7);
-  // }
-  console.log("First Monday:" + fmonday);
-  var cdate = new Date(fmonday.getFullYear(),fmonday.getMonth(),fmonday.getDate());
-  for (var w=0;w<=5;w++){
-    console.log("CDATE:" + cdate);
-    for (var d=0;d<=6; d++){
-      document.getElementById("day" + w + d).innerHTML = '<button class="w3-button w3-block w3-grey" onclick="selectday();">'+ fmonday.getDate() +'</button>';
-      cdate = cdate.setDate(cdate.getDate() + 1);
-    }
-    document.getElementById("week" + w).innerHTML = '<button class="w3-button w3-block w3-orange" onclick="selectweek();">'+ weeks +'</button>';
-    weeks++;
-  }
-  //console.log(lmday);
-  console.log("LAST DAY: DATE:" + lmday.getDate() + "DOW:" + lmday.getDay());
-  console.log("First DAY: DATE:" + fmday.getDate() + "DOW:" + fmday.getDay());
-  for (var c=0;c<=5;c++){
-    
-  }
+var userid=[% session.id %];
+var onlyuser=false;
+var setnearest = true;
+var onlyfuture = true;
+var courts = {
+  "jp-luxembourg":"justices de paix - Luxembourg",
+  "jp-esch":"justices de paix - Esch/Alzette",
+  "jp-diekirch":"justices de paix - Diekirch",
+  "ta-luxembourg":"tribunal d'arrondissement - Luxembourg",
+  "ta-diekirch":"tribunal d'arrondissement - Diekirch"
 }
-
-function loaddata(){
+function initpage(){
+ loadcalendars();
  
 }
-// document.addEventListener('DOMContentLoaded', function() {
-  
-// });
 
-function getevents(){
-  
-  // var eventtypes = [];
-  // $('input[type=checkbox]').each(function(){
-  //   if ($(this).prop("checked")){
-  //     eventtypes.push($(this).val()); 
-  //   }  
-  // });
-  // console.log(calendar);
-  // var pdata = {"fn":"getbilljeeevents",startdate:calendar.view.props.dateProfile.currentRange.start.toISOString().substring(0,10),enddate:calendar.view.props.dateProfile.currentRange.end.toISOString().substring(0,10)};
-  // console.log(pdata);
-  // process_data(pdata,events_callback);
-  // return false;
-}
 
-function removeEvents(){
-  // var ev = calendar.getEvents();
-  // for (var e in ev){
-  //   var rev = calendar.getEventById(ev[e].id);
-  //   rev.remove();
-  // }
-}
 
-function events_callback(data){
-  // console.log("Events Data");
-  // console.log(data);
-  // events = null;
-  // events = data.events;
-  // for (var i in events){
-  //   console.log("POS:" + i);
-  //   console.log(events[i]);
-  //   calendar.addEvent({
-  //     id: i,
-  //     title: events[i].surname + " " + events[i].prename + " (" + events[i].court + ")",
-  //     start: events[i].eventdate + "T" + events[i].eventstarttime,
-  //     end: events[i].eventdate + "T" + events[i].eventendtime,
-  //     color: ((events[i].eventtype == "offer")?"#007f00":"#e59400")
-  //   });
-  // }
+function search_data(){
+  //document.getElementById('pnlresult').innerHTML = '';
+  var start = document.getElementById("filterdatefrom").value;
+  var end = document.getElementById("filterdateto").value;
+  req.reqdata("POST","process.cgi",{"fn":"getbilljeeevents","startdate":start,"enddate":end,"onlyfuture":onlyfuture},display_results);
 
 }
 
-function events_load_detail(evtid){
-  // console.log(evtid);
-  // if (events[evtid].eventtype == "offer"){
-  //   $("#offer_id").val(events[evtid].id);
-  //   $("#offer_title").html(events[evtid].surname + " " + events[evtid].prename);
-  //   $("#offer_court").html(events[evtid].court);
-  //   $("#offer_room").html(events[evtid].room);
-  //   $("#offer_time").html(events[evtid].dspeventdate + " (" + events[evtid].eventstarttime.substring(1,5) + " - " + events[evtid].eventendtime.substring(1,5) + ")");
-  //   $("#offer_msg").html(events[evtid].eventmsg);
-  //   $("#dlg_offer").modal("show");
-    
-  // } else {
+function display_results(data){
+
+  var res =  document.getElementById('pnlresult');
+  res.innerHTML = '';
+  for (var i in data.events){
     
-  //   $("#req_id").val(events[evtid].id);
-  //   $("#req_title").html(events[evtid].surname + " " + events[evtid].prename);
-  //   $("#req_court").html(events[evtid].court);
-  //   $("#req_room").html(events[evtid].room);
-  //   $("#req_time").html(events[evtid].dspeventdate + " (" + events[evtid].eventstarttime.substring(1,5) + " - " + events[evtid].eventendtime.substring(1,5) + ")");
-  //   $("#req_msg").html(events[evtid].eventmsg);
-  //   $("#dlg_request").modal("show");
-  // }
+    var card = '<div class="w3-card-4" id="event_'+data.events[i].id+'">';
+    card += '<div class="w3-container w3-theme-d3"><h4 id="event_'+data.events[i].id+'_info1">' + data.events[i].dspdate + ' - ' + data.events[i].dayperiod + ' - ' + data.events[i].dspeventtype + ' de ' + data.events[i].surname + ' ' + data.events[i].prename  +'</h4>'+
+    '</div><div class="w3-container w3-theme-d4"><h5 id="event_'+data.events[i].id+'_info2">' + courts[data.events[i].court] + ((data.events[i].room)?' (' + data.events[i].room + ')':'') + '</h5>'+'</div>';
+    card += '<div class="w3-container">' + data.events[i].msg + '</div>';
+    card += '<footer class="w3-container w3-right-align w3-padding-16">';
+    if (userid == data.events[i].id_user){
+      card += '<button class="w3-btn w3-theme-l2 w3-margin-right" onclick="edit_event(\''+ data.events[i].id +'\');"><img src="[% abspath %]images/icons/edit.svg" style="width: 24px;" data-id="\''+ data.events[i].id +'\'"/>&nbsp;Editer </button>';
+      //if (data.events.isdisabled)
+      //card += '<button class="w3-btn w3-theme-l2 w3-margin-right" ><img src="[% abspath %]images/icons/publish.svg" style="width: 24px;" />&nbsp;Publier </button>';
+      card += '<button class="w3-btn w3-theme-l2 w3-margin-right" id="btnunpublish_'+data.events[i].id+'" onclick="unpublish_event(\''+ data.events[i].id +'\');"><img src="[% abspath %]images/icons/unpublish.svg"  style="width: 24px;" />&nbsp;Enlever </button>';
+      card += '<button class="w3-btn w3-red w3-text-black" ><img src="[% abspath %]images/icons/remove.svg" onclick="delete_event();" style="width: 24px;" />&nbsp;Supprimer </button>';
+    } else {
+      card += '<button class=" w3-btn w3-theme-l2 w3-margin-right" onclick="contact_publisher(\''+ data.events[i].id +'\');"><img src="[% abspath %]images/icons/send.svg"  style="width: 24px;" />&nbsp;Contacter </button>';
+    }
+//     
+
+    card += '</footer>';
+    card += '</div>';
+    res.innerHTML = res.innerHTML +  card;
+  }
+  
+  return false;
 }
 
-function open_offer(){
-  parent.backoffice.loadpage('module/[% module %]/form_offer.html?offer_id=' + $("#offer_id").val(),'Envoyer une demande');
+function edit_event(id){
+  //console.log(this);
+  
+  parent.backoffice.loadpage('module/[% module %]/form_billet.html?id=' + id,'Editer Billjee');
+  return false;
 }
 
-function open_request(){
-  parent.backoffice.loadpage('module/[% module %]/form_request.html?req_id=' + $("#req_id").val(),'Envoyer une offre');
-}
\ No newline at end of file
+
index 32b8a9d..9500382 100644 (file)
 <div class="w3-display-container" >
       
   <div class="w3-container"  style="margin: 0px;  padding: 0px;">
-      <header class="w3-top w3-bar w3-border-bottom w3-theme-light">
-        <button class="w3-bar-item w3-button" id="btnsidebar" onclick="">Recherche</button>
-        <button class="w3-bar-item w3-button" id="btnsidebar" onclick="openSidebar();">Créer un ticket</button>
-      </header>
-      <div class="w3-container" style="margin-top: 50px;">
-
-      
-      <table class="w3-table w3-border w3-centered">
-        <thead class="w3-light-grey">
-          <tr><th class="w3-border"><button class="w3-button w3-teal" onclick="previousMonth();">prev</button></th><th  class="w3-border" colspan="6" id="monthlabel">Month YYYY</th><th class="w3-border"><button class="w3-button w3-teal" onclick="nextMonth();">next</button></th></tr>
-          <tr>
-            <th class="w3-border">CW</th>
-            <th class="w3-border">Lu</th>
-            <th class="w3-border">Ma</th>
-            <th class="w3-border">Me</th>
-            <th class="w3-border">Je</th>
-            <th class="w3-border">Ve</th>
-            <th class="w3-border">Sa</th>
-            <th class="w3-border">Di</th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr><td class="w3-border calweek" id="week0">&nbsp;</td><td  class="w3-border calday" id="day01">&nbsp;</td><td  class="w3-border calday" id="day02">&nbsp;</td><td  class="w3-border calday" id="day03">&nbsp;</td><td  class="w3-border calday" id="day04">&nbsp;</td><td  class="w3-border calday" id="day05">&nbsp;</td><td  class="w3-border calday" id="day06">&nbsp;</td><td  class="w3-border calday" id="day00">&nbsp;</td></tr>
-          <tr><td class="w3-border calweek" id="week1">&nbsp;</td><td  class="w3-border calday" id="day11">&nbsp;</td><td  class="w3-border calday" id="day12">&nbsp;</td><td  class="w3-border calday" id="day13">&nbsp;</td><td  class="w3-border calday" id="day14">&nbsp;</td><td  class="w3-border calday" id="day15">&nbsp;</td><td  class="w3-border calday" id="day16">&nbsp;</td><td  class="w3-border calday" id="day10">&nbsp;</td></tr>
-          <tr><td class="w3-border calweek" id="week2">&nbsp;</td><td  class="w3-border calday" id="day21">&nbsp;</td><td  class="w3-border calday" id="day22">&nbsp;</td><td  class="w3-border calday" id="day23">&nbsp;</td><td  class="w3-border calday" id="day24">&nbsp;</td><td  class="w3-border calday" id="day25">&nbsp;</td><td  class="w3-border calday" id="day26">&nbsp;</td><td  class="w3-border calday" id="day20">&nbsp;</td></tr>
-          <tr><td class="w3-border calweek" id="week3">&nbsp;</td><td  class="w3-border calday" id="day31">&nbsp;</td><td  class="w3-border calday" id="day32">&nbsp;</td><td  class="w3-border calday" id="day33">&nbsp;</td><td  class="w3-border calday" id="day34">&nbsp;</td><td  class="w3-border calday" id="day35">&nbsp;</td><td  class="w3-border calday" id="day36">&nbsp;</td><td  class="w3-border calday" id="day30">&nbsp;</td></tr>
-          <tr><td class="w3-border calweek" id="week4">&nbsp;</td><td  class="w3-border calday" id="day41">&nbsp;</td><td  class="w3-border calday" id="day42">&nbsp;</td><td  class="w3-border calday" id="day43">&nbsp;</td><td  class="w3-border calday" id="day44">&nbsp;</td><td  class="w3-border calday" id="day45">&nbsp;</td><td  class="w3-border calday" id="day46">&nbsp;</td><td  class="w3-border calday" id="day40">&nbsp;</td></tr>
-          <tr><td class="w3-border calweek" id="week5">&nbsp;</td><td  class="w3-border calday" id="day51">&nbsp;</td><td  class="w3-border calday" id="day52">&nbsp;</td><td  class="w3-border calday" id="day53">&nbsp;</td><td  class="w3-border calday" id="day54">&nbsp;</td><td  class="w3-border calday" id="day55">&nbsp;</td><td  class="w3-border calday" id="day56">&nbsp;</td><td  class="w3-border calday" id="day50">&nbsp;</td></tr>
-        </tbody>
-      </table>
-    </div>
-    
-    <!-- <nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
-        
-      <ul class="navbar-nav mr-auto">
-          <li class="nav-item">
-              <button class="btn btn-primary" onclick="parent.backoffice.loadpage('module/[% module %]/index.html','Billjee');">Offres et Demandes</button>
-              <button class="btn btn-primary" onclick="parent.backoffice.loadpage('module/[% module %]/mytickets.html','Mes Billjees');">Mes Billjees</button>
-              
-        </li>
-          
-      </ul>
-      <ul class="navbar-nav ml-auto">
-          <li class="nav-item">
-            <div class="custom-control custom-switch">
-              <input type="checkbox" class="custom-control-input fieldsave" data-ident_appaccess_id="[% modules.access_id %]" data-ident_appaccess_id_user="[% session.id %]"  value="1" id="appaccess_[% modules.id %]" name="appaccess_[% module %]-privateenabled"
-              [% IF modules.privateenabled %]
-                checked
-              [% END %]
-              >
-              <label class="custom-control-label justify-content-start" for="appaccess_[% modules.id %]">visible aux autres profiles autorisés</label>
-            </div>
-          </li>
-        </ul>
-    </nav> -->
-<!-- <main style="margin-top: 55px;">
-  <div class="row">
-    
-    
+      [% INCLUDE block/toolbar.tt %]
+      <div class="w3-container" style="margin-top: 50px;" id="pnlsearch">
+        <!-- <form id="frmsearch" name="frmsearch" action="" method="POST"> -->
+      [% INCLUDE block/calendar.tt %]
+     
     
-  </div>
-  <div class="row">
-    <div class="col-md-6"> -->
-      
-    </div>
-    <div class="col-md-6">
-      <div class="w3-container">
+    <!-- <div class="w3-container">
         <label class="w3-label">Type</label>
-        <select  class="w3-select" id="filtertype" title="rien selectionné" multiple="multiple" name="filtertype" onchange="loaddata();">
-            <option selected value="offer">Offres</option>
-            <option selected value="request">Demandes</option>
-            <option selected value="myoffers">Mes Offres</option>
-            <option selected value="myrequests">Mes Demandes</option>
+        <select  class="w3-select" id="filtertype" title="rien selectionné" multiple="multiple" name="filtertype" >
+            <option value="offer">Offres</option>
+            <option value="request">Demandes</option>
+            <option value="myoffers">Mes billets</option>
           </select>
-      </div>
-      <div class="w3-container">
-        <label class="w3-label">Lieu</label>
-      <select  class="w3-select" id="filtercourt" title="rien selectionné" multiple="multiple" name="filtercourt" onchange="loaddata();">
-        <option selected value="Luxembourg">Luxembourg</option>
-        <option selected value="Esch/Alzette">Esch/Alzette</option>
-        <option selected value="Diekirch">Diekirch</option>
+      </div> -->
+      <!-- <div class="w3-container">
+        <label class="w3-label">Tribunal</label>
+      <select  class="w3-select" id="filtercourt" title="rien selectionné" multiple="multiple" name="filtercourt" >
+          <option value="jp-luxembourg">justices de paix - Luxembourg</option>
+          <option value="jp-esch">justices de paix - Esch/Alzette</option>
+          <option value="jp-diekirch">justices de paix - Diekirch</option>
+          <option value="ta-luxembourg">tribunal d'arrondissement - Luxembourg</option>
+          <option value="ta-diekirch">tribunal d'arrondissement - Diekirch</option>
       </select>
-      </div>
-      <div class="w3-container">
+      </div> -->
+      <!-- <div class="w3-container">
           <label class="w3-label">Chambre</label>
-        <select class="w3-select" id="filterroom" title="rien selectionné" multiple="multiple" name="filterroom" onchange="loaddata();">
+        <select class="w3-select" id="filterroom" title="rien selectionné" multiple="multiple" name="filterroom" >
           
         </select>
-        </div>
-        <div class="w3-container">
+        </div> -->
+        <!-- <div class="w3-container">
             <label class="w3-label">Avocat</label>
-          <select class="w3-select" id="filterlawyer" title="rien selectionné" multiple="multiple" name="filterlawyer" onchange="loaddata();">
+          <select class="w3-select" id="filterlawyer" title="rien selectionné" multiple="multiple" name="filterlawyer" >
             
           </select>
-          </div>
+          </div> -->
+         <!-- </form> -->
+      <!-- <div class="w3-container w3-padding">
+        <button type="button" class="w3-button w3-theme w3-xxlarge w3-block" onclick="search_data();">Rechercher</button>
+      </div>    -->
+    </div>
+    <div class="w3-container w3-margin" id="pnlresult"  >
+      
+      <!-- <h2>données trouvées:</h2> -->
+      
+      
+      
         
-  </div>
-<!-- </div> -->
-</div>
+          
+    </div>
+</div> 
 </div>
-<!-- </main> -->
+[% INCLUDE block/dlgdelete.tt %]
+[% INCLUDE block/dlgunpublish.tt %]
+[% INCLUDE block/dlgcontactpublisher.tt %]
+
+
 
 
index b070c26..27c932d 100644 (file)
@@ -1,2 +1,5 @@
+<script src="[% abspath %]vendors/tinymce/js/tinymce/tinymce.min.js"></script>
 <script src="[% abspath %]vendors/choices/choices.min.js"></script>
+<script src="[% abspath %]vendors/flatpickr/flatpickr.min.js"></script>
+<script src="[% abspath %]vendors/flatpickr/l10n/fr.js"></script>
 <script src="[% pagename %].js"></script>
\ No newline at end of file
index 1232a32..074197d 100644 (file)
@@ -1,15 +1,66 @@
 
+
+var userid=[% session.id %];
+var onlyuser=true;
+var setnearest=true;
+var onlyfuture = false;
+var courts = {
+  "jp-luxembourg":"justices de paix - Luxembourg",
+  "jp-esch":"justices de paix - Esch/Alzette",
+  "jp-diekirch":"justices de paix - Diekirch",
+  "ta-luxembourg":"tribunal d'arrondissement - Luxembourg",
+  "ta-diekirch":"tribunal d'arrondissement - Diekirch"
+}
+
 function initpage(){
-  headerresize();
+ loadcalendars();
 }
 
-function headerresize(){
-  var cols =  $("#tbl_tickets > tbody > tr:first-child").children();
-  var colnum = cols.length -1
-  console.log("childnum:" + colnum);
-  for (var i=1;i<=colnum;i++){
-    wx = $("#tbl_tickets > tbody > tr:first-child > td:nth-child("+ i +")").width();
-    // wx = wx +3;
-    $("#tbl_tickets_head > thead > tr > th:nth-child("+ i +")").width(wx);
+function search_data(){
+  //document.getElementById('pnlresult').innerHTML = '';
+  var start = document.getElementById("filterdatefrom").value;
+  var end = document.getElementById("filterdateto").value;
+  req.reqdata("POST","process.cgi",{"fn":"getbilljeeeventsbyuser","startdate":start,"enddate":end,"onlyfuture":onlyfuture},display_results);
+
+}
+
+function display_results(data){
+
+  var res =  document.getElementById('pnlresult');
+  res.innerHTML = '';
+  for (var i in data.events){
+    
+    var card = '<div class="w3-card-4" id="event_'+data.events[i].id+'">';
+    card += '<div class="w3-container w3-theme-d3"><h4 id="event_'+data.events[i].id+'_info1">' + data.events[i].dspdate + ' - ' + data.events[i].dayperiod + ' - ' + data.events[i].dspeventtype+ ' de ' + data.events[i].surname + ' ' + data.events[i].prename  +'</h4>'+
+    '</div><div class="w3-container w3-theme-d4"><h5 id="event_'+data.events[i].id+'_info2">' + courts[data.events[i].court] + ((data.events[i].room)?' (' + data.events[i].room + ')':'') + '</h5>'+'</div>';
+    card += '<div class="w3-container">' + data.events[i].msg + '</div>';
+    card += '<footer class="w3-container w3-right-align w3-padding-16">';
+    if (userid == data.events[i].id_user){
+      card += '<button class="w3-btn w3-theme-l2 w3-margin-right" onclick="edit_event(\''+ data.events[i].id +'\');"><img src="[% abspath %]images/icons/edit.svg" style="width: 24px;" data-id="\''+ data.events[i].id +'\'"/>&nbsp;Editer </button>';
+      //if (data.events.isdisabled)
+      //card += '<button class="w3-btn w3-theme-l2 w3-margin-right" ><img src="[% abspath %]images/icons/publish.svg" style="width: 24px;" />&nbsp;Publier </button>';
+       
+       
+      card += '<button class="w3-btn w3-theme-l2 w3-margin-right" id="btnpublish_'+data.events[i].id+'" onclick="publish_event(\''+ data.events[i].id +'\');"><img src="[% abspath %]images/icons/publish.svg"  style="width: 24px;'+ ((data.events[i].isdisabled)? 'display:none;':'') +'" />&nbsp;Publier </button>';
+      card += '<button class="w3-btn w3-theme-l2 w3-margin-right" id="btnunpublish_'+data.events[i].id+'" onclick="unpublish_event(\''+ data.events[i].id +'\');"><img src="[% abspath %]images/icons/unpublish.svg"  style="width: 24px;'+ ((data.events[i].isdisabled)? '':'display:none') +'" />&nbsp;Enlever </button>';
+      card += '<button class="w3-btn w3-red w3-text-black" ><img src="[% abspath %]images/icons/remove.svg" onclick="delete_event();" style="width: 24px;" />&nbsp;Supprimer </button>';
+    } else {
+      card += '<button class=" w3-btn w3-theme-l2 w3-margin-right" onclick="contact_publisher(\''+ data.events[i].id +'\');"><img src="[% abspath %]images/icons/send.svg"  style="width: 24px;" />&nbsp;Contacter </button>';
+    }
+//     
+
+    card += '</footer>';
+    card += '</div>';
+    res.innerHTML = res.innerHTML +  card;
   }
-}
\ No newline at end of file
+//  
+return false;
+}
+
+function edit_event(id){
+  parent.backoffice.loadpage('module/[% module %]/form_billet.html?id=' + id,'Editer Billjee');
+  return false;
+}
+
+
index b1d5e7f..de57143 100644 (file)
@@ -1,69 +1,25 @@
-
-    <nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
+<div class="w3-display-container" >
+      
+  <div class="w3-container"  style="margin: 0px;  padding: 0px;">
+      [% INCLUDE block/toolbar.tt %]
+      <div class="w3-container" style="margin-top: 50px;" id="pnlsearch">
+        <!-- <form id="frmsearch" name="frmsearch" action="" method="POST"> -->
+      [% INCLUDE block/calendar.tt %]
+     
+    
+    
+    </div>
+    <div class="w3-container w3-margin" id="pnlresult"  >
+      
+   
+      
+      
+      
         
-      <ul class="navbar-nav mr-auto">
-          <li class="nav-item">
-              <button class="btn btn-primary" onclick="parent.backoffice.loadpage('module/[% module %]/index.html','Billjee');">Offres et Demandes</button>
-              <button class="btn btn-primary" onclick="parent.backoffice.loadpage('module/[% module %]/form_attendees.html','Visibilité');">Visibilité limité</button>
-              <button class="btn btn-primary" onclick="parent.backoffice.loadpage('module/[% module %]/form_offer.html','Offres');"><i class="mdi mdi-plus"></i> Offre</button>
-              <button class="btn btn-primary" onclick="parent.backoffice.loadpage('module/[% module %]/form_request.html','Demandes');"><i class="mdi mdi-plus"></i> Demande</button>
-        </li>
           
-      </ul>
-      <ul class="navbar-nav ml-auto">
-          <li class="nav-item">
-            <div class="custom-control custom-switch">
-              <input type="checkbox" class="custom-control-input fieldsave" data-ident_appaccess_id="[% modules.access_id %]" data-ident_appaccess_id_user="[% session.id %]"  value="1" id="appaccess_[% modules.id %]" name="appaccess_[% module %]-privateenabled"
-              [% IF modules.privateenabled %]
-                checked
-              [% END %]
-              >
-              <label class="custom-control-label justify-content-start" for="appaccess_[% modules.id %]">visible aux autres profiles autorisés</label>
-            </div>
-          </li>
-        </ul>
-    </nav>
-<main style="margin-top: 55px;">
-        <table style="width: 100%;" class="noselect">
-            <tr>
-              <td style="padding: 0px; margin: 0px;">
-                <table class="table table-bordered" style="width: 100%; margin: 0px;"  id="tbl_tickets_head">
-                  <thead class="thead-dark"> 
-                    <tr>
-                        <th>Date</th>
-                        <th>Type</th>
-                        <th>Tribunal</th>
-                        <th>Chambre</th>
-                        <th>Réponses</th>
-                        <th>&nbsp;</th>
-                  </tr>
-                    </thead>
-                </table>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div style="width: 100%; height: 89vh; overflow-y: scroll;">            
-    <table id="tbl_tickets" class="table table-bordered table-hover table-striped">
-        <tbody>
-        [% events = dksdb.prepare("select bt.id,bt.court,bt.room,to_char(bt.eventdate,'DD.MM.YYYY') as dspeventdate,bt.eventdate,bt.eventstarttime,bt.eventendtime,bt.eventmsg,bt.eventtype, 0 as attendees,
-from billjeetickets bt where id_user=?;") %]
-        [% FOREACH ev = events.execute(session.id) %]
-            <tr>
-              <td>[% ev.eventdate %]<br/>[% ev.eventstarttime %] - [% ev.eventendtime %]</td>
-              <td>[% ev.eventtype %]</td>
-              <td>[% ev.court %]</td>
-              <td>[% ev.room %]</td>
-              <td>[% ev.attendees %]</td>
-              <td style="width: 120px;"><a class="btn btn-info text-white"><i class="mdi mdi-pencil"></i></a><a class="btn btn-danger text-white"><i class="mdi mdi-trash-can"></i></a></td>
-            </tr>
-        [% END %]
-        </tbody>
-    </table>
-  </div>
-</td>
-</tr>
-</table> 
-  
-</main>
-
+    </div>
+</div> 
+</div>
+[% INCLUDE block/dlgdelete.tt %]
+[% INCLUDE block/dlgunpublish.tt %]
+[% INCLUDE block/dlgpublish.tt %]
\ No newline at end of file
index 3ac5a85..c87e130 100644 (file)
@@ -32,6 +32,7 @@
 
 .choices[data-type*="select-one"] .choices__inner {
   padding-bottom: 7.5px;
+
 }
 
 .choices[data-type*="select-one"] .choices__input {
   padding: 7.5px 7.5px 3.75px;
   border: 1px solid #DDDDDD;
   /* border-radius: 2.5px; */
-  font-size: 14px;
+  /* font-size: 14px; */
   min-height: 44px;
   overflow: hidden;
+  /* font-weight: bold; */
 }
 
 .is-focused .choices__inner,
 
 .is-flipped.is-open .choices__inner {
   /* border-radius: 0 0 2.5px 2.5px; */
-}
+} 
 
 .choices__list {
   margin: 0;
   display: inline-block;
   vertical-align: middle;
   /* border-radius: 20px; */
-  padding: 4px 10px;
-  font-size: 12px;
-  font-weight: 500;
-  margin-right: 3.75px;
-  margin-bottom: 3.75px;
-  background-color: #00BCD4;
-  border: 1px solid #00a5bb;
+  padding: 4px 6px;
+  font-size: 16px;
+  height: 40px;
+  /* font-size: 12px; */
+  /* font-weight: 500; */
+   margin-right: 3.75px; 
+  /* margin-bottom: 3.75px; */
+  background-color: #88a8db;
+  border: 1px solid #88a8db;
   color: #FFFFFF;
+  /* font-weightfont-weight: bold; */
   word-break: break-all;
 }
 
 }
 
 .choices__heading {
-  font-weight: 600;
+  /* font-weight: 600; */
   font-size: 12px;
   padding: 10px;
   border-bottom: 1px solid #f7f7f7;
diff --git a/backoffice/vendors/datepicker/datepicker.css b/backoffice/vendors/datepicker/datepicker.css
new file mode 100644 (file)
index 0000000..d5b4684
--- /dev/null
@@ -0,0 +1,81 @@
+.noselect {
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+}
+
+#datepicker-frame {
+    width: 300px;
+    height: 300px;
+    position: absolute;
+    /* border-radius: 8px; */
+    background-color: white;
+    box-shadow: 0 0 8px 0 black;
+    color: #333333;
+    font: 16px Tahoma;
+}
+
+#datepicker-frame ul {
+    list-style: none;
+    width: 300px;
+    height: 40px;
+    margin: 0;
+    padding: 0;
+    font-weight: bold;
+    line-height: 40px;
+}
+
+#datepicker-frame li {
+    width: 220px;
+    height: 40px;
+    float: left;
+    text-align: center;
+}
+
+#datepicker-frame li:first-child,
+#datepicker-frame li:last-child {
+    width: 40px;
+    height: 40px;
+    float: left;
+}
+
+#datepicker-frame table {
+    border-collapse: collapse;
+    margin: auto;
+}
+
+#datepicker-frame .day td,
+#datepicker-frame .day th {
+    width: calc(300px / 7 - 2px);
+    height: calc(300px / 8 - 2px);
+    border-radius: 4px;
+    text-align: center;
+}
+
+#datepicker-frame .month td,
+#datepicker-frame .month th {
+    width: calc(300px / 4 - 2px);
+    height: calc(300px / 4 - 2px);
+    border-radius: 4px;
+    text-align: center;
+}
+
+#datepicker-frame .disabled {
+    color: #c8c8c8;
+}
+
+#datepicker-frame .today {
+    background-color: #a0a0ff;
+    color: white;
+}
+
+#datepicker-frame td:not(.disabled):not(.today):hover {
+    background-color: #d0d0d0;
+}
+
+#datepicker-frame .pointer {
+    cursor: pointer;
+}
\ No newline at end of file
diff --git a/backoffice/vendors/datepicker/datepicker.js b/backoffice/vendors/datepicker/datepicker.js
new file mode 100644 (file)
index 0000000..1d433be
--- /dev/null
@@ -0,0 +1,274 @@
+// GLOBAL CONSTANTS
+const SECOND = 1000;
+const MINUTE = SECOND * 60;
+const HOUR = MINUTE * 60;
+const DAY = HOUR * 24;
+const WEEK = DAY * 7;
+
+const weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
+const weekdays_short = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
+const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
+const months_short = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+
+
+// PROTOTYPES
+Date.prototype.getWeekNumber = function () {
+    var d = new Date(Date.UTC(this.getFullYear(), this.getMonth(), this.getDate()));
+    var dayNum = d.getUTCDay() || 7;
+    d.setUTCDate(d.getUTCDate() + 4 - dayNum);
+    var yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
+    return Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
+};
+
+// DATEPICKER
+class Datepicker {
+    constructor(host, s) {
+        const t = this;
+        t.host = host;
+        t.frame = document.createElement("div");
+        t.frame.id = "datepicker-frame";
+        t.frame.className = "noselect";
+        
+        
+        
+        // Run config if settings present
+        if (s) t.config(s); 
+        
+        // Show conditions
+        window.onresize = () => { if (t.display_state) show(true); }; // to update screen position
+        document.addEventListener("click", e => {
+            if (
+                e.target == document.getElementById("datepicker") &&
+                !document.getElementById("datepicker-frame")
+            ) {
+                t.load("day"); // Start date when opening
+                show(true);
+            }
+            else if (
+                document.getElementById("datepicker-frame") != null &&
+                !e.path.includes(document.getElementById("datepicker-frame"))
+            ) show(false);
+        });
+        
+        // Load
+        t.load = function (n) {
+            while (t.frame.firstChild) t.frame.removeChild(t.frame.firstChild);
+            
+            t.head = document.createElement("ul");
+            t.frame.append(t.head);
+            
+            t.table = document.createElement("table");
+            t.frame.append(t.table);            
+            t.table.className = n;
+            
+            // If data is month
+            if (n == "day") {
+                // Prev
+                const prev = document.createElement("li");
+                t.head.append(prev);
+                prev.innerHTML = "<<";
+                if (t.firstdate == undefined || (
+                    t.date.getMonth() > t.firstdate.getMonth() ||
+                    t.date.getFullYear() > t.firstdate.getFullYear())
+                ) {
+                    prev.className = "pointer";
+                    prev.onclick = () => {
+                        t.date = new Date(t.date.getFullYear(), t.date.getMonth() - 1, 1);
+                        t.load("day");
+                    };
+                } else prev.className = "disabled";
+    
+                // month and year
+                const head = document.createElement("li");
+                t.head.append(head);
+                head.colSpan = 5;
+                head.innerHTML = months[t.date.getMonth()] + " " + t.date.getFullYear();
+                head.onclick = () => {
+                    t.load("month");
+                };
+                head.className = "pointer";
+    
+                // Next
+                const next = document.createElement("li");
+                t.head.append(next);
+                next.innerHTML = ">>";
+                if (t.lastdate == undefined || (
+                    t.date.getMonth() < t.lastdate.getMonth() ||
+                    t.date.getFullYear() < t.lastdate.getFullYear())
+                ) {
+                    next.className = "pointer";
+                    next.onclick = () => {
+                        t.date = new Date(t.date.getFullYear(), t.date.getMonth() + 1, 1);
+                        t.load("day");
+                    };
+                } else next.className = "disabled";
+    
+                // Header row [Weekdays]
+                const row = document.createElement("tr");
+                t.table.append(row);
+                for (let day = 0; day < 7; day++) {
+                    const cell = document.createElement("th");
+                    cell.innerHTML = weekdays_short[day];
+                    row.append(cell);
+                }
+    
+                // Dates
+                const first_day_in_month = new Date(t.date.getFullYear(), t.date.getMonth(), 1);
+                let index = 1 - (first_day_in_month.getDay() || 7);
+                for (let y = 0; y < 6; y++) {
+                    const tr = document.createElement("tr");
+                    t.table.append(tr);
+                    for (let x = 0; x < 7; x++) {
+                        const day = new Date(first_day_in_month.getTime() + DAY * index);
+                        
+                        const td = document.createElement("td");
+                        tr.append(td);
+                        td.innerHTML = day.getDate();
+                        
+                        if (day.getMonth() == t.date.getMonth() && t.disableddays(day) && (
+                            t.firstdate == undefined ? true : (
+                                day.getMonth() == t.firstdate.getMonth() ? (
+                                    day.getFullYear() == t.firstdate.getFullYear() ?
+                                        day.getDate() >= t.firstdate.getDate() : true
+                                ) : true
+                            )
+                        ) && (
+                            t.lastdate == undefined ? true : (
+                                day.getMonth() == t.lastdate.getMonth() ? (
+                                    day.getFullYear() == t.lastdate.getFullYear() ?
+                                        day.getDate() <= t.lastdate.getDate() : true
+                                ) : true
+                            )
+                        )) {
+                            td.className = "pointer";
+                            td.onclick = () => {
+                                t.setDate(day);
+                                show(false);
+                            };
+                        } else td.className = "disabled";
+                        td.className += day.toDateString() == new Date().toDateString() ? " today" : "";
+    
+                        index++;
+                    }
+                }
+            }
+            
+            // If data is year
+            else if (n == "month") {
+                // Prev
+                const prev = document.createElement("li");
+                t.head.append(prev);
+                prev.innerHTML = "<<";
+                if (t.firstdate == undefined || (
+                    t.date.getFullYear() > t.firstdate.getFullYear())
+                ) {
+                    prev.className = "pointer";
+                    prev.onclick = () => {
+                        t.date = new Date(t.date.getFullYear() - 1, 1, 1);
+                        t.load("month");
+                    };
+                } else prev.className = "disabled";
+        
+                // Year
+                const head = document.createElement("li");
+                t.head.append(head);
+                head.innerHTML = t.date.getFullYear();
+        
+                // Next
+                const next = document.createElement("li");
+                t.head.append(next);
+                next.innerHTML = ">>";
+                if (t.lastdate == undefined || (
+                    t.date.getFullYear() < t.lastdate.getFullYear())
+                ) {
+                    next.className = "pointer";
+                    next.onclick = () => {
+                        t.date = new Date(t.date.getFullYear() + 1, 1, 1);
+                        t.load("month");
+                    };
+                } else next.className = "disabled";
+                
+                // Months
+                for (let y = 0; y < 3; y++) {
+                    const row = document.createElement("tr");
+                    t.table.append(row);
+                    for (let x = 0; x < 4; x++) {
+                        const index = y * 4 + x;
+                        const day = new Date(t.date.getFullYear(), index, 1);
+                        
+                        const cell = document.createElement("td");
+                        row.append(cell);
+                        cell.innerHTML = months_short[index];
+                        
+                        if (
+                            (t.firstdate != undefined ? day.getTime() >= new Date(t.firstdate).setDate(1) : true) &&
+                            (t.lastdate != undefined ? day.getTime() <= new Date(t.lastdate).setDate(1) : true)
+                        ) {
+                            cell.className = "pointer";
+                            cell.onclick = () => {
+                                t.date = new Date(t.date.getFullYear(), index, 1);
+                                t.load("day");
+                            };
+                        } else cell.className = "disabled";
+                    }
+                }
+            }
+        };
+        
+        const show = function (bool) {
+            if (bool) {
+                const rect = t.host.getBoundingClientRect();
+                const x = (rect.left + rect.right) / 2;
+                const y = rect.bottom - rect.top + document.documentElement.scrollTop;
+                t.frame.style.setProperty("top", y + 20 + "px");
+                t.frame.style.setProperty("left", x - 152 + "px");
+                
+                document.body.append(t.frame);
+            }
+            else if (!bool) document.getElementById("datepicker-frame").remove();
+        };
+    }
+    
+    config(s) {
+        this.firstdate = s.firstdate || this.firstdate;
+        this.lastdate = s.lastdate || this.lastdate;
+        this.disableddays = s.disableddays || this.disableddays || (() => { return true; });
+        this.format = s.format || this.format || ((d) => { return d; });
+
+        if (typeof this.firstdate != "object" && this.firstdate != undefined) console.error("firstdate is not of type Object");
+        else if (typeof this.lastdate != "object" && this.lastdate != undefined) console.error("lastdate is not of type Object");
+        else if (typeof this.disableddays != "function") console.error("disableddays is not of type function");
+        else if (typeof this.format != "function") console.error("format is not of type function");
+
+        const d = new Date();
+        let date = d;
+        while (!this.disableddays(date)) {
+            date = this.firstdate && this.lastdate ? (
+                d.getTime() >= this.firstdate.getTime() && d.getTime() <= this.lastdate.getTime() ? d : this.firstdate
+            ) : this.firstdate ? (
+                d.getTime() >= this.firstdate.getTime() ? d : this.firstdate
+            ) : this.lastdate ? (
+                d.getTime() <= this.lastdate.getTime() ? d : this.lastdate
+            ) : d;
+            d.setTime(d.getTime() + DAY);
+        }
+        this.date = this.date || date;
+        this.host.value = this.format(this.date);
+    }
+    
+    getDate() {
+        return this.date;
+    }
+    
+    setDate(date) {
+        if (date < this.firstdate || date > this.lastdate) return;
+        if (!this.disableddays(date)) {
+            date = new Date(date.getTime() + DAY);
+            this.setDate(date);
+            return;
+        }
+        this.date = date;
+        this.host.value = this.format(date);
+        if(typeof this.host.onchange == "function") this.host.onchange();
+    }
+}
\ No newline at end of file
diff --git a/backoffice/vendors/datepicker/datepicker_fr.js b/backoffice/vendors/datepicker/datepicker_fr.js
new file mode 100644 (file)
index 0000000..4093b86
--- /dev/null
@@ -0,0 +1,274 @@
+// GLOBAL CONSTANTS
+const SECOND = 1000;
+const MINUTE = SECOND * 60;
+const HOUR = MINUTE * 60;
+const DAY = HOUR * 24;
+const WEEK = DAY * 7;
+
+const weekdays = ["Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"];
+const weekdays_short = ["LU", "Ma", "Me", "Je", "Ve", "Sa", "di"];
+const months = ["Janvier", "Février", "Mars", "Avril", "May", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"];
+const months_short = ["Janv", "Févr", "Mars", "Avr", "May", "Juin", "Juil", "Août", "Sept", "Oct", "Nov", "Déc"];
+
+
+// PROTOTYPES
+Date.prototype.getWeekNumber = function () {
+    var d = new Date(Date.UTC(this.getFullYear(), this.getMonth(), this.getDate()));
+    var dayNum = d.getUTCDay() || 7;
+    d.setUTCDate(d.getUTCDate() + 4 - dayNum);
+    var yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
+    return Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
+};
+
+// DATEPICKER
+class Datepicker {
+    constructor(host, s) {
+        const t = this;
+        t.host = host;
+        t.frame = document.createElement("div");
+        t.frame.id = "datepicker-frame";
+        t.frame.className = "noselect";
+        
+        
+        
+        // Run config if settings present
+        if (s) t.config(s); 
+        
+        // Show conditions
+        window.onresize = () => { if (t.display_state) show(true); }; // to update screen position
+        document.addEventListener("click", e => {
+            if (
+                e.target == document.getElementById("datepicker") &&
+                !document.getElementById("datepicker-frame")
+            ) {
+                t.load("day"); // Start date when opening
+                show(true);
+            }
+            else if (
+                document.getElementById("datepicker-frame") != null &&
+                !e.path.includes(document.getElementById("datepicker-frame"))
+            ) show(false);
+        });
+        
+        // Load
+        t.load = function (n) {
+            while (t.frame.firstChild) t.frame.removeChild(t.frame.firstChild);
+            
+            t.head = document.createElement("ul");
+            t.frame.append(t.head);
+            
+            t.table = document.createElement("table");
+            t.frame.append(t.table);            
+            t.table.className = n;
+            
+            // If data is month
+            if (n == "day") {
+                // Prev
+                const prev = document.createElement("li");
+                t.head.append(prev);
+                prev.innerHTML = "<<";
+                if (t.firstdate == undefined || (
+                    t.date.getMonth() > t.firstdate.getMonth() ||
+                    t.date.getFullYear() > t.firstdate.getFullYear())
+                ) {
+                    prev.className = "pointer";
+                    prev.onclick = () => {
+                        t.date = new Date(t.date.getFullYear(), t.date.getMonth() - 1, 1);
+                        t.load("day");
+                    };
+                } else prev.className = "disabled";
+    
+                // month and year
+                const head = document.createElement("li");
+                t.head.append(head);
+                head.colSpan = 5;
+                head.innerHTML = months[t.date.getMonth()] + " " + t.date.getFullYear();
+                head.onclick = () => {
+                    t.load("month");
+                };
+                head.className = "pointer";
+    
+                // Next
+                const next = document.createElement("li");
+                t.head.append(next);
+                next.innerHTML = ">>";
+                if (t.lastdate == undefined || (
+                    t.date.getMonth() < t.lastdate.getMonth() ||
+                    t.date.getFullYear() < t.lastdate.getFullYear())
+                ) {
+                    next.className = "pointer";
+                    next.onclick = () => {
+                        t.date = new Date(t.date.getFullYear(), t.date.getMonth() + 1, 1);
+                        t.load("day");
+                    };
+                } else next.className = "disabled";
+    
+                // Header row [Weekdays]
+                const row = document.createElement("tr");
+                t.table.append(row);
+                for (let day = 0; day < 7; day++) {
+                    const cell = document.createElement("th");
+                    cell.innerHTML = weekdays_short[day];
+                    row.append(cell);
+                }
+    
+                // Dates
+                const first_day_in_month = new Date(t.date.getFullYear(), t.date.getMonth(), 1);
+                let index = 1 - (first_day_in_month.getDay() || 7);
+                for (let y = 0; y < 6; y++) {
+                    const tr = document.createElement("tr");
+                    t.table.append(tr);
+                    for (let x = 0; x < 7; x++) {
+                        const day = new Date(first_day_in_month.getTime() + DAY * index);
+                        
+                        const td = document.createElement("td");
+                        tr.append(td);
+                        td.innerHTML = day.getDate();
+                        
+                        if (day.getMonth() == t.date.getMonth() && t.disableddays(day) && (
+                            t.firstdate == undefined ? true : (
+                                day.getMonth() == t.firstdate.getMonth() ? (
+                                    day.getFullYear() == t.firstdate.getFullYear() ?
+                                        day.getDate() >= t.firstdate.getDate() : true
+                                ) : true
+                            )
+                        ) && (
+                            t.lastdate == undefined ? true : (
+                                day.getMonth() == t.lastdate.getMonth() ? (
+                                    day.getFullYear() == t.lastdate.getFullYear() ?
+                                        day.getDate() <= t.lastdate.getDate() : true
+                                ) : true
+                            )
+                        )) {
+                            td.className = "pointer";
+                            td.onclick = () => {
+                                t.setDate(day);
+                                show(false);
+                            };
+                        } else td.className = "disabled";
+                        td.className += day.toDateString() == new Date().toDateString() ? " today" : "";
+    
+                        index++;
+                    }
+                }
+            }
+            
+            // If data is year
+            else if (n == "month") {
+                // Prev
+                const prev = document.createElement("li");
+                t.head.append(prev);
+                prev.innerHTML = "<<";
+                if (t.firstdate == undefined || (
+                    t.date.getFullYear() > t.firstdate.getFullYear())
+                ) {
+                    prev.className = "pointer";
+                    prev.onclick = () => {
+                        t.date = new Date(t.date.getFullYear() - 1, 1, 1);
+                        t.load("month");
+                    };
+                } else prev.className = "disabled";
+        
+                // Year
+                const head = document.createElement("li");
+                t.head.append(head);
+                head.innerHTML = t.date.getFullYear();
+        
+                // Next
+                const next = document.createElement("li");
+                t.head.append(next);
+                next.innerHTML = ">>";
+                if (t.lastdate == undefined || (
+                    t.date.getFullYear() < t.lastdate.getFullYear())
+                ) {
+                    next.className = "pointer";
+                    next.onclick = () => {
+                        t.date = new Date(t.date.getFullYear() + 1, 1, 1);
+                        t.load("month");
+                    };
+                } else next.className = "disabled";
+                
+                // Months
+                for (let y = 0; y < 3; y++) {
+                    const row = document.createElement("tr");
+                    t.table.append(row);
+                    for (let x = 0; x < 4; x++) {
+                        const index = y * 4 + x;
+                        const day = new Date(t.date.getFullYear(), index, 1);
+                        
+                        const cell = document.createElement("td");
+                        row.append(cell);
+                        cell.innerHTML = months_short[index];
+                        
+                        if (
+                            (t.firstdate != undefined ? day.getTime() >= new Date(t.firstdate).setDate(1) : true) &&
+                            (t.lastdate != undefined ? day.getTime() <= new Date(t.lastdate).setDate(1) : true)
+                        ) {
+                            cell.className = "pointer";
+                            cell.onclick = () => {
+                                t.date = new Date(t.date.getFullYear(), index, 1);
+                                t.load("day");
+                            };
+                        } else cell.className = "disabled";
+                    }
+                }
+            }
+        };
+        
+        const show = function (bool) {
+            if (bool) {
+                const rect = t.host.getBoundingClientRect();
+                const x = (rect.left + rect.right) / 2;
+                const y = rect.bottom - rect.top + document.documentElement.scrollTop;
+                t.frame.style.setProperty("top", y + 20 + "px");
+                t.frame.style.setProperty("left", x - 152 + "px");
+                
+                document.body.append(t.frame);
+            }
+            else if (!bool) document.getElementById("datepicker-frame").remove();
+        };
+    }
+    
+    config(s) {
+        this.firstdate = s.firstdate || this.firstdate;
+        this.lastdate = s.lastdate || this.lastdate;
+        this.disableddays = s.disableddays || this.disableddays || (() => { return true; });
+        this.format = s.format || this.format || ((d) => { return d; });
+
+        if (typeof this.firstdate != "object" && this.firstdate != undefined) console.error("firstdate is not of type Object");
+        else if (typeof this.lastdate != "object" && this.lastdate != undefined) console.error("lastdate is not of type Object");
+        else if (typeof this.disableddays != "function") console.error("disableddays is not of type function");
+        else if (typeof this.format != "function") console.error("format is not of type function");
+
+        const d = new Date();
+        let date = d;
+        while (!this.disableddays(date)) {
+            date = this.firstdate && this.lastdate ? (
+                d.getTime() >= this.firstdate.getTime() && d.getTime() <= this.lastdate.getTime() ? d : this.firstdate
+            ) : this.firstdate ? (
+                d.getTime() >= this.firstdate.getTime() ? d : this.firstdate
+            ) : this.lastdate ? (
+                d.getTime() <= this.lastdate.getTime() ? d : this.lastdate
+            ) : d;
+            d.setTime(d.getTime() + DAY);
+        }
+        this.date = this.date || date;
+        this.host.value = this.format(this.date);
+    }
+    
+    getDate() {
+        return this.date;
+    }
+    
+    setDate(date) {
+        if (date < this.firstdate || date > this.lastdate) return;
+        if (!this.disableddays(date)) {
+            date = new Date(date.getTime() + DAY);
+            this.setDate(date);
+            return;
+        }
+        this.date = date;
+        this.host.value = this.format(date);
+        if(typeof this.host.onchange == "function") this.host.onchange();
+    }
+}
\ No newline at end of file
diff --git a/backoffice/vendors/flatpickr/flatpickr.css b/backoffice/vendors/flatpickr/flatpickr.css
new file mode 100644 (file)
index 0000000..64eb467
--- /dev/null
@@ -0,0 +1,784 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  background: #fff;
+  -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid #e6e6e6;
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: #e6e6e6;
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #fff;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: #e6e6e6;
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #fff;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  background: transparent;
+  color: rgba(0,0,0,0.9);
+  fill: rgba(0,0,0,0.9);
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: rgba(0,0,0,0.9);
+  fill: rgba(0,0,0,0.9);
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #959ea9;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(57,57,57,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(0,0,0,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(0,0,0,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(57,57,57,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(57,57,57,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(0,0,0,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(0,0,0,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: rgba(0,0,0,0.9);
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: rgba(0,0,0,0.9);
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(0,0,0,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: transparent;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: transparent;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: transparent;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: transparent;
+  color: rgba(0,0,0,0.54);
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 #e6e6e6;
+          box-shadow: -1px 0 0 #e6e6e6;
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: #393939;
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #e6e6e6;
+  border-color: #e6e6e6;
+}
+.flatpickr-day.today {
+  border-color: #959ea9;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #959ea9;
+  background: #959ea9;
+  color: #fff;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #569ff7;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #569ff7;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #569ff7;
+          box-shadow: -10px 0 0 #569ff7;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(57,57,57,0.3);
+  background: transparent;
+  border-color: transparent;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(57,57,57,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;
+          box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  -webkit-box-shadow: 1px 0 0 #e6e6e6;
+          box-shadow: 1px 0 0 #e6e6e6;
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(57,57,57,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #393939;
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: #393939;
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: #393939;
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: #393939;
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #eee;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
diff --git a/backoffice/vendors/flatpickr/flatpickr.js b/backoffice/vendors/flatpickr/flatpickr.js
new file mode 100644 (file)
index 0000000..c989306
--- /dev/null
@@ -0,0 +1,2596 @@
+/* flatpickr v4.6.2, @license MIT */
+(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+    typeof define === 'function' && define.amd ? define(factory) :
+    (global = global || self, global.flatpickr = factory());
+}(this, function () { 'use strict';
+
+    /*! *****************************************************************************
+    Copyright (c) Microsoft Corporation. All rights reserved.
+    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+    this file except in compliance with the License. You may obtain a copy of the
+    License at http://www.apache.org/licenses/LICENSE-2.0
+
+    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+    MERCHANTABLITY OR NON-INFRINGEMENT.
+
+    See the Apache Version 2.0 License for specific language governing permissions
+    and limitations under the License.
+    ***************************************************************************** */
+
+    var __assign = function() {
+        __assign = Object.assign || function __assign(t) {
+            for (var s, i = 1, n = arguments.length; i < n; i++) {
+                s = arguments[i];
+                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+            }
+            return t;
+        };
+        return __assign.apply(this, arguments);
+    };
+
+    var HOOKS = [
+        "onChange",
+        "onClose",
+        "onDayCreate",
+        "onDestroy",
+        "onKeyDown",
+        "onMonthChange",
+        "onOpen",
+        "onParseConfig",
+        "onReady",
+        "onValueUpdate",
+        "onYearChange",
+        "onPreCalendarPosition",
+    ];
+    var defaults = {
+        _disable: [],
+        _enable: [],
+        allowInput: false,
+        altFormat: "F j, Y",
+        altInput: false,
+        altInputClass: "form-control input",
+        animate: typeof window === "object" &&
+            window.navigator.userAgent.indexOf("MSIE") === -1,
+        ariaDateFormat: "F j, Y",
+        clickOpens: true,
+        closeOnSelect: true,
+        conjunction: ", ",
+        dateFormat: "Y-m-d",
+        defaultHour: 12,
+        defaultMinute: 0,
+        defaultSeconds: 0,
+        disable: [],
+        disableMobile: false,
+        enable: [],
+        enableSeconds: false,
+        enableTime: false,
+        errorHandler: function (err) {
+            return typeof console !== "undefined" && console.warn(err);
+        },
+        getWeek: function (givenDate) {
+            var date = new Date(givenDate.getTime());
+            date.setHours(0, 0, 0, 0);
+            // Thursday in current week decides the year.
+            date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));
+            // January 4 is always in week 1.
+            var week1 = new Date(date.getFullYear(), 0, 4);
+            // Adjust to Thursday in week 1 and count number of weeks from date to week1.
+            return (1 +
+                Math.round(((date.getTime() - week1.getTime()) / 86400000 -
+                    3 +
+                    ((week1.getDay() + 6) % 7)) /
+                    7));
+        },
+        hourIncrement: 1,
+        ignoredFocusElements: [],
+        inline: false,
+        locale: "default",
+        minuteIncrement: 5,
+        mode: "single",
+        monthSelectorType: "dropdown",
+        nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
+        noCalendar: false,
+        now: new Date(),
+        onChange: [],
+        onClose: [],
+        onDayCreate: [],
+        onDestroy: [],
+        onKeyDown: [],
+        onMonthChange: [],
+        onOpen: [],
+        onParseConfig: [],
+        onReady: [],
+        onValueUpdate: [],
+        onYearChange: [],
+        onPreCalendarPosition: [],
+        plugins: [],
+        position: "auto",
+        positionElement: undefined,
+        prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
+        shorthandCurrentMonth: false,
+        showMonths: 1,
+        static: false,
+        time_24hr: false,
+        weekNumbers: false,
+        wrap: false
+    };
+
+    var english = {
+        weekdays: {
+            shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+            longhand: [
+                "Sunday",
+                "Monday",
+                "Tuesday",
+                "Wednesday",
+                "Thursday",
+                "Friday",
+                "Saturday",
+            ]
+        },
+        months: {
+            shorthand: [
+                "Jan",
+                "Feb",
+                "Mar",
+                "Apr",
+                "May",
+                "Jun",
+                "Jul",
+                "Aug",
+                "Sep",
+                "Oct",
+                "Nov",
+                "Dec",
+            ],
+            longhand: [
+                "January",
+                "February",
+                "March",
+                "April",
+                "May",
+                "June",
+                "July",
+                "August",
+                "September",
+                "October",
+                "November",
+                "December",
+            ]
+        },
+        daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
+        firstDayOfWeek: 0,
+        ordinal: function (nth) {
+            var s = nth % 100;
+            if (s > 3 && s < 21)
+                return "th";
+            switch (s % 10) {
+                case 1:
+                    return "st";
+                case 2:
+                    return "nd";
+                case 3:
+                    return "rd";
+                default:
+                    return "th";
+            }
+        },
+        rangeSeparator: " to ",
+        weekAbbreviation: "Wk",
+        scrollTitle: "Scroll to increment",
+        toggleTitle: "Click to toggle",
+        amPM: ["AM", "PM"],
+        yearAriaLabel: "Year",
+        hourAriaLabel: "Hour",
+        minuteAriaLabel: "Minute",
+        time_24hr: false
+    };
+
+    var pad = function (number) { return ("0" + number).slice(-2); };
+    var int = function (bool) { return (bool === true ? 1 : 0); };
+    /* istanbul ignore next */
+    function debounce(func, wait, immediate) {
+        if (immediate === void 0) { immediate = false; }
+        var timeout;
+        return function () {
+            var context = this, args = arguments;
+            timeout !== null && clearTimeout(timeout);
+            timeout = window.setTimeout(function () {
+                timeout = null;
+                if (!immediate)
+                    func.apply(context, args);
+            }, wait);
+            if (immediate && !timeout)
+                func.apply(context, args);
+        };
+    }
+    var arrayify = function (obj) {
+        return obj instanceof Array ? obj : [obj];
+    };
+
+    function toggleClass(elem, className, bool) {
+        if (bool === true)
+            return elem.classList.add(className);
+        elem.classList.remove(className);
+    }
+    function createElement(tag, className, content) {
+        var e = window.document.createElement(tag);
+        className = className || "";
+        content = content || "";
+        e.className = className;
+        if (content !== undefined)
+            e.textContent = content;
+        return e;
+    }
+    function clearNode(node) {
+        while (node.firstChild)
+            node.removeChild(node.firstChild);
+    }
+    function findParent(node, condition) {
+        if (condition(node))
+            return node;
+        else if (node.parentNode)
+            return findParent(node.parentNode, condition);
+        return undefined; // nothing found
+    }
+    function createNumberInput(inputClassName, opts) {
+        var wrapper = createElement("div", "numInputWrapper"), numInput = createElement("input", "numInput " + inputClassName), arrowUp = createElement("span", "arrowUp"), arrowDown = createElement("span", "arrowDown");
+        if (navigator.userAgent.indexOf("MSIE 9.0") === -1) {
+            numInput.type = "number";
+        }
+        else {
+            numInput.type = "text";
+            numInput.pattern = "\\d*";
+        }
+        if (opts !== undefined)
+            for (var key in opts)
+                numInput.setAttribute(key, opts[key]);
+        wrapper.appendChild(numInput);
+        wrapper.appendChild(arrowUp);
+        wrapper.appendChild(arrowDown);
+        return wrapper;
+    }
+    function getEventTarget(event) {
+        if (typeof event.composedPath === "function") {
+            var path = event.composedPath();
+            return path[0];
+        }
+        return event.target;
+    }
+
+    var doNothing = function () { return undefined; };
+    var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; };
+    var revFormat = {
+        D: doNothing,
+        F: function (dateObj, monthName, locale) {
+            dateObj.setMonth(locale.months.longhand.indexOf(monthName));
+        },
+        G: function (dateObj, hour) {
+            dateObj.setHours(parseFloat(hour));
+        },
+        H: function (dateObj, hour) {
+            dateObj.setHours(parseFloat(hour));
+        },
+        J: function (dateObj, day) {
+            dateObj.setDate(parseFloat(day));
+        },
+        K: function (dateObj, amPM, locale) {
+            dateObj.setHours((dateObj.getHours() % 12) +
+                12 * int(new RegExp(locale.amPM[1], "i").test(amPM)));
+        },
+        M: function (dateObj, shortMonth, locale) {
+            dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));
+        },
+        S: function (dateObj, seconds) {
+            dateObj.setSeconds(parseFloat(seconds));
+        },
+        U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },
+        W: function (dateObj, weekNum, locale) {
+            var weekNumber = parseInt(weekNum);
+            var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);
+            date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);
+            return date;
+        },
+        Y: function (dateObj, year) {
+            dateObj.setFullYear(parseFloat(year));
+        },
+        Z: function (_, ISODate) { return new Date(ISODate); },
+        d: function (dateObj, day) {
+            dateObj.setDate(parseFloat(day));
+        },
+        h: function (dateObj, hour) {
+            dateObj.setHours(parseFloat(hour));
+        },
+        i: function (dateObj, minutes) {
+            dateObj.setMinutes(parseFloat(minutes));
+        },
+        j: function (dateObj, day) {
+            dateObj.setDate(parseFloat(day));
+        },
+        l: doNothing,
+        m: function (dateObj, month) {
+            dateObj.setMonth(parseFloat(month) - 1);
+        },
+        n: function (dateObj, month) {
+            dateObj.setMonth(parseFloat(month) - 1);
+        },
+        s: function (dateObj, seconds) {
+            dateObj.setSeconds(parseFloat(seconds));
+        },
+        u: function (_, unixMillSeconds) {
+            return new Date(parseFloat(unixMillSeconds));
+        },
+        w: doNothing,
+        y: function (dateObj, year) {
+            dateObj.setFullYear(2000 + parseFloat(year));
+        }
+    };
+    var tokenRegex = {
+        D: "(\\w+)",
+        F: "(\\w+)",
+        G: "(\\d\\d|\\d)",
+        H: "(\\d\\d|\\d)",
+        J: "(\\d\\d|\\d)\\w+",
+        K: "",
+        M: "(\\w+)",
+        S: "(\\d\\d|\\d)",
+        U: "(.+)",
+        W: "(\\d\\d|\\d)",
+        Y: "(\\d{4})",
+        Z: "(.+)",
+        d: "(\\d\\d|\\d)",
+        h: "(\\d\\d|\\d)",
+        i: "(\\d\\d|\\d)",
+        j: "(\\d\\d|\\d)",
+        l: "(\\w+)",
+        m: "(\\d\\d|\\d)",
+        n: "(\\d\\d|\\d)",
+        s: "(\\d\\d|\\d)",
+        u: "(.+)",
+        w: "(\\d\\d|\\d)",
+        y: "(\\d{2})"
+    };
+    var formats = {
+        // get the date in UTC
+        Z: function (date) { return date.toISOString(); },
+        // weekday name, short, e.g. Thu
+        D: function (date, locale, options) {
+            return locale.weekdays.shorthand[formats.w(date, locale, options)];
+        },
+        // full month name e.g. January
+        F: function (date, locale, options) {
+            return monthToStr(formats.n(date, locale, options) - 1, false, locale);
+        },
+        // padded hour 1-12
+        G: function (date, locale, options) {
+            return pad(formats.h(date, locale, options));
+        },
+        // hours with leading zero e.g. 03
+        H: function (date) { return pad(date.getHours()); },
+        // day (1-30) with ordinal suffix e.g. 1st, 2nd
+        J: function (date, locale) {
+            return locale.ordinal !== undefined
+                ? date.getDate() + locale.ordinal(date.getDate())
+                : date.getDate();
+        },
+        // AM/PM
+        K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },
+        // shorthand month e.g. Jan, Sep, Oct, etc
+        M: function (date, locale) {
+            return monthToStr(date.getMonth(), true, locale);
+        },
+        // seconds 00-59
+        S: function (date) { return pad(date.getSeconds()); },
+        // unix timestamp
+        U: function (date) { return date.getTime() / 1000; },
+        W: function (date, _, options) {
+            return options.getWeek(date);
+        },
+        // full year e.g. 2016
+        Y: function (date) { return date.getFullYear(); },
+        // day in month, padded (01-30)
+        d: function (date) { return pad(date.getDate()); },
+        // hour from 1-12 (am/pm)
+        h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },
+        // minutes, padded with leading zero e.g. 09
+        i: function (date) { return pad(date.getMinutes()); },
+        // day in month (1-30)
+        j: function (date) { return date.getDate(); },
+        // weekday name, full, e.g. Thursday
+        l: function (date, locale) {
+            return locale.weekdays.longhand[date.getDay()];
+        },
+        // padded month number (01-12)
+        m: function (date) { return pad(date.getMonth() + 1); },
+        // the month number (1-12)
+        n: function (date) { return date.getMonth() + 1; },
+        // seconds 0-59
+        s: function (date) { return date.getSeconds(); },
+        // Unix Milliseconds
+        u: function (date) { return date.getTime(); },
+        // number of the day of the week
+        w: function (date) { return date.getDay(); },
+        // last two digits of year e.g. 16 for 2016
+        y: function (date) { return String(date.getFullYear()).substring(2); }
+    };
+
+    var createDateFormatter = function (_a) {
+        var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;
+        return function (dateObj, frmt, overrideLocale) {
+            var locale = overrideLocale || l10n;
+            if (config.formatDate !== undefined) {
+                return config.formatDate(dateObj, frmt, locale);
+            }
+            return frmt
+                .split("")
+                .map(function (c, i, arr) {
+                return formats[c] && arr[i - 1] !== "\\"
+                    ? formats[c](dateObj, locale, config)
+                    : c !== "\\"
+                        ? c
+                        : "";
+            })
+                .join("");
+        };
+    };
+    var createDateParser = function (_a) {
+        var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;
+        return function (date, givenFormat, timeless, customLocale) {
+            if (date !== 0 && !date)
+                return undefined;
+            var locale = customLocale || l10n;
+            var parsedDate;
+            var dateOrig = date;
+            if (date instanceof Date)
+                parsedDate = new Date(date.getTime());
+            else if (typeof date !== "string" &&
+                date.toFixed !== undefined // timestamp
+            )
+                // create a copy
+                parsedDate = new Date(date);
+            else if (typeof date === "string") {
+                // date string
+                var format = givenFormat || (config || defaults).dateFormat;
+                var datestr = String(date).trim();
+                if (datestr === "today") {
+                    parsedDate = new Date();
+                    timeless = true;
+                }
+                else if (/Z$/.test(datestr) ||
+                    /GMT$/.test(datestr) // datestrings w/ timezone
+                )
+                    parsedDate = new Date(date);
+                else if (config && config.parseDate)
+                    parsedDate = config.parseDate(date, format);
+                else {
+                    parsedDate =
+                        !config || !config.noCalendar
+                            ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)
+                            : new Date(new Date().setHours(0, 0, 0, 0));
+                    var matched = void 0, ops = [];
+                    for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) {
+                        var token_1 = format[i];
+                        var isBackSlash = token_1 === "\\";
+                        var escaped = format[i - 1] === "\\" || isBackSlash;
+                        if (tokenRegex[token_1] && !escaped) {
+                            regexStr += tokenRegex[token_1];
+                            var match = new RegExp(regexStr).exec(date);
+                            if (match && (matched = true)) {
+                                ops[token_1 !== "Y" ? "push" : "unshift"]({
+                                    fn: revFormat[token_1],
+                                    val: match[++matchIndex]
+                                });
+                            }
+                        }
+                        else if (!isBackSlash)
+                            regexStr += "."; // don't really care
+                        ops.forEach(function (_a) {
+                            var fn = _a.fn, val = _a.val;
+                            return (parsedDate = fn(parsedDate, val, locale) || parsedDate);
+                        });
+                    }
+                    parsedDate = matched ? parsedDate : undefined;
+                }
+            }
+            /* istanbul ignore next */
+            if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {
+                config.errorHandler(new Error("Invalid date provided: " + dateOrig));
+                return undefined;
+            }
+            if (timeless === true)
+                parsedDate.setHours(0, 0, 0, 0);
+            return parsedDate;
+        };
+    };
+    /**
+     * Compute the difference in dates, measured in ms
+     */
+    function compareDates(date1, date2, timeless) {
+        if (timeless === void 0) { timeless = true; }
+        if (timeless !== false) {
+            return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -
+                new Date(date2.getTime()).setHours(0, 0, 0, 0));
+        }
+        return date1.getTime() - date2.getTime();
+    }
+    var isBetween = function (ts, ts1, ts2) {
+        return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);
+    };
+    var duration = {
+        DAY: 86400000
+    };
+
+    if (typeof Object.assign !== "function") {
+        Object.assign = function (target) {
+            var args = [];
+            for (var _i = 1; _i < arguments.length; _i++) {
+                args[_i - 1] = arguments[_i];
+            }
+            if (!target) {
+                throw TypeError("Cannot convert undefined or null to object");
+            }
+            var _loop_1 = function (source) {
+                if (source) {
+                    Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });
+                }
+            };
+            for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
+                var source = args_1[_a];
+                _loop_1(source);
+            }
+            return target;
+        };
+    }
+
+    var DEBOUNCED_CHANGE_MS = 300;
+    function FlatpickrInstance(element, instanceConfig) {
+        var self = {
+            config: __assign({}, defaults, flatpickr.defaultConfig),
+            l10n: english
+        };
+        self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
+        self._handlers = [];
+        self.pluginElements = [];
+        self.loadedPlugins = [];
+        self._bind = bind;
+        self._setHoursFromDate = setHoursFromDate;
+        self._positionCalendar = positionCalendar;
+        self.changeMonth = changeMonth;
+        self.changeYear = changeYear;
+        self.clear = clear;
+        self.close = close;
+        self._createElement = createElement;
+        self.destroy = destroy;
+        self.isEnabled = isEnabled;
+        self.jumpToDate = jumpToDate;
+        self.open = open;
+        self.redraw = redraw;
+        self.set = set;
+        self.setDate = setDate;
+        self.toggle = toggle;
+        function setupHelperFunctions() {
+            self.utils = {
+                getDaysInMonth: function (month, yr) {
+                    if (month === void 0) { month = self.currentMonth; }
+                    if (yr === void 0) { yr = self.currentYear; }
+                    if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))
+                        return 29;
+                    return self.l10n.daysInMonth[month];
+                }
+            };
+        }
+        function init() {
+            self.element = self.input = element;
+            self.isOpen = false;
+            parseConfig();
+            setupLocale();
+            setupInputs();
+            setupDates();
+            setupHelperFunctions();
+            if (!self.isMobile)
+                build();
+            bindEvents();
+            if (self.selectedDates.length || self.config.noCalendar) {
+                if (self.config.enableTime) {
+                    setHoursFromDate(self.config.noCalendar
+                        ? self.latestSelectedDateObj || self.config.minDate
+                        : undefined);
+                }
+                updateValue(false);
+            }
+            setCalendarWidth();
+            self.showTimeInput =
+                self.selectedDates.length > 0 || self.config.noCalendar;
+            var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+            /* TODO: investigate this further
+        
+              Currently, there is weird positioning behavior in safari causing pages
+              to scroll up. https://github.com/chmln/flatpickr/issues/563
+        
+              However, most browsers are not Safari and positioning is expensive when used
+              in scale. https://github.com/chmln/flatpickr/issues/1096
+            */
+            if (!self.isMobile && isSafari) {
+                positionCalendar();
+            }
+            triggerEvent("onReady");
+        }
+        function bindToInstance(fn) {
+            return fn.bind(self);
+        }
+        function setCalendarWidth() {
+            var config = self.config;
+            if (config.weekNumbers === false && config.showMonths === 1)
+                return;
+            else if (config.noCalendar !== true) {
+                window.requestAnimationFrame(function () {
+                    if (self.calendarContainer !== undefined) {
+                        self.calendarContainer.style.visibility = "hidden";
+                        self.calendarContainer.style.display = "block";
+                    }
+                    if (self.daysContainer !== undefined) {
+                        var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;
+                        self.daysContainer.style.width = daysWidth + "px";
+                        self.calendarContainer.style.width =
+                            daysWidth +
+                                (self.weekWrapper !== undefined
+                                    ? self.weekWrapper.offsetWidth
+                                    : 0) +
+                                "px";
+                        self.calendarContainer.style.removeProperty("visibility");
+                        self.calendarContainer.style.removeProperty("display");
+                    }
+                });
+            }
+        }
+        /**
+         * The handler for all events targeting the time inputs
+         */
+        function updateTime(e) {
+            if (self.selectedDates.length === 0) {
+                setDefaultTime();
+            }
+            if (e !== undefined && e.type !== "blur") {
+                timeWrapper(e);
+            }
+            var prevValue = self._input.value;
+            setHoursFromInputs();
+            updateValue();
+            if (self._input.value !== prevValue) {
+                self._debouncedChange();
+            }
+        }
+        function ampm2military(hour, amPM) {
+            return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);
+        }
+        function military2ampm(hour) {
+            switch (hour % 24) {
+                case 0:
+                case 12:
+                    return 12;
+                default:
+                    return hour % 12;
+            }
+        }
+        /**
+         * Syncs the selected date object time with user's time input
+         */
+        function setHoursFromInputs() {
+            if (self.hourElement === undefined || self.minuteElement === undefined)
+                return;
+            var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined
+                ? (parseInt(self.secondElement.value, 10) || 0) % 60
+                : 0;
+            if (self.amPM !== undefined) {
+                hours = ampm2military(hours, self.amPM.textContent);
+            }
+            var limitMinHours = self.config.minTime !== undefined ||
+                (self.config.minDate &&
+                    self.minDateHasTime &&
+                    self.latestSelectedDateObj &&
+                    compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===
+                        0);
+            var limitMaxHours = self.config.maxTime !== undefined ||
+                (self.config.maxDate &&
+                    self.maxDateHasTime &&
+                    self.latestSelectedDateObj &&
+                    compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===
+                        0);
+            if (limitMaxHours) {
+                var maxTime = self.config.maxTime !== undefined
+                    ? self.config.maxTime
+                    : self.config.maxDate;
+                hours = Math.min(hours, maxTime.getHours());
+                if (hours === maxTime.getHours())
+                    minutes = Math.min(minutes, maxTime.getMinutes());
+                if (minutes === maxTime.getMinutes())
+                    seconds = Math.min(seconds, maxTime.getSeconds());
+            }
+            if (limitMinHours) {
+                var minTime = self.config.minTime !== undefined
+                    ? self.config.minTime
+                    : self.config.minDate;
+                hours = Math.max(hours, minTime.getHours());
+                if (hours === minTime.getHours())
+                    minutes = Math.max(minutes, minTime.getMinutes());
+                if (minutes === minTime.getMinutes())
+                    seconds = Math.max(seconds, minTime.getSeconds());
+            }
+            setHours(hours, minutes, seconds);
+        }
+        /**
+         * Syncs time input values with a date
+         */
+        function setHoursFromDate(dateObj) {
+            var date = dateObj || self.latestSelectedDateObj;
+            if (date)
+                setHours(date.getHours(), date.getMinutes(), date.getSeconds());
+        }
+        function setDefaultHours() {
+            var hours = self.config.defaultHour;
+            var minutes = self.config.defaultMinute;
+            var seconds = self.config.defaultSeconds;
+            if (self.config.minDate !== undefined) {
+                var minHr = self.config.minDate.getHours();
+                var minMinutes = self.config.minDate.getMinutes();
+                hours = Math.max(hours, minHr);
+                if (hours === minHr)
+                    minutes = Math.max(minMinutes, minutes);
+                if (hours === minHr && minutes === minMinutes)
+                    seconds = self.config.minDate.getSeconds();
+            }
+            if (self.config.maxDate !== undefined) {
+                var maxHr = self.config.maxDate.getHours();
+                var maxMinutes = self.config.maxDate.getMinutes();
+                hours = Math.min(hours, maxHr);
+                if (hours === maxHr)
+                    minutes = Math.min(maxMinutes, minutes);
+                if (hours === maxHr && minutes === maxMinutes)
+                    seconds = self.config.maxDate.getSeconds();
+            }
+            setHours(hours, minutes, seconds);
+        }
+        /**
+         * Sets the hours, minutes, and optionally seconds
+         * of the latest selected date object and the
+         * corresponding time inputs
+         * @param {Number} hours the hour. whether its military
+         *                 or am-pm gets inferred from config
+         * @param {Number} minutes the minutes
+         * @param {Number} seconds the seconds (optional)
+         */
+        function setHours(hours, minutes, seconds) {
+            if (self.latestSelectedDateObj !== undefined) {
+                self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);
+            }
+            if (!self.hourElement || !self.minuteElement || self.isMobile)
+                return;
+            self.hourElement.value = pad(!self.config.time_24hr
+                ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)
+                : hours);
+            self.minuteElement.value = pad(minutes);
+            if (self.amPM !== undefined)
+                self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];
+            if (self.secondElement !== undefined)
+                self.secondElement.value = pad(seconds);
+        }
+        /**
+         * Handles the year input and incrementing events
+         * @param {Event} event the keyup or increment event
+         */
+        function onYearInput(event) {
+            var year = parseInt(event.target.value) + (event.delta || 0);
+            if (year / 1000 > 1 ||
+                (event.key === "Enter" && !/[^\d]/.test(year.toString()))) {
+                changeYear(year);
+            }
+        }
+        /**
+         * Essentially addEventListener + tracking
+         * @param {Element} element the element to addEventListener to
+         * @param {String} event the event name
+         * @param {Function} handler the event handler
+         */
+        function bind(element, event, handler, options) {
+            if (event instanceof Array)
+                return event.forEach(function (ev) { return bind(element, ev, handler, options); });
+            if (element instanceof Array)
+                return element.forEach(function (el) { return bind(el, event, handler, options); });
+            element.addEventListener(event, handler, options);
+            self._handlers.push({
+                element: element,
+                event: event,
+                handler: handler,
+                options: options
+            });
+        }
+        /**
+         * A mousedown handler which mimics click.
+         * Minimizes latency, since we don't need to wait for mouseup in most cases.
+         * Also, avoids handling right clicks.
+         *
+         * @param {Function} handler the event handler
+         */
+        function onClick(handler) {
+            return function (evt) {
+                evt.which === 1 && handler(evt);
+            };
+        }
+        function triggerChange() {
+            triggerEvent("onChange");
+        }
+        /**
+         * Adds all the necessary event listeners
+         */
+        function bindEvents() {
+            if (self.config.wrap) {
+                ["open", "close", "toggle", "clear"].forEach(function (evt) {
+                    Array.prototype.forEach.call(self.element.querySelectorAll("[data-" + evt + "]"), function (el) {
+                        return bind(el, "click", self[evt]);
+                    });
+                });
+            }
+            if (self.isMobile) {
+                setupMobile();
+                return;
+            }
+            var debouncedResize = debounce(onResize, 50);
+            self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);
+            if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))
+                bind(self.daysContainer, "mouseover", function (e) {
+                    if (self.config.mode === "range")
+                        onMouseOver(e.target);
+                });
+            bind(window.document.body, "keydown", onKeyDown);
+            if (!self.config.inline && !self.config.static)
+                bind(window, "resize", debouncedResize);
+            if (window.ontouchstart !== undefined)
+                bind(window.document, "touchstart", documentClick);
+            else
+                bind(window.document, "mousedown", onClick(documentClick));
+            bind(window.document, "focus", documentClick, { capture: true });
+            if (self.config.clickOpens === true) {
+                bind(self._input, "focus", self.open);
+                bind(self._input, "mousedown", onClick(self.open));
+            }
+            if (self.daysContainer !== undefined) {
+                bind(self.monthNav, "mousedown", onClick(onMonthNavClick));
+                bind(self.monthNav, ["keyup", "increment"], onYearInput);
+                bind(self.daysContainer, "mousedown", onClick(selectDate));
+            }
+            if (self.timeContainer !== undefined &&
+                self.minuteElement !== undefined &&
+                self.hourElement !== undefined) {
+                var selText = function (e) {
+                    return e.target.select();
+                };
+                bind(self.timeContainer, ["increment"], updateTime);
+                bind(self.timeContainer, "blur", updateTime, { capture: true });
+                bind(self.timeContainer, "mousedown", onClick(timeIncrement));
+                bind([self.hourElement, self.minuteElement], ["focus", "click"], selText);
+                if (self.secondElement !== undefined)
+                    bind(self.secondElement, "focus", function () { return self.secondElement && self.secondElement.select(); });
+                if (self.amPM !== undefined) {
+                    bind(self.amPM, "mousedown", onClick(function (e) {
+                        updateTime(e);
+                        triggerChange();
+                    }));
+                }
+            }
+        }
+        /**
+         * Set the calendar view to a particular date.
+         * @param {Date} jumpDate the date to set the view to
+         * @param {boolean} triggerChange if change events should be triggered
+         */
+        function jumpToDate(jumpDate, triggerChange) {
+            var jumpTo = jumpDate !== undefined
+                ? self.parseDate(jumpDate)
+                : self.latestSelectedDateObj ||
+                    (self.config.minDate && self.config.minDate > self.now
+                        ? self.config.minDate
+                        : self.config.maxDate && self.config.maxDate < self.now
+                            ? self.config.maxDate
+                            : self.now);
+            var oldYear = self.currentYear;
+            var oldMonth = self.currentMonth;
+            try {
+                if (jumpTo !== undefined) {
+                    self.currentYear = jumpTo.getFullYear();
+                    self.currentMonth = jumpTo.getMonth();
+                }
+            }
+            catch (e) {
+                /* istanbul ignore next */
+                e.message = "Invalid date supplied: " + jumpTo;
+                self.config.errorHandler(e);
+            }
+            if (triggerChange && self.currentYear !== oldYear) {
+                triggerEvent("onYearChange");
+                buildMonthSwitch();
+            }
+            if (triggerChange &&
+                (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {
+                triggerEvent("onMonthChange");
+            }
+            self.redraw();
+        }
+        /**
+         * The up/down arrow handler for time inputs
+         * @param {Event} e the click event
+         */
+        function timeIncrement(e) {
+            if (~e.target.className.indexOf("arrow"))
+                incrementNumInput(e, e.target.classList.contains("arrowUp") ? 1 : -1);
+        }
+        /**
+         * Increments/decrements the value of input associ-
+         * ated with the up/down arrow by dispatching an
+         * "increment" event on the input.
+         *
+         * @param {Event} e the click event
+         * @param {Number} delta the diff (usually 1 or -1)
+         * @param {Element} inputElem the input element
+         */
+        function incrementNumInput(e, delta, inputElem) {
+            var target = e && e.target;
+            var input = inputElem ||
+                (target && target.parentNode && target.parentNode.firstChild);
+            var event = createEvent("increment");
+            event.delta = delta;
+            input && input.dispatchEvent(event);
+        }
+        function build() {
+            var fragment = window.document.createDocumentFragment();
+            self.calendarContainer = createElement("div", "flatpickr-calendar");
+            self.calendarContainer.tabIndex = -1;
+            if (!self.config.noCalendar) {
+                fragment.appendChild(buildMonthNav());
+                self.innerContainer = createElement("div", "flatpickr-innerContainer");
+                if (self.config.weekNumbers) {
+                    var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;
+                    self.innerContainer.appendChild(weekWrapper);
+                    self.weekNumbers = weekNumbers;
+                    self.weekWrapper = weekWrapper;
+                }
+                self.rContainer = createElement("div", "flatpickr-rContainer");
+                self.rContainer.appendChild(buildWeekdays());
+                if (!self.daysContainer) {
+                    self.daysContainer = createElement("div", "flatpickr-days");
+                    self.daysContainer.tabIndex = -1;
+                }
+                buildDays();
+                self.rContainer.appendChild(self.daysContainer);
+                self.innerContainer.appendChild(self.rContainer);
+                fragment.appendChild(self.innerContainer);
+            }
+            if (self.config.enableTime) {
+                fragment.appendChild(buildTime());
+            }
+            toggleClass(self.calendarContainer, "rangeMode", self.config.mode === "range");
+            toggleClass(self.calendarContainer, "animate", self.config.animate === true);
+            toggleClass(self.calendarContainer, "multiMonth", self.config.showMonths > 1);
+            self.calendarContainer.appendChild(fragment);
+            var customAppend = self.config.appendTo !== undefined &&
+                self.config.appendTo.nodeType !== undefined;
+            if (self.config.inline || self.config.static) {
+                self.calendarContainer.classList.add(self.config.inline ? "inline" : "static");
+                if (self.config.inline) {
+                    if (!customAppend && self.element.parentNode)
+                        self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);
+                    else if (self.config.appendTo !== undefined)
+                        self.config.appendTo.appendChild(self.calendarContainer);
+                }
+                if (self.config.static) {
+                    var wrapper = createElement("div", "flatpickr-wrapper");
+                    if (self.element.parentNode)
+                        self.element.parentNode.insertBefore(wrapper, self.element);
+                    wrapper.appendChild(self.element);
+                    if (self.altInput)
+                        wrapper.appendChild(self.altInput);
+                    wrapper.appendChild(self.calendarContainer);
+                }
+            }
+            if (!self.config.static && !self.config.inline)
+                (self.config.appendTo !== undefined
+                    ? self.config.appendTo
+                    : window.document.body).appendChild(self.calendarContainer);
+        }
+        function createDay(className, date, dayNumber, i) {
+            var dateIsEnabled = isEnabled(date, true), dayElement = createElement("span", "flatpickr-day " + className, date.getDate().toString());
+            dayElement.dateObj = date;
+            dayElement.$i = i;
+            dayElement.setAttribute("aria-label", self.formatDate(date, self.config.ariaDateFormat));
+            if (className.indexOf("hidden") === -1 &&
+                compareDates(date, self.now) === 0) {
+                self.todayDateElem = dayElement;
+                dayElement.classList.add("today");
+                dayElement.setAttribute("aria-current", "date");
+            }
+            if (dateIsEnabled) {
+                dayElement.tabIndex = -1;
+                if (isDateSelected(date)) {
+                    dayElement.classList.add("selected");
+                    self.selectedDateElem = dayElement;
+                    if (self.config.mode === "range") {
+                        toggleClass(dayElement, "startRange", self.selectedDates[0] &&
+                            compareDates(date, self.selectedDates[0], true) === 0);
+                        toggleClass(dayElement, "endRange", self.selectedDates[1] &&
+                            compareDates(date, self.selectedDates[1], true) === 0);
+                        if (className === "nextMonthDay")
+                            dayElement.classList.add("inRange");
+                    }
+                }
+            }
+            else {
+                dayElement.classList.add("flatpickr-disabled");
+            }
+            if (self.config.mode === "range") {
+                if (isDateInRange(date) && !isDateSelected(date))
+                    dayElement.classList.add("inRange");
+            }
+            if (self.weekNumbers &&
+                self.config.showMonths === 1 &&
+                className !== "prevMonthDay" &&
+                dayNumber % 7 === 1) {
+                self.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + self.config.getWeek(date) + "</span>");
+            }
+            triggerEvent("onDayCreate", dayElement);
+            return dayElement;
+        }
+        function focusOnDayElem(targetNode) {
+            targetNode.focus();
+            if (self.config.mode === "range")
+                onMouseOver(targetNode);
+        }
+        function getFirstAvailableDay(delta) {
+            var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;
+            var endMonth = delta > 0 ? self.config.showMonths : -1;
+            for (var m = startMonth; m != endMonth; m += delta) {
+                var month = self.daysContainer.children[m];
+                var startIndex = delta > 0 ? 0 : month.children.length - 1;
+                var endIndex = delta > 0 ? month.children.length : -1;
+                for (var i = startIndex; i != endIndex; i += delta) {
+                    var c = month.children[i];
+                    if (c.className.indexOf("hidden") === -1 && isEnabled(c.dateObj))
+                        return c;
+                }
+            }
+            return undefined;
+        }
+        function getNextAvailableDay(current, delta) {
+            var givenMonth = current.className.indexOf("Month") === -1
+                ? current.dateObj.getMonth()
+                : self.currentMonth;
+            var endMonth = delta > 0 ? self.config.showMonths : -1;
+            var loopDelta = delta > 0 ? 1 : -1;
+            for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {
+                var month = self.daysContainer.children[m];
+                var startIndex = givenMonth - self.currentMonth === m
+                    ? current.$i + delta
+                    : delta < 0
+                        ? month.children.length - 1
+                        : 0;
+                var numMonthDays = month.children.length;
+                for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {
+                    var c = month.children[i];
+                    if (c.className.indexOf("hidden") === -1 &&
+                        isEnabled(c.dateObj) &&
+                        Math.abs(current.$i - i) >= Math.abs(delta))
+                        return focusOnDayElem(c);
+                }
+            }
+            self.changeMonth(loopDelta);
+            focusOnDay(getFirstAvailableDay(loopDelta), 0);
+            return undefined;
+        }
+        function focusOnDay(current, offset) {
+            var dayFocused = isInView(document.activeElement || document.body);
+            var startElem = current !== undefined
+                ? current
+                : dayFocused
+                    ? document.activeElement
+                    : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)
+                        ? self.selectedDateElem
+                        : self.todayDateElem !== undefined && isInView(self.todayDateElem)
+                            ? self.todayDateElem
+                            : getFirstAvailableDay(offset > 0 ? 1 : -1);
+            if (startElem === undefined)
+                return self._input.focus();
+            if (!dayFocused)
+                return focusOnDayElem(startElem);
+            getNextAvailableDay(startElem, offset);
+        }
+        function buildMonthDays(year, month) {
+            var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;
+            var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12);
+            var daysInMonth = self.utils.getDaysInMonth(month), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? "prevMonthDay hidden" : "prevMonthDay", nextMonthDayClass = isMultiMonth ? "nextMonthDay hidden" : "nextMonthDay";
+            var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;
+            // prepend days from the ending of previous month
+            for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {
+                days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));
+            }
+            // Start at 1 since there is no 0th day
+            for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {
+                days.appendChild(createDay("", new Date(year, month, dayNumber), dayNumber, dayIndex));
+            }
+            // append days from the next month
+            for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&
+                (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {
+                days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));
+            }
+            //updateNavigationCurrentMonth();
+            var dayContainer = createElement("div", "dayContainer");
+            dayContainer.appendChild(days);
+            return dayContainer;
+        }
+        function buildDays() {
+            if (self.daysContainer === undefined) {
+                return;
+            }
+            clearNode(self.daysContainer);
+            // TODO: week numbers for each month
+            if (self.weekNumbers)
+                clearNode(self.weekNumbers);
+            var frag = document.createDocumentFragment();
+            for (var i = 0; i < self.config.showMonths; i++) {
+                var d = new Date(self.currentYear, self.currentMonth, 1);
+                d.setMonth(self.currentMonth + i);
+                frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));
+            }
+            self.daysContainer.appendChild(frag);
+            self.days = self.daysContainer.firstChild;
+            if (self.config.mode === "range" && self.selectedDates.length === 1) {
+                onMouseOver();
+            }
+        }
+        function buildMonthSwitch() {
+            if (self.config.showMonths > 1 ||
+                self.config.monthSelectorType !== "dropdown")
+                return;
+            var shouldBuildMonth = function (month) {
+                if (self.config.minDate !== undefined &&
+                    self.currentYear === self.config.minDate.getFullYear() &&
+                    month < self.config.minDate.getMonth()) {
+                    return false;
+                }
+                return !(self.config.maxDate !== undefined &&
+                    self.currentYear === self.config.maxDate.getFullYear() &&
+                    month > self.config.maxDate.getMonth());
+            };
+            self.monthsDropdownContainer.tabIndex = -1;
+            self.monthsDropdownContainer.innerHTML = "";
+            for (var i = 0; i < 12; i++) {
+                if (!shouldBuildMonth(i))
+                    continue;
+                var month = createElement("option", "flatpickr-monthDropdown-month");
+                month.value = new Date(self.currentYear, i).getMonth().toString();
+                month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);
+                month.tabIndex = -1;
+                if (self.currentMonth === i) {
+                    month.selected = true;
+                }
+                self.monthsDropdownContainer.appendChild(month);
+            }
+        }
+        function buildMonth() {
+            var container = createElement("div", "flatpickr-month");
+            var monthNavFragment = window.document.createDocumentFragment();
+            var monthElement;
+            if (self.config.showMonths > 1 ||
+                self.config.monthSelectorType === "static") {
+                monthElement = createElement("span", "cur-month");
+            }
+            else {
+                self.monthsDropdownContainer = createElement("select", "flatpickr-monthDropdown-months");
+                bind(self.monthsDropdownContainer, "change", function (e) {
+                    var target = e.target;
+                    var selectedMonth = parseInt(target.value, 10);
+                    self.changeMonth(selectedMonth - self.currentMonth);
+                    triggerEvent("onMonthChange");
+                });
+                buildMonthSwitch();
+                monthElement = self.monthsDropdownContainer;
+            }
+            var yearInput = createNumberInput("cur-year", { tabindex: "-1" });
+            var yearElement = yearInput.getElementsByTagName("input")[0];
+            yearElement.setAttribute("aria-label", self.l10n.yearAriaLabel);
+            if (self.config.minDate) {
+                yearElement.setAttribute("min", self.config.minDate.getFullYear().toString());
+            }
+            if (self.config.maxDate) {
+                yearElement.setAttribute("max", self.config.maxDate.getFullYear().toString());
+                yearElement.disabled =
+                    !!self.config.minDate &&
+                        self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();
+            }
+            var currentMonth = createElement("div", "flatpickr-current-month");
+            currentMonth.appendChild(monthElement);
+            currentMonth.appendChild(yearInput);
+            monthNavFragment.appendChild(currentMonth);
+            container.appendChild(monthNavFragment);
+            return {
+                container: container,
+                yearElement: yearElement,
+                monthElement: monthElement
+            };
+        }
+        function buildMonths() {
+            clearNode(self.monthNav);
+            self.monthNav.appendChild(self.prevMonthNav);
+            if (self.config.showMonths) {
+                self.yearElements = [];
+                self.monthElements = [];
+            }
+            for (var m = self.config.showMonths; m--;) {
+                var month = buildMonth();
+                self.yearElements.push(month.yearElement);
+                self.monthElements.push(month.monthElement);
+                self.monthNav.appendChild(month.container);
+            }
+            self.monthNav.appendChild(self.nextMonthNav);
+        }
+        function buildMonthNav() {
+            self.monthNav = createElement("div", "flatpickr-months");
+            self.yearElements = [];
+            self.monthElements = [];
+            self.prevMonthNav = createElement("span", "flatpickr-prev-month");
+            self.prevMonthNav.innerHTML = self.config.prevArrow;
+            self.nextMonthNav = createElement("span", "flatpickr-next-month");
+            self.nextMonthNav.innerHTML = self.config.nextArrow;
+            buildMonths();
+            Object.defineProperty(self, "_hidePrevMonthArrow", {
+                get: function () { return self.__hidePrevMonthArrow; },
+                set: function (bool) {
+                    if (self.__hidePrevMonthArrow !== bool) {
+                        toggleClass(self.prevMonthNav, "flatpickr-disabled", bool);
+                        self.__hidePrevMonthArrow = bool;
+                    }
+                }
+            });
+            Object.defineProperty(self, "_hideNextMonthArrow", {
+                get: function () { return self.__hideNextMonthArrow; },
+                set: function (bool) {
+                    if (self.__hideNextMonthArrow !== bool) {
+                        toggleClass(self.nextMonthNav, "flatpickr-disabled", bool);
+                        self.__hideNextMonthArrow = bool;
+                    }
+                }
+            });
+            self.currentYearElement = self.yearElements[0];
+            updateNavigationCurrentMonth();
+            return self.monthNav;
+        }
+        function buildTime() {
+            self.calendarContainer.classList.add("hasTime");
+            if (self.config.noCalendar)
+                self.calendarContainer.classList.add("noCalendar");
+            self.timeContainer = createElement("div", "flatpickr-time");
+            self.timeContainer.tabIndex = -1;
+            var separator = createElement("span", "flatpickr-time-separator", ":");
+            var hourInput = createNumberInput("flatpickr-hour", {
+                "aria-label": self.l10n.hourAriaLabel
+            });
+            self.hourElement = hourInput.getElementsByTagName("input")[0];
+            var minuteInput = createNumberInput("flatpickr-minute", {
+                "aria-label": self.l10n.minuteAriaLabel
+            });
+            self.minuteElement = minuteInput.getElementsByTagName("input")[0];
+            self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;
+            self.hourElement.value = pad(self.latestSelectedDateObj
+                ? self.latestSelectedDateObj.getHours()
+                : self.config.time_24hr
+                    ? self.config.defaultHour
+                    : military2ampm(self.config.defaultHour));
+            self.minuteElement.value = pad(self.latestSelectedDateObj
+                ? self.latestSelectedDateObj.getMinutes()
+                : self.config.defaultMinute);
+            self.hourElement.setAttribute("step", self.config.hourIncrement.toString());
+            self.minuteElement.setAttribute("step", self.config.minuteIncrement.toString());
+            self.hourElement.setAttribute("min", self.config.time_24hr ? "0" : "1");
+            self.hourElement.setAttribute("max", self.config.time_24hr ? "23" : "12");
+            self.minuteElement.setAttribute("min", "0");
+            self.minuteElement.setAttribute("max", "59");
+            self.timeContainer.appendChild(hourInput);
+            self.timeContainer.appendChild(separator);
+            self.timeContainer.appendChild(minuteInput);
+            if (self.config.time_24hr)
+                self.timeContainer.classList.add("time24hr");
+            if (self.config.enableSeconds) {
+                self.timeContainer.classList.add("hasSeconds");
+                var secondInput = createNumberInput("flatpickr-second");
+                self.secondElement = secondInput.getElementsByTagName("input")[0];
+                self.secondElement.value = pad(self.latestSelectedDateObj
+                    ? self.latestSelectedDateObj.getSeconds()
+                    : self.config.defaultSeconds);
+                self.secondElement.setAttribute("step", self.minuteElement.getAttribute("step"));
+                self.secondElement.setAttribute("min", "0");
+                self.secondElement.setAttribute("max", "59");
+                self.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":"));
+                self.timeContainer.appendChild(secondInput);
+            }
+            if (!self.config.time_24hr) {
+                // add self.amPM if appropriate
+                self.amPM = createElement("span", "flatpickr-am-pm", self.l10n.amPM[int((self.latestSelectedDateObj
+                    ? self.hourElement.value
+                    : self.config.defaultHour) > 11)]);
+                self.amPM.title = self.l10n.toggleTitle;
+                self.amPM.tabIndex = -1;
+                self.timeContainer.appendChild(self.amPM);
+            }
+            return self.timeContainer;
+        }
+        function buildWeekdays() {
+            if (!self.weekdayContainer)
+                self.weekdayContainer = createElement("div", "flatpickr-weekdays");
+            else
+                clearNode(self.weekdayContainer);
+            for (var i = self.config.showMonths; i--;) {
+                var container = createElement("div", "flatpickr-weekdaycontainer");
+                self.weekdayContainer.appendChild(container);
+            }
+            updateWeekdays();
+            return self.weekdayContainer;
+        }
+        function updateWeekdays() {
+            var firstDayOfWeek = self.l10n.firstDayOfWeek;
+            var weekdays = self.l10n.weekdays.shorthand.slice();
+            if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {
+                weekdays = weekdays.splice(firstDayOfWeek, weekdays.length).concat(weekdays.splice(0, firstDayOfWeek));
+            }
+            for (var i = self.config.showMonths; i--;) {
+                self.weekdayContainer.children[i].innerHTML = "\n      <span class='flatpickr-weekday'>\n        " + weekdays.join("</span><span class='flatpickr-weekday'>") + "\n      </span>\n      ";
+            }
+        }
+        /* istanbul ignore next */
+        function buildWeeks() {
+            self.calendarContainer.classList.add("hasWeeks");
+            var weekWrapper = createElement("div", "flatpickr-weekwrapper");
+            weekWrapper.appendChild(createElement("span", "flatpickr-weekday", self.l10n.weekAbbreviation));
+            var weekNumbers = createElement("div", "flatpickr-weeks");
+            weekWrapper.appendChild(weekNumbers);
+            return {
+                weekWrapper: weekWrapper,
+                weekNumbers: weekNumbers
+            };
+        }
+        function changeMonth(value, isOffset) {
+            if (isOffset === void 0) { isOffset = true; }
+            var delta = isOffset ? value : value - self.currentMonth;
+            if ((delta < 0 && self._hidePrevMonthArrow === true) ||
+                (delta > 0 && self._hideNextMonthArrow === true))
+                return;
+            self.currentMonth += delta;
+            if (self.currentMonth < 0 || self.currentMonth > 11) {
+                self.currentYear += self.currentMonth > 11 ? 1 : -1;
+                self.currentMonth = (self.currentMonth + 12) % 12;
+                triggerEvent("onYearChange");
+                buildMonthSwitch();
+            }
+            buildDays();
+            triggerEvent("onMonthChange");
+            updateNavigationCurrentMonth();
+        }
+        function clear(triggerChangeEvent, toInitial) {
+            if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }
+            if (toInitial === void 0) { toInitial = true; }
+            self.input.value = "";
+            if (self.altInput !== undefined)
+                self.altInput.value = "";
+            if (self.mobileInput !== undefined)
+                self.mobileInput.value = "";
+            self.selectedDates = [];
+            self.latestSelectedDateObj = undefined;
+            if (toInitial === true) {
+                self.currentYear = self._initialDate.getFullYear();
+                self.currentMonth = self._initialDate.getMonth();
+            }
+            self.showTimeInput = false;
+            if (self.config.enableTime === true) {
+                setDefaultHours();
+            }
+            self.redraw();
+            if (triggerChangeEvent)
+                // triggerChangeEvent is true (default) or an Event
+                triggerEvent("onChange");
+        }
+        function close() {
+            self.isOpen = false;
+            if (!self.isMobile) {
+                if (self.calendarContainer !== undefined) {
+                    self.calendarContainer.classList.remove("open");
+                }
+                if (self._input !== undefined) {
+                    self._input.classList.remove("active");
+                }
+            }
+            triggerEvent("onClose");
+        }
+        function destroy() {
+            if (self.config !== undefined)
+                triggerEvent("onDestroy");
+            for (var i = self._handlers.length; i--;) {
+                var h = self._handlers[i];
+                h.element.removeEventListener(h.event, h.handler, h.options);
+            }
+            self._handlers = [];
+            if (self.mobileInput) {
+                if (self.mobileInput.parentNode)
+                    self.mobileInput.parentNode.removeChild(self.mobileInput);
+                self.mobileInput = undefined;
+            }
+            else if (self.calendarContainer && self.calendarContainer.parentNode) {
+                if (self.config.static && self.calendarContainer.parentNode) {
+                    var wrapper = self.calendarContainer.parentNode;
+                    wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);
+                    if (wrapper.parentNode) {
+                        while (wrapper.firstChild)
+                            wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);
+                        wrapper.parentNode.removeChild(wrapper);
+                    }
+                }
+                else
+                    self.calendarContainer.parentNode.removeChild(self.calendarContainer);
+            }
+            if (self.altInput) {
+                self.input.type = "text";
+                if (self.altInput.parentNode)
+                    self.altInput.parentNode.removeChild(self.altInput);
+                delete self.altInput;
+            }
+            if (self.input) {
+                self.input.type = self.input._type;
+                self.input.classList.remove("flatpickr-input");
+                self.input.removeAttribute("readonly");
+                self.input.value = "";
+            }
+            [
+                "_showTimeInput",
+                "latestSelectedDateObj",
+                "_hideNextMonthArrow",
+                "_hidePrevMonthArrow",
+                "__hideNextMonthArrow",
+                "__hidePrevMonthArrow",
+                "isMobile",
+                "isOpen",
+                "selectedDateElem",
+                "minDateHasTime",
+                "maxDateHasTime",
+                "days",
+                "daysContainer",
+                "_input",
+                "_positionElement",
+                "innerContainer",
+                "rContainer",
+                "monthNav",
+                "todayDateElem",
+                "calendarContainer",
+                "weekdayContainer",
+                "prevMonthNav",
+                "nextMonthNav",
+                "monthsDropdownContainer",
+                "currentMonthElement",
+                "currentYearElement",
+                "navigationCurrentMonth",
+                "selectedDateElem",
+                "config",
+            ].forEach(function (k) {
+                try {
+                    delete self[k];
+                }
+                catch (_) { }
+            });
+        }
+        function isCalendarElem(elem) {
+            if (self.config.appendTo && self.config.appendTo.contains(elem))
+                return true;
+            return self.calendarContainer.contains(elem);
+        }
+        function documentClick(e) {
+            if (self.isOpen && !self.config.inline) {
+                var eventTarget_1 = getEventTarget(e);
+                var isCalendarElement = isCalendarElem(eventTarget_1);
+                var isInput = eventTarget_1 === self.input ||
+                    eventTarget_1 === self.altInput ||
+                    self.element.contains(eventTarget_1) ||
+                    // web components
+                    // e.path is not present in all browsers. circumventing typechecks
+                    (e.path &&
+                        e.path.indexOf &&
+                        (~e.path.indexOf(self.input) ||
+                            ~e.path.indexOf(self.altInput)));
+                var lostFocus = e.type === "blur"
+                    ? isInput &&
+                        e.relatedTarget &&
+                        !isCalendarElem(e.relatedTarget)
+                    : !isInput &&
+                        !isCalendarElement &&
+                        !isCalendarElem(e.relatedTarget);
+                var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {
+                    return elem.contains(eventTarget_1);
+                });
+                if (lostFocus && isIgnored) {
+                    self.close();
+                    if (self.config.mode === "range" && self.selectedDates.length === 1) {
+                        self.clear(false);
+                        self.redraw();
+                    }
+                }
+            }
+        }
+        function changeYear(newYear) {
+            if (!newYear ||
+                (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||
+                (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))
+                return;
+            var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;
+            self.currentYear = newYearNum || self.currentYear;
+            if (self.config.maxDate &&
+                self.currentYear === self.config.maxDate.getFullYear()) {
+                self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);
+            }
+            else if (self.config.minDate &&
+                self.currentYear === self.config.minDate.getFullYear()) {
+                self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);
+            }
+            if (isNewYear) {
+                self.redraw();
+                triggerEvent("onYearChange");
+                buildMonthSwitch();
+            }
+        }
+        function isEnabled(date, timeless) {
+            if (timeless === void 0) { timeless = true; }
+            var dateToCheck = self.parseDate(date, undefined, timeless); // timeless
+            if ((self.config.minDate &&
+                dateToCheck &&
+                compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||
+                (self.config.maxDate &&
+                    dateToCheck &&
+                    compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))
+                return false;
+            if (self.config.enable.length === 0 && self.config.disable.length === 0)
+                return true;
+            if (dateToCheck === undefined)
+                return false;
+            var bool = self.config.enable.length > 0, array = bool ? self.config.enable : self.config.disable;
+            for (var i = 0, d = void 0; i < array.length; i++) {
+                d = array[i];
+                if (typeof d === "function" &&
+                    d(dateToCheck) // disabled by function
+                )
+                    return bool;
+                else if (d instanceof Date &&
+                    dateToCheck !== undefined &&
+                    d.getTime() === dateToCheck.getTime())
+                    // disabled by date
+                    return bool;
+                else if (typeof d === "string" && dateToCheck !== undefined) {
+                    // disabled by date string
+                    var parsed = self.parseDate(d, undefined, true);
+                    return parsed && parsed.getTime() === dateToCheck.getTime()
+                        ? bool
+                        : !bool;
+                }
+                else if (
+                // disabled by range
+                typeof d === "object" &&
+                    dateToCheck !== undefined &&
+                    d.from &&
+                    d.to &&
+                    dateToCheck.getTime() >= d.from.getTime() &&
+                    dateToCheck.getTime() <= d.to.getTime())
+                    return bool;
+            }
+            return !bool;
+        }
+        function isInView(elem) {
+            if (self.daysContainer !== undefined)
+                return (elem.className.indexOf("hidden") === -1 &&
+                    self.daysContainer.contains(elem));
+            return false;
+        }
+        function onKeyDown(e) {
+            // e.key                      e.keyCode
+            // "Backspace"                        8
+            // "Tab"                              9
+            // "Enter"                           13
+            // "Escape"     (IE "Esc")           27
+            // "ArrowLeft"  (IE "Left")          37
+            // "ArrowUp"    (IE "Up")            38
+            // "ArrowRight" (IE "Right")         39
+            // "ArrowDown"  (IE "Down")          40
+            // "Delete"     (IE "Del")           46
+            var isInput = e.target === self._input;
+            var allowInput = self.config.allowInput;
+            var allowKeydown = self.isOpen && (!allowInput || !isInput);
+            var allowInlineKeydown = self.config.inline && isInput && !allowInput;
+            if (e.keyCode === 13 && isInput) {
+                if (allowInput) {
+                    self.setDate(self._input.value, true, e.target === self.altInput
+                        ? self.config.altFormat
+                        : self.config.dateFormat);
+                    return e.target.blur();
+                }
+                else {
+                    self.open();
+                }
+            }
+            else if (isCalendarElem(e.target) ||
+                allowKeydown ||
+                allowInlineKeydown) {
+                var isTimeObj = !!self.timeContainer &&
+                    self.timeContainer.contains(e.target);
+                switch (e.keyCode) {
+                    case 13:
+                        if (isTimeObj) {
+                            e.preventDefault();
+                            updateTime();
+                            focusAndClose();
+                        }
+                        else
+                            selectDate(e);
+                        break;
+                    case 27: // escape
+                        e.preventDefault();
+                        focusAndClose();
+                        break;
+                    case 8:
+                    case 46:
+                        if (isInput && !self.config.allowInput) {
+                            e.preventDefault();
+                            self.clear();
+                        }
+                        break;
+                    case 37:
+                    case 39:
+                        if (!isTimeObj && !isInput) {
+                            e.preventDefault();
+                            if (self.daysContainer !== undefined &&
+                                (allowInput === false ||
+                                    (document.activeElement && isInView(document.activeElement)))) {
+                                var delta_1 = e.keyCode === 39 ? 1 : -1;
+                                if (!e.ctrlKey)
+                                    focusOnDay(undefined, delta_1);
+                                else {
+                                    e.stopPropagation();
+                                    changeMonth(delta_1);
+                                    focusOnDay(getFirstAvailableDay(1), 0);
+                                }
+                            }
+                        }
+                        else if (self.hourElement)
+                            self.hourElement.focus();
+                        break;
+                    case 38:
+                    case 40:
+                        e.preventDefault();
+                        var delta = e.keyCode === 40 ? 1 : -1;
+                        if ((self.daysContainer && e.target.$i !== undefined) ||
+                            e.target === self.input) {
+                            if (e.ctrlKey) {
+                                e.stopPropagation();
+                                changeYear(self.currentYear - delta);
+                                focusOnDay(getFirstAvailableDay(1), 0);
+                            }
+                            else if (!isTimeObj)
+                                focusOnDay(undefined, delta * 7);
+                        }
+                        else if (e.target === self.currentYearElement) {
+                            changeYear(self.currentYear - delta);
+                        }
+                        else if (self.config.enableTime) {
+                            if (!isTimeObj && self.hourElement)
+                                self.hourElement.focus();
+                            updateTime(e);
+                            self._debouncedChange();
+                        }
+                        break;
+                    case 9:
+                        if (isTimeObj) {
+                            var elems = [
+                                self.hourElement,
+                                self.minuteElement,
+                                self.secondElement,
+                                self.amPM,
+                            ]
+                                .concat(self.pluginElements)
+                                .filter(function (x) { return x; });
+                            var i = elems.indexOf(e.target);
+                            if (i !== -1) {
+                                var target = elems[i + (e.shiftKey ? -1 : 1)];
+                                e.preventDefault();
+                                (target || self._input).focus();
+                            }
+                        }
+                        else if (!self.config.noCalendar &&
+                            self.daysContainer &&
+                            self.daysContainer.contains(e.target) &&
+                            e.shiftKey) {
+                            e.preventDefault();
+                            self._input.focus();
+                        }
+                        break;
+                    default:
+                        break;
+                }
+            }
+            if (self.amPM !== undefined && e.target === self.amPM) {
+                switch (e.key) {
+                    case self.l10n.amPM[0].charAt(0):
+                    case self.l10n.amPM[0].charAt(0).toLowerCase():
+                        self.amPM.textContent = self.l10n.amPM[0];
+                        setHoursFromInputs();
+                        updateValue();
+                        break;
+                    case self.l10n.amPM[1].charAt(0):
+                    case self.l10n.amPM[1].charAt(0).toLowerCase():
+                        self.amPM.textContent = self.l10n.amPM[1];
+                        setHoursFromInputs();
+                        updateValue();
+                        break;
+                }
+            }
+            if (isInput || isCalendarElem(e.target)) {
+                triggerEvent("onKeyDown", e);
+            }
+        }
+        function onMouseOver(elem) {
+            if (self.selectedDates.length !== 1 ||
+                (elem &&
+                    (!elem.classList.contains("flatpickr-day") ||
+                        elem.classList.contains("flatpickr-disabled"))))
+                return;
+            var hoverDate = elem
+                ? elem.dateObj.getTime()
+                : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());
+            var containsDisabled = false;
+            var minRange = 0, maxRange = 0;
+            for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {
+                if (!isEnabled(new Date(t), true)) {
+                    containsDisabled =
+                        containsDisabled || (t > rangeStartDate && t < rangeEndDate);
+                    if (t < initialDate && (!minRange || t > minRange))
+                        minRange = t;
+                    else if (t > initialDate && (!maxRange || t < maxRange))
+                        maxRange = t;
+                }
+            }
+            for (var m = 0; m < self.config.showMonths; m++) {
+                var month = self.daysContainer.children[m];
+                var _loop_1 = function (i, l) {
+                    var dayElem = month.children[i], date = dayElem.dateObj;
+                    var timestamp = date.getTime();
+                    var outOfRange = (minRange > 0 && timestamp < minRange) ||
+                        (maxRange > 0 && timestamp > maxRange);
+                    if (outOfRange) {
+                        dayElem.classList.add("notAllowed");
+                        ["inRange", "startRange", "endRange"].forEach(function (c) {
+                            dayElem.classList.remove(c);
+                        });
+                        return "continue";
+                    }
+                    else if (containsDisabled && !outOfRange)
+                        return "continue";
+                    ["startRange", "inRange", "endRange", "notAllowed"].forEach(function (c) {
+                        dayElem.classList.remove(c);
+                    });
+                    if (elem !== undefined) {
+                        elem.classList.add(hoverDate <= self.selectedDates[0].getTime()
+                            ? "startRange"
+                            : "endRange");
+                        if (initialDate < hoverDate && timestamp === initialDate)
+                            dayElem.classList.add("startRange");
+                        else if (initialDate > hoverDate && timestamp === initialDate)
+                            dayElem.classList.add("endRange");
+                        if (timestamp >= minRange &&
+                            (maxRange === 0 || timestamp <= maxRange) &&
+                            isBetween(timestamp, initialDate, hoverDate))
+                            dayElem.classList.add("inRange");
+                    }
+                };
+                for (var i = 0, l = month.children.length; i < l; i++) {
+                    _loop_1(i, l);
+                }
+            }
+        }
+        function onResize() {
+            if (self.isOpen && !self.config.static && !self.config.inline)
+                positionCalendar();
+        }
+        function setDefaultTime() {
+            self.setDate(self.config.minDate !== undefined
+                ? new Date(self.config.minDate.getTime())
+                : new Date(), true);
+            setDefaultHours();
+            updateValue();
+        }
+        function open(e, positionElement) {
+            if (positionElement === void 0) { positionElement = self._positionElement; }
+            if (self.isMobile === true) {
+                if (e) {
+                    e.preventDefault();
+                    e.target && e.target.blur();
+                }
+                if (self.mobileInput !== undefined) {
+                    self.mobileInput.focus();
+                    self.mobileInput.click();
+                }
+                triggerEvent("onOpen");
+                return;
+            }
+            if (self._input.disabled || self.config.inline)
+                return;
+            var wasOpen = self.isOpen;
+            self.isOpen = true;
+            if (!wasOpen) {
+                self.calendarContainer.classList.add("open");
+                self._input.classList.add("active");
+                triggerEvent("onOpen");
+                positionCalendar(positionElement);
+            }
+            if (self.config.enableTime === true && self.config.noCalendar === true) {
+                if (self.selectedDates.length === 0) {
+                    setDefaultTime();
+                }
+                if (self.config.allowInput === false &&
+                    (e === undefined ||
+                        !self.timeContainer.contains(e.relatedTarget))) {
+                    setTimeout(function () { return self.hourElement.select(); }, 50);
+                }
+            }
+        }
+        function minMaxDateSetter(type) {
+            return function (date) {
+                var dateObj = (self.config["_" + type + "Date"] = self.parseDate(date, self.config.dateFormat));
+                var inverseDateObj = self.config["_" + (type === "min" ? "max" : "min") + "Date"];
+                if (dateObj !== undefined) {
+                    self[type === "min" ? "minDateHasTime" : "maxDateHasTime"] =
+                        dateObj.getHours() > 0 ||
+                            dateObj.getMinutes() > 0 ||
+                            dateObj.getSeconds() > 0;
+                }
+                if (self.selectedDates) {
+                    self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });
+                    if (!self.selectedDates.length && type === "min")
+                        setHoursFromDate(dateObj);
+                    updateValue();
+                }
+                if (self.daysContainer) {
+                    redraw();
+                    if (dateObj !== undefined)
+                        self.currentYearElement[type] = dateObj.getFullYear().toString();
+                    else
+                        self.currentYearElement.removeAttribute(type);
+                    self.currentYearElement.disabled =
+                        !!inverseDateObj &&
+                            dateObj !== undefined &&
+                            inverseDateObj.getFullYear() === dateObj.getFullYear();
+                }
+            };
+        }
+        function parseConfig() {
+            var boolOpts = [
+                "wrap",
+                "weekNumbers",
+                "allowInput",
+                "clickOpens",
+                "time_24hr",
+                "enableTime",
+                "noCalendar",
+                "altInput",
+                "shorthandCurrentMonth",
+                "inline",
+                "static",
+                "enableSeconds",
+                "disableMobile",
+            ];
+            var userConfig = __assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));
+            var formats = {};
+            self.config.parseDate = userConfig.parseDate;
+            self.config.formatDate = userConfig.formatDate;
+            Object.defineProperty(self.config, "enable", {
+                get: function () { return self.config._enable; },
+                set: function (dates) {
+                    self.config._enable = parseDateRules(dates);
+                }
+            });
+            Object.defineProperty(self.config, "disable", {
+                get: function () { return self.config._disable; },
+                set: function (dates) {
+                    self.config._disable = parseDateRules(dates);
+                }
+            });
+            var timeMode = userConfig.mode === "time";
+            if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {
+                var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaults.dateFormat;
+                formats.dateFormat =
+                    userConfig.noCalendar || timeMode
+                        ? "H:i" + (userConfig.enableSeconds ? ":S" : "")
+                        : defaultDateFormat + " H:i" + (userConfig.enableSeconds ? ":S" : "");
+            }
+            if (userConfig.altInput &&
+                (userConfig.enableTime || timeMode) &&
+                !userConfig.altFormat) {
+                var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaults.altFormat;
+                formats.altFormat =
+                    userConfig.noCalendar || timeMode
+                        ? "h:i" + (userConfig.enableSeconds ? ":S K" : " K")
+                        : defaultAltFormat + (" h:i" + (userConfig.enableSeconds ? ":S" : "") + " K");
+            }
+            if (!userConfig.altInputClass) {
+                self.config.altInputClass =
+                    self.input.className + " " + self.config.altInputClass;
+            }
+            Object.defineProperty(self.config, "minDate", {
+                get: function () { return self.config._minDate; },
+                set: minMaxDateSetter("min")
+            });
+            Object.defineProperty(self.config, "maxDate", {
+                get: function () { return self.config._maxDate; },
+                set: minMaxDateSetter("max")
+            });
+            var minMaxTimeSetter = function (type) { return function (val) {
+                self.config[type === "min" ? "_minTime" : "_maxTime"] = self.parseDate(val, "H:i");
+            }; };
+            Object.defineProperty(self.config, "minTime", {
+                get: function () { return self.config._minTime; },
+                set: minMaxTimeSetter("min")
+            });
+            Object.defineProperty(self.config, "maxTime", {
+                get: function () { return self.config._maxTime; },
+                set: minMaxTimeSetter("max")
+            });
+            if (userConfig.mode === "time") {
+                self.config.noCalendar = true;
+                self.config.enableTime = true;
+            }
+            Object.assign(self.config, formats, userConfig);
+            for (var i = 0; i < boolOpts.length; i++)
+                self.config[boolOpts[i]] =
+                    self.config[boolOpts[i]] === true ||
+                        self.config[boolOpts[i]] === "true";
+            HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {
+                self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);
+            });
+            self.isMobile =
+                !self.config.disableMobile &&
+                    !self.config.inline &&
+                    self.config.mode === "single" &&
+                    !self.config.disable.length &&
+                    !self.config.enable.length &&
+                    !self.config.weekNumbers &&
+                    /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
+            for (var i = 0; i < self.config.plugins.length; i++) {
+                var pluginConf = self.config.plugins[i](self) || {};
+                for (var key in pluginConf) {
+                    if (HOOKS.indexOf(key) > -1) {
+                        self.config[key] = arrayify(pluginConf[key])
+                            .map(bindToInstance)
+                            .concat(self.config[key]);
+                    }
+                    else if (typeof userConfig[key] === "undefined")
+                        self.config[key] = pluginConf[key];
+                }
+            }
+            triggerEvent("onParseConfig");
+        }
+        function setupLocale() {
+            if (typeof self.config.locale !== "object" &&
+                typeof flatpickr.l10ns[self.config.locale] === "undefined")
+                self.config.errorHandler(new Error("flatpickr: invalid locale " + self.config.locale));
+            self.l10n = __assign({}, flatpickr.l10ns["default"], (typeof self.config.locale === "object"
+                ? self.config.locale
+                : self.config.locale !== "default"
+                    ? flatpickr.l10ns[self.config.locale]
+                    : undefined));
+            tokenRegex.K = "(" + self.l10n.amPM[0] + "|" + self.l10n.amPM[1] + "|" + self.l10n.amPM[0].toLowerCase() + "|" + self.l10n.amPM[1].toLowerCase() + ")";
+            var userConfig = __assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));
+            if (userConfig.time_24hr === undefined &&
+                flatpickr.defaultConfig.time_24hr === undefined) {
+                self.config.time_24hr = self.l10n.time_24hr;
+            }
+            self.formatDate = createDateFormatter(self);
+            self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
+        }
+        function positionCalendar(customPositionElement) {
+            if (self.calendarContainer === undefined)
+                return;
+            triggerEvent("onPreCalendarPosition");
+            var positionElement = customPositionElement || self._positionElement;
+            var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(" "), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === "above" ||
+                (configPosVertical !== "below" &&
+                    distanceFromBottom < calendarHeight &&
+                    inputBounds.top > calendarHeight);
+            var top = window.pageYOffset +
+                inputBounds.top +
+                (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);
+            toggleClass(self.calendarContainer, "arrowTop", !showOnTop);
+            toggleClass(self.calendarContainer, "arrowBottom", showOnTop);
+            if (self.config.inline)
+                return;
+            var left = window.pageXOffset +
+                inputBounds.left -
+                (configPosHorizontal != null && configPosHorizontal === "center"
+                    ? (calendarWidth - inputBounds.width) / 2
+                    : 0);
+            var right = window.document.body.offsetWidth - inputBounds.right;
+            var rightMost = left + calendarWidth > window.document.body.offsetWidth;
+            var centerMost = right + calendarWidth > window.document.body.offsetWidth;
+            toggleClass(self.calendarContainer, "rightMost", rightMost);
+            if (self.config.static)
+                return;
+            self.calendarContainer.style.top = top + "px";
+            if (!rightMost) {
+                self.calendarContainer.style.left = left + "px";
+                self.calendarContainer.style.right = "auto";
+            }
+            else if (!centerMost) {
+                self.calendarContainer.style.left = "auto";
+                self.calendarContainer.style.right = right + "px";
+            }
+            else {
+                var doc = document.styleSheets[0];
+                // some testing environments don't have css support
+                if (doc === undefined)
+                    return;
+                var bodyWidth = window.document.body.offsetWidth;
+                var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);
+                var centerBefore = ".flatpickr-calendar.centerMost:before";
+                var centerAfter = ".flatpickr-calendar.centerMost:after";
+                var centerIndex = doc.cssRules.length;
+                var centerStyle = "{left:" + inputBounds.left + "px;right:auto;}";
+                toggleClass(self.calendarContainer, "rightMost", false);
+                toggleClass(self.calendarContainer, "centerMost", true);
+                doc.insertRule(centerBefore + "," + centerAfter + centerStyle, centerIndex);
+                self.calendarContainer.style.left = centerLeft + "px";
+                self.calendarContainer.style.right = "auto";
+            }
+        }
+        function redraw() {
+            if (self.config.noCalendar || self.isMobile)
+                return;
+            updateNavigationCurrentMonth();
+            buildDays();
+        }
+        function focusAndClose() {
+            self._input.focus();
+            if (window.navigator.userAgent.indexOf("MSIE") !== -1 ||
+                navigator.msMaxTouchPoints !== undefined) {
+                // hack - bugs in the way IE handles focus keeps the calendar open
+                setTimeout(self.close, 0);
+            }
+            else {
+                self.close();
+            }
+        }
+        function selectDate(e) {
+            e.preventDefault();
+            e.stopPropagation();
+            var isSelectable = function (day) {
+                return day.classList &&
+                    day.classList.contains("flatpickr-day") &&
+                    !day.classList.contains("flatpickr-disabled") &&
+                    !day.classList.contains("notAllowed");
+            };
+            var t = findParent(e.target, isSelectable);
+            if (t === undefined)
+                return;
+            var target = t;
+            var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));
+            var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||
+                selectedDate.getMonth() >
+                    self.currentMonth + self.config.showMonths - 1) &&
+                self.config.mode !== "range";
+            self.selectedDateElem = target;
+            if (self.config.mode === "single")
+                self.selectedDates = [selectedDate];
+            else if (self.config.mode === "multiple") {
+                var selectedIndex = isDateSelected(selectedDate);
+                if (selectedIndex)
+                    self.selectedDates.splice(parseInt(selectedIndex), 1);
+                else
+                    self.selectedDates.push(selectedDate);
+            }
+            else if (self.config.mode === "range") {
+                if (self.selectedDates.length === 2) {
+                    self.clear(false, false);
+                }
+                self.latestSelectedDateObj = selectedDate;
+                self.selectedDates.push(selectedDate);
+                // unless selecting same date twice, sort ascendingly
+                if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)
+                    self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });
+            }
+            setHoursFromInputs();
+            if (shouldChangeMonth) {
+                var isNewYear = self.currentYear !== selectedDate.getFullYear();
+                self.currentYear = selectedDate.getFullYear();
+                self.currentMonth = selectedDate.getMonth();
+                if (isNewYear) {
+                    triggerEvent("onYearChange");
+                    buildMonthSwitch();
+                }
+                triggerEvent("onMonthChange");
+            }
+            updateNavigationCurrentMonth();
+            buildDays();
+            updateValue();
+            if (self.config.enableTime)
+                setTimeout(function () { return (self.showTimeInput = true); }, 50);
+            // maintain focus
+            if (!shouldChangeMonth &&
+                self.config.mode !== "range" &&
+                self.config.showMonths === 1)
+                focusOnDayElem(target);
+            else if (self.selectedDateElem !== undefined &&
+                self.hourElement === undefined) {
+                self.selectedDateElem && self.selectedDateElem.focus();
+            }
+            if (self.hourElement !== undefined)
+                self.hourElement !== undefined && self.hourElement.focus();
+            if (self.config.closeOnSelect) {
+                var single = self.config.mode === "single" && !self.config.enableTime;
+                var range = self.config.mode === "range" &&
+                    self.selectedDates.length === 2 &&
+                    !self.config.enableTime;
+                if (single || range) {
+                    focusAndClose();
+                }
+            }
+            triggerChange();
+        }
+        var CALLBACKS = {
+            locale: [setupLocale, updateWeekdays],
+            showMonths: [buildMonths, setCalendarWidth, buildWeekdays],
+            minDate: [jumpToDate],
+            maxDate: [jumpToDate]
+        };
+        function set(option, value) {
+            if (option !== null && typeof option === "object") {
+                Object.assign(self.config, option);
+                for (var key in option) {
+                    if (CALLBACKS[key] !== undefined)
+                        CALLBACKS[key].forEach(function (x) { return x(); });
+                }
+            }
+            else {
+                self.config[option] = value;
+                if (CALLBACKS[option] !== undefined)
+                    CALLBACKS[option].forEach(function (x) { return x(); });
+                else if (HOOKS.indexOf(option) > -1)
+                    self.config[option] = arrayify(value);
+            }
+            self.redraw();
+            updateValue(false);
+        }
+        function setSelectedDate(inputDate, format) {
+            var dates = [];
+            if (inputDate instanceof Array)
+                dates = inputDate.map(function (d) { return self.parseDate(d, format); });
+            else if (inputDate instanceof Date || typeof inputDate === "number")
+                dates = [self.parseDate(inputDate, format)];
+            else if (typeof inputDate === "string") {
+                switch (self.config.mode) {
+                    case "single":
+                    case "time":
+                        dates = [self.parseDate(inputDate, format)];
+                        break;
+                    case "multiple":
+                        dates = inputDate
+                            .split(self.config.conjunction)
+                            .map(function (date) { return self.parseDate(date, format); });
+                        break;
+                    case "range":
+                        dates = inputDate
+                            .split(self.l10n.rangeSeparator)
+                            .map(function (date) { return self.parseDate(date, format); });
+                        break;
+                    default:
+                        break;
+                }
+            }
+            else
+                self.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(inputDate)));
+            self.selectedDates = dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); });
+            if (self.config.mode === "range")
+                self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });
+        }
+        function setDate(date, triggerChange, format) {
+            if (triggerChange === void 0) { triggerChange = false; }
+            if (format === void 0) { format = self.config.dateFormat; }
+            if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))
+                return self.clear(triggerChange);
+            setSelectedDate(date, format);
+            self.showTimeInput = self.selectedDates.length > 0;
+            self.latestSelectedDateObj =
+                self.selectedDates[self.selectedDates.length - 1];
+            self.redraw();
+            jumpToDate();
+            setHoursFromDate();
+            if (self.selectedDates.length === 0) {
+                self.clear(false);
+            }
+            updateValue(triggerChange);
+            if (triggerChange)
+                triggerEvent("onChange");
+        }
+        function parseDateRules(arr) {
+            return arr
+                .slice()
+                .map(function (rule) {
+                if (typeof rule === "string" ||
+                    typeof rule === "number" ||
+                    rule instanceof Date) {
+                    return self.parseDate(rule, undefined, true);
+                }
+                else if (rule &&
+                    typeof rule === "object" &&
+                    rule.from &&
+                    rule.to)
+                    return {
+                        from: self.parseDate(rule.from, undefined),
+                        to: self.parseDate(rule.to, undefined)
+                    };
+                return rule;
+            })
+                .filter(function (x) { return x; }); // remove falsy values
+        }
+        function setupDates() {
+            self.selectedDates = [];
+            self.now = self.parseDate(self.config.now) || new Date();
+            // Workaround IE11 setting placeholder as the input's value
+            var preloadedDate = self.config.defaultDate ||
+                ((self.input.nodeName === "INPUT" ||
+                    self.input.nodeName === "TEXTAREA") &&
+                    self.input.placeholder &&
+                    self.input.value === self.input.placeholder
+                    ? null
+                    : self.input.value);
+            if (preloadedDate)
+                setSelectedDate(preloadedDate, self.config.dateFormat);
+            self._initialDate =
+                self.selectedDates.length > 0
+                    ? self.selectedDates[0]
+                    : self.config.minDate &&
+                        self.config.minDate.getTime() > self.now.getTime()
+                        ? self.config.minDate
+                        : self.config.maxDate &&
+                            self.config.maxDate.getTime() < self.now.getTime()
+                            ? self.config.maxDate
+                            : self.now;
+            self.currentYear = self._initialDate.getFullYear();
+            self.currentMonth = self._initialDate.getMonth();
+            if (self.selectedDates.length > 0)
+                self.latestSelectedDateObj = self.selectedDates[0];
+            if (self.config.minTime !== undefined)
+                self.config.minTime = self.parseDate(self.config.minTime, "H:i");
+            if (self.config.maxTime !== undefined)
+                self.config.maxTime = self.parseDate(self.config.maxTime, "H:i");
+            self.minDateHasTime =
+                !!self.config.minDate &&
+                    (self.config.minDate.getHours() > 0 ||
+                        self.config.minDate.getMinutes() > 0 ||
+                        self.config.minDate.getSeconds() > 0);
+            self.maxDateHasTime =
+                !!self.config.maxDate &&
+                    (self.config.maxDate.getHours() > 0 ||
+                        self.config.maxDate.getMinutes() > 0 ||
+                        self.config.maxDate.getSeconds() > 0);
+            Object.defineProperty(self, "showTimeInput", {
+                get: function () { return self._showTimeInput; },
+                set: function (bool) {
+                    self._showTimeInput = bool;
+                    if (self.calendarContainer)
+                        toggleClass(self.calendarContainer, "showTimeInput", bool);
+                    self.isOpen && positionCalendar();
+                }
+            });
+        }
+        function setupInputs() {
+            self.input = self.config.wrap
+                ? element.querySelector("[data-input]")
+                : element;
+            /* istanbul ignore next */
+            if (!self.input) {
+                self.config.errorHandler(new Error("Invalid input element specified"));
+                return;
+            }
+            // hack: store previous type to restore it after destroy()
+            self.input._type = self.input.type;
+            self.input.type = "text";
+            self.input.classList.add("flatpickr-input");
+            self._input = self.input;
+            if (self.config.altInput) {
+                // replicate self.element
+                self.altInput = createElement(self.input.nodeName, self.config.altInputClass);
+                self._input = self.altInput;
+                self.altInput.placeholder = self.input.placeholder;
+                self.altInput.disabled = self.input.disabled;
+                self.altInput.required = self.input.required;
+                self.altInput.tabIndex = self.input.tabIndex;
+                self.altInput.type = "text";
+                self.input.setAttribute("type", "hidden");
+                if (!self.config.static && self.input.parentNode)
+                    self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);
+            }
+            if (!self.config.allowInput)
+                self._input.setAttribute("readonly", "readonly");
+            self._positionElement = self.config.positionElement || self._input;
+        }
+        function setupMobile() {
+            var inputType = self.config.enableTime
+                ? self.config.noCalendar
+                    ? "time"
+                    : "datetime-local"
+                : "date";
+            self.mobileInput = createElement("input", self.input.className + " flatpickr-mobile");
+            self.mobileInput.step = self.input.getAttribute("step") || "any";
+            self.mobileInput.tabIndex = 1;
+            self.mobileInput.type = inputType;
+            self.mobileInput.disabled = self.input.disabled;
+            self.mobileInput.required = self.input.required;
+            self.mobileInput.placeholder = self.input.placeholder;
+            self.mobileFormatStr =
+                inputType === "datetime-local"
+                    ? "Y-m-d\\TH:i:S"
+                    : inputType === "date"
+                        ? "Y-m-d"
+                        : "H:i:S";
+            if (self.selectedDates.length > 0) {
+                self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);
+            }
+            if (self.config.minDate)
+                self.mobileInput.min = self.formatDate(self.config.minDate, "Y-m-d");
+            if (self.config.maxDate)
+                self.mobileInput.max = self.formatDate(self.config.maxDate, "Y-m-d");
+            self.input.type = "hidden";
+            if (self.altInput !== undefined)
+                self.altInput.type = "hidden";
+            try {
+                if (self.input.parentNode)
+                    self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);
+            }
+            catch (_a) { }
+            bind(self.mobileInput, "change", function (e) {
+                self.setDate(e.target.value, false, self.mobileFormatStr);
+                triggerEvent("onChange");
+                triggerEvent("onClose");
+            });
+        }
+        function toggle(e) {
+            if (self.isOpen === true)
+                return self.close();
+            self.open(e);
+        }
+        function triggerEvent(event, data) {
+            // If the instance has been destroyed already, all hooks have been removed
+            if (self.config === undefined)
+                return;
+            var hooks = self.config[event];
+            if (hooks !== undefined && hooks.length > 0) {
+                for (var i = 0; hooks[i] && i < hooks.length; i++)
+                    hooks[i](self.selectedDates, self.input.value, self, data);
+            }
+            if (event === "onChange") {
+                self.input.dispatchEvent(createEvent("change"));
+                // many front-end frameworks bind to the input event
+                self.input.dispatchEvent(createEvent("input"));
+            }
+        }
+        function createEvent(name) {
+            var e = document.createEvent("Event");
+            e.initEvent(name, true, true);
+            return e;
+        }
+        function isDateSelected(date) {
+            for (var i = 0; i < self.selectedDates.length; i++) {
+                if (compareDates(self.selectedDates[i], date) === 0)
+                    return "" + i;
+            }
+            return false;
+        }
+        function isDateInRange(date) {
+            if (self.config.mode !== "range" || self.selectedDates.length < 2)
+                return false;
+            return (compareDates(date, self.selectedDates[0]) >= 0 &&
+                compareDates(date, self.selectedDates[1]) <= 0);
+        }
+        function updateNavigationCurrentMonth() {
+            if (self.config.noCalendar || self.isMobile || !self.monthNav)
+                return;
+            self.yearElements.forEach(function (yearElement, i) {
+                var d = new Date(self.currentYear, self.currentMonth, 1);
+                d.setMonth(self.currentMonth + i);
+                if (self.config.showMonths > 1 ||
+                    self.config.monthSelectorType === "static") {
+                    self.monthElements[i].textContent =
+                        monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + " ";
+                }
+                else {
+                    self.monthsDropdownContainer.value = d.getMonth().toString();
+                }
+                yearElement.value = d.getFullYear().toString();
+            });
+            self._hidePrevMonthArrow =
+                self.config.minDate !== undefined &&
+                    (self.currentYear === self.config.minDate.getFullYear()
+                        ? self.currentMonth <= self.config.minDate.getMonth()
+                        : self.currentYear < self.config.minDate.getFullYear());
+            self._hideNextMonthArrow =
+                self.config.maxDate !== undefined &&
+                    (self.currentYear === self.config.maxDate.getFullYear()
+                        ? self.currentMonth + 1 > self.config.maxDate.getMonth()
+                        : self.currentYear > self.config.maxDate.getFullYear());
+        }
+        function getDateStr(format) {
+            return self.selectedDates
+                .map(function (dObj) { return self.formatDate(dObj, format); })
+                .filter(function (d, i, arr) {
+                return self.config.mode !== "range" ||
+                    self.config.enableTime ||
+                    arr.indexOf(d) === i;
+            })
+                .join(self.config.mode !== "range"
+                ? self.config.conjunction
+                : self.l10n.rangeSeparator);
+        }
+        /**
+         * Updates the values of inputs associated with the calendar
+         */
+        function updateValue(triggerChange) {
+            if (triggerChange === void 0) { triggerChange = true; }
+            if (self.mobileInput !== undefined && self.mobileFormatStr) {
+                self.mobileInput.value =
+                    self.latestSelectedDateObj !== undefined
+                        ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)
+                        : "";
+            }
+            self.input.value = getDateStr(self.config.dateFormat);
+            if (self.altInput !== undefined) {
+                self.altInput.value = getDateStr(self.config.altFormat);
+            }
+            if (triggerChange !== false)
+                triggerEvent("onValueUpdate");
+        }
+        function onMonthNavClick(e) {
+            var isPrevMonth = self.prevMonthNav.contains(e.target);
+            var isNextMonth = self.nextMonthNav.contains(e.target);
+            if (isPrevMonth || isNextMonth) {
+                changeMonth(isPrevMonth ? -1 : 1);
+            }
+            else if (self.yearElements.indexOf(e.target) >= 0) {
+                e.target.select();
+            }
+            else if (e.target.classList.contains("arrowUp")) {
+                self.changeYear(self.currentYear + 1);
+            }
+            else if (e.target.classList.contains("arrowDown")) {
+                self.changeYear(self.currentYear - 1);
+            }
+        }
+        function timeWrapper(e) {
+            e.preventDefault();
+            var isKeyDown = e.type === "keydown", input = e.target;
+            if (self.amPM !== undefined && e.target === self.amPM) {
+                self.amPM.textContent =
+                    self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];
+            }
+            var min = parseFloat(input.getAttribute("min")), max = parseFloat(input.getAttribute("max")), step = parseFloat(input.getAttribute("step")), curValue = parseInt(input.value, 10), delta = e.delta ||
+                (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);
+            var newValue = curValue + step * delta;
+            if (typeof input.value !== "undefined" && input.value.length === 2) {
+                var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;
+                if (newValue < min) {
+                    newValue =
+                        max +
+                            newValue +
+                            int(!isHourElem) +
+                            (int(isHourElem) && int(!self.amPM));
+                    if (isMinuteElem)
+                        incrementNumInput(undefined, -1, self.hourElement);
+                }
+                else if (newValue > max) {
+                    newValue =
+                        input === self.hourElement ? newValue - max - int(!self.amPM) : min;
+                    if (isMinuteElem)
+                        incrementNumInput(undefined, 1, self.hourElement);
+                }
+                if (self.amPM &&
+                    isHourElem &&
+                    (step === 1
+                        ? newValue + curValue === 23
+                        : Math.abs(newValue - curValue) > step)) {
+                    self.amPM.textContent =
+                        self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];
+                }
+                input.value = pad(newValue);
+            }
+        }
+        init();
+        return self;
+    }
+    /* istanbul ignore next */
+    function _flatpickr(nodeList, config) {
+        // static list
+        var nodes = Array.prototype.slice
+            .call(nodeList)
+            .filter(function (x) { return x instanceof HTMLElement; });
+        var instances = [];
+        for (var i = 0; i < nodes.length; i++) {
+            var node = nodes[i];
+            try {
+                if (node.getAttribute("data-fp-omit") !== null)
+                    continue;
+                if (node._flatpickr !== undefined) {
+                    node._flatpickr.destroy();
+                    node._flatpickr = undefined;
+                }
+                node._flatpickr = FlatpickrInstance(node, config || {});
+                instances.push(node._flatpickr);
+            }
+            catch (e) {
+                console.error(e);
+            }
+        }
+        return instances.length === 1 ? instances[0] : instances;
+    }
+    /* istanbul ignore next */
+    if (typeof HTMLElement !== "undefined" &&
+        typeof HTMLCollection !== "undefined" &&
+        typeof NodeList !== "undefined") {
+        // browser env
+        HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {
+            return _flatpickr(this, config);
+        };
+        HTMLElement.prototype.flatpickr = function (config) {
+            return _flatpickr([this], config);
+        };
+    }
+    /* istanbul ignore next */
+    var flatpickr = function (selector, config) {
+        if (typeof selector === "string") {
+            return _flatpickr(window.document.querySelectorAll(selector), config);
+        }
+        else if (selector instanceof Node) {
+            return _flatpickr([selector], config);
+        }
+        else {
+            return _flatpickr(selector, config);
+        }
+    };
+    /* istanbul ignore next */
+    flatpickr.defaultConfig = {};
+    flatpickr.l10ns = {
+        en: __assign({}, english),
+        "default": __assign({}, english)
+    };
+    flatpickr.localize = function (l10n) {
+        flatpickr.l10ns["default"] = __assign({}, flatpickr.l10ns["default"], l10n);
+    };
+    flatpickr.setDefaults = function (config) {
+        flatpickr.defaultConfig = __assign({}, flatpickr.defaultConfig, config);
+    };
+    flatpickr.parseDate = createDateParser({});
+    flatpickr.formatDate = createDateFormatter({});
+    flatpickr.compareDates = compareDates;
+    /* istanbul ignore next */
+    if (typeof jQuery !== "undefined" && typeof jQuery.fn !== "undefined") {
+        jQuery.fn.flatpickr = function (config) {
+            return _flatpickr(this, config);
+        };
+    }
+    // eslint-disable-next-line @typescript-eslint/camelcase
+    Date.prototype.fp_incr = function (days) {
+        return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === "string" ? parseInt(days, 10) : days));
+    };
+    if (typeof window !== "undefined") {
+        window.flatpickr = flatpickr;
+    }
+
+    return flatpickr;
+
+}));
diff --git a/backoffice/vendors/flatpickr/flatpickr.min.css b/backoffice/vendors/flatpickr/flatpickr.min.css
new file mode 100644 (file)
index 0000000..46c57b7
--- /dev/null
@@ -0,0 +1,13 @@
+.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px);}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.rightMost:after{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*
+      /*rtl:begin:ignore*/left:0;/*
+      /*rtl:end:ignore*/}/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{/*
+      /*rtl:begin:ignore*/right:0;/*
+      /*rtl:end:ignore*/}/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9;}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px;}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto;}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%;}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box;}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0;}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%;}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto;}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05);}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0;}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block;}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto;}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px;}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px;}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9;}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left;}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left;}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}
\ No newline at end of file
diff --git a/backoffice/vendors/flatpickr/flatpickr.min.js b/backoffice/vendors/flatpickr/flatpickr.min.js
new file mode 100644 (file)
index 0000000..9418133
--- /dev/null
@@ -0,0 +1,2 @@
+/* flatpickr v4.6.2,, @license MIT */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).flatpickr=t()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},a={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},i=function(e){return("0"+e).slice(-2)},o=function(e){return!0===e?1:0};function r(e,t,n){var a;return void 0===n&&(n=!1),function(){var i=this,o=arguments;null!==a&&clearTimeout(a),a=window.setTimeout(function(){a=null,n||e.apply(i,o)},t),n&&!a&&e.apply(i,o)}}var l=function(e){return e instanceof Array?e:[e]};function c(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function d(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function s(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function u(e,t){var n=d("div","numInputWrapper"),a=d("input","numInput "+e),i=d("span","arrowUp"),o=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(i),n.appendChild(o),n}var f=function(){},m=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},g={D:f,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*o(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var a=parseInt(t),i=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:f,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:f,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},p={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},h={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[h.w(e,t,n)]},F:function(e,t,n){return m(h.n(e,t,n)-1,!1,t)},G:function(e,t,n){return i(h.h(e,t,n))},H:function(e){return i(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[o(e.getHours()>11)]},M:function(e,t){return m(e.getMonth(),!0,t)},S:function(e){return i(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return i(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return i(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return i(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},v=function(e){var t=e.config,i=void 0===t?n:t,o=e.l10n,r=void 0===o?a:o;return function(e,t,n){var a=n||r;return void 0!==i.formatDate?i.formatDate(e,t,a):t.split("").map(function(t,n,o){return h[t]&&"\\"!==o[n-1]?h[t](e,a,i):"\\"!==t?t:""}).join("")}},D=function(e){var t=e.config,i=void 0===t?n:t,o=e.l10n,r=void 0===o?a:o;return function(e,t,a,o){if(0===e||e){var l,c=o||r,d=e;if(e instanceof Date)l=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if("string"==typeof e){var s=t||(i||n).dateFormat,u=String(e).trim();if("today"===u)l=new Date,a=!0;else if(/Z$/.test(u)||/GMT$/.test(u))l=new Date(e);else if(i&&i.parseDate)l=i.parseDate(e,s);else{l=i&&i.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var f=void 0,m=[],h=0,v=0,D="";h<s.length;h++){var w=s[h],b="\\"===w,C="\\"===s[h-1]||b;if(p[w]&&!C){D+=p[w];var M=new RegExp(D).exec(e);M&&(f=!0)&&m["Y"!==w?"push":"unshift"]({fn:g[w],val:M[++v]})}else b||(D+=".");m.forEach(function(e){var t=e.fn,n=e.val;return l=t(l,n,c)||l})}l=f?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===a&&l.setHours(0,0,0,0),l;i.errorHandler(new Error("Invalid date provided: "+d))}}};function w(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var b=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},C={DAY:864e5};"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})},i=0,o=t;i<o.length;i++){a(o[i])}return e});var M=300;function y(f,g){var h={config:e({},n,E.defaultConfig),l10n:a};function y(e){return e.bind(h)}function x(){var e=h.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==h.calendarContainer&&(h.calendarContainer.style.visibility="hidden",h.calendarContainer.style.display="block"),void 0!==h.daysContainer){var t=(h.days.offsetWidth+1)*e.showMonths;h.daysContainer.style.width=t+"px",h.calendarContainer.style.width=t+(void 0!==h.weekWrapper?h.weekWrapper.offsetWidth:0)+"px",h.calendarContainer.style.removeProperty("visibility"),h.calendarContainer.style.removeProperty("display")}})}function T(e){0===h.selectedDates.length&&ie(),void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=e.target;void 0!==h.amPM&&e.target===h.amPM&&(h.amPM.textContent=h.l10n.amPM[o(h.amPM.textContent===h.l10n.amPM[0])]);var a=parseFloat(n.getAttribute("min")),r=parseFloat(n.getAttribute("max")),l=parseFloat(n.getAttribute("step")),c=parseInt(n.value,10),d=e.delta||(t?38===e.which?1:-1:0),s=c+l*d;if(void 0!==n.value&&2===n.value.length){var u=n===h.hourElement,f=n===h.minuteElement;s<a?(s=r+s+o(!u)+(o(u)&&o(!h.amPM)),f&&j(void 0,-1,h.hourElement)):s>r&&(s=n===h.hourElement?s-r-o(!h.amPM):a,f&&j(void 0,1,h.hourElement)),h.amPM&&u&&(1===l?s+c===23:Math.abs(s-c)>l)&&(h.amPM.textContent=h.l10n.amPM[o(h.amPM.textContent===h.l10n.amPM[0])]),n.value=i(s)}}(e);var t=h._input.value;k(),we(),h._input.value!==t&&h._debouncedChange()}function k(){if(void 0!==h.hourElement&&void 0!==h.minuteElement){var e,t,n=(parseInt(h.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(h.minuteElement.value,10)||0)%60,i=void 0!==h.secondElement?(parseInt(h.secondElement.value,10)||0)%60:0;void 0!==h.amPM&&(e=n,t=h.amPM.textContent,n=e%12+12*o(t===h.l10n.amPM[1]));var r=void 0!==h.config.minTime||h.config.minDate&&h.minDateHasTime&&h.latestSelectedDateObj&&0===w(h.latestSelectedDateObj,h.config.minDate,!0);if(void 0!==h.config.maxTime||h.config.maxDate&&h.maxDateHasTime&&h.latestSelectedDateObj&&0===w(h.latestSelectedDateObj,h.config.maxDate,!0)){var l=void 0!==h.config.maxTime?h.config.maxTime:h.config.maxDate;(n=Math.min(n,l.getHours()))===l.getHours()&&(a=Math.min(a,l.getMinutes())),a===l.getMinutes()&&(i=Math.min(i,l.getSeconds()))}if(r){var c=void 0!==h.config.minTime?h.config.minTime:h.config.minDate;(n=Math.max(n,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(i=Math.max(i,c.getSeconds()))}O(n,a,i)}}function I(e){var t=e||h.latestSelectedDateObj;t&&O(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=h.config.defaultHour,t=h.config.defaultMinute,n=h.config.defaultSeconds;if(void 0!==h.config.minDate){var a=h.config.minDate.getHours(),i=h.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(i,t)),e===a&&t===i&&(n=h.config.minDate.getSeconds())}if(void 0!==h.config.maxDate){var o=h.config.maxDate.getHours(),r=h.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(t=Math.min(r,t)),e===o&&t===r&&(n=h.config.maxDate.getSeconds())}O(e,t,n)}function O(e,t,n){void 0!==h.latestSelectedDateObj&&h.latestSelectedDateObj.setHours(e%24,t,n||0,0),h.hourElement&&h.minuteElement&&!h.isMobile&&(h.hourElement.value=i(h.config.time_24hr?e:(12+e)%12+12*o(e%12==0)),h.minuteElement.value=i(t),void 0!==h.amPM&&(h.amPM.textContent=h.l10n.amPM[o(e>=12)]),void 0!==h.secondElement&&(h.secondElement.value=i(n)))}function _(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&Q(t)}function F(e,t,n,a){return t instanceof Array?t.forEach(function(t){return F(e,t,n,a)}):e instanceof Array?e.forEach(function(e){return F(e,t,n,a)}):(e.addEventListener(t,n,a),void h._handlers.push({element:e,event:t,handler:n,options:a}))}function N(e){return function(t){1===t.which&&e(t)}}function Y(){ge("onChange")}function A(e,t){var n=void 0!==e?h.parseDate(e):h.latestSelectedDateObj||(h.config.minDate&&h.config.minDate>h.now?h.config.minDate:h.config.maxDate&&h.config.maxDate<h.now?h.config.maxDate:h.now),a=h.currentYear,i=h.currentMonth;try{void 0!==n&&(h.currentYear=n.getFullYear(),h.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,h.config.errorHandler(e)}t&&h.currentYear!==a&&(ge("onYearChange"),K()),!t||h.currentYear===a&&h.currentMonth===i||ge("onMonthChange"),h.redraw()}function P(e){~e.target.className.indexOf("arrow")&&j(e,e.target.classList.contains("arrowUp")?1:-1)}function j(e,t,n){var a=e&&e.target,i=n||a&&a.parentNode&&a.parentNode.firstChild,o=pe("increment");o.delta=t,i&&i.dispatchEvent(o)}function H(e,t,n,a){var i=X(t,!0),o=d("span","flatpickr-day "+e,t.getDate().toString());return o.dateObj=t,o.$i=a,o.setAttribute("aria-label",h.formatDate(t,h.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===w(t,h.now)&&(h.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),i?(o.tabIndex=-1,he(t)&&(o.classList.add("selected"),h.selectedDateElem=o,"range"===h.config.mode&&(c(o,"startRange",h.selectedDates[0]&&0===w(t,h.selectedDates[0],!0)),c(o,"endRange",h.selectedDates[1]&&0===w(t,h.selectedDates[1],!0)),"nextMonthDay"===e&&o.classList.add("inRange")))):o.classList.add("flatpickr-disabled"),"range"===h.config.mode&&function(e){return!("range"!==h.config.mode||h.selectedDates.length<2)&&w(e,h.selectedDates[0])>=0&&w(e,h.selectedDates[1])<=0}(t)&&!he(t)&&o.classList.add("inRange"),h.weekNumbers&&1===h.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&h.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+h.config.getWeek(t)+"</span>"),ge("onDayCreate",o),o}function L(e){e.focus(),"range"===h.config.mode&&ne(e)}function W(e){for(var t=e>0?0:h.config.showMonths-1,n=e>0?h.config.showMonths:-1,a=t;a!=n;a+=e)for(var i=h.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf("hidden")&&X(c.dateObj))return c}}function R(e,t){var n=ee(document.activeElement||document.body),a=void 0!==e?e:n?document.activeElement:void 0!==h.selectedDateElem&&ee(h.selectedDateElem)?h.selectedDateElem:void 0!==h.todayDateElem&&ee(h.todayDateElem)?h.todayDateElem:W(t>0?1:-1);return void 0===a?h._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():h.currentMonth,a=t>0?h.config.showMonths:-1,i=t>0?1:-1,o=n-h.currentMonth;o!=a;o+=i)for(var r=h.daysContainer.children[o],l=n-h.currentMonth===o?e.$i+t:t<0?r.children.length-1:0,c=r.children.length,d=l;d>=0&&d<c&&d!=(t>0?c:-1);d+=i){var s=r.children[d];if(-1===s.className.indexOf("hidden")&&X(s.dateObj)&&Math.abs(e.$i-d)>=Math.abs(t))return L(s)}h.changeMonth(i),R(W(i),0)}(a,t):L(a)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-h.l10n.firstDayOfWeek+7)%7,a=h.utils.getDaysInMonth((t-1+12)%12),i=h.utils.getDaysInMonth(t),o=window.document.createDocumentFragment(),r=h.config.showMonths>1,l=r?"prevMonthDay hidden":"prevMonthDay",c=r?"nextMonthDay hidden":"nextMonthDay",s=a+1-n,u=0;s<=a;s++,u++)o.appendChild(H(l,new Date(e,t-1,s),s,u));for(s=1;s<=i;s++,u++)o.appendChild(H("",new Date(e,t,s),s,u));for(var f=i+1;f<=42-n&&(1===h.config.showMonths||u%7!=0);f++,u++)o.appendChild(H(c,new Date(e,t+1,f%i),f,u));var m=d("div","dayContainer");return m.appendChild(o),m}function J(){if(void 0!==h.daysContainer){s(h.daysContainer),h.weekNumbers&&s(h.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<h.config.showMonths;t++){var n=new Date(h.currentYear,h.currentMonth,1);n.setMonth(h.currentMonth+t),e.appendChild(B(n.getFullYear(),n.getMonth()))}h.daysContainer.appendChild(e),h.days=h.daysContainer.firstChild,"range"===h.config.mode&&1===h.selectedDates.length&&ne()}}function K(){if(!(h.config.showMonths>1||"dropdown"!==h.config.monthSelectorType)){var e=function(e){return!(void 0!==h.config.minDate&&h.currentYear===h.config.minDate.getFullYear()&&e<h.config.minDate.getMonth())&&!(void 0!==h.config.maxDate&&h.currentYear===h.config.maxDate.getFullYear()&&e>h.config.maxDate.getMonth())};h.monthsDropdownContainer.tabIndex=-1,h.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=d("option","flatpickr-monthDropdown-month");n.value=new Date(h.currentYear,t).getMonth().toString(),n.textContent=m(t,h.config.shorthandCurrentMonth,h.l10n),n.tabIndex=-1,h.currentMonth===t&&(n.selected=!0),h.monthsDropdownContainer.appendChild(n)}}}function U(){var e,t=d("div","flatpickr-month"),n=window.document.createDocumentFragment();h.config.showMonths>1||"static"===h.config.monthSelectorType?e=d("span","cur-month"):(h.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),F(h.monthsDropdownContainer,"change",function(e){var t=e.target,n=parseInt(t.value,10);h.changeMonth(n-h.currentMonth),ge("onMonthChange")}),K(),e=h.monthsDropdownContainer);var a=u("cur-year",{tabindex:"-1"}),i=a.getElementsByTagName("input")[0];i.setAttribute("aria-label",h.l10n.yearAriaLabel),h.config.minDate&&i.setAttribute("min",h.config.minDate.getFullYear().toString()),h.config.maxDate&&(i.setAttribute("max",h.config.maxDate.getFullYear().toString()),i.disabled=!!h.config.minDate&&h.config.minDate.getFullYear()===h.config.maxDate.getFullYear());var o=d("div","flatpickr-current-month");return o.appendChild(e),o.appendChild(a),n.appendChild(o),t.appendChild(n),{container:t,yearElement:i,monthElement:e}}function q(){s(h.monthNav),h.monthNav.appendChild(h.prevMonthNav),h.config.showMonths&&(h.yearElements=[],h.monthElements=[]);for(var e=h.config.showMonths;e--;){var t=U();h.yearElements.push(t.yearElement),h.monthElements.push(t.monthElement),h.monthNav.appendChild(t.container)}h.monthNav.appendChild(h.nextMonthNav)}function $(){h.weekdayContainer?s(h.weekdayContainer):h.weekdayContainer=d("div","flatpickr-weekdays");for(var e=h.config.showMonths;e--;){var t=d("div","flatpickr-weekdaycontainer");h.weekdayContainer.appendChild(t)}return z(),h.weekdayContainer}function z(){var e=h.l10n.firstDayOfWeek,t=h.l10n.weekdays.shorthand.slice();e>0&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e)));for(var n=h.config.showMonths;n--;)h.weekdayContainer.children[n].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+t.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}function G(e,t){void 0===t&&(t=!0);var n=t?e:e-h.currentMonth;n<0&&!0===h._hidePrevMonthArrow||n>0&&!0===h._hideNextMonthArrow||(h.currentMonth+=n,(h.currentMonth<0||h.currentMonth>11)&&(h.currentYear+=h.currentMonth>11?1:-1,h.currentMonth=(h.currentMonth+12)%12,ge("onYearChange"),K()),J(),ge("onMonthChange"),ve())}function V(e){return!(!h.config.appendTo||!h.config.appendTo.contains(e))||h.calendarContainer.contains(e)}function Z(e){if(h.isOpen&&!h.config.inline){var t="function"==typeof(r=e).composedPath?r.composedPath()[0]:r.target,n=V(t),a=t===h.input||t===h.altInput||h.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(h.input)||~e.path.indexOf(h.altInput)),i="blur"===e.type?a&&e.relatedTarget&&!V(e.relatedTarget):!a&&!n&&!V(e.relatedTarget),o=!h.config.ignoredFocusElements.some(function(e){return e.contains(t)});i&&o&&(h.close(),"range"===h.config.mode&&1===h.selectedDates.length&&(h.clear(!1),h.redraw()))}var r}function Q(e){if(!(!e||h.config.minDate&&e<h.config.minDate.getFullYear()||h.config.maxDate&&e>h.config.maxDate.getFullYear())){var t=e,n=h.currentYear!==t;h.currentYear=t||h.currentYear,h.config.maxDate&&h.currentYear===h.config.maxDate.getFullYear()?h.currentMonth=Math.min(h.config.maxDate.getMonth(),h.currentMonth):h.config.minDate&&h.currentYear===h.config.minDate.getFullYear()&&(h.currentMonth=Math.max(h.config.minDate.getMonth(),h.currentMonth)),n&&(h.redraw(),ge("onYearChange"),K())}}function X(e,t){void 0===t&&(t=!0);var n=h.parseDate(e,void 0,t);if(h.config.minDate&&n&&w(n,h.config.minDate,void 0!==t?t:!h.minDateHasTime)<0||h.config.maxDate&&n&&w(n,h.config.maxDate,void 0!==t?t:!h.maxDateHasTime)>0)return!1;if(0===h.config.enable.length&&0===h.config.disable.length)return!0;if(void 0===n)return!1;for(var a=h.config.enable.length>0,i=a?h.config.enable:h.config.disable,o=0,r=void 0;o<i.length;o++){if("function"==typeof(r=i[o])&&r(n))return a;if(r instanceof Date&&void 0!==n&&r.getTime()===n.getTime())return a;if("string"==typeof r&&void 0!==n){var l=h.parseDate(r,void 0,!0);return l&&l.getTime()===n.getTime()?a:!a}if("object"==typeof r&&void 0!==n&&r.from&&r.to&&n.getTime()>=r.from.getTime()&&n.getTime()<=r.to.getTime())return a}return!a}function ee(e){return void 0!==h.daysContainer&&(-1===e.className.indexOf("hidden")&&h.daysContainer.contains(e))}function te(e){var t=e.target===h._input,n=h.config.allowInput,a=h.isOpen&&(!n||!t),i=h.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return h.setDate(h._input.value,!0,e.target===h.altInput?h.config.altFormat:h.config.dateFormat),e.target.blur();h.open()}else if(V(e.target)||a||i){var o=!!h.timeContainer&&h.timeContainer.contains(e.target);switch(e.keyCode){case 13:o?(e.preventDefault(),T(),de()):se(e);break;case 27:e.preventDefault(),de();break;case 8:case 46:t&&!h.config.allowInput&&(e.preventDefault(),h.clear());break;case 37:case 39:if(o||t)h.hourElement&&h.hourElement.focus();else if(e.preventDefault(),void 0!==h.daysContainer&&(!1===n||document.activeElement&&ee(document.activeElement))){var r=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),G(r),R(W(1),0)):R(void 0,r)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;h.daysContainer&&void 0!==e.target.$i||e.target===h.input?e.ctrlKey?(e.stopPropagation(),Q(h.currentYear-l),R(W(1),0)):o||R(void 0,7*l):e.target===h.currentYearElement?Q(h.currentYear-l):h.config.enableTime&&(!o&&h.hourElement&&h.hourElement.focus(),T(e),h._debouncedChange());break;case 9:if(o){var c=[h.hourElement,h.minuteElement,h.secondElement,h.amPM].concat(h.pluginElements).filter(function(e){return e}),d=c.indexOf(e.target);if(-1!==d){var s=c[d+(e.shiftKey?-1:1)];e.preventDefault(),(s||h._input).focus()}}else!h.config.noCalendar&&h.daysContainer&&h.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),h._input.focus())}}if(void 0!==h.amPM&&e.target===h.amPM)switch(e.key){case h.l10n.amPM[0].charAt(0):case h.l10n.amPM[0].charAt(0).toLowerCase():h.amPM.textContent=h.l10n.amPM[0],k(),we();break;case h.l10n.amPM[1].charAt(0):case h.l10n.amPM[1].charAt(0).toLowerCase():h.amPM.textContent=h.l10n.amPM[1],k(),we()}(t||V(e.target))&&ge("onKeyDown",e)}function ne(e){if(1===h.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():h.days.firstElementChild.dateObj.getTime(),n=h.parseDate(h.selectedDates[0],void 0,!0).getTime(),a=Math.min(t,h.selectedDates[0].getTime()),i=Math.max(t,h.selectedDates[0].getTime()),o=!1,r=0,l=0,c=a;c<i;c+=C.DAY)X(new Date(c),!0)||(o=o||c>a&&c<i,c<n&&(!r||c>r)?r=c:c>n&&(!l||c<l)&&(l=c));for(var d=0;d<h.config.showMonths;d++)for(var s=h.daysContainer.children[d],u=function(a,i){var c=s.children[a],d=c.dateObj.getTime(),u=r>0&&d<r||l>0&&d>l;return u?(c.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){c.classList.remove(e)}),"continue"):o&&!u?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){c.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t<=h.selectedDates[0].getTime()?"startRange":"endRange"),n<t&&d===n?c.classList.add("startRange"):n>t&&d===n&&c.classList.add("endRange"),d>=r&&(0===l||d<=l)&&b(d,n,t)&&c.classList.add("inRange"))))},f=0,m=s.children.length;f<m;f++)u(f)}}function ae(){!h.isOpen||h.config.static||h.config.inline||le()}function ie(){h.setDate(void 0!==h.config.minDate?new Date(h.config.minDate.getTime()):new Date,!0),S(),we()}function oe(e){return function(t){var n=h.config["_"+e+"Date"]=h.parseDate(t,h.config.dateFormat),a=h.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(h["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),h.selectedDates&&(h.selectedDates=h.selectedDates.filter(function(e){return X(e)}),h.selectedDates.length||"min"!==e||I(n),we()),h.daysContainer&&(ce(),void 0!==n?h.currentYearElement[e]=n.getFullYear().toString():h.currentYearElement.removeAttribute(e),h.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof h.config.locale&&void 0===E.l10ns[h.config.locale]&&h.config.errorHandler(new Error("flatpickr: invalid locale "+h.config.locale)),h.l10n=e({},E.l10ns.default,"object"==typeof h.config.locale?h.config.locale:"default"!==h.config.locale?E.l10ns[h.config.locale]:void 0),p.K="("+h.l10n.amPM[0]+"|"+h.l10n.amPM[1]+"|"+h.l10n.amPM[0].toLowerCase()+"|"+h.l10n.amPM[1].toLowerCase()+")",void 0===e({},g,JSON.parse(JSON.stringify(f.dataset||{}))).time_24hr&&void 0===E.defaultConfig.time_24hr&&(h.config.time_24hr=h.l10n.time_24hr),h.formatDate=v(h),h.parseDate=D({config:h.config,l10n:h.l10n})}function le(e){if(void 0!==h.calendarContainer){ge("onPreCalendarPosition");var t=e||h._positionElement,n=Array.prototype.reduce.call(h.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),a=h.calendarContainer.offsetWidth,i=h.config.position.split(" "),o=i[0],r=i.length>1?i[1]:null,l=t.getBoundingClientRect(),d=window.innerHeight-l.bottom,s="above"===o||"below"!==o&&d<n&&l.top>n,u=window.pageYOffset+l.top+(s?-n-2:t.offsetHeight+2);if(c(h.calendarContainer,"arrowTop",!s),c(h.calendarContainer,"arrowBottom",s),!h.config.inline){var f=window.pageXOffset+l.left-(null!=r&&"center"===r?(a-l.width)/2:0),m=window.document.body.offsetWidth-l.right,g=f+a>window.document.body.offsetWidth,p=m+a>window.document.body.offsetWidth;if(c(h.calendarContainer,"rightMost",g),!h.config.static)if(h.calendarContainer.style.top=u+"px",g)if(p){var v=document.styleSheets[0];if(void 0===v)return;var D=window.document.body.offsetWidth,w=Math.max(0,D/2-a/2),b=v.cssRules.length,C="{left:"+l.left+"px;right:auto;}";c(h.calendarContainer,"rightMost",!1),c(h.calendarContainer,"centerMost",!0),v.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+C,b),h.calendarContainer.style.left=w+"px",h.calendarContainer.style.right="auto"}else h.calendarContainer.style.left="auto",h.calendarContainer.style.right=m+"px";else h.calendarContainer.style.left=f+"px",h.calendarContainer.style.right="auto"}}}function ce(){h.config.noCalendar||h.isMobile||(ve(),J())}function de(){h._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(h.close,0):h.close()}function se(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,a=h.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(a.getMonth()<h.currentMonth||a.getMonth()>h.currentMonth+h.config.showMonths-1)&&"range"!==h.config.mode;if(h.selectedDateElem=n,"single"===h.config.mode)h.selectedDates=[a];else if("multiple"===h.config.mode){var o=he(a);o?h.selectedDates.splice(parseInt(o),1):h.selectedDates.push(a)}else"range"===h.config.mode&&(2===h.selectedDates.length&&h.clear(!1,!1),h.latestSelectedDateObj=a,h.selectedDates.push(a),0!==w(a,h.selectedDates[0],!0)&&h.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(k(),i){var r=h.currentYear!==a.getFullYear();h.currentYear=a.getFullYear(),h.currentMonth=a.getMonth(),r&&(ge("onYearChange"),K()),ge("onMonthChange")}if(ve(),J(),we(),h.config.enableTime&&setTimeout(function(){return h.showTimeInput=!0},50),i||"range"===h.config.mode||1!==h.config.showMonths?void 0!==h.selectedDateElem&&void 0===h.hourElement&&h.selectedDateElem&&h.selectedDateElem.focus():L(n),void 0!==h.hourElement&&void 0!==h.hourElement&&h.hourElement.focus(),h.config.closeOnSelect){var l="single"===h.config.mode&&!h.config.enableTime,c="range"===h.config.mode&&2===h.selectedDates.length&&!h.config.enableTime;(l||c)&&de()}Y()}}h.parseDate=D({config:h.config,l10n:h.l10n}),h._handlers=[],h.pluginElements=[],h.loadedPlugins=[],h._bind=F,h._setHoursFromDate=I,h._positionCalendar=le,h.changeMonth=G,h.changeYear=Q,h.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);h.input.value="",void 0!==h.altInput&&(h.altInput.value="");void 0!==h.mobileInput&&(h.mobileInput.value="");h.selectedDates=[],h.latestSelectedDateObj=void 0,!0===t&&(h.currentYear=h._initialDate.getFullYear(),h.currentMonth=h._initialDate.getMonth());h.showTimeInput=!1,!0===h.config.enableTime&&S();h.redraw(),e&&ge("onChange")},h.close=function(){h.isOpen=!1,h.isMobile||(void 0!==h.calendarContainer&&h.calendarContainer.classList.remove("open"),void 0!==h._input&&h._input.classList.remove("active"));ge("onClose")},h._createElement=d,h.destroy=function(){void 0!==h.config&&ge("onDestroy");for(var e=h._handlers.length;e--;){var t=h._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(h._handlers=[],h.mobileInput)h.mobileInput.parentNode&&h.mobileInput.parentNode.removeChild(h.mobileInput),h.mobileInput=void 0;else if(h.calendarContainer&&h.calendarContainer.parentNode)if(h.config.static&&h.calendarContainer.parentNode){var n=h.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else h.calendarContainer.parentNode.removeChild(h.calendarContainer);h.altInput&&(h.input.type="text",h.altInput.parentNode&&h.altInput.parentNode.removeChild(h.altInput),delete h.altInput);h.input&&(h.input.type=h.input._type,h.input.classList.remove("flatpickr-input"),h.input.removeAttribute("readonly"),h.input.value="");["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete h[e]}catch(e){}})},h.isEnabled=X,h.jumpToDate=A,h.open=function(e,t){void 0===t&&(t=h._positionElement);if(!0===h.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==h.mobileInput&&(h.mobileInput.focus(),h.mobileInput.click()),void ge("onOpen");if(h._input.disabled||h.config.inline)return;var n=h.isOpen;h.isOpen=!0,n||(h.calendarContainer.classList.add("open"),h._input.classList.add("active"),ge("onOpen"),le(t));!0===h.config.enableTime&&!0===h.config.noCalendar&&(0===h.selectedDates.length&&ie(),!1!==h.config.allowInput||void 0!==e&&h.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return h.hourElement.select()},50))},h.redraw=ce,h.set=function(e,n){if(null!==e&&"object"==typeof e)for(var a in Object.assign(h.config,e),e)void 0!==ue[a]&&ue[a].forEach(function(e){return e()});else h.config[e]=n,void 0!==ue[e]?ue[e].forEach(function(e){return e()}):t.indexOf(e)>-1&&(h.config[e]=l(n));h.redraw(),we(!1)},h.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=h.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return h.clear(t);fe(e,n),h.showTimeInput=h.selectedDates.length>0,h.latestSelectedDateObj=h.selectedDates[h.selectedDates.length-1],h.redraw(),A(),I(),0===h.selectedDates.length&&h.clear(!1);we(t),t&&ge("onChange")},h.toggle=function(e){if(!0===h.isOpen)return h.close();h.open(e)};var ue={locale:[re,z],showMonths:[q,x,$],minDate:[A],maxDate:[A]};function fe(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return h.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[h.parseDate(e,t)];else if("string"==typeof e)switch(h.config.mode){case"single":case"time":n=[h.parseDate(e,t)];break;case"multiple":n=e.split(h.config.conjunction).map(function(e){return h.parseDate(e,t)});break;case"range":n=e.split(h.l10n.rangeSeparator).map(function(e){return h.parseDate(e,t)})}else h.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));h.selectedDates=n.filter(function(e){return e instanceof Date&&X(e,!1)}),"range"===h.config.mode&&h.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function me(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?h.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:h.parseDate(e.from,void 0),to:h.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function ge(e,t){if(void 0!==h.config){var n=h.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a<n.length;a++)n[a](h.selectedDates,h.input.value,h,t);"onChange"===e&&(h.input.dispatchEvent(pe("change")),h.input.dispatchEvent(pe("input")))}}function pe(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function he(e){for(var t=0;t<h.selectedDates.length;t++)if(0===w(h.selectedDates[t],e))return""+t;return!1}function ve(){h.config.noCalendar||h.isMobile||!h.monthNav||(h.yearElements.forEach(function(e,t){var n=new Date(h.currentYear,h.currentMonth,1);n.setMonth(h.currentMonth+t),h.config.showMonths>1||"static"===h.config.monthSelectorType?h.monthElements[t].textContent=m(n.getMonth(),h.config.shorthandCurrentMonth,h.l10n)+" ":h.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()}),h._hidePrevMonthArrow=void 0!==h.config.minDate&&(h.currentYear===h.config.minDate.getFullYear()?h.currentMonth<=h.config.minDate.getMonth():h.currentYear<h.config.minDate.getFullYear()),h._hideNextMonthArrow=void 0!==h.config.maxDate&&(h.currentYear===h.config.maxDate.getFullYear()?h.currentMonth+1>h.config.maxDate.getMonth():h.currentYear>h.config.maxDate.getFullYear()))}function De(e){return h.selectedDates.map(function(t){return h.formatDate(t,e)}).filter(function(e,t,n){return"range"!==h.config.mode||h.config.enableTime||n.indexOf(e)===t}).join("range"!==h.config.mode?h.config.conjunction:h.l10n.rangeSeparator)}function we(e){void 0===e&&(e=!0),void 0!==h.mobileInput&&h.mobileFormatStr&&(h.mobileInput.value=void 0!==h.latestSelectedDateObj?h.formatDate(h.latestSelectedDateObj,h.mobileFormatStr):""),h.input.value=De(h.config.dateFormat),void 0!==h.altInput&&(h.altInput.value=De(h.config.altFormat)),!1!==e&&ge("onValueUpdate")}function be(e){var t=h.prevMonthNav.contains(e.target),n=h.nextMonthNav.contains(e.target);t||n?G(t?-1:1):h.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?h.changeYear(h.currentYear+1):e.target.classList.contains("arrowDown")&&h.changeYear(h.currentYear-1)}return function(){h.element=h.input=f,h.isOpen=!1,function(){var a=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],i=e({},g,JSON.parse(JSON.stringify(f.dataset||{}))),o={};h.config.parseDate=i.parseDate,h.config.formatDate=i.formatDate,Object.defineProperty(h.config,"enable",{get:function(){return h.config._enable},set:function(e){h.config._enable=me(e)}}),Object.defineProperty(h.config,"disable",{get:function(){return h.config._disable},set:function(e){h.config._disable=me(e)}});var r="time"===i.mode;if(!i.dateFormat&&(i.enableTime||r)){var c=E.defaultConfig.dateFormat||n.dateFormat;o.dateFormat=i.noCalendar||r?"H:i"+(i.enableSeconds?":S":""):c+" H:i"+(i.enableSeconds?":S":"")}if(i.altInput&&(i.enableTime||r)&&!i.altFormat){var d=E.defaultConfig.altFormat||n.altFormat;o.altFormat=i.noCalendar||r?"h:i"+(i.enableSeconds?":S K":" K"):d+" h:i"+(i.enableSeconds?":S":"")+" K"}i.altInputClass||(h.config.altInputClass=h.input.className+" "+h.config.altInputClass),Object.defineProperty(h.config,"minDate",{get:function(){return h.config._minDate},set:oe("min")}),Object.defineProperty(h.config,"maxDate",{get:function(){return h.config._maxDate},set:oe("max")});var s=function(e){return function(t){h.config["min"===e?"_minTime":"_maxTime"]=h.parseDate(t,"H:i")}};Object.defineProperty(h.config,"minTime",{get:function(){return h.config._minTime},set:s("min")}),Object.defineProperty(h.config,"maxTime",{get:function(){return h.config._maxTime},set:s("max")}),"time"===i.mode&&(h.config.noCalendar=!0,h.config.enableTime=!0),Object.assign(h.config,o,i);for(var u=0;u<a.length;u++)h.config[a[u]]=!0===h.config[a[u]]||"true"===h.config[a[u]];t.filter(function(e){return void 0!==h.config[e]}).forEach(function(e){h.config[e]=l(h.config[e]||[]).map(y)}),h.isMobile=!h.config.disableMobile&&!h.config.inline&&"single"===h.config.mode&&!h.config.disable.length&&!h.config.enable.length&&!h.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var u=0;u<h.config.plugins.length;u++){var m=h.config.plugins[u](h)||{};for(var p in m)t.indexOf(p)>-1?h.config[p]=l(m[p]).map(y).concat(h.config[p]):void 0===i[p]&&(h.config[p]=m[p])}ge("onParseConfig")}(),re(),h.input=h.config.wrap?f.querySelector("[data-input]"):f,h.input?(h.input._type=h.input.type,h.input.type="text",h.input.classList.add("flatpickr-input"),h._input=h.input,h.config.altInput&&(h.altInput=d(h.input.nodeName,h.config.altInputClass),h._input=h.altInput,h.altInput.placeholder=h.input.placeholder,h.altInput.disabled=h.input.disabled,h.altInput.required=h.input.required,h.altInput.tabIndex=h.input.tabIndex,h.altInput.type="text",h.input.setAttribute("type","hidden"),!h.config.static&&h.input.parentNode&&h.input.parentNode.insertBefore(h.altInput,h.input.nextSibling)),h.config.allowInput||h._input.setAttribute("readonly","readonly"),h._positionElement=h.config.positionElement||h._input):h.config.errorHandler(new Error("Invalid input element specified")),function(){h.selectedDates=[],h.now=h.parseDate(h.config.now)||new Date;var e=h.config.defaultDate||("INPUT"!==h.input.nodeName&&"TEXTAREA"!==h.input.nodeName||!h.input.placeholder||h.input.value!==h.input.placeholder?h.input.value:null);e&&fe(e,h.config.dateFormat),h._initialDate=h.selectedDates.length>0?h.selectedDates[0]:h.config.minDate&&h.config.minDate.getTime()>h.now.getTime()?h.config.minDate:h.config.maxDate&&h.config.maxDate.getTime()<h.now.getTime()?h.config.maxDate:h.now,h.currentYear=h._initialDate.getFullYear(),h.currentMonth=h._initialDate.getMonth(),h.selectedDates.length>0&&(h.latestSelectedDateObj=h.selectedDates[0]),void 0!==h.config.minTime&&(h.config.minTime=h.parseDate(h.config.minTime,"H:i")),void 0!==h.config.maxTime&&(h.config.maxTime=h.parseDate(h.config.maxTime,"H:i")),h.minDateHasTime=!!h.config.minDate&&(h.config.minDate.getHours()>0||h.config.minDate.getMinutes()>0||h.config.minDate.getSeconds()>0),h.maxDateHasTime=!!h.config.maxDate&&(h.config.maxDate.getHours()>0||h.config.maxDate.getMinutes()>0||h.config.maxDate.getSeconds()>0),Object.defineProperty(h,"showTimeInput",{get:function(){return h._showTimeInput},set:function(e){h._showTimeInput=e,h.calendarContainer&&c(h.calendarContainer,"showTimeInput",e),h.isOpen&&le()}})}(),h.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=h.currentMonth),void 0===t&&(t=h.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:h.l10n.daysInMonth[e]}},h.isMobile||function(){var e=window.document.createDocumentFragment();if(h.calendarContainer=d("div","flatpickr-calendar"),h.calendarContainer.tabIndex=-1,!h.config.noCalendar){if(e.appendChild((h.monthNav=d("div","flatpickr-months"),h.yearElements=[],h.monthElements=[],h.prevMonthNav=d("span","flatpickr-prev-month"),h.prevMonthNav.innerHTML=h.config.prevArrow,h.nextMonthNav=d("span","flatpickr-next-month"),h.nextMonthNav.innerHTML=h.config.nextArrow,q(),Object.defineProperty(h,"_hidePrevMonthArrow",{get:function(){return h.__hidePrevMonthArrow},set:function(e){h.__hidePrevMonthArrow!==e&&(c(h.prevMonthNav,"flatpickr-disabled",e),h.__hidePrevMonthArrow=e)}}),Object.defineProperty(h,"_hideNextMonthArrow",{get:function(){return h.__hideNextMonthArrow},set:function(e){h.__hideNextMonthArrow!==e&&(c(h.nextMonthNav,"flatpickr-disabled",e),h.__hideNextMonthArrow=e)}}),h.currentYearElement=h.yearElements[0],ve(),h.monthNav)),h.innerContainer=d("div","flatpickr-innerContainer"),h.config.weekNumbers){var t=function(){h.calendarContainer.classList.add("hasWeeks");var e=d("div","flatpickr-weekwrapper");e.appendChild(d("span","flatpickr-weekday",h.l10n.weekAbbreviation));var t=d("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;h.innerContainer.appendChild(n),h.weekNumbers=a,h.weekWrapper=n}h.rContainer=d("div","flatpickr-rContainer"),h.rContainer.appendChild($()),h.daysContainer||(h.daysContainer=d("div","flatpickr-days"),h.daysContainer.tabIndex=-1),J(),h.rContainer.appendChild(h.daysContainer),h.innerContainer.appendChild(h.rContainer),e.appendChild(h.innerContainer)}h.config.enableTime&&e.appendChild(function(){h.calendarContainer.classList.add("hasTime"),h.config.noCalendar&&h.calendarContainer.classList.add("noCalendar"),h.timeContainer=d("div","flatpickr-time"),h.timeContainer.tabIndex=-1;var e=d("span","flatpickr-time-separator",":"),t=u("flatpickr-hour",{"aria-label":h.l10n.hourAriaLabel});h.hourElement=t.getElementsByTagName("input")[0];var n=u("flatpickr-minute",{"aria-label":h.l10n.minuteAriaLabel});if(h.minuteElement=n.getElementsByTagName("input")[0],h.hourElement.tabIndex=h.minuteElement.tabIndex=-1,h.hourElement.value=i(h.latestSelectedDateObj?h.latestSelectedDateObj.getHours():h.config.time_24hr?h.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(h.config.defaultHour)),h.minuteElement.value=i(h.latestSelectedDateObj?h.latestSelectedDateObj.getMinutes():h.config.defaultMinute),h.hourElement.setAttribute("step",h.config.hourIncrement.toString()),h.minuteElement.setAttribute("step",h.config.minuteIncrement.toString()),h.hourElement.setAttribute("min",h.config.time_24hr?"0":"1"),h.hourElement.setAttribute("max",h.config.time_24hr?"23":"12"),h.minuteElement.setAttribute("min","0"),h.minuteElement.setAttribute("max","59"),h.timeContainer.appendChild(t),h.timeContainer.appendChild(e),h.timeContainer.appendChild(n),h.config.time_24hr&&h.timeContainer.classList.add("time24hr"),h.config.enableSeconds){h.timeContainer.classList.add("hasSeconds");var a=u("flatpickr-second");h.secondElement=a.getElementsByTagName("input")[0],h.secondElement.value=i(h.latestSelectedDateObj?h.latestSelectedDateObj.getSeconds():h.config.defaultSeconds),h.secondElement.setAttribute("step",h.minuteElement.getAttribute("step")),h.secondElement.setAttribute("min","0"),h.secondElement.setAttribute("max","59"),h.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),h.timeContainer.appendChild(a)}return h.config.time_24hr||(h.amPM=d("span","flatpickr-am-pm",h.l10n.amPM[o((h.latestSelectedDateObj?h.hourElement.value:h.config.defaultHour)>11)]),h.amPM.title=h.l10n.toggleTitle,h.amPM.tabIndex=-1,h.timeContainer.appendChild(h.amPM)),h.timeContainer}()),c(h.calendarContainer,"rangeMode","range"===h.config.mode),c(h.calendarContainer,"animate",!0===h.config.animate),c(h.calendarContainer,"multiMonth",h.config.showMonths>1),h.calendarContainer.appendChild(e);var r=void 0!==h.config.appendTo&&void 0!==h.config.appendTo.nodeType;if((h.config.inline||h.config.static)&&(h.calendarContainer.classList.add(h.config.inline?"inline":"static"),h.config.inline&&(!r&&h.element.parentNode?h.element.parentNode.insertBefore(h.calendarContainer,h._input.nextSibling):void 0!==h.config.appendTo&&h.config.appendTo.appendChild(h.calendarContainer)),h.config.static)){var l=d("div","flatpickr-wrapper");h.element.parentNode&&h.element.parentNode.insertBefore(l,h.element),l.appendChild(h.element),h.altInput&&l.appendChild(h.altInput),l.appendChild(h.calendarContainer)}h.config.static||h.config.inline||(void 0!==h.config.appendTo?h.config.appendTo:window.document.body).appendChild(h.calendarContainer)}(),function(){if(h.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(h.element.querySelectorAll("[data-"+e+"]"),function(t){return F(t,"click",h[e])})}),h.isMobile)!function(){var e=h.config.enableTime?h.config.noCalendar?"time":"datetime-local":"date";h.mobileInput=d("input",h.input.className+" flatpickr-mobile"),h.mobileInput.step=h.input.getAttribute("step")||"any",h.mobileInput.tabIndex=1,h.mobileInput.type=e,h.mobileInput.disabled=h.input.disabled,h.mobileInput.required=h.input.required,h.mobileInput.placeholder=h.input.placeholder,h.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",h.selectedDates.length>0&&(h.mobileInput.defaultValue=h.mobileInput.value=h.formatDate(h.selectedDates[0],h.mobileFormatStr)),h.config.minDate&&(h.mobileInput.min=h.formatDate(h.config.minDate,"Y-m-d")),h.config.maxDate&&(h.mobileInput.max=h.formatDate(h.config.maxDate,"Y-m-d")),h.input.type="hidden",void 0!==h.altInput&&(h.altInput.type="hidden");try{h.input.parentNode&&h.input.parentNode.insertBefore(h.mobileInput,h.input.nextSibling)}catch(e){}F(h.mobileInput,"change",function(e){h.setDate(e.target.value,!1,h.mobileFormatStr),ge("onChange"),ge("onClose")})}();else{var e=r(ae,50);h._debouncedChange=r(Y,M),h.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&F(h.daysContainer,"mouseover",function(e){"range"===h.config.mode&&ne(e.target)}),F(window.document.body,"keydown",te),h.config.inline||h.config.static||F(window,"resize",e),void 0!==window.ontouchstart?F(window.document,"touchstart",Z):F(window.document,"mousedown",N(Z)),F(window.document,"focus",Z,{capture:!0}),!0===h.config.clickOpens&&(F(h._input,"focus",h.open),F(h._input,"mousedown",N(h.open))),void 0!==h.daysContainer&&(F(h.monthNav,"mousedown",N(be)),F(h.monthNav,["keyup","increment"],_),F(h.daysContainer,"mousedown",N(se))),void 0!==h.timeContainer&&void 0!==h.minuteElement&&void 0!==h.hourElement&&(F(h.timeContainer,["increment"],T),F(h.timeContainer,"blur",T,{capture:!0}),F(h.timeContainer,"mousedown",N(P)),F([h.hourElement,h.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==h.secondElement&&F(h.secondElement,"focus",function(){return h.secondElement&&h.secondElement.select()}),void 0!==h.amPM&&F(h.amPM,"mousedown",N(function(e){T(e),Y()})))}}(),(h.selectedDates.length||h.config.noCalendar)&&(h.config.enableTime&&I(h.config.noCalendar?h.latestSelectedDateObj||h.config.minDate:void 0),we(!1)),x(),h.showTimeInput=h.selectedDates.length>0||h.config.noCalendar;var a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!h.isMobile&&a&&le(),ge("onReady")}(),h}function x(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),a=[],i=0;i<n.length;i++){var o=n[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=y(o,t||{}),a.push(o._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return x(this,e)},HTMLElement.prototype.flatpickr=function(e){return x([this],e)});var E=function(e,t){return"string"==typeof e?x(window.document.querySelectorAll(e),t):e instanceof Node?x([e],t):x(e,t)};return E.defaultConfig={},E.l10ns={en:e({},a),default:e({},a)},E.localize=function(t){E.l10ns.default=e({},E.l10ns.default,t)},E.setDefaults=function(t){E.defaultConfig=e({},E.defaultConfig,t)},E.parseDate=D({}),E.formatDate=v({}),E.compareDates=w,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return x(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=E),E});
\ No newline at end of file
diff --git a/backoffice/vendors/flatpickr/ie.css b/backoffice/vendors/flatpickr/ie.css
new file mode 100644 (file)
index 0000000..30d7f76
--- /dev/null
@@ -0,0 +1,13 @@
+span.flatpickr-weekday {
+  display: inline-block;
+  width: 14.2857143%;
+}
+span.flatpickr-day {
+  width: 14.2857143%;
+  margin: 0 2.491071428571428px;
+}
+@media screen and (min-width: 0\0) {
+  div.flatpickr-current-month {
+    padding-top: 0px !important;
+  }
+}
diff --git a/backoffice/vendors/flatpickr/index.d.ts b/backoffice/vendors/flatpickr/index.d.ts
new file mode 100644 (file)
index 0000000..a3893d5
--- /dev/null
@@ -0,0 +1,4 @@
+import { FlatpickrFn } from "./types/instance";
+import "./utils/polyfills";
+declare var flatpickr: FlatpickrFn;
+export default flatpickr;
diff --git a/backoffice/vendors/flatpickr/l10n/de.d.ts b/backoffice/vendors/flatpickr/l10n/de.d.ts
new file mode 100644 (file)
index 0000000..c7d46df
--- /dev/null
@@ -0,0 +1,66 @@
+import { CustomLocale } from "../types/locale";
+export declare const German: CustomLocale;
+declare const _default: {
+    default?: CustomLocale | undefined;
+    hr?: CustomLocale | undefined;
+    th?: CustomLocale | undefined;
+    tr?: CustomLocale | undefined;
+    ar?: CustomLocale | undefined;
+    at?: CustomLocale | undefined;
+    az?: CustomLocale | undefined;
+    be?: CustomLocale | undefined;
+    bg?: CustomLocale | undefined;
+    bn?: CustomLocale | undefined;
+    bs?: CustomLocale | undefined;
+    cat?: CustomLocale | undefined;
+    cs?: CustomLocale | undefined;
+    cy?: CustomLocale | undefined;
+    da?: CustomLocale | undefined;
+    de?: CustomLocale | undefined;
+    en?: CustomLocale | undefined;
+    eo?: CustomLocale | undefined;
+    es?: CustomLocale | undefined;
+    et?: CustomLocale | undefined;
+    fa?: CustomLocale | undefined;
+    fi?: CustomLocale | undefined;
+    fo?: CustomLocale | undefined;
+    fr?: CustomLocale | undefined;
+    gr?: CustomLocale | undefined;
+    he?: CustomLocale | undefined;
+    hi?: CustomLocale | undefined;
+    hu?: CustomLocale | undefined;
+    id?: CustomLocale | undefined;
+    is?: CustomLocale | undefined;
+    it?: CustomLocale | undefined;
+    ja?: CustomLocale | undefined;
+    ka?: CustomLocale | undefined;
+    ko?: CustomLocale | undefined;
+    km?: CustomLocale | undefined;
+    kz?: CustomLocale | undefined;
+    lt?: CustomLocale | undefined;
+    lv?: CustomLocale | undefined;
+    mk?: CustomLocale | undefined;
+    mn?: CustomLocale | undefined;
+    ms?: CustomLocale | undefined;
+    my?: CustomLocale | undefined;
+    nl?: CustomLocale | undefined;
+    no?: CustomLocale | undefined;
+    pa?: CustomLocale | undefined;
+    pl?: CustomLocale | undefined;
+    pt?: CustomLocale | undefined;
+    ro?: CustomLocale | undefined;
+    ru?: CustomLocale | undefined;
+    si?: CustomLocale | undefined;
+    sk?: CustomLocale | undefined;
+    sl?: CustomLocale | undefined;
+    sq?: CustomLocale | undefined;
+    sr?: CustomLocale | undefined;
+    sv?: CustomLocale | undefined;
+    uk?: CustomLocale | undefined;
+    vn?: CustomLocale | undefined;
+    zh?: CustomLocale | undefined;
+    zh_tw?: CustomLocale | undefined;
+} & {
+    default: import("../types/locale").Locale;
+};
+export default _default;
diff --git a/backoffice/vendors/flatpickr/l10n/de.js b/backoffice/vendors/flatpickr/l10n/de.js
new file mode 100644 (file)
index 0000000..c413375
--- /dev/null
@@ -0,0 +1,70 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+  typeof define === 'function' && define.amd ? define(['exports'], factory) :
+  (global = global || self, factory(global.de = {}));
+}(this, function (exports) { 'use strict';
+
+  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
+      ? window.flatpickr
+      : {
+          l10ns: {}
+      };
+  var German = {
+      weekdays: {
+          shorthand: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
+          longhand: [
+              "Sonntag",
+              "Montag",
+              "Dienstag",
+              "Mittwoch",
+              "Donnerstag",
+              "Freitag",
+              "Samstag",
+          ]
+      },
+      months: {
+          shorthand: [
+              "Jan",
+              "Feb",
+              "Mär",
+              "Apr",
+              "Mai",
+              "Jun",
+              "Jul",
+              "Aug",
+              "Sep",
+              "Okt",
+              "Nov",
+              "Dez",
+          ],
+          longhand: [
+              "Januar",
+              "Februar",
+              "März",
+              "April",
+              "Mai",
+              "Juni",
+              "Juli",
+              "August",
+              "September",
+              "Oktober",
+              "November",
+              "Dezember",
+          ]
+      },
+      firstDayOfWeek: 1,
+      weekAbbreviation: "KW",
+      rangeSeparator: " bis ",
+      scrollTitle: "Zum Ã„ndern scrollen",
+      toggleTitle: "Zum Umschalten klicken",
+      time_24hr: true
+  };
+  fp.l10ns.de = German;
+  var de = fp.l10ns;
+
+  exports.German = German;
+  exports.default = de;
+
+  Object.defineProperty(exports, '__esModule', { value: true });
+
+}));
diff --git a/backoffice/vendors/flatpickr/l10n/default.d.ts b/backoffice/vendors/flatpickr/l10n/default.d.ts
new file mode 100644 (file)
index 0000000..ba7d9bb
--- /dev/null
@@ -0,0 +1,3 @@
+import { Locale } from "../types/locale";
+export declare const english: Locale;
+export default english;
diff --git a/backoffice/vendors/flatpickr/l10n/default.js b/backoffice/vendors/flatpickr/l10n/default.js
new file mode 100644 (file)
index 0000000..6b19324
--- /dev/null
@@ -0,0 +1,83 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+  typeof define === 'function' && define.amd ? define(['exports'], factory) :
+  (global = global || self, factory(global.default = {}));
+}(this, function (exports) { 'use strict';
+
+  var english = {
+      weekdays: {
+          shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+          longhand: [
+              "Sunday",
+              "Monday",
+              "Tuesday",
+              "Wednesday",
+              "Thursday",
+              "Friday",
+              "Saturday",
+          ]
+      },
+      months: {
+          shorthand: [
+              "Jan",
+              "Feb",
+              "Mar",
+              "Apr",
+              "May",
+              "Jun",
+              "Jul",
+              "Aug",
+              "Sep",
+              "Oct",
+              "Nov",
+              "Dec",
+          ],
+          longhand: [
+              "January",
+              "February",
+              "March",
+              "April",
+              "May",
+              "June",
+              "July",
+              "August",
+              "September",
+              "October",
+              "November",
+              "December",
+          ]
+      },
+      daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
+      firstDayOfWeek: 0,
+      ordinal: function (nth) {
+          var s = nth % 100;
+          if (s > 3 && s < 21)
+              return "th";
+          switch (s % 10) {
+              case 1:
+                  return "st";
+              case 2:
+                  return "nd";
+              case 3:
+                  return "rd";
+              default:
+                  return "th";
+          }
+      },
+      rangeSeparator: " to ",
+      weekAbbreviation: "Wk",
+      scrollTitle: "Scroll to increment",
+      toggleTitle: "Click to toggle",
+      amPM: ["AM", "PM"],
+      yearAriaLabel: "Year",
+      hourAriaLabel: "Hour",
+      minuteAriaLabel: "Minute",
+      time_24hr: false
+  };
+
+  exports.default = english;
+  exports.english = english;
+
+  Object.defineProperty(exports, '__esModule', { value: true });
+
+}));
diff --git a/backoffice/vendors/flatpickr/l10n/fr.d.ts b/backoffice/vendors/flatpickr/l10n/fr.d.ts
new file mode 100644 (file)
index 0000000..7b51e27
--- /dev/null
@@ -0,0 +1,66 @@
+import { CustomLocale } from "../types/locale";
+export declare const French: CustomLocale;
+declare const _default: {
+    default?: CustomLocale | undefined;
+    hr?: CustomLocale | undefined;
+    th?: CustomLocale | undefined;
+    tr?: CustomLocale | undefined;
+    ar?: CustomLocale | undefined;
+    at?: CustomLocale | undefined;
+    az?: CustomLocale | undefined;
+    be?: CustomLocale | undefined;
+    bg?: CustomLocale | undefined;
+    bn?: CustomLocale | undefined;
+    bs?: CustomLocale | undefined;
+    cat?: CustomLocale | undefined;
+    cs?: CustomLocale | undefined;
+    cy?: CustomLocale | undefined;
+    da?: CustomLocale | undefined;
+    de?: CustomLocale | undefined;
+    en?: CustomLocale | undefined;
+    eo?: CustomLocale | undefined;
+    es?: CustomLocale | undefined;
+    et?: CustomLocale | undefined;
+    fa?: CustomLocale | undefined;
+    fi?: CustomLocale | undefined;
+    fo?: CustomLocale | undefined;
+    fr?: CustomLocale | undefined;
+    gr?: CustomLocale | undefined;
+    he?: CustomLocale | undefined;
+    hi?: CustomLocale | undefined;
+    hu?: CustomLocale | undefined;
+    id?: CustomLocale | undefined;
+    is?: CustomLocale | undefined;
+    it?: CustomLocale | undefined;
+    ja?: CustomLocale | undefined;
+    ka?: CustomLocale | undefined;
+    ko?: CustomLocale | undefined;
+    km?: CustomLocale | undefined;
+    kz?: CustomLocale | undefined;
+    lt?: CustomLocale | undefined;
+    lv?: CustomLocale | undefined;
+    mk?: CustomLocale | undefined;
+    mn?: CustomLocale | undefined;
+    ms?: CustomLocale | undefined;
+    my?: CustomLocale | undefined;
+    nl?: CustomLocale | undefined;
+    no?: CustomLocale | undefined;
+    pa?: CustomLocale | undefined;
+    pl?: CustomLocale | undefined;
+    pt?: CustomLocale | undefined;
+    ro?: CustomLocale | undefined;
+    ru?: CustomLocale | undefined;
+    si?: CustomLocale | undefined;
+    sk?: CustomLocale | undefined;
+    sl?: CustomLocale | undefined;
+    sq?: CustomLocale | undefined;
+    sr?: CustomLocale | undefined;
+    sv?: CustomLocale | undefined;
+    uk?: CustomLocale | undefined;
+    vn?: CustomLocale | undefined;
+    zh?: CustomLocale | undefined;
+    zh_tw?: CustomLocale | undefined;
+} & {
+    default: import("../types/locale").Locale;
+};
+export default _default;
diff --git a/backoffice/vendors/flatpickr/l10n/fr.js b/backoffice/vendors/flatpickr/l10n/fr.js
new file mode 100644 (file)
index 0000000..5804a19
--- /dev/null
@@ -0,0 +1,75 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+  typeof define === 'function' && define.amd ? define(['exports'], factory) :
+  (global = global || self, factory(global.fr = {}));
+}(this, function (exports) { 'use strict';
+
+  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
+      ? window.flatpickr
+      : {
+          l10ns: {}
+      };
+  var French = {
+      firstDayOfWeek: 1,
+      weekdays: {
+          shorthand: ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"],
+          longhand: [
+              "dimanche",
+              "lundi",
+              "mardi",
+              "mercredi",
+              "jeudi",
+              "vendredi",
+              "samedi",
+          ]
+      },
+      months: {
+          shorthand: [
+              "janv",
+              "févr",
+              "mars",
+              "avr",
+              "mai",
+              "juin",
+              "juil",
+              "août",
+              "sept",
+              "oct",
+              "nov",
+              "déc",
+          ],
+          longhand: [
+              "janvier",
+              "février",
+              "mars",
+              "avril",
+              "mai",
+              "juin",
+              "juillet",
+              "août",
+              "septembre",
+              "octobre",
+              "novembre",
+              "décembre",
+          ]
+      },
+      ordinal: function (nth) {
+          if (nth > 1)
+              return "";
+          return "er";
+      },
+      rangeSeparator: " au ",
+      weekAbbreviation: "Sem",
+      scrollTitle: "Défiler pour augmenter la valeur",
+      toggleTitle: "Cliquer pour basculer",
+      time_24hr: true
+  };
+  fp.l10ns.fr = French;
+  var fr = fp.l10ns;
+
+  exports.French = French;
+  exports.default = fr;
+
+  Object.defineProperty(exports, '__esModule', { value: true });
+
+}));
diff --git a/backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.css b/backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.css
new file mode 100644 (file)
index 0000000..9508ea9
--- /dev/null
@@ -0,0 +1,24 @@
+.flatpickr-confirm {
+       height: 40px;
+       max-height: 0px;
+       visibility: hidden;
+       display: flex;
+       justify-content: center;
+       align-items: center;
+       cursor: pointer;
+       background: rgba(0,0,0,0.06)
+}
+
+.flatpickr-confirm svg path {
+       fill: inherit;
+}
+
+.flatpickr-confirm.darkTheme {
+       color: white;
+       fill: white;
+}
+
+.flatpickr-confirm.visible {
+       max-height: 40px;
+       visibility: visible
+}
diff --git a/backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.d.ts b/backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.d.ts
new file mode 100644 (file)
index 0000000..a4ddf39
--- /dev/null
@@ -0,0 +1,9 @@
+import { Plugin } from "../../types/options";
+export interface Config {
+    confirmIcon?: string;
+    confirmText?: string;
+    showAlways?: boolean;
+    theme?: string;
+}
+declare function confirmDatePlugin(pluginConfig: Config): Plugin;
+export default confirmDatePlugin;
diff --git a/backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.js b/backoffice/vendors/flatpickr/plugins/confirmDate/confirmDate.js
new file mode 100644 (file)
index 0000000..c1fc0ac
--- /dev/null
@@ -0,0 +1,84 @@
+(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+    typeof define === 'function' && define.amd ? define(factory) :
+    (global = global || self, global.confirmDatePlugin = factory());
+}(this, function () { 'use strict';
+
+    /*! *****************************************************************************
+    Copyright (c) Microsoft Corporation. All rights reserved.
+    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+    this file except in compliance with the License. You may obtain a copy of the
+    License at http://www.apache.org/licenses/LICENSE-2.0
+
+    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+    MERCHANTABLITY OR NON-INFRINGEMENT.
+
+    See the Apache Version 2.0 License for specific language governing permissions
+    and limitations under the License.
+    ***************************************************************************** */
+
+    var __assign = function() {
+        __assign = Object.assign || function __assign(t) {
+            for (var s, i = 1, n = arguments.length; i < n; i++) {
+                s = arguments[i];
+                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+            }
+            return t;
+        };
+        return __assign.apply(this, arguments);
+    };
+
+    var defaultConfig = {
+        confirmIcon: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='17' height='17' viewBox='0 0 17 17'> <g> </g> <path d='M15.418 1.774l-8.833 13.485-4.918-4.386 0.666-0.746 4.051 3.614 8.198-12.515 0.836 0.548z' fill='#000000' /> </svg>",
+        confirmText: "OK ",
+        showAlways: false,
+        theme: "light"
+    };
+    function confirmDatePlugin(pluginConfig) {
+        var config = __assign({}, defaultConfig, pluginConfig);
+        var confirmContainer;
+        var confirmButtonCSSClass = "flatpickr-confirm";
+        return function (fp) {
+            if (fp.config.noCalendar || fp.isMobile)
+                return {};
+            return __assign({ onKeyDown: function (_, __, ___, e) {
+                    if (fp.config.enableTime && e.key === "Tab" && e.target === fp.amPM) {
+                        e.preventDefault();
+                        confirmContainer.focus();
+                    }
+                    else if (e.key === "Enter" && e.target === confirmContainer)
+                        fp.close();
+                },
+                onReady: function () {
+                    confirmContainer = fp._createElement("div", confirmButtonCSSClass + " " + (config.showAlways ? "visible" : "") + " " + config.theme + "Theme", config.confirmText);
+                    confirmContainer.tabIndex = -1;
+                    confirmContainer.innerHTML += config.confirmIcon;
+                    confirmContainer.addEventListener("click", fp.close);
+                    fp.calendarContainer.appendChild(confirmContainer);
+                    fp.loadedPlugins.push("confirmDate");
+                } }, (!config.showAlways
+                ? {
+                    onChange: function (_, dateStr) {
+                        var showCondition = fp.config.enableTime ||
+                            fp.config.mode === "multiple" ||
+                            fp.loadedPlugins.indexOf("monthSelect") !== -1;
+                        var localConfirmContainer = fp.calendarContainer.querySelector("." + confirmButtonCSSClass);
+                        if (!localConfirmContainer)
+                            return;
+                        if (dateStr &&
+                            !fp.config.inline &&
+                            showCondition &&
+                            localConfirmContainer)
+                            return localConfirmContainer.classList.add("visible");
+                        localConfirmContainer.classList.remove("visible");
+                    }
+                }
+                : {}));
+        };
+    }
+
+    return confirmDatePlugin;
+
+}));
diff --git a/backoffice/vendors/flatpickr/plugins/labelPlugin/labelPlugin.d.ts b/backoffice/vendors/flatpickr/plugins/labelPlugin/labelPlugin.d.ts
new file mode 100644 (file)
index 0000000..1a9cbce
--- /dev/null
@@ -0,0 +1,3 @@
+import { Plugin } from "../../types/options";
+declare function labelPlugin(): Plugin;
+export default labelPlugin;
diff --git a/backoffice/vendors/flatpickr/plugins/labelPlugin/labelPlugin.js b/backoffice/vendors/flatpickr/plugins/labelPlugin/labelPlugin.js
new file mode 100644 (file)
index 0000000..ddad2bc
--- /dev/null
@@ -0,0 +1,31 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = global || self, global.labelPlugin = factory());
+}(this, function () { 'use strict';
+
+  function labelPlugin() {
+      return function (fp) {
+          return {
+              onReady: function () {
+                  var id = fp.input.id;
+                  if (!id) {
+                      return;
+                  }
+                  if (fp.mobileInput) {
+                      fp.input.removeAttribute("id");
+                      fp.mobileInput.id = id;
+                  }
+                  else if (fp.altInput) {
+                      fp.input.removeAttribute("id");
+                      fp.altInput.id = id;
+                  }
+                  fp.loadedPlugins.push("labelPlugin");
+              }
+          };
+      };
+  }
+
+  return labelPlugin;
+
+}));
diff --git a/backoffice/vendors/flatpickr/plugins/minMaxTimePlugin.d.ts b/backoffice/vendors/flatpickr/plugins/minMaxTimePlugin.d.ts
new file mode 100644 (file)
index 0000000..4fe2e5c
--- /dev/null
@@ -0,0 +1,17 @@
+import { Plugin } from "../types/options";
+export interface MinMaxTime {
+    minTime?: string;
+    maxTime?: string;
+}
+export interface Config {
+    table?: Record<string, MinMaxTime>;
+    getTimeLimits?: (date: Date) => MinMaxTime;
+    tableDateFormat?: string;
+}
+export interface State {
+    formatDate: (date: Date, f: string) => string;
+    tableDateFormat: string;
+    defaults: MinMaxTime;
+}
+declare function minMaxTimePlugin(config?: Config): Plugin;
+export default minMaxTimePlugin;
diff --git a/backoffice/vendors/flatpickr/plugins/minMaxTimePlugin.js b/backoffice/vendors/flatpickr/plugins/minMaxTimePlugin.js
new file mode 100644 (file)
index 0000000..291ac25
--- /dev/null
@@ -0,0 +1,326 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = global || self, global.minMaxTimePlugin = factory());
+}(this, function () { 'use strict';
+
+  var pad = function (number) { return ("0" + number).slice(-2); };
+  var int = function (bool) { return (bool === true ? 1 : 0); };
+
+  var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; };
+  var formats = {
+      // get the date in UTC
+      Z: function (date) { return date.toISOString(); },
+      // weekday name, short, e.g. Thu
+      D: function (date, locale, options) {
+          return locale.weekdays.shorthand[formats.w(date, locale, options)];
+      },
+      // full month name e.g. January
+      F: function (date, locale, options) {
+          return monthToStr(formats.n(date, locale, options) - 1, false, locale);
+      },
+      // padded hour 1-12
+      G: function (date, locale, options) {
+          return pad(formats.h(date, locale, options));
+      },
+      // hours with leading zero e.g. 03
+      H: function (date) { return pad(date.getHours()); },
+      // day (1-30) with ordinal suffix e.g. 1st, 2nd
+      J: function (date, locale) {
+          return locale.ordinal !== undefined
+              ? date.getDate() + locale.ordinal(date.getDate())
+              : date.getDate();
+      },
+      // AM/PM
+      K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },
+      // shorthand month e.g. Jan, Sep, Oct, etc
+      M: function (date, locale) {
+          return monthToStr(date.getMonth(), true, locale);
+      },
+      // seconds 00-59
+      S: function (date) { return pad(date.getSeconds()); },
+      // unix timestamp
+      U: function (date) { return date.getTime() / 1000; },
+      W: function (date, _, options) {
+          return options.getWeek(date);
+      },
+      // full year e.g. 2016
+      Y: function (date) { return date.getFullYear(); },
+      // day in month, padded (01-30)
+      d: function (date) { return pad(date.getDate()); },
+      // hour from 1-12 (am/pm)
+      h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },
+      // minutes, padded with leading zero e.g. 09
+      i: function (date) { return pad(date.getMinutes()); },
+      // day in month (1-30)
+      j: function (date) { return date.getDate(); },
+      // weekday name, full, e.g. Thursday
+      l: function (date, locale) {
+          return locale.weekdays.longhand[date.getDay()];
+      },
+      // padded month number (01-12)
+      m: function (date) { return pad(date.getMonth() + 1); },
+      // the month number (1-12)
+      n: function (date) { return date.getMonth() + 1; },
+      // seconds 0-59
+      s: function (date) { return date.getSeconds(); },
+      // Unix Milliseconds
+      u: function (date) { return date.getTime(); },
+      // number of the day of the week
+      w: function (date) { return date.getDay(); },
+      // last two digits of year e.g. 16 for 2016
+      y: function (date) { return String(date.getFullYear()).substring(2); }
+  };
+
+  var defaults = {
+      _disable: [],
+      _enable: [],
+      allowInput: false,
+      altFormat: "F j, Y",
+      altInput: false,
+      altInputClass: "form-control input",
+      animate: typeof window === "object" &&
+          window.navigator.userAgent.indexOf("MSIE") === -1,
+      ariaDateFormat: "F j, Y",
+      clickOpens: true,
+      closeOnSelect: true,
+      conjunction: ", ",
+      dateFormat: "Y-m-d",
+      defaultHour: 12,
+      defaultMinute: 0,
+      defaultSeconds: 0,
+      disable: [],
+      disableMobile: false,
+      enable: [],
+      enableSeconds: false,
+      enableTime: false,
+      errorHandler: function (err) {
+          return typeof console !== "undefined" && console.warn(err);
+      },
+      getWeek: function (givenDate) {
+          var date = new Date(givenDate.getTime());
+          date.setHours(0, 0, 0, 0);
+          // Thursday in current week decides the year.
+          date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));
+          // January 4 is always in week 1.
+          var week1 = new Date(date.getFullYear(), 0, 4);
+          // Adjust to Thursday in week 1 and count number of weeks from date to week1.
+          return (1 +
+              Math.round(((date.getTime() - week1.getTime()) / 86400000 -
+                  3 +
+                  ((week1.getDay() + 6) % 7)) /
+                  7));
+      },
+      hourIncrement: 1,
+      ignoredFocusElements: [],
+      inline: false,
+      locale: "default",
+      minuteIncrement: 5,
+      mode: "single",
+      monthSelectorType: "dropdown",
+      nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
+      noCalendar: false,
+      now: new Date(),
+      onChange: [],
+      onClose: [],
+      onDayCreate: [],
+      onDestroy: [],
+      onKeyDown: [],
+      onMonthChange: [],
+      onOpen: [],
+      onParseConfig: [],
+      onReady: [],
+      onValueUpdate: [],
+      onYearChange: [],
+      onPreCalendarPosition: [],
+      plugins: [],
+      position: "auto",
+      positionElement: undefined,
+      prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
+      shorthandCurrentMonth: false,
+      showMonths: 1,
+      static: false,
+      time_24hr: false,
+      weekNumbers: false,
+      wrap: false
+  };
+
+  var english = {
+      weekdays: {
+          shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+          longhand: [
+              "Sunday",
+              "Monday",
+              "Tuesday",
+              "Wednesday",
+              "Thursday",
+              "Friday",
+              "Saturday",
+          ]
+      },
+      months: {
+          shorthand: [
+              "Jan",
+              "Feb",
+              "Mar",
+              "Apr",
+              "May",
+              "Jun",
+              "Jul",
+              "Aug",
+              "Sep",
+              "Oct",
+              "Nov",
+              "Dec",
+          ],
+          longhand: [
+              "January",
+              "February",
+              "March",
+              "April",
+              "May",
+              "June",
+              "July",
+              "August",
+              "September",
+              "October",
+              "November",
+              "December",
+          ]
+      },
+      daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
+      firstDayOfWeek: 0,
+      ordinal: function (nth) {
+          var s = nth % 100;
+          if (s > 3 && s < 21)
+              return "th";
+          switch (s % 10) {
+              case 1:
+                  return "st";
+              case 2:
+                  return "nd";
+              case 3:
+                  return "rd";
+              default:
+                  return "th";
+          }
+      },
+      rangeSeparator: " to ",
+      weekAbbreviation: "Wk",
+      scrollTitle: "Scroll to increment",
+      toggleTitle: "Click to toggle",
+      amPM: ["AM", "PM"],
+      yearAriaLabel: "Year",
+      hourAriaLabel: "Hour",
+      minuteAriaLabel: "Minute",
+      time_24hr: false
+  };
+
+  var createDateFormatter = function (_a) {
+      var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;
+      return function (dateObj, frmt, overrideLocale) {
+          var locale = overrideLocale || l10n;
+          if (config.formatDate !== undefined) {
+              return config.formatDate(dateObj, frmt, locale);
+          }
+          return frmt
+              .split("")
+              .map(function (c, i, arr) {
+              return formats[c] && arr[i - 1] !== "\\"
+                  ? formats[c](dateObj, locale, config)
+                  : c !== "\\"
+                      ? c
+                      : "";
+          })
+              .join("");
+      };
+  };
+  /**
+   * Compute the difference in dates, measured in ms
+   */
+  function compareDates(date1, date2, timeless) {
+      if (timeless === void 0) { timeless = true; }
+      if (timeless !== false) {
+          return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -
+              new Date(date2.getTime()).setHours(0, 0, 0, 0));
+      }
+      return date1.getTime() - date2.getTime();
+  }
+  /**
+   * Compute the difference in times, measured in ms
+   */
+  function compareTimes(date1, date2) {
+      return (3600 * (date1.getHours() - date2.getHours()) +
+          60 * (date1.getMinutes() - date2.getMinutes()) +
+          date1.getSeconds() -
+          date2.getSeconds());
+  }
+
+  function minMaxTimePlugin(config) {
+      if (config === void 0) { config = {}; }
+      var state = {
+          formatDate: createDateFormatter({}),
+          tableDateFormat: config.tableDateFormat || "Y-m-d",
+          defaults: {
+              minTime: undefined,
+              maxTime: undefined
+          }
+      };
+      function findDateTimeLimit(date) {
+          if (config.table !== undefined) {
+              return config.table[state.formatDate(date, state.tableDateFormat)];
+          }
+          return config.getTimeLimits && config.getTimeLimits(date);
+      }
+      return function (fp) {
+          return {
+              onReady: function () {
+                  state.formatDate = this.formatDate;
+                  state.defaults = {
+                      minTime: this.config.minTime && state.formatDate(this.config.minTime, "H:i"),
+                      maxTime: this.config.maxTime && state.formatDate(this.config.maxTime, "H:i")
+                  };
+                  fp.loadedPlugins.push("minMaxTime");
+              },
+              onChange: function () {
+                  var latest = this.latestSelectedDateObj;
+                  var matchingTimeLimit = latest && findDateTimeLimit(latest);
+                  if (latest && matchingTimeLimit !== undefined) {
+                      this.set(matchingTimeLimit);
+                      fp.config.minTime.setFullYear(latest.getFullYear());
+                      fp.config.maxTime.setFullYear(latest.getFullYear());
+                      fp.config.minTime.setMonth(latest.getMonth());
+                      fp.config.maxTime.setMonth(latest.getMonth());
+                      fp.config.minTime.setDate(latest.getDate());
+                      fp.config.maxTime.setDate(latest.getDate());
+                      if (compareDates(latest, fp.config.maxTime, false) > 0) {
+                          fp.setDate(new Date(latest.getTime()).setHours(fp.config.maxTime.getHours(), fp.config.maxTime.getMinutes(), fp.config.maxTime.getSeconds(), fp.config.maxTime.getMilliseconds()), false);
+                      }
+                      else if (compareDates(latest, fp.config.minTime, false) < 0)
+                          fp.setDate(new Date(latest.getTime()).setHours(fp.config.minTime.getHours(), fp.config.minTime.getMinutes(), fp.config.minTime.getSeconds(), fp.config.minTime.getMilliseconds()), false);
+                  }
+                  else {
+                      var newMinMax = state.defaults || {
+                          minTime: undefined,
+                          maxTime: undefined
+                      };
+                      this.set(newMinMax);
+                      if (!latest)
+                          return;
+                      var _a = fp.config, minTime = _a.minTime, maxTime = _a.maxTime;
+                      if (minTime && compareTimes(latest, minTime) < 0) {
+                          fp.setDate(new Date(latest.getTime()).setHours(minTime.getHours(), minTime.getMinutes(), minTime.getSeconds(), minTime.getMilliseconds()), false);
+                      }
+                      else if (maxTime && compareTimes(latest, maxTime) > 0) {
+                          fp.setDate(new Date(latest.getTime()).setHours(maxTime.getHours(), maxTime.getMinutes(), maxTime.getSeconds(), maxTime.getMilliseconds()));
+                      }
+                      //
+                  }
+              }
+          };
+      };
+  }
+
+  return minMaxTimePlugin;
+
+}));
diff --git a/backoffice/vendors/flatpickr/plugins/monthSelect/index.d.ts b/backoffice/vendors/flatpickr/plugins/monthSelect/index.d.ts
new file mode 100644 (file)
index 0000000..d3864fc
--- /dev/null
@@ -0,0 +1,13 @@
+import { Plugin } from "../../types/options";
+export interface Config {
+    shorthand: boolean;
+    dateFormat: string;
+    altFormat: string;
+    theme: string;
+}
+export declare type MonthElement = HTMLSpanElement & {
+    dateObj: Date;
+    $i: number;
+};
+declare function monthSelectPlugin(pluginConfig?: Partial<Config>): Plugin;
+export default monthSelectPlugin;
diff --git a/backoffice/vendors/flatpickr/plugins/monthSelect/index.js b/backoffice/vendors/flatpickr/plugins/monthSelect/index.js
new file mode 100644 (file)
index 0000000..7fd66e7
--- /dev/null
@@ -0,0 +1,174 @@
+(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+    typeof define === 'function' && define.amd ? define(factory) :
+    (global = global || self, global.monthSelectPlugin = factory());
+}(this, function () { 'use strict';
+
+    /*! *****************************************************************************
+    Copyright (c) Microsoft Corporation. All rights reserved.
+    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+    this file except in compliance with the License. You may obtain a copy of the
+    License at http://www.apache.org/licenses/LICENSE-2.0
+
+    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+    MERCHANTABLITY OR NON-INFRINGEMENT.
+
+    See the Apache Version 2.0 License for specific language governing permissions
+    and limitations under the License.
+    ***************************************************************************** */
+
+    var __assign = function() {
+        __assign = Object.assign || function __assign(t) {
+            for (var s, i = 1, n = arguments.length; i < n; i++) {
+                s = arguments[i];
+                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+            }
+            return t;
+        };
+        return __assign.apply(this, arguments);
+    };
+
+    var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; };
+
+    var defaultConfig = {
+        shorthand: false,
+        dateFormat: "F Y",
+        altFormat: "F Y",
+        theme: "light"
+    };
+    function monthSelectPlugin(pluginConfig) {
+        var config = __assign({}, defaultConfig, pluginConfig);
+        return function (fp) {
+            fp.config.dateFormat = config.dateFormat;
+            fp.config.altFormat = config.altFormat;
+            var self = { monthsContainer: null };
+            function clearUnnecessaryDOMElements() {
+                if (!fp.rContainer || !fp.daysContainer || !fp.weekdayContainer)
+                    return;
+                fp.rContainer.removeChild(fp.daysContainer);
+                fp.rContainer.removeChild(fp.weekdayContainer);
+                for (var index = 0; index < fp.monthElements.length; index++) {
+                    var element = fp.monthElements[index];
+                    if (!element.parentNode)
+                        continue;
+                    element.parentNode.removeChild(element);
+                }
+            }
+            function addListeners() {
+                fp._bind(fp.prevMonthNav, "click", function () {
+                    fp.currentYear -= 1;
+                    selectYear();
+                });
+                fp._bind(fp.nextMonthNav, "mousedown", function () {
+                    fp.currentYear += 1;
+                    selectYear();
+                });
+            }
+            function addMonths() {
+                if (!fp.rContainer)
+                    return;
+                self.monthsContainer = fp._createElement("div", "flatpickr-monthSelect-months");
+                self.monthsContainer.tabIndex = -1;
+                fp.calendarContainer.classList.add("flatpickr-monthSelect-theme-" + config.theme);
+                for (var i = 0; i < 12; i++) {
+                    var month = fp._createElement("span", "flatpickr-monthSelect-month");
+                    month.dateObj = new Date(fp.currentYear, i);
+                    month.$i = i;
+                    month.textContent = monthToStr(i, config.shorthand, fp.l10n);
+                    month.tabIndex = -1;
+                    month.addEventListener("click", selectMonth);
+                    self.monthsContainer.appendChild(month);
+                }
+                fp.rContainer.appendChild(self.monthsContainer);
+            }
+            function setCurrentlySelected() {
+                if (!fp.rContainer)
+                    return;
+                var currentlySelected = fp.rContainer.querySelectorAll(".flatpickr-monthSelect-month.selected");
+                for (var index = 0; index < currentlySelected.length; index++) {
+                    currentlySelected[index].classList.remove("selected");
+                }
+                var month = fp.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child(" + (fp.currentMonth + 1) + ")");
+                if (month) {
+                    month.classList.add("selected");
+                }
+            }
+            function selectYear() {
+                var selectedDate = fp.selectedDates[0];
+                selectedDate.setFullYear(fp.currentYear);
+                fp.setDate(selectedDate, true);
+            }
+            function selectMonth(e) {
+                e.preventDefault();
+                e.stopPropagation();
+                setMonth(e.target.dateObj);
+            }
+            function setMonth(date) {
+                var selectedDate = new Date(date);
+                selectedDate.setFullYear(fp.currentYear);
+                fp.currentMonth = selectedDate.getMonth();
+                fp.setDate(selectedDate, true);
+                setCurrentlySelected();
+            }
+            var shifts = {
+                37: -1,
+                39: 1,
+                40: 3,
+                38: -3
+            };
+            function onKeyDown(_, __, ___, e) {
+                var shouldMove = shifts[e.keyCode] !== undefined;
+                if (!shouldMove && e.keyCode !== 13) {
+                    return;
+                }
+                if (!fp.rContainer || !self.monthsContainer)
+                    return;
+                var currentlySelected = fp.rContainer.querySelector(".flatpickr-monthSelect-month.selected");
+                var index = Array.prototype.indexOf.call(self.monthsContainer.children, document.activeElement);
+                if (index === -1) {
+                    var target = currentlySelected || self.monthsContainer.firstElementChild;
+                    target.focus();
+                    index = target.$i;
+                }
+                if (shouldMove) {
+                    self.monthsContainer.children[(12 + index + shifts[e.keyCode]) % 12].focus();
+                }
+                else if (e.keyCode === 13 &&
+                    self.monthsContainer.contains(document.activeElement)) {
+                    setMonth(document.activeElement.dateObj);
+                }
+            }
+            function destroyPluginInstance() {
+                if (self.monthsContainer !== null) {
+                    var months = self.monthsContainer.querySelectorAll(".flatpickr-monthSelect-month");
+                    for (var index = 0; index < months.length; index++) {
+                        months[index].removeEventListener("click", selectMonth);
+                    }
+                }
+            }
+            return {
+                onParseConfig: function () {
+                    fp.config.mode = "single";
+                    fp.config.enableTime = false;
+                },
+                onValueUpdate: setCurrentlySelected,
+                onKeyDown: onKeyDown,
+                onReady: [
+                    clearUnnecessaryDOMElements,
+                    addListeners,
+                    addMonths,
+                    setCurrentlySelected,
+                    function () {
+                        fp.loadedPlugins.push("monthSelect");
+                    },
+                ],
+                onDestroy: destroyPluginInstance
+            };
+        };
+    }
+
+    return monthSelectPlugin;
+
+}));
diff --git a/backoffice/vendors/flatpickr/plugins/monthSelect/style.css b/backoffice/vendors/flatpickr/plugins/monthSelect/style.css
new file mode 100644 (file)
index 0000000..cacbafc
--- /dev/null
@@ -0,0 +1,69 @@
+.flatpickr-monthSelect-months {
+  margin: 10px 1px 3px 1px;
+  flex-wrap: wrap;
+}
+
+.flatpickr-monthSelect-month {
+  background: none;
+  border: 0;
+  border-radius: 2px;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #393939;
+  cursor: pointer;
+  display: inline-block;
+  font-weight: 400;
+  margin: 0.5px;
+  justify-content: center;
+  padding: 10px;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+  -ms-flex-pack: center;
+  text-align: center;
+  width: 33%;
+}
+
+.flatpickr-monthSelect-theme-dark {
+  background: #3f4458;
+}
+
+.flatpickr-monthSelect-theme-dark .flatpickr-current-month input.cur-year {
+  color: #fff;
+}
+
+.flatpickr-monthSelect-theme-dark .flatpickr-months .flatpickr-prev-month,
+.flatpickr-monthSelect-theme-dark .flatpickr-months .flatpickr-next-month {
+  color: #fff;
+  fill: #fff;
+}
+
+.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month {
+  color: rgba(255, 255, 255, 0.95);
+}
+
+.flatpickr-monthSelect-month:hover,
+.flatpickr-monthSelect-month:focus {
+  background: #e6e6e6;
+  cursor: pointer;
+  outline: 0;
+}
+
+.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month:hover,
+.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month:focus {
+  background: #646c8c;
+  border-color: #646c8c;
+}
+
+.flatpickr-monthSelect-month.selected {
+  background-color: #569ff7;
+  color: #fff;
+}
+
+.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month.selected {
+  background: #80cbc4;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  color: #fff;
+  border-color: #80cbc4;
+}
diff --git a/backoffice/vendors/flatpickr/plugins/monthSelect/tests.spec.d.ts b/backoffice/vendors/flatpickr/plugins/monthSelect/tests.spec.d.ts
new file mode 100644 (file)
index 0000000..cb0ff5c
--- /dev/null
@@ -0,0 +1 @@
+export {};
diff --git a/backoffice/vendors/flatpickr/plugins/rangePlugin.d.ts b/backoffice/vendors/flatpickr/plugins/rangePlugin.d.ts
new file mode 100644 (file)
index 0000000..960a834
--- /dev/null
@@ -0,0 +1,12 @@
+import { Plugin } from "../types/options";
+export interface Config {
+    input?: string | HTMLInputElement;
+    position?: "left";
+}
+declare global {
+    interface Window {
+        rangePlugin: (config?: Config) => void;
+    }
+}
+declare function rangePlugin(config?: Config): Plugin;
+export default rangePlugin;
diff --git a/backoffice/vendors/flatpickr/plugins/rangePlugin.js b/backoffice/vendors/flatpickr/plugins/rangePlugin.js
new file mode 100644 (file)
index 0000000..407e388
--- /dev/null
@@ -0,0 +1,146 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = global || self, global.rangePlugin = factory());
+}(this, function () { 'use strict';
+
+  function rangePlugin(config) {
+      if (config === void 0) { config = {}; }
+      return function (fp) {
+          var dateFormat = "", secondInput, _secondInputFocused, _prevDates;
+          var createSecondInput = function () {
+              if (config.input) {
+                  secondInput =
+                      config.input instanceof Element
+                          ? config.input
+                          : window.document.querySelector(config.input);
+                  if (!secondInput) {
+                      fp.config.errorHandler(new Error("Invalid input element specified"));
+                      return;
+                  }
+                  if (fp.config.wrap) {
+                      secondInput = secondInput.querySelector("[data-input]");
+                  }
+              }
+              else {
+                  secondInput = fp._input.cloneNode();
+                  secondInput.removeAttribute("id");
+                  secondInput._flatpickr = undefined;
+              }
+              if (secondInput.value) {
+                  var parsedDate = fp.parseDate(secondInput.value);
+                  if (parsedDate)
+                      fp.selectedDates.push(parsedDate);
+              }
+              secondInput.setAttribute("data-fp-omit", "");
+              fp._bind(secondInput, ["focus", "click"], function () {
+                  if (fp.selectedDates[1]) {
+                      fp.latestSelectedDateObj = fp.selectedDates[1];
+                      fp._setHoursFromDate(fp.selectedDates[1]);
+                      fp.jumpToDate(fp.selectedDates[1]);
+                  }
+                  _secondInputFocused = true;
+                  fp.isOpen = false;
+                  fp.open(undefined, config.position === "left" ? fp._input : secondInput);
+              });
+              fp._bind(fp._input, ["focus", "click"], function (e) {
+                  e.preventDefault();
+                  fp.isOpen = false;
+                  fp.open();
+              });
+              if (fp.config.allowInput)
+                  fp._bind(secondInput, "keydown", function (e) {
+                      if (e.key === "Enter") {
+                          fp.setDate([fp.selectedDates[0], secondInput.value], true, dateFormat);
+                          secondInput.click();
+                      }
+                  });
+              if (!config.input)
+                  fp._input.parentNode &&
+                      fp._input.parentNode.insertBefore(secondInput, fp._input.nextSibling);
+          };
+          var plugin = {
+              onParseConfig: function () {
+                  fp.config.mode = "range";
+                  dateFormat = fp.config.altInput
+                      ? fp.config.altFormat
+                      : fp.config.dateFormat;
+              },
+              onReady: function () {
+                  createSecondInput();
+                  fp.config.ignoredFocusElements.push(secondInput);
+                  if (fp.config.allowInput) {
+                      fp._input.removeAttribute("readonly");
+                      secondInput.removeAttribute("readonly");
+                  }
+                  else {
+                      secondInput.setAttribute("readonly", "readonly");
+                  }
+                  fp._bind(fp._input, "focus", function () {
+                      fp.latestSelectedDateObj = fp.selectedDates[0];
+                      fp._setHoursFromDate(fp.selectedDates[0]);
+                      _secondInputFocused = false;
+                      fp.jumpToDate(fp.selectedDates[0]);
+                  });
+                  if (fp.config.allowInput)
+                      fp._bind(fp._input, "keydown", function (e) {
+                          if (e.key === "Enter")
+                              fp.setDate([fp._input.value, fp.selectedDates[1]], true, dateFormat);
+                      });
+                  fp.setDate(fp.selectedDates, false);
+                  plugin.onValueUpdate(fp.selectedDates);
+                  fp.loadedPlugins.push("range");
+              },
+              onPreCalendarPosition: function () {
+                  if (_secondInputFocused) {
+                      fp._positionElement = secondInput;
+                      setTimeout(function () {
+                          fp._positionElement = fp._input;
+                      }, 0);
+                  }
+              },
+              onChange: function () {
+                  if (!fp.selectedDates.length) {
+                      setTimeout(function () {
+                          if (fp.selectedDates.length)
+                              return;
+                          secondInput.value = "";
+                          _prevDates = [];
+                      }, 10);
+                  }
+                  if (_secondInputFocused) {
+                      setTimeout(function () {
+                          secondInput.focus();
+                      }, 0);
+                  }
+              },
+              onDestroy: function () {
+                  if (!config.input)
+                      secondInput.parentNode &&
+                          secondInput.parentNode.removeChild(secondInput);
+              },
+              onValueUpdate: function (selDates) {
+                  var _a, _b, _c;
+                  if (!secondInput)
+                      return;
+                  _prevDates =
+                      !_prevDates || selDates.length >= _prevDates.length
+                          ? selDates.slice() : _prevDates;
+                  if (_prevDates.length > selDates.length) {
+                      var newSelectedDate = selDates[0];
+                      var newDates = _secondInputFocused
+                          ? [_prevDates[0], newSelectedDate]
+                          : [newSelectedDate, _prevDates[1]];
+                      fp.setDate(newDates, false);
+                      _prevDates = newDates.slice();
+                  }
+                  _a = fp.selectedDates.map(function (d) { return fp.formatDate(d, dateFormat); }), _b = _a[0], fp._input.value = _b === void 0 ? "" : _b, _c = _a[1], secondInput.value = _c === void 0 ? "" : _c;
+              }
+          };
+          return plugin;
+      };
+  }
+
+  return rangePlugin;
+
+}));
diff --git a/backoffice/vendors/flatpickr/plugins/scrollPlugin.d.ts b/backoffice/vendors/flatpickr/plugins/scrollPlugin.d.ts
new file mode 100644 (file)
index 0000000..a367428
--- /dev/null
@@ -0,0 +1,3 @@
+import { Plugin } from "../types/options";
+declare function scrollPlugin(): Plugin;
+export default scrollPlugin;
diff --git a/backoffice/vendors/flatpickr/plugins/scrollPlugin.js b/backoffice/vendors/flatpickr/plugins/scrollPlugin.js
new file mode 100644 (file)
index 0000000..3a5ad99
--- /dev/null
@@ -0,0 +1,58 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = global || self, global.scrollPlugin = factory());
+}(this, function () { 'use strict';
+
+  function delta(e) {
+      return Math.max(-1, Math.min(1, e.wheelDelta || -e.deltaY));
+  }
+  var scroll = function (e) {
+      e.preventDefault();
+      var ev = new CustomEvent("increment", {
+          bubbles: true
+      });
+      ev.delta = delta(e);
+      e.target.dispatchEvent(ev);
+  };
+  function scrollMonth(fp) {
+      return function (e) {
+          e.preventDefault();
+          var mDelta = delta(e);
+          fp.changeMonth(mDelta);
+      };
+  }
+  function scrollPlugin() {
+      return function (fp) {
+          var monthScroller = scrollMonth(fp);
+          return {
+              onReady: function () {
+                  if (fp.timeContainer) {
+                      fp.timeContainer.addEventListener("wheel", scroll);
+                  }
+                  fp.yearElements.forEach(function (yearElem) {
+                      return yearElem.addEventListener("wheel", scroll);
+                  });
+                  fp.monthElements.forEach(function (monthElem) {
+                      return monthElem.addEventListener("wheel", monthScroller);
+                  });
+                  fp.loadedPlugins.push("scroll");
+              },
+              onDestroy: function () {
+                  if (fp.timeContainer) {
+                      fp.timeContainer.removeEventListener("wheel", scroll);
+                  }
+                  fp.yearElements.forEach(function (yearElem) {
+                      return yearElem.removeEventListener("wheel", scroll);
+                  });
+                  fp.monthElements.forEach(function (monthElem) {
+                      return monthElem.removeEventListener("wheel", monthScroller);
+                  });
+              }
+          };
+      };
+  }
+
+  return scrollPlugin;
+
+}));
diff --git a/backoffice/vendors/flatpickr/plugins/weekSelect/weekSelect.d.ts b/backoffice/vendors/flatpickr/plugins/weekSelect/weekSelect.d.ts
new file mode 100644 (file)
index 0000000..88cc964
--- /dev/null
@@ -0,0 +1,7 @@
+import { Plugin } from "../../types/options";
+export declare type PlusWeeks = {
+    weekStartDay: Date;
+    weekEndDay: Date;
+};
+declare function weekSelectPlugin(): Plugin<PlusWeeks>;
+export default weekSelectPlugin;
diff --git a/backoffice/vendors/flatpickr/plugins/weekSelect/weekSelect.js b/backoffice/vendors/flatpickr/plugins/weekSelect/weekSelect.js
new file mode 100644 (file)
index 0000000..e8792ed
--- /dev/null
@@ -0,0 +1,86 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = global || self, global.weekSelect = factory());
+}(this, function () { 'use strict';
+
+  function weekSelectPlugin() {
+      return function (fp) {
+          function onDayHover(event) {
+              var day = event.target;
+              if (!day.classList.contains("flatpickr-day"))
+                  return;
+              var days = fp.days.childNodes;
+              var dayIndex = day.$i;
+              var dayIndSeven = dayIndex / 7;
+              var weekStartDay = days[7 * Math.floor(dayIndSeven)]
+                  .dateObj;
+              var weekEndDay = days[7 * Math.ceil(dayIndSeven + 0.01) - 1].dateObj;
+              for (var i = days.length; i--;) {
+                  var day_1 = days[i];
+                  var date = day_1.dateObj;
+                  if (date > weekEndDay || date < weekStartDay)
+                      day_1.classList.remove("inRange");
+                  else
+                      day_1.classList.add("inRange");
+              }
+          }
+          function highlightWeek() {
+              var selDate = fp.latestSelectedDateObj;
+              if (selDate !== undefined &&
+                  selDate.getMonth() === fp.currentMonth &&
+                  selDate.getFullYear() === fp.currentYear) {
+                  fp.weekStartDay = fp.days.childNodes[7 * Math.floor(fp.selectedDateElem.$i / 7)].dateObj;
+                  fp.weekEndDay = fp.days.childNodes[7 * Math.ceil(fp.selectedDateElem.$i / 7 + 0.01) - 1].dateObj;
+              }
+              var days = fp.days.childNodes;
+              for (var i = days.length; i--;) {
+                  var date = days[i].dateObj;
+                  if (date >= fp.weekStartDay && date <= fp.weekEndDay)
+                      days[i].classList.add("week", "selected");
+              }
+          }
+          function clearHover() {
+              var days = fp.days.childNodes;
+              for (var i = days.length; i--;)
+                  days[i].classList.remove("inRange");
+          }
+          function onReady() {
+              if (fp.daysContainer !== undefined)
+                  fp.daysContainer.addEventListener("mouseover", onDayHover);
+          }
+          function onDestroy() {
+              if (fp.daysContainer !== undefined)
+                  fp.daysContainer.removeEventListener("mouseover", onDayHover);
+          }
+          return {
+              onValueUpdate: highlightWeek,
+              onMonthChange: highlightWeek,
+              onYearChange: highlightWeek,
+              onOpen: highlightWeek,
+              onClose: clearHover,
+              onParseConfig: function () {
+                  fp.config.mode = "single";
+                  fp.config.enableTime = false;
+                  fp.config.dateFormat = fp.config.dateFormat
+                      ? fp.config.dateFormat
+                      : "\\W\\e\\e\\k #W, Y";
+                  fp.config.altFormat = fp.config.altFormat
+                      ? fp.config.altFormat
+                      : "\\W\\e\\e\\k #W, Y";
+              },
+              onReady: [
+                  onReady,
+                  highlightWeek,
+                  function () {
+                      fp.loadedPlugins.push("weekSelect");
+                  },
+              ],
+              onDestroy: onDestroy
+          };
+      };
+  }
+
+  return weekSelectPlugin;
+
+}));
diff --git a/backoffice/vendors/flatpickr/themes/airbnb.css b/backoffice/vendors/flatpickr/themes/airbnb.css
new file mode 100644 (file)
index 0000000..c47c711
--- /dev/null
@@ -0,0 +1,872 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  background: #fff;
+  -webkit-box-shadow: 1px 0 0 #eee, -1px 0 0 #eee, 0 1px 0 #eee, 0 -1px 0 #eee, 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 1px 0 0 #eee, -1px 0 0 #eee, 0 1px 0 #eee, 0 -1px 0 #eee, 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid #eee;
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: #eee;
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #fff;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: #eee;
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #fff;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  background: transparent;
+  color: #3c3f40;
+  fill: #3c3f40;
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: #3c3f40;
+  fill: #3c3f40;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(64,72,72,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(0,0,0,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(0,0,0,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(64,72,72,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(64,72,72,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(60,63,64,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(0,0,0,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #3c3f40;
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: #3c3f40;
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(60,63,64,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: transparent;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: transparent;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: transparent;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: transparent;
+  color: rgba(0,0,0,0.54);
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 #eee;
+          box-shadow: -1px 0 0 #eee;
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: #404848;
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #e9e9e9;
+  border-color: #e9e9e9;
+}
+.flatpickr-day.today {
+  border-color: #f64747;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #f64747;
+  background: #f64747;
+  color: #fff;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #4f99ff;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #4f99ff;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #4f99ff;
+          box-shadow: -10px 0 0 #4f99ff;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #e9e9e9, 5px 0 0 #e9e9e9;
+          box-shadow: -5px 0 0 #e9e9e9, 5px 0 0 #e9e9e9;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(64,72,72,0.3);
+  background: transparent;
+  border-color: #e9e9e9;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(64,72,72,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #4f99ff, 5px 0 0 #4f99ff;
+          box-shadow: -5px 0 0 #4f99ff, 5px 0 0 #4f99ff;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  -webkit-box-shadow: 1px 0 0 #eee;
+          box-shadow: 1px 0 0 #eee;
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(64,72,72,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #404848;
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: #404848;
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: #404848;
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: #404848;
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #f1f1f1;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+.flatpickr-calendar {
+  width: 307.875px;
+}
+.dayContainer {
+  padding: 0;
+  border-right: 0;
+}
+span.flatpickr-day,
+span.flatpickr-day.prevMonthDay,
+span.flatpickr-day.nextMonthDay {
+  border-radius: 0 !important;
+  border: 1px solid #e9e9e9;
+  max-width: none;
+  border-right-color: transparent;
+}
+span.flatpickr-day:nth-child(n+8),
+span.flatpickr-day.prevMonthDay:nth-child(n+8),
+span.flatpickr-day.nextMonthDay:nth-child(n+8) {
+  border-top-color: transparent;
+}
+span.flatpickr-day:nth-child(7n-6),
+span.flatpickr-day.prevMonthDay:nth-child(7n-6),
+span.flatpickr-day.nextMonthDay:nth-child(7n-6) {
+  border-left: 0;
+}
+span.flatpickr-day:nth-child(n+36),
+span.flatpickr-day.prevMonthDay:nth-child(n+36),
+span.flatpickr-day.nextMonthDay:nth-child(n+36) {
+  border-bottom: 0;
+}
+span.flatpickr-day:nth-child(-n+7),
+span.flatpickr-day.prevMonthDay:nth-child(-n+7),
+span.flatpickr-day.nextMonthDay:nth-child(-n+7) {
+  margin-top: 0;
+}
+span.flatpickr-day.today:not(.selected),
+span.flatpickr-day.prevMonthDay.today:not(.selected),
+span.flatpickr-day.nextMonthDay.today:not(.selected) {
+  border-color: #e9e9e9;
+  border-right-color: transparent;
+  border-top-color: transparent;
+  border-bottom-color: #f64747;
+}
+span.flatpickr-day.today:not(.selected):hover,
+span.flatpickr-day.prevMonthDay.today:not(.selected):hover,
+span.flatpickr-day.nextMonthDay.today:not(.selected):hover {
+  border: 1px solid #f64747;
+}
+span.flatpickr-day.startRange,
+span.flatpickr-day.prevMonthDay.startRange,
+span.flatpickr-day.nextMonthDay.startRange,
+span.flatpickr-day.endRange,
+span.flatpickr-day.prevMonthDay.endRange,
+span.flatpickr-day.nextMonthDay.endRange {
+  border-color: #4f99ff;
+}
+span.flatpickr-day.today,
+span.flatpickr-day.prevMonthDay.today,
+span.flatpickr-day.nextMonthDay.today,
+span.flatpickr-day.selected,
+span.flatpickr-day.prevMonthDay.selected,
+span.flatpickr-day.nextMonthDay.selected {
+  z-index: 2;
+}
+.rangeMode .flatpickr-day {
+  margin-top: -1px;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.flatpickr-weekwrapper span.flatpickr-day {
+  border: 0;
+  margin: -1px 0 0 -1px;
+}
+.hasWeeks .flatpickr-days {
+  border-right: 0;
+}
+
+       @media screen and (min-width:0\0) and (min-resolution: +72dpi) {
+               span.flatpickr-day {
+                       display: block;
+                       -webkit-box-flex: 1;
+                       -webkit-flex: 1 0 auto;
+                           -ms-flex: 1 0 auto;
+                               flex: 1 0 auto;
+               }
+       }
diff --git a/backoffice/vendors/flatpickr/themes/confetti.css b/backoffice/vendors/flatpickr/themes/confetti.css
new file mode 100644 (file)
index 0000000..d663ae3
--- /dev/null
@@ -0,0 +1,795 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  -webkit-box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid rgba(72,72,72,0.1);
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-innerContainer {
+  border-bottom: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  border: 1px solid rgba(72,72,72,0.1);
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: rgba(72,72,72,0.1);
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #ffb866;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: rgba(72,72,72,0.1);
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #ffb866;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  border-radius: 5px 5px 0 0;
+  background: #ffb866;
+  color: #fff;
+  fill: #fff;
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: #fff;
+  fill: #fff;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #bbb;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(72,72,72,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(0,0,0,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(0,0,0,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(72,72,72,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(72,72,72,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(255,255,255,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(0,0,0,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #fff;
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: #fff;
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(255,255,255,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: #ffb866;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: #ffb866;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: #ffb866;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: #ffb866;
+  color: rgba(0,0,0,0.54);
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+  border-left: 1px solid rgba(72,72,72,0.1);
+  border-right: 1px solid rgba(72,72,72,0.1);
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 rgba(72,72,72,0.1);
+          box-shadow: -1px 0 0 rgba(72,72,72,0.1);
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: #484848;
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #e2e2e2;
+  border-color: #e2e2e2;
+}
+.flatpickr-day.today {
+  border-color: #bbb;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #bbb;
+  background: #bbb;
+  color: #fff;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #ffb866;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #ffb866;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #ffb866;
+          box-shadow: -10px 0 0 #ffb866;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+          box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  border-color: transparent;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(72,72,72,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #ffb866, 5px 0 0 #ffb866;
+          box-shadow: -5px 0 0 #ffb866, 5px 0 0 #ffb866;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  border-left: 1px solid rgba(72,72,72,0.1);
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  background: #fff;
+  border-bottom: 1px solid rgba(72,72,72,0.1);
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  background: #fff;
+  border-radius: 0 0 5px 5px;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #484848;
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: #484848;
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: #484848;
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: #484848;
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #eaeaea;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
diff --git a/backoffice/vendors/flatpickr/themes/dark.css b/backoffice/vendors/flatpickr/themes/dark.css
new file mode 100644 (file)
index 0000000..e3518cc
--- /dev/null
@@ -0,0 +1,784 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  background: #3f4458;
+  -webkit-box-shadow: 1px 0 0 #20222c, -1px 0 0 #20222c, 0 1px 0 #20222c, 0 -1px 0 #20222c, 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 1px 0 0 #20222c, -1px 0 0 #20222c, 0 1px 0 #20222c, 0 -1px 0 #20222c, 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid #20222c;
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: #20222c;
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #3f4458;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: #20222c;
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #3f4458;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  background: #3f4458;
+  color: #fff;
+  fill: #fff;
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: #fff;
+  fill: #fff;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #eee;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(255,255,255,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(192,187,167,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(192,187,167,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(255,255,255,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(255,255,255,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(255,255,255,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(192,187,167,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(192,187,167,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #fff;
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: #fff;
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(255,255,255,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: #3f4458;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(192,187,167,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: #3f4458;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: transparent;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: #3f4458;
+  color: #fff;
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 #20222c;
+          box-shadow: -1px 0 0 #20222c;
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: rgba(255,255,255,0.95);
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #646c8c;
+  border-color: #646c8c;
+}
+.flatpickr-day.today {
+  border-color: #eee;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #eee;
+  background: #eee;
+  color: #3f4458;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #80cbc4;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #80cbc4;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #80cbc4;
+          box-shadow: -10px 0 0 #80cbc4;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #646c8c, 5px 0 0 #646c8c;
+          box-shadow: -5px 0 0 #646c8c, 5px 0 0 #646c8c;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(255,255,255,0.3);
+  background: transparent;
+  border-color: transparent;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(255,255,255,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #80cbc4, 5px 0 0 #80cbc4;
+          box-shadow: -5px 0 0 #80cbc4, 5px 0 0 #80cbc4;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  -webkit-box-shadow: 1px 0 0 #20222c;
+          box-shadow: 1px 0 0 #20222c;
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(255,255,255,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: rgba(255,255,255,0.95);
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: rgba(255,255,255,0.95);
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: rgba(255,255,255,0.95);
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: rgba(255,255,255,0.95);
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #6a7395;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
diff --git a/backoffice/vendors/flatpickr/themes/light.css b/backoffice/vendors/flatpickr/themes/light.css
new file mode 100644 (file)
index 0000000..da9e4a8
--- /dev/null
@@ -0,0 +1,798 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  -webkit-box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid #eceef1;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-innerContainer {
+  border-bottom: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  border: 1px solid #eceef1;
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: #eceef1;
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #eceef1;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: #eceef1;
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #eceef1;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  border-radius: 5px 5px 0 0;
+  background: #eceef1;
+  color: #5a6171;
+  fill: #5a6171;
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: #5a6171;
+  fill: #5a6171;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #bbb;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(72,72,72,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(0,0,0,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(0,0,0,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(72,72,72,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(72,72,72,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(90,97,113,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(0,0,0,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #5a6171;
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: #5a6171;
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(90,97,113,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: #eceef1;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: #eceef1;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: #eceef1;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: #eceef1;
+  color: #5a6171;
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+  border-left: 1px solid #eceef1;
+  border-right: 1px solid #eceef1;
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 #eceef1;
+          box-shadow: -1px 0 0 #eceef1;
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: #484848;
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #e2e2e2;
+  border-color: #e2e2e2;
+}
+.flatpickr-day.today {
+  border-color: #bbb;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #bbb;
+  background: #bbb;
+  color: #fff;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #ff5a5f;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #ff5a5f;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #ff5a5f;
+          box-shadow: -10px 0 0 #ff5a5f;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+          box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  border-color: transparent;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(72,72,72,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #ff5a5f, 5px 0 0 #ff5a5f;
+          box-shadow: -5px 0 0 #ff5a5f, 5px 0 0 #ff5a5f;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  border-left: 1px solid #eceef1;
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  background: #fff;
+  border-bottom: 1px solid #eceef1;
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  background: #fff;
+  border-radius: 0 0 5px 5px;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #484848;
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: #484848;
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: #484848;
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: #484848;
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #eaeaea;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+span.flatpickr-day.selected {
+  font-weight: bold;
+}
diff --git a/backoffice/vendors/flatpickr/themes/material_blue.css b/backoffice/vendors/flatpickr/themes/material_blue.css
new file mode 100644 (file)
index 0000000..5368deb
--- /dev/null
@@ -0,0 +1,795 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  -webkit-box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-innerContainer {
+  border-bottom: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  border: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #42a5f5;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #42a5f5;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  border-radius: 5px 5px 0 0;
+  background: #42a5f5;
+  color: #fff;
+  fill: #fff;
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: #fff;
+  fill: #fff;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #bbb;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(72,72,72,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(0,0,0,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(0,0,0,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(72,72,72,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(72,72,72,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(255,255,255,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(0,0,0,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #fff;
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: #fff;
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(255,255,255,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: #42a5f5;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: #42a5f5;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: #42a5f5;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: #42a5f5;
+  color: rgba(0,0,0,0.54);
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+  border-left: 1px solid rgba(72,72,72,0.2);
+  border-right: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 rgba(72,72,72,0.2);
+          box-shadow: -1px 0 0 rgba(72,72,72,0.2);
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: #484848;
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #e2e2e2;
+  border-color: #e2e2e2;
+}
+.flatpickr-day.today {
+  border-color: #bbb;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #bbb;
+  background: #bbb;
+  color: #fff;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #42a5f5;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #42a5f5;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #42a5f5;
+          box-shadow: -10px 0 0 #42a5f5;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+          box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  border-color: transparent;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(72,72,72,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #42a5f5, 5px 0 0 #42a5f5;
+          box-shadow: -5px 0 0 #42a5f5, 5px 0 0 #42a5f5;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  border-left: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  background: #fff;
+  border-bottom: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  background: #fff;
+  border-radius: 0 0 5px 5px;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #484848;
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: #484848;
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: #484848;
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: #484848;
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #eaeaea;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
diff --git a/backoffice/vendors/flatpickr/themes/material_green.css b/backoffice/vendors/flatpickr/themes/material_green.css
new file mode 100644 (file)
index 0000000..f4719f2
--- /dev/null
@@ -0,0 +1,795 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  -webkit-box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-innerContainer {
+  border-bottom: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  border: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #1bbc9b;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #1bbc9b;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  border-radius: 5px 5px 0 0;
+  background: #1bbc9b;
+  color: #fff;
+  fill: #fff;
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: #fff;
+  fill: #fff;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #bbb;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(72,72,72,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(0,0,0,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(0,0,0,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(72,72,72,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(72,72,72,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(255,255,255,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(0,0,0,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #fff;
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: #fff;
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(255,255,255,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: #1bbc9b;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: #1bbc9b;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: #1bbc9b;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: #1bbc9b;
+  color: rgba(0,0,0,0.54);
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+  border-left: 1px solid rgba(72,72,72,0.2);
+  border-right: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 rgba(72,72,72,0.2);
+          box-shadow: -1px 0 0 rgba(72,72,72,0.2);
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: #484848;
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #e2e2e2;
+  border-color: #e2e2e2;
+}
+.flatpickr-day.today {
+  border-color: #bbb;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #bbb;
+  background: #bbb;
+  color: #fff;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #1bbc9b;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #1bbc9b;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #1bbc9b;
+          box-shadow: -10px 0 0 #1bbc9b;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+          box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  border-color: transparent;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(72,72,72,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #1bbc9b, 5px 0 0 #1bbc9b;
+          box-shadow: -5px 0 0 #1bbc9b, 5px 0 0 #1bbc9b;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  border-left: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  background: #fff;
+  border-bottom: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  background: #fff;
+  border-radius: 0 0 5px 5px;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #484848;
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: #484848;
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: #484848;
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: #484848;
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #eaeaea;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
diff --git a/backoffice/vendors/flatpickr/themes/material_orange.css b/backoffice/vendors/flatpickr/themes/material_orange.css
new file mode 100644 (file)
index 0000000..8ee7d2b
--- /dev/null
@@ -0,0 +1,795 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  -webkit-box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-innerContainer {
+  border-bottom: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  border: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #ff8a65;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #ff8a65;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  border-radius: 5px 5px 0 0;
+  background: #ff8a65;
+  color: #fff;
+  fill: #fff;
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: #fff;
+  fill: #fff;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #bbb;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(72,72,72,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(0,0,0,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(0,0,0,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(72,72,72,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(72,72,72,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(255,255,255,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(0,0,0,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #fff;
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: #fff;
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(255,255,255,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: #ff8a65;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: #ff8a65;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: #ff8a65;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: #ff8a65;
+  color: rgba(0,0,0,0.54);
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+  border-left: 1px solid rgba(72,72,72,0.2);
+  border-right: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 rgba(72,72,72,0.2);
+          box-shadow: -1px 0 0 rgba(72,72,72,0.2);
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: #484848;
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #e2e2e2;
+  border-color: #e2e2e2;
+}
+.flatpickr-day.today {
+  border-color: #bbb;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #bbb;
+  background: #bbb;
+  color: #fff;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #ff8a65;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #ff8a65;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #ff8a65;
+          box-shadow: -10px 0 0 #ff8a65;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+          box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  border-color: transparent;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(72,72,72,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #ff8a65, 5px 0 0 #ff8a65;
+          box-shadow: -5px 0 0 #ff8a65, 5px 0 0 #ff8a65;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  border-left: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  background: #fff;
+  border-bottom: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  background: #fff;
+  border-radius: 0 0 5px 5px;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #484848;
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: #484848;
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: #484848;
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: #484848;
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #eaeaea;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
diff --git a/backoffice/vendors/flatpickr/themes/material_red.css b/backoffice/vendors/flatpickr/themes/material_red.css
new file mode 100644 (file)
index 0000000..159c6a6
--- /dev/null
@@ -0,0 +1,795 @@
+.flatpickr-calendar {
+  background: transparent;
+  opacity: 0;
+  display: none;
+  text-align: center;
+  visibility: hidden;
+  padding: 0;
+  -webkit-animation: none;
+          animation: none;
+  direction: ltr;
+  border: 0;
+  font-size: 14px;
+  line-height: 24px;
+  border-radius: 5px;
+  position: absolute;
+  width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  -webkit-box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+          box-shadow: 0 3px 13px rgba(0,0,0,0.08);
+}
+.flatpickr-calendar.open,
+.flatpickr-calendar.inline {
+  opacity: 1;
+  max-height: 640px;
+  visibility: visible;
+}
+.flatpickr-calendar.open {
+  display: inline-block;
+  z-index: 99999;
+}
+.flatpickr-calendar.animate.open {
+  -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+          animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
+}
+.flatpickr-calendar.inline {
+  display: block;
+  position: relative;
+  top: 2px;
+}
+.flatpickr-calendar.static {
+  position: absolute;
+  top: calc(100% + 2px);
+}
+.flatpickr-calendar.static.open {
+  z-index: 999;
+  display: block;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
+  -webkit-box-shadow: none !important;
+          box-shadow: none !important;
+}
+.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
+  -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+          box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
+}
+.flatpickr-calendar .hasWeeks .dayContainer,
+.flatpickr-calendar .hasTime .dayContainer {
+  border-bottom: 0;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.flatpickr-calendar .hasWeeks .dayContainer {
+  border-left: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  height: 40px;
+  border-top: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-innerContainer {
+  border-bottom: 0;
+}
+.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
+  border: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
+  height: auto;
+}
+.flatpickr-calendar:before,
+.flatpickr-calendar:after {
+  position: absolute;
+  display: block;
+  pointer-events: none;
+  border: solid transparent;
+  content: '';
+  height: 0;
+  width: 0;
+  left: 22px;
+}
+.flatpickr-calendar.rightMost:before,
+.flatpickr-calendar.rightMost:after {
+  left: auto;
+  right: 22px;
+}
+.flatpickr-calendar:before {
+  border-width: 5px;
+  margin: 0 -5px;
+}
+.flatpickr-calendar:after {
+  border-width: 4px;
+  margin: 0 -4px;
+}
+.flatpickr-calendar.arrowTop:before,
+.flatpickr-calendar.arrowTop:after {
+  bottom: 100%;
+}
+.flatpickr-calendar.arrowTop:before {
+  border-bottom-color: rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.arrowTop:after {
+  border-bottom-color: #ef5350;
+}
+.flatpickr-calendar.arrowBottom:before,
+.flatpickr-calendar.arrowBottom:after {
+  top: 100%;
+}
+.flatpickr-calendar.arrowBottom:before {
+  border-top-color: rgba(72,72,72,0.2);
+}
+.flatpickr-calendar.arrowBottom:after {
+  border-top-color: #ef5350;
+}
+.flatpickr-calendar:focus {
+  outline: 0;
+}
+.flatpickr-wrapper {
+  position: relative;
+  display: inline-block;
+}
+.flatpickr-months {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+}
+.flatpickr-months .flatpickr-month {
+  border-radius: 5px 5px 0 0;
+  background: #ef5350;
+  color: #fff;
+  fill: #fff;
+  height: 34px;
+  line-height: 1;
+  text-align: center;
+  position: relative;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  overflow: hidden;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+.flatpickr-months .flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month {
+  text-decoration: none;
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  height: 34px;
+  padding: 10px;
+  z-index: 3;
+  color: #fff;
+  fill: #fff;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
+.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
+  display: none;
+}
+.flatpickr-months .flatpickr-prev-month i,
+.flatpickr-months .flatpickr-next-month i {
+  position: relative;
+}
+.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  left: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
+.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
+/*
+      /*rtl:begin:ignore*/
+/*
+      */
+  right: 0;
+/*
+      /*rtl:end:ignore*/
+/*
+      */
+}
+/*
+      /*rtl:begin:ignore*/
+/*
+      /*rtl:end:ignore*/
+.flatpickr-months .flatpickr-prev-month:hover,
+.flatpickr-months .flatpickr-next-month:hover {
+  color: #bbb;
+}
+.flatpickr-months .flatpickr-prev-month:hover svg,
+.flatpickr-months .flatpickr-next-month:hover svg {
+  fill: #f64747;
+}
+.flatpickr-months .flatpickr-prev-month svg,
+.flatpickr-months .flatpickr-next-month svg {
+  width: 14px;
+  height: 14px;
+}
+.flatpickr-months .flatpickr-prev-month svg path,
+.flatpickr-months .flatpickr-next-month svg path {
+  -webkit-transition: fill 0.1s;
+  transition: fill 0.1s;
+  fill: inherit;
+}
+.numInputWrapper {
+  position: relative;
+  height: auto;
+}
+.numInputWrapper input,
+.numInputWrapper span {
+  display: inline-block;
+}
+.numInputWrapper input {
+  width: 100%;
+}
+.numInputWrapper input::-ms-clear {
+  display: none;
+}
+.numInputWrapper input::-webkit-outer-spin-button,
+.numInputWrapper input::-webkit-inner-spin-button {
+  margin: 0;
+  -webkit-appearance: none;
+}
+.numInputWrapper span {
+  position: absolute;
+  right: 0;
+  width: 14px;
+  padding: 0 4px 0 2px;
+  height: 50%;
+  line-height: 50%;
+  opacity: 0;
+  cursor: pointer;
+  border: 1px solid rgba(72,72,72,0.15);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.numInputWrapper span:hover {
+  background: rgba(0,0,0,0.1);
+}
+.numInputWrapper span:active {
+  background: rgba(0,0,0,0.2);
+}
+.numInputWrapper span:after {
+  display: block;
+  content: "";
+  position: absolute;
+}
+.numInputWrapper span.arrowUp {
+  top: 0;
+  border-bottom: 0;
+}
+.numInputWrapper span.arrowUp:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-bottom: 4px solid rgba(72,72,72,0.6);
+  top: 26%;
+}
+.numInputWrapper span.arrowDown {
+  top: 50%;
+}
+.numInputWrapper span.arrowDown:after {
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid rgba(72,72,72,0.6);
+  top: 40%;
+}
+.numInputWrapper span svg {
+  width: inherit;
+  height: auto;
+}
+.numInputWrapper span svg path {
+  fill: rgba(255,255,255,0.5);
+}
+.numInputWrapper:hover {
+  background: rgba(0,0,0,0.05);
+}
+.numInputWrapper:hover span {
+  opacity: 1;
+}
+.flatpickr-current-month {
+  font-size: 135%;
+  line-height: inherit;
+  font-weight: 300;
+  color: inherit;
+  position: absolute;
+  width: 75%;
+  left: 12.5%;
+  padding: 7.48px 0 0 0;
+  line-height: 1;
+  height: 34px;
+  display: inline-block;
+  text-align: center;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+}
+.flatpickr-current-month span.cur-month {
+  font-family: inherit;
+  font-weight: 700;
+  color: inherit;
+  display: inline-block;
+  margin-left: 0.5ch;
+  padding: 0;
+}
+.flatpickr-current-month span.cur-month:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .numInputWrapper {
+  width: 6ch;
+  width: 7ch\0;
+  display: inline-block;
+}
+.flatpickr-current-month .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #fff;
+}
+.flatpickr-current-month .numInputWrapper span.arrowDown:after {
+  border-top-color: #fff;
+}
+.flatpickr-current-month input.cur-year {
+  background: transparent;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: inherit;
+  cursor: text;
+  padding: 0 0 0 0.5ch;
+  margin: 0;
+  display: inline-block;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  line-height: inherit;
+  height: auto;
+  border: 0;
+  border-radius: 0;
+  vertical-align: initial;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-current-month input.cur-year:focus {
+  outline: 0;
+}
+.flatpickr-current-month input.cur-year[disabled],
+.flatpickr-current-month input.cur-year[disabled]:hover {
+  font-size: 100%;
+  color: rgba(255,255,255,0.5);
+  background: transparent;
+  pointer-events: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months {
+  appearance: menulist;
+  background: #ef5350;
+  border: none;
+  border-radius: 0;
+  box-sizing: border-box;
+  color: inherit;
+  cursor: pointer;
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: 300;
+  height: auto;
+  line-height: inherit;
+  margin: -1px 0 0 0;
+  outline: none;
+  padding: 0 0 0 0.5ch;
+  position: relative;
+  vertical-align: initial;
+  -webkit-box-sizing: border-box;
+  -webkit-appearance: menulist;
+  -moz-appearance: menulist;
+  width: auto;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
+.flatpickr-current-month .flatpickr-monthDropdown-months:active {
+  outline: none;
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
+  background: rgba(0,0,0,0.05);
+}
+.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
+  background-color: #ef5350;
+  outline: none;
+  padding: 0;
+}
+.flatpickr-weekdays {
+  background: #ef5350;
+  text-align: center;
+  overflow: hidden;
+  width: 100%;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 28px;
+}
+.flatpickr-weekdays .flatpickr-weekdaycontainer {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+}
+span.flatpickr-weekday {
+  cursor: default;
+  font-size: 90%;
+  background: #ef5350;
+  color: rgba(0,0,0,0.54);
+  line-height: 1;
+  margin: 0;
+  text-align: center;
+  display: block;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  font-weight: bolder;
+}
+.dayContainer,
+.flatpickr-weeks {
+  padding: 1px 0 0 0;
+}
+.flatpickr-days {
+  position: relative;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: start;
+  -webkit-align-items: flex-start;
+      -ms-flex-align: start;
+          align-items: flex-start;
+  width: 307.875px;
+  border-left: 1px solid rgba(72,72,72,0.2);
+  border-right: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-days:focus {
+  outline: 0;
+}
+.dayContainer {
+  padding: 0;
+  outline: 0;
+  text-align: left;
+  width: 307.875px;
+  min-width: 307.875px;
+  max-width: 307.875px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  display: inline-block;
+  display: -ms-flexbox;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+  -webkit-flex-wrap: wrap;
+          flex-wrap: wrap;
+  -ms-flex-wrap: wrap;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-around;
+          justify-content: space-around;
+  -webkit-transform: translate3d(0px, 0px, 0px);
+          transform: translate3d(0px, 0px, 0px);
+  opacity: 1;
+}
+.dayContainer + .dayContainer {
+  -webkit-box-shadow: -1px 0 0 rgba(72,72,72,0.2);
+          box-shadow: -1px 0 0 rgba(72,72,72,0.2);
+}
+.flatpickr-day {
+  background: none;
+  border: 1px solid transparent;
+  border-radius: 150px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  color: #484848;
+  cursor: pointer;
+  font-weight: 400;
+  width: 14.2857143%;
+  -webkit-flex-basis: 14.2857143%;
+      -ms-flex-preferred-size: 14.2857143%;
+          flex-basis: 14.2857143%;
+  max-width: 39px;
+  height: 39px;
+  line-height: 39px;
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  text-align: center;
+}
+.flatpickr-day.inRange,
+.flatpickr-day.prevMonthDay.inRange,
+.flatpickr-day.nextMonthDay.inRange,
+.flatpickr-day.today.inRange,
+.flatpickr-day.prevMonthDay.today.inRange,
+.flatpickr-day.nextMonthDay.today.inRange,
+.flatpickr-day:hover,
+.flatpickr-day.prevMonthDay:hover,
+.flatpickr-day.nextMonthDay:hover,
+.flatpickr-day:focus,
+.flatpickr-day.prevMonthDay:focus,
+.flatpickr-day.nextMonthDay:focus {
+  cursor: pointer;
+  outline: 0;
+  background: #e2e2e2;
+  border-color: #e2e2e2;
+}
+.flatpickr-day.today {
+  border-color: #bbb;
+}
+.flatpickr-day.today:hover,
+.flatpickr-day.today:focus {
+  border-color: #bbb;
+  background: #bbb;
+  color: #fff;
+}
+.flatpickr-day.selected,
+.flatpickr-day.startRange,
+.flatpickr-day.endRange,
+.flatpickr-day.selected.inRange,
+.flatpickr-day.startRange.inRange,
+.flatpickr-day.endRange.inRange,
+.flatpickr-day.selected:focus,
+.flatpickr-day.startRange:focus,
+.flatpickr-day.endRange:focus,
+.flatpickr-day.selected:hover,
+.flatpickr-day.startRange:hover,
+.flatpickr-day.endRange:hover,
+.flatpickr-day.selected.prevMonthDay,
+.flatpickr-day.startRange.prevMonthDay,
+.flatpickr-day.endRange.prevMonthDay,
+.flatpickr-day.selected.nextMonthDay,
+.flatpickr-day.startRange.nextMonthDay,
+.flatpickr-day.endRange.nextMonthDay {
+  background: #ef5350;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  color: #fff;
+  border-color: #ef5350;
+}
+.flatpickr-day.selected.startRange,
+.flatpickr-day.startRange.startRange,
+.flatpickr-day.endRange.startRange {
+  border-radius: 50px 0 0 50px;
+}
+.flatpickr-day.selected.endRange,
+.flatpickr-day.startRange.endRange,
+.flatpickr-day.endRange.endRange {
+  border-radius: 0 50px 50px 0;
+}
+.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
+.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
+  -webkit-box-shadow: -10px 0 0 #ef5350;
+          box-shadow: -10px 0 0 #ef5350;
+}
+.flatpickr-day.selected.startRange.endRange,
+.flatpickr-day.startRange.startRange.endRange,
+.flatpickr-day.endRange.startRange.endRange {
+  border-radius: 50px;
+}
+.flatpickr-day.inRange {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+          box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover,
+.flatpickr-day.prevMonthDay,
+.flatpickr-day.nextMonthDay,
+.flatpickr-day.notAllowed,
+.flatpickr-day.notAllowed.prevMonthDay,
+.flatpickr-day.notAllowed.nextMonthDay {
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  border-color: transparent;
+  cursor: default;
+}
+.flatpickr-day.flatpickr-disabled,
+.flatpickr-day.flatpickr-disabled:hover {
+  cursor: not-allowed;
+  color: rgba(72,72,72,0.1);
+}
+.flatpickr-day.week.selected {
+  border-radius: 0;
+  -webkit-box-shadow: -5px 0 0 #ef5350, 5px 0 0 #ef5350;
+          box-shadow: -5px 0 0 #ef5350, 5px 0 0 #ef5350;
+}
+.flatpickr-day.hidden {
+  visibility: hidden;
+}
+.rangeMode .flatpickr-day {
+  margin-top: 1px;
+}
+.flatpickr-weekwrapper {
+  float: left;
+}
+.flatpickr-weekwrapper .flatpickr-weeks {
+  padding: 0 12px;
+  border-left: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-weekwrapper .flatpickr-weekday {
+  float: none;
+  width: 100%;
+  line-height: 28px;
+}
+.flatpickr-weekwrapper span.flatpickr-day,
+.flatpickr-weekwrapper span.flatpickr-day:hover {
+  display: block;
+  width: 100%;
+  max-width: none;
+  color: rgba(72,72,72,0.3);
+  background: transparent;
+  cursor: default;
+  border: none;
+}
+.flatpickr-innerContainer {
+  display: block;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  background: #fff;
+  border-bottom: 1px solid rgba(72,72,72,0.2);
+}
+.flatpickr-rContainer {
+  display: inline-block;
+  padding: 0;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+.flatpickr-time {
+  text-align: center;
+  outline: 0;
+  display: block;
+  height: 0;
+  line-height: 40px;
+  max-height: 40px;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  background: #fff;
+  border-radius: 0 0 5px 5px;
+}
+.flatpickr-time:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.flatpickr-time .numInputWrapper {
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  width: 40%;
+  height: 40px;
+  float: left;
+}
+.flatpickr-time .numInputWrapper span.arrowUp:after {
+  border-bottom-color: #484848;
+}
+.flatpickr-time .numInputWrapper span.arrowDown:after {
+  border-top-color: #484848;
+}
+.flatpickr-time.hasSeconds .numInputWrapper {
+  width: 26%;
+}
+.flatpickr-time.time24hr .numInputWrapper {
+  width: 49%;
+}
+.flatpickr-time input {
+  background: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  border: 0;
+  border-radius: 0;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: inherit;
+  line-height: inherit;
+  color: #484848;
+  font-size: 14px;
+  position: relative;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-appearance: textfield;
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
+.flatpickr-time input.flatpickr-hour {
+  font-weight: bold;
+}
+.flatpickr-time input.flatpickr-minute,
+.flatpickr-time input.flatpickr-second {
+  font-weight: 400;
+}
+.flatpickr-time input:focus {
+  outline: 0;
+  border: 0;
+}
+.flatpickr-time .flatpickr-time-separator,
+.flatpickr-time .flatpickr-am-pm {
+  height: inherit;
+  float: left;
+  line-height: inherit;
+  color: #484848;
+  font-weight: bold;
+  width: 2%;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  -webkit-align-self: center;
+      -ms-flex-item-align: center;
+          align-self: center;
+}
+.flatpickr-time .flatpickr-am-pm {
+  outline: 0;
+  width: 18%;
+  cursor: pointer;
+  text-align: center;
+  font-weight: 400;
+}
+.flatpickr-time input:hover,
+.flatpickr-time .flatpickr-am-pm:hover,
+.flatpickr-time input:focus,
+.flatpickr-time .flatpickr-am-pm:focus {
+  background: #eaeaea;
+}
+.flatpickr-input[readonly] {
+  cursor: pointer;
+}
+@-webkit-keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+@keyframes fpFadeInDown {
+  from {
+    opacity: 0;
+    -webkit-transform: translate3d(0, -20px, 0);
+            transform: translate3d(0, -20px, 0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
diff --git a/backoffice/vendors/flatpickr/types/globals.d.ts b/backoffice/vendors/flatpickr/types/globals.d.ts
new file mode 100644 (file)
index 0000000..a36e45b
--- /dev/null
@@ -0,0 +1,20 @@
+import { Options } from "./options";
+import { Instance, FlatpickrFn } from "./instance";
+declare global {
+    interface HTMLElement {
+        flatpickr: (config?: Options) => Instance;
+        _flatpickr?: Instance;
+    }
+    interface NodeList {
+        flatpickr: (config?: Options) => Instance | Instance[];
+    }
+    interface HTMLCollection {
+        flatpickr: (config?: Options) => Instance | Instance[];
+    }
+    interface Window {
+        flatpickr: FlatpickrFn;
+    }
+    interface Date {
+        fp_incr: (n: number) => Date;
+    }
+}
diff --git a/backoffice/vendors/flatpickr/types/instance.d.ts b/backoffice/vendors/flatpickr/types/instance.d.ts
new file mode 100644 (file)
index 0000000..2a93500
--- /dev/null
@@ -0,0 +1,118 @@
+import { DateOption, Options, ParsedOptions } from "./options";
+import { Locale, CustomLocale, key as LocaleKey } from "./locale";
+import { RevFormat, Formats, TokenRegex } from "../utils/formatting";
+export interface Elements {
+    element: HTMLElement;
+    input: HTMLInputElement;
+    altInput?: HTMLInputElement;
+    _input: HTMLInputElement;
+    mobileInput?: HTMLInputElement;
+    mobileFormatStr?: string;
+    selectedDateElem?: DayElement;
+    todayDateElem?: DayElement;
+    _positionElement: HTMLElement;
+    weekdayContainer: HTMLDivElement;
+    calendarContainer: HTMLDivElement;
+    innerContainer?: HTMLDivElement;
+    rContainer?: HTMLDivElement;
+    daysContainer?: HTMLDivElement;
+    days: HTMLDivElement;
+    weekWrapper?: HTMLDivElement;
+    weekNumbers?: HTMLDivElement;
+    monthNav: HTMLDivElement;
+    monthsDropdownContainer: HTMLSelectElement;
+    yearElements: HTMLInputElement[];
+    monthElements: HTMLSpanElement[];
+    currentYearElement: HTMLInputElement;
+    currentMonthElement: HTMLSpanElement;
+    _hidePrevMonthArrow: boolean;
+    _hideNextMonthArrow: boolean;
+    prevMonthNav: HTMLElement;
+    nextMonthNav: HTMLElement;
+    timeContainer?: HTMLDivElement;
+    hourElement?: HTMLInputElement;
+    minuteElement?: HTMLInputElement;
+    secondElement?: HTMLInputElement;
+    amPM?: HTMLSpanElement;
+    pluginElements: Node[];
+}
+export interface Formatting {
+    revFormat: RevFormat;
+    formats: Formats;
+    tokenRegex: TokenRegex;
+}
+export declare type Instance = Elements & Formatting & {
+    minRangeDate?: Date;
+    maxRangeDate?: Date;
+    now: Date;
+    latestSelectedDateObj?: Date;
+    _selectedDateObj?: Date;
+    selectedDates: Date[];
+    _initialDate: Date;
+    config: ParsedOptions;
+    loadedPlugins: string[];
+    l10n: Locale;
+    currentYear: number;
+    currentMonth: number;
+    isOpen: boolean;
+    isMobile: boolean;
+    minDateHasTime: boolean;
+    maxDateHasTime: boolean;
+    showTimeInput: boolean;
+    _showTimeInput: boolean;
+    changeMonth: (value: number, isOffset?: boolean, fromKeyboard?: boolean) => void;
+    changeYear: (year: number) => void;
+    clear: (emitChangeEvent?: boolean, toInitial?: boolean) => void;
+    close: () => void;
+    destroy: () => void;
+    isEnabled: (date: DateOption, timeless?: boolean) => boolean;
+    jumpToDate: (date?: DateOption, triggerChange?: boolean) => void;
+    open: (e?: FocusEvent | MouseEvent, positionElement?: HTMLElement) => void;
+    redraw: () => void;
+    set: (option: keyof Options | {
+        [k in keyof Options]?: Options[k];
+    }, value?: any) => void;
+    setDate: (date: DateOption | DateOption[], triggerChange?: boolean, format?: string) => void;
+    toggle: () => void;
+    pad: (num: string | number) => string;
+    parseDate: (date: Date | string | number, givenFormat?: string, timeless?: boolean) => Date | undefined;
+    formatDate: (dateObj: Date, frmt: string) => string;
+    _handlers: {
+        event: string;
+        element: Element;
+        handler: (e?: Event) => void;
+        options?: {
+            capture?: boolean;
+        };
+    }[];
+    _bind: <E extends Element>(element: E | E[], event: string | string[], handler: (e?: any) => void) => void;
+    _createElement: <E extends HTMLElement>(tag: keyof HTMLElementTagNameMap, className: string, content?: string) => E;
+    _setHoursFromDate: (date: Date) => void;
+    _debouncedChange: () => void;
+    __hideNextMonthArrow: boolean;
+    __hidePrevMonthArrow: boolean;
+    _positionCalendar: (customPositionElement?: HTMLElement) => void;
+    utils: {
+        getDaysInMonth: (month?: number, year?: number) => number;
+    };
+};
+export interface FlatpickrFn {
+    (selector: Node, config?: Options): Instance;
+    (selector: ArrayLike<Node>, config?: Options): Instance[];
+    (selector: string, config?: Options): Instance | Instance[];
+    defaultConfig: Partial<ParsedOptions>;
+    l10ns: {
+        [k in LocaleKey]?: CustomLocale;
+    } & {
+        default: Locale;
+    };
+    localize: (l10n: CustomLocale) => void;
+    setDefaults: (config: Options) => void;
+    parseDate: (date: DateOption, format?: string, timeless?: boolean) => Date | undefined;
+    formatDate: (date: Date, format: string) => string;
+    compareDates: (date1: Date, date2: Date, timeless?: boolean) => number;
+}
+export declare type DayElement = HTMLSpanElement & {
+    dateObj: Date;
+    $i: number;
+};
diff --git a/backoffice/vendors/flatpickr/types/locale.d.ts b/backoffice/vendors/flatpickr/types/locale.d.ts
new file mode 100644 (file)
index 0000000..98e5bd0
--- /dev/null
@@ -0,0 +1,45 @@
+export declare type Locale = {
+    weekdays: {
+        shorthand: [string, string, string, string, string, string, string];
+        longhand: [string, string, string, string, string, string, string];
+    };
+    months: {
+        shorthand: [string, string, string, string, string, string, string, string, string, string, string, string];
+        longhand: [string, string, string, string, string, string, string, string, string, string, string, string];
+    };
+    daysInMonth: [number, number, number, number, number, number, number, number, number, number, number, number];
+    firstDayOfWeek: number;
+    ordinal: (nth: number) => string;
+    rangeSeparator: string;
+    weekAbbreviation: string;
+    scrollTitle: string;
+    toggleTitle: string;
+    amPM: [string, string];
+    yearAriaLabel: string;
+    hourAriaLabel: string;
+    minuteAriaLabel: string;
+    time_24hr: boolean;
+};
+export declare type CustomLocale = {
+    ordinal?: Locale["ordinal"];
+    daysInMonth?: Locale["daysInMonth"];
+    firstDayOfWeek?: Locale["firstDayOfWeek"];
+    rangeSeparator?: Locale["rangeSeparator"];
+    weekAbbreviation?: Locale["weekAbbreviation"];
+    toggleTitle?: Locale["toggleTitle"];
+    scrollTitle?: Locale["scrollTitle"];
+    yearAriaLabel?: string;
+    hourAriaLabel?: string;
+    minuteAriaLabel?: string;
+    amPM?: Locale["amPM"];
+    time_24hr?: Locale["time_24hr"];
+    weekdays: {
+        shorthand: [string, string, string, string, string, string, string];
+        longhand: [string, string, string, string, string, string, string];
+    };
+    months: {
+        shorthand: [string, string, string, string, string, string, string, string, string, string, string, string];
+        longhand: [string, string, string, string, string, string, string, string, string, string, string, string];
+    };
+};
+export declare type key = "ar" | "at" | "az" | "be" | "bg" | "bn" | "bs" | "cat" | "cs" | "cy" | "da" | "de" | "default" | "en" | "eo" | "es" | "et" | "fa" | "fi" | "fo" | "fr" | "gr" | "he" | "hi" | "hr" | "hu" | "id" | "is" | "it" | "ja" | "ka" | "ko" | "km" | "kz" | "lt" | "lv" | "mk" | "mn" | "ms" | "my" | "nl" | "no" | "pa" | "pl" | "pt" | "ro" | "ru" | "si" | "sk" | "sl" | "sq" | "sr" | "sv" | "th" | "tr" | "uk" | "vn" | "zh" | "zh_tw";
diff --git a/backoffice/vendors/flatpickr/types/options.d.ts b/backoffice/vendors/flatpickr/types/options.d.ts
new file mode 100644 (file)
index 0000000..45f52dc
--- /dev/null
@@ -0,0 +1,144 @@
+import { Instance } from "./instance";
+import { CustomLocale, key as LocaleKey, Locale } from "./locale";
+export declare type DateOption = Date | string | number;
+export declare type DateRangeLimit<D = DateOption> = {
+    from: D;
+    to: D;
+};
+export declare type DateLimit<D = DateOption> = D | DateRangeLimit<D> | ((date: Date) => boolean);
+export declare type Hook = (dates: Date[], currentDateString: string, self: Instance, data?: any) => void;
+export declare type HookKey = "onChange" | "onClose" | "onDayCreate" | "onDestroy" | "onKeyDown" | "onMonthChange" | "onOpen" | "onParseConfig" | "onReady" | "onValueUpdate" | "onYearChange" | "onPreCalendarPosition";
+export declare const HOOKS: HookKey[];
+export declare type Plugin<E = {}> = (fp: Instance & E) => Options;
+export interface BaseOptions {
+    allowInput: boolean;
+    altFormat: string;
+    altInput: boolean;
+    altInputClass: string;
+    animate: boolean;
+    appendTo: HTMLElement;
+    ariaDateFormat: string;
+    clickOpens: boolean;
+    closeOnSelect: boolean;
+    conjunction: string;
+    dateFormat: string;
+    defaultDate: DateOption | DateOption[];
+    defaultHour: number;
+    defaultMinute: number;
+    defaultSeconds: number;
+    disable: DateLimit<DateOption>[];
+    disableMobile: boolean;
+    enable: DateLimit<DateOption>[];
+    enableSeconds: boolean;
+    enableTime: boolean;
+    errorHandler: (e: Error) => void;
+    formatDate: (date: Date, format: string, locale: Locale) => string;
+    getWeek: (date: Date) => string | number;
+    hourIncrement: number;
+    ignoredFocusElements: HTMLElement[];
+    inline: boolean;
+    locale: LocaleKey | CustomLocale;
+    maxDate: DateOption;
+    maxTime: DateOption;
+    minDate: DateOption;
+    minTime: DateOption;
+    minuteIncrement: number;
+    mode: "single" | "multiple" | "range" | "time";
+    monthSelectorType: "dropdown" | "static";
+    nextArrow: string;
+    noCalendar: boolean;
+    now?: DateOption;
+    onChange: Hook | Hook[];
+    onClose: Hook | Hook[];
+    onDayCreate: Hook | Hook[];
+    onDestroy: Hook | Hook[];
+    onKeyDown: Hook | Hook[];
+    onMonthChange: Hook | Hook[];
+    onOpen: Hook | Hook[];
+    onParseConfig: Hook | Hook[];
+    onReady: Hook | Hook[];
+    onValueUpdate: Hook | Hook[];
+    onYearChange: Hook | Hook[];
+    onPreCalendarPosition: Hook | Hook[];
+    parseDate: (date: string, format: string) => Date;
+    plugins: Plugin[];
+    position: "auto" | "above" | "below";
+    positionElement: Element;
+    prevArrow: string;
+    shorthandCurrentMonth: boolean;
+    static: boolean;
+    showMonths?: number;
+    time_24hr: boolean;
+    weekNumbers: boolean;
+    wrap: boolean;
+}
+export declare type Options = Partial<BaseOptions>;
+export interface ParsedOptions {
+    _disable: DateLimit<Date>[];
+    _enable: DateLimit<Date>[];
+    _maxDate?: Date;
+    _maxTime?: Date;
+    _minDate?: Date;
+    _minTime?: Date;
+    allowInput: boolean;
+    altFormat: string;
+    altInput: boolean;
+    altInputClass: string;
+    animate: boolean;
+    appendTo?: HTMLElement;
+    ariaDateFormat: string;
+    clickOpens: boolean;
+    closeOnSelect: boolean;
+    conjunction: string;
+    dateFormat: string;
+    defaultDate?: Date | Date[];
+    defaultHour: number;
+    defaultMinute: number;
+    defaultSeconds: number;
+    disable: DateLimit<Date>[];
+    disableMobile: boolean;
+    enable: DateLimit<Date>[];
+    enableSeconds: boolean;
+    enableTime: boolean;
+    errorHandler: (err: Error) => void;
+    formatDate?: Options["formatDate"];
+    getWeek: (date: Date) => string | number;
+    hourIncrement: number;
+    ignoredFocusElements: HTMLElement[];
+    inline: boolean;
+    locale: LocaleKey | CustomLocale;
+    maxDate?: Date;
+    maxTime?: Date;
+    minDate?: Date;
+    minTime?: Date;
+    minuteIncrement: number;
+    mode: BaseOptions["mode"];
+    monthSelectorType: string;
+    nextArrow: string;
+    noCalendar: boolean;
+    now: Date;
+    onChange: Hook[];
+    onClose: Hook[];
+    onDayCreate: Hook[];
+    onDestroy: Hook[];
+    onKeyDown: Hook[];
+    onMonthChange: Hook[];
+    onOpen: Hook[];
+    onParseConfig: Hook[];
+    onReady: Hook[];
+    onValueUpdate: Hook[];
+    onYearChange: Hook[];
+    onPreCalendarPosition: Hook[];
+    parseDate?: BaseOptions["parseDate"];
+    plugins: Plugin[];
+    position: BaseOptions["position"];
+    positionElement?: HTMLElement;
+    prevArrow: string;
+    shorthandCurrentMonth: boolean;
+    showMonths: number;
+    static: boolean;
+    time_24hr: boolean;
+    weekNumbers: boolean;
+    wrap: boolean;
+}
+export declare const defaults: ParsedOptions;
diff --git a/backoffice/vendors/flatpickr/typings.d.ts b/backoffice/vendors/flatpickr/typings.d.ts
new file mode 100644 (file)
index 0000000..fb32d88
--- /dev/null
@@ -0,0 +1,38 @@
+import { FlatpickrFn } from "./types/instance";
+import { Instance as _Instance } from "./types/instance";
+import {
+  Options as _Options,
+  Hook as _Hook,
+  HookKey as _HookKey,
+  ParsedOptions as _ParsedOptions,
+  DateLimit as _DateLimit,
+  DateOption as _DateOption,
+  DateRangeLimit as _DateRangeLimit,
+  Plugin as _Plugin,
+} from "./types/options";
+
+import {
+  Locale as _Locale,
+  CustomLocale as _CustomLocale,
+} from "./types/locale";
+
+declare var flatpickr: FlatpickrFn;
+
+declare namespace flatpickr {
+  export type Instance = _Instance;
+  export type CustomLocale = _CustomLocale;
+  export type Locale = _Locale;
+
+  export namespace Options {
+    export type Options = _Options;
+    export type Hook = _Hook;
+    export type HookKey = _HookKey;
+    export type ParsedOptions = _ParsedOptions;
+    export type DateLimit = _DateLimit;
+    export type DateOption = _DateOption;
+    export type DateRangeLimit = _DateRangeLimit;
+    export type Plugin = _Plugin;
+  }
+}
+
+export default flatpickr;
diff --git a/backoffice/vendors/flatpickr/utils/dates.d.ts b/backoffice/vendors/flatpickr/utils/dates.d.ts
new file mode 100644 (file)
index 0000000..962ff6c
--- /dev/null
@@ -0,0 +1,17 @@
+import { Locale } from "../types/locale";
+import { ParsedOptions } from "../types/options";
+export interface FormatterArgs {
+    config?: ParsedOptions;
+    l10n?: Locale;
+}
+export declare const createDateFormatter: ({ config, l10n, }: FormatterArgs) => (dateObj: Date, frmt: string, overrideLocale?: Locale | undefined) => string;
+export declare const createDateParser: ({ config, l10n }: {
+    config?: ParsedOptions | undefined;
+    l10n?: Locale | undefined;
+}) => (date: string | number | Date, givenFormat?: string | undefined, timeless?: boolean | undefined, customLocale?: Locale | undefined) => Date | undefined;
+export declare function compareDates(date1: Date, date2: Date, timeless?: boolean): number;
+export declare function compareTimes(date1: Date, date2: Date): number;
+export declare const isBetween: (ts: number, ts1: number, ts2: number) => boolean;
+export declare const duration: {
+    DAY: number;
+};
diff --git a/backoffice/vendors/flatpickr/utils/dom.d.ts b/backoffice/vendors/flatpickr/utils/dom.d.ts
new file mode 100644 (file)
index 0000000..b15f309
--- /dev/null
@@ -0,0 +1,6 @@
+export declare function toggleClass(elem: HTMLElement, className: string, bool: boolean): void;
+export declare function createElement<T extends HTMLElement>(tag: keyof HTMLElementTagNameMap, className: string, content?: string): T;
+export declare function clearNode(node: HTMLElement): void;
+export declare function findParent(node: Element, condition: (n: Element) => boolean): Element | undefined;
+export declare function createNumberInput(inputClassName: string, opts?: Record<string, any>): HTMLDivElement;
+export declare function getEventTarget(event: Event): EventTarget | null;
diff --git a/backoffice/vendors/flatpickr/utils/formatting.d.ts b/backoffice/vendors/flatpickr/utils/formatting.d.ts
new file mode 100644 (file)
index 0000000..b430324
--- /dev/null
@@ -0,0 +1,13 @@
+import { Locale } from "../types/locale";
+import { ParsedOptions } from "../types/options";
+export declare type token = "D" | "F" | "G" | "H" | "J" | "K" | "M" | "S" | "U" | "W" | "Y" | "Z" | "d" | "h" | "i" | "j" | "l" | "m" | "n" | "s" | "u" | "w" | "y";
+export declare const monthToStr: (monthNumber: number, shorthand: boolean, locale: Locale) => string;
+export declare type RevFormatFn = (date: Date, data: string, locale: Locale) => Date | void | undefined;
+export declare type RevFormat = Record<string, RevFormatFn>;
+export declare const revFormat: RevFormat;
+export declare type TokenRegex = {
+    [k in token]: string;
+};
+export declare const tokenRegex: TokenRegex;
+export declare type Formats = Record<token, (date: Date, locale: Locale, options: ParsedOptions) => string | number>;
+export declare const formats: Formats;
diff --git a/backoffice/vendors/flatpickr/utils/index.d.ts b/backoffice/vendors/flatpickr/utils/index.d.ts
new file mode 100644 (file)
index 0000000..91adb42
--- /dev/null
@@ -0,0 +1,8 @@
+export declare const pad: (number: string | number) => string;
+export declare const int: (bool: boolean) => 1 | 0;
+export declare function debounce<F extends Function>(func: F, wait: number, immediate?: boolean): (this: Function) => void;
+export declare const arrayify: <T>(obj: T | T[]) => T[];
+export declare type IncrementEvent = MouseEvent & {
+    delta: number;
+    type: "increment";
+};