Hueman Addons - Version 2.0.16

Version Description

February 14th 2018 = * Fix : Multisite compatibility problem * Fix : Title/Subtitle polylang plugin translation doesn't appear * Added : new option to control the visibility of the sharre counters

Download this release

Release Info

Developer nikeo
Plugin Icon 128x128 Hueman Addons
Version 2.0.16
Comparing to
See all releases

Code changes from version 2.0.15 to 2.0.16

addons/assets/czr/css/czr-control-base.css CHANGED
@@ -678,7 +678,6 @@ span.czr-panel-subtitle {
678
 
679
  /* PRO BLOCK BEFORE SECTIONS AND PANELS TITLE */
680
  .pro-title-block {
681
- background: #f0ad4e;
682
  border: 1px solid #eea236;
683
  padding: 0px 6px;
684
  font-size: 0.7em;
@@ -686,7 +685,7 @@ span.czr-panel-subtitle {
686
  margin-right: 3px;
687
  bottom: 2px;
688
  position: relative;
689
- color: #fff;
690
  webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
691
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
692
  border-radius: 3px;
@@ -714,8 +713,8 @@ span.czr-panel-subtitle {
714
  height: 30px;
715
  padding: 1px 20px;
716
  display: inline-block;
717
- color: #fff;
718
- background: #f0ad4e;
719
  border: 1px solid #eea236;
720
  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
721
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
@@ -888,7 +887,9 @@ span.czr-panel-subtitle {
888
  .czr-item-title h4 {
889
  margin: 0;
890
  }
891
- .czr-item-title .fa:before {
 
 
892
  padding-right: 2px;
893
  }
894
  .czr-item-btns {
@@ -986,7 +987,9 @@ span.czr-panel-subtitle {
986
  -webkit-filter: blur(1px);
987
  }
988
 
989
- .czr-item-title .fa {
 
 
990
  font-size: 18px;
991
  }
992
 
@@ -1651,7 +1654,7 @@ section .czr-sub-set:first-child {
1651
  .selecter .selecter-selected { background: #F9F9F9 url(img/jquery.fs.selecter-arrow.png) no-repeat right center; border: 1px solid #ccc; border-radius: 3px; color: #333; cursor: pointer; display: block; font-size: 13px; margin: 0; overflow: hidden; padding: 4px 4.6%; position: relative; text-overflow: clip; z-index: 49; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);height: auto;line-height: 18px;width: 90%; }
1652
 
1653
  .selecter .selecter-options { border: 1px solid #ccc; border-width: 0 1px 1px; background-color: #fefefe; border-radius: 0 0 3px 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); display: none; left: 0; margin: 0; max-height: 260px; overflow: auto; overflow-x: hidden; padding: 0; position: relative; top: 100%; width: 99%; *width: auto; z-index: 50; }
1654
- .selecter .selecter-group { background: #F9F9F9; border-bottom: 1px solid #e3e3e3; color: #999; display: block; font-size: 11px; padding: 5px 10px 4px; text-transform: uppercase; }
1655
  .selecter .selecter-item { background: #fff; border-bottom: 1px solid #e3e3e3; color: #333; cursor: pointer; display: block; font-size: 13px; margin: 0; overflow: hidden; padding: 8px 10px; text-overflow: ellipsis; width: 86%;height: auto;line-height: 14px;padding: 8px 24px 8px 10px;}
1656
  .selecter .selecter-item.selected { background: #F9F9F9; }
1657
  .selecter .selecter-item.disabled { color: #999; cursor: default; }
@@ -2952,7 +2955,9 @@ h2.czr-current-skope-title {
2952
  font-weight: normal;
2953
  text-shadow: 1px 1px 0px #dedede;
2954
  }
2955
- .czr-scope .fa {
 
 
2956
  font-size: 10px;
2957
  padding: 2%;
2958
  color: #585858;
678
 
679
  /* PRO BLOCK BEFORE SECTIONS AND PANELS TITLE */
680
  .pro-title-block {
 
681
  border: 1px solid #eea236;
682
  padding: 0px 6px;
683
  font-size: 0.7em;
685
  margin-right: 3px;
686
  bottom: 2px;
687
  position: relative;
688
+ color: #f0ad4e;
689
  webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
690
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
691
  border-radius: 3px;
713
  height: 30px;
714
  padding: 1px 20px;
715
  display: inline-block;
716
+ color: #f59000;
717
+ background: #fff;
718
  border: 1px solid #eea236;
719
  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
720
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
887
  .czr-item-title h4 {
888
  margin: 0;
889
  }
890
+ .czr-item-title .fab::before,
891
+ .czr-item-title .fas::before,
892
+ .czr-item-title .far::before {
893
  padding-right: 2px;
894
  }
895
  .czr-item-btns {
987
  -webkit-filter: blur(1px);
988
  }
989
 
990
+ .czr-item-title .far,
991
+ .czr-item-title .fab,
992
+ .czr-item-title .fas {
993
  font-size: 18px;
994
  }
995
 
1654
  .selecter .selecter-selected { background: #F9F9F9 url(img/jquery.fs.selecter-arrow.png) no-repeat right center; border: 1px solid #ccc; border-radius: 3px; color: #333; cursor: pointer; display: block; font-size: 13px; margin: 0; overflow: hidden; padding: 4px 4.6%; position: relative; text-overflow: clip; z-index: 49; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);height: auto;line-height: 18px;width: 90%; }
1655
 
1656
  .selecter .selecter-options { border: 1px solid #ccc; border-width: 0 1px 1px; background-color: #fefefe; border-radius: 0 0 3px 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); display: none; left: 0; margin: 0; max-height: 260px; overflow: auto; overflow-x: hidden; padding: 0; position: relative; top: 100%; width: 99%; *width: auto; z-index: 50; }
1657
+ .selecter .selecter-group { background: #F9F9F9; border-bottom: 1px solid #e3e3e3; color: #999; display: block; font-size: 11px; padding: 5px 6px 4px; text-transform: uppercase; }
1658
  .selecter .selecter-item { background: #fff; border-bottom: 1px solid #e3e3e3; color: #333; cursor: pointer; display: block; font-size: 13px; margin: 0; overflow: hidden; padding: 8px 10px; text-overflow: ellipsis; width: 86%;height: auto;line-height: 14px;padding: 8px 24px 8px 10px;}
1659
  .selecter .selecter-item.selected { background: #F9F9F9; }
1660
  .selecter .selecter-item.disabled { color: #999; cursor: default; }
2955
  font-weight: normal;
2956
  text-shadow: 1px 1px 0px #dedede;
2957
  }
2958
+ .czr-scope .fab,
2959
+ .czr-scope .far,
2960
+ .czr-scope .fas {
2961
  font-size: 10px;
2962
  padding: 2%;
2963
  color: #585858;
addons/assets/czr/css/czr-control-base.min.css CHANGED
@@ -1 +1 @@
1
- .rtl.wp-customizer .wp-full-overlay-sidebar,.wp-customizer .wp-full-overlay-sidebar{width:440px}i.czr-notice,span.czr-notice{display:block;clear:both}.wp-customizer a{color:#000}.wp-customizer a:focus,.wp-customizer a:hover{color:#0073aa}.wp-customizer .wp-full-overlay.expanded{margin-left:440px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-440px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-440px}.accordion-sub-container.control-panel-content{left:440px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:440px;margin-left:0}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-440px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-440px}.rtl .accordion-sub-container.control-panel-content{right:440px}.customize-section-description-container+#customize-control-custom_css:last-child{margin:0;width:100%}li#customize-control-custom_css textarea{font-size:13px;background:#394143;color:#95ff0c;min-height:300px}@media screen and (max-width:1400px){.rtl.wp-customizer .wp-full-overlay-sidebar,.wp-customizer .wp-full-overlay-sidebar{width:380px}.wp-customizer .wp-full-overlay.expanded{margin-left:380px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-380px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-380px}.accordion-sub-container.control-panel-content{left:380px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:380px;margin-left:0}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-380px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-380px}.rtl .accordion-sub-container.control-panel-content{right:380px}}@media screen and (max-width:979px){.rtl.wp-customizer .wp-full-overlay-sidebar,.wp-customizer .wp-full-overlay-sidebar{width:300px}.wp-customizer .wp-full-overlay.expanded{margin-left:300px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-300px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-300px}.accordion-sub-container.control-panel-content{left:300px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:300px;margin-left:0}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-300px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-300px}.rtl .accordion-sub-container.control-panel-content{right:300px}}@media screen and (max-width:640px){.wp-customizer .customize-controls-preview-toggle{height:46px;border-bottom:1px solid #ddd;left:87px}.wp-customizer .wp-full-overlay.expanded{margin-left:0}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-100%}.accordion-sub-container.control-panel-content{left:100%}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title,.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-100%;left:auto}.rtl .accordion-sub-container.control-panel-content{right:100%}}.wp-customizer .control-section.control-panel .accordion-section-title .panel-title{font-size:24px;font-weight:inherit;line-height:30px}.wp-core-ui h3{color:#555}.accordion-section-title:after,.control-section.control-panel>.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow,.widget-action,.wp-customizer #available-menu-items .menu-item-handle:hover .item-add,.wp-customizer #customize-controls .customize-info .customize-help-toggle:focus,.wp-customizer #customize-controls .customize-info .customize-help-toggle:hover,.wp-customizer #customize-controls .customize-info.open .customize-help-toggle,.wp-customizer .menu-item-handle:hover,.wp-customizer .menu-item-handle:hover .item-edit,.wp-customizer .menu-item-handle:hover .item-type{color:#00a0d2}.accordion-section-content{padding:10px 10px 15px 20px}.customize-control-title{line-height:19px}.wp-customizer #customize-theme-controls .accordion-section-content{background:#fff}.wp-customizer #customize-controls .customize-info .customize-help-toggle:focus:before,.wp-customizer .customize-screen-options-toggle:focus:before{-webkit-box-shadow:0 0 0 1px #00a0d2;box-shadow:0 0 0 1px #00a0d2;-webkit-border-radius:100%;border-radius:100%}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover,.active-menu-screen-options .customize-screen-options-toggle,.customize-screen-options-toggle:active,.customize-screen-options-toggle:focus,.customize-screen-options-toggle:hover{color:#00a0d2!important}.customize-control input[type=text]{line-height:23px}li[id*=customize-control-]{margin:8px 0;padding:2%;width:96%;border:1px solid rgba(221,221,221,.43);box-shadow:1px 0 2px 0 rgba(204,204,204,.45);-webkit-box-shadow:1px 0 2px 0 rgba(204,204,204,.45)}#customize-outer-theme-controls li[id*=customize-control-]{width:100%}#customize-outer-theme-controls input[type=checkbox],#customize-outer-theme-controls input[type=radio]{float:none;min-height:inherit}.control-section .accordion-section-content{overflow-y:auto}.wp-customizer .control-section h3.accordion-section-title{padding:10px 25px 11px 14px}.wp-customizer #customize-controls h3{font-size:15px;font-weight:400}.control-section .accordion-section-title:after{top:7px}.control-section.control-panel .accordion-section-title:after{top:11px;-webkit-transition:right .3s ease-in-out,opacity .3s ease-in-out;-moz-transition:right .3s ease-in-out,opacity .3s ease-in-out;-ms-transition:right .3s ease-in-out,opacity .3s ease-in-out;-o-transition:right .3s ease-in-out,opacity .3s ease-in-out;transition:right .3s ease-in-out,opacity .3s ease-in-out;right:10px;opacity:.7}.rtl .control-section.control-panel .accordion-section-title:after{-webkit-transition:left .3s ease-in-out,opacity .3s ease-in-out;-moz-transition:left .3s ease-in-out,opacity .3s ease-in-out;-ms-transition:left .3s ease-in-out,opacity .3s ease-in-out;-o-transition:left .3s ease-in-out,opacity .3s ease-in-out;transition:left .3s ease-in-out,opacity .3s ease-in-out;left:10px;right:initial}#customize-theme-controls .control-section.control-panel h3.accordion-section-title:focus:after,#customize-theme-controls .control-section.control-panel h3.accordion-section-title:hover:after{right:8px;opacity:1;color:#666!important}.rtl #customize-theme-controls .control-section.control-panel h3.accordion-section-title:focus:after,.rtl #customize-theme-controls .control-section.control-panel h3.accordion-section-title:hover:after{left:6px;right:initial}#customize-theme-controls .control-section.control-panel>h3.accordion-section-title:focus:after,#customize-theme-controls .control-section.control-panel>h3.accordion-section-title:hover:after,.control-section.control-panel>.accordion-section-title:after{background:0 0!important;border:none!important}#customize-theme-controls h3.accordion-section-title{-webkit-transition:background .1s ease-in-out;-moz-transition:background .1s ease-in-out;-ms-transition:background .1s ease-in-out;-o-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{line-height:16px;margin-left:0}input::-webkit-input-placeholder{color:#9A9A9A;font-style:italic}input:-moz-placeholder{color:#9A9A9A;font-style:italic}input::-moz-placeholder{color:#9A9A9A;font-style:italic}input:-ms-input-placeholder{color:#9A9A9A;font-style:italic}.czr-customizr-title{text-transform:uppercase;margin:1em 0 5px;font-size:15px!important;border-bottom:1px dotted #555;padding-bottom:5px;text-align:center}h3.czr-customizr-title::before{content:'\00b7';padding-right:3px}h3.czr-customizr-title::after{content:'\00b7';padding-left:3px}.czr-after-button{border-color:#fff;margin-top:15px}.czr-emphasize{line-height:1.2em;color:#2E2E2E}span.czr-notice{color:#313131;font-size:12px;font-style:italic;line-height:18px}.czr-customizer-separator-invisible{border:none;margin-top:15px}.czr-skin-gen-label{float:left}.czr-skin-gen-color-picker{float:right}.czr-number-label{float:left}.czr-number-input{float:right}.czr-check-label{float:left;max-width:85%}.rtl .czr-check-label{float:right}input[type=checkbox],input[type=radio]{float:right;min-height:18px}.czr-font-select{float:left}li#customize-control-tc_theme_options-tc_custom_css textarea{font-size:14px;background:#394143;color:#E2E728;min-height:300px}.customize-control .czr-navigate-to-post-list{color:#00a0d2;font-weight:700;float:left;clear:both;width:100%;margin-bottom:8px}.czr-sub-control{padding-left:13%;max-width:87%;position:relative}.czr-sub-control:before{content:'';height:116%;background:#00a0d2;width:2%;position:absolute;left:7%}.customize-control-tc_cropped_image .upload-button{float:right}.customize-control-tc_cropped_image .remove-button{float:left;margin-right:3px}.customize-control-tc_cropped_image .actions{margin-bottom:32px}.customize-control-tc_cropped_image .current{margin-bottom:8px}.customize-control-tc_cropped_image .remove-button,.customize-control-tc_cropped_image .upload-button{white-space:normal;width:48%;height:auto}.customize-control-tc_cropped_image .current .container{min-height:40px;overflow:hidden;border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px}.customize-control-tc_cropped_image img{width:100%;-webkit-border-radius:2px;border-radius:2px}.customize-control-tc_cropped_image .inner{line-height:20px;top:10px}.rtl .customize-control-tc_cropped_image .upload-button{float:left}.rtl .customize-control-tc_cropped_image .remove-button{float:right;margin-left:3px}.czr-layout-img{height:26px;padding-top:2px;border:1px solid #FFF}.czr-layout-title{padding:0 0 18px 12px;display:inline-block;line-height:0;vertical-align:middle}.customize-control-czr_multi_input{width:96%;border:1px solid #ccc;padding:2%}.czr-multi-input-wrapper{width:95%;padding:0 0 0 5%}.czr-multi-input-wrapper [data-input-type=color] .czr-input{float:left;clear:both}#customize-theme-controls #accordion-panel-czr-footer-panel{border-bottom:1px solid #ddd}#customize-theme-controls #accordion-panel-hu-advanced-panel,#customize-theme-controls #accordion-panel-nav_menus,#customize-theme-controls .control-panel-widgets{margin-top:10px}#customize-theme-controls #accordion-panel-hu-advanced-panel,#customize-theme-controls #accordion-panel-hu-header-panel,#customize-theme-controls #accordion-panel-nav_menus,#customize-theme-controls .control-panel-widgets{border-top:1px solid #ddd}#customize-theme-controls #accordion-panel-hu-general-panel,#customize-theme-controls #accordion-panel-tc-global-panel,#customize-theme-controls #accordion-section-frontpage_sec,#customize-theme-controls #accordion-section-static_front_page,#customize-theme-controls #accordion-section-tc_font_customizer_settings,#customize-theme-controls #accordion-section-tc_fpu{margin-bottom:10px}#customize-header-actions .customize-controls-close{left:45px}.customize-controls-close,.customize-controls-home{top:-1px}.customize-controls-home{display:block;position:absolute;left:0;width:45px;height:41px;padding:0 2px 0 0;background:#eee;border:none;border-top:4px solid #eee;border-right:1px solid #ddd;border-bottom:1px solid #ddd;color:#444;text-align:left;cursor:pointer;text-decoration:none;-webkit-transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;transition:color .1s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.customize-controls-home:before{font-size:17px;line-height:45px;position:relative;top:-4px;left:15px}.customize-controls-home:hover{background:#fff;color:#0073aa;border-top-color:#0073aa;outline:0;-webkit-box-shadow:none;box-shadow:none}.rtl.wp-customizer #customize-header-actions .customize-controls-close{right:45px;left:auto}.rtl.wp-customizer .customize-controls-home{left:auto;right:0;border-right:0;border-left:1px solid #ddd}.control-panel-content .hu-menu-notice{margin-left:3%}span.czr-panel-subtitle{display:block;font-size:12px;font-style:italic}.pro-title-block{background:#f0ad4e;border:1px solid #eea236;padding:0 6px;font-size:.7em;display:inline-block;margin-right:3px;bottom:2px;position:relative;color:#fff;webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#customize-controls .control-section-czr-customize-section-pro .accordion-section-title:focus,#customize-controls .control-section-czr-customize-section-pro .accordion-section-title:hover{background-color:#fff}#customize-theme-controls .control-section-czr-customize-section-pro .accordion-section-title:after{content:none}#accordion-section-go_pro_sec .accordion-section-title{margin:0 0 15px}.control-section-czr-customize-section-pro .accordion-section-title .button{font-size:15px;line-height:24px;height:30px;padding:1px 20px;display:inline-block;color:#fff;background:#f0ad4e;border:1px solid #eea236;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border-radius:3px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-top:-4px;font-weight:400;margin-left:8px}.control-section-czr-customize-section-pro .accordion-section-title .button:hover{color:#fff;background:#ed9c28;border-color:#d58512}.rtl .control-section-czr-customize-section-pro .accordion-section-title .button{margin-left:0;margin-right:8px}.czr-open-pre-add-new{display:block;float:left;margin:2% 2% 0;width:99%;padding:2%;background:#3b8dbd;opacity:1;color:#fff;font-size:16px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;-ms-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}.czr-open-pre-add-new.active{background:#646464;opacity:.5;border-radius:3px 3px 0 0}.czr-adding-new .czr-items-wrapper,.czr-items-wrapper .inactive{opacity:.6}.czr-single-item{padding:0;border:1px solid #ccc;margin:1% 0 0 2%;float:left;width:98%;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;-ms-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}.czr-single-item .czr-item-content input,.czr-sub-set{margin-bottom:0}#customize-theme-controls .czr-single-item.open{border:1px solid #dedede}#customize-theme-controls .mono-item-mod .czr-single-item{border:1px solid #ccc}.czr-single-item .czr-item-content,.czr-single-item .czr-item-header{padding:1%}.czr-items-wrapper .czr-single-item .czr-builtin-model{background:#E1DFDF;color:#555}.czr-item-sort-handle{cursor:move}.czr-single-item .czr-item-header{position:relative;background:#dfdfdf;color:#fff;float:left;width:98%;-webkit-transition:background .1s ease-in-out;-moz-transition:background .1s ease-in-out;-ms-transition:background .1s ease-in-out;-o-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.czr_widget_areas_module .czr-single-item .czr-custom-model{background:#3b8dbd}. .czr-single-item .czr-custom-model:hover{background:#aaa}.czr-items-wrapper .czr-single-item .czr-builtin-model:hover,.czr-single-item .czr-item-header:hover{background:#ccc}.czr-move-icon{position:absolute;top:-2px;left:3px;font-size:10px;color:#999}.czr-item-title{float:left;font-size:17px;color:#000;padding:7px;width:67%}.czr-inactive-alert{font-size:12px;font-style:italic}.czr_widget_areas_module .czr-item-title{color:#fff}.czr-builtin-model .czr-item-title{color:#23282d}.czr-item-title h4{margin:0}.czr-item-title .fa:before{padding-right:2px}.czr-item-btns{float:right}.czr-item-btns a{font-size:17px;padding:7px 5px;color:#777;-webkit-transition:color .1s ease-in-out;-moz-transition:color .1s ease-in-out;-ms-transition:color .1s ease-in-out;-o-transition:color .1s ease-in-out;transition:color .1s ease-in-out}.czr-item-btns a:active,.czr-item-btns a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.czr_widget_areas_module .czr-item-btns a{color:#fff}.czr-builtin-model .czr-item-btns a{color:#555}.czr-builtin-model .czr-item-btns .czr-edit-view.active,.czr-builtin-model .czr-item-btns .czr-edit-view:hover,.czr-item-btns .czr-edit-view.active,.czr-item-btns .czr-edit-view:hover{color:#00a0d2}.czr_widget_areas_module .czr-edit-view:hover,.czr_widget_areas_module .czr-item-btns .czr-edit-view.active{color:#000}.czr_widget_areas_module .czr-builtin-model .czr-edit-view.active,.czr_widget_areas_module .czr-builtin-model .czr-edit-view:hover{color:#00a0d2}.czr-item-btns .czr-display-alert.active,.czr-item-btns .czr-display-alert:hover{color:#23282d}.czr-single-item .czr-item-content{display:none;background:rgba(238,238,238,.5);clear:both;width:96%;padding:2%}.czr-sub-set{display:block;float:left;width:100%;padding:1% 0;position:relative}.czr-sub-set .czr-input{float:right;width:60%}.czr-sub-set .customize-control-title.width-100,.width-100 .czr-input{width:100%}.czr-sub-set .customize-control-title{float:left;width:40%;padding:1px 0;font-size:13px}.rtl.wp-customizer .czr-sub-set .customize-control-title{float:right}.disabled .customize-control-title,.disabled .czr-input{opacity:.6;filter:blur(1px);-webkit-filter:blur(1px)}.czr-item-title .fa{font-size:18px}.czr-remove-alert-wrapper{display:none;clear:both;float:left;padding:2%;width:95%;margin:10px 0;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#EEE;color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.czr-remove-alert-wrapper p{padding:5px;margin:0}.czr-pre-add-wrapper{position:relative;float:left;width:100%}.czr-pre-add-view-content{display:none;padding:3%;border:1px solid #00a0d2;border-top:none;margin:0 0 0 2%;float:left;width:92%;background:#eee;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;position:relative;opacity:1;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-ms-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.czr-model-added .czr-pre-add-view-content{opacity:.2}.czr-pre-add-wrapper .czr-add-new{background:#3b8dbd;color:#fff;-webkit-transition:background .5s linear;-moz-transition:background .5s linear;-ms-transition:background .5s linear;-o-transition:background .5s linear;transition:background .5s linear;float:right;border:none}.czr-add-success{width:100%;margin:0 0 0 2%;position:absolute;top:0;left:0;font-size:25px;text-align:center;opacity:0;-webkit-transition:opacity .1s linear;-moz-transition:opacity .1s linear;-ms-transition:opacity .1s linear;-o-transition:opacity .1s linear;transition:opacity .1s linear}.czr-model-added .czr-add-success{opacity:1}.czr-unavailable-location,body.czr-editing-modopt #customize-preview{opacity:.7}.czr-add-success p{vertical-align:middle;display:inline-block;line-height:35px;margin:0;font-size:25px;color:#82b965;padding:0 3%}.control-section-widget_zones_management{margin:10px 0;z-index:1}.czr-zone-infos{width:96%;padding:0 2%;font-size:12px;float:left;font-style:italic}.czr-location-alert{float:left;width:100%;padding:1% 0;margin:1% 0;text-align:center;border:1px solid orange;background:#FEE5B6;color:#000;font-size:11px;font-style:italic}.czr-toggle-modopt{color:#495050;text-shadow:1px 1px 0 #fff;-webkit-transition:color .4s;transition:color .4s;position:absolute;right:0;padding-left:3px;font-size:25px;line-height:24px}.rtl.wp-customizer .czr-toggle-modopt{left:0;right:auto;padding-left:0;padding-right:3px}.czr-modopt-visible .czr-toggle-modopt,.czr-toggle-modopt:hover{color:#3b8dbd}body #customize-controls{-webkit-transition:opacity .4s ease-in-out;-moz-transition:opacity .4s ease-in-out;-ms-transition:opacity .4s ease-in-out;-o-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out}body.czr-editing-modopt #customize-controls{opacity:.4}.czr-mod-opt-wrapper{position:absolute;top:0;bottom:0;left:-301px;opacity:0;overflow-x:hidden;overflow-y:auto;margin:0;z-index:4;width:60%;min-width:300px;padding:1% 2%;color:#fff;background:rgba(0,0,0,.8);-webkit-transition:all .18s ease-in-out;-moz-transition:all .18s ease-in-out;-ms-transition:all .18s ease-in-out;-o-transition:all .18s ease-in-out;transition:all .18s ease-in-out;border-right:1px solid #4c4c4c}body.czr-editing-modopt .czr-mod-opt-wrapper{left:0;visibility:visible;opacity:1}.czr-close-modopt{position:absolute;top:10px;right:25px;font-size:31px;cursor:pointer}.czr-mod-opt-wrapper .czr-sub-set{background:rgba(238,238,238,.13);padding:3% 2%;width:96%;margin:5px 0}.tabs,.tabs nav ul{position:relative;margin:0 auto;overflow:hidden}.czr-mod-opt-wrapper .czr-notice{color:#fff}.czr-mod-opt-wrapper .mod-opt-title{color:#fff;border-bottom:1px solid #fff;padding:5% 0;text-align:center}.tabs{display:none;width:100%;font-weight:300;font-size:1.25em}.tabs nav{text-align:center}.tabs nav ul{display:-ms-flexbox;display:-webkit-flex;display:-moz-flex;display:-ms-flex;display:flex;padding:0;max-width:1200px;list-style:none;-ms-box-orient:horizontal;-ms-box-pack:center;-webkit-flex-flow:row wrap;-moz-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center}.tabs nav a,.tabs nav ul li{position:relative;display:block}.tabs nav ul li{z-index:1;margin:0;text-align:center;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}.tabs nav ul li.cols-4{width:25%}.tabs nav ul li.cols-3{width:33%}.tabs nav ul li.cols-2{width:50%}.tabs nav ul li.cols-1{width:100%}.tabs nav a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}li.tab-current::after,li.tab-current::before,li.tab-inactive::after{content:'';position:absolute;width:100%}.tabs nav a span{vertical-align:middle;font-size:.75em}.tabs nav li.tab-current a{color:#74777b}.tabs nav a:focus{outline:0}li.tab-current::after,li.tab-current::before{height:100%;-webkit-box-shadow:4px 0 15px 0 rgba(37,37,37,.63);box-shadow:4px 0 15px 0 rgba(37,37,37,.63);top:0;right:0;z-index:4}li.tab-current::before{left:0;-webkit-box-shadow:0 0 15px 4px rgba(37,37,37,.63);box-shadow:0 0 15px 4px rgba(37,37,37,.63)}li.tab-inactive::after{height:2px;bottom:-7px;left:0;-webkit-box-shadow:4px 0 15px 0 rgba(119,119,119,.58);box-shadow:4px 0 15px 0 rgba(0,0,0,.86)}.content-wrap{position:relative}.content-wrap section{display:none;margin:0 auto;max-width:1200px}section .czr-sub-set:first-child{margin:0}.content-wrap section.content-current,.no-flexbox nav ul{display:block}.no-flexbox nav ul li{min-width:15%;display:inline-block}.tabs-style-topline{max-width:1200px}.tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.czr-items-wrapper .tabs-style-topline nav li{border:none}.tabs-style-topline nav li:not(:last-child){border-right:none}.tabs-style-topline nav li.tab-current{border-top-color:#fff;border-bottom:none;background:rgba(238,238,238,.13)}.tabs-style-topline nav a{padding:.65em .5em;background:rgba(40,44,42,.05);color:#fff;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.czr-disable-bottom-infos,.czr-skope-switch,.czr-skp-switch-link:hover,.tabs-style-topline nav a:focus,.tabs-style-topline nav a:hover,.tabs-style-topline nav li.tab-current a{text-decoration:underline}.czr-items-wrapper .tabs-style-topline nav a{background:rgba(40,44,42,.45)}.tabs-style-topline nav li.tab-current a{background:0 0;box-shadow:inset 0 3px 0 #fff;color:#fff}.czr-items-wrapper .tabs-style-topline nav li.tab-current a{color:#000}.tabs-style-topline .icon::before{display:block;margin:0}.tabs-style-topline nav a span{text-transform:uppercase;letter-spacing:1px;font-weight:700}@media screen and (max-width:58em){.tabs nav a.icon span{display:none}.tabs nav a:before{margin-right:0}}.czr_slide_module .czr-item-title{padding:0 7px;height:32px}.czr_slide_module .slide-thumb,.czr_slide_module .slide-title{display:block;height:32px;line-height:32px;float:left}.czr_slide_module .slide-title{padding-left:5px}.slide-mod-skope-notice{padding:3%;background:rgba(116,210,116,.42);float:left;font-size:12px;line-height:1.5em}.slide-mod-skope-notice .czr-skope-switch{cursor:pointer;text-decoration:underline}.modopts-top-buttons{width:100%;float:left;margin-bottom:4%;text-align:center}.item-bottom-buttons{width:100%;float:left;padding:1% 0}.item-bottom-btn,.modopt-top-btn{color:#fff;font-size:14px;cursor:pointer;border-width:1px;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;opacity:1}.item-bottom-btn{background:#868686;width:47%;margin-right:2%;padding:1% 0}.modopt-top-btn{background:rgba(171,171,171,.5);width:170px;padding:2px 0}.item-bottom-btn:hover{background:#5d5d5d}.modopt-top-btn:hover{background:rgba(41,41,41,.53)}.item-bottom-btn[disabled],.item-bottom-btn[disabled]:hover,.modopt-top-btn[disabled],.modopt-top-btn[disabled]:hover{opacity:.4;cursor:default;-webkit-box-shadow:none!important;box-shadow:none!important;background:inherit}.czr-notice{font-size:12px;font-weight:400}.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-450px;height:0}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-450px}@media screen and (max-width:1400px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-380px}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-380px}}@media screen and (max-width:979px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-300px}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-300px}}@media screen and (max-width:640px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-100%}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-100%;left:auto}}@media screen and (min-width:980px){.wp-customizer .expanded #customize-footer-actions{width:380px}}@media screen and (min-width:1401px){.wp-customizer .expanded #customize-footer-actions{width:440px}}.selecter-element{position:absolute;opacity:0}.selecter{display:block;float:right;margin:2px 0;position:relative;width:100%;z-index:100}.selecter .selecter-selected{background:url(img/jquery.fs.selecter-arrow.png) right center no-repeat #F9F9F9;border:1px solid #ccc;border-radius:3px;color:#333;cursor:pointer;display:block;font-size:13px;margin:0;overflow:hidden;padding:4px 4.6%;position:relative;text-overflow:clip;z-index:49;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);height:auto;line-height:18px;width:90%}.selecter .selecter-options{border:1px solid #ccc;border-width:0 1px 1px;background-color:#fefefe;border-radius:0 0 3px 3px;box-shadow:0 1px 4px rgba(0,0,0,.15);display:none;left:0;margin:0;max-height:260px;overflow:auto;overflow-x:hidden;padding:0;position:relative;top:100%;width:99%;z-index:50}.selecter .selecter-group{background:#F9F9F9;border-bottom:1px solid #e3e3e3;color:#999;display:block;font-size:11px;padding:5px 10px 4px;text-transform:uppercase}.selecter .selecter-item{background:#fff;border-bottom:1px solid #e3e3e3;color:#333;cursor:pointer;display:block;font-size:13px;margin:0;overflow:hidden;text-overflow:ellipsis;width:86%;height:auto;line-height:14px;padding:8px 24px 8px 10px}.selecter.disabled .selecter-group,.selecter.disabled .selecter-item,.selecter.disabled .selecter-selected{cursor:default;color:#ccc;border-color:#eee}.selecter .selecter-item.selected{background:#F9F9F9}.selecter .selecter-item.disabled{color:#999;cursor:default}.selecter .selecter-item:first-child{border-radius:0}.selecter .selecter-item:last-child{border-radius:0 0 2px 2px;border-bottom:0}.rtl .selecter .selecter-selected{background:url(img/jquery.fs.selecter-arrow.png) 4% center no-repeat #F9F9F9}@media screen and (min-width:980px){.selecter .selecter-item.selected:hover,.selecter .selecter-item:hover{background-color:#f3f3f3}.selecter .selecter-item.disabled:hover,.selecter:hover .selecter-selected{background-color:#fff}.selecter.disabled .selecter-item:hover{background:#fff}}.selecter.open{z-index:101}.selecter.open .selecter-selected{border-radius:3px 3px 0 0;z-index:51}.selecter.focus .selecter-selected,.selecter.open .selecter-selected{background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.1)}.selecter.cover .selecter-options{border-radius:3px;border-width:1px;top:0}.selecter.cover .selecter-options .selecter-item.first{border-radius:3px 3px 0 0}.selecter.cover.open .selecter-selected{border-radius:3px 3px 0 0;z-index:49}.selecter.bottom .selecter-options{border-width:1px 1px 0;bottom:100%;top:auto}.selecter.bottom .selecter-item:last-child{border:none}.selecter.bottom.open .selecter-selected{border-radius:0 0 3px 3px}.selecter.bottom.open .selecter-options{border-radius:3px 3px 0 0}.selecter.bottom.cover.open .selecter-options,.selecter.bottom.cover.open .selecter-selected,.stepper{border-radius:3px}.selecter.bottom.cover .selecter-options{bottom:0;top:auto}.selecter.multiple .selecter-options{border-radius:3px;border-width:1px;box-shadow:none;display:block;position:static;width:100%}.selecter.disabled .selecter-selected{background:#fff}.selecter.disabled .selecter-options{background:#fff;border-color:#eee}.selecter.disabled .selecter-item.selected{background:#fafafa}.selecter .selecter-options.scroller{overflow:hidden}.selecter .selecter-options.scroller .scroller-content{max-height:260px;padding:0}@media screen and (max-width:740px){.selecter{max-width:100%}}@media screen and (max-width:500px){.selecter{max-width:100%}}.stepper{margin:0 0 10px;overflow:hidden;position:relative;width:35%;float:left;clear:both}.stepper .stepper-input{background:#F9F9F9;border:1px solid #ccc;border-radius:3px;color:#333;font-size:13px;line-height:1.2;margin:0;overflow:hidden;padding:5px 10px!important;width:100%!important;z-index:49;-moz-appearance:textfield;max-width:none!important}.stepper .stepper-input::-webkit-inner-spin-button,.stepper .stepper-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.stepper .stepper-input:focus{background-color:#fff}.stepper .stepper-arrow{background:url(img/jquery.fs.stepper-arrows.png) no-repeat #eee;border:1px solid #ccc;cursor:pointer;display:block;height:46%;position:absolute;right:0;text-indent:-99999px;width:20px;z-index:50}.stepper .stepper-arrow.up{background-position:center top;border-bottom:none;top:0}.stepper .stepper-arrow.down{background-position:center bottom;bottom:0}.rtl .stepper .stepper-input{text-align:left}@media screen and (min-width:740px){.stepper:hover .stepper-input{background-color:#fff}.stepper .stepper-step:hover{background-color:#F9F9F9}.stepper.disabled .stepper-arrow{background:#fff;border-color:#eee;cursor:default}}.stepper.disabled .stepper-input{background:#fff;border-color:#eee;color:#ccc}.stepper.disabled .stepper-arrow{background:#fff;border-color:#eee;cursor:default}.icheckbox_flat-green,.icheckbox_flat-grey,.iradio_flat-green,.iradio_flat-grey{display:inline-block;margin:0;padding:0;width:20px;height:20px;border:none;top:4px;vertical-align:middle}.icheckbox_flat-green,.iradio_flat-green{background:url(img/green.png) no-repeat;cursor:pointer;float:right}.rtl [class*=icheckbox_flat-]{float:left}.icheckbox_flat-green{background-position:0 0}.icheckbox_flat-green.checked{background-position:-22px 0}.icheckbox_flat-green.disabled{background-position:-44px 0;cursor:default}.icheckbox_flat-green.checked.disabled{background-position:-66px 0}.iradio_flat-green{background-position:-88px 0}.iradio_flat-green.checked{background-position:-110px 0}.iradio_flat-green.disabled{background-position:-132px 0;cursor:default}.iradio_flat-green.checked.disabled{background-position:-154px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5){.icheckbox_flat-green,.iradio_flat-green{background-image:url(img/green@2x.png);-webkit-background-size:176px 22px;background-size:176px 22px}}.icheckbox_flat-grey,.iradio_flat-grey{background:url(img/grey.png) no-repeat;cursor:pointer;float:right}.icheckbox_flat-grey{background-position:0 0}.icheckbox_flat-grey.checked{background-position:-22px 0}.icheckbox_flat-grey.disabled{background-position:-44px 0;cursor:default}.icheckbox_flat-grey.checked.disabled{background-position:-66px 0}.iradio_flat-grey{background-position:-88px 0}.iradio_flat-grey.checked{background-position:-110px 0}.iradio_flat-grey.disabled{background-position:-132px 0;cursor:default}.iradio_flat-grey.checked.disabled{background-position:-154px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5){.icheckbox_flat-grey,.iradio_flat-grey{background-image:url(img/grey@2x.png);-webkit-background-size:176px 22px;background-size:176px 22px}}.czr-sub-set .icheckbox_flat-green,.iradio_flat-green{float:left}body .select2-container{z-index:1000000;width:100%!important}.customize-control-czr_layouts .select2-selection--single{height:33px}.customize-control-czr_layouts .select2-container--default .select2-selection--single .select2-selection__arrow{height:30px}.customize-control-czr_layouts .select2-selection--single:focus,.select2-selection__rendered:focus{outline:0}body .select2-drop{z-index:1000000}body .select2-container,span.select2-results{font-size:14px}.select2-container--default .select2-selection--multiple{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;width:99%;min-height:36px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#00a0d2!important;-webkit-box-shadow:0 0 2px rgba(26,188,156,.8)!important;box-shadow:0 0 2px rgba(26,188,156,.8)!important}.select2-results__options li{margin-bottom:0}.select2-container--default .select2-selection--multiple .select2-selection__choice{padding:2px;font-size:13px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;margin-bottom:0}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#00a0d2}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{font-size:17px;position:relative;top:2px;color:#23282d}.customize-control-czr_socials .select2-container--default .select2-selection--single .select2-selection__rendered{padding:5px;line-height:16px}#czr-customize-content_editor-pane{border-top:solid 1px #ddd;position:absolute;height:300px;bottom:-301px;right:0;left:0;z-index:20;background:#f1f1f1;display:block;-webkit-transition:all .2s;transition:all .2s;visibility:hidden}body.czr-customize-content_editor-pane-resize #customize-preview,body.czr-customize-content_editor-pane-resize #czr-customize-content_editor-pane{-webkit-transition:none;transition:none}body.mce-fullscreen.czr-customize-content_editor-pane-open #czr-customize-content_editor-pane{top:0}body.czr-customize-content_editor-pane-open #czr-customize-content_editor-pane{bottom:0;visibility:inherit}#czr-customize-content_editor-pane .wp-editor-tools{padding-top:5px;padding-right:10px}#czr-customize-content_editor-pane .wp-media-buttons{padding-left:5px}#customize-preview{height:auto}body.czr-customize-content_editor-pane-open #customize-preview{bottom:300px}body.mce-fullscreen #customize-preview{bottom:0}body.mce-fullscreen.czr-customize-content_editor-pane-open div.mce-fullscreen{position:relative;left:0}#wp-czr-customize-content_editor-container{border-left:0}#czr-customize-content_editor-dragbar{top:0;cursor:row-resize;display:block;height:4px;position:absolute;width:100%;z-index:21}body.czr-customize-content_editor-pane-resize #customize-preview:before{top:0;right:0;bottom:0;left:0;position:absolute;height:100%;width:100%;z-index:999999}.wp-customizer .ui-autocomplete.wplink-autocomplete{z-index:500110}.wp-customizer #wp-link-wrap{z-index:500105}.wp-customizer #wp_editbtns,.wp-customizer #wp_gallerybtns{z-index:500020}.wp-customizer #TB_overlay,.wp-customizer #TB_window{z-index:500050}.wp-customizer .mce-panel,.wp-customizer .mce-tooltip{z-index:500100!important}.czr-customize-content_editor-pane-open .wp-full-overlay.collapsed .wp-full-overlay-sidebar{z-index:30}.czr-customize-content_editor-pane-open .wp-full-overlay.collapsed .collapse-sidebar{bottom:308px}.czr-customize-content_editor-pane-open .wp-full-overlay.expanded .collapse-sidebar{bottom:0!important}.czr-customize-content_editor-pane-resize .wp-full-overlay.collapsed .collapse-sidebar{-webkit-transition:none;transition:none}.czr-customize-content_editor-pane-open.mce-fullscreen .wp-full-overlay.collapsed .collapse-sidebar{bottom:8px!important}.czr-sub-set[data-input-type=content_picker] .customize-control-title,.czr-sub-set[data-input-type=content_picker] .czr-input{width:100%}.content-picker-item{height:2em}.content-picker-item .czr-picker-item-type{float:right;display:inline-block}.content-item-bar{line-height:1.2em;font-size:.9em}.content-item-bar .czr-picker-item-title{display:block;float:left;max-width:80%;text-overflow:ellipsis;overflow:hidden;font-size:13px;line-height:1.3em}.czr-sub-set[data-input-type=content_picker] span.czr-picker-item-title{display:block;float:left;max-width:80%;text-overflow:ellipsis;overflow:hidden;font-size:14px;line-height:2em;color:#000}.czr-sub-set[data-input-type=content_picker] span.czr-picker-item-type{display:inline-block;padding:0 10px 0 0;float:right;line-height:2em}.rangeslider,.rangeslider__fill{display:block;-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}.rangeslider{background:#e6e6e6;position:relative}.rangeslider--horizontal{height:20px;width:100%}.rangeslider--vertical{width:20px;min-height:150px;max-height:100%}.rangeslider--disabled{filter:alpha(Opacity=40);opacity:.4}.rangeslider__fill{background:#3b8dbd;position:absolute}.rangeslider--horizontal .rangeslider__fill{top:0;height:100%}.rangeslider--vertical .rangeslider__fill{bottom:0;width:100%}.rangeslider__handle{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g) #fff;border:1px solid #ccc;cursor:pointer;display:inline-block;width:40px;height:40px;position:absolute;background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(255,255,255,0)),color-stop(100%,rgba(0,0,0,.1)));background-image:-moz-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:-webkit-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));-moz-box-shadow:0 0 8px rgba(0,0,0,.3);-webkit-box-shadow:0 0 8px rgba(0,0,0,.3);box-shadow:0 0 8px rgba(0,0,0,.3);-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;line-height:42px;text-align:center;color:#000;font-size:13px;font-weight:700}.rangeslider__handle:after{content:"";display:block;width:18px;height:18px;margin:auto;position:absolute;top:0;right:0;bottom:0;left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEzIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.13)),color-stop(100%,rgba(255,255,255,0)));background-image:-moz-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:-webkit-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%}.rangeslider--active .rangeslider__handle,.rangeslider__handle:active{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,rgba(0,0,0,.12)));background-image:-moz-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:-webkit-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12))}.rangeslider--horizontal .rangeslider__handle{top:-10px;touch-action:pan-y;-ms-touch-action:pan-y}.rangeslider--vertical .rangeslider__handle{left:-10px;touch-action:pan-x;-ms-touch-action:pan-x}input[type=range]:focus+.rangeslider .rangeslider__handle{-moz-box-shadow:0 0 8px rgba(255,0,255,.9);-webkit-box-shadow:0 0 8px rgba(255,0,255,.9);box-shadow:0 0 8px rgba(255,0,255,.9)}.attachment-media-view button{color:#000;padding:5px 7px;line-height:1.5em}.czr-sektion-buttons{position:absolute;right:0}.czr-column{width:99%;margin-bottom:1%;float:left;padding:2% 0;border:2px dotted #aaa;text-align:center}.czr-column-header{position:relative}.czr-col-drag-handler{position:absolute;left:0;padding:1%;color:#999;cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.czr-module-collection-wrapper{width:100%;min-height:5px;float:left}.czr-single-module{width:98%;float:left;min-height:20px;margin:1px 1%;border:1px solid #ccc}.czr-single-module textarea{max-width:100%}#customize-theme-controls .czr-single-module .czr-single-item{width:96%}.czr-mod-header{background:#eee;float:left;width:100%}.czr-mod-title{position:relative}.czr-mod-title>h4{float:left;width:70%;margin:2% 0}.czr-mod-drag-handler{position:absolute;left:0;padding:1%;margin:2% 0;color:#999;cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.czr-mod-buttons{float:right;width:30%;margin:2% 0}.czr-mod-content{position:absolute;top:0;left:100%;float:left;width:100%;background:#d5e9cc;display:none}.czr-module-open #customize-info,.czr-module-open #customize-theme-controls{left:-200%}.czr-module-open #customize-theme-controls .accordion-section-content{overflow:visible}.czr-module-description-container{margin-bottom:15px}.czr-module-title{border-bottom:1px solid #ddd;background:#fff}.czr-module-title h3{padding:10px 10px 12px 14px;margin:0;color:#555;font-size:20px;font-weight:200;line-height:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .czr-module-title span.customize-action{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;display:block;font-weight:400}.czr-module-back{display:block;float:left;width:48px;height:74px;padding:0 24px 0 0;margin:0;background:#fff;border:none;border-right:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;-moz-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;-ms-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;-o-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out}.czr-module-back:focus,.czr-module-back:hover{color:#23282d;background:#f5f5f5;outline:0;-webkit-box-shadow:none;box-shadow:none}.czr-module-back:before{font:400 20px/72px dashicons;content:"\f341";position:relative;left:13px}.czr-module-back:hover{color:#23282d;background:#f5f5f5;outline:0;-webkit-box-shadow:none;box-shadow:none}.gu-mirror{position:fixed!important;margin:0!important;z-index:999999!important;opacity:.8;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80)}.gu-hide{display:none!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";filter:alpha(opacity=20)}.gu-unselectable .czr-module-collection-wrapper{width:98%;border:1px dotted green;background:#d1ffe0;min-height:31px}li.czr-module-candidate.gu-mirror,li.czr-single-module.gu-mirror{list-style:none}#czr-module-list-panel{position:absolute;top:0;bottom:0;left:-301px;opacity:0;overflow-x:hidden;overflow-y:auto;margin:0;z-index:4;background:rgba(0,0,0,.47);-webkit-transition:all .18s;-moz-transition:all .18s;-ms-transition:all .18s;-o-transition:all .18s;transition:all .18s;border-right:1px solid #ddd}#czr-available-modules-filter,#czr-module-list-panel{width:45%;min-width:300px}body.czr-adding-module #czr-module-list-panel{left:0;visibility:visible;opacity:1}body.czr-adding-module #customize-preview{opacity:.7}.add-new-module:before{content:"\f132";display:inline-block;position:relative;left:-2px;top:-1px;font:400 20px/1 dashicons;vertical-align:middle;-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.czr-column .add-new-module{margin:1%;float:right}body.czr-adding-module .add-new-module,body.czr-adding-module .add-new-module:hover{background:#eee;border-color:#929793;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}body.czr-adding-module .add-new-module:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#czr-available-modules-list{top:60px;position:absolute;overflow:auto;bottom:0;width:100%}#czr-available-modules-filter{position:fixed;top:0;z-index:1;background:rgba(0,0,0,.47);border-bottom:1px solid #e5e5e5;padding:12px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#czr-available-modules-filter input{padding:6px 10px;width:100%}#czr-available-modules-list .czr-module-candidate{position:relative;border-bottom:1px solid #e5e5e5}#czr-available-modules-list .czr-module-candidate h3{color:#fff;padding:0;margin:0}#czr-available-modules-list .czr-mod-drag-handler{position:relative;left:0;padding:1%;margin:2% 4%;color:inherit;cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}#czr-sektion-settings-panel{position:absolute;top:0;bottom:0;width:45%;min-width:300px;left:-301px;opacity:0;overflow-x:hidden;overflow-y:auto;margin:0;z-index:4;background:rgba(0,0,0,.47);-webkit-transition:all .18s;-moz-transition:all .18s;-ms-transition:all .18s;-o-transition:all .18s;transition:all .18s;border-right:1px solid #ddd;color:#fff}#czr-sektion-settings-panel h3{color:#fff}body.czr-editing-sektion #czr-sektion-settings-panel{left:0;visibility:visible;opacity:1}body.czr-editing-sektion #customize-preview{opacity:.7}#customize-controls .customize-section-title.is-in-view,.czr-skop-on #customize-controls .customize-info.is-in-view{opacity:0}.czr-skop-on .wp-full-overlay-sidebar .wp-full-overlay-header{height:185px}.czr-skop-on .wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{top:185px!important}.wp-customizer .in-sub-panel .wp-full-overlay-sidebar .wp-full-overlay-header{padding:0 15px}.customize-controls-close{border-bottom:1px solid #ddd}.czr-skop-on #customize-controls #customize-notifications-area{z-index:1000}.wp-customizer #customize-header-actions{border-bottom:0}.czr-scope-switcher{width:100%;float:right;position:absolute;left:0;bottom:0;overflow:hidden}.czr-scope-switcher .czr-skp-permanent-title{position:relative;color:#5f5f5f}#customize-header-actions .czr-scope-switcher .spinner{float:none;display:none;margin:0;left:-26px;top:0;position:absolute;visibility:visible}h2.czr-current-skope-title{font-size:13px;line-height:21px;margin:6px 0 4px;text-align:center;height:63px;font-weight:400;overflow:hidden}.czr-main-title{max-height:24px;overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:95%}.czr-skope-title{display:block;font-size:17px;font-style:italic;line-height:25px}.czr-toggle-title-notice{cursor:pointer;font-size:14px;color:#777}.czr-skope-inherits-from{display:inline-block;opacity:0;width:90%;font-size:12px;line-height:18px;color:#0029ff;top:-6px;position:relative}.notice-visible .czr-toggle-title-notice{color:#0029ff}.notice-visible .czr-skope-inherits-from{opacity:1;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.czr-scope,.czr-scope-switcher .button{-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;float:left}.czr-scope-switcher .button{width:40%;text-align:center;margin:0 2%;opacity:.7;transition:opacity .3s ease-in-out}.czr-scope-switcher .button.active{font-weight:700;opacity:1}.czr-scope-switcher .active,.czr-scope-switcher .czr-scope:hover{opacity:1}.czr-skopes-wrapper{overflow:hidden;position:relative}.czr-scope-switcher .active:after,.czr-scope.active:before{position:absolute;content:'';top:0}.czr-scope.active:before{height:101%;float:left;z-index:1;-webkit-box-shadow:-4px 0 15px 0 rgba(119,119,119,.58);box-shadow:-4px 0 15px 0 rgba(119,119,119,.58)}.czr-scope-switcher .active:after{height:100%;-webkit-box-shadow:4px 0 15px 0 rgba(119,119,119,.58);box-shadow:4px 0 15px 0 rgba(119,119,119,.58);z-index:3}.czr-skopes-wrapper .active-collection.local:after{right:0}.czr-scope-switcher .czr-scope:last-child:after{-webkit-box-shadow:none;box-shadow:none;right:0}.czr-scope-switcher .czr-scope:first-child:after{left:0}.czr-scope{width:30.5%;background:#fff;border-top:1px solid #ccc;overflow:hidden;opacity:.65;transition:opacity .3s ease-in-out}.czr-scope-switcher .width-100,.czr-scope.width-100.active:after,.czr-scope.width-100.active:before{width:100%}.czr-scope-switcher .width-50,.czr-scope.width-50.active:after,.czr-scope.width-50.active:before{width:50%}.czr-scope-switcher .width-33,.czr-scope.width-33.active:after,.czr-scope.width-33.active:before{width:33.33%}.czr-scope-switcher .width-25,.czr-scope.width-25.active:after,.czr-scope.width-25.active:before{width:25%}.czr-scope-footer,.czr-scope-header{width:100%;min-height:16px;position:relative;z-index:5}.inactive .czr-scope-footer:after{content:'';width:100%;position:absolute;height:5px;bottom:-7px;left:0;-webkit-box-shadow:0 0 13px 4px rgba(119,119,119,.85);box-shadow:0 0 13px 4px rgba(119,119,119,.85)}.czr-scope-content{height:35px;padding:0 3%;width:94%;line-height:35px;text-align:center;clear:both;color:#000;overflow:hidden}.czr-scope-content h4{margin:0;display:inline-block;text-align:center;font-size:14px;line-height:18px;font-weight:400;text-shadow:1px 1px 0 #dedede}.czr-reset-fail,.czr-reset-success,.czr-scope-force{display:none}.czr-scope .fa{font-size:10px;padding:2%;color:#585858;cursor:pointer;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.czr-scope .czr-scope-footer .info{cursor:inherit}.czr-scope-header .czr-scope-switch{font-size:22px;padding:0 2px 0 0;text-shadow:1px 1px 2px #fff}.czr-skp-switch-link{cursor:pointer}.czr-pull-left{float:left}.czr-pull-right{float:right}.active .czr-scope-switch{color:#59b15c;cursor:inherit}.czr-scope .czr-scope-reset{display:none;font-size:13px;text-shadow:1px 1px 0 #dedede}.has-db-val .czr-scope-reset{color:#00a0d2}.dirty .czr-scope-reset{color:#FFBD2E!important}.is_winner .czr-scope-winner{color:#59b15c;font-size:14px;position:absolute;bottom:2px;left:2px}.czr-skope-switch{cursor:pointer}.czr-spinner-wrapper{visibility:hidden}.czr-spinner{background:url(img/czr-spinner.gif) no-repeat;-webkit-background-size:32px 32px;background-size:32px 32px;display:inline-block;float:right;vertical-align:middle;opacity:.7;filter:alpha(opacity=70);width:32px;height:32px;margin:4px 10px 0}.customize-control span.customize-control-title:first-child{padding-left:16px;-webkit-transition:left,right,.15s ease-in-out;-moz-transition:left,right,.15s ease-in-out;-ms-transition:left,right,.15s ease-in-out;-o-transition:left,right,.15s ease-in-out;transition:left,right,.15s ease-in-out;position:relative}.wp-customizer .customize-control.czr-not-skoped .customize-control-title{padding-left:0}.czr-setting-reset{color:#eee;-webkit-transition:color .4s;transition:color .4s;position:absolute;left:0;line-height:21px;display:none;text-shadow:1px 1px 0 #a0a0a0}#czr-bottom-infos,#czr-top-note,.czr-resetting-control .czr-remove-alert-wrapper{-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out}.czr-global-skope-level .is-wp-authorized-setting.has-db-val .czr-setting-reset{color:#eee}.has-db-val .czr-setting-reset{color:#00a0d2}.is-dirty .czr-setting-reset{color:#FFBD2E!important}.czr-ctrl-reset-warning .czr-spinner{display:none}.czr-resetting-control .czr-ctrl-reset-warning .czr-spinner{display:block}.is-dirty .czr-remove-alert-wrapper{background-color:rgba(255,189,46,.54)!important;border:1px solid #FFBD2E!important;text-shadow:none;color:#000}.has-db-val .czr-remove-alert-wrapper{background-color:rgba(0,160,210,.45);border:1px solid #00a0d2;text-shadow:none;color:#000}.czr-resetting-control .czr-remove-alert-wrapper{-webkit-transition:all,.3s ease-in-out;transition:all,.3s ease-in-out}body.czr-skop-loading #czr-skope-pane{top:0}body.czr-skop-loading #customize-preview{filter:blur(3px);-webkit-filter:blur(3px)}@-webkit-keyframes czr-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes czr-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.czr-css-loader{width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);-ms-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%;display:block}.czr-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.czr-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.czr-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.czr-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.czr-mr-loader>div{position:absolute;top:-4%;left:-4%;width:100%;height:100%;border-radius:100%;border:2px solid #fff;-webkit-animation:czr-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:czr-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}#czr-bottom-infos,#czr-top-note{position:absolute;text-align:center;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;visibility:hidden}.czr-preview-notification a,.czr-preview-notification h2{color:#fff;margin:1em 0}.czr-preview-notification .czr-preview-note-close{position:absolute;top:10px;right:25px;font-size:31px;cursor:pointer}.czr-preview-notification .fa-arrow-left{position:absolute;bottom:10px;left:25px;font-size:40px}.czr-preview-notification .czr-note-content{display:inline-block;line-height:20px;width:80%}.czr-preview-notification .czr-note-message{font-size:16px;line-height:1.5em;margin:.5em 0}#czr-top-note{top:-100%;background:rgba(0,0,0,.8);padding:2%}#czr-top-note h2{font-size:25px}body.czr-top-note-open #czr-top-note{top:0;visibility:inherit}#czr-bottom-infos{bottom:-100%;background-color:rgba(0,0,0,.85);padding:1px}body.czr-bottom-infos-open #czr-bottom-infos{bottom:0;visibility:inherit}#czr-bottom-infos .czr-note-content .czr-note-message{font-size:13px}#czr-bottom-infos .action-links-wrap{width:100%}#czr-bottom-infos .action-link{font-style:italic;display:inline-block;width:40%}#czr-bottom-infos .action-link a:hover{color:#fff}.czr-disable-bottom-infos{cursor:pointer}#czr-skope-pane{position:absolute;min-height:100%;text-align:center;padding:2%;top:-100%;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;visibility:hidden}#czr-skope-pane.dirty-reset{background:rgba(252,173,6,.23)}#czr-skope-pane.db-reset{background:rgba(0,160,210,.3)}.czr-reset-content{display:inline-block;line-height:20px;width:80%;padding:5%;background:rgba(0,0,0,.63)}#czr-skope-pane h2{color:#fff;line-height:1.5em}body.czr-skope-pane-open #czr-skope-pane{top:0;visibility:inherit;min-height:100%}body.czr-skope-pane-open #customize-preview,body.czr-skope-pane-open .wp-full-overlay-sidebar{opacity:.5}body.czr-resetting-skope #czr-skope-pane .czr-spinner-wrapper{visibility:visible}.czr-skope-pane-open .wp-full-overlay.collapsed .wp-full-overlay-sidebar{z-index:30}.czr-skope-pane-open .wp-full-overlay.expanded .collapse-sidebar{bottom:0!important}.customize-control .czr-skope-notice{color:#3a3a3a;font-family:Verdana,'DejaVu Sans','Bitstream Vera Sans',Geneva,sans-serif;font-size:10px;line-height:1.5em;font-style:normal;border-left:3px solid rgba(99,99,99,.36);padding-left:5px}.czr-toggle-notice{color:#95a5a6;text-shadow:1px 1px 0 #fff;-webkit-transition:color .4s;transition:color .4s;position:absolute;padding-left:3px;line-height:21px;display:none}.czr-notice-visible .czr-toggle-notice,.czr-toggle-notice:hover{color:rgba(0,0,0,.67)}.wp-full-overlay-header,.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{-webkit-transition:height,top,.4s ease-in-out;-moz-transition:height,top,.4s ease-in-out;-ms-transition:height,top,.4s ease-in-out;-o-transition:height,top,.4s ease-in-out;transition:height,top,.4s ease-in-out}.czr-server-notice{width:calc(96% - 2px);bottom:75px;text-align:center;background:rgba(0,156,0,.18);color:#000;display:none;position:absolute;font-size:12px;line-height:13px;padding:2%;overflow:hidden}.czr-server-notice.czr-server-error{color:#000;background:rgba(255,0,0,.24)}.czr-dismiss-notification{position:absolute;right:5px;top:5px;cursor:pointer}.wp-customizer .icheckbox_flat-grey,.wp-customizer .iradio_flat-grey{border:1px solid #fff;-webkit-border-radius:5px;border-radius:5px;background-color:#fff}.czr-painted{-webkit-transition:background .3s ease-in-out!important;-moz-transition:background .3s ease-in-out!important;-ms-transition:background .3s ease-in-out!important;-o-transition:background .3s ease-in-out!important;transition:background .3s ease-in-out!important}
1
+ .wp-customizer a{color:#000}.wp-customizer a:focus,.wp-customizer a:hover{color:#0073aa}.wp-customizer .wp-full-overlay.expanded{margin-left:440px}.wp-customizer .wp-full-overlay-sidebar{width:440px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-440px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-440px}.accordion-sub-container.control-panel-content{left:440px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:440px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:440px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-440px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-440px}.rtl .accordion-sub-container.control-panel-content{right:440px}.customize-section-description-container+#customize-control-custom_css:last-child{margin:0;width:100%}li#customize-control-custom_css textarea{font-size:13px;background:#394143;color:#95ff0c;min-height:300px}@media screen and (max-width:1400px){.wp-customizer .wp-full-overlay.expanded{margin-left:380px}.wp-customizer .wp-full-overlay-sidebar{width:380px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-380px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-380px}.accordion-sub-container.control-panel-content{left:380px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:380px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:380px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-380px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-380px}.rtl .accordion-sub-container.control-panel-content{right:380px}}@media screen and (max-width:979px){.wp-customizer .wp-full-overlay.expanded{margin-left:300px}.wp-customizer .wp-full-overlay-sidebar{width:300px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-300px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-300px}.accordion-sub-container.control-panel-content{left:300px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:300px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:300px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-300px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-300px}.rtl .accordion-sub-container.control-panel-content{right:300px}}@media screen and (max-width:640px){.wp-customizer .customize-controls-preview-toggle{height:46px;border-bottom:1px solid #ddd;left:87px}.wp-customizer .wp-full-overlay.expanded{margin-left:0}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-100%}.accordion-sub-container.control-panel-content{left:100%}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title,.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-100%;left:auto}.rtl .accordion-sub-container.control-panel-content{right:100%}}.wp-customizer .control-section.control-panel .accordion-section-title .panel-title{font-size:24px;font-weight:inherit;line-height:30px}.wp-core-ui h3{color:#555}.accordion-section-content{padding:10px 10px 15px 20px}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow,.widget-action{color:#00a0d2}.control-section.control-panel>.accordion-section-title:after{color:#00a0d2}.customize-control-title{line-height:19px}.wp-customizer #customize-theme-controls .accordion-section-content{background:#fff}.wp-customizer #customize-controls .customize-info .customize-help-toggle:focus,.wp-customizer #customize-controls .customize-info .customize-help-toggle:hover,.wp-customizer #customize-controls .customize-info.open .customize-help-toggle{color:#00a0d2}.wp-customizer #customize-controls .customize-info .customize-help-toggle:focus:before,.wp-customizer .customize-screen-options-toggle:focus:before{-webkit-box-shadow:0 0 0 1px #00a0d2;box-shadow:0 0 0 1px #00a0d2;-webkit-border-radius:100%;border-radius:100%}.wp-customizer #available-menu-items .menu-item-handle:hover .item-add,.wp-customizer .menu-item-handle:hover,.wp-customizer .menu-item-handle:hover .item-edit,.wp-customizer .menu-item-handle:hover .item-type{color:#00a0d2}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover,.active-menu-screen-options .customize-screen-options-toggle,.customize-screen-options-toggle:active,.customize-screen-options-toggle:focus,.customize-screen-options-toggle:hover{color:#00a0d2!important}.customize-control input[type=text]{line-height:23px}li[id*=customize-control-]{margin:8px 0;padding:2%;width:96%;border:1px solid rgba(221,221,221,.43);box-shadow:1px 0 2px 0 rgba(204,204,204,.45);-webkit-box-shadow:1px 0 2px 0 rgba(204,204,204,.45)}#customize-outer-theme-controls li[id*=customize-control-]{width:100%}#customize-outer-theme-controls input[type=checkbox],#customize-outer-theme-controls input[type=radio]{float:none;min-height:inherit}.control-section .accordion-section-content{overflow-y:auto}.wp-customizer .control-section h3.accordion-section-title{padding:10px 25px 11px 14px}.wp-customizer #customize-controls h3{font-size:15px;font-weight:400}.control-section .accordion-section-title:after{top:7px}.control-section.control-panel .accordion-section-title:after{top:11px;-webkit-transition:right .3s ease-in-out,opacity .3s ease-in-out;-moz-transition:right .3s ease-in-out,opacity .3s ease-in-out;-ms-transition:right .3s ease-in-out,opacity .3s ease-in-out;-o-transition:right .3s ease-in-out,opacity .3s ease-in-out;transition:right .3s ease-in-out,opacity .3s ease-in-out;right:10px;opacity:.7}.rtl .control-section.control-panel .accordion-section-title:after{-webkit-transition:left .3s ease-in-out,opacity .3s ease-in-out;-moz-transition:left .3s ease-in-out,opacity .3s ease-in-out;-ms-transition:left .3s ease-in-out,opacity .3s ease-in-out;-o-transition:left .3s ease-in-out,opacity .3s ease-in-out;transition:left .3s ease-in-out,opacity .3s ease-in-out;left:10px;right:initial}#customize-theme-controls .control-section.control-panel h3.accordion-section-title:focus:after,#customize-theme-controls .control-section.control-panel h3.accordion-section-title:hover:after{right:8px;opacity:1;color:#666!important}.rtl #customize-theme-controls .control-section.control-panel h3.accordion-section-title:focus:after,.rtl #customize-theme-controls .control-section.control-panel h3.accordion-section-title:hover:after{left:6px;right:initial}#customize-theme-controls .control-section.control-panel>h3.accordion-section-title:focus:after,#customize-theme-controls .control-section.control-panel>h3.accordion-section-title:hover:after,.control-section.control-panel>.accordion-section-title:after{background:0 0!important;border:none!important}#customize-theme-controls h3.accordion-section-title{-webkit-transition:background .1s ease-in-out;-moz-transition:background .1s ease-in-out;-ms-transition:background .1s ease-in-out;-o-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{line-height:16px;margin-left:0}input::-webkit-input-placeholder{color:#9a9a9a;font-style:italic}input:-moz-placeholder{color:#9a9a9a;font-style:italic}input::-moz-placeholder{color:#9a9a9a;font-style:italic}input:-ms-input-placeholder{color:#9a9a9a;font-style:italic}.czr-customizr-title{text-transform:uppercase;margin:1em 0 5px 0;font-size:15px!important;border-bottom:1px dotted #555;padding-bottom:5px;text-align:center}h3.czr-customizr-title::before{content:'\00b7';padding-right:3px}h3.czr-customizr-title::after{content:'\00b7';padding-left:3px}.czr-after-button{border-color:#fff;margin-top:15px}.czr-emphasize{line-height:1.2em;color:#2e2e2e}i.czr-notice{display:block;clear:both}span.czr-notice{color:#313131;font-size:12px;font-style:italic;clear:both;display:block;line-height:18px}.czr-customizer-separator-invisible{border:none;margin-top:15px}.czr-skin-gen-label{float:left}.czr-skin-gen-color-picker{float:right}.czr-number-label{float:left}.czr-number-input{float:right}.czr-check-label{float:left;max-width:85%}.rtl .czr-check-label{float:right}input[type=checkbox],input[type=radio]{float:right;min-height:18px}.czr-font-select{float:left}li#customize-control-tc_theme_options-tc_custom_css textarea{font-size:14px;background:#394143;color:#e2e728;min-height:300px}.customize-control .czr-navigate-to-post-list{color:#00a0d2;font-weight:700;float:left;clear:both;width:100%;margin-bottom:8px}.czr-sub-control{padding-left:13%;max-width:87%;position:relative}.czr-sub-control:before{content:'';height:116%;background:#00a0d2;width:2%;position:absolute;left:7%}.customize-control-tc_cropped_image .upload-button{float:right}.customize-control-tc_cropped_image .remove-button{float:left;margin-right:3px}.customize-control-tc_cropped_image .actions{margin-bottom:32px}.customize-control-tc_cropped_image .current{margin-bottom:8px}.customize-control-tc_cropped_image .remove-button,.customize-control-tc_cropped_image .upload-button{white-space:normal;width:48%;height:auto}.customize-control-tc_cropped_image .current .container{min-height:40px;overflow:hidden;border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px}.customize-control-tc_cropped_image img{width:100%;-webkit-border-radius:2px;border-radius:2px}.customize-control-tc_cropped_image .inner{line-height:20px;top:10px}.rtl .customize-control-tc_cropped_image .upload-button{float:left}.rtl .customize-control-tc_cropped_image .remove-button{float:right;margin-left:3px}.czr-layout-img{height:26px;padding-top:2px;border:1px solid #fff}.czr-layout-title{padding:0 0 18px 12px;display:inline-block;line-height:0;vertical-align:middle}.customize-control-czr_multi_input{width:96%;border:1px solid #ccc;padding:2%}.czr-multi-input-wrapper{width:95%;padding:0 0 0 5%}.czr-multi-input-wrapper [data-input-type=color] .czr-input{float:left;clear:both}#customize-theme-controls #accordion-panel-czr-footer-panel{border-bottom:1px solid #ddd}#customize-theme-controls #accordion-panel-hu-advanced-panel,#customize-theme-controls #accordion-panel-nav_menus,#customize-theme-controls .control-panel-widgets{margin-top:10px}#customize-theme-controls #accordion-panel-hu-advanced-panel,#customize-theme-controls #accordion-panel-hu-header-panel,#customize-theme-controls #accordion-panel-nav_menus,#customize-theme-controls .control-panel-widgets{border-top:1px solid #ddd}#customize-theme-controls #accordion-panel-hu-general-panel,#customize-theme-controls #accordion-panel-tc-global-panel{margin-bottom:10px}#customize-theme-controls #accordion-section-frontpage_sec,#customize-theme-controls #accordion-section-static_front_page{margin-bottom:10px}#customize-theme-controls #accordion-section-tc_fpu{margin-bottom:10px}#customize-theme-controls #accordion-section-tc_font_customizer_settings{margin-bottom:10px}#customize-header-actions .customize-controls-close{left:45px}.customize-controls-close,.customize-controls-home{top:-1px}.customize-controls-home{display:block;position:absolute;left:0;width:45px;height:41px;padding:0 2px 0 0;background:#eee;border:none;border-top:4px solid #eee;border-right:1px solid #ddd;border-bottom:1px solid #ddd;color:#444;text-align:left;cursor:pointer;text-decoration:none;-webkit-transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;transition:color .1s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.customize-controls-home:before{font-size:17px;line-height:45px;position:relative;top:-4px;left:15px}.customize-controls-home:hover{background:#fff;color:#0073aa;border-top-color:#0073aa;outline:0;-webkit-box-shadow:none;box-shadow:none}.rtl.wp-customizer #customize-header-actions .customize-controls-close{right:45px;left:auto}.rtl.wp-customizer .customize-controls-home{left:auto;right:0;border-right:0;border-left:1px solid #ddd}.control-panel-content .hu-menu-notice{margin-left:3%}span.czr-panel-subtitle{display:block;font-size:12px;font-style:italic}.pro-title-block{border:1px solid #eea236;padding:0 6px;font-size:.7em;display:inline-block;margin-right:3px;bottom:2px;position:relative;color:#f0ad4e;webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#customize-controls .control-section-czr-customize-section-pro .accordion-section-title:focus,#customize-controls .control-section-czr-customize-section-pro .accordion-section-title:hover{background-color:#fff}#customize-theme-controls .control-section-czr-customize-section-pro .accordion-section-title:after{content:none}#accordion-section-go_pro_sec .accordion-section-title{margin:0 0 15px}.control-section-czr-customize-section-pro .accordion-section-title .button{font-size:15px;line-height:24px;height:30px;padding:1px 20px;display:inline-block;color:#f59000;background:#fff;border:1px solid #eea236;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border-radius:3px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-top:-4px;font-weight:400;margin-left:8px}.control-section-czr-customize-section-pro .accordion-section-title .button:hover{color:#fff;background:#ed9c28;border-color:#d58512}.rtl .control-section-czr-customize-section-pro .accordion-section-title .button{margin-left:0;margin-right:8px}.czr-open-pre-add-new{display:block;float:left;margin:2% 2% 0;width:99%;padding:2%;background:#3b8dbd;opacity:1;color:#fff;font-size:16px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;-ms-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}.czr-open-pre-add-new.active{background:#646464;opacity:.5;border-radius:3px 3px 0 0}.czr-single-item{padding:0;border:1px solid #ccc;margin:1% 0 0 2%;float:left;width:98%;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;-ms-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}#customize-theme-controls .czr-single-item.open{border:1px solid #dedede}#customize-theme-controls .mono-item-mod .czr-single-item{border:1px solid #ccc}.czr-single-item .czr-item-content,.czr-single-item .czr-item-header{padding:1%}.czr-items-wrapper .czr-single-item .czr-builtin-model{background:#e1dfdf;color:#555}.czr-items-wrapper .inactive{opacity:.6}.czr-item-sort-handle{cursor:move}.czr-single-item .czr-item-header{position:relative;background:#dfdfdf;color:#fff;float:left;width:98%;-webkit-transition:background .1s ease-in-out;-moz-transition:background .1s ease-in-out;-ms-transition:background .1s ease-in-out;-o-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.czr_widget_areas_module .czr-single-item .czr-custom-model{background:#3b8dbd}. .czr-single-item .czr-custom-model:hover{background:#aaa}.czr-single-item .czr-item-header:hover{background:#ccc}.czr-items-wrapper .czr-single-item .czr-builtin-model:hover{background:#ccc}.czr-move-icon{position:absolute;top:-2px;left:3px;font-size:10px;color:#999}.czr-item-title{float:left;font-size:17px;color:#000;padding:7px;width:67%}.czr-inactive-alert{font-size:12px;font-style:italic}.czr_widget_areas_module .czr-item-title{color:#fff}.czr-builtin-model .czr-item-title{color:#23282d}.czr-item-title h4{margin:0}.czr-item-title .fab::before,.czr-item-title .far::before,.czr-item-title .fas::before{padding-right:2px}.czr-item-btns{float:right}.czr-item-btns a{font-size:17px;padding:7px 5px;color:#777;-webkit-transition:color .1s ease-in-out;-moz-transition:color .1s ease-in-out;-ms-transition:color .1s ease-in-out;-o-transition:color .1s ease-in-out;transition:color .1s ease-in-out}.czr-item-btns a:active,.czr-item-btns a:focus{outline:0;outline:0;-webkit-box-shadow:none;box-shadow:none}.czr_widget_areas_module .czr-item-btns a{color:#fff}.czr-builtin-model .czr-item-btns a{color:#555}.czr-builtin-model .czr-item-btns .czr-edit-view.active,.czr-builtin-model .czr-item-btns .czr-edit-view:hover{color:#00a0d2}.czr-item-btns .czr-edit-view.active,.czr-item-btns .czr-edit-view:hover{color:#00a0d2}.czr_widget_areas_module .czr-edit-view:hover,.czr_widget_areas_module .czr-item-btns .czr-edit-view.active{color:#000}.czr_widget_areas_module .czr-builtin-model .czr-edit-view.active,.czr_widget_areas_module .czr-builtin-model .czr-edit-view:hover{color:#00a0d2}.czr-item-btns .czr-display-alert.active,.czr-item-btns .czr-display-alert:hover{color:#23282d}.czr-single-item .czr-item-content{display:none;background:rgba(238,238,238,.5);clear:both;width:96%;padding:2%}.czr-single-item .czr-item-content input{margin-bottom:0}.czr-sub-set{margin-bottom:0;display:block;float:left;width:100%;padding:1% 0;position:relative}.czr-sub-set .czr-input{float:right;width:60%}.czr-sub-set .customize-control-title.width-100,.width-100 .czr-input{width:100%}.czr-sub-set .customize-control-title{float:left;width:40%;padding:1px 0;font-size:13px}.rtl.wp-customizer .czr-sub-set .customize-control-title{float:right}.disabled .customize-control-title,.disabled .czr-input{opacity:.6;filter:blur(1px);-webkit-filter:blur(1px)}.czr-item-title .fab,.czr-item-title .far,.czr-item-title .fas{font-size:18px}.czr-remove-alert-wrapper{display:none;clear:both;float:left;padding:2%;width:95%;margin:10px 0;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#eee;color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.czr-remove-alert-wrapper p{padding:5px;margin:0}.czr-pre-add-wrapper{position:relative;float:left;width:100%}.czr-adding-new .czr-items-wrapper{opacity:.6}.czr-pre-add-view-content{display:none;padding:3%;border:1px solid #00a0d2;border-top:none;margin:0 0 0 2%;float:left;width:92%;background:#eee;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;position:relative;opacity:1;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-ms-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.czr-model-added .czr-pre-add-view-content{opacity:.2}.czr-pre-add-wrapper .czr-add-new{background:#3b8dbd;color:#fff;-webkit-transition:background .5s linear;-moz-transition:background .5s linear;-ms-transition:background .5s linear;-o-transition:background .5s linear;transition:background .5s linear;float:right;border:none}.czr-add-success{width:100%;margin:0 0 0 2%;position:absolute;top:0;left:0;font-size:25px;text-align:center;opacity:0;-webkit-transition:opacity .1s linear;-moz-transition:opacity .1s linear;-ms-transition:opacity .1s linear;-o-transition:opacity .1s linear;transition:opacity .1s linear}.czr-model-added .czr-add-success{opacity:1}.czr-add-success p{vertical-align:middle;display:inline-block;line-height:35px;margin:0;font-size:25px;color:#82b965;padding:0 3%}.control-section-widget_zones_management{margin:10px 0;z-index:1}.czr-zone-infos{width:96%;padding:0 2%;font-size:12px;float:left;font-style:italic}.czr-unavailable-location{opacity:.7}.czr-location-alert{float:left;width:100%;padding:1% 0;margin:1% 0;text-align:center;border:1px solid orange;background:#fee5b6;color:#000;font-size:11px;font-style:italic}.czr-toggle-modopt{color:#495050;text-shadow:1px 1px 0 #fff;-webkit-transition:color .4s;transition:color .4s;position:absolute;right:0;padding-left:3px;font-size:25px;line-height:24px}.rtl.wp-customizer .czr-toggle-modopt{left:0;right:auto;padding-left:0;padding-right:3px}.czr-modopt-visible .czr-toggle-modopt,.czr-toggle-modopt:hover{color:#3b8dbd}body.czr-editing-modopt #customize-preview{opacity:.7}body #customize-controls{-webkit-transition:opacity .4s ease-in-out;-moz-transition:opacity .4s ease-in-out;-ms-transition:opacity .4s ease-in-out;-o-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out}body.czr-editing-modopt #customize-controls{opacity:.4}.czr-mod-opt-wrapper{position:absolute;top:0;bottom:0;left:-301px;opacity:0;overflow-x:hidden;overflow-y:auto;margin:0;z-index:4;width:60%;min-width:300px;padding:1% 2%;color:#fff;background:rgba(0,0,0,.8);-webkit-transition:all .18s ease-in-out;-moz-transition:all .18s ease-in-out;-ms-transition:all .18s ease-in-out;-o-transition:all .18s ease-in-out;transition:all .18s ease-in-out;border-right:1px solid #4c4c4c}body.czr-editing-modopt .czr-mod-opt-wrapper{left:0;visibility:visible;opacity:1}.czr-close-modopt{position:absolute;top:10px;right:25px;font-size:31px;cursor:pointer}.czr-mod-opt-wrapper .czr-sub-set{background:rgba(238,238,238,.13);padding:3% 2%;width:96%;margin:5px 0}.czr-mod-opt-wrapper .czr-notice{color:#fff}.czr-mod-opt-wrapper .mod-opt-title{color:#fff;border-bottom:1px solid #fff;padding:5% 0;text-align:center}.tabs{position:relative;display:none;overflow:hidden;margin:0 auto;width:100%;font-weight:300;font-size:1.25em}.tabs nav{text-align:center}.tabs nav ul{position:relative;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:-moz-flex;display:-ms-flex;display:flex;margin:0 auto;padding:0;max-width:1200px;list-style:none;-ms-box-orient:horizontal;-ms-box-pack:center;-webkit-flex-flow:row wrap;-moz-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center}.tabs nav ul li{position:relative;z-index:1;display:block;margin:0;text-align:center;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}.tabs nav ul li.cols-4{width:25%}.tabs nav ul li.cols-3{width:33%}.tabs nav ul li.cols-2{width:50%}.tabs nav ul li.cols-1{width:100%}.tabs nav a{position:relative;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.tabs nav a span{vertical-align:middle;font-size:.75em}.tabs nav li.tab-current a{color:#74777b}.tabs nav a:focus{outline:0}li.tab-current::after,li.tab-current::before{content:'';height:100%;position:absolute;-webkit-box-shadow:4px 0 15px 0 rgba(37,37,37,.63);box-shadow:4px 0 15px 0 rgba(37,37,37,.63);top:0;width:0;right:0;z-index:4;width:100%}li.tab-current::before{left:0;-webkit-box-shadow:0 0 15px 4px rgba(37,37,37,.63);box-shadow:0 0 15px 4px rgba(37,37,37,.63)}li.tab-inactive::after{content:'';width:100%;position:absolute;height:2px;bottom:-7px;left:0;-webkit-box-shadow:4px 0 15px 0 rgba(119,119,119,.58);box-shadow:4px 0 15px 0 rgba(0,0,0,.86)}.content-wrap{position:relative}.content-wrap section{display:none;margin:0 auto;max-width:1200px}section .czr-sub-set:first-child{margin:0}.content-wrap section.content-current{display:block}.no-flexbox nav ul{display:block}.no-flexbox nav ul li{min-width:15%;display:inline-block}.tabs-style-topline{max-width:1200px}.tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.czr-items-wrapper .tabs-style-topline nav li{border:none}.tabs-style-topline nav li:not(:last-child){border-right:none}.tabs-style-topline nav li.tab-current{border-top-color:#fff;border-bottom:none;background:rgba(238,238,238,.13)}.tabs-style-topline nav a{padding:.65em .5em;background:rgba(40,44,42,.05);color:#fff;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.czr-items-wrapper .tabs-style-topline nav a{background:rgba(40,44,42,.45)}.tabs-style-topline nav a:focus,.tabs-style-topline nav a:hover{text-decoration:underline}.tabs-style-topline nav li.tab-current a{background:0 0;box-shadow:inset 0 3px 0 #fff;color:#fff;text-decoration:underline}.czr-items-wrapper .tabs-style-topline nav li.tab-current a{color:#000}.tabs-style-topline .icon::before{display:block;margin:0}.tabs-style-topline nav a span{text-transform:uppercase;letter-spacing:1px;font-weight:700}@media screen and (max-width:58em){.tabs nav a.icon span{display:none}.tabs nav a:before{margin-right:0}}.czr_slide_module .czr-item-title{padding:0 7px;height:32px}.czr_slide_module .slide-thumb,.czr_slide_module .slide-title{display:block;height:32px;line-height:32px;float:left}.czr_slide_module .slide-title{padding-left:5px}.slide-mod-skope-notice{padding:3%;background:rgba(116,210,116,.42);float:left;font-size:12px;line-height:1.5em}.slide-mod-skope-notice .czr-skope-switch{cursor:pointer;text-decoration:underline}.modopts-top-buttons{width:100%;float:left;margin-bottom:4%;text-align:center}.item-bottom-buttons{width:100%;float:left;padding:1% 0}.item-bottom-btn,.modopt-top-btn{opacity:1;color:#fff;font-size:14px;cursor:pointer;border-width:1px;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;opacity:1}.item-bottom-btn{background:#868686;width:47%;margin-right:2%;padding:1% 0}.modopt-top-btn{background:rgba(171,171,171,.5);width:170px;padding:2px 0}.item-bottom-btn:hover{background:#5d5d5d}.modopt-top-btn:hover{background:rgba(41,41,41,.53)}.item-bottom-btn[disabled],.item-bottom-btn[disabled]:hover,.modopt-top-btn[disabled],.modopt-top-btn[disabled]:hover{opacity:.4;cursor:default;-webkit-box-shadow:none!important;box-shadow:none!important;background:inherit}.czr-notice{font-size:12px;font-weight:400}.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-450px;height:0}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-450px}@media screen and (max-width:1400px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-380px}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-380px}}@media screen and (max-width:979px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-300px}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-300px}}@media screen and (max-width:640px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-100%}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-100%;left:auto}}@media screen and (min-width:980px){.wp-customizer .expanded #customize-footer-actions{width:380px}}@media screen and (min-width:1401px){.wp-customizer .expanded #customize-footer-actions{width:440px}}.selecter-element{position:absolute;opacity:0}.selecter{display:block;float:right;margin:2px 0;position:relative;width:100%;z-index:100}.selecter .selecter-selected{background:#f9f9f9 url(img/jquery.fs.selecter-arrow.png) no-repeat right center;border:1px solid #ccc;border-radius:3px;color:#333;cursor:pointer;display:block;font-size:13px;margin:0;overflow:hidden;padding:4px 4.6%;position:relative;text-overflow:clip;z-index:49;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);height:auto;line-height:18px;width:90%}.selecter .selecter-options{border:1px solid #ccc;border-width:0 1px 1px;background-color:#fefefe;border-radius:0 0 3px 3px;box-shadow:0 1px 4px rgba(0,0,0,.15);display:none;left:0;margin:0;max-height:260px;overflow:auto;overflow-x:hidden;padding:0;position:relative;top:100%;width:99%;z-index:50}.selecter .selecter-group{background:#f9f9f9;border-bottom:1px solid #e3e3e3;color:#999;display:block;font-size:11px;padding:5px 6px 4px;text-transform:uppercase}.selecter .selecter-item{background:#fff;border-bottom:1px solid #e3e3e3;color:#333;cursor:pointer;display:block;font-size:13px;margin:0;overflow:hidden;padding:8px 10px;text-overflow:ellipsis;width:86%;height:auto;line-height:14px;padding:8px 24px 8px 10px}.selecter .selecter-item.selected{background:#f9f9f9}.selecter .selecter-item.disabled{color:#999;cursor:default}.selecter .selecter-item:first-child{border-radius:0}.selecter .selecter-item:last-child{border-radius:0 0 2px 2px;border-bottom:0}.rtl .selecter .selecter-selected{background:#f9f9f9 url(img/jquery.fs.selecter-arrow.png) no-repeat 4% center}@media screen and (min-width:980px){.selecter .selecter-item.selected:hover,.selecter .selecter-item:hover{background-color:#f3f3f3}.selecter .selecter-item.disabled:hover{background-color:#fff}.selecter:hover .selecter-selected{background-color:#fff}.selecter.disabled .selecter-item:hover{background:#fff}}.selecter.open{z-index:101}.selecter.open .selecter-selected{border-radius:3px 3px 0 0;z-index:51}.selecter.focus .selecter-selected,.selecter.open .selecter-selected{background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.1)}.selecter.cover .selecter-options{border-radius:3px;border-width:1px;top:0}.selecter.cover .selecter-options .selecter-item.first{border-radius:3px 3px 0 0}.selecter.cover.open .selecter-selected{border-radius:3px 3px 0 0;z-index:49}.selecter.bottom .selecter-options{border-width:1px 1px 0;bottom:100%;top:auto}.selecter.bottom .selecter-item:last-child{border:none}.selecter.bottom.open .selecter-selected{border-radius:0 0 3px 3px}.selecter.bottom.open .selecter-options{border-radius:3px 3px 0 0}.selecter.bottom.cover .selecter-options{bottom:0;top:auto}.selecter.bottom.cover.open .selecter-selected{border-radius:3px}.selecter.bottom.cover.open .selecter-options{border-radius:3px}.selecter.multiple .selecter-options{border-radius:3px;border-width:1px;box-shadow:none;display:block;position:static;width:100%}.selecter.disabled .selecter-selected{background:#fff;border-color:#eee;color:#ccc;cursor:default}.selecter.disabled .selecter-options{background:#fff;border-color:#eee}.selecter.disabled .selecter-group,.selecter.disabled .selecter-item{border-color:#eee;color:#ccc;cursor:default}.selecter.disabled .selecter-item.selected{background:#fafafa}.selecter .selecter-options.scroller{overflow:hidden}.selecter .selecter-options.scroller .scroller-content{max-height:260px;padding:0}@media screen and (max-width:740px){.selecter{max-width:100%}}@media screen and (max-width:500px){.selecter{max-width:100%}}.stepper{border-radius:3px;margin:0 0 10px 0;overflow:hidden;position:relative;width:35%;float:left;clear:both}.stepper .stepper-input{background:#f9f9f9;border:1px solid #ccc;border-radius:3px;color:#333;font-size:13px;line-height:1.2;margin:0;overflow:hidden;padding:5px 10px 5px!important;width:100%!important;z-index:49;-moz-appearance:textfield;max-width:none!important}.stepper .stepper-input::-webkit-inner-spin-button,.stepper .stepper-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.stepper .stepper-input:focus{background-color:#fff}.stepper .stepper-arrow{background:#eee url(img/jquery.fs.stepper-arrows.png) no-repeat;border:1px solid #ccc;cursor:pointer;display:block;height:46%;position:absolute;right:0;text-indent:-99999px;width:20px;z-index:50}.stepper .stepper-arrow.up{background-position:center top;border-bottom:none;top:0}.stepper .stepper-arrow.down{background-position:center bottom;bottom:0}.rtl .stepper .stepper-input{text-align:left}@media screen and (min-width:740px){.stepper:hover .stepper-input{background-color:#fff}.stepper .stepper-step:hover{background-color:#f9f9f9}.stepper.disabled .stepper-arrow{background:#fff;border-color:#eee;cursor:default}}.stepper.disabled .stepper-input{background:#fff;border-color:#eee;color:#ccc}.stepper.disabled .stepper-arrow{background:#fff;border-color:#eee;cursor:default}.icheckbox_flat-green,.iradio_flat-green{display:inline-block;vertical-align:middle;margin:0;padding:0;width:20px;height:20px;background:url(img/green.png) no-repeat;border:none;cursor:pointer;top:4px;float:right}.rtl [class*=icheckbox_flat-]{float:left}.icheckbox_flat-green{background-position:0 0}.icheckbox_flat-green.checked{background-position:-22px 0}.icheckbox_flat-green.disabled{background-position:-44px 0;cursor:default}.icheckbox_flat-green.checked.disabled{background-position:-66px 0}.iradio_flat-green{background-position:-88px 0}.iradio_flat-green.checked{background-position:-110px 0}.iradio_flat-green.disabled{background-position:-132px 0;cursor:default}.iradio_flat-green.checked.disabled{background-position:-154px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5){.icheckbox_flat-green,.iradio_flat-green{background-image:url(img/green@2x.png);-webkit-background-size:176px 22px;background-size:176px 22px}}.icheckbox_flat-grey,.iradio_flat-grey{display:inline-block;vertical-align:middle;margin:0;padding:0;width:20px;height:20px;background:url(img/grey.png) no-repeat;border:none;cursor:pointer;top:4px;float:right}.icheckbox_flat-grey{background-position:0 0}.icheckbox_flat-grey.checked{background-position:-22px 0}.icheckbox_flat-grey.disabled{background-position:-44px 0;cursor:default}.icheckbox_flat-grey.checked.disabled{background-position:-66px 0}.iradio_flat-grey{background-position:-88px 0}.iradio_flat-grey.checked{background-position:-110px 0}.iradio_flat-grey.disabled{background-position:-132px 0;cursor:default}.iradio_flat-grey.checked.disabled{background-position:-154px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5){.icheckbox_flat-grey,.iradio_flat-grey{background-image:url(img/grey@2x.png);-webkit-background-size:176px 22px;background-size:176px 22px}}.czr-sub-set .icheckbox_flat-green,.iradio_flat-green{float:left}body .select2-container{z-index:1000000;width:100%!important}.customize-control-czr_layouts .select2-selection--single{height:33px}.customize-control-czr_layouts .select2-container--default .select2-selection--single .select2-selection__arrow{height:30px}.customize-control-czr_layouts .select2-selection--single:focus,.select2-selection__rendered:focus{outline:0}body .select2-drop{z-index:1000000}body .select2-container,span.select2-results{font-size:14px}.select2-container--default .select2-selection--multiple{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;width:99%;min-height:36px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#00a0d2!important;-webkit-box-shadow:0 0 2px rgba(26,188,156,.8)!important;box-shadow:0 0 2px rgba(26,188,156,.8)!important}.select2-results__options li{margin-bottom:0}.select2-container--default .select2-selection--multiple .select2-selection__choice{padding:2px;font-size:13px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;margin-bottom:0}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#00a0d2}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{font-size:17px;position:relative;top:2px;color:#23282d}.customize-control-czr_socials .select2-container--default .select2-selection--single .select2-selection__rendered{padding:5px;line-height:16px}#czr-customize-content_editor-pane{border-top:solid 1px #ddd;position:absolute;height:300px;bottom:-301px;right:0;left:0;z-index:20;background:#f1f1f1;display:block;-webkit-transition:all .2s;transition:all .2s;visibility:hidden}body.czr-customize-content_editor-pane-resize #customize-preview,body.czr-customize-content_editor-pane-resize #czr-customize-content_editor-pane{-webkit-transition:none;transition:none}body.mce-fullscreen.czr-customize-content_editor-pane-open #czr-customize-content_editor-pane{top:0}body.czr-customize-content_editor-pane-open #czr-customize-content_editor-pane{bottom:0;visibility:inherit}#czr-customize-content_editor-pane .wp-editor-tools{padding-top:5px;padding-right:10px}#czr-customize-content_editor-pane .wp-media-buttons{padding-left:5px}#customize-preview{height:auto}body.czr-customize-content_editor-pane-open #customize-preview{bottom:300px}body.mce-fullscreen #customize-preview{bottom:0}body.mce-fullscreen.czr-customize-content_editor-pane-open div.mce-fullscreen{position:relative;left:0}#wp-czr-customize-content_editor-container{border-left:0}#czr-customize-content_editor-dragbar{top:0;cursor:row-resize;display:block;height:4px;position:absolute;width:100%;z-index:21}body.czr-customize-content_editor-pane-resize #customize-preview:before{top:0;right:0;bottom:0;left:0;position:absolute;height:100%;width:100%;z-index:999999}.wp-customizer .ui-autocomplete.wplink-autocomplete{z-index:500110}.wp-customizer #wp-link-wrap{z-index:500105}.wp-customizer #wp_editbtns,.wp-customizer #wp_gallerybtns{z-index:500020}.wp-customizer #TB_overlay,.wp-customizer #TB_window{z-index:500050}.wp-customizer .mce-panel,.wp-customizer .mce-tooltip{z-index:500100!important}.czr-customize-content_editor-pane-open .wp-full-overlay.collapsed .wp-full-overlay-sidebar{z-index:30}.czr-customize-content_editor-pane-open .wp-full-overlay.collapsed .collapse-sidebar{bottom:308px}.czr-customize-content_editor-pane-open .wp-full-overlay.expanded .collapse-sidebar{bottom:0!important}.czr-customize-content_editor-pane-resize .wp-full-overlay.collapsed .collapse-sidebar{-webkit-transition:none;transition:none}.czr-customize-content_editor-pane-open.mce-fullscreen .wp-full-overlay.collapsed .collapse-sidebar{bottom:8px!important}.czr-sub-set[data-input-type=content_picker] .customize-control-title{width:100%}.czr-sub-set[data-input-type=content_picker] .czr-input{width:100%}.content-picker-item{height:2em}.content-picker-item .czr-picker-item-type{float:right;display:inline-block}.content-item-bar{line-height:1.2em;font-size:.9em}.content-item-bar .czr-picker-item-title{display:block;float:left;max-width:80%;text-overflow:ellipsis;overflow:hidden;font-size:13px;line-height:1.3em}.czr-sub-set[data-input-type=content_picker] span.czr-picker-item-title{display:block;float:left;max-width:80%;text-overflow:ellipsis;overflow:hidden;font-size:14px;line-height:2em;color:#000}.czr-sub-set[data-input-type=content_picker] span.czr-picker-item-type{display:inline-block;padding:0;padding-right:10px;float:right;line-height:2em}.rangeslider,.rangeslider__fill{display:block;-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}.rangeslider{background:#e6e6e6;position:relative}.rangeslider--horizontal{height:20px;width:100%}.rangeslider--vertical{width:20px;min-height:150px;max-height:100%}.rangeslider--disabled{opacity:.4}.rangeslider__fill{background:#3b8dbd;position:absolute}.rangeslider--horizontal .rangeslider__fill{top:0;height:100%}.rangeslider--vertical .rangeslider__fill{bottom:0;width:100%}.rangeslider__handle{background:#fff;border:1px solid #ccc;cursor:pointer;display:inline-block;width:40px;height:40px;position:absolute;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(255,255,255,0)),color-stop(100%,rgba(0,0,0,.1)));background-image:-moz-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:-webkit-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));-moz-box-shadow:0 0 8px rgba(0,0,0,.3);-webkit-box-shadow:0 0 8px rgba(0,0,0,.3);box-shadow:0 0 8px rgba(0,0,0,.3);-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;line-height:42px;text-align:center;color:#000;font-size:13px;font-weight:700}.rangeslider__handle:after{content:"";display:block;width:18px;height:18px;margin:auto;position:absolute;top:0;right:0;bottom:0;left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEzIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.13)),color-stop(100%,rgba(255,255,255,0)));background-image:-moz-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:-webkit-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%}.rangeslider--active .rangeslider__handle,.rangeslider__handle:active{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,rgba(0,0,0,.12)));background-image:-moz-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:-webkit-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12))}.rangeslider--horizontal .rangeslider__handle{top:-10px;touch-action:pan-y;-ms-touch-action:pan-y}.rangeslider--vertical .rangeslider__handle{left:-10px;touch-action:pan-x;-ms-touch-action:pan-x}input[type=range]:focus+.rangeslider .rangeslider__handle{-moz-box-shadow:0 0 8px rgba(255,0,255,.9);-webkit-box-shadow:0 0 8px rgba(255,0,255,.9);box-shadow:0 0 8px rgba(255,0,255,.9)}.attachment-media-view button{color:#000;padding:5px 7px;line-height:1.5em}.czr-sektion-buttons{position:absolute;right:0}.czr-column{width:99%;margin-bottom:1%;float:left;padding:2% 0;border:2px dotted #aaa;text-align:center}.czr-column-header{position:relative}.czr-col-drag-handler{position:absolute;left:0;padding:1%;color:#999;cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.czr-module-collection-wrapper{width:100%;min-height:5px;float:left}.czr-single-module{width:98%;float:left;min-height:20px;margin:1px 1%;border:1px solid #ccc}.czr-single-module textarea{max-width:100%}#customize-theme-controls .czr-single-module .czr-single-item{width:96%}.czr-mod-header{background:#eee;float:left;width:100%}.czr-mod-title{position:relative}.czr-mod-title>h4{float:left;width:70%;margin:2% 0}.czr-mod-drag-handler{position:absolute;left:0;padding:1%;margin:2% 0;color:#999;cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.czr-mod-buttons{float:right;width:30%;margin:2% 0}.czr-mod-content{position:absolute;top:0;left:100%;float:left;width:100%;background:#d5e9cc;display:none}.czr-module-open #customize-info,.czr-module-open #customize-theme-controls{left:-200%}.czr-module-open #customize-theme-controls .accordion-section-content{overflow:visible}.czr-module-description-container{margin-bottom:15px}.czr-module-title{border-bottom:1px solid #ddd;background:#fff}.czr-module-title h3{padding:10px 10px 12px 14px;margin:0;line-height:21px;color:#555;font-size:20px;font-weight:200;line-height:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .czr-module-title span.customize-action{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;display:block;font-weight:400}.czr-module-back{display:block;float:left;width:48px;height:74px;padding:0 24px 0 0;margin:0;background:#fff;border:none;border-right:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;-moz-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;-ms-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;-o-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out}.czr-module-back:focus,.czr-module-back:hover{color:#23282d;background:#f5f5f5;outline:0;-webkit-box-shadow:none;box-shadow:none}.czr-module-back:before{font:normal 20px/72px dashicons;content:"\f341";position:relative;left:13px}.czr-module-back:hover{color:#23282d;background:#f5f5f5;outline:0;-webkit-box-shadow:none;box-shadow:none}.gu-mirror{position:fixed!important;margin:0!important;z-index:999999!important;opacity:.8}.gu-hide{display:none!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2}.gu-unselectable .czr-module-collection-wrapper{width:98%;border:1px dotted green;background:#d1ffe0;min-height:31px}li.czr-module-candidate.gu-mirror,li.czr-single-module.gu-mirror{list-style:none}#czr-module-list-panel{position:absolute;top:0;bottom:0;left:-301px;opacity:0;overflow-x:hidden;overflow-y:auto;margin:0;z-index:4;background:rgba(0,0,0,.47);-webkit-transition:all .18s;-moz-transition:all .18s;-ms-transition:all .18s;-o-transition:all .18s;transition:all .18s;border-right:1px solid #ddd}#czr-available-modules-filter,#czr-module-list-panel{width:45%;min-width:300px}body.czr-adding-module #czr-module-list-panel{left:0;visibility:visible;opacity:1}body.czr-adding-module #customize-preview{opacity:.7}.add-new-module:before{content:"\f132";display:inline-block;position:relative;left:-2px;top:-1px;font:normal 20px/1 dashicons;vertical-align:middle;-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.czr-column .add-new-module{margin:1%;float:right}body.czr-adding-module .add-new-module,body.czr-adding-module .add-new-module:hover{background:#eee;border-color:#929793;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}body.czr-adding-module .add-new-module:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#czr-available-modules-list{top:60px;position:absolute;overflow:auto;bottom:0;width:100%}#czr-available-modules-filter{position:fixed;top:0;z-index:1;background:rgba(0,0,0,.47);border-bottom:1px solid #e5e5e5}#czr-available-modules-filter{padding:12px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#czr-available-modules-filter input{padding:6px 10px;width:100%}#czr-available-modules-list .czr-module-candidate{position:relative;border-bottom:1px solid #e5e5e5}#czr-available-modules-list .czr-module-candidate h3{color:#fff;padding:0;margin:0}#czr-available-modules-list .czr-mod-drag-handler{position:relative;left:0;padding:1%;margin:2% 4%;color:inherit;cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}#czr-sektion-settings-panel{position:absolute;top:0;bottom:0;width:45%;min-width:300px;left:-301px;opacity:0;overflow-x:hidden;overflow-y:auto;margin:0;z-index:4;background:rgba(0,0,0,.47);-webkit-transition:all .18s;-moz-transition:all .18s;-ms-transition:all .18s;-o-transition:all .18s;transition:all .18s;border-right:1px solid #ddd;color:#fff}#czr-sektion-settings-panel h3{color:#fff}body.czr-editing-sektion #czr-sektion-settings-panel{left:0;visibility:visible;opacity:1}body.czr-editing-sektion #customize-preview{opacity:.7}#customize-controls .customize-section-title.is-in-view,.czr-skop-on #customize-controls .customize-info.is-in-view{opacity:0}.czr-skop-on .wp-full-overlay-sidebar .wp-full-overlay-header{height:185px}.czr-skop-on .wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{top:185px!important}.wp-customizer .in-sub-panel .wp-full-overlay-sidebar .wp-full-overlay-header{padding:0 15px}.customize-controls-close{border-bottom:1px solid #ddd}.czr-skop-on #customize-controls #customize-notifications-area{z-index:1000}.wp-customizer #customize-header-actions{border-bottom:0}.czr-scope-switcher{width:100%;float:right;position:absolute;left:0;bottom:0;overflow:hidden}.czr-scope-switcher .czr-skp-permanent-title{position:relative;color:#5f5f5f}#customize-header-actions .czr-scope-switcher .spinner{float:none;display:none;margin:0;left:-26px;top:0;position:absolute;visibility:visible}h2.czr-current-skope-title{font-size:13px;line-height:21px;margin:6px 0 4px;text-align:center;height:63px;font-weight:400;overflow:hidden}.czr-main-title{max-height:24px;overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:95%}.czr-skope-title{display:block;font-size:17px;font-style:italic;line-height:25px}.czr-toggle-title-notice{cursor:pointer;font-size:14px;color:#777}.czr-skope-inherits-from{display:inline-block;opacity:0;width:90%;font-size:12px;line-height:18px;color:#0029ff;top:-6px;position:relative}.notice-visible .czr-toggle-title-notice{color:#0029ff}.notice-visible .czr-skope-inherits-from{opacity:1;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.czr-scope-switcher .button{float:left;width:40%;text-align:center;margin:0 2%;opacity:.7;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.czr-scope-switcher .button.active{font-weight:700;opacity:1}.czr-scope-switcher .active,.czr-scope-switcher .czr-scope:hover{opacity:1}.czr-skopes-wrapper{overflow:hidden;position:relative}.czr-scope.active:before{height:101%;float:left;position:absolute;z-index:1;content:'';-webkit-box-shadow:-4px 0 15px 0 rgba(119,119,119,.58);box-shadow:-4px 0 15px 0 rgba(119,119,119,.58);top:0}.czr-scope-switcher .active:after{content:'';height:100%;position:absolute;-webkit-box-shadow:4px 0 15px 0 rgba(119,119,119,.58);box-shadow:4px 0 15px 0 rgba(119,119,119,.58);top:0;z-index:3}.czr-skopes-wrapper .active-collection.local:after{right:0}.czr-scope-switcher .czr-scope:last-child:after{-webkit-box-shadow:none;box-shadow:none;right:0}.czr-scope-switcher .czr-scope:first-child:after{left:0}.czr-scope{float:left;width:30.5%;background:#fff;border-top:1px solid #ccc;overflow:hidden;opacity:.65;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.czr-scope-switcher .width-100,.czr-scope.width-100.active:after,.czr-scope.width-100.active:before{width:100%}.czr-scope-switcher .width-50,.czr-scope.width-50.active:after,.czr-scope.width-50.active:before{width:50%}.czr-scope-switcher .width-33,.czr-scope.width-33.active:after,.czr-scope.width-33.active:before{width:33.33%}.czr-scope-switcher .width-25,.czr-scope.width-25.active:after,.czr-scope.width-25.active:before{width:25%}.czr-scope-footer,.czr-scope-header{width:100%;min-height:16px;position:relative;z-index:5}.inactive .czr-scope-footer:after{content:'';width:100%;position:absolute;height:5px;bottom:-7px;left:0;-webkit-box-shadow:0 0 13px 4px rgba(119,119,119,.85);box-shadow:0 0 13px 4px rgba(119,119,119,.85)}.czr-scope-content{height:35px;padding:0 3%;width:94%;line-height:35px;text-align:center;clear:both;color:#000;overflow:hidden}.czr-scope-content h4{margin:0;display:inline-block;text-align:center;font-size:14px;line-height:18px;font-weight:400;text-shadow:1px 1px 0 #dedede}.czr-scope .fab,.czr-scope .far,.czr-scope .fas{font-size:10px;padding:2%;color:#585858;cursor:pointer;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.czr-scope .czr-scope-footer .info{cursor:inherit}.czr-scope-header .czr-scope-switch{font-size:22px;padding:0 2px 0 0;text-shadow:1px 1px 2px #fff}.czr-skp-switch-link{cursor:pointer}.czr-skp-switch-link:hover{text-decoration:underline}.czr-pull-left{float:left}.czr-pull-right{float:right}.active .czr-scope-switch{color:#59b15c;cursor:inherit}.czr-scope .czr-scope-reset{display:none;font-size:13px;text-shadow:1px 1px 0 #dedede}.has-db-val .czr-scope-reset{color:#00a0d2}.dirty .czr-scope-reset{color:#ffbd2e!important}.is_winner .czr-scope-winner{color:#59b15c;font-size:14px;position:absolute;bottom:2px;left:2px}.czr-scope-force{display:none}.czr-skope-switch{cursor:pointer;text-decoration:underline}.czr-spinner-wrapper{visibility:hidden}.czr-reset-fail,.czr-reset-success{display:none}.czr-spinner{background:url(img/czr-spinner.gif) no-repeat;-webkit-background-size:32px 32px;background-size:32px 32px;display:inline-block;float:right;vertical-align:middle;opacity:.7;width:32px;height:32px;margin:4px 10px 0}.customize-control span.customize-control-title:first-child{padding-left:16px;-webkit-transition:left,right,.15s ease-in-out;-moz-transition:left,right,.15s ease-in-out;-ms-transition:left,right,.15s ease-in-out;-o-transition:left,right,.15s ease-in-out;transition:left,right,.15s ease-in-out;position:relative}.wp-customizer .customize-control.czr-not-skoped .customize-control-title{padding-left:0}.czr-setting-reset{color:#eee;-webkit-transition:color .4s;transition:color .4s;position:absolute;left:0;line-height:21px;display:none;text-shadow:1px 1px 0 #a0a0a0}.czr-global-skope-level .is-wp-authorized-setting.has-db-val .czr-setting-reset{color:#eee}.has-db-val .czr-setting-reset{color:#00a0d2}.is-dirty .czr-setting-reset{color:#ffbd2e!important}.czr-ctrl-reset-warning .czr-spinner{display:none}.czr-resetting-control .czr-ctrl-reset-warning .czr-spinner{display:block}.is-dirty .czr-remove-alert-wrapper{background-color:rgba(255,189,46,.54)!important;border:1px solid #ffbd2e!important;text-shadow:none;color:#000}.has-db-val .czr-remove-alert-wrapper{background-color:rgba(0,160,210,.45);border:1px solid #00a0d2;text-shadow:none;color:#000}.czr-resetting-control .czr-remove-alert-wrapper{-webkit-transition:all,.3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all,.3s ease-in-out}body.czr-skop-loading #czr-skope-pane{top:0}body.czr-skop-loading #customize-preview{filter:blur(3px);-webkit-filter:blur(3px)}@-webkit-keyframes czr-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes czr-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.czr-css-loader{width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);-ms-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%;display:block}.czr-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.czr-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.czr-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.czr-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.czr-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:-4%;left:-4%;width:100%;height:100%;border-radius:100%;border:2px solid #fff;-webkit-animation:czr-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:czr-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}#czr-bottom-infos,#czr-top-note{position:absolute;text-align:center;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;visibility:hidden}.czr-preview-notification a,.czr-preview-notification h2{color:#fff;margin:1em 0}.czr-preview-notification .czr-preview-note-close{position:absolute;top:10px;right:25px;font-size:31px;cursor:pointer}.czr-preview-notification .fa-arrow-left{position:absolute;bottom:10px;left:25px;font-size:40px}.czr-preview-notification .czr-note-content{display:inline-block;line-height:20px;width:80%}.czr-preview-notification .czr-note-message{font-size:16px;line-height:1.5em;margin:.5em 0}#czr-top-note{top:-100%;background:rgba(0,0,0,.8);padding:2%}#czr-top-note h2{font-size:25px}body.czr-top-note-open #czr-top-note{top:0;visibility:inherit}#czr-bottom-infos{bottom:-100%;background-color:rgba(0,0,0,.85);padding:1px}body.czr-bottom-infos-open #czr-bottom-infos{bottom:0;visibility:inherit}#czr-bottom-infos .czr-note-content .czr-note-message{font-size:13px}#czr-bottom-infos .action-links-wrap{width:100%}#czr-bottom-infos .action-link{font-style:italic;display:inline-block;width:40%}#czr-bottom-infos .action-link a:hover{color:#fff}.czr-disable-bottom-infos{text-decoration:underline;cursor:pointer}#czr-skope-pane{position:absolute;min-height:100%;text-align:center;padding:2%;top:-100%;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;visibility:hidden}#czr-skope-pane.dirty-reset{background:rgba(252,173,6,.23)}#czr-skope-pane.db-reset{background:rgba(0,160,210,.3)}.czr-reset-content{display:inline-block;line-height:20px;width:80%;padding:5%;background:rgba(0,0,0,.63)}#czr-skope-pane h2{color:#fff;line-height:1.5em}body.czr-skope-pane-open #czr-skope-pane{top:0;visibility:inherit;min-height:100%}body.czr-skope-pane-open #customize-preview,body.czr-skope-pane-open .wp-full-overlay-sidebar{opacity:.5}body.czr-resetting-skope #czr-skope-pane .czr-spinner-wrapper{visibility:visible}.czr-skope-pane-open .wp-full-overlay.collapsed .wp-full-overlay-sidebar{z-index:30}.czr-skope-pane-open .wp-full-overlay.expanded .collapse-sidebar{bottom:0!important}.customize-control .czr-skope-notice{color:#3a3a3a;font-family:Verdana,'DejaVu Sans','Bitstream Vera Sans',Geneva,sans-serif;font-size:10px;line-height:1.5em;font-style:normal;border-left:3px solid rgba(99,99,99,.36);padding-left:5px}.czr-toggle-notice{color:#95a5a6;text-shadow:1px 1px 0 #fff;-webkit-transition:color .4s;transition:color .4s;position:absolute;padding-left:3px;line-height:21px;display:none}.czr-notice-visible .czr-toggle-notice,.czr-toggle-notice:hover{color:rgba(0,0,0,.67)}.wp-full-overlay-header,.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{-webkit-transition:height,top,.4s ease-in-out;-moz-transition:height,top,.4s ease-in-out;-ms-transition:height,top,.4s ease-in-out;-o-transition:height,top,.4s ease-in-out;transition:height,top,.4s ease-in-out}.czr-server-notice{width:calc(96% - 2px);bottom:75px;text-align:center;background:rgba(0,156,0,.18);color:#000;display:none;position:absolute;font-size:12px;line-height:13px;padding:2%;overflow:hidden}.czr-server-notice.czr-server-error{color:#000;background:rgba(255,0,0,.24)}.czr-dismiss-notification{position:absolute;right:5px;top:5px;cursor:pointer}.wp-customizer .icheckbox_flat-grey,.wp-customizer .iradio_flat-grey{border:1px solid #fff;-webkit-border-radius:5px;border-radius:5px;background-color:#fff}.czr-painted{-webkit-transition:background .3s ease-in-out!important;-moz-transition:background .3s ease-in-out!important;-ms-transition:background .3s ease-in-out!important;-o-transition:background .3s ease-in-out!important;transition:background .3s ease-in-out!important}
addons/assets/czr/js/czr-control-base.js CHANGED
@@ -1,10 +1,4 @@
1
- /*! addEventListener Polyfill ie9- http://stackoverflow.com/a/27790212*/
2
- window.addEventListener=window.addEventListener||function(a,b){window.attachEvent("on"+a,b)},/*! Datenow Polyfill ie9- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now */
3
- Date.now||(Date.now=function(){return(new Date).getTime()}),/*! Object.create monkey patch ie8 http://stackoverflow.com/a/18020326 */
4
- Object.create||(Object.create=function(a,b){function c(){}if("undefined"!=typeof b)throw"The multiple-argument version of Object.create is not provided by this browser and cannot be shimmed.";return c.prototype=a,new c}),/*! https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter */
5
- Array.prototype.filter||(Array.prototype.filter=function(a){"use strict";if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments.length>=2?arguments[1]:void 0,f=0;f<c;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),/*! map was added to the ECMA-262 standard in the 5th edition */
6
- Array.prototype.map||(Array.prototype.map=function(a,b){var c,d,e;if(null===this)throw new TypeError(" this is null or not defined");var f=Object(this),g=f.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=new Array(g),e=0;e<g;){var h,i;e in f&&(h=f[e],i=a.call(c,h,e,f),d[e]=i),e++}return d}),/*! Array.from was added to the ECMA-262 standard in the 6th edition (ES2015) */
7
- Array.from||(Array.from=function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}());/*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
8
  if ( 'function' != typeof(jQuery.fn.iCheck) ) {
9
  !function(a){function b(a,b,e){var f=a[0],g=/er/.test(e)?p:/bl/.test(e)?n:l,h=e==q?{checked:f[l],disabled:f[n],indeterminate:"true"==a.attr(p)||"false"==a.attr(o)}:f[g];if(/^(ch|di|in)/.test(e)&&!h)c(a,g);else if(/^(un|en|de)/.test(e)&&h)d(a,g);else if(e==q)for(g in h)h[g]?c(a,g,!0):d(a,g,!0);else b&&"toggle"!=e||(b||a[u]("ifClicked"),h?f[r]!==k&&d(a,g):c(a,g))}function c(b,c,e){var q=b[0],u=b.parent(),v=c==l,x=c==p,y=c==n,z=x?o:v?m:"enabled",A=f(b,z+g(q[r])),B=f(b,c+g(q[r]));if(!0!==q[c]){if(!e&&c==l&&q[r]==k&&q.name){var C=b.closest("form"),D='input[name="'+q.name+'"]',D=C.length?C.find(D):a(D);D.each(function(){this!==q&&a(this).data(i)&&d(a(this),c)})}x?(q[c]=!0,q[l]&&d(b,l,"force")):(e||(q[c]=!0),v&&q[p]&&d(b,p,!1)),h(b,v,c,e)}q[n]&&f(b,w,!0)&&u.find("."+j).css(w,"default"),u[s](B||f(b,c)||""),y?u.attr("aria-disabled","true"):u.attr("aria-checked",x?"mixed":"true"),u[t](A||f(b,z)||"")}function d(a,b,c){var d=a[0],e=a.parent(),i=b==l,k=b==p,q=b==n,u=k?o:i?m:"enabled",v=f(a,u+g(d[r])),x=f(a,b+g(d[r]));!1!==d[b]&&((k||!c||"force"==c)&&(d[b]=!1),h(a,i,u,c)),!d[n]&&f(a,w,!0)&&e.find("."+j).css(w,"pointer"),e[t](x||f(a,b)||""),q?e.attr("aria-disabled","false"):e.attr("aria-checked","false"),e[s](v||f(a,u)||"")}function e(b,c){b.data(i)&&(b.parent().html(b.attr("style",b.data(i).s||"")),c&&b[u](c),b.off(".i").unwrap(),a(v+'[for="'+b[0].id+'"]').add(b.closest(v)).off(".i"))}function f(a,b,c){return a.data(i)?a.data(i).o[b+(c?"":"Class")]:void 0}function g(a){return a.charAt(0).toUpperCase()+a.slice(1)}function h(a,b,c,d){d||(b&&a[u]("ifToggled"),a[u]("ifChanged")[u]("if"+g(c)))}var i="iCheck",j=i+"-helper",k="radio",l="checked",m="un"+l,n="disabled",o="determinate",p="in"+o,q="update",r="type",s="addClass",t="removeClass",u="trigger",v="label",w="cursor",x=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);a.fn[i]=function(f,g){var h='input[type="checkbox"], input[type="'+k+'"]',m=a(),o=function(b){b.each(function(){var b=a(this);m=b.is(h)?m.add(b):m.add(b.find(h))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(f))return f=f.toLowerCase(),o(this),m.each(function(){var c=a(this);"destroy"==f?e(c,"ifDestroyed"):b(c,!0,f),a.isFunction(g)&&g()});if("object"!=typeof f&&f)return this;var w=a.extend({checkedClass:l,disabledClass:n,indeterminateClass:p,labelHover:!0,aria:!1},f),y=w.handle,z=w.hoverClass||"hover",A=w.focusClass||"focus",B=w.activeClass||"active",C=!!w.labelHover,D=w.labelHoverClass||"hover",E=0|(""+w.increaseArea).replace("%","");return("checkbox"==y||y==k)&&(h='input[type="'+y+'"]'),-50>E&&(E=-50),o(this),m.each(function(){var f=a(this);e(f);var g=this,h=g.id,m=-E+"%",o=100+2*E+"%",o={position:"absolute",top:m,left:m,display:"block",width:o,height:o,margin:0,padding:0,background:"#fff",border:0,opacity:0},m=x?{position:"absolute",visibility:"hidden"}:E?o:{position:"absolute",opacity:0},p="checkbox"==g[r]?w.checkboxClass||"icheckbox":w.radioClass||"i"+k,y=a(v+'[for="'+h+'"]').add(f.closest(v)),F=!!w.aria,G=i+"-"+Math.random().toString(36).substr(2,6),H='<div class="'+p+'" '+(F?'role="'+g[r]+'" ':"");F&&y.each(function(){H+='aria-labelledby="',this.id?H+=this.id:(this.id=G,H+=G),H+='"'}),H=f.wrap(H+"/>")[u]("ifCreated").parent().append(w.insert),o=a('<ins class="'+j+'"/>').css(o).appendTo(H),f.data(i,{o:w,s:f.attr("style")}).css(m),w.inheritClass&&H[s](g.className||""),w.inheritID&&h&&H.attr("id",i+"-"+h),"static"==H.css("position")&&H.css("position","relative"),b(f,!0,q),y.length&&y.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(c){var d=c[r],e=a(this);if(!g[n]){if("click"==d){if(a(c.target).is("a"))return;b(f,!1,!0)}else C&&(/ut|nd/.test(d)?(H[t](z),e[t](D)):(H[s](z),e[s](D)));if(!x)return!1;c.stopPropagation()}}),f.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(a){var b=a[r];return a=a.keyCode,"click"==b?!1:"keydown"==b&&32==a?(g[r]==k&&g[l]||(g[l]?d(f,l):c(f,l)),!1):("keyup"==b&&g[r]==k?!g[l]&&c(f,l):/us|ur/.test(b)&&H["blur"==b?t:s](A),void 0)}),o.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(a){var c=a[r],d=/wn|up/.test(c)?B:z;if(!g[n]){if("click"==c?b(f,!1,!0):(/wn|er|in/.test(c)?H[s](d):H[t](d+" "+B),y.length&&C&&d==z&&y[/ut|nd/.test(c)?t:s](D)),!x)return!1;a.stopPropagation()}})})}}(window.jQuery||window.Zepto);
10
  }
@@ -96,6 +90,7 @@ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push
96
  if ( ( _.isUndefined( console ) && typeof window.console.log != 'function' ) )
97
  return;
98
  console.log.apply( console, _prettyPrintLog( { consoleArguments : arguments } ) );
 
99
  };
100
 
101
  api.errorLog = function() {
@@ -104,6 +99,7 @@ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push
104
  return;
105
 
106
  console.log.apply( console, _prettyPrintLog( { bgCol : '#ffd5a0', textCol : '#000', consoleArguments : arguments } ) );
 
107
  };
108
 
109
  api.czr_isSkopOn = function() {
@@ -426,7 +422,7 @@ api.CZR_Helpers = $.extend( api.CZR_Helpers, {
426
  return [
427
  '<a href="' + _url + '" title="' + serverControlParams.i18n.readDocumentation + '" target="_blank">',
428
  ' ',
429
- '<span class="fa fa-question-circle-o"></span>'
430
  ].join('');
431
  },
432
 
@@ -600,12 +596,13 @@ api.CZR_Helpers = $.extend( api.CZR_Helpers, {
600
  is_mod_opt = _.has( inputParentInst() , 'is_mod_opt' );
601
 
602
  //bail if already done
603
- if ( _.has( inputParentInst, 'czr_Input') && ! _.isEmpty( inputParentInst.inputCollection() ) )
 
604
  return;
605
 
606
  //INPUTS => Setup as soon as the view content is rendered
607
  //the inputParentInst is a collection of inputs, each one has its own view module.
608
- inputParentInst.czr_Input = new api.Values();
609
 
610
  //IS THE PARENT AN ITEM OR A MODULE OPTION ?
611
  //those default constructors (declared in the module init ) can be overridden by extended item or mod opt constructors inside the modules
@@ -893,10 +890,24 @@ api.CZR_Helpers = $.extend( api.CZR_Helpers, {
893
 
894
  //GENERIC METHOD TO SETUP EVENT LISTENER
895
  //NOTE : the args.event must alway be defined
 
 
 
 
 
 
 
 
 
 
 
 
 
 
896
  executeEventActionChain : function( args, instance ) {
897
  var control = this;
898
 
899
- //if the actions param is a anonymous function, fire it and stop there
900
  if ( 'function' === typeof( args.event.actions ) )
901
  return args.event.actions.call( instance, args );
902
 
@@ -913,27 +924,41 @@ api.CZR_Helpers = $.extend( api.CZR_Helpers, {
913
  if ( _break )
914
  return;
915
 
916
- if ( 'function' != typeof( instance[ _cb ] ) ) {
917
- throw new Error( 'executeEventActionChain : the action : ' + _cb + ' has not been found when firing event : ' + args.event.selector );
 
 
 
 
 
 
 
 
 
 
918
  }
919
 
920
- //Allow other actions to be bound before action and after
921
  //
922
- //=> we don't want the event in the object here => we use the one in the event map if set
923
- //=> otherwise will loop infinitely because triggering always the same cb from args.event.actions[_cb]
924
- //=> the dom element shall be get from the passed args and fall back to the controler container.
925
  var $_dom_el = ( _.has(args, 'dom_el') && -1 != args.dom_el.length ) ? args.dom_el : control.container;
926
 
927
- $_dom_el.trigger( 'before_' + _cb, _.omit( args, 'event' ) );
 
 
928
 
929
  //executes the _cb and stores the result in a local var
930
- var _cb_return = instance[ _cb ].call( instance, args );
931
  //shall we stop the action chain here ?
932
  if ( false === _cb_return )
933
  _break = true;
934
 
935
- //allow other actions to be bound after
936
- $_dom_el.trigger( 'after_' + _cb, _.omit( args, 'event' ) );
 
 
937
  });//_.map
938
  }
939
  });//$.extend
@@ -2021,6 +2046,22 @@ $.extend( CZRItemMths , {
2021
  item.embedded = $.Deferred();
2022
  item.container = null;//will store the item $ dom element
2023
  item.contentContainer = null;//will store the item content $ dom element
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2024
  item.inputCollection = new api.Value({});
2025
 
2026
  //VIEW STATES FOR ITEM AND REMOVE DIALOG
@@ -2039,6 +2080,9 @@ $.extend( CZRItemMths , {
2039
  //set initial values
2040
  var _initial_model = $.extend( item.defaultItemModel, options.initial_item_model );
2041
 
 
 
 
2042
  //this won't be listened to at this stage
2043
  item.set( _initial_model );
2044
 
@@ -2099,7 +2143,8 @@ $.extend( CZRItemMths , {
2099
  item.bind( 'contentRendered', function() {
2100
  //create the collection of inputs if needed
2101
  //first time or after a removal
2102
- if ( ! _.has( item, 'czr_Input' ) || _.isEmpty( item.inputCollection() ) ) {
 
2103
  try {
2104
  api.CZR_Helpers.setupInputCollectionFromDOM.call( item );
2105
  //the item.container is now available
@@ -2114,7 +2159,7 @@ $.extend( CZRItemMths , {
2114
 
2115
  //SCHEDULE INPUTS DESTROY
2116
  item.bind( 'contentRemoved', function() {
2117
- if ( _.has(item, 'czr_Input') )
2118
  api.CZR_Helpers.removeInputCollection.call( item );
2119
  });
2120
 
@@ -2151,6 +2196,12 @@ $.extend( CZRItemMths , {
2151
  },
2152
 
2153
 
 
 
 
 
 
 
2154
  //React to a single item change
2155
  //cb of module.czr_Item( item.id ).callbacks
2156
  //the data can typically hold informations passed by the input that has been changed and its specific preview transport (can be PostMessage )
@@ -2214,33 +2265,33 @@ $.extend( CZRItemMths , {
2214
  //fired on click dom event
2215
  //for dynamic multi input modules
2216
  removeItem : function() {
2217
- var item = this,
2218
- module = this.module,
2219
- _new_collection = _.clone( module.itemCollection() );
2220
 
2221
- //hook here
2222
- module.trigger('pre_item_dom_remove', item() );
2223
 
2224
- //destroy the Item DOM el
2225
- item._destroyView();
2226
 
2227
- //new collection
2228
- //say it
2229
- _new_collection = _.without( _new_collection, _.findWhere( _new_collection, {id: item.id }) );
2230
- module.itemCollection.set( _new_collection );
2231
- //hook here
2232
- module.trigger('pre_item_api_remove', item() );
2233
 
2234
- var _item_ = $.extend( true, {}, item() );
2235
- //remove the item from the collection
2236
- module.czr_Item.remove( item.id );
2237
- module.trigger( 'item-removed', _item_ );
2238
  },
2239
 
2240
  //@return the item {...} from the collection
2241
  //takes a item unique id as param
2242
  getModel : function(id) {
2243
- return this();
2244
  }
2245
 
2246
  });//$.extend
@@ -2268,10 +2319,46 @@ $.extend( CZRItemMths , {
2268
  });
2269
  },
2270
 
 
 
 
 
 
 
 
 
 
 
 
 
2271
 
2272
- //fired when item is ready and embedded
2273
- //define the item view DOM event map
2274
- //bind actions when the item is embedded
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2275
  itemWrapperViewSetup : function( item_model ) {
2276
  var item = this,
2277
  module = this.module;
@@ -2402,6 +2489,7 @@ $.extend( CZRItemMths , {
2402
  }
2403
 
2404
  $_alert_el.html( wp.template( module.AlertPart )( { title : ( item().title || item.id ) } ) );
 
2405
  }
2406
 
2407
  //Slide it
@@ -2421,69 +2509,32 @@ $.extend( CZRItemMths , {
2421
  },//itemWrapperViewSetup
2422
 
2423
 
2424
- //the view wrapper has been rendered by WP
2425
- //the content ( the various inputs ) is rendered by the following methods
2426
- //an event is triggered on the control.container when content is rendered
2427
- renderItemWrapper : function( item_model ) {
2428
- //=> an array of objects
2429
- var item = this,
2430
- module = item.module;
2431
-
2432
- item_model = item_model || item();
2433
-
2434
- //render the item wrapper
2435
- $_view_el = $('<li>', { class : module.control.css_attr.single_item, 'data-id' : item_model.id, id : item_model.id } );
2436
-
2437
- //append the item view to the first module view wrapper
2438
- //!!note : => there could be additional sub view wrapper inside !!
2439
- //$( '.' + module.control.css_attr.items_wrapper , module.container).first().append( $_view_el );
2440
- // module.itemsWrapper has been stored as a $ var in module initialize() when the tmpl has been embedded
2441
- module.itemsWrapper.append( $_view_el );
2442
-
2443
- //if module is multi item, then render the item crud header part
2444
- //Note : for the widget module, the getTemplateEl method is overridden
2445
- if ( module.isMultiItem() ) {
2446
- var _template_selector = module.getTemplateEl( 'rudItemPart', item_model );
2447
- //do we have view template script?
2448
- if ( 0 === $( '#tmpl-' + _template_selector ).length ) {
2449
- throw new Error('Missing template for item ' + item.id + '. The provided template script has no been found : #tmpl-' + module.getTemplateEl( 'rudItemPart', item_model ) );
2450
- }
2451
- $_view_el.append( $( wp.template( _template_selector )( item_model ) ) );
2452
- }
2453
-
2454
-
2455
- //then, append the item content wrapper
2456
- $_view_el.append( $( '<div/>', { class: module.control.css_attr.item_content } ) );
2457
-
2458
- return $_view_el;
2459
- },
2460
-
2461
 
2462
  //renders saved items views and attach event handlers
2463
  //the saved item look like :
2464
  //array[ { id : 'sidebar-one', title : 'A Title One' }, {id : 'sidebar-two', title : 'A Title Two' }]
2465
  renderItemContent : function( item_model ) {
2466
- //=> an array of objects
2467
- var item = this,
2468
- module = this.module;
2469
 
2470
- item_model = item_model || item();
2471
 
2472
- //do we have view content template script?
2473
- if ( 0 === $( '#tmpl-' + module.getTemplateEl( 'itemInputList', item_model ) ).length ) {
2474
- throw new Error('No item content template defined for module ' + module.id + '. The template script id should be : #tmpl-' + module.getTemplateEl( 'itemInputList', item_model ) );
2475
- }
2476
 
2477
- var item_content_template = wp.template( module.getTemplateEl( 'itemInputList', item_model ) );
2478
 
2479
- //do we have an html template ?
2480
- if ( ! item_content_template )
2481
- return this;
2482
 
2483
- //the view content
2484
- $( item_content_template( item_model )).appendTo( $('.' + module.control.css_attr.item_content, item.container ) );
2485
 
2486
- return $( $( item_content_template( item_model )), item.container );
2487
  },
2488
 
2489
 
@@ -2509,22 +2560,22 @@ $.extend( CZRItemMths , {
2509
  //Fired on view_rendered:new when a new model has been added
2510
  //Fired on click on edit_view_btn
2511
  setViewVisibility : function( obj, is_added_by_user ) {
2512
- var item = this,
2513
- module = this.module;
2514
- if ( is_added_by_user ) {
2515
- item.viewState.set( 'expanded_noscroll' );
2516
- } else {
2517
- module.closeAllItems( item.id );
2518
- if ( _.has(module, 'preItem') ) {
2519
- module.preItemExpanded.set(false);
2520
- }
2521
- item.viewState.set( 'expanded' == item._getViewState() ? 'closed' : 'expanded' );
2522
- }
2523
  },
2524
 
2525
 
2526
  _getViewState : function() {
2527
- return -1 == this.viewState().indexOf('expanded') ? 'closed' : 'expanded';
2528
  },
2529
 
2530
 
@@ -2548,13 +2599,14 @@ $.extend( CZRItemMths , {
2548
 
2549
  $_edit_icon.toggleClass('active' , visible );
2550
  if ( visible )
2551
- $_edit_icon.removeClass('fa-pencil').addClass('fa-minus-square').attr('title', serverControlParams.i18n.close );
2552
  else
2553
- $_edit_icon.removeClass('fa-minus-square').addClass('fa-pencil').attr('title', serverControlParams.i18n.edit );
2554
 
2555
  //scroll to the currently expanded view
2556
- if ( 'expanded' == status )
2557
- module._adjustScrollExpandedBlock( item.container );
 
2558
 
2559
  dfd.resolve();
2560
  };
@@ -2570,12 +2622,12 @@ $.extend( CZRItemMths , {
2570
 
2571
  //removes the view dom module
2572
  _destroyView : function ( duration ) {
2573
- this.container.fadeOut( {
2574
- duration : duration ||400,
2575
- done : function() {
2576
- $(this).remove();
2577
- }
2578
- });
2579
  }
2580
  });//$.extend
2581
  })( wp.customize , jQuery, _ );//extends api.Value
@@ -2679,7 +2731,7 @@ $.extend( CZRModOptMths , {
2679
  $.when( ctrl.container
2680
  .find('.customize-control-title').first()//was.find('.customize-control-title')
2681
  .append( $( '<span/>', {
2682
- class : [ ctrl.css_attr.edit_modopt_icon, 'fa fa-cog' ].join(' '),
2683
  title : serverControlParams.i18n['Settings']
2684
  } ) ) )
2685
  .done( function(){
@@ -2814,7 +2866,7 @@ $.extend( CZRModOptMths , {
2814
  class : module.control.css_attr.mod_opt_wrapper,
2815
  html : [
2816
  [ '<h2 class="mod-opt-title">', _ctrlLabel , '</h2>' ].join(''),
2817
- '<span class="fa fa-times ' + module.control.css_attr.close_modopt_icon + '" title="close"></span>'
2818
  ].join('')
2819
  } ) );
2820
 
@@ -3345,6 +3397,13 @@ $.extend( CZRModuleMths, {
3345
  var module = this;
3346
  //Prepare the item, make sure its id is set and unique
3347
  item_candidate = module.prepareItemForAPI( item );
 
 
 
 
 
 
 
3348
  //Item id checks !
3349
  if ( ! _.has( item_candidate, 'id' ) ) {
3350
  throw new Error('CZRModule::instantiateItem() : an item has no id and could not be added in the collection of : ' + this.id );
@@ -3384,10 +3443,16 @@ $.extend( CZRModuleMths, {
3384
  var _candidate_val = item_candidate[_key];
3385
  switch( _key ) {
3386
  case 'id' :
 
 
3387
  if ( _.isEmpty( _candidate_val ) ) {
3388
- api_ready_item[_key] = module.generateItemId( module.module_type );
3389
  } else {
3390
- api_ready_item[_key] = _candidate_val;
 
 
 
 
3391
  }
3392
  break;
3393
  case 'initial_item_model' :
@@ -3422,12 +3487,19 @@ $.extend( CZRModuleMths, {
3422
  //Now amend the initial_item_model with the generated id
3423
  api_ready_item.initial_item_model.id = api_ready_item.id;
3424
 
3425
- return api_ready_item;
3426
  },
3427
 
3428
 
3429
- //recursive
3430
- generateItemId : function( module_type, key, i ) {
 
 
 
 
 
 
 
3431
  //prevent a potential infinite loop
3432
  i = i || 1;
3433
  if ( i > 100 ) {
@@ -3435,17 +3507,17 @@ $.extend( CZRModuleMths, {
3435
  }
3436
  var module = this;
3437
  key = key || module._getNextItemKeyInCollection();
3438
- var id_candidate = module_type + '_' + key;
3439
 
3440
  //do we have a module collection value ?
3441
- if ( ! _.has(module, 'itemCollection') || ! _.isArray( module.itemCollection() ) ) {
3442
  throw new Error('The item collection does not exist or is not properly set in module : ' + module.id );
3443
  }
3444
 
3445
  //make sure the module is not already instantiated
3446
  if ( module.isItemRegistered( id_candidate ) ) {
3447
  key++; i++;
3448
- return module.generateItemId( module_type, key, i );
3449
  }
3450
  return id_candidate;
3451
  },
@@ -3533,21 +3605,34 @@ $.extend( CZRModuleMths, {
3533
  //normalizes with data
3534
  args = _.extend( { data : {} }, args );
3535
 
3536
- var item = _.clone( args.item );
 
 
 
 
 
 
 
 
 
 
 
 
 
3537
 
3538
  //the item already exist in the collection
3539
- if ( _.findWhere( _new_collection, { id : item.id } ) ) {
3540
  _.each( _current_collection , function( _item, _ind ) {
3541
- if ( _item.id != item.id )
3542
  return;
3543
 
3544
  //set the new val to the changed property
3545
- _new_collection[_ind] = item;
3546
  });
3547
  }
3548
  //the item has to be added
3549
  else {
3550
- _new_collection.push(item);
3551
  }
3552
 
3553
  //updates the collection value
@@ -3938,42 +4023,57 @@ var CZRDynModuleMths = CZRDynModuleMths || {};
3938
  ( function ( api, $, _ ) {
3939
  $.extend( CZRDynModuleMths, {
3940
  initialize: function( id, options ) {
3941
- var module = this;
3942
- api.CZRModule.prototype.initialize.call( module, id, options );
3943
 
3944
- //extend the module with new template Selectors
3945
- $.extend( module, {
3946
- itemPreAddEl : ''//is specific for each crud module
3947
- } );
3948
 
3949
- module.preItemsWrapper = '';//will store the pre items wrapper
3950
 
3951
- //EXTENDS THE DEFAULT MONO MODEL CONSTRUCTOR WITH NEW METHODS
3952
- //=> like remove item
3953
- //module.itemConstructor = api.CZRItem.extend( module.CZRItemDynamicMths || {} );
 
3954
 
3955
- //default success message when item added
3956
- module.itemAddedMessage = serverControlParams.i18n.successMessage;
 
3957
 
3958
- ////////////////////////////////////////////////////
3959
- /// MODULE DOM EVENT MAP
3960
- ////////////////////////////////////////////////////
3961
- module.userEventMap = new api.Value( [
3962
- //pre add new item : open the dialog box
3963
- {
 
 
 
3964
  trigger : 'click keydown',
3965
  selector : [ '.' + module.control.css_attr.open_pre_add_btn, '.' + module.control.css_attr.cancel_pre_add_btn ].join(','),
3966
  name : 'pre_add_item',
3967
- actions : [ 'closeAllItems', 'closeRemoveDialogs', 'renderPreItemView','setPreItemViewVisibility' ],
3968
- },
3969
- //add new item
3970
- {
 
 
 
 
 
 
 
 
 
 
3971
  trigger : 'click keydown',
3972
  selector : '.' + module.control.css_attr.add_new_btn, //'.czr-add-new',
3973
  name : 'add_item',
3974
  actions : [ 'closeRemoveDialogs', 'closeAllItems', 'addItem' ],
3975
- }
3976
- ]);//module.userEventMap
3977
  },
3978
 
3979
 
@@ -3981,127 +4081,152 @@ $.extend( CZRDynModuleMths, {
3981
  //When the control is embedded on the page, this method is fired in api.CZRBaseModuleControl:ready()
3982
  //=> right after the module is instantiated.
3983
  ready : function() {
3984
- var module = this;
3985
- //Setup the module event listeners
3986
- module.setupDOMListeners( module.userEventMap() , { dom_el : module.container } );
3987
-
3988
- //PRE MODEL VALUE
3989
- module.preItem = new api.Value( module.getDefaultItemModel() );
3990
-
3991
- //PRE MODEL EMBED PROMISE
3992
- module.preItemEmbedded = $.Deferred();//was module.czr_preItem.create('item_content');
3993
- //Add view rendered listeners
3994
- module.preItemEmbedded.done( function( $preWrapper ) {
3995
- module.preItemsWrapper = $preWrapper;
3996
- module.setupPreItemInputCollection();
3997
- });
3998
 
3999
- //PRE MODEL VIEW STATE
4000
- module.preItemExpanded = new api.Value(false);
4001
- //add state listeners
4002
- module.preItemExpanded.callbacks.add( function( to, from ) {
4003
- module._togglePreItemViewExpansion( to );
4004
- });
 
 
 
 
 
 
 
 
 
4005
 
4006
- api.CZRModule.prototype.ready.call( module );//fires the parent
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4007
  },//ready()
4008
 
4009
 
 
4010
  //PRE MODEL INPUTS
4011
  //fired when preItem is embedded.done()
4012
  setupPreItemInputCollection : function() {
4013
- var module = this;
4014
 
4015
- //Pre item input collection
4016
- module.preItem.czr_Input = new api.Values();
4017
 
4018
- //creates the inputs based on the rendered items
4019
- $('.' + module.control.css_attr.pre_add_wrapper, module.container)
4020
- .find( '.' + module.control.css_attr.sub_set_wrapper)
4021
- .each( function( _index ) {
4022
- var _id = $(this).find('[data-type]').attr('data-type') || 'sub_set_' + _index;
4023
- //instantiate the input
4024
- module.preItem.czr_Input.add( _id, new module.inputConstructor( _id, {//api.CZRInput;
4025
- id : _id,
4026
- type : $(this).attr('data-input-type'),
4027
- container : $(this),
4028
- input_parent : module.preItem,
4029
- module : module,
4030
- is_preItemInput : true
4031
- } ) );
4032
 
4033
- //fire ready once the input Value() instance is initialized
4034
- module.preItem.czr_Input(_id).ready();
4035
- });//each
 
 
4036
  },
4037
 
4038
 
 
 
 
 
 
4039
 
4040
  //Fired on user Dom action.
4041
  //the item is manually added.
4042
  //@return a promise() for future sequential actions
4043
  addItem : function(obj) {
4044
- var module = this,
4045
- item = module.preItem(),
4046
- collapsePreItem = function() {
4047
- module.preItemExpanded.set(false);
4048
- module._resetPreItemInputs();
4049
- //module.toggleSuccessMessage('off');
4050
- },
4051
- dfd = $.Deferred();
4052
 
4053
- if ( _.isEmpty(item) || ! _.isObject(item) ) {
4054
- api.errorLog( 'addItem : an item should be an object and not empty. In : ' + module.id +'. Aborted.' );
4055
- return dfd.resolve().promise();
4056
- }
4057
- //display a sucess message if item is successfully instantiated
4058
- collapsePreItem = _.debounce( collapsePreItem, 200 );
4059
-
4060
- //instantiates and fires ready
4061
- module.instantiateItem( item, true ).ready(); //true == Added by user
4062
-
4063
- //this iife job is to close the pre item and to maybe refresh the preview
4064
- //@return a promise(), then once done the item view is expanded to start editing it
4065
- ( function() {
4066
- return $.Deferred( function() {
4067
- var _dfd_ = this;
4068
- module.czr_Item( item.id ).isReady.then( function() {
4069
- //module.toggleSuccessMessage('on');
4070
- collapsePreItem();
4071
-
4072
- module.trigger('item-added', item );
4073
- //module.doActions( 'item_added_by_user' , module.container, { item : item , dom_event : obj.dom_event } );
4074
-
4075
- //refresh the preview frame (only needed if transport is postMessage )
4076
- //must be a dom event not triggered
4077
- //otherwise we are in the init collection case where the item are fetched and added from the setting in initialize
4078
- if ( 'postMessage' == api(module.control.id).transport && _.has( obj, 'dom_event') && ! _.has( obj.dom_event, 'isTrigger' ) && ! api.CZR_Helpers.hasPartRefresh( module.control.id ) ) {
4079
- api.previewer.refresh().done( function() {
4080
- _dfd_.resolve();
4081
- });
4082
- } else {
4083
- _dfd_.resolve();
4084
- }
4085
- });
4086
- }).promise();
4087
- })().done( function() {
4088
- module.czr_Item( item.id ).viewState( 'expanded' );
4089
- }).always( function() {
4090
- dfd.resolve();
4091
- });
4092
- return dfd.promise();
4093
- },
4094
 
4095
- _resetPreItemInputs : function() {
4096
- var module = this;
4097
- module.preItem.set( module.getDefaultItemModel() );
4098
- module.preItem.czr_Input.each( function( input_instance ) {
4099
- var _input_id = input_instance.id;
4100
- //do we have a default value ?
4101
- if ( ! _.has( module.getDefaultItemModel(), _input_id ) )
4102
- return;
4103
- input_instance.set( module.getDefaultItemModel()._input_id );
4104
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4105
  }
4106
  });//$.extend
4107
  })( wp.customize , jQuery, _ );//MULTI CONTROL CLASS
@@ -4118,27 +4243,29 @@ $.extend( CZRDynModuleMths, {
4118
  /// PRE ADD MODEL DIALOG AND VIEW
4119
  //////////////////////////////////////////////////
4120
  renderPreItemView : function( obj ) {
4121
- var module = this;
4122
  //is this view already rendered ?
4123
- if ( 'pending' != module.preItemEmbedded.state() ) //was ! _.isEmpty( module.czr_preItem('item_content')() ) )
4124
- return;
4125
 
4126
  //do we have view template script?
4127
  if ( ! _.has(module, 'itemPreAddEl') || 0 === $( '#tmpl-' + module.itemPreAddEl ).length )
4128
- return this;
4129
 
4130
  //print the html
4131
  var pre_add_template = wp.template( module.itemPreAddEl );
4132
 
4133
  //do we have an html template and a module container?
4134
  if ( ! pre_add_template || ! module.container )
4135
- return this;
4136
 
4137
  var $_pre_add_el = $('.' + module.control.css_attr.pre_add_item_content, module.container );
4138
- $_pre_add_el.prepend( pre_add_template() );
 
 
4139
 
4140
  //say it
4141
- module.preItemEmbedded.resolve( $_pre_add_el );
4142
  },
4143
 
4144
  //@return $ el of the pre Item view
@@ -4148,14 +4275,6 @@ $.extend( CZRDynModuleMths, {
4148
  },
4149
 
4150
 
4151
- //toggles the visibility of the Remove View Block
4152
- //@param : obj = { event : {}, item : {}, view : ${} }
4153
- setPreItemViewVisibility : function(obj) {
4154
- var module = this;
4155
- module.preItemExpanded.set( ! module.preItemExpanded() );
4156
- },
4157
-
4158
-
4159
  //callback of module.preItemExpanded
4160
  //@_is_expanded = boolean.
4161
  _togglePreItemViewExpansion : function( _is_expanded ) {
@@ -4171,9 +4290,9 @@ $.extend( CZRDynModuleMths, {
4171
  $(this).toggleClass('open' , _is_expanded );
4172
  //switch icons
4173
  if ( _is_expanded )
4174
- $_btn.find('.fa').removeClass('fa-plus-square').addClass('fa-minus-square');
4175
  else
4176
- $_btn.find('.fa').removeClass('fa-minus-square').addClass('fa-plus-square');
4177
 
4178
  //set the active class to the btn
4179
  $_btn.toggleClass( 'active', _is_expanded );
@@ -5671,7 +5790,8 @@ $.extend( CZRMultiModuleControlMths, {
5671
  content_picker : 'setupContentPicker',
5672
  text_editor : 'setupTextEditor',
5673
  password : '',
5674
- range_slider : 'setupRangeSlider'
 
5675
  });
5676
 
5677
  //BASE ITEMS => used as constructor when creating the collection of models
@@ -7820,7 +7940,7 @@ $.extend( CZRSkopeBaseMths, {
7820
  $('.czr-scope-switcher').prepend(
7821
  $( '<div/>', {
7822
  class:'czr-server-notice',
7823
- html:'<span class="czr-server-message"></span><span class="fa fa-times-circle czr-dismiss-notification"></span>'
7824
  } )
7825
  );
7826
  },
@@ -10186,7 +10306,7 @@ $.extend( CZRSkopeBaseMths, {
10186
  _overrides = self.getOverridenSkopeTitles();
10187
 
10188
  return $.trim( [
10189
- '<span class="czr-main-title"><span class="czr-toggle-title-notice fa fa-info-circle"></span>',
10190
  'global' == api.czr_skope( skope_id || api.czr_activeSkopeId() )().skope ? current_title : ['Customizing', current_title ].join(' '),
10191
  '</span>',
10192
  '<span class="czr-skope-inherits-from">',
@@ -11078,7 +11198,7 @@ $.extend( CZRSkopeBaseMths, {
11078
  ctrl.container
11079
  .find('.customize-control-title').first()//was.find('.customize-control-title')
11080
  .prepend( $( '<span/>', {
11081
- class : 'czr-setting-reset fa fa-refresh',
11082
  title : ''
11083
  } ) ) )
11084
  .done( function(){
@@ -11334,7 +11454,7 @@ $.extend( CZRSkopeBaseMths, {
11334
  $.when( ctrl.container
11335
  .find('.customize-control-title').first()//was.find('.customize-control-title')
11336
  .append( $( '<span/>', {
11337
- class : 'czr-toggle-notice fa fa-info-circle',
11338
  title : serverControlParams.i18n.skope['Display informations about the scope of this option.']
11339
  } ) ) )
11340
  .done( function(){
@@ -12854,7 +12974,8 @@ $.extend( CZRSkopeMths, {
12854
  'post_lists_sec',
12855
  'galleries_sec',
12856
  'footer_customizer_sec',
12857
- 'custom_scripts_sec'
 
12858
 
12859
  ], function( _secId ) {
12860
  _.delay( function() {
@@ -12933,7 +13054,7 @@ $.extend( CZRSocialModuleMths, {
12933
  'behance',
12934
  'behance-square',
12935
  'bitbucket',
12936
- 'bitbucket-square',
12937
  'black-tie',
12938
  'btc',
12939
  'buysellads',
@@ -12952,12 +13073,12 @@ $.extend( CZRSocialModuleMths, {
12952
  'edge',
12953
  'empire',
12954
  'envelope',
12955
- 'envelope-o',
12956
  'envelope-square',
12957
  'expeditedssl',
12958
  'facebook',
12959
  'facebook-f (alias)',
12960
- 'facebook-official',
12961
  'facebook-square',
12962
  'firefox',
12963
  'flickr',
@@ -12976,13 +13097,15 @@ $.extend( CZRSocialModuleMths, {
12976
  'git-square',
12977
  'google',
12978
  'google-plus',
12979
- 'google-plus-circle',
12980
- 'google-plus-official',
 
12981
  'google-plus-square',
12982
  'google-wallet',
12983
  'gratipay',
12984
  'hacker-news',
12985
  'houzz',
 
12986
  'instagram',
12987
  'internet-explorer',
12988
  'ioxhost',
@@ -12992,13 +13115,16 @@ $.extend( CZRSocialModuleMths, {
12992
  'lastfm-square',
12993
  'leanpub',
12994
  'linkedin',
12995
- 'linkedin-square',
 
12996
  'linux',
12997
  'maxcdn',
12998
- 'meanpath',
 
12999
  'medium',
13000
  'mixcloud',
13001
  'mobile',
 
13002
  'modx',
13003
  'odnoklassniki',
13004
  'odnoklassniki-square',
@@ -13071,9 +13197,34 @@ $.extend( CZRSocialModuleMths, {
13071
  'y-combinator',
13072
  'yelp',
13073
  'youtube',
13074
- 'youtube-play',
13075
  'youtube-square'
13076
  ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13077
  //EXTEND THE DEFAULT CONSTRUCTORS FOR INPUT
13078
  module.inputConstructor = api.CZRInput.extend( module.CZRSocialsInputMths || {} );
13079
  //EXTEND THE DEFAULT CONSTRUCTORS FOR MONOMODEL
@@ -13170,21 +13321,49 @@ $.extend( CZRSocialModuleMths, {
13170
  return 'fa-' . title.toLowerCase().replace('envelope', 'email');
13171
  },
13172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13173
 
 
13174
 
 
 
 
 
 
 
 
 
 
13175
 
 
 
 
13176
 
13177
 
13178
 
13179
  CZRSocialsInputMths : {
13180
  setupSelect : function() {
13181
- var input = this,
13182
- item = input.input_parent,
13183
- module = input.module,
13184
- socialList = module.social_icons,
13185
- _model = item(),
 
 
13186
  //check if we are in the pre Item case => if so, the id is empty
13187
- is_preItem = _.isEmpty( _model.id );
13188
 
13189
  //=> add the select text in the pre Item case
13190
  if ( is_preItem ) {
@@ -13195,7 +13374,7 @@ $.extend( CZRSocialModuleMths, {
13195
  _.each( socialList , function( icon_name, k ) {
13196
  // in the pre Item case the first select element is the notice "Select a social icon"
13197
  // doesn't need the fa-* class
13198
- var _value = ( is_preItem && 0 === k ) ? '' : 'fa-' + icon_name.toLowerCase(),
13199
  _attributes = {
13200
  value : _value,
13201
  html: module.getTitleFromIcon( icon_name )
@@ -13208,8 +13387,10 @@ $.extend( CZRSocialModuleMths, {
13208
 
13209
  function addIcon( state ) {
13210
  if (! state.id) { return state.text; }
13211
- var $state = $(
13212
- '<span class="fa ' + state.element.value.toLowerCase() + '">&nbsp;&nbsp;' + state.text + '</span>'
 
 
13213
  );
13214
  return $state;
13215
  }
@@ -13285,7 +13466,7 @@ $.extend( CZRSocialModuleMths, {
13285
  icon = icon || 'fa-' + module.social_icons[0];
13286
  color = color || serverControlParams.social_el_params.defaultSocialColor;
13287
 
13288
- return '<div><span class="fa ' + icon + '" style="color:' + color + '"></span> ' + title + '</div>';
13289
  },
13290
 
13291
  //overrides the default parent method by a custom one
@@ -13554,7 +13735,7 @@ $.extend( CZRWidgetAreaModuleMths, {
13554
  if (! state.id) { return state.text; }
13555
  if ( _.contains(available_locs, state.element.value) ) { return state.text; }
13556
  var $state = $(
13557
- '<span class="czr-unavailable-location fa fa-ban" title="' + serverControlParams.i18n.unavailableLocation + '">&nbsp;&nbsp;' + state.text + '</span>'
13558
  );
13559
  return $state;
13560
  }
@@ -15331,7 +15512,7 @@ $.extend( CZRLayoutSelectMths , {
15331
 
15332
 
15333
  var fireHeaderButtons = function() {
15334
- var $home_button = $('<span/>', { class:'customize-controls-home fa fa-home', html:'<span class="screen-reader-text">Home</span>' } );
15335
  $.when( $('#customize-header-actions').append( $home_button ) )
15336
  .done( function() {
15337
  $home_button
1
+ window.addEventListener=window.addEventListener||function(r,t){window.attachEvent("on"+r,t)},Date.now||(Date.now=function(){return(new Date).getTime()}),Object.create||(Object.create=function(r,t){if(void 0!==t)throw"The multiple-argument version of Object.create is not provided by this browser and cannot be shimmed.";function e(){}return e.prototype=r,new e}),Array.prototype.filter||(Array.prototype.filter=function(r){"use strict";if(void 0===this||null===this)throw new TypeError;var t=Object(this),e=t.length>>>0;if("function"!=typeof r)throw new TypeError;for(var n=[],o=arguments.length>=2?arguments[1]:void 0,i=0;i<e;i++)if(i in t){var a=t[i];r.call(o,a,i,t)&&n.push(a)}return n}),Array.prototype.map||(Array.prototype.map=function(r,t){var e,n,o;if(null===this)throw new TypeError(" this is null or not defined");var i=Object(this),a=i.length>>>0;if("function"!=typeof r)throw new TypeError(r+" is not a function");for(arguments.length>1&&(e=t),n=new Array(a),o=0;o<a;){var f,u;o in i&&(f=i[o],u=r.call(e,f,o,i),n[o]=u),o++}return n}),Array.from||(Array.from=function(){var r=Object.prototype.toString,t=function(t){return"function"==typeof t||"[object Function]"===r.call(t)},e=Math.pow(2,53)-1,n=function(r){var t,n=(t=Number(r),isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t);return Math.min(Math.max(n,0),e)};return function(r){var e=Object(r);if(null==r)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,i=arguments.length>1?arguments[1]:void 0;if(void 0!==i){if(!t(i))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var a,f=n(e.length),u=t(this)?Object(new this(f)):new Array(f),c=0;c<f;)a=e[c],u[c]=i?void 0===o?i(a,c):i.call(o,a,c):a,c+=1;return u.length=f,u}}());/*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
 
 
 
 
 
 
2
  if ( 'function' != typeof(jQuery.fn.iCheck) ) {
3
  !function(a){function b(a,b,e){var f=a[0],g=/er/.test(e)?p:/bl/.test(e)?n:l,h=e==q?{checked:f[l],disabled:f[n],indeterminate:"true"==a.attr(p)||"false"==a.attr(o)}:f[g];if(/^(ch|di|in)/.test(e)&&!h)c(a,g);else if(/^(un|en|de)/.test(e)&&h)d(a,g);else if(e==q)for(g in h)h[g]?c(a,g,!0):d(a,g,!0);else b&&"toggle"!=e||(b||a[u]("ifClicked"),h?f[r]!==k&&d(a,g):c(a,g))}function c(b,c,e){var q=b[0],u=b.parent(),v=c==l,x=c==p,y=c==n,z=x?o:v?m:"enabled",A=f(b,z+g(q[r])),B=f(b,c+g(q[r]));if(!0!==q[c]){if(!e&&c==l&&q[r]==k&&q.name){var C=b.closest("form"),D='input[name="'+q.name+'"]',D=C.length?C.find(D):a(D);D.each(function(){this!==q&&a(this).data(i)&&d(a(this),c)})}x?(q[c]=!0,q[l]&&d(b,l,"force")):(e||(q[c]=!0),v&&q[p]&&d(b,p,!1)),h(b,v,c,e)}q[n]&&f(b,w,!0)&&u.find("."+j).css(w,"default"),u[s](B||f(b,c)||""),y?u.attr("aria-disabled","true"):u.attr("aria-checked",x?"mixed":"true"),u[t](A||f(b,z)||"")}function d(a,b,c){var d=a[0],e=a.parent(),i=b==l,k=b==p,q=b==n,u=k?o:i?m:"enabled",v=f(a,u+g(d[r])),x=f(a,b+g(d[r]));!1!==d[b]&&((k||!c||"force"==c)&&(d[b]=!1),h(a,i,u,c)),!d[n]&&f(a,w,!0)&&e.find("."+j).css(w,"pointer"),e[t](x||f(a,b)||""),q?e.attr("aria-disabled","false"):e.attr("aria-checked","false"),e[s](v||f(a,u)||"")}function e(b,c){b.data(i)&&(b.parent().html(b.attr("style",b.data(i).s||"")),c&&b[u](c),b.off(".i").unwrap(),a(v+'[for="'+b[0].id+'"]').add(b.closest(v)).off(".i"))}function f(a,b,c){return a.data(i)?a.data(i).o[b+(c?"":"Class")]:void 0}function g(a){return a.charAt(0).toUpperCase()+a.slice(1)}function h(a,b,c,d){d||(b&&a[u]("ifToggled"),a[u]("ifChanged")[u]("if"+g(c)))}var i="iCheck",j=i+"-helper",k="radio",l="checked",m="un"+l,n="disabled",o="determinate",p="in"+o,q="update",r="type",s="addClass",t="removeClass",u="trigger",v="label",w="cursor",x=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);a.fn[i]=function(f,g){var h='input[type="checkbox"], input[type="'+k+'"]',m=a(),o=function(b){b.each(function(){var b=a(this);m=b.is(h)?m.add(b):m.add(b.find(h))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(f))return f=f.toLowerCase(),o(this),m.each(function(){var c=a(this);"destroy"==f?e(c,"ifDestroyed"):b(c,!0,f),a.isFunction(g)&&g()});if("object"!=typeof f&&f)return this;var w=a.extend({checkedClass:l,disabledClass:n,indeterminateClass:p,labelHover:!0,aria:!1},f),y=w.handle,z=w.hoverClass||"hover",A=w.focusClass||"focus",B=w.activeClass||"active",C=!!w.labelHover,D=w.labelHoverClass||"hover",E=0|(""+w.increaseArea).replace("%","");return("checkbox"==y||y==k)&&(h='input[type="'+y+'"]'),-50>E&&(E=-50),o(this),m.each(function(){var f=a(this);e(f);var g=this,h=g.id,m=-E+"%",o=100+2*E+"%",o={position:"absolute",top:m,left:m,display:"block",width:o,height:o,margin:0,padding:0,background:"#fff",border:0,opacity:0},m=x?{position:"absolute",visibility:"hidden"}:E?o:{position:"absolute",opacity:0},p="checkbox"==g[r]?w.checkboxClass||"icheckbox":w.radioClass||"i"+k,y=a(v+'[for="'+h+'"]').add(f.closest(v)),F=!!w.aria,G=i+"-"+Math.random().toString(36).substr(2,6),H='<div class="'+p+'" '+(F?'role="'+g[r]+'" ':"");F&&y.each(function(){H+='aria-labelledby="',this.id?H+=this.id:(this.id=G,H+=G),H+='"'}),H=f.wrap(H+"/>")[u]("ifCreated").parent().append(w.insert),o=a('<ins class="'+j+'"/>').css(o).appendTo(H),f.data(i,{o:w,s:f.attr("style")}).css(m),w.inheritClass&&H[s](g.className||""),w.inheritID&&h&&H.attr("id",i+"-"+h),"static"==H.css("position")&&H.css("position","relative"),b(f,!0,q),y.length&&y.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(c){var d=c[r],e=a(this);if(!g[n]){if("click"==d){if(a(c.target).is("a"))return;b(f,!1,!0)}else C&&(/ut|nd/.test(d)?(H[t](z),e[t](D)):(H[s](z),e[s](D)));if(!x)return!1;c.stopPropagation()}}),f.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(a){var b=a[r];return a=a.keyCode,"click"==b?!1:"keydown"==b&&32==a?(g[r]==k&&g[l]||(g[l]?d(f,l):c(f,l)),!1):("keyup"==b&&g[r]==k?!g[l]&&c(f,l):/us|ur/.test(b)&&H["blur"==b?t:s](A),void 0)}),o.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(a){var c=a[r],d=/wn|up/.test(c)?B:z;if(!g[n]){if("click"==c?b(f,!1,!0):(/wn|er|in/.test(c)?H[s](d):H[t](d+" "+B),y.length&&C&&d==z&&y[/ut|nd/.test(c)?t:s](D)),!x)return!1;a.stopPropagation()}})})}}(window.jQuery||window.Zepto);
4
  }
90
  if ( ( _.isUndefined( console ) && typeof window.console.log != 'function' ) )
91
  return;
92
  console.log.apply( console, _prettyPrintLog( { consoleArguments : arguments } ) );
93
+ console.log( 'Unstyled console message : ', arguments );
94
  };
95
 
96
  api.errorLog = function() {
99
  return;
100
 
101
  console.log.apply( console, _prettyPrintLog( { bgCol : '#ffd5a0', textCol : '#000', consoleArguments : arguments } ) );
102
+ console.log( 'Unstyled error message : ', arguments );
103
  };
104
 
105
  api.czr_isSkopOn = function() {
422
  return [
423
  '<a href="' + _url + '" title="' + serverControlParams.i18n.readDocumentation + '" target="_blank">',
424
  ' ',
425
+ '<span class="far fa-question-circle"></span>'
426
  ].join('');
427
  },
428
 
596
  is_mod_opt = _.has( inputParentInst() , 'is_mod_opt' );
597
 
598
  //bail if already done
599
+ //_.has( inputParentInst, 'czr_Input')
600
+ if ( ! _.isEmpty( inputParentInst.inputCollection() ) )
601
  return;
602
 
603
  //INPUTS => Setup as soon as the view content is rendered
604
  //the inputParentInst is a collection of inputs, each one has its own view module.
605
+ inputParentInst.czr_Input = inputParentInst.czr_Input || new api.Values();
606
 
607
  //IS THE PARENT AN ITEM OR A MODULE OPTION ?
608
  //those default constructors (declared in the module init ) can be overridden by extended item or mod opt constructors inside the modules
890
 
891
  //GENERIC METHOD TO SETUP EVENT LISTENER
892
  //NOTE : the args.event must alway be defined
893
+ //Example of args :
894
+ // {
895
+ // trigger : 'click keydown',
896
+ // selector : [ '.' + module.control.css_attr.open_pre_add_btn, '.' + module.control.css_attr.cancel_pre_add_btn ].join(','),
897
+ // name : 'pre_add_item',
898
+ // actions : [
899
+ // 'closeAllItems',
900
+ // 'closeRemoveDialogs',
901
+ // function(obj) {
902
+ // var module = this;
903
+ // module.preItemExpanded.set( ! module.preItemExpanded() );
904
+ // },
905
+ // ],
906
+ // },
907
  executeEventActionChain : function( args, instance ) {
908
  var control = this;
909
 
910
+ //if the actions param is not an array but is an anonymous function, fire it and stop there
911
  if ( 'function' === typeof( args.event.actions ) )
912
  return args.event.actions.call( instance, args );
913
 
924
  if ( _break )
925
  return;
926
 
927
+ var _cbCandidate = function() {};
928
+
929
+ // is the _cb an anonymous function ?
930
+ // if not, we expect the method to exist in the provided object instance
931
+ if ( 'function' === typeof( _cb ) ) {
932
+ _cbCandidate = _cb;
933
+ } else {
934
+ if ( 'function' != typeof( instance[ _cb ] ) ) {
935
+ throw new Error( 'executeEventActionChain : the action : ' + _cb + ' has not been found when firing event : ' + args.event.selector );
936
+ } else {
937
+ _cbCandidate = instance[ _cb ];
938
+ }
939
  }
940
 
941
+ // Allow other actions to be bound before action and after
942
  //
943
+ // => we don't want the event in the object here => we use the one in the event map if set
944
+ // => otherwise will loop infinitely because triggering always the same cb from args.event.actions[_cb]
945
+ // => the dom element shall be get from the passed args and fall back to the controler container.
946
  var $_dom_el = ( _.has(args, 'dom_el') && -1 != args.dom_el.length ) ? args.dom_el : control.container;
947
 
948
+ if ( 'string' === typeof( _cb ) ) {
949
+ $_dom_el.trigger( 'before_' + _cb, _.omit( args, 'event' ) );
950
+ }
951
 
952
  //executes the _cb and stores the result in a local var
953
+ var _cb_return = _cbCandidate.call( instance, args );
954
  //shall we stop the action chain here ?
955
  if ( false === _cb_return )
956
  _break = true;
957
 
958
+ if ( 'string' === typeof( _cb ) ) {
959
+ //allow other actions to be bound after
960
+ $_dom_el.trigger( 'after_' + _cb, _.omit( args, 'event' ) );
961
+ }
962
  });//_.map
963
  }
964
  });//$.extend
2046
  item.embedded = $.Deferred();
2047
  item.container = null;//will store the item $ dom element
2048
  item.contentContainer = null;//will store the item content $ dom element
2049
+
2050
+ // this collection will be populated based on the DOM rendered input candidates
2051
+ // will allows us to set and get any individual input : item.czr_Input('font-family')()
2052
+ // declaring the collection Values here allows us to schedule actions for not yet registered inputs
2053
+ // like for example :
2054
+ // => when the font-family input is registered, then listen to it
2055
+ // item.czr_Input.when( 'font-family', function( _input_ ) {
2056
+ // _input_.bind( function( to, from ) {
2057
+ // console.log('font-family input changed ', to ,from );
2058
+ // });
2059
+ // });
2060
+ item.czr_Input = new api.Values();
2061
+
2062
+ // the item.inputCollection stores all instantiated input from DOM at the end of api.CZR_Helpers.setupInputCollectionFromDOM.call( item );
2063
+ // the collection of each individual input object is stored in item.czr_Input()
2064
+ // this inputCollection is designed to be listened to, in order to fire action when the collection has been populated.
2065
  item.inputCollection = new api.Value({});
2066
 
2067
  //VIEW STATES FOR ITEM AND REMOVE DIALOG
2080
  //set initial values
2081
  var _initial_model = $.extend( item.defaultItemModel, options.initial_item_model );
2082
 
2083
+ // Check initial model here : to be overriden in each module
2084
+ _initial_model = item.validateItemModelOnInitialize( _initial_model );
2085
+
2086
  //this won't be listened to at this stage
2087
  item.set( _initial_model );
2088
 
2143
  item.bind( 'contentRendered', function() {
2144
  //create the collection of inputs if needed
2145
  //first time or after a removal
2146
+ // previous condition included : ! _.has( item, 'czr_Input' )
2147
+ if ( _.isEmpty( item.inputCollection() ) ) {
2148
  try {
2149
  api.CZR_Helpers.setupInputCollectionFromDOM.call( item );
2150
  //the item.container is now available
2159
 
2160
  //SCHEDULE INPUTS DESTROY
2161
  item.bind( 'contentRemoved', function() {
2162
+ if ( _.has( item, 'czr_Input' ) )
2163
  api.CZR_Helpers.removeInputCollection.call( item );
2164
  });
2165
 
2196
  },
2197
 
2198
 
2199
+ // @return validated model object
2200
+ // To be overriden in each module
2201
+ validateItemModelOnInitialize : function( item_model_candidate ) {
2202
+ return item_model_candidate;
2203
+ },
2204
+
2205
  //React to a single item change
2206
  //cb of module.czr_Item( item.id ).callbacks
2207
  //the data can typically hold informations passed by the input that has been changed and its specific preview transport (can be PostMessage )
2265
  //fired on click dom event
2266
  //for dynamic multi input modules
2267
  removeItem : function() {
2268
+ var item = this,
2269
+ module = this.module,
2270
+ _new_collection = _.clone( module.itemCollection() );
2271
 
2272
+ //hook here
2273
+ module.trigger('pre_item_dom_remove', item() );
2274
 
2275
+ //destroy the Item DOM el
2276
+ item._destroyView();
2277
 
2278
+ //new collection
2279
+ //say it
2280
+ _new_collection = _.without( _new_collection, _.findWhere( _new_collection, {id: item.id }) );
2281
+ module.itemCollection.set( _new_collection );
2282
+ //hook here
2283
+ module.trigger('pre_item_api_remove', item() );
2284
 
2285
+ var _item_ = $.extend( true, {}, item() );
2286
+ //remove the item from the collection
2287
+ module.czr_Item.remove( item.id );
2288
+ module.trigger( 'item-removed', _item_ );
2289
  },
2290
 
2291
  //@return the item {...} from the collection
2292
  //takes a item unique id as param
2293
  getModel : function(id) {
2294
+ return this();
2295
  }
2296
 
2297
  });//$.extend
2319
  });
2320
  },
2321
 
2322
+ //the view wrapper has been rendered by WP
2323
+ //the content ( the various inputs ) is rendered by the following methods
2324
+ //an event is triggered on the control.container when content is rendered
2325
+ renderItemWrapper : function( item_model ) {
2326
+ //=> an array of objects
2327
+ var item = this,
2328
+ module = item.module;
2329
+
2330
+ item_model = item_model || item();
2331
+
2332
+ //render the item wrapper
2333
+ $_view_el = $('<li>', { class : module.control.css_attr.single_item, 'data-id' : item_model.id, id : item_model.id } );
2334
 
2335
+ //append the item view to the first module view wrapper
2336
+ //!!note : => there could be additional sub view wrapper inside !!
2337
+ //$( '.' + module.control.css_attr.items_wrapper , module.container).first().append( $_view_el );
2338
+ // module.itemsWrapper has been stored as a $ var in module initialize() when the tmpl has been embedded
2339
+ module.itemsWrapper.append( $_view_el );
2340
+
2341
+ //if module is multi item, then render the item crud header part
2342
+ //Note : for the widget module, the getTemplateEl method is overridden
2343
+ if ( module.isMultiItem() ) {
2344
+ var _template_selector = module.getTemplateEl( 'rudItemPart', item_model );
2345
+ //do we have view template script?
2346
+ if ( 0 === $( '#tmpl-' + _template_selector ).length ) {
2347
+ throw new Error('Missing template for item ' + item.id + '. The provided template script has no been found : #tmpl-' + module.getTemplateEl( 'rudItemPart', item_model ) );
2348
+ }
2349
+ $_view_el.append( $( wp.template( _template_selector )( item_model ) ) );
2350
+ }
2351
+
2352
+
2353
+ //then, append the item content wrapper
2354
+ $_view_el.append( $( '<div/>', { class: module.control.css_attr.item_content } ) );
2355
+
2356
+ return $_view_el;
2357
+ },
2358
+
2359
+ // fired when item is ready and embedded
2360
+ // define the item view DOM event map
2361
+ // bind actions when the item is embedded
2362
  itemWrapperViewSetup : function( item_model ) {
2363
  var item = this,
2364
  module = this.module;
2489
  }
2490
 
2491
  $_alert_el.html( wp.template( module.AlertPart )( { title : ( item().title || item.id ) } ) );
2492
+ item.trigger( 'remove-dialog-rendered');
2493
  }
2494
 
2495
  //Slide it
2509
  },//itemWrapperViewSetup
2510
 
2511
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2512
 
2513
  //renders saved items views and attach event handlers
2514
  //the saved item look like :
2515
  //array[ { id : 'sidebar-one', title : 'A Title One' }, {id : 'sidebar-two', title : 'A Title Two' }]
2516
  renderItemContent : function( item_model ) {
2517
+ //=> an array of objects
2518
+ var item = this,
2519
+ module = this.module;
2520
 
2521
+ item_model = item_model || item();
2522
 
2523
+ //do we have view content template script?
2524
+ if ( 0 === $( '#tmpl-' + module.getTemplateEl( 'itemInputList', item_model ) ).length ) {
2525
+ throw new Error('No item content template defined for module ' + module.id + '. The template script id should be : #tmpl-' + module.getTemplateEl( 'itemInputList', item_model ) );
2526
+ }
2527
 
2528
+ var item_content_template = wp.template( module.getTemplateEl( 'itemInputList', item_model ) );
2529
 
2530
+ //do we have an html template ?
2531
+ if ( ! item_content_template )
2532
+ return this;
2533
 
2534
+ //the view content
2535
+ $( item_content_template( item_model )).appendTo( $('.' + module.control.css_attr.item_content, item.container ) );
2536
 
2537
+ return $( $( item_content_template( item_model )), item.container );
2538
  },
2539
 
2540
 
2560
  //Fired on view_rendered:new when a new model has been added
2561
  //Fired on click on edit_view_btn
2562
  setViewVisibility : function( obj, is_added_by_user ) {
2563
+ var item = this,
2564
+ module = this.module;
2565
+ if ( is_added_by_user ) {
2566
+ item.viewState.set( 'expanded_noscroll' );
2567
+ } else {
2568
+ module.closeAllItems( item.id );
2569
+ if ( _.has(module, 'preItem') ) {
2570
+ module.preItemExpanded.set(false);
2571
+ }
2572
+ item.viewState.set( 'expanded' == item._getViewState() ? 'closed' : 'expanded' );
2573
+ }
2574
  },
2575
 
2576
 
2577
  _getViewState : function() {
2578
+ return -1 == this.viewState().indexOf('expanded') ? 'closed' : 'expanded';
2579
  },
2580
 
2581
 
2599
 
2600
  $_edit_icon.toggleClass('active' , visible );
2601
  if ( visible )
2602
+ $_edit_icon.removeClass('fa-pencil-alt').addClass('fa-minus-square').attr('title', serverControlParams.i18n.close );
2603
  else
2604
+ $_edit_icon.removeClass('fa-minus-square').addClass('fa-pencil-alt').attr('title', serverControlParams.i18n.edit );
2605
 
2606
  //scroll to the currently expanded view
2607
+ if ( 'expanded' == status ) {
2608
+ module._adjustScrollExpandedBlock( item.container );
2609
+ }
2610
 
2611
  dfd.resolve();
2612
  };
2622
 
2623
  //removes the view dom module
2624
  _destroyView : function ( duration ) {
2625
+ this.container.fadeOut( {
2626
+ duration : duration ||400,
2627
+ done : function() {
2628
+ $(this).remove();
2629
+ }
2630
+ });
2631
  }
2632
  });//$.extend
2633
  })( wp.customize , jQuery, _ );//extends api.Value
2731
  $.when( ctrl.container
2732
  .find('.customize-control-title').first()//was.find('.customize-control-title')
2733
  .append( $( '<span/>', {
2734
+ class : [ ctrl.css_attr.edit_modopt_icon, 'fas fa-cog' ].join(' '),
2735
  title : serverControlParams.i18n['Settings']
2736
  } ) ) )
2737
  .done( function(){
2866
  class : module.control.css_attr.mod_opt_wrapper,
2867
  html : [
2868
  [ '<h2 class="mod-opt-title">', _ctrlLabel , '</h2>' ].join(''),
2869
+ '<span class="fas fa-times ' + module.control.css_attr.close_modopt_icon + '" title="close"></span>'
2870
  ].join('')
2871
  } ) );
2872
 
3397
  var module = this;
3398
  //Prepare the item, make sure its id is set and unique
3399
  item_candidate = module.prepareItemForAPI( item );
3400
+
3401
+ // Display a simple console message if item is null or false, for example if validateItemBeforeInstantiation returned null or false
3402
+ if ( ! item_candidate || _.isNull( item_candidate ) ) {
3403
+ api.consoleLog( 'item_candidate invalid. InstantiateItem aborted in module ' + module.id );
3404
+ return;
3405
+ }
3406
+
3407
  //Item id checks !
3408
  if ( ! _.has( item_candidate, 'id' ) ) {
3409
  throw new Error('CZRModule::instantiateItem() : an item has no id and could not be added in the collection of : ' + this.id );
3443
  var _candidate_val = item_candidate[_key];
3444
  switch( _key ) {
3445
  case 'id' :
3446
+ // The id can be specified in a module ( ex: the pre defined item ids of the Font Customizer module )
3447
+ // => that's why we need to check here if the item id is not already registered here
3448
  if ( _.isEmpty( _candidate_val ) ) {
3449
+ api_ready_item[_key] = module.generateItemId( module.module_type );
3450
  } else {
3451
+ if ( module.isItemRegistered( _candidate_val ) ) {
3452
+ module.generateItemId( _candidate_val );
3453
+ } else {
3454
+ api_ready_item[_key] = _candidate_val;
3455
+ }
3456
  }
3457
  break;
3458
  case 'initial_item_model' :
3487
  //Now amend the initial_item_model with the generated id
3488
  api_ready_item.initial_item_model.id = api_ready_item.id;
3489
 
3490
+ return module.validateItemBeforeInstantiation( api_ready_item );
3491
  },
3492
 
3493
 
3494
+ // Designed to be overriden in modules
3495
+ validateItemBeforeInstantiation : function( api_ready_item ) {
3496
+ return api_ready_item;
3497
+ },
3498
+
3499
+
3500
+ // recursive
3501
+ // will generate a unique id with the provided prefix
3502
+ generateItemId : function( prefix, key, i ) {
3503
  //prevent a potential infinite loop
3504
  i = i || 1;
3505
  if ( i > 100 ) {
3507
  }
3508
  var module = this;
3509
  key = key || module._getNextItemKeyInCollection();
3510
+ var id_candidate = prefix + '_' + key;
3511
 
3512
  //do we have a module collection value ?
3513
+ if ( ! _.has( module, 'itemCollection' ) || ! _.isArray( module.itemCollection() ) ) {
3514
  throw new Error('The item collection does not exist or is not properly set in module : ' + module.id );
3515
  }
3516
 
3517
  //make sure the module is not already instantiated
3518
  if ( module.isItemRegistered( id_candidate ) ) {
3519
  key++; i++;
3520
+ return module.generateItemId( prefix, key, i );
3521
  }
3522
  return id_candidate;
3523
  },
3605
  //normalizes with data
3606
  args = _.extend( { data : {} }, args );
3607
 
3608
+ var item_candidate = _.clone( args.item ),
3609
+ hasMissingProperty = false;
3610
+
3611
+ // Is the item well formed ? Does it have all the properties of the default model ?
3612
+ // Each module has to declare a defaultItemModel which augments the default one : { id : '', title : '' };
3613
+ // Let's loop on the defaultItemModel property and check that none is missing in the candidate
3614
+ _.each( module.defaultItemModel, function( itemData, key ) {
3615
+ if ( ! _.has( item_candidate, key ) ) {
3616
+ throw new Error( 'CZRModuleMths => updateItemsCollection : Missing property "' + key + '" for item candidate' );
3617
+ }
3618
+ });
3619
+
3620
+ if ( hasMissingProperty )
3621
+ return;
3622
 
3623
  //the item already exist in the collection
3624
+ if ( _.findWhere( _new_collection, { id : item_candidate.id } ) ) {
3625
  _.each( _current_collection , function( _item, _ind ) {
3626
+ if ( _item.id != item_candidate.id )
3627
  return;
3628
 
3629
  //set the new val to the changed property
3630
+ _new_collection[_ind] = item_candidate;
3631
  });
3632
  }
3633
  //the item has to be added
3634
  else {
3635
+ _new_collection.push( item_candidate );
3636
  }
3637
 
3638
  //updates the collection value
4023
  ( function ( api, $, _ ) {
4024
  $.extend( CZRDynModuleMths, {
4025
  initialize: function( id, options ) {
4026
+ var module = this;
4027
+ api.CZRModule.prototype.initialize.call( module, id, options );
4028
 
4029
+ //extend the module with new template Selectors
4030
+ $.extend( module, {
4031
+ itemPreAddEl : ''//is specific for each crud module
4032
+ } );
4033
 
4034
+ module.preItemsWrapper = '';//will store the pre items wrapper
4035
 
4036
+ //PRE MODEL VIEW STATE
4037
+ // => will control the rendering / destruction of the DOM view
4038
+ // => the instantiation / destruction of the input Value collection
4039
+ module.preItemExpanded = new api.Value( false );
4040
 
4041
+ //EXTENDS THE DEFAULT MONO MODEL CONSTRUCTOR WITH NEW METHODS
4042
+ //=> like remove item
4043
+ //module.itemConstructor = api.CZRItem.extend( module.CZRItemDynamicMths || {} );
4044
 
4045
+ //default success message when item added
4046
+ module.itemAddedMessage = serverControlParams.i18n.successMessage;
4047
+
4048
+ ////////////////////////////////////////////////////
4049
+ /// MODULE DOM EVENT MAP
4050
+ ////////////////////////////////////////////////////
4051
+ module.userEventMap = new api.Value( [
4052
+ //pre add new item : open the dialog box
4053
+ {
4054
  trigger : 'click keydown',
4055
  selector : [ '.' + module.control.css_attr.open_pre_add_btn, '.' + module.control.css_attr.cancel_pre_add_btn ].join(','),
4056
  name : 'pre_add_item',
4057
+ actions : [
4058
+ 'closeAllItems',
4059
+ 'closeRemoveDialogs',
4060
+ // toggles the visibility of the Remove View Block
4061
+ // => will render or destroy the pre item view
4062
+ // @param : obj = { event : {}, item : {}, view : ${} }
4063
+ function(obj) {
4064
+ var module = this;
4065
+ module.preItemExpanded.set( ! module.preItemExpanded() );
4066
+ },
4067
+ ],
4068
+ },
4069
+ //add new item
4070
+ {
4071
  trigger : 'click keydown',
4072
  selector : '.' + module.control.css_attr.add_new_btn, //'.czr-add-new',
4073
  name : 'add_item',
4074
  actions : [ 'closeRemoveDialogs', 'closeAllItems', 'addItem' ],
4075
+ }
4076
+ ]);//module.userEventMap
4077
  },
4078
 
4079
 
4081
  //When the control is embedded on the page, this method is fired in api.CZRBaseModuleControl:ready()
4082
  //=> right after the module is instantiated.
4083
  ready : function() {
4084
+ var module = this;
4085
+ //Setup the module event listeners
4086
+ module.setupDOMListeners( module.userEventMap() , { dom_el : module.container } );
 
 
 
 
 
 
 
 
 
 
 
4087
 
4088
+ // Pre Item Value => used to store the preItem model
4089
+ module.preItem = new api.Value( module.getDefaultItemModel() );
4090
+
4091
+ // Action on pre Item expansion / collapsing
4092
+ module.preItemExpanded.callbacks.add( function( isExpanded ) {
4093
+ if ( isExpanded ) {
4094
+ module.renderPreItemView()
4095
+ .done( function( $preWrapper ) {
4096
+ module.preItemsWrapper = $preWrapper;
4097
+ //Re-initialize the pre item model
4098
+ module.preItem( module.getDefaultItemModel() );
4099
+
4100
+ module.trigger( 'before-pre-item-input-collection-setup' );
4101
+ // Setup the pre item input collection from dom
4102
+ module.setupPreItemInputCollection();
4103
 
4104
+ })
4105
+ .fail( function( message ) {
4106
+ api.errorLog( 'Pre-Item : ' + message );
4107
+ });
4108
+ } else {
4109
+ $.when( module.preItemsWrapper.remove() ).done( function() {
4110
+ module.preItem.czr_Input = {};
4111
+ module.preItemsWrapper = null;
4112
+ module.trigger( 'pre-item-input-collection-destroyed' );
4113
+ });
4114
+ }
4115
+
4116
+ // Expand / Collapse
4117
+ module._togglePreItemViewExpansion( isExpanded );
4118
+ });
4119
+
4120
+ api.CZRModule.prototype.ready.call( module );//fires the parent
4121
  },//ready()
4122
 
4123
 
4124
+
4125
  //PRE MODEL INPUTS
4126
  //fired when preItem is embedded.done()
4127
  setupPreItemInputCollection : function() {
4128
+ var module = this;
4129
 
4130
+ //Pre item input collection
4131
+ module.preItem.czr_Input = new api.Values();
4132
 
4133
+ //creates the inputs based on the rendered items
4134
+ $('.' + module.control.css_attr.pre_add_wrapper, module.container)
4135
+ .find( '.' + module.control.css_attr.sub_set_wrapper)
4136
+ .each( function( _index ) {
4137
+ var _id = $(this).find('[data-type]').attr('data-type') || 'sub_set_' + _index;
4138
+ //instantiate the input
4139
+ module.preItem.czr_Input.add( _id, new module.inputConstructor( _id, {//api.CZRInput;
4140
+ id : _id,
4141
+ type : $(this).attr('data-input-type'),
4142
+ container : $(this),
4143
+ input_parent : module.preItem,
4144
+ module : module,
4145
+ is_preItemInput : true
4146
+ } ) );
4147
 
4148
+ //fire ready once the input Value() instance is initialized
4149
+ module.preItem.czr_Input( _id ).ready();
4150
+ });//each
4151
+
4152
+ module.trigger( 'pre-item-input-collection-ready' );
4153
  },
4154
 
4155
 
4156
+ // Designed to be overriden in modules
4157
+ validateItemBeforeAddition : function( item_candidate ) {
4158
+ return item_candidate;
4159
+ },
4160
+
4161
 
4162
  //Fired on user Dom action.
4163
  //the item is manually added.
4164
  //@return a promise() for future sequential actions
4165
  addItem : function(obj) {
4166
+ var module = this,
4167
+ item_candidate = module.preItem(),
4168
+ collapsePreItem = function() {
4169
+ module.preItemExpanded.set( false );
4170
+ //module.toggleSuccessMessage('off');
4171
+ },
4172
+ dfd = $.Deferred();
 
4173
 
4174
+ if ( _.isEmpty(item_candidate) || ! _.isObject(item_candidate) ) {
4175
+ api.errorLog( 'addItem : an item_candidate should be an object and not empty. In : ' + module.id +'. Aborted.' );
4176
+ return dfd.resolve().promise();
4177
+ }
4178
+ //display a sucess message if item_candidate is successfully instantiated
4179
+ collapsePreItem = _.debounce( collapsePreItem, 200 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4180
 
4181
+ //allow modules to validate the item_candidate before addition
4182
+ item_candidate = module.validateItemBeforeAddition( item_candidate );
4183
+
4184
+ // Abort here and display a simple console message if item is null or false, for example if validateItemBeforeAddition returned null or false
4185
+ if ( ! item_candidate || _.isNull( item_candidate ) ) {
4186
+ api.consoleLog( 'item_candidate invalid. InstantiateItem aborted in module ' + module.id );
4187
+ return;
4188
+ }
4189
+
4190
+
4191
+ //instantiates and fires ready
4192
+ module.instantiateItem( item_candidate, true ).ready(); //true == Added by user
4193
+
4194
+ //this iife job is to close the pre item and to maybe refresh the preview
4195
+ //@return a promise(), then once done the item view is expanded to start editing it
4196
+ $.Deferred( function() {
4197
+ var _dfd_ = this;
4198
+ module.czr_Item( item_candidate.id ).isReady.then( function() {
4199
+ //module.toggleSuccessMessage('on');
4200
+ collapsePreItem();
4201
+
4202
+ module.trigger('item-added', item_candidate );
4203
+
4204
+ var resolveWhenPreviewerReady = function() {
4205
+ api.previewer.unbind( 'ready', resolveWhenPreviewerReady );
4206
+ _dfd_.resolve();
4207
+ };
4208
+ //module.doActions( 'item_added_by_user' , module.container, { item : item_candidate , dom_event : obj.dom_event } );
4209
+
4210
+ //refresh the preview frame (only needed if transport is postMessage && has no partial refresh set )
4211
+ //must be a dom event not triggered
4212
+ //otherwise we are in the init collection case where the items are fetched and added from the setting in initialize
4213
+ if ( 'postMessage' == api(module.control.id).transport && _.has( obj, 'dom_event') && ! _.has( obj.dom_event, 'isTrigger' ) && ! api.CZR_Helpers.hasPartRefresh( module.control.id ) ) {
4214
+ // api.previewer.refresh().done( function() {
4215
+ // _dfd_.resolve();
4216
+ // });
4217
+ // It would be better to wait for the refresh promise
4218
+ api.previewer.bind( 'ready', resolveWhenPreviewerReady );
4219
+ api.previewer.refresh();
4220
+ } else {
4221
+ _dfd_.resolve();
4222
+ }
4223
+ });
4224
+ }).done( function() {
4225
+ module.czr_Item( item_candidate.id ).viewState( 'expanded' );
4226
+ }).always( function() {
4227
+ dfd.resolve();
4228
+ });
4229
+ return dfd.promise();
4230
  }
4231
  });//$.extend
4232
  })( wp.customize , jQuery, _ );//MULTI CONTROL CLASS
4243
  /// PRE ADD MODEL DIALOG AND VIEW
4244
  //////////////////////////////////////////////////
4245
  renderPreItemView : function( obj ) {
4246
+ var module = this, dfd = $.Deferred();
4247
  //is this view already rendered ?
4248
+ if ( _.isObject( module.preItemsWrapper ) && 0 < module.preItemsWrapper.length ) //was ! _.isEmpty( module.czr_preItem('item_content')() ) )
4249
+ return dfd.resolve( module.preItemsWrapper ).promise();
4250
 
4251
  //do we have view template script?
4252
  if ( ! _.has(module, 'itemPreAddEl') || 0 === $( '#tmpl-' + module.itemPreAddEl ).length )
4253
+ return dfd.reject( 'Missing itemPreAddEl or template ').promise();
4254
 
4255
  //print the html
4256
  var pre_add_template = wp.template( module.itemPreAddEl );
4257
 
4258
  //do we have an html template and a module container?
4259
  if ( ! pre_add_template || ! module.container )
4260
+ return dfd.reject( 'Missing html template ').promise();
4261
 
4262
  var $_pre_add_el = $('.' + module.control.css_attr.pre_add_item_content, module.container );
4263
+
4264
+ $_pre_add_el.prepend( $('<div>', { class : 'pre-item-wrapper'} ) );
4265
+ $_pre_add_el.find('.pre-item-wrapper').append( pre_add_template() );
4266
 
4267
  //say it
4268
+ return dfd.resolve( $_pre_add_el.find('.pre-item-wrapper') ).promise();
4269
  },
4270
 
4271
  //@return $ el of the pre Item view
4275
  },
4276
 
4277
 
 
 
 
 
 
 
 
 
4278
  //callback of module.preItemExpanded
4279
  //@_is_expanded = boolean.
4280
  _togglePreItemViewExpansion : function( _is_expanded ) {
4290
  $(this).toggleClass('open' , _is_expanded );
4291
  //switch icons
4292
  if ( _is_expanded )
4293
+ $_btn.find('.fas').removeClass('fa-plus-square').addClass('fa-minus-square');
4294
  else
4295
+ $_btn.find('.fas').removeClass('fa-minus-square').addClass('fa-plus-square');
4296
 
4297
  //set the active class to the btn
4298
  $_btn.toggleClass( 'active', _is_expanded );
5790
  content_picker : 'setupContentPicker',
5791
  text_editor : 'setupTextEditor',
5792
  password : '',
5793
+ range_slider : 'setupRangeSlider',
5794
+ hidden : ''
5795
  });
5796
 
5797
  //BASE ITEMS => used as constructor when creating the collection of models
7940
  $('.czr-scope-switcher').prepend(
7941
  $( '<div/>', {
7942
  class:'czr-server-notice',
7943
+ html:'<span class="czr-server-message"></span><span class="fas fa-times-circle czr-dismiss-notification"></span>'
7944
  } )
7945
  );
7946
  },
10306
  _overrides = self.getOverridenSkopeTitles();
10307
 
10308
  return $.trim( [
10309
+ '<span class="czr-main-title"><span class="czr-toggle-title-notice fas fa-info-circle"></span>',
10310
  'global' == api.czr_skope( skope_id || api.czr_activeSkopeId() )().skope ? current_title : ['Customizing', current_title ].join(' '),
10311
  '</span>',
10312
  '<span class="czr-skope-inherits-from">',
11198
  ctrl.container
11199
  .find('.customize-control-title').first()//was.find('.customize-control-title')
11200
  .prepend( $( '<span/>', {
11201
+ class : 'czr-setting-reset fas fa-sync',
11202
  title : ''
11203
  } ) ) )
11204
  .done( function(){
11454
  $.when( ctrl.container
11455
  .find('.customize-control-title').first()//was.find('.customize-control-title')
11456
  .append( $( '<span/>', {
11457
+ class : 'czr-toggle-notice fas fa-info-circle',
11458
  title : serverControlParams.i18n.skope['Display informations about the scope of this option.']
11459
  } ) ) )
11460
  .done( function(){
12974
  'post_lists_sec',
12975
  'galleries_sec',
12976
  'footer_customizer_sec',
12977
+ 'custom_scripts_sec',
12978
+ 'contact_info_sec'
12979
 
12980
  ], function( _secId ) {
12981
  _.delay( function() {
13054
  'behance',
13055
  'behance-square',
13056
  'bitbucket',
13057
+ //'bitbucket-square', //<- removed in fa5
13058
  'black-tie',
13059
  'btc',
13060
  'buysellads',
13073
  'edge',
13074
  'empire',
13075
  'envelope',
13076
+ 'envelope-o', //<- go with far envelope
13077
  'envelope-square',
13078
  'expeditedssl',
13079
  'facebook',
13080
  'facebook-f (alias)',
13081
+ //'facebook-official', //<- removed in fa5
13082
  'facebook-square',
13083
  'firefox',
13084
  'flickr',
13097
  'git-square',
13098
  'google',
13099
  'google-plus',
13100
+ //'google-plus-circle', //<- removed in fa5
13101
+ //'google-plus-official', //<- removed in fa5
13102
+ 'google-plus-g', //<- added in fa5
13103
  'google-plus-square',
13104
  'google-wallet',
13105
  'gratipay',
13106
  'hacker-news',
13107
  'houzz',
13108
+ 'imdb',
13109
  'instagram',
13110
  'internet-explorer',
13111
  'ioxhost',
13115
  'lastfm-square',
13116
  'leanpub',
13117
  'linkedin',
13118
+ //'linkedin-square', //<- removed in fa5
13119
+ 'linkedin-in', //<- added in fa5
13120
  'linux',
13121
  'maxcdn',
13122
+ //'meanpath', <- removed in fa5
13123
+ 'meetup',
13124
  'medium',
13125
  'mixcloud',
13126
  'mobile',
13127
+ 'mobile-alt',//<- added in fa5
13128
  'modx',
13129
  'odnoklassniki',
13130
  'odnoklassniki-square',
13197
  'y-combinator',
13198
  'yelp',
13199
  'youtube',
13200
+ //'youtube-play', //<- removed in fa5
13201
  'youtube-square'
13202
  ];
13203
+
13204
+ //FA5 backward compatibility with FA4
13205
+ //see https://github.com/presscustomizr/customizr/issues/1364
13206
+ this.fa_solid_icons = [
13207
+ 'fa-envelope',
13208
+ 'fa-envelope-square',
13209
+ 'fa-mobile',
13210
+ 'fa-mobile-alt',
13211
+ 'fa-phone',
13212
+ 'fa-phone-square',
13213
+ 'fa-rss',
13214
+ 'fa-rss-square',
13215
+ 'fa-share-alt',
13216
+ 'fa-share-alt-square'
13217
+ ];
13218
+
13219
+ this.fa_icons_replacement = {
13220
+ 'fa-bitbucket-square' : 'fa-bitbucket',
13221
+ 'fa-facebook-official' : 'fa-facebook-f',
13222
+ 'fa-google-plus-circle' : 'fa-google-plus',
13223
+ 'fa-google-plus-official' : 'fa-google-plus',
13224
+ 'fa-linkedin-square' : 'fa-linkedin',
13225
+ 'fa-youtube-play' : 'fa-youtube'
13226
+ }
13227
+
13228
  //EXTEND THE DEFAULT CONSTRUCTORS FOR INPUT
13229
  module.inputConstructor = api.CZRInput.extend( module.CZRSocialsInputMths || {} );
13230
  //EXTEND THE DEFAULT CONSTRUCTORS FOR MONOMODEL
13321
  return 'fa-' . title.toLowerCase().replace('envelope', 'email');
13322
  },
13323
 
13324
+ //from : https://stackoverflow.com/a/34560648
13325
+ _strReplace : function( $f, $r, $s ) {
13326
+ return $s.replace(new RegExp("(" + (typeof($f) == "string" ? $f.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&") : $f.map(function(i){return i.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&")}).join("|")) + ")", "g"), typeof($r) == "string" ? $r : typeof($f) == "string" ? $r[0] : function(i){ return $r[$f.indexOf(i)]});
13327
+ },
13328
+
13329
+ buildFaIcon : function( value ) {
13330
+ //FA5 backward compatibility with FA4
13331
+ //see https://github.com/presscustomizr/customizr/issues/1364
13332
+ //by default they're brands
13333
+ var _fa_group = 'fab', //<- brand group by default
13334
+ _icon_class = value.toLowerCase(),
13335
+ solidIcons = this.fa_solid_icons,
13336
+ iconsReplacement = this.fa_icons_replacement;
13337
 
13338
+ _icon_class = this._strReplace( _.keys( iconsReplacement ), _.values( iconsReplacement ),_icon_class);
13339
 
13340
+ //former -o icons => now part of the far (Regular) group
13341
+ if ( _icon_class.match(/-o$/) ) {
13342
+ _fa_group = 'far';
13343
+ _icon_class = _icon_class.replace(/-o$/,'');
13344
+ }
13345
+ //solid icons
13346
+ else if ( _.contains( solidIcons, _icon_class ) ) {
13347
+ _fa_group = 'fas';
13348
+ }
13349
 
13350
+ return _fa_group + ' ' +_icon_class;
13351
+
13352
+ },
13353
 
13354
 
13355
 
13356
  CZRSocialsInputMths : {
13357
  setupSelect : function() {
13358
+ var input = this,
13359
+ item = input.input_parent,
13360
+ module = input.module,
13361
+ socialList = module.social_icons,
13362
+ solidIcons = module.fa_solid_icons,
13363
+ iconsReplacement = module.fa_icons_eplacement,
13364
+ _model = item(),
13365
  //check if we are in the pre Item case => if so, the id is empty
13366
+ is_preItem = _.isEmpty( _model.id );
13367
 
13368
  //=> add the select text in the pre Item case
13369
  if ( is_preItem ) {
13374
  _.each( socialList , function( icon_name, k ) {
13375
  // in the pre Item case the first select element is the notice "Select a social icon"
13376
  // doesn't need the fa-* class
13377
+ var _value = ( is_preItem && 0 === k ) ? '' : 'fa-' + icon_name.toLowerCase(),
13378
  _attributes = {
13379
  value : _value,
13380
  html: module.getTitleFromIcon( icon_name )
13387
 
13388
  function addIcon( state ) {
13389
  if (! state.id) { return state.text; }
13390
+
13391
+ //two spans here because we cannot wrap the social text into the social icon span as the solid FA5 font-weight is bold
13392
+ var $state = $(
13393
+ '<span class="' + module.buildFaIcon( state.element.value.toLowerCase() ) + '"></span><span class="social-name">&nbsp;&nbsp;' + state.text + '</span>'
13394
  );
13395
  return $state;
13396
  }
13466
  icon = icon || 'fa-' + module.social_icons[0];
13467
  color = color || serverControlParams.social_el_params.defaultSocialColor;
13468
 
13469
+ return '<div><span class="' + module.buildFaIcon( icon ) + '" style="color:' + color + '"></span> ' + title + '</div>';
13470
  },
13471
 
13472
  //overrides the default parent method by a custom one
13735
  if (! state.id) { return state.text; }
13736
  if ( _.contains(available_locs, state.element.value) ) { return state.text; }
13737
  var $state = $(
13738
+ '<span class="czr-unavailable-location fas fa-ban" title="' + serverControlParams.i18n.unavailableLocation + '">&nbsp;&nbsp;' + state.text + '</span>'
13739
  );
13740
  return $state;
13741
  }
15512
 
15513
 
15514
  var fireHeaderButtons = function() {
15515
+ var $home_button = $('<span/>', { class:'customize-controls-home fas fa-home', html:'<span class="screen-reader-text">Home</span>' } );
15516
  $.when( $('#customize-header-actions').append( $home_button ) )
15517
  .done( function() {
15518
  $home_button
addons/assets/czr/js/czr-control-base.min.js CHANGED
@@ -1,24 +1 @@
1
- /*! addEventListener Polyfill ie9- http://stackoverflow.com/a/27790212*/
2
- window.addEventListener=window.addEventListener||function(a,b){window.attachEvent("on"+a,b)},/*! Datenow Polyfill ie9- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now */
3
- Date.now||(Date.now=function(){return(new Date).getTime()}),/*! Object.create monkey patch ie8 http://stackoverflow.com/a/18020326 */
4
- Object.create||(Object.create=function(a,b){function c(){}if("undefined"!=typeof b)throw"The multiple-argument version of Object.create is not provided by this browser and cannot be shimmed.";return c.prototype=a,new c}),/*! https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter */
5
- Array.prototype.filter||(Array.prototype.filter=function(a){"use strict";if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments.length>=2?arguments[1]:void 0,f=0;f<c;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),/*! map was added to the ECMA-262 standard in the 5th edition */
6
- Array.prototype.map||(Array.prototype.map=function(a,b){var c,d,e;if(null===this)throw new TypeError(" this is null or not defined");var f=Object(this),g=f.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=new Array(g),e=0;e<g;){var h,i;e in f&&(h=f[e],i=a.call(c,h,e,f),d[e]=i),e++}return d}),/*! Array.from was added to the ECMA-262 standard in the 6th edition (ES2015) */
7
- Array.from||(Array.from=function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}()),/*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
8
- "function"!=typeof jQuery.fn.iCheck&&!function(a){function b(a,b,e){var f=a[0],g=/er/.test(e)?p:/bl/.test(e)?n:l,h=e==q?{checked:f[l],disabled:f[n],indeterminate:"true"==a.attr(p)||"false"==a.attr(o)}:f[g];if(/^(ch|di|in)/.test(e)&&!h)c(a,g);else if(/^(un|en|de)/.test(e)&&h)d(a,g);else if(e==q)for(g in h)h[g]?c(a,g,!0):d(a,g,!0);else b&&"toggle"!=e||(b||a[u]("ifClicked"),h?f[r]!==k&&d(a,g):c(a,g))}function c(b,c,e){var q=b[0],u=b.parent(),v=c==l,x=c==p,y=c==n,z=x?o:v?m:"enabled",A=f(b,z+g(q[r])),B=f(b,c+g(q[r]));if(!0!==q[c]){if(!e&&c==l&&q[r]==k&&q.name){var C=b.closest("form"),D='input[name="'+q.name+'"]',D=C.length?C.find(D):a(D);D.each(function(){this!==q&&a(this).data(i)&&d(a(this),c)})}x?(q[c]=!0,q[l]&&d(b,l,"force")):(e||(q[c]=!0),v&&q[p]&&d(b,p,!1)),h(b,v,c,e)}q[n]&&f(b,w,!0)&&u.find("."+j).css(w,"default"),u[s](B||f(b,c)||""),y?u.attr("aria-disabled","true"):u.attr("aria-checked",x?"mixed":"true"),u[t](A||f(b,z)||"")}function d(a,b,c){var d=a[0],e=a.parent(),i=b==l,k=b==p,q=b==n,u=k?o:i?m:"enabled",v=f(a,u+g(d[r])),x=f(a,b+g(d[r]));!1!==d[b]&&((k||!c||"force"==c)&&(d[b]=!1),h(a,i,u,c)),!d[n]&&f(a,w,!0)&&e.find("."+j).css(w,"pointer"),e[t](x||f(a,b)||""),q?e.attr("aria-disabled","false"):e.attr("aria-checked","false"),e[s](v||f(a,u)||"")}function e(b,c){b.data(i)&&(b.parent().html(b.attr("style",b.data(i).s||"")),c&&b[u](c),b.off(".i").unwrap(),a(v+'[for="'+b[0].id+'"]').add(b.closest(v)).off(".i"))}function f(a,b,c){return a.data(i)?a.data(i).o[b+(c?"":"Class")]:void 0}function g(a){return a.charAt(0).toUpperCase()+a.slice(1)}function h(a,b,c,d){d||(b&&a[u]("ifToggled"),a[u]("ifChanged")[u]("if"+g(c)))}var i="iCheck",j=i+"-helper",k="radio",l="checked",m="un"+l,n="disabled",o="determinate",p="in"+o,q="update",r="type",s="addClass",t="removeClass",u="trigger",v="label",w="cursor",x=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);a.fn[i]=function(f,g){var h='input[type="checkbox"], input[type="'+k+'"]',m=a(),o=function(b){b.each(function(){var b=a(this);m=b.is(h)?m.add(b):m.add(b.find(h))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(f))return f=f.toLowerCase(),o(this),m.each(function(){var c=a(this);"destroy"==f?e(c,"ifDestroyed"):b(c,!0,f),a.isFunction(g)&&g()});if("object"!=typeof f&&f)return this;var w=a.extend({checkedClass:l,disabledClass:n,indeterminateClass:p,labelHover:!0,aria:!1},f),y=w.handle,z=w.hoverClass||"hover",A=w.focusClass||"focus",B=w.activeClass||"active",C=!!w.labelHover,D=w.labelHoverClass||"hover",E=0|(""+w.increaseArea).replace("%","");return("checkbox"==y||y==k)&&(h='input[type="'+y+'"]'),-50>E&&(E=-50),o(this),m.each(function(){var f=a(this);e(f);var g=this,h=g.id,m=-E+"%",o=100+2*E+"%",o={position:"absolute",top:m,left:m,display:"block",width:o,height:o,margin:0,padding:0,background:"#fff",border:0,opacity:0},m=x?{position:"absolute",visibility:"hidden"}:E?o:{position:"absolute",opacity:0},p="checkbox"==g[r]?w.checkboxClass||"icheckbox":w.radioClass||"i"+k,y=a(v+'[for="'+h+'"]').add(f.closest(v)),F=!!w.aria,G=i+"-"+Math.random().toString(36).substr(2,6),H='<div class="'+p+'" '+(F?'role="'+g[r]+'" ':"");F&&y.each(function(){H+='aria-labelledby="',this.id?H+=this.id:(this.id=G,H+=G),H+='"'}),H=f.wrap(H+"/>")[u]("ifCreated").parent().append(w.insert),o=a('<ins class="'+j+'"/>').css(o).appendTo(H),f.data(i,{o:w,s:f.attr("style")}).css(m),w.inheritClass&&H[s](g.className||""),w.inheritID&&h&&H.attr("id",i+"-"+h),"static"==H.css("position")&&H.css("position","relative"),b(f,!0,q),y.length&&y.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(c){var d=c[r],e=a(this);if(!g[n]){if("click"==d){if(a(c.target).is("a"))return;b(f,!1,!0)}else C&&(/ut|nd/.test(d)?(H[t](z),e[t](D)):(H[s](z),e[s](D)));if(!x)return!1;c.stopPropagation()}}),f.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(a){var b=a[r];return a=a.keyCode,"click"!=b&&("keydown"==b&&32==a?(g[r]==k&&g[l]||(g[l]?d(f,l):c(f,l)),!1):void("keyup"==b&&g[r]==k?!g[l]&&c(f,l):/us|ur/.test(b)&&H["blur"==b?t:s](A)))}),o.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(a){var c=a[r],d=/wn|up/.test(c)?B:z;if(!g[n]){if("click"==c?b(f,!1,!0):(/wn|er|in/.test(c)?H[s](d):H[t](d+" "+B),y.length&&C&&d==z&&y[/ut|nd/.test(c)?t:s](D)),!x)return!1;a.stopPropagation()}})})}}(window.jQuery||window.Zepto),"function"!=typeof jQuery.fn.selecter&&!function(a,b){"use strict";function c(b){b=a.extend({},x,b||{}),null===w&&(w=a("body"));for(var c=a(this),e=0,f=c.length;f>e;e++)d(c.eq(e),b);return c}function d(b,c){if(!b.hasClass("selecter-element")){c=a.extend({},c,b.data("selecter-options")),c.external&&(c.links=!0);var d=b.find("option, optgroup"),g=d.filter("option"),h=g.filter(":selected"),n=""!==c.label?-1:g.index(h),p=c.links?"nav":"div";c.tabIndex=b[0].tabIndex,b[0].tabIndex=-1,c.multiple=b.prop("multiple"),c.disabled=b.is(":disabled");var q="<"+p+' class="selecter '+c.customClass;v?q+=" mobile":c.cover&&(q+=" cover"),q+=c.multiple?" multiple":" closed",c.disabled&&(q+=" disabled"),q+='" tabindex="'+c.tabIndex+'">',c.multiple||(q+='<span class="selecter-selected'+(""!==c.label?" placeholder":"")+'">',q+=a("<span></span").text(r(""!==c.label?c.label:h.text(),c.trim)).html(),q+="</span>"),q+='<div class="selecter-options">',q+="</div>",q+="</"+p+">",b.addClass("selecter-element").after(q);var s=b.next(".selecter"),u=a.extend({$select:b,$allOptions:d,$options:g,$selecter:s,$selected:s.find(".selecter-selected"),$itemsWrapper:s.find(".selecter-options"),index:-1,guid:t++},c);e(u),o(n,u),void 0!==a.fn.scroller&&u.$itemsWrapper.scroller(),u.$selecter.on("touchstart.selecter click.selecter",".selecter-selected",u,f).on("click.selecter",".selecter-item",u,j).on("close.selecter",u,i).data("selecter",u),u.$select.on("change.selecter",u,k),v||(u.$selecter.on("focus.selecter",u,l).on("blur.selecter",u,m),u.$select.on("focus.selecter",u,function(a){a.data.$selecter.trigger("focus")}))}}function e(b){for(var c="",d=b.links?"a":"span",e=0,f=0,g=b.$allOptions.length;g>f;f++){var h=b.$allOptions.eq(f);if("OPTGROUP"===h[0].tagName)c+='<span class="selecter-group',h.is(":disabled")&&(c+=" disabled"),c+='">'+h.attr("label")+"</span>";else{var i=h.val();h.attr("value")||h.attr("value",i),c+="<"+d+' class="selecter-item',h.is(":selected")&&""===b.label&&(c+=" selected"),h.is(":disabled")&&(c+=" disabled"),c+='" ',c+=b.links?'href="'+i+'"':'data-value="'+i+'"',c+=">"+a("<span></span>").text(r(h.text(),b.trim)).html()+"</"+d+">",e++}}b.$itemsWrapper.html(c),b.$items=b.$selecter.find(".selecter-item")}function f(c){c.preventDefault(),c.stopPropagation();var d=c.data;if(!d.$select.is(":disabled"))if(a(".selecter").not(d.$selecter).trigger("close.selecter",[d]),v){var e=d.$select[0];if(b.document.createEvent){var f=b.document.createEvent("MouseEvents");f.initMouseEvent("mousedown",!1,!0,b,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(f)}else e.fireEvent&&e.fireEvent("onmousedown")}else d.$selecter.hasClass("closed")?g(c):d.$selecter.hasClass("open")&&i(c)}function g(b){b.preventDefault(),b.stopPropagation();var c=b.data;if(!c.$selecter.hasClass("open")){var d=c.$selecter.offset(),e=w.outerHeight(),f=c.$itemsWrapper.outerHeight(!0),g=c.index>=0?c.$items.eq(c.index).position():{left:0,top:0};d.top+f>e&&c.$selecter.addClass("bottom"),c.$itemsWrapper.show(),c.$selecter.removeClass("closed").addClass("open"),w.on("click.selecter-"+c.guid,":not(.selecter-options)",c,h),void 0!==a.fn.scroller?c.$itemsWrapper.scroller("scroll",c.$itemsWrapper.find(".scroller-content").scrollTop()+g.top,0).scroller("reset"):c.$itemsWrapper.scrollTop(c.$itemsWrapper.scrollTop()+g.top)}}function h(b){b.preventDefault(),b.stopPropagation(),0===a(b.currentTarget).parents(".selecter").length&&i(b)}function i(a){a.preventDefault(),a.stopPropagation();var b=a.data;b.$selecter.hasClass("open")&&(b.$itemsWrapper.hide(),b.$selecter.removeClass("open bottom").addClass("closed"),w.off(".selecter-"+b.guid))}function j(b){b.preventDefault(),b.stopPropagation();var c=a(this),d=b.data;if(!d.$select.is(":disabled")){if(d.$itemsWrapper.is(":visible")){var e=d.$items.index(c);o(e,d),p(d)}d.multiple||i(b)}}function k(b,c){var d=a(this),e=b.data;if(!c&&!e.multiple){var f=e.$options.index(e.$options.filter("[value='"+s(d.val())+"']"));o(f,e),p(e)}}function l(b){b.preventDefault(),b.stopPropagation();var c=b.data;c.$select.is(":disabled")||c.multiple||(c.$selecter.addClass("focus").on("keydown.selecter"+c.guid,c,n),a(".selecter").not(c.$selecter).trigger("close.selecter",[c]))}function m(b){b.preventDefault(),b.stopPropagation();var c=b.data;c.$selecter.removeClass("focus").off("keydown.selecter"+c.guid+" keyup.selecter"+c.guid),a(".selecter").not(c.$selecter).trigger("close.selecter",[c])}function n(b){var c=b.data;if(13===b.keyCode)c.$selecter.hasClass("open")&&(i(b),o(c.index,c)),p(c);else if(!(9===b.keyCode||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)){b.preventDefault(),b.stopPropagation();var d=c.$items.length-1,e=c.index<0?0:c.index;if(a.inArray(b.keyCode,u?[38,40,37,39]:[38,40])>-1)e+=38===b.keyCode||u&&37===b.keyCode?-1:1,0>e&&(e=0),e>d&&(e=d);else{var f,g,h=String.fromCharCode(b.keyCode).toUpperCase();for(g=c.index+1;d>=g;g++)if(f=c.$options.eq(g).text().charAt(0).toUpperCase(),f===h){e=g;break}if(0>e)for(g=0;d>=g;g++)if(f=c.$options.eq(g).text().charAt(0).toUpperCase(),f===h){e=g;break}}e>=0&&o(e,c)}}function o(a,b){var c=b.$items.eq(a),d=c.hasClass("selected"),e=c.hasClass("disabled");if(!e){if(-1===a&&""!==b.label)b.$selected.html(b.label);else if(d)b.multiple&&(b.$options.eq(a).prop("selected",null),c.removeClass("selected"));else{var f=c.html();c.data("value"),b.multiple?b.$options.eq(a).prop("selected",!0):(b.$selected.html(f).removeClass("placeholder"),b.$items.filter(".selected").removeClass("selected"),b.$select[0].selectedIndex=a),c.addClass("selected")}(!d||b.multiple)&&(b.index=a)}}function p(a){a.links?q(a):(a.callback.call(a.$selecter,a.$select.val(),a.index),a.$select.trigger("change",[!0]))}function q(a){var c=a.$select.val();a.external?b.open(c):b.location.href=c}function r(a,b){return 0===b?a:a.length>b?a.substring(0,b)+"...":a}function s(a){return a.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")}var t=0,u=b.navigator.userAgent.toLowerCase().indexOf("firefox")>-1,v=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(b.navigator.userAgent||b.navigator.vendor||b.opera),w=null,x={callback:a.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,trim:0},y={defaults:function(b){return x=a.extend(x,b||{}),a(this)},disable:function(b){return a(this).each(function(c,d){var e=a(d).next(".selecter").data("selecter");if(e)if("undefined"!=typeof b){var f=e.$items.index(e.$items.filter("[data-value="+b+"]"));e.$items.eq(f).addClass("disabled"),e.$options.eq(f).prop("disabled",!0)}else e.$selecter.hasClass("open")&&e.$selecter.find(".selecter-selected").trigger("click.selecter"),e.$selecter.addClass("disabled"),e.$select.prop("disabled",!0)})},enable:function(b){return a(this).each(function(c,d){var e=a(d).next(".selecter").data("selecter");if(e)if("undefined"!=typeof b){var f=e.$items.index(e.$items.filter("[data-value="+b+"]"));e.$items.eq(f).removeClass("disabled"),e.$options.eq(f).prop("disabled",!1)}else e.$selecter.removeClass("disabled"),e.$select.prop("disabled",!1)})},destroy:function(){return a(this).each(function(b,c){var d=a(c).next(".selecter").data("selecter");d&&(d.$selecter.hasClass("open")&&d.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==a.fn.scroller&&d.$selecter.find(".selecter-options").scroller("destroy"),d.$select[0].tabIndex=d.tabIndex,d.$select.off(".selecter").removeClass("selecter-element").show(),d.$selecter.off(".selecter").remove())})},refresh:function(){return a(this).each(function(b,c){var d=a(c).next(".selecter").data("selecter");if(d){var f=d.index;d.$allOptions=d.$select.find("option, optgroup"),d.$options=d.$allOptions.filter("option"),d.index=-1,f=d.$options.index(d.$options.filter(":selected")),e(d),o(f,d)}})}};a.fn.selecter=function(a){return y[a]?y[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?this:c.apply(this,arguments)},a.selecter=function(a){"defaults"===a&&y.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window),"function"!=typeof jQuery.fn.stepper&&!function(a){"use strict";function b(b){b=a.extend({},k,b||{});for(var d=a(this),e=0,f=d.length;f>e;e++)c(d.eq(e),b);return d}function c(b,c){if(!b.hasClass("stepper-input")){c=a.extend({},c,b.data("stepper-options"));var e=parseFloat(b.attr("min")),f=parseFloat(b.attr("max")),g=parseFloat(b.attr("step"))||1;b.addClass("stepper-input").wrap('<div class="stepper '+c.customClass+'" />').after('<span class="stepper-arrow up">'+c.labels.up+'</span><span class="stepper-arrow down">'+c.labels.down+"</span>");var h=b.parent(".stepper"),j=a.extend({$stepper:h,$input:b,$arrow:h.find(".stepper-arrow"),min:void 0!==typeof e&&!isNaN(e)&&e,max:void 0!==typeof f&&!isNaN(f)&&f,step:void 0===typeof g||isNaN(g)?1:g,timer:null},c);j.digits=i(j.step),b.is(":disabled")&&h.addClass("disabled"),h.on("touchstart.stepper mousedown.stepper",".stepper-arrow",j,d).data("stepper",j)}}function d(b){b.preventDefault(),b.stopPropagation(),e(b);var c=b.data;if(!c.$input.is(":disabled")&&!c.$stepper.hasClass("disabled")){var d=a(b.target).hasClass("up")?c.step:-c.step;c.timer=g(c.timer,125,function(){f(c,d,!1)}),f(c,d),a("body").on("touchend.stepper mouseup.stepper",c,e)}}function e(b){b.preventDefault(),b.stopPropagation();var c=b.data;h(c.timer),a("body").off(".stepper")}function f(a,b){var c=parseFloat(a.$input.val()),d=b;void 0===typeof c||isNaN(c)?d=a.min!==!1?a.min:0:a.min!==!1&&c<a.min?d=a.min:d+=c;var e=(d-a.min)%a.step;0!==e&&(d-=e),a.min!==!1&&d<a.min&&(d=a.min),a.max!==!1&&d>a.max&&(d-=a.step),d!==c&&(d=j(d,a.digits),a.$input.val(d).trigger("change"))}function g(a,b,c){return h(a),setInterval(c,b)}function h(a){a&&(clearInterval(a),a=null)}function i(a){var b=String(a);return b.indexOf(".")>-1?b.length-b.indexOf(".")-1:0}function j(a,b){var c=Math.pow(10,b);return Math.round(a*c)/c}var k={customClass:"",labels:{up:"Up",down:"Down"}},l={defaults:function(b){return k=a.extend(k,b||{}),a(this)},destroy:function(){return a(this).each(function(){var b=a(this).data("stepper");b&&(b.$stepper.off(".stepper").find(".stepper-arrow").remove(),b.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return a(this).each(function(){var b=a(this).data("stepper");b&&(b.$input.attr("disabled","disabled"),b.$stepper.addClass("disabled"))})},enable:function(){return a(this).each(function(){var b=a(this).data("stepper");b&&(b.$input.attr("disabled",null),b.$stepper.removeClass("disabled"))})}};a.fn.stepper=function(a){return l[a]?l[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?this:b.apply(this,arguments)},a.stepper=function(a){"defaults"===a&&l.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,this),/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group",a(h),this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){
9
- function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return!(a(c.data.results)<this.minimumResultsForSearch)&&b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";
10
- return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),/*! rangeslider.js - v2.3.0 | (c) 2016 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
11
- !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";function b(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}function c(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function d(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function e(a){return a&&(0===a.offsetWidth||0===a.offsetHeight||a.open===!1)}function f(a){for(var b=[],c=a.parentNode;e(c);)b.push(c),c=c.parentNode;return b}function g(a,b){function c(a){"undefined"!=typeof a.open&&(a.open=!a.open)}var d=f(a),e=d.length,g=[],h=a[b];if(e){for(var i=0;i<e;i++)g[i]=d[i].style.cssText,d[i].style.setProperty?d[i].style.setProperty("display","block","important"):d[i].style.cssText+=";display: block !important",d[i].style.height="0",d[i].style.overflow="hidden",d[i].style.visibility="hidden",c(d[i]);h=a[b];for(var j=0;j<e;j++)d[j].style.cssText=g[j],c(d[j])}return h}function h(a,b){var c=parseFloat(a);return Number.isNaN(c)?b:c}function i(a){return a.charAt(0).toUpperCase()+a.substr(1)}function j(b,e){if(this.$window=a(window),this.$document=a(document),this.$element=a(b),this.options=a.extend({},n,e),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=o.orientation[this.orientation].dimension,this.DIRECTION=o.orientation[this.orientation].direction,this.DIRECTION_STYLE=o.orientation[this.orientation].directionStyle,this.COORDINATE=o.orientation[this.orientation].coordinate,this.polyfill&&m)return!1;this.identifier="js-"+k+"-"+l++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var f=this;this.$window.on("resize."+this.identifier,d(function(){c(function(){f.update(!1,!1)},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(a,b){if(!b||b.origin!==f.identifier){var c=a.target.value,d=f.getPositionFromValue(c);f.setPosition(d)}})}Number.isNaN=Number.isNaN||function(a){return"number"==typeof a&&a!==a};var k="rangeslider",l=0,m=b(),n={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},o={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return j.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},j.prototype.update=function(a,b){a=a||!1,a&&(this.min=h(this.$element[0].getAttribute("min"),0),this.max=h(this.$element[0].getAttribute("max"),100),this.value=h(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=h(this.$element[0].getAttribute("step"),1)),this.handleDimension=g(this.$handle[0],"offset"+i(this.DIMENSION)),this.rangeDimension=g(this.$range[0],"offset"+i(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,b)},j.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(a),c=this.$range[0].getBoundingClientRect()[this.DIRECTION],d=this.getPositionFromNode(this.$handle[0])-c,e="vertical"===this.orientation?this.maxHandlePos-(b-this.grabPos):b-this.grabPos;this.setPosition(e),b>=d&&b<d+this.handleDimension&&(this.grabPos=b-d)}},j.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(a),c="vertical"===this.orientation?this.maxHandlePos-(b-this.grabPos):b-this.grabPos;this.setPosition(c)},j.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},j.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},j.prototype.setPosition=function(a,b){var c,d;void 0===b&&(b=!0),c=this.getValueFromPosition(this.cap(a,0,this.maxHandlePos)),d=this.getPositionFromValue(c),this.$fill[0].style[this.DIMENSION]=d+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=d+"px",this.setValue(c),this.position=d,this.value=c,b&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(d,c)},j.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},j.prototype.getRelativePosition=function(a){var b=i(this.COORDINATE),c=this.$range[0].getBoundingClientRect()[this.DIRECTION],d=0;return"undefined"!=typeof a.originalEvent["client"+b]?d=a.originalEvent["client"+b]:a.originalEvent.touches&&a.originalEvent.touches[0]&&"undefined"!=typeof a.originalEvent.touches[0]["client"+b]?d=a.originalEvent.touches[0]["client"+b]:a.currentPoint&&"undefined"!=typeof a.currentPoint[this.COORDINATE]&&(d=a.currentPoint[this.COORDINATE]),d-c},j.prototype.getPositionFromValue=function(a){var b,c;return b=(a-this.min)/(this.max-this.min),c=Number.isNaN(b)?0:b*this.maxHandlePos},j.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandlePos||1),c=this.step*Math.round(b*(this.max-this.min)/this.step)+this.min,Number(c.toFixed(this.toFixed))},j.prototype.setValue=function(a){a===this.value&&""!==this.$element[0].value||this.$element.val(a).trigger("input",{origin:this.identifier})},j.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+k),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},a.fn[k]=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),e=d.data("plugin_"+k);e||d.data("plugin_"+k,e=new j(this,b)),"string"==typeof b&&e[b].apply(e,c)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(a,b,c){a.bind("ready",function(){a.previewedDevice&&a.previewedDevice.bind(function(b){a.previewer.send("previewed-device",b)})})}(wp.customize,jQuery,_),function(a,b,c){a.czr_skopeReady=b.Deferred(),!c.isUndefined(serverControlParams.isSkopOn)&&serverControlParams.isSkopOn||a.czr_skopeReady.resolve();var d=function(a){var b={bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]};a=c.extend(b,a);var d=Array.from(a.consoleArguments),e=function(a){return c.isString(a)?a.length>150?a.substr(0,149):a:""};return d=c.isEmpty(c.filter(d,function(a){return!c.isString(a)}))?d.join(" "):JSON.stringify(d.join(" ")),["%c "+e(d),["background:"+a.bgCol,"color:"+a.textCol,"display: block;"].join(";")]};a.consoleLog=function(){serverControlParams.isDevMode&&(c.isUndefined(console)&&"function"!=typeof window.console.log||console.log.apply(console,d({consoleArguments:arguments})))},a.errorLog=function(){c.isUndefined(console)&&"function"!=typeof window.console.log||console.log.apply(console,d({bgCol:"#ffd5a0",textCol:"#000",consoleArguments:arguments}))},a.czr_isSkopOn=function(){return!c.isUndefined(serverControlParams.isSkopOn)&&serverControlParams.isSkopOn&&c.has(a,"czr_skopeBase")},a.czr_isChangeSetOn=function(){return serverControlParams.isChangeSetOn&&!0}}(wp.customize,jQuery,_),function(a,b,c){a.Value.prototype.set=function(d,e){var f=this._value,g=b.Deferred(),h=this,i=[];return d=this._setter.apply(this,arguments),d=this.validate(d),args=c.extend({silent:!1},c.isObject(e)?e:{}),null===d||c.isEqual(f,d)?g.resolveWith(h,[d,f,e]).promise():(this._value=d,this._dirty=!0,!0===args.silent?g.resolveWith(h,[d,f,e]).promise():this._deferreds?(c.each(h._deferreds,function(a){i.push(a.apply(null,[d,f,e]))}),b.when.apply(null,i).fail(function(){a.errorLog("A deferred callback failed in api.Value::set()")}).then(function(){h.callbacks.fireWith(h,[d,f,e]),g.resolveWith(h,[d,f,e])}),g.promise(h)):(this.callbacks.fireWith(this,[d,f,e]),g.resolveWith(h,[d,f,e]).promise(h)))},a.Value.prototype.bind=function(){var a=this,d=!1,e=[];return b.each(arguments,function(a,b){d||(d=c.isObject(b)&&b.deferred),c.isFunction(b)&&e.push(b)}),d?(a._deferreds=a._deferreds||[],c.each(e,function(b){c.contains(b,a._deferreds)||a._deferreds.push(b)})):a.callbacks.add.apply(a.callbacks,arguments),this},a.Setting.prototype.silent_set=function(b,d){var e=this._value,f=a.state("saved")();return b=this._setter.apply(this,arguments),b=this.validate(b),null===b||c.isEqual(e,b)?this:(this._value=b,this._dirty=c.isUndefined(d)||!c.isBoolean(d)?this._dirty:d,this.callbacks.fireWith(this,[b,e,{silent:!0}]),a.state("saved")(f),this)}}(wp.customize,jQuery,_),function(a,b,c){a.Setting.prototype.preview=function(d,e,f){var g,h=this,i=b.Deferred();return g=h.transport,serverControlParams.isSkopOn&&a.czr_isPreviewerSkopeAware&&"pending"==a.czr_isPreviewerSkopeAware.state()?(this.previewer.refresh(),i.resolve(arguments).promise()):c.isUndefined(e)||c.isEmpty(e)||c.isNull(e)||!c.isObject(f)||!0!==f.not_preview_sent?c.has(f,"silent")&&!1!==f.silent?i.resolve(arguments).promise():("postMessage"!==g||a.state("previewerAlive").get()||(g="refresh"),"postMessage"===g?(h.previewer.send("pre_setting",{set_id:h.id,data:f,value:d}),h.previewer.send("setting",[h.id,h()]),i.resolve(arguments)):"refresh"===g&&(serverControlParams.isSkopOn?h.previewer.refresh().always(function(){i.resolve(arguments)}):(h.previewer.refresh(),i.resolve(arguments))),i.promise()):i.resolve(arguments).promise()}}(wp.customize,jQuery,_),function(a,b,c){if("function"==typeof a.Section){var d=a.Section.prototype.initialize;a.Section.prototype.initialize=function(a,e){d.apply(this,[a,e]);var f=this;this.expanded.callbacks.add(function(a){if(a){var d=f.container.closest(".wp-full-overlay-sidebar-content"),e=f.container.find(".accordion-section-content");_resizeContentHeight=function(){e.css("height",d.innerHeight())},_resizeContentHeight(),b(window).on("resize.customizer-section",c.debounce(_resizeContentHeight,110))}})}}}(wp.customize,jQuery,_),function(a,b,c){a.CZR_Helpers=a.CZR_Helpers||{},a.CZR_Helpers=b.extend(a.CZR_Helpers,{getControlSettingId:function(b,d){return d="default",a.control.has(b)?!c.has(a.control(b),"settings")||c.isEmpty(a.control(b).settings)?b:c.has(a.control(b).settings,d)?c.isUndefined(a.control(b).settings[d].id)?(a.consoleLog("getControlSettingId : The requested control_id has no setting id assigned : "+b),b):a.control(b).settings[d].id:(a.consoleLog("getControlSettingId : The requested control_id does not have the requested setting type : "+b+" , "+d),b):(a.consoleLog("getControlSettingId : The requested control_id is not registered in the api yet : "+b),b)},getDocSearchLink:function(a){a=c.isString(a)?a:"";var b=a.replace(/ /g,"+"),d=[serverControlParams.docURL,"search?query=",b].join("");return['<a href="'+d+'" title="'+serverControlParams.i18n.readDocumentation+'" target="_blank">'," ",'<span class="fa fa-question-circle-o"></span>'].join("")},build_setId:function(a){return c.contains(serverControlParams.wpBuiltinSettings,a)?a:c.contains(serverControlParams.themeSettingList,a)&&-1==a.indexOf(serverControlParams.themeOptions)?[serverControlParams.themeOptions+"[",a,"]"].join(""):a},getOptionName:function(a){return-1==a.indexOf(serverControlParams.themeOptions)?a:a.replace(/\[|\]/g,"").replace(serverControlParams.themeOptions,"")},hasPartRefresh:function(b){if(c.has(a,"czr_partials"))return c.contains(c.map(a.czr_partials(),function(a,d){return c.contains(a.settings,b)}),!0)},getSectionControlIds:function(b){return b=b||a.czr_activeSectionId(),a.section.has(b)?c.map(a.section(b).controls(),function(a){return a.id}):[]},getSectionSettingIds:function(b){if(b=b||a.czr_activeSectionId(),a.section.has(b)){var d=this,e=[],f=d.getSectionControlIds(b);return c.each(f,function(b){c.each(a.control(b).settings,function(a,b){e.push(a.id)})}),e}},capitalize:function(a){return c.isString(a)?a.charAt(0).toUpperCase()+a.slice(1):a},truncate:function(a,b,d){if(!c.isString(a))return"";b=b||20;var e=a.length>b,f=e?a.substr(0,b-1):a;return f=d&&e?f.substr(0,f.lastIndexOf(" ")):f,e?f+"...":f},isMultiItemModule:function(b,d){if(!c.isUndefined(b)||c.isObject(d)){if(c.isObject(d)&&c.has(d,"module_type"))b=d.module_type;else if(c.isUndefined(b)||c.isNull(b))return;if(c.has(a.czrModuleMap,b))return a.czrModuleMap[b].crud||a.czrModuleMap[b].multi_item||!1}},isCrudModule:function(b,d){if(!c.isUndefined(b)||c.isObject(d)){if(c.isObject(d)&&c.has(d,"module_type"))b=d.module_type;else if(c.isUndefined(b)||c.isNull(b))return;if(c.has(a.czrModuleMap,b))return a.czrModuleMap[b].crud||!1}},hasModuleModOpt:function(b,d){if(!c.isUndefined(b)||c.isObject(d)){if(c.isObject(d)&&c.has(d,"module_type"))b=d.module_type;else if(c.isUndefined(b)||c.isNull(b))return;if(c.has(a.czrModuleMap,b))return a.czrModuleMap[b].has_mod_opt||!1}},setupInputCollectionFromDOM:function(){var d=this;if(!c.isFunction(d))throw new Error("setupInputCollectionFromDOM : inputParentInst is not valid.");var e=d.module,f=c.has(d(),"is_mod_opt");if(!c.has(d,"czr_Input")||c.isEmpty(d.inputCollection())){d.czr_Input=new a.Values,d.inputConstructor=f?e.inputModOptConstructor:e.inputConstructor;var g=f?d.defaultModOptModel:d.defaultItemModel;if(c.isEmpty(g)||c.isUndefined(g))throw new Error("No default model found in item or mod opt "+d.id+".");var h=b.extend(!0,{},d());h=c.isObject(h)?b.extend(g,h):g;var i={};return b("."+e.control.css_attr.sub_set_wrapper,d.container).each(function(g){var j=b(this).find("[data-type]").attr("data-type"),k=c.has(h,j)?h[j]:"";if(c.isUndefined(j)||c.isEmpty(j))return void a.consoleLog("setupInputCollectionFromDOM : missing data-type for "+e.id);if(!c.has(h,j))throw new Error("The item or mod opt property : "+j+" has been found in the DOM but not in the item or mod opt model : "+d.id+". The input can not be instantiated.");var l=b(this).attr("data-input-type"),m=b(this).attr("data-transport")||"inherit",n=c.has(e.inputOptions,l)?e.inputOptions[l]:{};d.czr_Input.add(j,new d.inputConstructor(j,{id:j,type:l,transport:m,input_value:k,input_options:n,container:b(this),input_parent:d,is_mod_opt:f,module:e})),d.czr_Input(j).ready(),i[j]=k}),d.inputCollection(i),d}},removeInputCollection:function(){var a=this;if(!c.isFunction(a))throw new Error("removeInputCollection : inputParentInst is not valid.");c.has(a,"czr_Input")&&(a.czr_Input.each(function(b){a.czr_Input.remove(b.id)}),a.inputCollection({}))},refreshModuleControl:function(c){var d=a.controlConstructor.czr_module,e=(a.control(c).params.type,a.settings.controls[c]);b.when(a.control(c).container.remove()).done(function(){a.control.remove(c),a.control.add(c,new d(c,{params:e,previewer:a.previewer}))})},hexToRgb:function(b){var c=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;try{b=b.replace(c,function(a,b,c,d){return b+b+c+c+d+d})}catch(d){return a.errorLog("Error in Helpers::hexToRgb : "+d),b}var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b);return e=e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[],"rgb("+e.join(",")+")"},rgbToHex:function(a,b,c){var d=function(a){var b=a.toString(16);return 1==b.length?"0"+b:b};return"#"+d(a)+d(b)+d(c)}})}(wp.customize,jQuery,_),function(a,b,c){a.CZR_Helpers=a.CZR_Helpers||{},a.CZR_Helpers=b.extend(a.CZR_Helpers,{addActions:function(a,b,d){var e=this;d=d||e,d[a]=d[a]||[],new_event_map=c.clone(d[a]),d[a]=c.union(new_event_map,c.isArray(b)?b:[b])},doActions:function(a,b,c){b.trigger(a,c)},setupDOMListeners:function(d,e,f){var g=this,h={model:{},dom_el:{}};return f=f||g,c.isArray(d)?c.isObject(e)?(e=c.extend(h,e),!e.dom_el instanceof jQuery||1>e.dom_el.length?void a.errorLog("setupDomListeners : dom element should be an existing dom element",e):void c.map(d,function(d){if(!c.isString(d.selector)||c.isEmpty(d.selector))return void a.errorLog("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+d.actions.join(","));if(!c.isString(d.selector)||c.isEmpty(d.selector))return void a.errorLog("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+d.actions.join(","));var h=d.name&&!c.isEmpty(d.name)?d.name:[d.trigger,d.selector].join(""),i=e.dom_el.data("czr-listener-collection");if(i&&c.isArray(i)){if(i=c.isArray(i)?i:[],c.contains(i,h))return;i.push(h)}else i=[h];e.dom_el.data("czr-listener-collection",i),e.dom_el.on(d.trigger,d.selector,function(h,i){if(h.stopPropagation(),!a.utils.isKeydownButNotEnterEvent(h)){h.preventDefault();var j=b.extend(!0,{},e);if(c.has(j,"model")&&c.has(j.model,"id")&&(c.has(f,"get")?j.model=f():j.model=f.getModel(j.model.id)),b.extend(j,{event:d,dom_event:h}),b.extend(j,i),!c.has(j,"event")||!c.has(j.event,"actions"))return void a.errorLog("executeEventActionChain : missing obj.event or obj.event.actions");try{g.executeEventActionChain(j,f)}catch(k){a.errorLog("In setupDOMListeners : problem when trying to fire actions : "+j.event.actions),a.errorLog("Error : "+k)}}})})):void a.errorLog("setupDomListeners : args should be an object",d):void a.errorLog("setupDomListeners : event_map should be an array",e)},executeEventActionChain:function(a,b){var d=this;if("function"==typeof a.event.actions)return a.event.actions.call(b,a);c.isArray(a.event.actions)||(a.event.actions=[a.event.actions]);var e=!1;c.map(a.event.actions,function(f){if(!e){if("function"!=typeof b[f])throw new Error("executeEventActionChain : the action : "+f+" has not been found when firing event : "+a.event.selector);var g=c.has(a,"dom_el")&&-1!=a.dom_el.length?a.dom_el:d.container;g.trigger("before_"+f,c.omit(a,"event"));var h=b[f].call(b,a);!1===h&&(e=!0),g.trigger("after_"+f,c.omit(a,"event"))}})}})}(wp.customize,jQuery,_),function(a,b,c){a.czr_wpQueryDataReady=b.Deferred(),a.czr_wpQueryInfos=a.czr_wpQueryInfos||new a.Value,a.czr_partials=a.czr_partials||new a.Value,a.bind("ready",function(){a.previewer.bind("houston-widget-settings",function(b){var d=c.filter(b.registeredSidebars,function(a){return!c.findWhere(_wpCustomizeWidgetsSettings.registeredSidebars,{id:a.id})}),e=c.filter(b.registeredSidebars,function(a){return!c.has(b.renderedSidebars,a.id)});e=c.map(e,function(a){return a.id});var f=c.map(b.registeredSidebars,function(a){return a.id});a.czr_widgetZoneSettings=a.czr_widgetZoneSettings||new a.Value,a.czr_widgetZoneSettings.set({actives:b.renderedSidebars,inactives:e,registered:f,candidates:d,available_locations:b.availableWidgetLocations})}),a.previewer.bind("czr-query-data-ready",function(b){a.czr_wpQueryInfos(b),"pending"==a.czr_wpQueryDataReady.state()&&a.czr_wpQueryDataReady.resolve(b)}),a.previewer.bind("czr-partial-refresh-data",function(b){a.czr_partials.set(b)}),a.previewer.bind("czr-partial-refresh-done",function(b){if(c.has(b,"set_id")){var d=a.CZR_Helpers.build_setId(b.set_id);if(a.has(d)){var e=a.CZR_Helpers.getControlSettingId(d);a.control.has(e)&&a.control(e).trigger("czr-partial-refresh-done")}}})})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(a,b,c){b.extend(CZRInputMths,{initialize:function(d,e){if(c.isUndefined(e.input_parent)||c.isEmpty(e.input_parent))throw new Error("No input_parent assigned to input "+e.id+". Aborting");if(c.isUndefined(e.module))throw new Error("No module assigned to input "+e.id+". Aborting");a.Value.prototype.initialize.call(this,null,e);var f=this;if(b.extend(f,e||{}),f.isReady=b.Deferred(),c.isUndefined(e.input_value)||f.set(e.input_value),a.czrInputMap&&c.has(a.czrInputMap,f.type)){var g=a.czrInputMap[f.type];c.isFunction(f[g])&&f[g](e.input_options||null)}else a.consoleLog("Warning an input : "+f.id+" has no corresponding method defined in api.czrInputMap.");var h={text:"keyup",textarea:"keyup",password:"keyup",color:"colorpickerchange",range:"input propertychange"};f.input_event_map=[{trigger:b.trim(["change",h[f.type]||""].join(" ")),selector:"input[data-type], select[data-type], textarea[data-type]",name:"set_input_value",actions:function(a){if(!c.has(f.input_parent,"syncElements")||!c.has(f.input_parent.syncElements,f.id))throw new Error("WARNING : THE INPUT "+f.id+" HAS NO SYNCED ELEMENT.")}}],f.visible=new a.Value((!0)),f.isReady.done(function(){f.visible.bind(function(a){a?f.container.stop(!0,!0).slideDown(200):f.container.stop(!0,!0).slideUp(200)})}),f.enabled=new a.Value((!0)),f.isReady.done(function(){f.enabled.bind(function(a){f.container.toggleClass("disabled",!a)})})},ready:function(){var a=this;a.setupDOMListeners(a.input_event_map,{dom_el:a.container},a),a.callbacks.add(function(){return a.inputReact.apply(a,arguments)}),b.when(a.setupSynchronizer()).done(function(){a.isReady.resolve(a)})},setupSynchronizer:function(){var b=this,c=b.input_parent,d=b.container.find("[data-type]"),e=b.container.find("[data-type]").is("textarea");if(e)throw new Error("TO DO : THE TEXTAREA INPUT ARE NOT READY IN THE SYNCHRONIZER!");var f=new a.Element(d);c.syncElements=c.syncElements||{},c.syncElements[b.id]=f,f.sync(b),f.set(b())},inputReact:function(a,b,d){var e=this,f=e.input_parent(),g=c.clone(f),h=e.is_preItemInput;e.enabled()&&(g=!c.isObject(g)||c.isEmpty(g)?{}:g,g[e.id]=a,e.input_parent.set(g,{input_changed:e.id,input_transport:e.transport,not_preview_sent:"postMessage"===e.transport}),h||(e.input_parent.trigger(e.id+":changed",a),c.isEmpty(b)&&(c.isUndefined(b)||"postMessage"!==e.transport)||e.module.sendInputToPreview({input_id:e.id,input_parent_id:e.input_parent.id,to:a,from:b})))},setupColorPicker:function(){var a=this;a.container.find("input").iris({palettes:!0,hide:!1,change:function(a,c){b(this).val(c.color.toString()).trigger("colorpickerchange").trigger("change")}})},setupSelect:function(){var a=this;b("select",a.container).not(".no-selecter-js").each(function(){b(this).selecter({})})},setupIcheck:function(a){var c=this;b("input[type=checkbox]",c.container).each(function(a){0===b(this).closest('div[class^="icheckbox"]').length&&b(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(a){b(this).val(!1===b(this).is(":checked")?0:1),b(a.currentTarget).trigger("change")})})},setupStepper:function(a){var c=this;b('input[type="number"]',c.container).each(function(a){b(this).stepper()})},setupRangeSlider:function(a){var c,d=this,e=function(a,b){a.textContent=b+"%"};b(d.container).find("input").rangeslider({polyfill:!1,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",onInit:function(){c=b(".rangeslider__handle",this.$range),b(".rangeslider__handle",this.$range),e(c[0],this.value)}}).on("input",function(){e(c[0],this.value)})}})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(a,b,c){b.extend(CZRInputMths,{setupImageUploader:function(){var a=this,c=a();return a.attachment={},a.container?(this.tmplRendered=b.Deferred(),this.setupContentRendering(c,{}),void this.tmplRendered.done(function(){a.czrImgUploaderBinding()})):this},setupContentRendering:function(a,b){var d,e=this;e.attachment.id!=a&&b!==a?(a||(e.attachment={},e.renderImageUploaderTemplate()),d=wp.media.attachment(a),c.isObject(d)&&c.has(d,"attributes")&&c.has(d.attributes,"sizes")?(e.attachment=d.attributes,e.renderImageUploaderTemplate()):wp.media.attachment(a).fetch().done(function(){e.attachment=this.attributes,e.renderImageUploaderTemplate()})):e.attachment.id&&e.attachment.id!==a||e.renderImageUploaderTemplate()},czrImgUploaderBinding:function(){var a=this;c.bindAll(a,"czrImgUploadRemoveFile","czrImgUploadOpenFrame","czrImgUploadSelect"),a.container.on("click keydown",".upload-button",a.czrImgUploadOpenFrame),a.container.on("click keydown",".thumbnail-image img",a.czrImgUploadOpenFrame),a.container.on("click keydown",".remove-button",a.czrImgUploadRemoveFile),a.bind(a.id+":changed",function(c,d){a.tmplRendered=b.Deferred(),a.setupContentRendering(c,d)})},czrImgUploadOpenFrame:function(b){a.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),this.frame||this.czrImgUploadInitFrame(),this.frame.open())},czrImgUploadInitFrame:function(){var a=this,b=this.getUploaderLabels();a.frame=wp.media({button:{text:b.frame_button},states:[new wp.media.controller.Library({title:b.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1})]}),a.frame.on("select",a.czrImgUploadSelect)},czrImgUploadRemoveFile:function(b){var c=this;a.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),c.attachment={},c.set(""))},czrImgUploadSelect:function(){var a=this,b=a.frame.state().get("selection").first().toJSON();window._wpmejsSettings||{};a.attachment=b,a.set(b.id)},renderImageUploaderTemplate:function(){var a=this;if(0!==b("#tmpl-czr-input-img-uploader-view-content").length){var c=wp.template("czr-input-img-uploader-view-content");if(c&&a.container){var d=a.container.find("."+a.module.control.css_attr.img_upload_container);if(d.length){var e={button_labels:a.getUploaderLabels(),settings:a.id,attachment:a.attachment,canUpload:!0};return d.html(c(e)),a.tmplRendered.resolve(),a.container.trigger(a.id+":content_rendered"),!0}}}},getUploaderLabels:function(){var b=serverControlParams.i18n,d={select:b.select_image,change:b.change_image,remove:b.remove_image,"default":b.default_image,placeholder:b.placeholder_image,frame_title:b.frame_title_image,frame_button:b.frame_button_image};return c.each(d,function(b,d){if(c.isUndefined(b)){var e=this;return a.errorLog("A translated string is missing ( "+d+" ) for the image uploader input in module : "+e.module.id),""}}),d}})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(a,b,c){b.extend(CZRInputMths,{setupContentPicker:function(d){var e=this,f=[];b.extend({post:"",taxonomy:""},c.isObject(d)?d:{}),e.wpObjectTypes=d,e.container.find(".czr-input").append('<select data-select-type="content-picker-select" class="js-example-basic-simple"></select>'),f=[{trigger:"change",selector:"select[data-select-type]",name:"set_input_value",actions:function(d){var f=b(d.dom_event.currentTarget,d.dom_el),g=b(f,d.dom_el).select2("data"),h={},i={id:"",type_label:"",title:"",object_type:"",url:""};return g=c.isArray(g)?g[0]:g,!c.isObject(g)||c.isEmpty(g)?void a.errorLog("Content Picker Input : the picked value should be an object not empty."):(c.each(i,function(b,d){return"_custom_"===g.id||c.has(g,d)&&!c.isEmpty(g[d])?void(h[d]=g[d]):void a.errorLog("content_picker : missing input param : "+d)}),void e.set(h))}}],e.setupDOMListeners(f,{dom_el:e.container},e),e.isReady.done(function(){e.setupContentSelecter()})},setupContentSelecter:function(){var a=this;if(!c.isEmpty(a())){var d={value:a().id||"",title:a().title||"",selected:"selected"};a.container.find("select").append(b("<option>",d))}a.container.find("select").select2({placeholder:{id:"-1",title:"Select"},data:a.setupSelectedContents(),ajax:{url:serverControlParams.AjaxUrl,type:"POST",dataType:"json",delay:250,debug:!0,data:function(b){var c=b.page?b.page:0;return c=b.term?b.page:c,{action:b.term?"search-available-content-items-customizer":"load-available-content-items-customizer",search:b.term,wp_customize:"on",page:c,wp_object_types:JSON.stringify(a.wpObjectTypes),CZRCpNonce:serverControlParams.CZRCpNonce}},processResults:function(b,d){if(a.defaultContentPickerOption=a.defaultContentPickerOption||[],!b.success)return{results:a.defaultContentPickerOption};var e=b.data.items,f=[];return c.each(e,function(a){f.push({id:a.id,title:a.title,type_label:a.type_label,object_type:a.object,url:a.url})}),{results:f,pagination:{more:b.data.items.length>=10}}}},templateSelection:a.czrFormatContentSelected,templateResult:a.czrFormatContentSelected,escapeMarkup:function(a){return a}})},czrFormatContentSelected:function(a){if(a.loading)return a.text;var b="<div class='content-picker-item clearfix'><div class='content-item-bar'><span class='czr-picker-item-title'>"+a.title+"</span>";return a.type_label&&(b+="<span class='czr-picker-item-type'>"+a.type_label+"</span>"),b+="</div></div>"},setupSelectedContents:function(){var a=this,b=a();return b}})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(a,b,c){b.extend(CZRInputMths,{setupTextEditor:function(){var c=this;c();if(!c.container)throw new Error("The input container is not set for WP text editor in module."+c.module.id);c.czrRenderInputTextEditorTemplate()&&(c.editor=tinyMCE("czr-customize-content_editor"),c.textarea=b("#czr-customize-content_editor"),c.editorPane=b("#czr-customize-content_editor-pane"),c.dragbar=b("#czr-customize-content_editor-dragbar"),c.editorFrame=b("#czr-customize-content_editor_ifr"),c.mceTools=b("#wp-czr-customize-content_editor-tools"),c.mceToolbar=c.editorPane.find(".mce-toolbar-grp"),c.mceStatusbar=c.editorPane.find(".mce-statusbar"),c.preview=b("#customize-preview"),c.collapse=b(".collapse-sidebar"),c.textpreview=c.container.find("textarea"),c.toggleButton=c.container.find("button.text_editor-button"),c.editorExpanded=new a.Value((!1)),c.czrUpdateTextPreview(),c.czrSetToggleButtonText(c.editorExpanded()),c.czrTextEditorBinding(),c.czrResizeEditorOnUserRequest())},czrTextEditorBinding:function(){var d=this,e=d.editor,f=d.textarea,g=d.toggleButton,h=(d.editorExpanded,d.editorPane);d.bind(d.id+":changed",d.czrUpdateTextPreview),c.bindAll(d,"czrOnVisualEditorChange","czrOnTextEditorChange","czrResizeEditorOnWindowResize"),g.on("click",function(){d.editorExpanded.set(!d.editorExpanded()),d.editorExpanded()&&e.focus()}),d.module.czr_ModuleState.bind(function(a){"expanded"!=a&&d.editorExpanded.set(!1)}),d.editorExpanded.bind(function(c){a.consoleLog("in input.editorExpanded",c,d()),e.locker&&e.locker!==d&&(e.locker.editorExpanded.set(!1),e.locker=null),e.locker&&e.locker!==d||(b(document.body).toggleClass("czr-customize-content_editor-pane-open",c),e.locker=d),d.czrSetToggleButtonText(c),c?(e.setContent(wp.editor.autop(d())),e.on("input change keyup",d.czrOnVisualEditorChange),f.on("input",d.czrOnTextEditorChange),
12
- d.czrResizeEditor(window.innerHeight-h.height()),b(window).on("resize",d.czrResizeEditorOnWindowResize)):(e.off("input change keyup",d.czrOnVisualEditorChange),f.off("input",d.czrOnTextEditorChange),b(window).off("resize",d.czrResizeEditorOnWindowResize),d.czrResizeReset())})},czrOnVisualEditorChange:function(){var a,b=this,c=b.editor;a=wp.editor.removep(c.getContent()),b.set(a)},czrOnTextEditorChange:function(){var a,b=this,c=b.textarea;a=c.val(),b.set(a)},czrUpdateTextPreview:function(){var a,b=this,c=b();a=c.replace(/(<([^>]+)>)/gi,""),a.length>30&&(a=a.substring(0,34)+"..."),b.textpreview.val(a)},czrRenderInputTextEditorTemplate:function(){var c=this;if(0===b("#tmpl-czr-input-text_editor-view-content").length)throw new Error("Missing js template for text editor input in module : "+c.module.id);var d=wp.template("czr-input-text_editor-view-content"),e=c.container.find("input");if(d&&c.container)return a.consoleLog("Model injected in text editor tmpl : ",c()),e.after(d(c())),!0},czrIsEditorExpanded:function(){return b(document.body).hasClass("czr-customize-content_editor-pane-open")},czrResizeReset:function(){var a=this,b=a.preview,c=a.collapse,d=a.container.closest("ul.accordion-section-content");d.css("padding-bottom",""),b.css("bottom",""),c.css("bottom","")},czrResizeEditor:function(a){var b=window.innerHeight,d=window.innerWidth,e=40,f=1,g=782,h=56,i=8,j=4,k={},l=this,m=l.container.closest("ul.accordion-section-content"),n=l.mceTools,o=l.mceToolbar,p=l.mceStatusbar,q=l.preview,r=l.collapse,s=l.editorPane,t=l.editorFrame;l.editorExpanded()&&(c.isNaN(a)||(resizeHeight=b-a),k.height=resizeHeight,k.components=n.outerHeight()+o.outerHeight()+p.outerHeight(),resizeHeight<e&&(k.height=e),resizeHeight>b-f&&(k.height=b-f),b<s.outerHeight()&&(k.height=b),q.css("bottom",k.height),s.css("height",k.height),t.css("height",k.height-k.components),r.css("bottom",k.height+i),h>b-k.height&&r.css("bottom",p.outerHeight()+j),d<=g?m.css("padding-bottom",k.height):m.css("padding-bottom",""))},czrResizeEditorOnWindowResize:function(){var a=this,b=50,d=a.editorPane;a.editorExpanded()&&c.delay(function(){a.czrResizeEditor(window.innerHeight-d.height())},b)},czrResizeEditorOnUserRequest:function(){var a=this,c=a.dragbar,d=a.editorFrame;c.on("mousedown",function(){a.editorExpanded()&&b(document).on("mousemove.czr-customize-content_editor",function(c){c.preventDefault(),b(document.body).addClass("czr-customize-content_editor-pane-resize"),d.css("pointer-events","none"),a.czrResizeEditor(c.pageY)})}),c.on("mouseup",function(){a.editorExpanded()&&(b(document).off("mousemove.czr-customize-content_editor"),b(document.body).removeClass("czr-customize-content_editor-pane-resize"),d.css("pointer-events",""))})},czrSetToggleButtonText:function(a){var b=this;b.toggleButton.text(serverControlParams.i18n.mods.textEditor[a?"Close Editor":"Edit"])}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(a,b,c){b.extend(CZRItemMths,{initialize:function(d,e){if(c.isUndefined(e.module)||c.isEmpty(e.module))throw new Error("No module assigned to item "+d+". Aborting");var f=this;a.Value.prototype.initialize.call(f,null,e),f.isReady=b.Deferred(),f.embedded=b.Deferred(),f.container=null,f.contentContainer=null,f.inputCollection=new a.Value({}),f.viewState=new a.Value("closed"),f.removeDialogVisible=new a.Value((!1)),b.extend(f,e||{}),f.defaultItemModel=c.clone(e.defaultItemModel)||{id:"",title:""};var g=b.extend(f.defaultItemModel,e.initial_item_model);f.set(g),f.userEventMap=new a.Value([{trigger:"click keydown",selector:["."+f.module.control.css_attr.display_alert_btn,"."+f.module.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:function(){var a=this.removeDialogVisible();this.module.closeRemoveDialogs(),this.removeDialogVisible(!a)}},{trigger:"click keydown",selector:"."+f.module.control.css_attr.remove_view_btn,name:"remove_item",actions:["removeItem"]},{trigger:"click keydown",selector:["."+f.module.control.css_attr.edit_view_btn,"."+f.module.control.css_attr.item_title].join(","),name:"edit_view",actions:["setViewVisibility"]},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(a){this.module.toggleTabVisibility.call(this,a)}}]),f.isReady.done(function(){f.module.updateItemsCollection({item:f()}),f.callbacks.add(function(){return f.itemReact.apply(f,arguments)}),f.bind("contentRendered",function(){if(!c.has(f,"czr_Input")||c.isEmpty(f.inputCollection()))try{a.CZR_Helpers.setupInputCollectionFromDOM.call(f),f.module.setupTabNav.call(f)}catch(b){a.errorLog("In item.isReady.done : "+b)}}),f.bind("contentRemoved",function(){c.has(f,"czr_Input")&&a.CZR_Helpers.removeInputCollection.call(f)}),f.mayBeRenderItemWrapper(),f.embedded.done(function(){f.itemWrapperViewSetup(g)})})},ready:function(){this.isReady.resolve()},itemReact:function(a,b,c){var d=this,e=d.module;c=c||{},e.updateItemsCollection({item:a,data:c}).done(function(){d.writeItemViewTitle(a,c)})}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(a,b,c){b.extend(CZRItemMths,{_sendItem:function(b,d){var e=this,f=e.module,g=[];c.each(d,function(a,c){a!=b[c]&&g.push(c)}),c.each(g,function(c){a.previewer.send("sub_setting",{set_id:f.control.id,id:b.id,changed_prop:c,value:b[c]}),f.trigger("item_sent",{item:b,dom_el:e.container,changed_prop:c})})},removeItem:function(){var a=this,d=this.module,e=c.clone(d.itemCollection());d.trigger("pre_item_dom_remove",a()),a._destroyView(),e=c.without(e,c.findWhere(e,{id:a.id})),d.itemCollection.set(e),d.trigger("pre_item_api_remove",a());var f=b.extend(!0,{},a());d.czr_Item.remove(a.id),d.trigger("item-removed",f)},getModel:function(a){return this()}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(a,b,c){b.extend(CZRItemMths,{mayBeRenderItemWrapper:function(){var a=this;"pending"==a.embedded.state()&&b.when(a.renderItemWrapper()).done(function(b){if(a.container=b,c.isUndefined(a.container)||!a.container.length)throw new Error("In mayBeRenderItemWrapper the Item view has not been rendered : "+a.id);a.embedded.resolve()})},itemWrapperViewSetup:function(d){var e=this,f=this.module;d=e()||e.initial_item_model,e.writeItemViewTitle();var g=function(a,b,d){if(c.isUndefined(a)||!1===a.length)throw new Error("Module : "+e.module.id+", the item content has not been rendered for "+e.id);e.trigger("contentRendered"),e.contentContainer=a,e.toggleItemExpansion(b,d)};e.module.isMultiItem()?e.viewState.callbacks.add(function(d,h){var i=-1!==d.indexOf("expanded");f.hasModOpt()&&i&&a.czr_ModOptVisible(!1),i?c.isObject(e.contentContainer)&&!1!==e.contentContainer.length?e.toggleItemExpansion(d,h):b.when(e.renderItemContent(e()||e.initial_item_model)).done(function(a){(g=c.debounce(g,50))(a,d,h)}):e.toggleItemExpansion(d,h).done(function(){c.isObject(e.contentContainer)&&!1!==e.contentContainer.length&&(e.trigger("beforeContenRemoved"),b("."+f.control.css_attr.item_content,e.container).children().each(function(){b(this).remove()}),b("."+f.control.css_attr.item_content,e.container).html(""),e.contentContainer=null,e.trigger("contentRemoved"))})}):(e.viewState.callbacks.add(function(a,b){e.toggleItemExpansion.apply(e,arguments)}),b.when(e.renderItemContent(d)).done(function(a){g(a,!0)})),a.CZR_Helpers.setupDOMListeners(e.userEventMap(),{model:d,dom_el:e.container},e),e.removeDialogVisible.bind(function(d){var f=e.module,g=b("."+f.control.css_attr.remove_alert_wrapper,e.container).first();if(d&&f.closeAllItems(),d&&f.hasModOpt()&&a.czr_ModOptVisible(!1),d&&c.has(f,"preItem")&&f.preItemExpanded(!1),b("."+f.control.css_attr.remove_alert_wrapper,e.container).not(g).each(function(){b(this).hasClass("open")&&b(this).slideToggle({duration:200,done:function(){b(this).toggleClass("open",!1),b(this).siblings().find("."+f.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),d){if(!wp.template(f.AlertPart)||!e.container)return void a.consoleLog("No removal alert template available for items in module :"+f.id);g.html(wp.template(f.AlertPart)({title:e().title||e.id}))}var h=function(a){g.toggleClass("open",a),e.container.find("."+f.control.css_attr.display_alert_btn).toggleClass("active",a),a&&f._adjustScrollExpandedBlock(e.container)};d?g.stop(!0,!0).slideDown(200,function(){h(d)}):g.stop(!0,!0).slideUp(200,function(){h(d)})})},renderItemWrapper:function(a){var c=this,d=c.module;if(a=a||c(),$_view_el=b("<li>",{"class":d.control.css_attr.single_item,"data-id":a.id,id:a.id}),
13
- //!!note : => there could be additional sub view wrapper inside !!
14
- d.itemsWrapper.append($_view_el),d.isMultiItem()){var e=d.getTemplateEl("rudItemPart",a);if(0===b("#tmpl-"+e).length)throw new Error("Missing template for item "+c.id+". The provided template script has no been found : #tmpl-"+d.getTemplateEl("rudItemPart",a));$_view_el.append(b(wp.template(e)(a)))}return $_view_el.append(b("<div/>",{"class":d.control.css_attr.item_content})),$_view_el},renderItemContent:function(a){var c=this,d=this.module;if(a=a||c(),0===b("#tmpl-"+d.getTemplateEl("itemInputList",a)).length)throw new Error("No item content template defined for module "+d.id+". The template script id should be : #tmpl-"+d.getTemplateEl("itemInputList",a));var e=wp.template(d.getTemplateEl("itemInputList",a));return e?(b(e(a)).appendTo(b("."+d.control.css_attr.item_content,c.container)),b(b(e(a)),c.container)):this},writeItemViewTitle:function(d){var e=this,f=e.module,g=d||e(),h=c.has(g,"title")?a.CZR_Helpers.capitalize(g.title):g.id;h=a.CZR_Helpers.truncate(h,20),b("."+f.control.css_attr.item_title,e.container).text(h),a.CZR_Helpers.doActions("after_writeViewTitle",e.container,g,e)},setViewVisibility:function(a,b){var d=this,e=this.module;b?d.viewState.set("expanded_noscroll"):(e.closeAllItems(d.id),c.has(e,"preItem")&&e.preItemExpanded.set(!1),d.viewState.set("expanded"==d._getViewState()?"closed":"expanded"))},_getViewState:function(){return-1==this.viewState().indexOf("expanded")?"closed":"expanded"},toggleItemExpansion:function(a,c,d){var e="closed"!=a,f=this,g=this.module,h=b("."+g.control.css_attr.item_content,f.container).first(),i=b.Deferred(),j=function(b){f.container.toggleClass("open",b),b&&g.closeRemoveDialogs();var c=h.siblings().find("."+g.control.css_attr.edit_view_btn);c.toggleClass("active",b),b?c.removeClass("fa-pencil").addClass("fa-minus-square").attr("title",serverControlParams.i18n.close):c.removeClass("fa-minus-square").addClass("fa-pencil").attr("title",serverControlParams.i18n.edit),"expanded"==a&&g._adjustScrollExpandedBlock(f.container),i.resolve()};return e?h.stop(!0,!0).slideDown(d||200,function(){j(e)}):h.stop(!0,!0).slideUp(200,function(){j(e)}),i.promise()},_destroyView:function(a){this.container.fadeOut({duration:a||400,done:function(){b(this).remove()}})}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(a,b,c){b.extend(CZRModOptMths,{initialize:function(d){if(c.isUndefined(d.module)||c.isEmpty(d.module))throw new Error("No module assigned to modOpt.");var e=this;a.Value.prototype.initialize.call(e,null,d),e.isReady=b.Deferred(),e.container=null,e.inputCollection=new a.Value({}),b.extend(e,d||{}),e.defaultModOptModel=c.clone(d.defaultModOptModel)||{is_mod_opt:!0};var f=b.extend(e.defaultModOptModel,d.initial_modOpt_model),g=e.module.control;e.set(f),a.czr_ModOptVisible=new a.Value((!1)),a.czr_ModOptVisible.bind(function(d,g,h){h=h||{},d?(e.module.closeRemoveDialogs().closeAllItems(),e.modOptWrapperViewSetup(f).done(function(b){e.container=b;try{a.CZR_Helpers.setupInputCollectionFromDOM.call(e).toggleModPanelView(d)}catch(f){a.consoleLog(f)}h.module&&h.focus&&c.delay(function(){!c.isNull(h.module.czr_ModOpt.container)&&h.module.czr_ModOpt.container.find('[data-tab-id="'+h.focus+'"] a').length&&h.module.czr_ModOpt.container.find('[data-tab-id="'+h.focus+'"] a').trigger("click")},200)})):e.toggleModPanelView(d).done(function(){!1!==e.container.length?b.when(e.container.remove()).done(function(){a.CZR_Helpers.removeInputCollection.call(e)}):a.CZR_Helpers.removeInputCollection.call(e),e.container=null})}),e.isReady.done(function(){b("."+g.css_attr.edit_modopt_icon,g.container).length||b.when(g.container.find(".customize-control-title").first().append(b("<span/>",{"class":[g.css_attr.edit_modopt_icon,"fa fa-cog"].join(" "),title:serverControlParams.i18n.Settings}))).done(function(){b("."+g.css_attr.edit_modopt_icon,g.container).fadeIn(400)}),a.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+g.css_attr.edit_modopt_icon,name:"toggle_mod_option",actions:function(){a.czr_ModOptVisible(!a.czr_ModOptVisible())}}],{dom_el:g.container},e)})},ready:function(){this.isReady.resolve()}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(a,b,c){b.extend(CZRModOptMths,{modOptWrapperViewSetup:function(d){var e=this,f=this.module,g=b.Deferred(),h=function(b){a.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+f.control.css_attr.close_modopt_icon,name:"close_mod_option",actions:function(){a.czr_ModOptVisible(!1)}},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(a){this.module.toggleTabVisibility.call(this,a)}}],{dom_el:b},e)};return d=e()||e.initial_modOpt_model,b.when(e.renderModOptContent(d)).done(function(a){if(c.isUndefined(a)||!1===a.length)throw new Error("Module : "+e.module.id+", the modOpt content has not been rendered");h(a),g.resolve(a)}).then(function(){e.module.setupTabNav.call(e)}),g.promise()},renderModOptContent:function(c){var d=this,e=this.module;if(c=c||d(),0===b("#tmpl-"+e.getTemplateEl("modOptInputList",c)).length)return void a.errorLog("renderModOptContent : No modOpt content template defined for module "+e.id+". The template script id should be : #tmpl-"+e.getTemplateEl("modOptInputList",c));var f=wp.template(e.getTemplateEl("modOptInputList",c));if(!f)return this;var g="";try{g=[serverControlParams.i18n["Options for"],e.control.params.label].join(" ")}catch(h){a.errorLog("In renderModOptContent : "+h),g=serverControlParams.i18n.Settings}return b("#widgets-left").after(b("<div/>",{"class":e.control.css_attr.mod_opt_wrapper,html:[['<h2 class="mod-opt-title">',g,"</h2>"].join(""),'<span class="fa fa-times '+e.control.css_attr.close_modopt_icon+'" title="close"></span>'].join("")})),b("."+e.control.css_attr.mod_opt_wrapper).append(b(f(c))),b("."+e.control.css_attr.mod_opt_wrapper)},toggleModPanelView:function(a){var d=this.module,e=(d.control,b.Deferred());return d.control.container.toggleClass("czr-modopt-visible",a),b("body").toggleClass("czr-editing-modopt",a),c.delay(function(){e.resolve()},200),e.promise()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(a,b,c){b.extend(CZRModuleMths,{initialize:function(d,e){if(c.isUndefined(e.control)||c.isEmpty(e.control))throw new Error("No control assigned to module "+d);var f=this;a.Value.prototype.initialize.call(this,null,e),f.isReady=b.Deferred(),b.extend(f,e||{}),b.extend(f,{crudModulePart:"czr-crud-module-part",rudItemPart:"czr-rud-item-part",ruItemPart:"czr-ru-item-part",itemInputList:"",modOptInputList:"",AlertPart:"czr-rud-item-alert-part"}),f.embedded=b.Deferred(),f.itemsWrapper="",f.isInSektion()||(f.container=b(f.control.selector),f.embedded.resolve()),f.embedded.done(function(){b.when(f.renderModuleParts()).done(function(a){if(!1===a.length)throw new Error("The items wrapper has not been rendered for module : "+f.id);f.itemsWrapper=a})}),f.defaultAPImodOptModel={initial_modOpt_model:{},defaultModOptModel:{},control:{},module:{}},f.defaultModOptModel={},f.modOptConstructor=a.CZRModOpt,f.itemCollection=new a.Value([]),f.defaultAPIitemModel={id:"",initial_item_model:{},defaultItemModel:{},control:{},module:{},is_added_by_user:!1},f.defaultItemModel={id:"",title:""},f.itemConstructor=a.CZRItem,f.czr_Item=new a.Values,f.inputConstructor=a.CZRInput,f.hasModOpt()&&(f.inputModOptConstructor=a.CZRInput),f.inputOptions={},f.isReady.done(function(){f.isDirty=new a.Value(e.dirty||!1),f.initializeModuleModel(e).done(function(a){f.set(a)}).fail(function(b){a.consoleLog("Module : "+f.id+" initialize module model failed : ",b)}).always(function(a){f.callbacks.add(function(){return f.moduleReact.apply(f,arguments)}),f.control.isModuleRegistered(f.id)||f.control.updateModulesCollection({module:e,is_registered:!1}),f.bind("items-collection-populated",function(a){f.itemCollection.callbacks.add(function(){return f.itemCollectionReact.apply(f,arguments)}),f.isMultiItem()&&f._makeItemsSortable()}),f.isInSektion()||f.populateSavedItemCollection(),f.hasModOpt()&&f.instantiateModOpt()})})},ready:function(){var a=this;a.isReady.resolve()},initializeModuleModel:function(a){var d=this,e=b.Deferred();if(!d.isMultiItem()&&!d.isCrud()&&c.isEmpty(a.items)){var f=c.clone(d.defaultItemModel);a.items=[b.extend(f,{id:d.id})]}return e.resolve(a).promise()},itemCollectionReact:function(a,c,d){var e=this,f=e(),g=b.extend(!0,{},f);g.items=a,e.isDirty.set(!0),e.set(g,d||{})},moduleReact:function(a,d,e){var f=this,g=f.control;c.size(d.items)==c.size(a.items)&&!c.isEmpty(c.difference(a.items,d.items)),a.column_id!=d.column_id;g.updateModulesCollection({module:b.extend(!0,{},a),data:e})},getModuleSection:function(){return this.section},isInSektion:function(){var a=this;return c.has(a,"sektion_id")},isMultiItem:function(){return a.CZR_Helpers.isMultiItemModule(null,this)},isCrud:function(){return a.CZR_Helpers.isCrudModule(null,this)},hasModOpt:function(){return a.CZR_Helpers.hasModuleModOpt(null,this)},instantiateModOpt:function(){var a=this,c=a.prepareModOptForAPI(a().modOpt||{});a.czr_ModOpt=new a.modOptConstructor(c),a.czr_ModOpt.ready(),a.czr_ModOpt.callbacks.add(function(c,d,e){var f=a(),g=b.extend(!0,{},f);g.modOpt=c,a.isDirty(!0),a(g,e)})},prepareModOptForAPI:function(a){var b=this,d={};return a=c.isObject(a)?a:{},c.each(b.defaultAPImodOptModel,function(e,f){a[f];switch(f){case"initial_modOpt_model":c.each(b.getDefaultModOptModel(),function(b,d){c.has(a,d)||(a[d]=b)}),d[f]=a;break;case"defaultModOptModel":d[f]=c.clone(b.defaultModOptModel);break;case"control":d[f]=b.control;break;case"module":d[f]=b}}),d},getDefaultModOptModel:function(a){var d=this;return b.extend(c.clone(d.defaultModOptModel),{is_mod_opt:!0})},sendInputToPreview:function(d){var e=this;d=c.extend({input_id:"",input_parent_id:"",to:null,from:null},d),c.isEqual(d.to,d.from)||(a.previewer.send("czr_input",{set_id:a.CZR_Helpers.getControlSettingId(e.control.id),module_id:e.id,module:{items:b.extend(!0,{},e().items),modOpt:e.hasModOpt()?b.extend(!0,{},e().modOpt):{}},input_parent_id:d.input_parent_id,input_id:d.input_id,value:d.to,isPartialRefresh:d.isPartialRefresh}),e.trigger("input_sent",{input:d.to,dom_el:e.container}))},sendModuleInputsToPreview:function(a){var d=this,e=function(){var e=this,f=b.extend(!0,{},e());f=c.omit(f,"id"),c.each(f,function(b,c){d.sendInputToPreview({input_id:c,input_parent_id:e.id,to:b,from:null,isPartialRefresh:a.isPartialRefresh})})};d.czr_Item.each(function(a){e.call(a)}),d.hasModOpt()&&e.call(d.czr_ModOpt)}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(a,b,c){b.extend(CZRModuleMths,{populateSavedItemCollection:function(){var b=this,d=[];return c.isArray(b().items)?(c.each(b().items,function(a,b){c.has(a,"id")&&!c.has(a,"is_mod_opt")&&d.push(a)}),c.each(d,function(c,d){try{b.instantiateItem(c).ready()}catch(e){a.errorLog("populateSavedItemCollection : "+e)}}),c.each(d,function(a){if(c.isUndefined(c.findWhere(b.itemCollection(),a.id)))throw new Error("populateSavedItemCollection : The saved items have not been properly populated in module : "+b.id)}),void b.trigger("items-collection-populated")):void a.errorLog("populateSavedItemCollection : The saved items collection must be an array in module :"+b.id)},instantiateItem:function(a,b){var d=this;if(item_candidate=d.prepareItemForAPI(a),!c.has(item_candidate,"id"))throw new Error("CZRModule::instantiateItem() : an item has no id and could not be added in the collection of : "+this.id);if(d.czr_Item.has(item_candidate.id))throw new Error("CZRModule::instantiateItem() : the following item id "+item_candidate.id+" already exists in module.czr_Item() for module "+this.id);if(d.czr_Item.add(item_candidate.id,new d.itemConstructor(item_candidate.id,item_candidate)),!d.czr_Item.has(item_candidate.id))throw new Error("CZRModule::instantiateItem() : instantiation failed for item id "+item_candidate.id+" for module "+this.id);return d.czr_Item(item_candidate.id)},prepareItemForAPI:function(a){var b=this,d={};return a=c.isObject(a)?a:{},c.each(b.defaultAPIitemModel,function(e,f){var g=a[f];switch(f){case"id":c.isEmpty(g)?d[f]=b.generateItemId(b.module_type):d[f]=g;break;case"initial_item_model":c.each(b.getDefaultItemModel(),function(b,d){c.has(a,d)||(a[d]=b)}),d[f]=a;break;case"defaultItemModel":d[f]=c.clone(b.defaultItemModel);break;case"control":d[f]=b.control;break;case"module":d[f]=b;break;case"is_added_by_user":d[f]=!!c.isBoolean(g)&&g}}),c.has(d,"id")||(d.id=b.generateItemId(b.module_type)),d.initial_item_model.id=d.id,d},generateItemId:function(a,b,d){if(d=d||1,d>100)throw new Error("Infinite loop when generating of a module id.");var e=this;b=b||e._getNextItemKeyInCollection();var f=a+"_"+b;if(!c.has(e,"itemCollection")||!c.isArray(e.itemCollection()))throw new Error("The item collection does not exist or is not properly set in module : "+e.id);return e.isItemRegistered(f)?(b++,d++,e.generateItemId(a,b,d)):f},_getNextItemKeyInCollection:function(){var a=this,b={},d=0;return c.isEmpty(a.itemCollection())?d:(b=c.isArray(a.itemCollection())&&1===c.size(a.itemCollection())?a.itemCollection()[0]:c.max(a.itemCollection(),function(a){return c.isNumber(a.id.replace(/[^\/\d]/g,""))?parseInt(a.id.replace(/[^\/\d]/g,""),10):0}),!c.isUndefined(b)&&c.isNumber(b.id.replace(/[^\/\d]/g,""))&&(d=parseInt(b.id.replace(/[^\/\d]/g,""),10)+1),d)},isItemRegistered:function(a){var b=this;return!c.isUndefined(c.findWhere(b.itemCollection(),{id:a}))},updateItemsCollection:function(a){var d=this,e=d.itemCollection(),f=c.clone(e),g=b.Deferred();if(c.has(a,"collection"))return void d.itemCollection.set(a.collection);if(!c.has(a,"item"))throw new Error("updateItemsCollection, no item provided "+d.control.id+". Aborting");a=c.extend({data:{}},a);var h=c.clone(a.item);return c.findWhere(f,{id:h.id})?c.each(e,function(a,b){a.id==h.id&&(f[b]=h)}):f.push(h),d.itemCollection.set(f,a.data),g.resolve({collection:f,data:a.data}).promise()},_getSortedDOMItemCollection:function(){var a=this,d=c.clone(a.itemCollection()),e=[],f=b.Deferred();if(b("."+a.control.css_attr.single_item,a.container).each(function(a){var f=c.findWhere(d,{id:b(this).attr("data-id")});f&&(e[a]=f)}),d.length!=e.length)throw new Error("There was a problem when re-building the item collection from the DOM in module : "+a.id);return f.resolve(e).promise()},refreshItemCollection:function(){var c=this;c.czr_Item.each(function(a){b.when(c.czr_Item(a.id).container.remove()).done(function(){c.czr_Item.remove(a.id)})}),c.itemCollection=new a.Value([]),c.populateSavedItemCollection()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(a,b,c){b.extend(CZRModuleMths,{getDefaultItemModel:function(a){var d=this;return b.extend(c.clone(d.defaultItemModel),{id:a||""})},
15
- //!!recursive
16
- _initNewItem:function(a,d){var e,f=this,g={id:""};return d="undefined"!=typeof d?d:c.size(f.itemCollection()),c.isNumber(d)?e=f.module_type+"_"+d:(e=d,d=0),g=a&&!c.isEmpty(a)?b.extend(a,{id:e}):this.getDefaultItemModel(e),c.has(g,"id")&&f._isItemIdPossible(e)?(c.map(f.getDefaultItemModel(),function(a,b){c.has(g,b)||(g[b]=a)}),g):f._initNewItem(g,d+1)}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(a,b,c){b.extend(CZRModuleMths,{renderModuleParts:function(){var a=this,c=a.isInSektion()?b(a.container).find(".czr-mod-content"):b(a.container);if(a.isCrud()){if(0===b("#tmpl-"+a.crudModulePart).length)throw new Error("No crud Module Part template for module "+a.id+". The template script id should be : #tmpl-"+a.crudModulePart);c.append(b(wp.template(a.crudModulePart)({})))}var d=b("<ul/>",{"class":[a.control.css_attr.items_wrapper,a.module_type,a.isMultiItem()?"multi-item-mod":"mono-item-mod",a.isCrud()?"crud-mod":"not-crud-mod"].join(" ")});return c.append(d),b(d,c)},getTemplateEl:function(a,b){var d,e=this;switch(a){case"rudItemPart":d=e.rudItemPart;break;case"ruItemPart":d=e.ruItemPart;break;case"modOptInputList":d=e.modOptInputList;break;case"itemInputList":d=e.itemInputList}if(c.isEmpty(d))throw new Error("No valid template has been found in getTemplateEl() "+e.id+". Aborting");return d},getViewEl:function(a){var c=this;return b('[data-id = "'+a+'"]',c.container)},closeAllItems:function(a){var b=this,d=c.clone(b.itemCollection()),e=c.filter(d,function(b){return b.id!=a});return c.each(e,function(a){b.czr_Item.has(a.id)&&"expanded"==b.czr_Item(a.id)._getViewState(a.id)&&b.czr_Item(a.id).viewState.set("closed")}),this},_adjustScrollExpandedBlock:function(a,d){if(a.length&&!c.isUndefined(this.getModuleSection())){var e,f=this,g=b(".accordion-section-content",f.section.container),h=g.scrollTop(),i=d||90;setTimeout(function(){a.offset().top+a.height()+i>b(window.top).height()&&(e=a.offset().top+a.height()+i-b(window.top).height(),e>0&&g.animate({scrollTop:h+e},500))},50)}},closeRemoveDialogs:function(){var a=this;if(c.isArray(a.itemCollection()))return a.czr_Item.each(function(a){a.removeDialogVisible(!1)}),this},_makeItemsSortable:function(d){if(!wp.media.isTouchDevice&&b.fn.sortable){var e=this;b("."+e.control.css_attr.items_wrapper,e.container).sortable({handle:"."+e.control.css_attr.item_sort_handle,start:function(){c.has(a,"czrModulePanelState")&&a.czrModulePanelState.set(!1),c.has(a,"czrSekSettingsPanelState")&&a.czrSekSettingsPanelState.set(!1)},update:function(b,d){var f=function(){c.has(e,"preItem")&&e.preItemExpanded.set(!1),e.closeAllItems().closeRemoveDialogs();var b=function(){a.previewer.refresh()};"postMessage"!=a(e.control.id).transport||a.CZR_Helpers.hasPartRefresh(e.control.id)||(b=c.debounce(b,500))(),e.trigger("item-collection-sorted")};e._getSortedDOMItemCollection().done(function(a){e.itemCollection.set(a)}).then(function(){f()})}})}},toggleTabVisibility:function(a){var c=this,d=(b(c.container).find("li"),b(c.container).find("section"),b(a.dom_event.currentTarget,a.dom_el).attr("data-tab-id"));b(".tabs nav li",c.container).each(function(){b(this).removeClass("tab-current").addClass("tab-inactive")}),b(c.container).find('li[data-tab-id="'+d+'"]').addClass("tab-current").removeClass("tab-inactive"),b("section",c.container).each(function(){b(this).removeClass("content-current")}),b(c.container).find('section[id="'+d+'"]').addClass("content-current")},setupTabNav:function(){var a=this,c=function(){var c=b.Deferred(),d=b(".tabs nav li",a.container);d.each(function(){b(this).removeClass("tab-current").addClass("tab-inactive")}),d.first().addClass("tab-current").removeClass("tab-inactive"),b("section",a.container).first().addClass("content-current");var e=d.length;return d.each(function(){b(this).addClass(e>0?"cols-"+e:"")}),c.resolve().promise()};setTimeout(function(){c().done(function(){b(".tabs",a.container).fadeIn(450)})},20)}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(a,b,c){b.extend(CZRDynModuleMths,{initialize:function(c,d){var e=this;a.CZRModule.prototype.initialize.call(e,c,d),b.extend(e,{itemPreAddEl:""}),e.preItemsWrapper="",e.itemAddedMessage=serverControlParams.i18n.successMessage,e.userEventMap=new a.Value([{trigger:"click keydown",selector:["."+e.control.css_attr.open_pre_add_btn,"."+e.control.css_attr.cancel_pre_add_btn].join(","),name:"pre_add_item",actions:["closeAllItems","closeRemoveDialogs","renderPreItemView","setPreItemViewVisibility"]},{trigger:"click keydown",selector:"."+e.control.css_attr.add_new_btn,name:"add_item",actions:["closeRemoveDialogs","closeAllItems","addItem"]}])},ready:function(){var c=this;c.setupDOMListeners(c.userEventMap(),{dom_el:c.container}),c.preItem=new a.Value(c.getDefaultItemModel()),c.preItemEmbedded=b.Deferred(),c.preItemEmbedded.done(function(a){c.preItemsWrapper=a,c.setupPreItemInputCollection()}),c.preItemExpanded=new a.Value((!1)),c.preItemExpanded.callbacks.add(function(a,b){c._togglePreItemViewExpansion(a)}),a.CZRModule.prototype.ready.call(c)},setupPreItemInputCollection:function(){var c=this;c.preItem.czr_Input=new a.Values,b("."+c.control.css_attr.pre_add_wrapper,c.container).find("."+c.control.css_attr.sub_set_wrapper).each(function(a){var d=b(this).find("[data-type]").attr("data-type")||"sub_set_"+a;c.preItem.czr_Input.add(d,new c.inputConstructor(d,{id:d,type:b(this).attr("data-input-type"),container:b(this),input_parent:c.preItem,module:c,is_preItemInput:!0})),c.preItem.czr_Input(d).ready()})},addItem:function(d){var e=this,f=e.preItem(),g=function(){e.preItemExpanded.set(!1),e._resetPreItemInputs()},h=b.Deferred();return c.isEmpty(f)||!c.isObject(f)?(a.errorLog("addItem : an item should be an object and not empty. In : "+e.id+". Aborted."),h.resolve().promise()):(g=c.debounce(g,200),e.instantiateItem(f,!0).ready(),function(){return b.Deferred(function(){var b=this;e.czr_Item(f.id).isReady.then(function(){g(),e.trigger("item-added",f),"postMessage"!=a(e.control.id).transport||!c.has(d,"dom_event")||c.has(d.dom_event,"isTrigger")||a.CZR_Helpers.hasPartRefresh(e.control.id)?b.resolve():a.previewer.refresh().done(function(){b.resolve()})})}).promise()}().done(function(){e.czr_Item(f.id).viewState("expanded")}).always(function(){h.resolve()}),h.promise())},_resetPreItemInputs:function(){var a=this;a.preItem.set(a.getDefaultItemModel()),a.preItem.czr_Input.each(function(b){var d=b.id;c.has(a.getDefaultItemModel(),d)&&b.set(a.getDefaultItemModel()._input_id)})}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(a,b,c){b.extend(CZRDynModuleMths,{renderPreItemView:function(a){var d=this;if("pending"==d.preItemEmbedded.state()){if(!c.has(d,"itemPreAddEl")||0===b("#tmpl-"+d.itemPreAddEl).length)return this;var e=wp.template(d.itemPreAddEl);if(!e||!d.container)return this;var f=b("."+d.control.css_attr.pre_add_item_content,d.container);f.prepend(e()),d.preItemEmbedded.resolve(f)}},_getPreItemView:function(){var a=this;return b("."+a.control.css_attr.pre_add_item_content,a.container)},setPreItemViewVisibility:function(a){var b=this;b.preItemExpanded.set(!b.preItemExpanded())},_togglePreItemViewExpansion:function(a){var c=this,d=b("."+c.control.css_attr.pre_add_item_content,c.container);d.slideToggle({duration:200,done:function(){var d=b("."+c.control.css_attr.open_pre_add_btn,c.container);b(this).toggleClass("open",a),a?d.find(".fa").removeClass("fa-plus-square").addClass("fa-minus-square"):d.find(".fa").removeClass("fa-minus-square").addClass("fa-plus-square"),d.toggleClass("active",a),b(c.container).toggleClass(c.control.css_attr.adding_new,a),c._adjustScrollExpandedBlock(b(this),120)}})},toggleSuccessMessage:function(a){var c=this,d=c.itemAddedMessage,e=b("."+c.control.css_attr.pre_add_wrapper,c.container);return $_success_wrapper=b("."+c.control.css_attr.pre_add_success,c.container),"on"==a?($_success_wrapper.find("p").text(d),$_success_wrapper.css("z-index",1000001).css("height",e.height()+"px").css("line-height",e.height()+"px")):$_success_wrapper.attr("style",""),c.container.toggleClass("czr-model-added","on"==a),this}})}(wp.customize,jQuery,_);var CZRBaseControlMths=CZRBaseControlMths||{};!function(a,b,c){b.extend(CZRBaseControlMths,{initialize:function(b,d){var e=this;e.css_attr=c.has(serverControlParams,"css_attr")?serverControlParams.css_attr:{},a.Control.prototype.initialize.call(e,b,d),e.bind("czr-partial-refresh-done",function(){c.has(e,"czr_moduleCollection")&&c.each(e.czr_moduleCollection(),function(a){e.czr_Module(a.id)&&e.czr_Module(a.id).sendModuleInputsToPreview({isPartialRefresh:!0})})})},refreshPreview:function(a){this.previewer.refresh()}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(a,b,c){b.extend(CZRBaseModuleControlMths,{initialize:function(d,e){var f=this;f.czr_Module=new a.Values,f.czr_moduleCollection=new a.Value,f.czr_moduleCollection.set([]),f.moduleCollectionReady=b.Deferred(),f.moduleCollectionReady.done(function(a){!f.isMultiModuleControl(e),f.czr_moduleCollection.callbacks.add(function(){return f.moduleCollectionReact.apply(f,arguments)})}),f.isMultiModuleControl(e)&&(f.syncSektionModule=new a.Value),a.CZRBaseControl.prototype.initialize.call(f,d,e),a.section(f.section()).expanded.bind(function(a){f.czr_Module.each(function(a){a.closeAllItems().closeRemoveDialogs(),c.has(a,"preItem")&&a.preItemExpanded(!1)})})},ready:function(){var b=this;if(b.isMultiModuleControl())b.syncSektionModule.bind(function(a,c){"resolved"!=b.moduleCollectionReady.state()&&(b.registerModulesOnInit(a),b.moduleCollectionReady.resolve())});else{var d={};c.each(b.getSavedModules(),function(c,e){d=c;try{b.instantiateModule(c,{})}catch(f){return void a.errorLog("Failed to instantiate module "+c.id+" "+f)}b.container.attr("data-module",c.id)}),b.moduleCollectionReady.resolve(d)}b.bind("user-module-candidate",function(c){var d;try{d=b.instantiateModule(c,{})}catch(e){return void a.errorLog("Failed to instantiate module "+c.id+" "+e)}d.ready(c.is_added_by_user)})},getDefaultModuleApiModel:function(){var a={id:"",module_type:"",modOpt:{},items:[],crud:!1,multi_item:!1,sortable:!1,control:{}};return this.isMultiModuleControl()?b.extend(a,{column_id:"",sektion:{},sektion_id:"",is_added_by_user:!1,dirty:!1}):b.extend(a,{section:""})},getDefaultModuleDBModel:function(){var a={items:[]};return this.isMultiModuleControl()?b.extend(a,{id:"",module_type:"",column_id:"",sektion_id:"",dirty:!1}):a},isMultiModuleControl:function(a){var b,d=this;return b=c.isUndefined(a)?c.has(d,"params")?d.params.type:d.type:c.has(a,"params")?a.params.type:a.type,"czr_multi_module"==b},getSyncCollectionControl:function(){var b=this;if(c.isUndefined(b.params.syncCollection))throw new Error("Control "+b.id+" has no synchronized sektion control defined.");return a.control(a.CZR_Helpers.build_setId(b.params.syncCollection))},getSavedModules:function(){var d=this,e=[],f=d.params.module_type,g=[],h=[],i={};return d.isMultiModuleControl()?e=b.extend(!0,[],a(d.id)()):(!a.CZR_Helpers.isMultiItemModule(f)||c.isEmpty(a(d.id)())||c.isObject(a(d.id)())||a.consoleLog("Module Control Init for "+d.id+" : a mono item module control value should be an object if not empty."),g=c.isArray(a(d.id)())?a(d.id)():[a(d.id)()],c.each(g,function(b,e){a.CZR_Helpers.hasModuleModOpt(f)&&0===e&&(c.has(b,"id")?a.consoleLog("getSavedModules : the module "+f+" in control "+d.id+" has no mod_opt defined while it should."):i=b),c.has(b,"id")&&!c.has(b,"is_mod_opt")&&h.push(b)}),e.push({id:a.CZR_Helpers.getOptionName(d.id)+"_"+d.params.type,module_type:d.params.module_type,section:d.section(),modOpt:b.extend(!0,{},i),items:b.extend(!0,[],h)})),e},isModuleRegistered:function(a){var b=this;return!c.isUndefined(c.findWhere(b.czr_moduleCollection(),{id:a}))}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(a,b,c){b.extend(CZRBaseModuleControlMths,{instantiateModule:function(a,b){if(!c.has(a,"id"))throw new Error("CZRModule::instantiateModule() : a module has no id and could not be added in the collection of : "+this.id+". Aborted.");var d=this;if((c.isUndefined(b)||c.isEmpty(b))&&(b=d.getModuleConstructor(a)),!c.isEmpty(a.id)&&d.czr_Module.has(a.id))throw new Error("The module id already exists in the collection in control : "+d.id);var e=d.prepareModuleForAPI(a);if(d.czr_Module.add(e.id,new b(e.id,e)),!d.czr_Module.has(e.id))throw new Error("instantiateModule() : instantiation failed for module id "+e.id+" in control "+d.id);return d.czr_Module(e.id)},getModuleConstructor:function(b){var d=this,e={},f={};if(!c.has(b,"module_type"))throw new Error("CZRModule::getModuleConstructor : no module type found for module "+b.id);if(!c.has(a.czrModuleMap,b.module_type))throw new Error("Module type "+b.module_type+" is not listed in the module map api.czrModuleMap.");var g=a.czrModuleMap[b.module_type].mthds,h=a.czrModuleMap[b.module_type].crud,i=h?a.CZRDynModule:a.CZRModule;if(c.isEmpty(b.sektion_id)?f=i.extend(g):(e=i.extend(g),f=e.extend(d.getMultiModuleExtender(e))),c.isUndefined(f)||c.isEmpty(f)||!f)throw new Error("CZRModule::getModuleConstructor : no constructor found for module type : "+b.module_type+".");return f},prepareModuleForAPI:function(b){if(!c.isObject(b))throw new Error("prepareModuleForAPI : a module must be an object to be instantiated.");var d=this,e={};return c.each(d.getDefaultModuleApiModel(),function(f,g){var h=b[g];switch(g){case"id":c.isEmpty(h)?e[g]=d.generateModuleId(b.module_type):e[g]=h;break;case"module_type":if(!c.isString(h)||c.isEmpty(h))throw new Error("prepareModuleForAPI : a module type must a string not empty");e[g]=h;break;case"items":if(!c.isArray(h))throw new Error("prepareModuleForAPI : a module item list must be an array");e[g]=h;break;case"modOpt":if(!c.isObject(h))throw new Error("prepareModuleForAPI : a module modOpt property must be an object");e[g]=h;break;case"crud":if(c.has(a.czrModuleMap,b.module_type))h=a.czrModuleMap[b.module_type].crud;else if(!c.isUndefined(h)&&!c.isBoolean(h))throw new Error('prepareModuleForAPI : the module param "crud" must be a boolean');e[g]=h||!1;break;case"multi_item":if(c.has(a.czrModuleMap,b.module_type))h=a.czrModuleMap[b.module_type].crud||a.czrModuleMap[b.module_type].multi_item;else if(!c.isUndefined(h)&&!c.isBoolean(h))throw new Error('prepareModuleForAPI : the module param "multi_item" must be a boolean');e[g]=h||!1;break;case"sortable":if(c.has(a.czrModuleMap,b.module_type))h=a.czrModuleMap[b.module_type].sortable||a.czrModuleMap[b.module_type].crud||a.czrModuleMap[b.module_type].multi_item;else if(!c.isUndefined(h)&&!c.isBoolean(h))throw new Error('prepareModuleForAPI : the module param "sortable" must be a boolean');e[g]=h||!1;break;case"control":e[g]=d;break;case"section":if(!c.isString(h)||c.isEmpty(h))throw new Error("prepareModuleForAPI : a module section must be a string not empty");e[g]=h;break;case"column_id":if(!c.isString(h)||c.isEmpty(h))throw new Error("prepareModuleForAPI : a module column id must a string not empty");e[g]=h;break;case"sektion":if(!c.isObject(h)||c.isEmpty(h))throw new Error("prepareModuleForAPI : a module sektion must be an object not empty");e[g]=h;break;case"sektion_id":if(!c.isString(h)||c.isEmpty(h))throw new Error("prepareModuleForAPI : a module sektion id must be a string not empty");e[g]=h;break;case"is_added_by_user":if(!c.isUndefined(h)&&!c.isBoolean(h))throw new Error('prepareModuleForAPI : the module param "is_added_by_user" must be a boolean');e[g]=h||!1;break;case"dirty":e[g]=h||!1}}),e},generateModuleId:function(a,b,d){if(d=d||1,d>100)throw new Error("Infinite loop when generating of a module id.");var e=this;b=b||e._getNextModuleKeyInCollection();var f=a+"_"+b;if(!c.has(e,"czr_moduleCollection")||!c.isArray(e.czr_moduleCollection()))throw new Error("The module collection does not exist or is not properly set in control : "+e.id);return e.isModuleRegistered(f)?(b++,d++,e.generateModuleId(a,b,d)):f},_getNextModuleKeyInCollection:function(){var a=this,b={},d=0;return c.isEmpty(a.czr_moduleCollection())||(b=c.max(a.czr_moduleCollection(),function(a){return parseInt(a.id.replace(/[^\/\d]/g,""),10)}),d=parseInt(b.id.replace(/[^\/\d]/g,""),10)+1),d}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(a,b,c){b.extend(CZRBaseModuleControlMths,{registerModulesOnInit:function(d){var e=this,f=[];c.each(e.getSavedModules(),function(g,h){if(!d.czr_Item.has(g.sektion_id))return a.errorLog("Warning Module "+g.id+" is orphan : it has no sektion to be embedded to. It Must be removed."),void f.push(g);var i=d.czr_Item(g.sektion_id);if(c.isUndefined(i))throw new Error("sektion instance missing. Impossible to instantiate module : "+g.id);b.extend(g,{sektion:i}),e.updateModulesCollection({module:g})}),e.moduleCollectionReady.then(function(){c.isEmpty(f)||e.moduleCollectionReact(e.czr_moduleCollection(),[],{orphans_module_removal:f})})},updateModulesCollection:function(a){var d=this,e=d.czr_moduleCollection(),f=b.extend(!0,[],e);if(c.has(a,"collection"))return void d.czr_moduleCollection.set(a.collection,a.data||{});if(!c.has(a,"module"))throw new Error("updateModulesCollection, no module provided "+d.id+". Aborting");var g=d.prepareModuleForAPI(c.clone(a.module));c.findWhere(f,{id:g.id})?c.each(e,function(a,b){a.id==g.id&&(f[b]=g)}):f.push(g);var h={};c.has(a,"data")&&(h=b.extend(!0,{},a.data),b.extend(h,{module:g})),d.czr_moduleCollection.set(f,h)},moduleCollectionReact:function(d,e,f){var g=this,h=c.size(d)>c.size(e),i=c.size(e)>c.size(d);c.size(e)==c.size(d);if(is_collection_sorted=!1,i){var j=c.filter(e,function(a){return c.isUndefined(c.findWhere(d,{id:a.id}))});j=j[0],g.czr_Module.remove(j.id)}c.isObject(f)&&c.has(f,"module")&&(f.module_id=f.module.id,f.module=g.prepareModuleForDB(b.extend(!0,{},f.module))),!g.isMultiModuleControl()&&h||a(this.id).set(g.filterModuleCollectionBeforeAjax(d),f)},filterModuleCollectionBeforeAjax:function(a){var d,e=this,f=b.extend(!0,[],a);if(c.each(a,function(a,c){var d=b.extend(!0,{},a);f[c]=e.prepareModuleForDB(d)}),e.isMultiModuleControl())return f;if(c.size(a)>1)throw new Error("There should not be several modules in the collection of control : "+e.id);if(!c.isArray(a)||c.isEmpty(a)||!c.has(a[0],"items"))throw new Error("The setting value could not be populated in control : "+e.id);var g=a[0].id;if(!e.czr_Module.has(g))throw new Error("The single module control ("+e.id+") has no module registered with the id "+g);var h=e.czr_Module(g);if(!c.isArray(h().items))throw new Error("The module "+g+" should be an array in control : "+e.id);return d=h.isMultiItem()?h().items:h().items[0]||[],h.hasModOpt()?c.union([h().modOpt],d):d},prepareModuleForDB:function(a){if(!c.isObject(a))throw new Error("MultiModule Control::prepareModuleForDB : a module must be an object. Aborting.");var b=this,d={};return c.each(b.getDefaultModuleDBModel(),function(e,f){if(!c.has(a,f))throw new Error("MultiModule Control::prepareModuleForDB : a module is missing the property : "+f+" . Aborting.");var g=a[f];switch(f){case"items":if(!c.isArray(g))throw new Error("prepareModuleForDB : a module item list must be an array");d[f]=g;break;case"id":if(!c.isString(g)||c.isEmpty(g))throw new Error("prepareModuleForDB : a module id must a string not empty");d[f]=g;break;case"module_type":if(!c.isString(g)||c.isEmpty(g))throw new Error("prepareModuleForDB : a module type must a string not empty");d[f]=g;break;case"column_id":if(!c.isString(g)||c.isEmpty(g))throw new Error("prepareModuleForDB : a module column id must a string not empty");d[f]=g;break;case"sektion_id":if(!c.isObject(a.sektion)||!c.has(a.sektion,"id"))throw new Error("prepareModuleForDB : a module sektion must be an object with an id.");d[f]=a.sektion.id;break;case"dirty":if(b.czr_Module.has(a.id)?d[f]=b.czr_Module(a.id).isDirty():d[f]=g,!c.isBoolean(d[f]))throw new Error("prepareModuleForDB : a module dirty state must be a boolean.")}}),d}})}(wp.customize,jQuery,_);var CZRMultiModuleControlMths=CZRMultiModuleControlMths||{};!function(a,b,c){b.extend(CZRMultiModuleControlMths,{initialize:function(b,c){var d=this;a.consoleLog("IN MULTI MODULE INITIALIZE ? ",c),a(b).callbacks.add(function(){return d.syncColumn.apply(d,arguments)}),a.CZRBaseModuleControl.prototype.initialize.call(d,b,c)},ready:function(){var b=this;a.consoleLog("MODULE-COLLECTION CONTROL READY",this.id),a.CZRBaseModuleControl.prototype.ready.apply(b,arguments)},syncColumn:function(d,e,f){if(a.consoleLog("IN SYNC COLUMN",d,e,f),(c.isUndefined(f)||!f.silent)&&(a.consoleLog("IN SYNXXX",a.control("hu_theme_options[module-collection]").syncSektionModule()(),this.syncSektionModule()(),this.id),!c.has(f,"orphans_module_removal"))){var g=a.control(this.id),h=c.filter(d,function(a,b){return!c.findWhere(e,{id:a.id})});c.isEmpty(h)||(a.consoleLog("ADDED MODULE?",h),c.each(h,function(a){g.syncSektionModule().czr_Column(a.column_id).updateColumnModuleCollection({module:a})}));var i=c.filter(e,function(a,b){return!c.findWhere(d,{id:a.id})});c.isEmpty(i)||c.each(i,function(a){g.syncSektionModule().czr_Column(a.column_id).removeModuleFromColumnCollection(a)}),c.size(e)==c.size(d)&&c.has(f,"module")&&c.has(f,"source_column")&&c.has(f,"target_column")&&b.when(g.syncSektionModule().moveModuleFromTo(f.module,f.source_column,f.target_column)).done(function(){g.syncSektionModule().control.trigger("module-moved",{module:f.module,source_column:f.source_column,target_column:f.target_column})}),g.trigger("columns-synchronized",d)}},removeModule:function(a){var b=this;b.czr_Module.has(a.id)&&"resolved"==b.czr_Module(a.id).embedded.state()&&b.czr_Module(a.id).container.remove(),b.removeModuleFromCollection(a)},removeModuleFromCollection:function(a){var d=this,e=d.czr_moduleCollection(),f=b.extend(!0,[],e);f=c.filter(f,function(b){return b.id!=a.id}),d.czr_moduleCollection.set(f)}})}(wp.customize,jQuery,_);var CZRMultiModuleControlMths=CZRMultiModuleControlMths||{};!function(a,b,c){b.extend(CZRMultiModuleControlMths,{getMultiModuleExtender:function(d){var e=this;return b.extend(e.CZRModuleExtended,{initialize:function(c,e){var f=this;d.prototype.initialize.call(f,c,e),a.consoleLog("MODULE INSTANTIATED : ",f.id),b.extend(f,{singleModuleWrapper:"czr-single-module-wrapper",sektionModuleTitle:"czr-module-sektion-title-part",ruModuleEl:"czr-ru-module-sektion-content"}),f.czr_ModuleState=new a.Value((!1)),f.isReady.done(function(){f.setupModuleView()}),f.moduleTitleEmbedded=b.Deferred(),f.modColumn=new a.Value,f.modColumn.set(e.column_id),f.modColumn.bind(function(c,d){a.consoleLog("MODULE "+f.id+" HAS BEEN MOVED TO COLUMN",c,f());var e=f(),g=b.extend(!0,{},e);g.column_id=c,f.set(g,{target_column:c,source_column:d})})},ready:function(e){var f=this;a.consoleLog("MODULE READY IN EXTENDED MODULE CLASS : ",f.id),b.when(f.renderModuleWrapper(e)).done(function(a){if(c.isUndefined(a)||!1===a.length)throw new Error("Module container has not been embedded for module :"+f.id);f.container=a,f.embedded.resolve()}),d.prototype.ready.call(f)}}),e.CZRModuleExtended},CZRModuleExtended:{renderModuleWrapper:function(a){var c=this;if("resolved"==c.embedded.state())return c.container;if(0===b("#tmpl-"+c.singleModuleWrapper).length)throw new Error("No template for module "+c.id+". The template script id should be : #tmpl-"+c.singleModuleWrapper);var d=wp.template(c.singleModuleWrapper),e={id:c.id,type:c.module_type},f=b(d(e));return a?b.when(b(".czr-module-collection-wrapper",c._getColumn().container).find(".czr-module-candidate").after(f)).done(function(){b(".czr-module-collection-wrapper",c._getColumn().container).find(".czr-module-candidate").remove()}):b(".czr-module-collection-wrapper",c._getColumn().container).append(f),f},setupModuleView:function(){var b=this;b.view_event_map=[{trigger:"click keydown",selector:[".czr-remove-mod","."+b.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:["toggleModuleRemoveAlert"]},{trigger:"click keydown",selector:"."+b.control.css_attr.remove_view_btn,name:"remove_module",actions:["removeModule"]},{trigger:"click keydown",selector:".czr-edit-mod",name:"edit_module",actions:["setModuleViewVisibility","sendEditModule"]},{trigger:"click keydown",selector:".czr-module-back",name:"back_to_column",actions:["setModuleViewVisibility"]},{trigger:"mouseenter",selector:".czr-mod-header",name:"hovering_module",actions:function(c){a.previewer.send("start_hovering_module",{id:b.id})}},{trigger:"mouseleave",selector:".czr-mod-header",name:"hovering_module",actions:function(c){a.previewer.send("stop_hovering_module",{id:b.id})}}],b.embedded.done(function(){b.czr_ModuleState.callbacks.add(function(){return b.setupModuleViewStateListeners.apply(b,arguments)}),a.CZR_Helpers.setupDOMListeners(b.view_event_map,{module:{id:b.id},dom_el:b.container},b)})},setModuleViewVisibility:function(c,d){var e=this;e.czr_ModuleState(!e.czr_ModuleState()),a.czrModulePanelState.set(!1),a.czrSekSettingsPanelState.set(!1),e.control.syncSektionModule().closeAllOtherSektions(b(c.dom_event.currentTarget,c.dom_el))},sendEditModule:function(b){var c=this;a.previewer.send("edit_module",{id:c.id})},setupModuleViewStateListeners:function(c){var d=this;a.czr_isModuleExpanded=a.czr_isModuleExpanded||new a.Value,c?a.czr_isModuleExpanded(d):a.czr_isModuleExpanded(!1),b.when(d.toggleModuleViewExpansion(c)).done(function(){c?(d.renderModuleTitle(),d.populateSavedItemCollection()):d.czr_Item.each(function(a){a.viewState.set("closed"),a._destroyView(0),d.czr_Item.remove(a.id)})})},renderModuleTitle:function(){var a=this;if("resolved"!=a.moduleTitleEmbedded.state()){if(0===b("#tmpl-"+a.sektionModuleTitle).length)throw new Error("No sektion title Module Part template for module "+a.id+". The template script id should be : #tmpl-"+a.sektionModuleTitle);b.when(b(a.container).find(".czr-mod-content").prepend(b(wp.template(a.sektionModuleTitle)({id:a.id})))).done(function(){a.moduleTitleEmbedded.resolve()})}},toggleModuleViewExpansion:function(a,c){var d=this;b(".czr-mod-content",d.container).slideToggle({duration:c||200,done:function(){var b=d.container.closest(".wp-full-overlay"),c=d.container.find(".czr-module-back"),e=d.container.find(".czr-module-title");d.container.toggleClass("open",a),b.toggleClass("czr-module-open",a),e.attr("tabindex",a?"-1":"0"),c.attr("tabindex",a?"0":"-1"),a?c.focus():e.focus(),a&&d._adjustScrollExpandedBlock(d.container)}})},toggleModuleRemoveAlert:function(a){var d=this,e=this.control,f=b("."+d.control.css_attr.remove_alert_wrapper,d.container).first(),g=(a.dom_event,e.syncSektionModule().czr_Column(d.column_id).container);if(c.has(d,"preItem")&&e.syncSektionModule().preItemExpanded.set(!1),b("."+d.control.css_attr.remove_alert_wrapper,g).not(f).each(function(){b(this).hasClass("open")&&b(this).slideToggle({duration:200,done:function(){b(this).toggleClass("open",!1),b(this).siblings().find("."+d.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),!wp.template(d.AlertPart)||!d.container)throw new Error("No removal alert template available for module :"+d.id);f.html(wp.template(d.AlertPart)({title:d().title||d.id})),f.slideToggle({duration:200,done:function(){var c=!b(this).hasClass("open")&&b(this).is(":visible");b(this).toggleClass("open",c),b(a.dom_el).find("."+d.control.css_attr.display_alert_btn).toggleClass("active",c),c&&d._adjustScrollExpandedBlock(d.container)}})},removeModule:function(a){this.control.removeModule(a.module)},_getColumn:function(){var a=this;return a.control.syncSektionModule().czr_Column(a.modColumn())},_getSektion:function(){}}})}(wp.customize,jQuery,_),function(a,b,c){b.extend(CZRBaseControlMths,a.Events),b.extend(a.Control.prototype,a.Events),b.extend(CZRModuleMths,a.Events),b.extend(CZRItemMths,a.Events),b.extend(CZRModOptMths,a.Events),b.extend(CZRBaseControlMths,a.CZR_Helpers),b.extend(CZRInputMths,a.CZR_Helpers),b.extend(CZRModuleMths,a.CZR_Helpers),a.CZRInput=a.Value.extend(CZRInputMths),a.czrInputMap=a.czrInputMap||{},b.extend(a.czrInputMap,{text:"",textarea:"",check:"setupIcheck",select:"setupSelect",number:"setupStepper",upload:"setupImageUploader",color:"setupColorPicker",content_picker:"setupContentPicker",text_editor:"setupTextEditor",password:"",range_slider:"setupRangeSlider"}),a.CZRItem=a.Value.extend(CZRItemMths),a.CZRModOpt=a.Value.extend(CZRModOptMths),a.CZRModule=a.Value.extend(CZRModuleMths),a.CZRDynModule=a.CZRModule.extend(CZRDynModuleMths),c.isUndefined(window.CZRColumnMths)||(a.CZRColumn=a.Value.extend(CZRColumnMths)),a.CZRBaseControl=a.Control.extend(CZRBaseControlMths),a.CZRBaseModuleControl=a.CZRBaseControl.extend(CZRBaseModuleControlMths),a.CZRMultiModuleControl=a.CZRBaseModuleControl.extend(CZRMultiModuleControlMths),b.extend(a.controlConstructor,{czr_module:a.CZRBaseModuleControl,czr_multi_module:a.CZRMultiModuleControl})}(wp.customize,jQuery,_),function(a,b,c){a.bind("ready",function(){if(serverControlParams.isSkopOn){var d=a.previewer.query;a.previewer.query=function(e){if(!serverControlParams.isSkopOn)return d.apply(this);if(!c.has(a,"czr_skope"))return a.consoleLog("QUERY : SKOPE IS NOT FULLY READY YEY. FALLING BACK ON CORE QUERY"),d.apply(this);if("pending"==a.czr_initialSkopeCollectionPopulated.state())return a.consoleLog("QUERY : INITIAL SKOPE COLLECTION NOT POPULATED YET. FALLING BACK ON CORE QUERY"),d.apply(this);if("pending"==a.czr_isPreviewerSkopeAware.state()&&a.czr_isPreviewerSkopeAware.resolve(),!c.isObject(e)&&"resolved"==a.czr_initialSkopeCollectionPopulated.state()&&"resolved"==a.czr_initialSkopeCollectionPopulated.state())return d.apply(this);!c.isUndefined(e.skope_id)&&c.isString(e.skope_id)||(e.skope_id=a.czr_activeSkopeId()||a.czr_skopeBase.getGlobalSkopeId());var f,g={},h={},i={skope_id:null,action:null,the_dirties:{},dyn_type:null,opt_name:null};if(e=b.extend(i,e),!c.isObject(e.the_dirties))throw a.consoleLog("QUERY PARAMS : ",e),new Error("QUERY DIRTIES MUST BE AN OBJECT. Requested action : "+e.action);if("pending"!=a.czr_isPreviewerSkopeAware.state()&&c.isNull(e.skope_id))throw a.consoleLog("QUERY PARAMS : ",e),new Error("OVERRIDEN QUERY : NO SKOPE ID. FALLING BACK ON CORE QUERY. Requested action : "+e.action);if(!c.contains([null,"refresh","save","reset","changeset_update"],e.action))throw a.consoleLog("QUERY PARAMS : ",e),new Error("A REQUESTED QUERY HAS NO AUTHORIZED ACTION. Requested action : "+e.action);var j=function(){if("pending"==a.czr_initialSkopeCollectionPopulated.state())return{};var b={};return c.each(a.czr_currentSkopesCollection(),function(c){"global"!=c.skope&&(b[c.id]=a.czr_skopeBase.getSkopeDirties(c.id))}),b};switch(c.isNull(e.the_dirties)||c.isEmpty(e.the_dirties)?(g=a.dirtyValues({unsaved:e.excludeCustomizedSaved||!1}),h=j()):"global"==a.czr_skopeBase.getActiveSkopeName()?g=e.the_dirties:h[a.czr_activeSkopeId()]=e.the_dirties,e.action){case null:case"refresh":break;case"changeset_update":if(c.isUndefined(e.opt_name))throw new Error("Missing opt_name param in the changeset_update query for skope : "+e.skope_id);break;case"save":if(c.isNull(e.dyn_type)&&(e.dyn_type=a.czr_skope(e.skope_id)().dyn_type),c.isNull(e.dyn_type)||c.isUndefined(e.dyn_type))throw new Error("QUERY : A SAVE QUERY MUST HAVE A VALID DYN TYPE."+e.skope_id);break;case"reset":if(c.isNull(e.dyn_type)&&(e.dyn_type=a.czr_skope(e.skope_id)().dyn_type),c.isNull(e.dyn_type)||c.isUndefined(e.dyn_type))throw new Error("QUERY : A RESET QUERY MUST HAVE A VALID DYN TYPE."+e.skope_id)}var k={};return c.each(a.czr_currentSkopesCollection(),function(a){k[a.skope]={id:a.id,opt_name:a.opt_name}}),f={wp_customize:"on",customized:"{}"==JSON.stringify(g)?'{"__not_customized__"}':JSON.stringify(g),skopeCustomized:JSON.stringify(h),nonce:this.nonce.preview,skope:a.czr_skope(e.skope_id)().skope,level_id:a.czr_skope(e.skope_id)().level,skope_id:e.skope_id,dyn_type:e.dyn_type,opt_name:c.isNull(e.opt_name)?a.czr_skope(e.skope_id)().opt_name:e.opt_name,obj_id:a.czr_skope(e.skope_id)().obj_id,current_skopes:JSON.stringify(k)||{},
17
- channel:this.channel(),revisionIndex:a._latestRevision},f=a.czr_isChangeSetOn()?b.extend(f,{customize_theme:a.settings.theme.stylesheet,customize_changeset_uuid:a.settings.changeset.uuid}):b.extend(f,{theme:a.settings.theme.stylesheet})}}})}(wp.customize,jQuery,_),function(a,b,c){a.bind("czr-skope-started",function(){var b,d=a.previewer.save;a.previewer.save=function(f){return a.requestChangesetUpdate({},{autosave:!0}).always(function(g){b=g.response,d.apply(a.previewer,f).done(function(){a.state.has("selectedChangesetStatus")&&"publish"!=a.state("selectedChangesetStatus")()||a.previewer.refresh({waitSkopeSynced:!0}).fail(function(b){a.consoleLog("Refresh failed after a save action",b)}).done(function(a){b=c.extend({changeset_status:"publish"},b||{}),e(a.skopesServerData)})})}).fail(function(c){b=c.response,a.consoleLog("apiRequestChangesetUpdate failed => ",b)}).done(function(b){var d={};c.each(a.czr_currentSkopesCollection(),function(b){c.each(a.czr_skope(b.id).dirtyValues(),function(a,b){d[b]=a})}),c.isEmpty(d)&&(a.state("changesetStatus").set("auto-draft"==a.state("changesetStatus")()?"":a.state("changesetStatus")()),a.state("saved")(!0))})};var e=function(b){var d={};b=c.extend({czr_skopes:[],isChangesetDirty:!1},b),c.each(a.czr_skopeCollection(),function(b){d[b.opt_name]=a.czr_skopeBase.getSkopeDirties(b.id),a.czr_skope(b.id).dirtyValues({}),a.czr_skope(b.id).changesetValues({})});var e=[],f=b.czr_skopes;c.each(d,function(b,d){c.each(b,function(b,g){if(!c.isUndefined(c.findWhere(f,{opt_name:d}))&&a.czr_skopeBase.isSettingSkopeEligible(g)){var h=c.findWhere(f,{opt_name:d}).db,i=c.findWhere(f,{opt_name:d}).skope,j=a.CZR_Helpers.build_setId(g),k=a.CZR_Helpers.getOptionName(g),l=h[j];c.isUndefined(l)&&"global"==i&&b===serverControlParams.defaultOptionsValues[k]||!c.isUndefined(l)&&c.isEqual(l,b)||e.push({opt_name:d,setId:j,server_val:l,api_val:b})}})}),c.isEmpty(e)?a.consoleLog("ALL RIGHT, SERVER AND API ARE SYNCHRONIZED AFTER SAVE"):a.consoleLog("SOME SETTINGS HAVE NOT BEEN PROPERLY SAVED : ",e),a.czr_skopeBase.maybeSynchronizeGlobalSkope(),a.czr_skopeBase.updateCtrlSkpNot(a.CZR_Helpers.getSectionControlIds())}})}(wp.customize,jQuery,_),function(a,b,c){if(serverControlParams.isSkopOn){a.Element.synchronizer.checkbox.update=function(a){this.element.prop("checked",a),this.element.iCheck("update")};var d=a.Element.synchronizer.val.update;a.Element.synchronizer.val.update=function(b){var c=this,e=function(){c.element.is("select")?c.element.val(b).trigger("change"):c.element.hasClass("wp-color-picker")?c.element.val(b).trigger("change"):c.element.val(b)};if(serverControlParams.isSkopOn){if("resolved"!=a.czr_skopeReady.state())return d.call(c,b);a.czr_skopeReady.then(function(){e()})}else e()},a.Element.synchronizer.val.refresh=function(){var a=this;return this.element.is("select")&&c.isNull(this.element.val())?c.isArray(a())?[]:c.isObject(a())?{}:"":this.element.val()}}}(wp.customize,jQuery,_),function(a,b,c){var d=a.Previewer.prototype.refresh,e=function(e){e=c.extend({waitSkopeSynced:!0,the_dirties:{}},e);var f=this,g=b.Deferred();if(!serverControlParams.isSkopOn)return g.resolve().promise();if(!c.has(a,"czr_activeSkopeId")||c.isUndefined(a.czr_activeSkopeId()))return a.consoleLog("The api.czr_activeSkopeId() is undefined in the api.previewer._new_refresh() method."),d.apply(f),g.resolve().promise();f.send("loading-initiated"),f.abort();var h=a.czr_getSkopeQueryParams({skope_id:a.czr_activeSkopeId(),action:"refresh",the_dirties:e.the_dirties||{}});return f.loading=new a.PreviewFrame({url:f.url(),previewUrl:f.previewUrl(),query:f.query(h)||{},container:f.container,signature:"WP_CUSTOMIZER_SIGNATURE"}),f.settingsModifiedWhileLoading={},onSettingChange=function(a){f.settingsModifiedWhileLoading[a.id]=!0},a.bind("change",onSettingChange),f.loading.always(function(){a.unbind("change",onSettingChange)}),a.czr_isChangeSetOn()||(f._previousPreview=f._previousPreview||f.preview),f.loading.done(function(b){var c,d=this;f.preview=d,f.targetWindow(d.targetWindow()),f.channel(d.channel()),c=function(b){d.unbind("synced",c),d.unbind("czr-skopes-synced",c),f._previousPreview?f._previousPreview.destroy():f.preview&&f.preview.destroy(),f._previousPreview=f.preview,f.deferred.active.resolve(),delete f.loading,a.trigger("pre_refresh_done",{previewer:f,skopesServerData:b||{}}),g.resolve({previewer:f,skopesServerData:b||{}})},a.czr_isChangeSetOn()||f.send("sync",{scroll:f.scroll,settings:a.get()}),e.waitSkopeSynced?d.bind("czr-skopes-synced",c):d.bind("synced",c),f.trigger("ready",b)}),f.loading.fail(function(b,c){a.consoleLog("LOADING FAILED : ",b,c,arguments),f.send("loading-failed"),a.czr_isChangeSetOn()||"redirect"===b&&c&&f.previewUrl(c),"logged out"===b&&(f.preview&&(f.preview.destroy(),delete f.preview),f.login().done(f.refresh)),"cheatin"===b&&f.cheatin(),g.reject(b)}),g.promise()};a.bind("czr-skope-started",function(){czr_override_refresh_for_skope(),a.Previewer.prototype.refresh=e}),a.czr_getSkopeQueryParams=function(d){if(!a.czr_isChangeSetOn())return d;d=c.isObject(d)?d:{};var e=d.action||"refresh";switch(e){case"refresh":d=b.extend(d,{excludeCustomizedSaved:!0})}return d},czr_override_refresh_for_skope=function(){serverControlParams.isSkopOn&&(a.previewer.refresh=function(d){var f=b.Deferred(),g=function(b){var c,d=function(){return 0===a.state("processing").get()},g=function(){e.call(a.previewer,b).done(function(a){f.resolve(a)})};d()?g():(c=function(){d()&&(g(),a.state("processing").unbind(c))},a.state("processing").bind(c))};return g=c.debounce(g,a.previewer.refreshBuffer),g(d),f.promise()})}}(wp.customize,jQuery,_),function(a,b,c){serverControlParams.isSkopOn&&(a.dirtyValues=function(b){return a.czr_skopeBase.getSkopeDirties(a.czr_skopeBase.getGlobalSkopeId(),b)})}(wp.customize,jQuery,_),function(a,b,c){if(serverControlParams.isSkopOn&&a.czr_isChangeSetOn()){var d=a.requestChangesetUpdate;a.requestChangesetUpdate=function(e,f){var g=b.Deferred(),h=[],i=[],j=e||{},k=[],l=[],m=b.Deferred();if(f=f||{},!serverControlParams.isSkopOn)return d();(0===a._lastSavedRevision||c.isEmpty(a.state("changesetStatus")()))&&(j=c.extend(j,{blogname:{dummy_change:"dummy_change"}})),c.each(a.czr_currentSkopesCollection(),function(a){"global"!=a.skope&&h.push(a.id)});var n=function(d){if(c.isUndefined(h[d+1])&&i.length==h.length){if(c.isEmpty(k))m.resolve(l);else{var e=function(){var d=[];return c.each(k,function(b){d.push(a.czr_skopeBase.buildServerResponse(b))}),b.trim(d.join(" | "))};m.reject(e())}return!0}},o=function(b){return(c.isUndefined(b)||0==b)&&a.state("processing").set(1),b=b||0,c.isUndefined(h[b])?(a.consoleLog("Undefined Skope in changeset recursive call ",b,h,h[b]),m.resolve(l).promise()):(a._requestSkopeChangetsetUpdate(e,h[b],f).always(function(){i.push(b)}).fail(function(c){k.push(c),a.consoleLog("CHANGESET UPDATE RECURSIVE FAIL FOR SKOPE : ",h[b]),n(b)||o(b+1)}).done(function(a){l.push(a),n(b)||o(b+1)}),m.promise())},p=a._lastSavedRevision;return d(j,f).fail(function(b){a.consoleLog("WP requestChangesetUpdateFail",b,a.czr_skopeBase.buildServerResponse(b)),a._lastSavedRevision=Math.max(a._latestRevision,a._lastSavedRevision),a.state("processing").set(0),g.reject(b),b=a.czr_skopeBase.buildServerResponse(b),c.isUndefined(a.notifications)?a.czr_serverNotification({status:"error",message:b}):(a.notifications.add(new wp.customize.Notification("changeset_update_failed",{type:"error",message:b,dismissible:!0})),c.delay(function(){if(a.notifications.has("changeset_update_failed")){var b=a.notifications("changeset_update_failed");b.parent?b.parent.remove(b.code):b.container.remove()}},5e3))}).done(function(b){"pending"==a.czr_initialSkopeCollectionPopulated.state()&&g.resolve(b),a._lastSavedRevision=p,o().always(function(){a._lastSavedRevision=Math.max(a._latestRevision,a._lastSavedRevision);var b={};c.each(a.czr_currentSkopesCollection(),function(d){c.each(a.czr_skope(d.id).dirtyValues(),function(a,c){b[c]=a})}),c.isEmpty(b)&&c.isEqual(j,{blogname:{dummy_change:"dummy_change"}})&&(a.state("changesetStatus").set("auto-draft"==a.state("changesetStatus")()?"":a.state("changesetStatus")()),a.state("saved")(!0)),a.state("processing").set(0)}).fail(function(b){g.reject(b),a.consoleLog("CHANGESET UPDATE RECURSIVE PUSH FAIL",b,l),a.trigger("changeset-error",b),a.czr_serverNotification({message:b,status:"error"})}).done(function(){g.resolve(b)})}),g.promise()},a._requestSkopeChangetsetUpdate=function(d,e,f){if(c.isUndefined(e)||!a.czr_skope.has(e))throw new Error("In api._requestSkopeChangetsetUpdate() : a valid and registered skope_id must be provided");var g,h,i=new b.Deferred,j={};if(e=e||a.czr_activeSkopeId(),h=c.extend({title:null,date:null,autosave:!1,force:!1},f),d&&c.extend(j,d),c.each(a.czr_skopeBase.getSkopeDirties(e),function(a,b){d&&null===d[b]||(j[b]=c.extend({},j[b]||{},{value:a}))}),!h.force&&c.isEmpty(j)&&null===h.title&&null===h.date)return i.resolve({}),i.promise();if(h.status)return i.reject({code:"illegal_status_in_changeset_update"}).promise();if(h.date&&h.autosave)return i.reject({code:"illegal_autosave_with_date_gmt"}).promise();if(a._latestRevision<=a._lastSavedRevision)return i.resolve({}),i.promise();a.trigger("skope-changeset-save",j);var k={skope_id:e,action:"changeset_update",opt_name:a.czr_skope(e).opt_name};return g=a.previewer.query(c.extend(k,{excludeCustomizedSaved:!0})),delete g.customized,c.extend(g,{nonce:a.settings.nonce.save,customize_changeset_data:JSON.stringify(j)}),wp.ajax.post("customize_skope_changeset_save",g).done(function(a){i.resolve(a)}).fail(function(b){a.consoleLog("SKOPE CHANGESET FAIL FOR SKOPE "+b.skope_id,b),i.reject(b)}).always(function(b){!c.isUndefined(b)&&b.setting_validities&&a._handleSettingValidities({settingValidities:b.setting_validities,focusInvalidControl:!0})}),i.promise()}}}(wp.customize,jQuery,_),function(a,b,c){a.bind("ready",function(){if(serverControlParams.isSkopOn){a.czr_isLoadingSkope=new a.Value((!1)),a.czr_isLoadingSkope.bind(function(a){d(a)}),a.czr_skopeBase=new a.CZR_skopeBase,a.czr_skopeReset=new a.CZR_skopeReset,a.trigger("czr-skope-started");var b=function(){a.czr_skopeBase.toggleTopNote(!0,{title:serverControlParams.i18n.skope["There was a problem when trying to load the customizer."],message:[serverControlParams.i18n.skope["Please refer to"],'<a href="http://docs.presscustomizr.com/article/285-there-was-a-problem-when-trying-to-load-the-customizer" target="_blank">',serverControlParams.i18n.skope["this documentation page"],"</a>",serverControlParams.i18n.skope["to understand how to fix the problem."]].join(" "),selfCloseAfter:4e4})};a.czr_skopeReady.done(function(){a.trigger("czr-skope-ready")}).fail(function(c){a.errorLog("Skope could not be instantiated : "+c),b(),serverControlParams.isSkopOn=!1}).always(function(){a.czr_isLoadingSkope(!1)}),"rejected"!=a.czr_skopeReady.state()&&setTimeout(function(){"pending"==a.czr_skopeReady.state()&&(b(),a.czr_isLoadingSkope(!1))},4e4)}serverControlParams.isChangeSetOn&&(a.settings.timeouts.changesetAutoSave=1e4)}),c.has(a,"_latestRevision")||(a._latestRevision=0,a._latestSettingRevisions={},a.bind("change",function(b){a._latestRevision+=1,a._latestSettingRevisions[b.id]=a._latestRevision}),a.bind("ready",function(){a.bind("add",function(b){b._dirty&&(a._latestRevision+=1,a._latestSettingRevisions[b.id]=a._latestRevision)})}));var d=function(d){d=!!c.isUndefined(d)||d;var e,f=function(){var c=b.Deferred();try{_tmpl=wp.template("czr-skope-pane")({is_skope_loading:!0})}catch(d){a.errorLog("In toggleSkopeLoadPane : error when parsing the the reset skope template : "+d),c.resolve(!1)}return b.when(b("#customize-preview").after(b(_tmpl))).always(function(){c.resolve(b("#czr-skope-pane"))}),c.promise()},g=function(){c.delay(function(){b.when(b("body").removeClass("czr-skope-pane-open")).done(function(){c.delay(function(){b.when(b("body").removeClass("czr-skop-loading")).done(function(){!1!==b("#czr-skope-pane").length&&setTimeout(function(){b("#czr-skope-pane").remove()},400)})},200)})},50)};"pending"==a.czr_skopeReady.state()&&d&&(b("body").addClass("czr-skop-loading"),f().done(function(a){e=a}).then(function(){e.length&&c.delay(function(){var a=b("#customize-preview").height();e.css("line-height",a+"px").css("height",a+"px"),b("body").addClass("czr-skope-pane-open")},50)})),a.czr_skopeReady.done(function(){g()}),d||g()}}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{globalSettingVal:{},initialize:function(){var d=this;d.skope_colors={global:"rgb(255, 255, 255)",special_group:"rgba(173, 213, 247, 0.55)",group:"rgba(120, 136, 158, 0.12)",local:"rgba(187, 211, 247, 0.28)"},a.czr_isPreviewerSkopeAware=b.Deferred(),a.czr_initialSkopeCollectionPopulated=b.Deferred(),d.skopeWrapperEmbedded=b.Deferred(),a.czr_skope=new a.Values,a.czr_skopeCollection=new a.Value([]),a.czr_currentSkopesCollection=new a.Value([]),a.czr_activeSkopeId=new a.Value,a.czr_dirtyness=new a.Value((!1)),a.czr_isResettingSkope=new a.Value((!1)),a.state.create("switching-skope")(!1),a.czr_dirtyness.callbacks.add(function(){return d.apiDirtynessReact.apply(d,arguments)}),a.czr_isLoadingSkope(!0),d.bindAPISettings(),a.czr_skopeReady.then(function(){"pending"==d.skopeWrapperEmbedded.state()&&b.when(d.embedSkopeWrapper()).done(function(){d.skopeWrapperEmbedded.resolve()})}),a.previewer.bind("czr-skopes-synced",function(b){if(serverControlParams.isSkopOn&&"rejected"!=a.czr_skopeReady.state()){var e=this,f=a.czr_currentSkopesCollection();if(!c.has(b,"czr_skopes"))return"resolved"!=a.czr_skopeReady.state()&&a.czr_skopeReady.reject(),void a.errorLog("On 'czr-skopes-synced' : missing skopes in the server data");try{a.czr_skopeBase.updateSkopeCollection(b.czr_skopes,e.channel())}catch(g){return void a.czr_skopeReady.reject(g)}var h=function(){d._writeCurrentSkopeTitle(),a.czr_bottomInfosVisible()?d.renderBottomInfosTmpl():a.czr_bottomInfosVisible(!0)};a.czr_initialSkopeCollectionPopulated.then(function(){var e=c.isUndefined(c.findWhere(a.czr_currentSkopesCollection(),{id:a.czr_activeSkopeId()}));a.czr_skopeBase.reactWhenSkopeSyncedDone(b).done(function(){if(e)try{a.czr_activeSkopeId(d.getActiveSkopeId()).done(function(){"resolved"!=a.czr_skopeReady.state()&&a.czr_skopeReady.resolve(d.getActiveSkopeId()),h()}).fail(function(){throw new Error("Error when trying to set the active skope after skope synced.")})}catch(g){a.errorLog("In reactWhenSkopeSyncedDone => api.czr_activeSkopeId() : "+g)}else if(!c.isEmpty(f)){var i=c.findWhere(f,{skope:"local"}).opt_name,j=c.findWhere(b.czr_skopes,{skope:"local"}).opt_name;j!==i&&"resolved"==a.czr_skopeReady.state()&&h()}})})}}),a.czr_currentSkopesCollection.bind(function(a,b){return d.currentSkopesCollectionReact(a,b)},{deferred:!0}),a.czr_initialSkopeCollectionPopulated.done(function(){a.czr_activeSkopeId.bind(function(b,e){return c.has(a,"czr_ModOptVisible")&&a.czr_ModOptVisible(!1),d.activeSkopeReact(b,e).then(function(c){a.trigger("skope-switched-done",{current_skope_id:b,previous_skope_id:e,updated_setting_ids:c||[]})})},{deferred:!0}),a.czr_activeSectionId.callbacks.add(function(){return d.activeSectionReact.apply(d,arguments)}),a.czr_activePanelId.callbacks.add(function(){return d.activePanelReact.apply(d,arguments)})}),a.bind("skope-switched-done",function(a){return a=c.extend({current_skope_id:"",previous_skope_id:"",updated_setting_ids:[]},a),d.skopeSwitchedDoneReact(a)}),a.czr_serverNotification=new a.Value({status:"success",message:"",expanded:!0}),a.czr_serverNotification.bind(function(a,b){d.toggleServerNotice(a)}),d._setupPreviewNotificationsBlocks(),d.scopeSwitcherEventMap=[{trigger:"click keydown",selector:".czr-dismiss-notification",name:"dismiss-notification",actions:function(){a.czr_serverNotification({expanded:!1})}},{trigger:"click keydown",selector:".czr-toggle-title-notice",name:"toggle-title-notice",actions:function(b){c.isUndefined(d.skopeTitleNoticeVisible)&&(d.skopeTitleNoticeVisible=new a.Value((!1)),d.skopeTitleNoticeVisible.bind(function(a){b.dom_el.find(".czr-skope-title").toggleClass("notice-visible",a)})),d.skopeTitleNoticeVisible(!d.skopeTitleNoticeVisible())}}],d.skopeWrapperEmbedded.then(function(){a.CZR_Helpers.setupDOMListeners(d.scopeSwitcherEventMap,{dom_el:b(".czr-scope-switcher")},d)}),d.refreshedControls=["czr_cropped_image"],d.initWidgetSidebarSpecifics(),a.bind("czr-paint",function(b){a.czr_skopeReady.then(function(){d.wash(b).paint(b)})})},embedSkopeWrapper:function(){var d=this;b("#customize-header-actions").append(b("<div/>",{"class":"czr-scope-switcher",html:'<div class="czr-skopes-wrapper"></div>'})),b("body").addClass("czr-skop-on");var e=[{trigger:"click keydown",selector:".czr-skope-switch",name:"control_skope_switch",actions:function(d){var e=b(d.dom_event.currentTarget,d.dom_el).attr("data-skope-id");!c.isEmpty(e)&&a.czr_skope.has(e)&&a.czr_activeSkopeId(e)}}];a.CZR_Helpers.setupDOMListeners(e,{dom_el:b(".czr-scope-switcher")},d)},apiDirtynessReact:function(c){b("body").toggleClass("czr-api-dirty",c),a.state("saved")(!c)},setSaveButtonStates:function(){a.state.has("saving")||(a.state.create("saving"),a.state("saving").bind(function(a){b(document.body).toggleClass("saving",a)}));var c=b("#save"),d=b(".customize-controls-close"),e=a.state("saved"),f=a.state("saving"),g=a.state("activated"),h=a.state.has("changesetStatus")?a.state("changesetStatus")():"auto-draft";a.czr_dirtyness()||!e()?(c.val(a.l10n.save),d.find(".screen-reader-text").text(a.l10n.cancel)):(c.val(a.l10n.saved),d.find(".screen-reader-text").text(a.l10n.close));var i=!(f()||g()&&e()||"publish"===h);c.prop("disabled",!i)},skopeSwitchedDoneReact:function(d){var e=this,f=function(){a.czr_CrtlDependenciesReady.then(function(){if(!c.isUndefined(a.czr_activeSectionId())&&!c.isEmpty(a.czr_activeSectionId()))try{a.czr_ctrlDependencies.setServiDependencies(a.czr_activeSectionId(),null,!0)}catch(b){a.errorLog("On skope-switched-done : "+b)}}),e.updateCtrlSkpNot(a.CZR_Helpers.getSectionControlIds()),a.czr_skope.has(d.previous_skope_id)&&b("#customize-controls").removeClass(["czr-",a.czr_skope(d.previous_skope_id)().skope,"-skope-level"].join("")),a.czr_skope.has(d.current_skope_id)&&b("#customize-controls").addClass(["czr-",a.czr_skope(d.current_skope_id)().skope,"-skope-level"].join(""));var f=function(){if(!c.isUndefined(a.czr_activeSectionId())&&!c.isEmpty(a.czr_activeSectionId())){var b=a.CZR_Helpers.getSectionControlIds(a.czr_activeSectionId());c.each(b,function(b){a.control.when(b,function(){var d=a.control(b);c.has(d,"czr_states")&&d.deferred.embedded.then(function(){d.czr_states("noticeVisible")(e.isCtrlNoticeVisible(b)),d.czr_states("resetVisible")(!1)})})})}};a.czr_bottomInfosVisible()?e.renderBottomInfosTmpl():a.czr_bottomInfosVisible(!0),c.delay(function(){f()},500)};a.czr_skopeReady.then(function(){f()})},_setupPreviewNotificationsBlocks:function(){var d=this;a.czr_topNoteVisible=new a.Value((!1)),a.czr_skopeReady.then(function(){a.czr_topNoteVisible.bind(function(c){var e={},f={title:"",message:"",actions:"",selfCloseAfter:2e4};e=b.extend(f,serverControlParams.topNoteParams),e.actions=function(){var c=b.extend(a.previewer.query(),{nonce:a.previewer.nonce.save});wp.ajax.post("czr_dismiss_top_note",c).always(function(){}).fail(function(b){a.consoleLog("czr_dismiss_top_note failed",c,b)}).done(function(a){})},d.toggleTopNote(c,e)}),c.delay(function(){a.czr_topNoteVisible(!c.isEmpty(serverControlParams.isTopNoteOn)||1==serverControlParams.isTopNoteOn)},2e3)}),a.czr_bottomInfosVisible=new a.Value((!1)),a.czr_skopeReady.then(function(){a.czr_bottomInfosVisible.bind(function(a){var c={},e={title:"",message:"",actions:"",selfCloseAfter:2e4};return c=b.extend(e,{}),d.toggleBottomInfos(a,c)},{deferred:!0});var e=a.CZR_Helpers.build_setId("show-skope-infos");a.when(e,function(b){a.czr_bottomInfosVisible.validate=function(a){var c=b(),d=0!==c&&"0"!==c&&!1!==c&&"off"!==c;return!!d&&a},b.bind(function(b){a.czr_bottomInfosVisible(0!==b&&"0"!==b&&!1!==b&&"off"!==b)})}),c.delay(function(){a.czr_bottomInfosVisible(!0)},2e3)})}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{toggleServerNotice:function(d){if(d=c.isObject(d)?d:{},d=c.extend({status:"success",expanded:!0,message:"",auto_collapse:!1},d),"changeset_already_published"!=d.message&&serverControlParams.isDevMode){this.serverNoticeEmbedded=this.serverNoticeEmbedded||b.Deferred();var e=this,f=function(){b(".czr-scope-switcher").prepend(b("<div/>",{"class":"czr-server-notice",html:'<span class="czr-server-message"></span><span class="fa fa-times-circle czr-dismiss-notification"></span>'}))},g=function(){var a,f,g=b(".czr-server-notice",".czr-scope-switcher"),h=b(".wp-full-overlay-header"),i=(b(".wp-full-overlay-sidebar .wp-full-overlay-sidebar-content"),function(a){return!0});e.skopeTitleNoticeVisible&&e.skopeTitleNoticeVisible(!1),d.expanded?(g.toggleClass("czr-server-error","error"==d.status),"error"==d.status?b(".czr-server-message",g).html(c.isEmpty(d.message)?"Server Problem.":d.message):b(".czr-server-message",g).html(c.isEmpty(d.message)?"Success.":d.message),f=b(".czr-server-notice",".czr-scope-switcher").outerHeight(),a=h.outerHeight()+f,setTimeout(function(){b.when(i(a)).done(function(){g.fadeIn({duration:200,complete:function(){b(this).css("height","auto")}})})},400)):(g.fadeOut({duration:200,complete:function(){}}),setTimeout(function(){i()},200))};"pending"==e.serverNoticeEmbedded.state()?b.when(f()).done(function(){setTimeout(function(){e.serverNoticeEmbedded.resolve(),g()},200)}):g(),c.delay(function(){a.czr_serverNotification({expanded:!1})},"success"==d.status||!1!==d.auto_collapse?4e3:5e3)}},buildServerResponse:function(a){var b=!1;if(c.isObject(a)&&(!c.has(a,"responseJSON")||c.isUndefined(a.responseJSON.data)||c.isEmpty(a.responseJSON.data)?c.has(a,"statusText")&&!c.isEmpty(a.statusText)&&(b=a.statusText):b=a.responseJSON.data),c.isObject(a)&&!b)try{JSON.stringify(a)}catch(d){b="Server Error"}else b?"-1"===a&&(b="Identification issue detected, please refresh your page."):b="0"===a?"Not logged in.":a;return b}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{toggleTopNote:function(d,e){e=c.isObject(e)?e:{};var f=this,g={title:"",message:"",actions:"",selfCloseAfter:2e4},h=function(){b.when(f.renderTopNoteTmpl(e)).done(function(d){f.welcomeNote=d,c.delay(function(){b("body").addClass("czr-top-note-open")},200),a.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:".czr-preview-note-close",actions:function(){i().done(function(){a.czr_topNoteVisible(!1),c.isFunction(e.actions)&&e.actions()})}}],{dom_el:f.welcomeNote},f)})},i=function(){var a=b.Deferred();return b("body").removeClass("czr-top-note-open"),f.welcomeNote.length?c.delay(function(){f.welcomeNote.remove(),a.resolve()},300):a.resolve(),a.promise()};e=b.extend(g,e),d?h():i().done(function(){a.czr_topNoteVisible(!1)}),c.delay(function(){a.czr_topNoteVisible(!1)},e.selfCloseAfter||2e4)},renderTopNoteTmpl:function(c){if(b("#czr-top-note").length)return b("#czr-top-note");var d="",e=c.title||"",f=c.message||"";try{d=wp.template("czr-top-note")({title:e})}catch(g){return a.errorLog("Error when parsing the the top note template : "+g),!1}return b("#customize-preview").after(b(d)),b(".czr-note-message","#czr-top-note").html(f),b("#czr-top-note")}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{bindAPISettings:function(b){var d=this,e=function(b,e,f){var g,h=this.id;serverControlParams.isSkopOn&&(c.has(a,"czr_activeSkopeId")&&!c.isUndefined(a.czr_activeSkopeId())||a.errorLog("The api.czr_activeSkopeId() is undefined in the api.czr_skopeBase.bindAPISettings method."),a(h)._dirty&&(g=d.isSettingSkopeEligible(h)?a.czr_activeSkopeId():d.getGlobalSkopeId(),a.czr_skope(g).updateSkopeDirties(h,b)),c.has(a.control(h),"czr_states")&&!a.control(h).czr_states("isResetting")()&&a.control(h).czr_states("resetVisible")(!1),d.isSettingSkopeEligible(h)&&d.updateCtrlSkpNot(h))};c.isUndefined(b)?a.each(function(a){a.bind(e)}):a(b).bind(e);var f=function(a){a.callbacks.has(e)||a.bind(e)};a.topics.change.has(f)||a.bind("change",f)}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{reactWhenSkopeSyncedDone:function(d){var e=b.Deferred();if(!c.has(d,"czr_skopes")||c.isEmpty(d.czr_skopes))return a.errorLog("Missing skope data after refresh",d),e.resolve().promise();a.czr_dirtyness()||a.czr_dirtyness(!!c.isBoolean(d.isChangesetDirty)&&d.isChangesetDirty);var f=d.czr_skopes;return c.each(a.czr_skopeCollection(),function(b){var d=c.findWhere(f,{opt_name:b.opt_name});if(!c.isUndefined(d)){var e=c.isEmpty(d.changeset||{})?{}:d.changeset,g={};c.each(e,function(b,c){a.has(c)||a.consoleLog("In reactWhenSkopeSyncedDone : attempting to update the changeset with a non registered setting : "+c),g[c]=b}),a.czr_skope(b.id).changesetValues(g)}}),c.each(a.czr_skopeCollection(),function(d){var e=c.findWhere(f,{opt_name:d.opt_name});if(!c.isUndefined(e)){var g=b.extend(!0,{},a.czr_skope(d.id).dbValues()),h=b.extend(g,e.db||{}),i={};c.each(h,function(b,c){a.has(c)||a.consoleLog("In reactWhenSkopeSyncedDone : attempting to update the db values with a non registered setting : "+c),i[c]=b}),a.czr_skope(d.id).dbValues(i)}}),c.delay(function(){e.resolve()},500),e.promise()}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{_maybeSetupAssignedMenuLocations:function(b){(c.isUndefined(b)||c.isEmpty(b)||!a.section.has(b.id))&&a.consoleLog("In _maybeSetupAssignedMenuLocations : no valid section_id provided.");if(b.assignedLocations){var d=function(a){};b.assignedLocations.callbacks.has(d)||b.assignedLocations.bind(d)}},activeSectionReact:function(b,d){"add_menu"!=b&&a.trigger("czr-paint",{active_section_id:b});var e=this,f=function(b){var d=a.CZR_Helpers.getSectionControlIds(b);c.each(d,function(b){if(a.has(b)&&!c.isUndefined(a.control(b))){var d=a.control(b);c.has(d,"czr_states")&&d.czr_states("resetVisible")(!1)}})},g=function(b,d){e.setupActiveSkopedControls({section_id:d}),e.processSilentUpdates({section_id:d}).fail(function(){throw new Error("Fail to process silent updates after initial skope collection has been populated")}).done(function(){var b=function(){var b=a.CZR_Helpers.getSectionControlIds(d);c.each(b,function(b){if(a.has(b)&&!c.isUndefined(a.control(b))){var d=a.control(b);c.has(d,"czr_states")&&d.czr_states("noticeVisible")(e.isCtrlNoticeVisible(b))}})};c.delay(function(){b()},700),e.isExcludedSidebarsWidgets()||e.forceSidebarDirtyRefresh(d,a.czr_activeSkopeId())}),c.has(a.topics,"active-section-setup")||a.bind("active-section-setup",function(a){var b={controls:[],section_id:""};a=c.extend(b,a),e._maybeSetupAssignedMenuLocations(a)}),a.czr_skopeReady.then(function(){var b=function(b){c.isUndefined(a.notifications)?a.czr_serverNotification({status:"success",message:[b,serverControlParams.i18n.skope["is always customized sitewide."]].join(" ")}):(a.notifications.add(new wp.customize.Notification(b,{type:"info",message:[b,serverControlParams.i18n.skope["is always customized sitewide."]].join(" "),dismissible:!0})),c.delay(function(){if(a.notifications.has(b)){var c=a.notifications(b);c.parent?c.parent.remove(c.code):c.container.remove()}},5e3)),a.czr_activeSkopeId(e.getGlobalSkopeId())};"global"!=a.czr_skope(a.czr_activeSkopeId())().skope&&(e.isExcludedWPCustomCss()&&"custom_css"==d&&b(a.section(d).params.title),c.contains(["admin_sec","tc_font_customizer_settings"],d)&&b(a.section(d).params.title),"nav_menu["!=d.substring(0,"nav_menu[".length)&&"add_menu"!=d||(c.isUndefined(a.notifications)?a.czr_serverNotification({status:"success",message:serverControlParams.i18n.skope["Menus are created sitewide."]}):(a.notifications.add(new wp.customize.Notification("nav_menus_sitewide",{type:"info",message:serverControlParams.i18n.skope["Menus are created sitewide."],dismissible:!0})),c.delay(function(){if(a.notifications.has("nav_menus_sitewide")){var b=a.notifications("nav_menus_sitewide");b.parent?b.parent.remove(b.code):b.container.remove()}},5e3))))}),a.trigger("active-section-setup",b)};a.czr_initialSkopeCollectionPopulated.then(function(){a.section.when(b,function(c){"publish_settings"!=b&&c.deferred.embedded.then(function(){try{g(c,b)}catch(d){a.errorLog("activeSectionReact => _doReactActive : "+d)}})}),!c.isEmpty(d)&&a.section.has(d)&&f(d)})},activePanelReact:function(b,d){var e=this;a.czr_initialSkopeCollectionPopulated.then(function(){a.trigger("czr-paint",{active_panel_id:b});a.czr_skopeReady.then(function(){"global"!=a.czr_skope(a.czr_activeSkopeId())().skope&&e.isExcludedSidebarsWidgets()&&"widgets"==b&&(c.isUndefined(a.notifications)?a.czr_serverNotification({status:"success",message:serverControlParams.i18n.skope["Widgets are created sitewide."]}):(a.notifications.add(new wp.customize.Notification("widgets_are_sitewide",{type:"info",message:serverControlParams.i18n.skope["Widgets are created sitewide."],dismissible:!0})),c.delay(function(){if(a.notifications.has("widgets_are_sitewide")){var b=a.notifications("widgets_are_sitewide");b.parent?b.parent.remove(b.code):b.container.remove()}},5e3)))}),a.czr_skopeReady.then(function(){"nav_menus"==b&&c.each(a.panel(b).sections(),function(a){e.processSilentUpdates({section_id:a.id,awake_if_not_active:!0})})})})}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{wash:function(d){var e=function(a){c.has(a,"el")&&a.el.length&&b.when(a.el.removeClass("czr-painted")).done(function(){b(this).css("background","").css("color","")})};return a.czr_skopeBase.paintedElements&&(c.each(a.czr_skopeBase.paintedElements(),function(a){e(a)}),a.czr_skopeBase.paintedElements([])),this},paint:function(d){var e="inherit",f={active_panel_id:a.czr_activePanelId(),active_section_id:a.czr_activeSectionId(),is_skope_switch:!1},g=[];d=b.extend(f,d),!c.isUndefined(a.czr_activeSkopeId())&&a.czr_skope.has(a.czr_activeSkopeId())&&(e=a.czr_skope(a.czr_activeSkopeId()).color);var h=function(f){c.has(f,"el")&&f.el.length&&(d.is_skope_switch?b.when(f.el.addClass("czr-painted")).done(function(){b(this).css("background",f.bgColor||e)}):f.el.css("background",f.bgColor||e),"global"!=a.czr_skope(a.czr_activeSkopeId())().skope&&f.el.css("color","#000"))};return a.czr_skopeBase.paintedElements=a.czr_skopeBase.paintedElements||new a.Value([]),c.isEmpty(d.active_panel_id)&&c.isEmpty(d.active_section_id)&&(g.push({el:b("#customize-info").find(".accordion-section-title").first()}),a.panel.each(function(a){g.push({el:a.container.find(".accordion-section-title").first()})}),a.section.each(function(a){c.isEmpty(a.panel())&&g.push({el:a.container.find(".accordion-section-title").first()})})),!c.isEmpty(d.active_panel_id)&&c.isEmpty(d.active_section_id)&&a.panel.when(d.active_panel_id,function(a){a.deferred.embedded.then(function(){g.push({el:a.container.find(".accordion-section-title, .customize-panel-back")})})}),c.isEmpty(d.active_section_id)||a.section.when(d.active_section_id,function(b){b.deferred.embedded.then(function(){g.push({el:b.container.find(".customize-section-title, .customize-section-back"),bgColor:"inherit"},{el:b.container}),a.czr_isChangeSetOn()||g.push({el:b.container.find(".accordion-section-content")})})}),c.each(g,function(a){h(a)}),a.czr_skopeBase.paintedElements(g),this}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{toggleBottomInfos:function(d,e){e=c.isObject(e)?e:{};var f=this,g=b.Deferred(),h={title:"",message:"",actions:"",selfCloseAfter:2e4},i=a.CZR_Helpers.build_setId("show-skope-infos"),j=function(){var d=b.Deferred();return b.when(f.renderBottomInfosTmpl(e)).done(function(g){f.bottomInfosContainer=g,c.delay(function(){b("body").addClass("czr-bottom-infos-open"),d.resolve();
18
- },200),a.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:".czr-preview-note-close",actions:function(){k().done(function(){a.czr_bottomInfosVisible(!1),c.isFunction(e.actions)&&e.actions()})}},{trigger:"click keydown",selector:".czr-skope-switch",actions:function(d){var e=b(d.dom_event.currentTarget,d.dom_el).attr("data-skope-id");!c.isEmpty(e)&&a.czr_skope.has(e)&&a.czr_activeSkopeId(e)}},{trigger:"click keydown",selector:".czr-disable-bottom-infos",actions:function(b){a.control.has(i)&&a.control(i).focus()}}],{dom_el:f.bottomInfosContainer},f)}).fail(function(){d.resolve()}),d.promise()},k=function(){return b.Deferred(function(){var a=this;b("body").removeClass("czr-bottom-infos-open"),f.bottomInfosContainer.length?c.delay(function(){f.bottomInfosContainer.remove(),f.bottomInfosContainer=!1,a.resolve()},300):a.resolve()})};return e=b.extend(h,e),d?j().always(function(){g.resolve()}):k().done(function(){a.czr_bottomInfosVisible(!1),g.resolve()}),g.promise()},renderBottomInfosTmpl:function(d){d=d||{};var e=this,f="",g=a.czr_activeSkopeId();if(!a.czr_skope.has(g)||!c.isObject(a.czr_skope(g)()))return!1;var h=a.czr_skope(g)().long_title,i=a.czr_skope(g)().ctx_title;h=c.isString(h)?h:"",i=c.isString(i)?i:"";var j=d.title||["Customizing",i.toLowerCase()].join(" "),k=d.message||e._getSkopeInfosMessage(g),l=function(){return b.Deferred(function(){var c=this;try{f=wp.template("czr-bottom-infos")({title:j}),b("#customize-preview").after(b(f)),c.resolve()}catch(d){a.errorLog("Error when parsing the the bottom infos template : "+d),c.reject(d)}})};return c.isUndefined(this.bottomInfosContainer)||1!=this.bottomInfosContainer.length?l().done(function(){b(".czr-note-message","#czr-bottom-infos").html(k)}):b(".czr-note-content",e.bottomInfosContainer).fadeOut({duration:"fast",complete:function(){b("h2",e.bottomInfosContainer).html(["&middot;",j,"&middot;"].join(" ")),b(".czr-note-message",e.bottomInfosContainer).html(k),b(this).fadeIn("fast")}}),this.bottomInfosContainer&&1==this.bottomInfosContainer.length?this.bottomInfosContainer:b("#czr-bottom-infos")},_getSkopeInfosMessage:function(d){d=d||a.czr_activeSkopeId();var e=c.findWhere(a.czr_currentSkopesCollection(),{skope:"local"}).id;if(!a.czr_skope.has(d)||!c.isObject(a.czr_skope(d)())||c.isUndefined(e))return"";var f,g=this,h=a.czr_skope(d)().skope,i=g.getInheritedSkopeTitles(),j=g.getOverridenSkopeTitles(),k=a.czr_skope(e)().ctx_title;a.czr_skope(d)().long_title;switch(h){case"global":f=[serverControlParams.i18n.skope["The customizations made site wide are inherited by all other levels of customization."],"<br/>",serverControlParams.i18n.skope["The current context"],["(",k,")"].join(" "),serverControlParams.i18n.skope["can be customized more specifically at the following level"]+"(s)",":",j+"."].join(" ");break;case"group":f=[serverControlParams.i18n.skope["The current customizations will be applied to"],a.czr_skope(d)().ctx_title.toLowerCase()+".","<br/>",serverControlParams.i18n.skope["The options not customized at this level will inherit their value from"],i,".<br/>",serverControlParams.i18n.skope["The current context"],["(",k,")"].join(" "),serverControlParams.i18n.skope["can be customized more specifically at the following level"],":",j+"."].join(" ");break;case"local":f=[serverControlParams.i18n.skope["The current context"],["(",k,")"].join(" "),serverControlParams.i18n.skope["can be customized with a specific set of options."],"<br/>",serverControlParams.i18n.skope["The options not customized at this level will inherit their value from"],i+"."].join(" ")}return b.trim(['<span class="czr-skope-bottom-infos">',f,"</span>"].join(" "))}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{isSkopeRegisteredInCollection:function(b,d){return d=d||a.czr_skopeCollection(),!c.isUndefined(c.findWhere(d,{id:b}))},isSkopeRegisteredInCurrentCollection:function(b,d){return d=d||a.czr_currentSkopesCollection(),!c.isUndefined(c.findWhere(d,{id:b}))},isGlobalSkopeRegistered:function(){var b=c.findWhere(a.czr_currentSkopesCollection(),{skope:"global"});return c.isObject(b)&&c.has(b,"id")},getGlobalSkopeId:function(){if(!c.has(a,"czr_skope"))return"";var b="";return a.czr_skope.each(function(a){"global"==a().skope&&(b=a().id)}),b},getChangedGlobalDBSettingValues:function(b){var d={};return c.each(b,function(b,e){_wpSetId=a.CZR_Helpers.build_setId(e),c.has(a.settings.settings,_wpSetId)&&(c.isEqual(b,a.settings.settings[_wpSetId].value)||(d[e]=b))}),d},getActiveSkopeId:function(b){b=b||a.czr_currentSkopesCollection();var d,e,f;if(d=!c.isEmpty(a.czr_activeSkopeId())&&a.czr_skope.has(a.czr_activeSkopeId())?a.czr_skope(a.czr_activeSkopeId())().skope:serverControlParams.isLocalSkope?"local":"global",e=c.findWhere(b,{skope:d}),f=c.isUndefined(e)?c.findWhere(b,{skope:"global"}).id:e.id,c.isUndefined(f))throw new Error("No default skope was found in getActiveSkopeId ",b);return f},getActiveSkopeName:function(){return a.czr_skope.has(a.czr_activeSkopeId())?a.czr_skope(a.czr_activeSkopeId())().skope:"global"},
19
- //! important : the setId param must be the full name. For example : hu_theme_option[color-1]
20
- isSettingSkopeEligible:function(b){var d=this,e=a.CZR_Helpers.getOptionName(b);return c.isUndefined(b)||!a.has(b)?(a.consoleLog("THE SETTING "+b+" IS NOT ELIGIBLE TO SKOPE BECAUSE UNDEFINED OR NOT REGISTERED IN THE API."),!1):!d.isExcludedWPBuiltinSetting(b)&&(!c.contains(serverControlParams.skopeExcludedSettings,e)&&(d.isThemeSetting(b),!0))},
21
- //! important : the setId param must be the full name. For example : hu_theme_option[color-1]
22
- isSettingResetEligible:function(b){var d=this;a.CZR_Helpers.getOptionName(b);if(c.isUndefined(b)||!a.has(b))return void a.consoleLog("THE SETTING "+b+" IS NOT ELIGIBLE TO RESET BECAUSE UNDEFINED OR NOT REGISTERED IN THE API.");if(!d.isExcludedWPBuiltinSetting(b))return!(!d.isThemeSetting(b)&&!d.isWPAuthorizedSetting(b))||void a.consoleLog("THE SETTING "+b+" IS NOT ELIGIBLE TO RESET BECAUSE NOT PART OF THE THEME OPTIONS AND NOT WP AUTHORIZED BUILT IN OPTIONS")},isThemeSetting:function(a){return c.isString(a)&&-1!==a.indexOf(serverControlParams.themeOptions)},isWPAuthorizedSetting:function(a){return c.isString(a)&&c.contains(serverControlParams.wpBuiltinSettings,a)},isExcludedWPBuiltinSetting:function(a){var b=this;if(c.isUndefined(a))return!0;if("active_theme"==a)return!0;if(c.contains(serverControlParams.wpBuiltinSettings,a))return!1;var d=["widget_","nav_menu","sidebars_","custom_css","nav_menu[","nav_menu_item","nav_menus_created_posts","nav_menu_locations"],e=!1;return c.each(d,function(c){switch(c){case"widget_":case"sidebars_":c==a.substring(0,c.length)&&(e=b.isExcludedSidebarsWidgets());break;case"nav_menu[":case"nav_menu_item":case"nav_menus_created_posts":c==a.substring(0,c.length)&&(e=!0);break;case"nav_menu_locations":c==a.substring(0,c.length)&&(e=b.isExcludedNavMenuLocations());break;case"custom_css":c==a.substring(0,c.length)&&(e=b.isExcludedWPCustomCss())}}),e},isExcludedSidebarsWidgets:function(){var a=serverControlParams.isSidebarsWigetsSkoped;return!(!c.isUndefined(a)&&!c.isEmpty(a)&&!1!==a)},isExcludedNavMenuLocations:function(){if(!a.czr_isChangeSetOn())return!0;var b=serverControlParams.isNavMenuLocationsSkoped;return!(!c.isUndefined(b)&&!c.isEmpty(b)&&!1!==b)},isExcludedWPCustomCss:function(){var a=serverControlParams.isWPCustomCssSkoped;return!(!c.isUndefined(a)&&!c.isEmpty(a)&&!1!==a)},_getDBSettingVal:function(b,d){var e=a.CZR_Helpers.getOptionName(b),f=a.CZR_Helpers.build_setId(b);return a.czr_skope.has(d)?c.has(a.czr_skope(d).dbValues(),f)?a.czr_skope(d).dbValues()[f]:c.has(a.czr_skope(d).dbValues(),e)?a.czr_skope(d).dbValues()[e]:"_no_db_val":(a.consoleLog("_getDBSettingVal : the requested skope id is not registered : "+d),"_no_db_val")},getSkopeDirties:function(b,d){if(!a.czr_skope.has(b))return{};d=d||{},d=c.extend({unsaved:!0},d);var e={};return c.each(a.czr_skope(b).dirtyValues(),function(b,f){var g;a.czr_isChangeSetOn()&&(g=a._latestSettingRevisions[f],a.state("changesetStatus").get()&&d&&d.unsaved&&(c.isUndefined(g)||g<=a._lastSavedRevision))||(e[f]=b)}),e},getSkopeExcludedDirties:function(){var b=this,d={};a.each(function(a,b){a._dirty&&(d[b]=a())});var e=b.getGlobalSkopeId();b.getSkopeDirties(e);return c.omit(d,function(a,c){return b.isSettingSkopeEligible(c)})},parseWidgetId:function(a,b){var d,e={number:null,id_base:null};return d=a.match(/^(.+)-(\d+)$/),d?(e.id_base=d[1],e.number=parseInt(d[2],10)):e.id_base=a,c.isUndefined(b)||(e.id_base=e.id_base.replace(b,"")),e},widgetIdToSettingId:function(a,b){var c,d=this.parseWidgetId(a,b);return c=d.id_base,d.number&&(c+="["+d.number+"]"),c},isWidgetRegisteredGlobally:function(a){var b=this;return registered=!1,c.each(_wpCustomizeWidgetsSettings.registeredWidgets,function(c,d){registered||"widget_"+b.widgetIdToSettingId(d)!=a||(registered=!0)}),registered}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{getAppliedPrioritySkopeId:function(b,d){if(!a.has(a.CZR_Helpers.build_setId(b)))return a.errorLog("getAppliedPrioritySkopeId : the requested setting id does not exist in the api : "+a.CZR_Helpers.build_setId(b)),d;if(!a.czr_skope.has(d))return a.errorLog("getAppliedPrioritySkopeId : the requested skope id is not registered : "+d),d;var e=this,f=c.findWhere(a.czr_currentSkopesCollection(),{skope:"local"}).id;if(c.isUndefined(f)||d==f)return d;var g=function(c){var f=a.CZR_Helpers.build_setId(b),h="___",i=a.czr_skope(c)();if(c==d)return d;if(a.czr_skope(c).getSkopeSettingAPIDirtyness(f))return i.id;if(a.czr_isChangeSetOn()&&a.czr_skope(c).getSkopeSettingChangesetDirtyness(f))return i.id;var j=e._getDBSettingVal(b,c);return"_no_db_val"!=j?i.id:"global"==i.skope?i.id:"___"!=h?i.title:g(e._getParentSkopeId(i))};return g(f)},getOverridenSkopeTitles:function(){var b=b||a.czr_activeSkopeId();if(!a.czr_skope.has(b))return a.errorLog("getInheritedSkopeTitles : the requested skope id is not registered : "+b),"";var d=this,e=c.findWhere(a.czr_currentSkopesCollection(),{skope:"local"}).id;if(c.isUndefined(e)||b==e)return"";var f=function(c,e){e=e||[];var g=a.czr_skope(c)();return c==b?e:(e.unshift(c),f(d._getParentSkopeId(g),e))};return c.map(f(e),function(a){return d.buildSkopeLink(a)}).join(" "+serverControlParams.i18n.skope.and+" ")},getInheritedSkopeId:function(b,d){if(!a.has(a.CZR_Helpers.build_setId(b)))return a.errorLog("getInheritedSkopeId : the requested setting id does not exist in the api : "+a.CZR_Helpers.build_setId(b)),d;if(!a.czr_skope.has(d))return a.errorLog("getInheritedSkopeId : the requested skope id is not registered : "+d),d;var e,f=this,g=a.CZR_Helpers.build_setId(b),h="___",i=a.czr_skope(d)();if(e=c.has(a.settings.settings,g)?a.settings.settings[g].value:null,a.czr_skope(d).getSkopeSettingAPIDirtyness(g))return d;if(a.czr_isChangeSetOn()&&a.czr_skope(d).getSkopeSettingChangesetDirtyness(g))return d;var j=f._getDBSettingVal(b,d);return"_no_db_val"!=j?d:"global"==i.skope?d:"___"!=h?d:f.getInheritedSkopeId(b,f._getParentSkopeId(i))},getInheritedSkopeTitles:function(b,d){if(b=b||a.czr_activeSkopeId(),!a.czr_skope.has(b))return a.errorLog("getInheritedSkopeTitles : the requested skope id is not registered : "+b),"";d=d||[];var e=this,f=a.czr_skope(b)();return b!==a.czr_activeSkopeId()&&d.unshift(b),"global"!==f.skope?e.getInheritedSkopeTitles(e._getParentSkopeId(f),d):c.map(d,function(a){return e.buildSkopeLink(a)}).join(" "+serverControlParams.i18n.skope.and+" ")},buildSkopeLink:function(b){if(!a.czr_skope.has(b))return a.errorLog("buildSkopeLink : the requested skope id is not registered : "+b),"";var c=[serverControlParams.i18n.skope["Switch to scope"],a.czr_skope(b)().title].join(" : ");return['<span class="czr-skope-switch" title=" '+c+'" data-skope-id="'+b+'">',a.czr_skope(b)().title,"</span>"].join("")},getSkopeSettingVal:function(b,d){if(!a.has(a.CZR_Helpers.build_setId(b)))return a.errorLog("getSkopeSettingVal : the requested setting id does not exist in the api : "+a.CZR_Helpers.build_setId(b)),null;if(!a.czr_skope.has(d))return a.errorLog("getSkopeSettingVal : the requested skope id is not registered : "+d),null;var e,f=this,g=a.CZR_Helpers.build_setId(b),h="___",i=a.czr_skope(d)();if(e=c.has(a.settings.settings,g)?a.settings.settings[g].value:null,a.czr_skope(d).getSkopeSettingAPIDirtyness(g))return a.czr_skope(d).dirtyValues()[g];if(a.czr_isChangeSetOn()&&a.czr_skope(d).getSkopeSettingChangesetDirtyness(g))return a.czr_skope(d).changesetValues()[g];var j=f._getDBSettingVal(b,d);return"_no_db_val"!=j?j:"global"==i.skope?"___"==h?e:h:"___"!=h?h:f.getSkopeSettingVal(b,f._getParentSkopeId(i))},applyDirtyCustomizedInheritance:function(b,d){d=d||a.czr_activeSkopeId()||a.czr_skopeBase.getGlobalSkopeId(),b=b||{};var e=this,f=a.czr_skope(d)();if("global"==f.skope)return b;var g=e._getParentSkopeId(f),h=a.czr_skope(g).dirtyValues();return c.each(h,function(d,e){var g=a.CZR_Helpers.getOptionName(e);c.isUndefined(b[e])&&c.isUndefined(a.czr_skope(f.id).dbValues()[g])&&(b[e]=d)}),"global"==a.czr_skope(g)().skope?b:e.applyDirtyCustomizedInheritance(b,g)},_getParentSkopeId:function(b,d){var e=this,f=["local","group","special_group","global"],g=d||1*(c.findIndex(f,function(a){return b.skope==a})+1),h=f[g];return c.isUndefined(h)?c.findWhere(a.czr_currentSkopesCollection(),{skope:"global"}).id:c.isUndefined(c.findWhere(a.czr_currentSkopesCollection(),{skope:h}))?e._getParentSkopeId(b,g+1):c.findWhere(a.czr_currentSkopesCollection(),{skope:h}).id},_getChildSkopeId:function(b,d){var e=this,f=["local","group","special_group","global"],g=d||1*(c.findIndex(f,function(a){return b.skope==a})-1),h=f[g];return c.isUndefined(h)?c.findWhere(a.czr_currentSkopesCollection(),{skope:"local"}).id:c.isUndefined(c.findWhere(a.czr_currentSkopesCollection(),{skope:h}))?e._getParentSkopeId(b,g-1):c.findWhere(a.czr_currentSkopesCollection(),{skope:h}).id}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{updateSkopeCollection:function(d,e){var f=this;if(_api_ready_collection=[],c.each(d,function(a,c){var d=b.extend(!0,{},a);_api_ready_collection.push(f.prepareSkopeForAPI(d))}),f.isGlobalSkopeRegistered()){var g=[],h=b.extend(!0,{},a.czr_skope(f.getGlobalSkopeId())());c.each(_api_ready_collection,function(a,b){"global"==a.skope?g.push(h):g.push(a)}),_api_ready_collection=g}a.czr_currentSkopesCollection(_api_ready_collection)},prepareSkopeForAPI:function(a){if(!c.isObject(a))throw new Error("prepareSkopeForAPI : a skope must be an object to be API ready");var b=this,d={};if(c.each(serverControlParams.defaultSkopeModel,function(b,e){var f=a[e];switch(e){case"title":if(!c.isString(f))throw new Error("prepareSkopeForAPI : a skope title property must a string");d[e]=f;break;case"long_title":if(!c.isString(f))throw new Error("prepareSkopeForAPI : a skope title property must a string");d[e]=f;break;case"ctx_title":if(!c.isString(f))throw new Error("prepareSkopeForAPI : a skope context title property must a string");d[e]=f;break;case"skope":if(!c.isString(f)||c.isEmpty(f))throw new Error('prepareSkopeForAPI : a skope "skope" property must a string not empty');d[e]=f;break;case"level":if(!c.isString(f)||c.isEmpty(f))throw new Error("prepareSkopeForAPI : a skope level must a string not empty for skope "+f.skope);d[e]=f;break;case"dyn_type":if(!c.isString(f)||!c.contains(serverControlParams.skopeDynTypes,f))throw new Error("prepareSkopeForAPI : missing or invalid dyn type for skope "+a);d[e]=f;break;case"opt_name":if(!c.isString(f)||c.isEmpty(f))throw new Error('prepareSkopeForAPI : invalid "opt_name" property for skope '+f.skope);d[e]=f;break;case"obj_id":if(!c.isString(f))throw new Error('prepareSkopeForAPI : invalid "obj_id" for skope '+f.skope);d[e]=f;break;case"is_winner":if(!c.isUndefined(f)&&!c.isBoolean(f))throw new Error('prepareSkopeForAPI : skope property "is_winner" must be a boolean');d[e]=f;break;case"is_forced":if(!c.isUndefined(f)&&!c.isBoolean(f))throw new Error('prepareSkopeForAPI : skope property "is_primary" must be a boolean');d[e]=f;break;case"db":if((c.isArray(f)||c.isEmpty(f))&&(f={}),c.isUndefined(f)||!c.isObject(f))throw new Error('prepareSkopeForAPI : skope property "db" must be an object');d[e]=f;break;case"changeset":if((c.isArray(f)||c.isEmpty(f))&&(f={}),c.isUndefined(f)||!c.isObject(f))throw new Error('prepareSkopeForAPI : skope property "changeset" must be an object');d[e]=f;break;case"has_db_val":if(!c.isUndefined(f)&&!c.isBoolean(f))throw new Error('prepareSkopeForAPI : skope property "has_db_val" must be a boolean');d[e]=f}}),d.color=b.skope_colors[d.skope]||"rgb(255, 255, 255)",d.id=d.skope+"_"+d.level,!c.isString(d.id)||c.isEmpty(d.id))throw new Error("prepareSkopeForAPI : a skope id must a string not empty");return c.isString(d.title)&&!c.isEmpty(d.title)||(d.title=id,d.long_title=id),d},currentSkopesCollectionReact:function(d,e){var f=this,g=b.extend(!0,[],d)||[],h=(b.extend(!0,[],e)||[],b.Deferred()),i=[];_to_remove=[],_to_update=[],_instantiateAndEmbed=function(d){c.each(d,function(c){c=b.extend(!0,{},c),a.czr_skope.add(c.id,new a.CZR_skope(c.id,c))}),c.each(d,function(b){if(!a.czr_skope.has(b.id))throw new Error("Skope id : "+b.id+" has not been instantiated.");"pending"==a.czr_skope(b.id).isReady.state()&&a.czr_skope(b.id).ready()})},c.each(g,function(b){a.czr_skope.has(b.id)||i.push(b)});try{_instantiateAndEmbed(i)}catch(j){return a.errorLog("currentSkopesCollectionReact : "+j),h.resolve().promise()}var k=function(){var d=c.size(g),e=function(a){var e=a.container.attr("class").split(" ");c.each(a.container.attr("class").split(" "),function(a){"width-"==a.substring(0,6)&&(e=c.without(e,a))}),b.when(a.container.attr("class",e.join(" "))).done(function(){a.container.addClass("width-"+Math.round(100/d))})};a.czr_skope.each(function(a){if(c.isUndefined(c.findWhere(g,{id:a().id})))a.visible(!1),a.isReady.then(function(){a.container.toggleClass("active-collection",!1)});else{a.visible(!0);var b=function(){e(a),a.container.toggleClass("active-collection",!0)};"pending"==a.isReady.state()?a.isReady.then(function(){b()}):b()}})};return f.skopeWrapperEmbedded.then(function(){k()}),c.isEmpty(e)&&!c.isEmpty(d)&&a.czr_initialSkopeCollectionPopulated.resolve(),f.maybeSynchronizeGlobalSkope(),h.resolve("changed").promise()},maybeSynchronizeGlobalSkope:function(d){if(d=d||{},!c.isObject(d))throw new Error("maybeSynchronizeGlobalSkope : args must be an object");var e,f,g,h=this,i=b.Deferred();c.extend({isGlobalReset:!1,isSetting:!1,settingIdToReset:"",isSkope:!1,skopeIdToReset:""},d);if(h.isGlobalSkopeRegistered()){var j=a.czr_skope(h.getGlobalSkopeId()).dbValues();if(c.each(j,function(b,d){a.has(d)&&!c.isEqual(a.settings.settings[d].value,b)&&(a.settings.settings[d].value=b)}),d.isGlobalReset&&d.isSetting){if(e=d.settingIdToReset,f=a.CZR_Helpers.getOptionName(e),g=serverControlParams.defaultOptionsValues[f],c.isUndefined(a.settings.settings[e])||c.isUndefined(g))return;g!=a.settings.settings[e].value&&(a.settings.settings[e].value=g)}d.isGlobalReset&&d.isSkope&&c.each(a.settings.settings,function(b,d){h.isThemeSetting(d)&&(f=a.CZR_Helpers.getOptionName(d),c.has(serverControlParams.defaultOptionsValues,f)&&(a.settings.settings[d].value=serverControlParams.defaultOptionsValues[f]))})}return i.resolve().promise()}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{activeSkopeReact:function(d,e){var f=this,g=b.Deferred();if(!c.isUndefined(e)&&a.czr_skope.has(e))a.czr_skope(e).active(!1);else if(!c.isUndefined(e))throw new Error("listenToActiveSkope : previous scope does not exist in the collection",e);if(c.isUndefined(d)||!a.czr_skope.has(d))throw new Error("listenToActiveSkope : requested scope "+d+" does not exist in the collection");a.czr_skope(d).active(!0);var h=function(b){return a.czr_activeSkopeId(f.getGlobalSkopeId()),c.isUndefined(a.notifications)?a.czr_serverNotification({status:"success",message:[b,"is always customized sitewide."].join(" ")}):(a.notifications.add(new wp.customize.Notification(b,{type:"info",message:[b,"is always customized sitewide."].join(" "),dismissible:!0})),c.delay(function(){if(a.notifications.has(b)){var c=a.notifications(b);c.parent?c.parent.remove(c.code):c.container.remove()}},5e3)),g.resolve().promise()};if(f.isExcludedSidebarsWidgets()&&"widgets"==a.czr_activePanelId()&&d!=f.getGlobalSkopeId()&&(c.isUndefined(a.notifications)?a.czr_serverNotification({status:"success",message:[serverControlParams.i18n.skope["Widgets are created sitewide."]].join(" ")}):(a.notifications.add(new wp.customize.Notification("widgets_are_sidewide",{type:"info",message:serverControlParams.i18n.skope["Widgets are created sitewide."],dismissible:!0})),c.delay(function(){if(a.notifications.has("widgets_are_sidewide")){var b=a.notifications("widgets_are_sidewide");b.parent?b.parent.remove(b.code):b.container.remove()}},5e3))),f.isExcludedWPCustomCss()&&"custom_css"==a.czr_activeSectionId()&&d!=f.getGlobalSkopeId())return h(a.section(a.czr_activeSectionId()).params.title);if("admin_sec"==a.czr_activeSectionId()&&d!=f.getGlobalSkopeId())return h(a.section(a.czr_activeSectionId()).params.title);if("tc_font_customizer_settings"==a.czr_activeSectionId()&&d!=f.getGlobalSkopeId())return h(a.section(a.czr_activeSectionId()).params.title);if("nav_menu"!=a.czr_activeSectionId().substring(0,"nav_menu".length)&&"add_menu"!=a.czr_activeSectionId()||d==f.getGlobalSkopeId()||a.czr_serverNotification({status:"success",message:[serverControlParams.i18n.skope["Menus are created sitewide."]].join(" ")}),"nav_menus"==a.czr_activePanelId()&&c.each(a.panel(a.czr_activePanelId()).sections(),function(a){f.processSilentUpdates({section_id:a.id,awake_if_not_active:!0})}),a.state("switching-skope")(!0),f._writeCurrentSkopeTitle(d),a.trigger("czr-paint",{is_skope_switch:!0}),c.isUndefined(a.czr_activeSectionId()))return a.state("switching-skope")(!1),a.previewer.refresh(),g.resolve().promise();c.has(a,"czrModulePanelState")&&a.czrModulePanelState(!1);var i=f._getSilentUpdateCandidates();c.isUndefined(e)||c.each(a.czr_skope(e).dirtyValues(),function(a,b){c.contains(i,b)||i.push(b)}),c.isUndefined(d)||c.each(a.czr_skope(d).dirtyValues(),function(a,b){c.contains(i,b)||i.push(b)});var j=function(){f.processSilentUpdates({candidates:i,section_id:null,refresh:!1}).fail(function(){throw g.reject(),a.state("switching-skope")(!1),new Error("Fail to process silent updates in _debouncedProcessSilentUpdates")}).done(function(b){a.previewer.refresh().always(function(){g.resolve(b),a.state("switching-skope")(!1)})})};return c.has(a,"czr_isModuleExpanded")&&!1!==a.czr_isModuleExpanded()?(a.czr_isModuleExpanded().setupModuleViewStateListeners(!1),(j=c.debounce(j,400))()):j(),g.promise()},_writeCurrentSkopeTitle:function(d){var e=this,f=a.czr_skope(d||a.czr_activeSkopeId())().long_title,g=function(){var g=e.getInheritedSkopeTitles(),h=e.getOverridenSkopeTitles();return b.trim(['<span class="czr-main-title"><span class="czr-toggle-title-notice fa fa-info-circle"></span>',"global"==a.czr_skope(d||a.czr_activeSkopeId())().skope?f:["Customizing",f].join(" "),"</span>",'<span class="czr-skope-inherits-from">',serverControlParams.i18n.skope["In this context :"],c.isEmpty(g)?" ":serverControlParams.i18n.skope["inherits from"],g,c.isEmpty(g)?"":c.isEmpty(h)?".":[",",serverControlParams.i18n.skope.and].join(" "),c.isEmpty(h)?" ":serverControlParams.i18n.skope["overridden by"],h,c.isEmpty(h)?"":".","</span>"].join(" "))},h=function(a){a?b(".czr-scope-switcher").find(".spinner").fadeIn():b(".czr-scope-switcher").find(".spinner").fadeOut()};e.skopeWrapperEmbedded.then(function(){b(".czr-scope-switcher").find(".czr-current-skope-title").length?b.when(b(".czr-scope-switcher").find(".czr-skope-title").fadeOut(200)).done(function(){b(this).html(g()).fadeIn(200)}):b(".czr-scope-switcher").prepend(b("<h2/>",{"class":"czr-current-skope-title",html:['<span class="czr-skope-title">','<span class="spinner">',g(),"</span>","</span>"].join("")})),c.isUndefined(a.state("switching-skope").isBound)&&(a.state("switching-skope").bind(h),a.state("switching-skope").isBound=!0)})}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{processSilentUpdates:function(d){d=c.isString(d)?{candidates:[d]}:d||{};var e=this,f={candidates:[],section_id:a.czr_activeSectionId(),refresh:!0,awake_if_not_active:!1},g=b.Deferred();if(d=b.extend(f,d),c.isString(d.candidates)&&(d.candidates=[d.candidates]),c.isEmpty(d.candidates)&&(d.candidates=e._getSilentUpdateCandidates(d.section_id,d.awake_if_not_active)),!c.isArray(d.candidates))throw new Error("processSilentUpdates : the update candidates must be an array.");if(c.isEmpty(d.candidates))return g.resolve([]).promise();var h=function(){e.silentlyUpdateSettings(d.candidates,d.refresh).fail(function(){g.reject()}).done(function(a){c.delay(function(){e.setupActiveSkopedControls({section_id:d.section_id})},1e3),g.resolve(a)})};return"resolved"!=a.czr_skopeReady.state()?(g.resolve([]),a.czr_skopeReady.done(function(){h()})):h(),g.promise()},silentlyUpdateSettings:function(d,e){a.state.has("silent-update-processing")||a.state.create("silent-update-processing")(!1),a.state("silent-update-processing")(!0);var f=this,g={},h=b.Deferred();e=!!c.isUndefined(e)||e,(c.isUndefined(d)||c.isEmpty(d))&&(d=f._getSilentUpdateCandidates()),c.isString(d)&&(d=[d]),c.each(d,function(b){a.control.has(b)&&"czr_multi_module"==a.control(b).params.type||(g[b]=f.getSettingUpdatePromise(b))});var i=[],j=[];return c.each(g,function(b,d){b.done(function(b){var e=a.CZR_Helpers.build_setId(d),f=a.czr_skope(a.czr_activeSkopeId()).getSkopeSettingDirtyness(d);c.isEqual(a(e)(),b)||j.push(d),a(e).silent_set(b,f)}),i.push(b)}),b.when.apply(null,i).fail(function(){throw h.reject(),new Error("silentlyUpdateSettings FAILED. Candidates : "+d)}).always(function(){a.state("silent-update-processing")(!1)}).then(function(){c.each(i,function(a){if(c.isObject(a)&&"resolved"!==a.state())throw new Error("a silent update promise is unresolved : "+d)}),e&&!c.isEmpty(j)?a.previewer.refresh().always(function(){h.resolve(j)}):h.resolve(j)}),h.promise()},getSettingUpdatePromise:function(d){if(c.isUndefined(d))throw new Error("getSettingUpdatePromise : the provided setId is not defined");if(!a.has(a.CZR_Helpers.build_setId(d)))throw new Error("getSettingUpdatePromise : the provided wpSetId is not registered : "+a.CZR_Helpers.build_setId(d));var e=this,f=a.CZR_Helpers.build_setId(d),g=a(f)(),h=b.Deferred(),i=!1,j=a.czr_activeSkopeId(),k=a.czr_skopeBase.getSkopeSettingVal(d,j);if(c.isEqual(g,k))return h.resolve(k).promise();if(a.control.has(f)){var l=a.control(f).params.type,m=a.settings.controls[f];switch(l){case"czr_cropped_image":i=e._getCzrCroppedImagePromise(f,m);break;case"czr_module":e._processCzrModuleSilentActions(f,l,j,m)}}return c.has(a.settings.controls,"header_image")&&"header_image"==f&&(i=e._getHeaderImagePromise(f,j)),i&&c.isObject(i)?i.always(function(){h.resolve(k)}):h.resolve(k),h.promise()},_getSilentUpdateCandidates:function(b,d){var e=this,f=[];if(b=c.isUndefined(b)||c.isNull(b)?a.czr_activeSectionId():b,c.isEmpty(a.czr_activeSectionId())&&!d)return[];if(c.isUndefined(b))return a.consoleLog("_getSilentUpdateCandidates : No active section provided"),[];if(!a.section.has(b))throw new Error("_getSilentUpdateCandidates : The section "+b+" is not registered in the API.");var g=a.CZR_Helpers.getSectionSettingIds(b);return g=c.filter(g,function(a){return e.isSettingSkopeEligible(a)}),c.each(g,function(a){f.push(a)}),f}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{_processCzrModuleSilentActions:function(d,e,f,g){var h,i,j,k,l,m=c.has(a.control(d).params,"syncCollection")?a.control(d).params.syncCollection:"",n=a.CZR_Helpers.build_setId(d),o=a.czr_skopeBase.getSkopeSettingVal(n,f),p=a.czr_skope(a.czr_activeSkopeId());c.isEmpty(m)||c.isUndefined(m)||(h=a.CZR_Helpers.build_setId(m),i=a.czr_skopeBase.getSkopeSettingVal(h,f),j=a.settings.controls[h],k=a.controlConstructor.czr_multi_module,l=a.control(h).syncSektionModule()().id,a.control(h).container.remove(),a.control.remove(h),a(h).silent_set(i,p.getSkopeSettingDirtyness(h)),b.extend(j,{czr_skope:f}),a.control.add(h,new k(h,{params:j,previewer:a.previewer}))),_constructor=a.controlConstructor[e],a.control(d).container.remove(),a.control.remove(d),a(d).silent_set(o,p.getSkopeSettingDirtyness(n)),b.extend(g,{czr_skope:f}),a.control.add(d,new _constructor(d,{params:g,previewer:a.previewer})),c.isEmpty(m)||c.isUndefined(m)||(a.consoleLog("FIRE SEKTION MODULE?",l,a.control(d).czr_Module(l).isReady.state()),a.control(d).czr_Module(l).fireSektionModule())},_getCzrCroppedImagePromise:function(d,e){var f=a.controlConstructor.czr_cropped_image,g=b.Deferred(),h=a.has(d)?a(d)():null;return h=null===h?"":h,wp.media.attachment(h).fetch().done(function(){a.control(d).container.remove(),a.control.remove(d),e.attachment=this.attributes,a.control.add(d,new f(d,{params:e,previewer:a.previewer})),g.resolve()}).fail(function(){a.control(d).container.remove(),a.control.remove(d),e=c.omit(e,"attachment"),a.control.add(d,new f(d,{params:e,previewer:a.previewer})),g.reject()}),g.promise()},_getHeaderImagePromise:function(d,e){var f=b.Deferred();if(!c.has(a.settings.controls,"header_image")||"header_image"!=d)return f.resolve().promise();var g=a.controlConstructor.header,h=b.extend(!0,{},a.settings.controls.header_image);header_image_data=null===a.czr_skopeBase.getSkopeSettingVal("header_image_data",e)?"":a.czr_skopeBase.getSkopeSettingVal("header_image_data",e);var i,j=function(b){b=b||h,a.control("header_image").container.remove(),a.control.remove("header_image"),a.HeaderTool.UploadsList=a.czr_HeaderTool.UploadsList,a.HeaderTool.DefaultsList=a.czr_HeaderTool.DefaultsList,a.HeaderTool.CombinedList=a.czr_HeaderTool.CombinedList;var d=function(){a.control.add("header_image",new g("header_image",{params:b,previewer:a.previewer}))};(d=c.debounce(d,800))()};return c.has(header_image_data,"attachment_id")?(i=header_image_data.attachment_id,wp.media.attachment(i).fetch().done(function(){h.attachment=this.attributes,j(h),f.resolve()}).fail(function(){h=c.omit(h,"attachment"),a.control("header_image").container.remove(),a.control.remove("header_image"),a.HeaderTool.UploadsList=a.czr_HeaderTool.UploadsList,a.HeaderTool.DefaultsList=a.czr_HeaderTool.DefaultsList,a.HeaderTool.CombinedList=a.czr_HeaderTool.CombinedList,a.control.add("header_image",new g("header_image",{params:h,previewer:a.previewer})),f.reject()})):(j(),f.resolve()),f.promise()}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{setupActiveSkopedControls:function(d){var e,f,g,h,i=this,j=b.Deferred();if(defaultSetupParams={controls:[],section_id:a.czr_activeSectionId()},g=b.extend(defaultSetupParams,d),!c.isObject(g)||!c.has(g,"controls")||!c.has(g,"section_id"))throw new Error("setupActiveSkopedControls : the setupParams param must be an object with properties controls and section_id.");return e=g.section_id,f=g.controls,h=[],!c.isEmpty(e)&&c.isString(e)||(e=a.czr_activeSectionId()),c.isEmpty(f)&&(f=a.CZR_Helpers.getSectionControlIds(e)),f=c.isString(f)?[f]:f,h=c.filter(f,function(b){var c=a.CZR_Helpers.getControlSettingId(b);return c&&!i.isSettingSkopeEligible(c)&&a.control(b).container.addClass("czr-not-skoped"),c&&i.isWPAuthorizedSetting(c)&&a.control(b).container.addClass("is-wp-authorized-setting"),c&&i.isSettingSkopeEligible(c)}),"nav_menu["==e.substring(0,"nav_menu[".length)?j.resolve().promise():(c.isEmpty(f)||(a.czr_skopeReady.then(function(){b.when(i.renderControlsSingleReset(h)).done(function(){c.each(f,function(a){i.listenSkopedControl(a)}),j.resolve()})}),"rejected"==a.czr_skopeReady.state()&&j.resolve()),i.renderCtrlSkpNotIcon(f),j.promise())},listenSkopedControl:function(d){var e=this;if(a.has(d)&&!c.isUndefined(a.control(d))){var f=a.control(d),g=a.CZR_Helpers.getControlSettingId(d),h=(a.CZR_Helpers.getOptionName(g),{hasDBVal:!1,isDirty:!1,noticeVisible:!1,resetVisible:!1,isResetting:!1});if(!c.has(f,"czr_states")){f.czr_states=new a.Values,c.each(h,function(a,b){f.czr_states.create(b),f.czr_states(b)(a)});try{e.bindControlStates(f)}catch(i){a.errorLog("bindControlStates : "+i)}}f.czr_states("hasDBVal")(a.czr_skope(a.czr_activeSkopeId()).hasSkopeSettingDBValues(g)),f.czr_states("isDirty")(a.czr_skope(a.czr_activeSkopeId()).getSkopeSettingDirtyness(g)),c.has(f,"userEventMap")||(f.userEventMap=[{trigger:"click keydown",selector:".czr-setting-reset, .czr-cancel-button",name:"control_reset_warning",actions:function(){(f.czr_states("isDirty")()||f.czr_states("hasDBVal")())&&(c.each(c.without(a.CZR_Helpers.getSectionControlIds(f.section()),d),function(b){c.has(a.control(b),"czr_states")&&a.control(b).czr_states("resetVisible")(!1)}),f.czr_states("resetVisible")(!f.czr_states("resetVisible")()),f.czr_states("noticeVisible")(!f.czr_states("resetVisible")()))}},{trigger:"click keydown",selector:".czr-control-do-reset",name:"control_do_reset",actions:function(){e.doResetSetting(d)}},{trigger:"click keydown",selector:".czr-skope-switch",name:"control_skope_switch",actions:function(d){var e=b(d.dom_event.currentTarget,d.dom_el).attr("data-skope-id");!c.isEmpty(e)&&a.czr_skope.has(e)&&a.czr_activeSkopeId(e)}},{trigger:"click keydown",selector:".czr-toggle-notice",name:"control_toggle_notice",actions:function(a){f.czr_states("noticeVisible")(!f.czr_states("noticeVisible")()),f.czr_states("noticeVisible")()&&f.czr_states("resetVisible")(!1)}}],a.CZR_Helpers.setupDOMListeners(f.userEventMap,{dom_el:f.container},e))}},bindControlStates:function(d){if(!a.control.has(d.id))throw new Error("in bindControlStates, the provided ctrl id is not registered in the api : "+d.id);var e=this;a.CZR_Helpers.getControlSettingId(d.id);d.czr_states("hasDBVal").bind(function(a){d.container.toggleClass("has-db-val",a),a?_title=serverControlParams.i18n.skope["Reset your customized ( and published ) value"]:d.czr_states("isDirty")()?_title=serverControlParams.i18n.skope["Reset your customized ( but not yet published ) value"]:_title=serverControlParams.i18n.skope["Not customized yet, nothing to reset"],d.container.find(".czr-setting-reset").attr("title",_title)}),d.czr_states("isDirty").bind(function(a){d.container.toggleClass("is-dirty",a);var b;b=a?serverControlParams.i18n.skope["Reset your customized ( but not yet published ) value"]:d.czr_states("hasDBVal")()?serverControlParams.i18n.skope["Reset your customized ( and published ) value"]:serverControlParams.i18n.skope["Not customized yet, nothing to reset"],d.container.find(".czr-setting-reset").attr("title",b)}),d.czr_states("noticeVisible").bind(function(a){d.container.toggleClass("czr-notice-visible",a);var c=d.getNotificationsContainerElement();!1!==c&&!1!==c.length&&(a?(e.updateCtrlSkpNot(d.id,!0),c.stop().slideDown("fast",null,function(){b(this).css("height","auto")})):b.when(c.stop().slideUp("fast",null,function(){b(this).css("height","auto")})).done(function(){e.removeCtrlSkpNot(d.id)}))}),d.czr_states("resetVisible").bind(function(f){d.section()||a.czr_activeSectionId();f?b.when(e.renderControlResetWarningTmpl(d.id)).done(function(a){c.isEmpty(a)||(d.czr_resetDialogContainer=a.container,a.container.slideToggle("fast"),a.is_authorized||c.delay(function(){b.when(d.czr_resetDialogContainer.slideToggle("fast")).done(function(){d.czr_resetDialogContainer.remove()})},3e3))}):c.has(d,"czr_resetDialogContainer")&&d.czr_resetDialogContainer.length&&b.when(d.czr_resetDialogContainer.slideToggle("fast")).done(function(){d.czr_resetDialogContainer.remove()})})}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{renderControlsSingleReset:function(d){var e=this,f=b.Deferred();(c.isUndefined(d)||c.isEmpty(d))&&(d=a.CZR_Helpers.getSectionControlIds(a.czr_activeSectionId()),d=c.filter(d,function(b){var c=a.CZR_Helpers.getControlSettingId(b);return c&&e.isSettingSkopeEligible(c)}));var g=c.isArray(d)?d:[d],h=function(d){return c.isEmpty(d)?void f.resolve():void c.each(d,function(c){a.control.when(c,function(){var d=a.control(c);a.CZR_Helpers.getControlSettingId(c);return b(".czr-setting-reset",d.container).length?void f.resolve():void d.deferred.embedded.then(function(){b.when(d.container.find(".customize-control-title").first().prepend(b("<span/>",{"class":"czr-setting-reset fa fa-refresh",title:""}))).done(function(){d.container.addClass("czr-skoped"),b(".czr-setting-reset",d.container).fadeIn(400),f.resolve()})})})})};return h=c.debounce(h,200),h(g),f.promise()},renderControlResetWarningTmpl:function(d){if(!a.control.has(d))return{};var e,f,g=a.control(d),h=a.CZR_Helpers.getControlSettingId(d),i="",j=function(){return!!c.contains(serverControlParams.wpBuiltinSettings,a.CZR_Helpers.getOptionName(h))||!c.contains(serverControlParams.themeSettingList,a.CZR_Helpers.getOptionName(h))}(),k=a.czr_skope(a.czr_activeSkopeId())();g.czr_states("isDirty")()?(e=["global"==k.skope?serverControlParams.i18n.skope["Please confirm that you want to reset your current customizations for this option"]:serverControlParams.i18n.skope["Please confirm that you want to reset your current customizations for this option in"],"global"==k.skope?serverControlParams.i18n.skope.sitewide:k.ctx_title].join(" "),f=serverControlParams.i18n.skope["Your customizations have been reset"]):j&&"global"==k.skope?e=serverControlParams.i18n.skope["This WordPress setting can not be reset sitewide"]:(e=["global"==k.skope?serverControlParams.i18n.skope["Please confirm that you want to reset this option"]:serverControlParams.i18n.skope["Please confirm that you want to reset this option in"],"global"==k.skope?serverControlParams.i18n.skope.sitewide:k.ctx_title].join(" "),
23
- f=serverControlParams.i18n.skope["The option has been reset"]);var l=!(j&&"global"==a.czr_skope(a.czr_activeSkopeId())().skope&&!g.czr_states("isDirty")()),m={warning_message:e+".",success_message:f+".",is_authorized:l};try{i=wp.template("czr-reset-control")(m)}catch(n){return a.errorLog("Error when parsing the the reset control template : "+n),{container:!1,is_authorized:!1}}return b(".customize-control-title",g.container).first().after(b(i)),{container:b(".czr-ctrl-reset-warning",g.container),is_authorized:l}},doResetSetting:function(d){var e=this,f=a.CZR_Helpers.getControlSettingId(d),g=a.control(d),h=a.czr_activeSkopeId(),i=g.czr_states("isDirty")()?"_resetControlDirtyness":"_resetControlAPIVal",j=function(){var a=this;a.czr_states("resetVisible")(!1),a.czr_states("isResetting")(!1),a.container.removeClass("czr-resetting-control")},k=function(d){var g=function(){a.czr_skopeBase.processSilentUpdates({candidates:d,refresh:!1}).fail(function(){a.consoleLog("Silent update failed after resetting control : "+d)}).done(function(){a.control.when(d,function(){var f=a.control(d);b.when(b(".czr-crtl-reset-dialog",f.container).fadeOut("300")).done(function(){b.when(b(".czr-reset-success",f.container).fadeIn("300")).done(function(a){c.delay(function(){b.when(a.fadeOut("300")).done(function(){e.setupActiveSkopedControls({controls:[d]}).done(function(){f.czr_states&&(j.call(f),f.czr_states("noticeVisible")(e.isCtrlNoticeVisible(d)))})})},500)})})})})};e[i](d).done(function(){a.consoleLog("REFRESH AFTER A SETTING RESET"),a.previewer.refresh().fail(function(b){a.errorLog("Setting reset refresh failed.",b)}).done(function(b){if("global"==a.czr_skope(h)().skope&&"_resetControlAPIVal"==i){var d,e={},j=a.czr_skope(h)().opt_name;!c.isUndefined(b.skopesServerData)&&c.has(b.skopesServerData,"czr_skopes")&&(d=b.skopesServerData.czr_skopes,c.isUndefined(c.findWhere(d,{opt_name:j}))&&(e=c.findWhere(d,{opt_name:j}).db||{})),a.czr_skopeBase.maybeSynchronizeGlobalSkope({isGlobalReset:!0,isSetting:!0,settingIdToReset:f}).done(function(){g()})}else g()})})};g.czr_states("isResetting")(!0),g.container.addClass("czr-resetting-control"),a.czr_skopeReset[g.czr_states("isDirty")()?"resetChangeset":"resetPublished"]({skope_id:h,setId:f,is_setting:!0}).done(function(a){k(d)}).fail(function(f){a.errorLog("Reset failed",f),b.when(b(".czr-crtl-reset-dialog",g.container).fadeOut("300")).done(function(){b.when(b(".czr-reset-fail",g.container).fadeIn("300")).done(function(){b(".czr-reset-fail",g.container).append("<p>"+f+"</p>"),c.delay(function(){j.call(g),e.setupActiveSkopedControls({controls:[d]})},2e3)})})})},_resetControlDirtyness:function(d){var e=a.CZR_Helpers.getControlSettingId(d),f=a.czr_skope(a.czr_activeSkopeId()),g=b.extend(!0,{},f.dirtyValues()),h={},i=b.extend(!0,{},f.changesetValues()),j={},k=b.Deferred();return h=c.omit(g,e),j=c.omit(i,e),f.dirtyValues(h),f.changesetValues(h),k.resolve().promise()},_resetControlAPIVal:function(d){var e=a.CZR_Helpers.getControlSettingId(d),f=a.czr_skope(a.czr_activeSkopeId()).dbValues(),g=b.extend(!0,{},f),h=b.Deferred();return c.has(a.control(d),"czr_states")&&(a.control(d).czr_states("hasDBVal")(!1),a.czr_skope(a.czr_activeSkopeId()).dbValues(c.omit(g,e))),h.resolve().promise()}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{renderCtrlSkpNotIcon:function(d){var e=c.isArray(d)?d:[d];c.each(e,function(c){a.control.when(c,function(){var d=a.control(c);d.deferred.embedded.then(function(){b(".czr-toggle-notice",d.container).length||b.when(d.container.find(".customize-control-title").first().append(b("<span/>",{"class":"czr-toggle-notice fa fa-info-circle",title:serverControlParams.i18n.skope["Display informations about the scope of this option."]}))).done(function(){b(".czr-toggle-notice",d.container).fadeIn(400)})})})})},updateCtrlSkpNot:function(d,e){var f=this,g=c.isArray(d)?d:[d],h=function(a){return a&&f.isSettingSkopeEligible(a)},i=function(b,d){var e,g,i,j=a.czr_activeSkopeId(),k=f.getInheritedSkopeId(b,j),l=f.getAppliedPrioritySkopeId(b,j),m=[];return h(b)?(k==l&&a.czr_skope.has(k)&&j==k&&(e=!c.isUndefined(a.czr_skope(j).dirtyValues()[b]),g=!c.isUndefined(a.czr_skope(j).dbValues()[b]),i=a.czr_skope(k)().ctx_title,i=(c.isString(i)?i:"").toLowerCase(),e?"global"==a.czr_skope(k)().skope?m.push([serverControlParams.i18n.skope["Customized. Will be applied sitewide once published."]].join(" ")):m.push([serverControlParams.i18n.skope["Customized. Will be applied to"],"<strong>"+i+"</strong>",serverControlParams.i18n.skope["once published."]].join(" ")):g?"global"==a.czr_skope(k)().skope?m.push([serverControlParams.i18n.skope["Customized and applied sitewide."]].join(" ")):m.push([serverControlParams.i18n.skope["Customized and applied to"],"<strong>"+i+".</strong>"].join(" ")):m.push(serverControlParams.i18n.skope["Default website value applied sitewide."])),k!==j&&a.czr_skope.has(k)&&(e=!c.isUndefined(a.czr_skope(k).dirtyValues()[b]),g=!c.isUndefined(a.czr_skope(k).dbValues()[b]),i=a.czr_skope(j)().ctx_title,i=(c.isString(i)?i:"").toLowerCase(),e||g?m.push([serverControlParams.i18n.skope["Currently inherited from"],f.buildSkopeLink(k)+".",serverControlParams.i18n.skope["You can customize this specifically for"],"<strong>"+i+".</strong>"].join(" ")):m.push([serverControlParams.i18n.skope["Default website value."],serverControlParams.i18n.skope["You can customize this specifically for"],"<strong>"+i+".</strong>"].join(" "))),l!==j&&a.czr_skope.has(l)&&(e=!c.isUndefined(a.czr_skope(l).dirtyValues()[b]),i=a.czr_skope(d)().ctx_title,i=(c.isString(i)?i:"").toLowerCase(),m.push([e?serverControlParams.i18n.skope["The value that will be applied to"]:serverControlParams.i18n.skope["The value currently applied to"],"<strong>"+i+"</strong>",e?serverControlParams.i18n.skope["is customized in"]:serverControlParams.i18n.skope["is set in"],f.buildSkopeLink(l),serverControlParams.i18n.skope["which has a higher priority than the current option scope"],"<strong>( "+a.czr_skope(j)().title+" ).</strong>"].join(" "))),m.join(" | ")):(m.push([serverControlParams.i18n.skope["This option is always customized sitewide and cannot be reset."]].join(" ")),m.join(" | "))};c.each(g,function(d){a.control.when(d,function(){var f=a.control(d),g=a.CZR_Helpers.getControlSettingId(d),h=c.isUndefined(e)?f.czr_states&&f.czr_states("noticeVisible")():e;h&&f.deferred.embedded.then(function(){var d=c.findWhere(a.czr_currentSkopesCollection(),{skope:"local"}).id,e=f.getNotificationsContainerElement();if(e&&e.length&&!c.isUndefined(d)){try{_html=i(g,d)}catch(h){a.errorLog("_generateControlNotice : "+h)}var j=b(".czr-skope-notice",e);j.length?j.html(_html):e.append(['<span class="czr-notice czr-skope-notice">',_html,"</span>"].join(""))}})})})},isCtrlNoticeVisible:function(b){if(!a.control.has(b))return!1;var c=this,d=a.CZR_Helpers.getControlSettingId(b),e=a.czr_activeSkopeId(),f=c.getAppliedPrioritySkopeId(d,e);return"global"!=a.czr_skope(e)().skope||!(f===e||!a.czr_skope.has(f))},removeCtrlSkpNot:function(d){var e=c.isArray(d)?d:[d];c.each(e,function(c){a.control.when(c,function(){var d=a.control(c);d.deferred.embedded.then(function(){var a=d.getNotificationsContainerElement();if(a&&a.length){var c=b(".czr-skope-notice",a);c.length&&c.remove()}})})})}})}(wp.customize,jQuery,_);var CZRSkopeResetMths=CZRSkopeResetMths||{};!function(a,b,c){b.extend(CZRSkopeResetMths,{initialize:function(){var c=this;c.previewer=a.previewer,a.state.create("czr-resetting")(!1),a.state("czr-resetting").bind(function(a){b(document.body).toggleClass("czr-resetting",!1!==a)})},resetChangeset:function(d){var e,f,g,h,i,j=b.Deferred(),k=this,l=a.state("processing"),m={is_setting:!1,is_skope:!1,skope_id:a.czr_activeSkopeId()||"",setId:""};d=c.extend(m,d);var n=d.skope_id,o=d.setId;return a.czr_isChangeSetOn()?(f=function(e,f){if(c.isUndefined(e))throw new Error("RESET: MISSING skope_id");if(a.state("czr-resetting")(!0),h={skope_id:e,action:"reset"},i=b.extend(k.previewer.query(h),{nonce:k.previewer.nonce.save}),d.is_setting)b.extend(i,{setting_id:f}),g="czr_changeset_setting_reset";else{if(!d.is_skope)return j.reject("reset_ajax_action_not_specified").promise();g="czr_changeset_skope_reset"}wp.ajax.post(g,i).always(function(){a.state("czr-resetting")(!1)}).fail(function(b){"0"===b?b="not_logged_in":"-1"===b&&(b="invalid_nonce"),"invalid_nonce"===b?k.previewer.cheatin():"not_logged_in"===b&&(k.previewer.preview.iframe.hide(),k.previewer.login().done(function(){k.resetChangeset(d),k.previewer.preview.iframe.show()})),a.consoleLog(g+" failed ",i,b),b=a.czr_skopeBase.buildServerResponse(b),a.trigger("error",b),a.czr_serverNotification({message:b,status:"error"}),j.reject(b)}).done(function(a){j.resolve(a)})},0===l()&&!1===a.state("czr-resetting")()?f(n,o):(e=function(){0===l()&&!1===a.state("czr-resetting")()&&(a.state.unbind("change",e),f(n,o))},a.state.bind("change",e)),j.promise()):j.resolve().promise()},resetPublished:function(d){var e,f,g,h,i,j=b.Deferred(),k=this,l=a.state("processing"),m={is_setting:!1,is_skope:!1,skope_id:a.czr_activeSkopeId()||"",setId:""};d=c.extend(m,d);var n=d.skope_id,o=d.setId;return f=function(e,f){if(c.isUndefined(e))throw new Error("RESET: MISSING skope_id");if(a.state("czr-resetting")(!0),h={skope_id:e,action:"reset"},i=b.extend(k.previewer.query(h),{nonce:k.previewer.nonce.save}),d.is_setting)b.extend(i,{setting_id:f}),g="czr_published_setting_reset";else{if(!d.is_skope)return j.reject("reset_ajax_action_not_specified").promise();g="czr_published_skope_reset"}a.consoleLog("in czr_reset submit : ",e,i),wp.ajax.post(g,i).always(function(){a.state("czr-resetting")(!1)}).fail(function(b){"0"===b?b="not_logged_in":"-1"===b&&(b="invalid_nonce"),"invalid_nonce"===b?k.previewer.cheatin():"not_logged_in"===b&&(k.previewer.preview.iframe.hide(),k.previewer.login().done(function(){k.resetChangeset(d),k.previewer.preview.iframe.show()})),a.consoleLog(g+" failed ",i,b),b=a.czr_skopeBase.buildServerResponse(b),a.trigger("error",b),a.czr_serverNotification({message:b,status:"error"}),j.reject(b)}).done(function(a){j.resolve(a)})},0===l()&&!1===a.state("czr-resetting")()?f(n,o):(e=function(){0===l()&&!1===a.state("czr-resetting")()&&(a.state.unbind("change",e),f(n,o))},a.state.bind("change",e)),j.promise()}})}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(a,b,c){b.extend(CZRSkopeBaseMths,{initWidgetSidebarSpecifics:function(){var c=this;c.isExcludedSidebarsWidgets()||a.czr_activeSkopeId.bind(function(b){c.forceSidebarDirtyRefresh(a.czr_activeSectionId(),b)}),b(document).bind("widget-added",function(b,d){if(!c.isExcludedSidebarsWidgets()){var e=d.closest(".customize-control").attr("id"),f=a.czr_skopeBase.widgetIdToSettingId(e,"customize-control-");if(!a.has(f))throw new Error("AN ADDED WIDGET COULD NOT BE BOUND IN SKOPE. "+f);c.listenAPISettings(f)}})},forceSidebarDirtyRefresh:function(b,d){var e=this;if(!e.isExcludedSidebarsWidgets()){var f=a.state("saved")(),g=function(){if(a.section.has(b)&&"sidebar"==a.section(b).params.type){var c=c||a.czr_activeSkopeId(),d="sidebars_widgets["+a.section(b).params.sidebarId+"]",g=e.getSkopeSettingVal(d,c);a.czr_skope(c).updateSkopeDirties(d,g),a.previewer.refresh({the_dirties:a.czr_skope(c).dirtyValues()}).done(function(){a.state("saved")(f)})}};g=c.debounce(g,500),g()}}})}(wp.customize,jQuery,_);var CZRSkopeMths=CZRSkopeMths||{};!function(a,b,c){b.extend(CZRSkopeMths,{initialize:function(d,e){var f=this;a.Value.prototype.initialize.call(f,null,e),f.isReady=b.Deferred(),f.embedded=b.Deferred(),f.el="czr-scope-"+d,b.extend(f,e||{}),f.visible=new a.Value((!0)),f.winner=new a.Value((!1)),f.priority=new a.Value,f.active=new a.Value((!1)),f.dirtyness=new a.Value((!1)),f.skopeResetDialogVisibility=new a.Value((!1)),f.hasDBValues=new a.Value((!1)),f.dirtyValues=new a.Value({}),f.dbValues=new a.Value({}),f.changesetValues=new a.Value({}),f.userEventMap=new a.Value([{trigger:"click keydown",selector:".czr-scope-switch, .czr-skp-switch-link",name:"skope_switch",actions:function(){a.czr_activeSkopeId(f().id)}},{trigger:"click keydown",selector:".czr-scope-reset",name:"skope_reset_warning",actions:"reactOnSkopeResetUserRequest"}]),f.skopeResetDialogVisibility.bind(function(a,b){return f.skopeResetDialogReact(a)},{deferred:!0}),f.dirtyValues.callbacks.add(function(){return f.dirtyValuesReact.apply(f,arguments)}),f.changesetValues.callbacks.add(function(){return f.changesetValuesReact.apply(f,arguments)}),f.dbValues.callbacks.add(function(){return f.dbValuesReact.apply(f,arguments)}),f.callbacks.add(function(){return f.skopeReact.apply(f,arguments)}),f.set(c.omit(e,function(a,b){return c.contains(["db","changeset","has_db_val"],b)})),f.setupObservableViewValuesCallbacks(),f.dirtyness(!c.isEmpty(e.changeset)),f.hasDBValues(!c.isEmpty(e.db)),f.winner(e.is_winner),f.embedded.fail(function(){throw new Error("The container of skope "+f().id+" has not been embededd")}).done(function(){f.setupDOMListeners(f.userEventMap(),{dom_el:f.container}),f.isReady.resolve()})},ready:function(){var c=this;a.czr_skopeBase.skopeWrapperEmbedded.done(function(){try{b.when(c.embedSkopeDialogBox()).done(function(a){!1!==a.length?(a.css("background-color",c.color),c.container=a,c.embedded.resolve(a)):c.embedded.reject()})}catch(d){a.errorLog("In skope base : "+d),c.embedded.reject()}})},dirtyValuesReact:function(b,d){var e=this;e.dirtyness(!c.isEmpty(b)),a.czr_dirtyness(!c.isEmpty(b));var f=[];c.each(d,function(a,d){c.has(b,d)||f.push(d)}),e().id==a.czr_activeSkopeId()&&(c.each(f,function(b){c.has(a.control(b),"czr_states")&&a.control(b).czr_states("isDirty")(!1)}),c.each(b,function(b,d){c.has(a.control(d),"czr_states")&&a.control(d).czr_states("isDirty")(!0)}))},changesetValuesReact:function(a,c){var d=this,e=b.extend(!0,{},d.dirtyValues());d.dirtyValues(b.extend(e,a))},dbValuesReact:function(b,d){var e=this;e.hasDBValues(!c.isEmpty("global"!=e().skope?b:c.omit(b,function(b,c){return!a.czr_skopeBase.isThemeSetting(c)})));var f=[];c.each(d,function(a,d){c.has(b,d)||f.push(d)}),e().id==a.czr_activeSkopeId()&&(c.each(f,function(b){c.has(a.control(b),"czr_states")&&a.control(b).czr_states("hasDBVal")(!1)}),c.each(b,function(b,d){c.has(a.control(d),"czr_states")&&a.control(d).czr_states("hasDBVal")(!0)}))},skopeReact:function(d,e){var f=this,g=[],h=[];a.czr_skopeBase.isSkopeRegisteredInCollection(d.id)?(g=b.extend(!0,[],a.czr_skopeCollection()),h=g,c.each(g,function(a,b){a.id==f().id&&(h[b]=d)}),a.czr_skopeCollection(h)):(g=b.extend(!0,[],a.czr_skopeCollection()),g.push(d),a.czr_skopeCollection(g))},setupObservableViewValuesCallbacks:function(){var a=this;a.visible.bind(function(b){"pending"==a.embedded.state()?a.embedded.done(function(){a.container.toggle(b)}):a.container.toggle(b)}),a.active.bind(function(){"pending"==a.embedded.state()?a.embedded.done(function(){a.activeStateReact.apply(a,arguments)}):a.activeStateReact.apply(a,arguments)}),a.dirtyness.bind(function(){"pending"==a.embedded.state()?a.embedded.done(function(){a.dirtynessReact.apply(a,arguments)}):a.dirtynessReact.apply(a,arguments)}),a.hasDBValues.bind(function(){"pending"==a.embedded.state()?a.embedded.done(function(){a.hasDBValuesReact.apply(a,arguments)}):a.hasDBValuesReact.apply(a,arguments)}),a.winner.bind(function(){"pending"==a.embedded.state()?a.embedded.done(function(){a.winnerReact.apply(a,arguments)}):a.winnerReact.apply(a,arguments)})},activeStateReact:function(a,c){var d=this;d.container.toggleClass("inactive",!a).toggleClass("active",a),b(".czr-scope-switch",d.container).toggleClass("fa-toggle-on",a).toggleClass("fa-toggle-off",!a)},dirtynessReact:function(a,c){var d=this;b.when(this.container.toggleClass("dirty",a)).done(function(){a?b(".czr-scope-reset",d.container).fadeIn("slow").attr("title",[serverControlParams.i18n.skope["Reset the current customizations for"],d().title].join(" ")):d.hasDBValues()||b(".czr-scope-reset",d.container).fadeOut("fast")})},hasDBValuesReact:function(a,c){var d=this;b.when(d.container.toggleClass("has-db-val",a)).done(function(){a?b(".czr-scope-reset",d.container).fadeIn("slow").attr("title",["global"==d().skope?serverControlParams.i18n.skope["Reset the theme options published sitewide"]:serverControlParams.i18n.skope["Reset your website published options for"],"global"==d().skope?"":d().title].join(" ")):d.dirtyness()||b(".czr-scope-reset",d.container).fadeOut("fast")})},winnerReact:function(d){var e=this;this.container.toggleClass("is_winner",d),d&&c.each(a.czr_currentSkopesCollection(),function(c){if(c.id!=e().id){var d=b.extend(!0,{},c);b.extend(d,{is_winner:!1}),a.czr_skope(c.id)(d)}})},updateSkopeDirties:function(c,d){var e=this;a.CZR_Helpers.getOptionName(c);if(!a.czr_skopeBase.isSettingSkopeEligible(c)&&"global"!=e().skope)return a.czr_skope(a.czr_skopeBase.getGlobalSkopeId()).updateSkopeDirties(c,d);var f=b.extend(!0,{},e.dirtyValues()),g={};return g[c]=d,e.dirtyValues.set(b.extend(f,g)),e.dirtyValues()},getSkopeSettingDirtyness:function(a){var b=this;return b.getSkopeSettingAPIDirtyness(a)||b.getSkopeSettingChangesetDirtyness(a)},getSkopeSettingAPIDirtyness:function(b){var d=this;return c.has(d.dirtyValues(),a.CZR_Helpers.build_setId(b))},getSkopeSettingChangesetDirtyness:function(b){var d=this;return a.czr_isChangeSetOn()?c.has(d.changesetValues(),a.CZR_Helpers.build_setId(b)):d.getSkopeSettingAPIDirtyness(b)},hasSkopeSettingDBValues:function(b){var d=a.CZR_Helpers.build_setId(b);return!c.isUndefined(a.czr_skope(a.czr_activeSkopeId()).dbValues()[d])}})}(wp.customize,jQuery,_);var CZRSkopeMths=CZRSkopeMths||{};!function(a,b,c){b.extend(CZRSkopeMths,{embedSkopeDialogBox:function(){var d=this,e=b.extend(!0,{},d()),f="";if(!b("#customize-header-actions").find(".czr-scope-switcher").length)throw new Error("The skope switcher wrapper is not printed, the skope can not be embedded.");try{f=wp.template("czr-skope")(c.extend(e,{el:d.el}))}catch(g){return a.errorLog("Error when parsing the template of a skope"+g),!1}return b(".czr-skopes-wrapper","#customize-header-actions").append(b(f)),b("."+d.el,".czr-skopes-wrapper")},renderResetWarningTmpl:function(){var d,e,f=this,g=b.extend(!0,{},f()),h="";f.dirtyness()?(d=[serverControlParams.i18n.skope["Please confirm that you want to reset your current ( not published ) customizations for"],f().ctx_title].join(" "),e=[serverControlParams.i18n.skope["Your customizations have been reset for"],f().ctx_title].join(" ")):(d=["global"==f().skope?serverControlParams.i18n.skope["Please confirm that you want to reset your sitewide published customizations. Note : this will not reset the customizations made in other option scopes"]:serverControlParams.i18n.skope["Please confirm that you want to reset your published customizations for"],"global"==f().skope?"":f().ctx_title].join(" "),e=[serverControlParams.i18n.skope["Your published customizations have been reset for"],f().title].join(" "));try{h=wp.template("czr-skope-pane")(c.extend(g,{el:f.el,warning_message:d+".",success_message:e+"."}))}catch(i){return a.errorLog("Error when parsing the the reset skope template : "+i),!1}return b("#customize-preview").after(b(h)),b("#czr-skope-pane")},getEl:function(){var a=this;return b(a.el,"#customize-header-actions")}})}(wp.customize,jQuery,_);var CZRSkopeMths=CZRSkopeMths||{};!function(a,b,c){b.extend(CZRSkopeMths,{reactOnSkopeResetUserRequest:function(){var b=this,c=function(){a.state("czr-resetting")(!0),a.czr_activeSkopeId()!=b().id?a.czr_activeSkopeId(b().id).done(function(){b.skopeResetDialogVisibility(!b.skopeResetDialogVisibility()).done(function(){a.state("czr-resetting")(!1)})}):b.skopeResetDialogVisibility(!b.skopeResetDialogVisibility()).done(function(){a.state("czr-resetting")(!1)})};return a.state("czr-resetting")()||0!==a.state("processing")()?void a.czr_serverNotification({message:"Slow down, you move too fast !",status:"success",auto_collapse:!0}):void(a.czr_activeSkopeId()!=b().id&&a.czr_skope(a.czr_activeSkopeId()).skopeResetDialogVisibility()?a.czr_skope(a.czr_activeSkopeId()).skopeResetDialogVisibility(!1).done(function(){c()}):c())},skopeResetDialogReact:function(d){var e=this,f=b.Deferred();return e.userResetEventMap=e.userResetEventMap||new a.Value([{trigger:"click keydown",selector:".czr-scope-reset-cancel",name:"skope_reset_cancel",actions:function(){e.skopeResetDialogVisibility(!e.skopeResetDialogVisibility())}},{trigger:"click keydown",selector:".czr-scope-do-reset",name:"skope_do_reset",actions:"doResetSkopeValues"}]),d?(a.czr_isResettingSkope(e().id),b.when(e.renderResetWarningTmpl()).done(function(a){e.resetPanel=a,e.resetPanel.addClass(e.dirtyness()?"dirty-reset":"db-reset"),e.setupDOMListeners(e.userResetEventMap(),{dom_el:e.resetPanel})}).then(function(){setTimeout(function(){var a=b("#customize-preview").height();e.resetPanel.css("line-height",a+"px").css("height",a+"px"),b("body").addClass("czr-skope-pane-open")},50)})):b.when(b("body").removeClass("czr-skope-pane-open")).done(function(){c.has(e,"resetPanel")&&!1!==e.resetPanel.length&&setTimeout(function(){e.resetPanel.remove(),a.czr_isResettingSkope(!1)},300)}),c.delay(function(){f.resolve()},350),f.promise()},doResetSkopeValues:function(){var d=this,e=d().id,f=d.dirtyness()?"_resetSkopeDirties":"_resetSkopeAPIValues",g=function(){var g=function(){a.czr_skopeBase.processSilentUpdates({refresh:!1}).fail(function(){a.consoleLog("Silent update failed after resetting skope : "+e)}).done(function(){b.when(b(".czr-reset-warning",d.resetPanel).fadeOut("300")).done(function(){b.when(b(".czr-reset-success",d.resetPanel).fadeIn("300")).done(function(){c.delay(function(){a.czr_isResettingSkope(!1),d.skopeResetDialogVisibility(!1)},2e3)})})})};d[f]().done(function(){a.previewer.refresh().fail(function(b){a.consoleLog("SKOPE RESET REFRESH FAILED",b)}).done(function(b){if("global"==a.czr_skope(e)().skope&&"_resetSkopeAPIValues"==f){var d,h={},i=a.czr_skope(e)().opt_name;!c.isUndefined(b.skopesServerData)&&c.has(b.skopesServerData,"czr_skopes")&&(d=b.skopesServerData.czr_skopes,c.isUndefined(c.findWhere(d,{opt_name:i}))&&(h=c.findWhere(d,{opt_name:i}).db||{})),a.czr_skopeBase.maybeSynchronizeGlobalSkope({isGlobalReset:!0,isSkope:!0,skopeIdToReset:e}).done(function(){g()})}else g()})})};b("body").addClass("czr-resetting-skope"),a.czr_skopeReset[d.dirtyness()?"resetChangeset":"resetPublished"]({skope_id:d().id,is_skope:!0}).always(function(){b("body").removeClass("czr-resetting-skope")}).done(function(a){g()}).fail(function(b){d.skopeResetDialogVisibility(!1),a.consoleLog("Skope reset failed",b)})},_resetSkopeDirties:function(){var a=this,c=b.Deferred();return a.dirtyValues({}),a.changesetValues({}),c.resolve().promise()},_resetSkopeAPIValues:function(){var a=this,c=b.Deferred();return a.dbValues({}),c.resolve().promise()}})}(wp.customize,jQuery,_),function(a,b,c){b.extend(CZRSkopeBaseMths,a.Events),b.extend(CZRSkopeMths,a.Events),b.extend(CZRSkopeMths,a.CZR_Helpers),a.CZR_skopeBase=a.Class.extend(CZRSkopeBaseMths),a.CZR_skopeReset=a.Class.extend(CZRSkopeResetMths),a.CZR_skope=a.Value.extend(CZRSkopeMths),c.has(a,"HeaderTool")&&(a.czr_HeaderTool=b.extend(!0,{},a.HeaderTool))}(wp.customize,jQuery,_),function(a,b,c){a.bind("ready",function(){var d=function(){a.section("themes").active.bind(function(d){c.has(serverControlParams,"isThemeSwitchOn")&&c.isEmpty(serverControlParams.isThemeSwitchOn)&&(a.section("themes").active(serverControlParams.isThemeSwitchOn),a.section("themes").active.callbacks=b.Callbacks())})};a.section.has("themes")?d():a.section.when("themes",function(a){d()})})}(wp.customize,jQuery,_),function(a,b,c){a.czr_activeSectionId=new a.Value(""),a.czr_activePanelId=new a.Value(""),"function"==typeof a.Section&&a.control.bind("add",function(b){b.params.ubq_section&&b.params.ubq_section.section&&(b.params.original_priority=b.params.priority,b.params.original_section=b.params.section,a.section.when(b.params.ubq_section.section,function(a){a.expanded.bind(function(a){a?(b.params.ubq_section.priority&&b.priority(b.params.ubq_section.priority),b.section(b.params.ubq_section.section)):(b.priority(b.params.original_priority),b.section(b.params.original_section))})}))}),"function"==typeof a.Panel&&a.section.bind("add",function(b){b.params.ubq_panel&&b.params.ubq_panel.panel&&(b.params.original_priority=b.params.priority,b.params.original_panel=b.params.panel,a.panel.when(b.params.ubq_panel.panel,function(a){a.expanded.bind(function(a){a?(b.params.ubq_panel.priority&&b.priority(b.params.ubq_panel.priority),b.panel(b.params.ubq_panel.panel)):(b.priority(b.params.original_priority),b.panel(b.params.original_panel))})}))});var d=function(){c.has(a,"czr_ModOptVisible")&&a.czr_ModOptVisible(!1)};a.czr_activeSectionId.bind(d),a.czr_activePanelId.bind(d),a.bind("ready",function(){if("function"!=typeof a.Section)throw new Error("Your current version of WordPress does not support the customizer sections needed for this theme. Please upgrade WordPress to the latest version.");var b=function(b,c){a.czr_activeSectionId(b?c:"")};a.section.each(function(a){"publish_settings"!=a.id&&a.expanded.bind(function(c){b(c,a.id)})}),a.section.bind("add",function(c){"publish_settings"!=c.id&&(a.trigger("czr-paint",{active_panel_id:c.panel()}),c.expanded.bind(function(a){b(a,c.id)}))});var d=function(b,d){a.czr_activePanelId(b?d:""),c.isEmpty(a.czr_activePanelId())&&a.czr_activeSectionId("")};a.panel.each(function(a){a.expanded.bind(function(b){d(b,a.id)})}),a.panel.bind("add",function(a){a.expanded.bind(function(b){d(b,a.id)})})})}(wp.customize,jQuery,_),function(a,b,c){serverControlParams.isPro&&(c.each(["tc_font_customizer_settings","header_image_sec","content_blog_sec","static_front_page","content_single_sec","tc_fpu","nav","post_lists_sec","galleries_sec","footer_customizer_sec","custom_scripts_sec"],function(b){c.delay(function(){a.section.when(b,function(a){1>=a.headContainer.length&&a.headContainer.find(".accordion-section-title").prepend('<span class="pro-title-block">Pro</span>')})},1e3)}),c.each([],function(b){a.panel.when(b,function(a){1>=a.headContainer.length&&a.headContainer.find(".accordion-section-title").prepend('<span class="pro-title-block">Pro</span>')})})),!serverControlParams.isPro&&c.isFunction(a.Section)&&(proSectionConstructor=a.Section.extend({active:!0,attachEvents:function(){},isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}}),b.extend(a.sectionConstructor,{"czr-customize-section-pro":proSectionConstructor}))}(wp.customize,jQuery,_);var CZRSocialModuleMths=CZRSocialModuleMths||{};!function(a,b,c){b.extend(CZRSocialModuleMths,{initialize:function(d,e){var f=this;a.CZRDynModule.prototype.initialize.call(f,d,e),b.extend(f,{itemPreAddEl:"czr-module-social-pre-add-view-content",itemInputList:"czr-module-social-item-content",modOptInputList:"czr-module-social-mod-opt"}),this.social_icons=["500px","adn","amazon","android","angellist","apple","behance","behance-square","bitbucket","bitbucket-square","black-tie","btc","buysellads","chrome","codepen","codiepie","connectdevelop","contao","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","edge","empire","envelope","envelope-o","envelope-square","expeditedssl","facebook","facebook-f (alias)","facebook-official","facebook-square","firefox","flickr","fonticons","fort-awesome","forumbee","foursquare","get-pocket","gg","gg-circle","git","github","github-alt","github-square","gitlab","git-square","google","google-plus","google-plus-circle","google-plus-official","google-plus-square","google-wallet","gratipay","hacker-news","houzz","instagram","internet-explorer","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","leanpub","linkedin","linkedin-square","linux","maxcdn","meanpath","medium","mixcloud","mobile","modx","odnoklassniki","odnoklassniki-square","opencart","openid","opera","optin-monster","pagelines","paypal","phone","phone-square","pied-piper","pied-piper-alt","pinterest","pinterest-p","pinterest-square","product-hunt","qq","rebel","reddit","reddit-alien","reddit-square","renren","rss","rss-square","safari","scribd","sellsy","share-alt","share-alt-square","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","snapchat","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","telegram","tencent-weibo","trello","tripadvisor","tumblr","tumblr-square","twitch","twitter","twitter-square","usb","viacoin","vimeo","vimeo-square","vine","vk","weibo","weixin","whatsapp","wikipedia-w","windows","wordpress","xing","xing-square","yahoo","y-combinator","yelp","youtube","youtube-play","youtube-square"],f.inputConstructor=a.CZRInput.extend(f.CZRSocialsInputMths||{}),f.itemConstructor=a.CZRItem.extend(f.CZRSocialsItem||{}),this.defaultModOptModel={is_mod_opt:!0,module_id:f.id,"social-size":serverControlParams.social_el_params.defaultSocialSize||14},this.defaultItemModel={id:"",title:"","social-icon":"","social-link":"","social-color":serverControlParams.social_el_params.defaultSocialColor,"social-target":1},this.itemAddedMessage=serverControlParams.i18n.socialLinkAdded,c.has(a,"czr_activeSectionId")&&f.control.section()==a.czr_activeSectionId()&&"resolved"!=f.isReady.state()&&f.ready(),a.section(f.control.section()).expanded.bind(function(a){"resolved"!=f.isReady.state()&&f.ready()}),f.isReady.then(function(){f.preItem.bind(function(a,b){c.has(a,"social-icon")&&(c.isEqual(a["social-icon"],b["social-icon"])||f.updateItemModel(f.preItem,!0))})})},updateItemModel:function(a,d){var e=a;if(d=d||!1,c.has(e(),"social-icon")&&!c.isEmpty(e()["social-icon"])){var f,g,h;f=b.extend(!0,{},e()),g=this.getTitleFromIcon(f["social-icon"]),h=serverControlParams.social_el_params.defaultSocialColor,!d&&e.czr_Input.has("social-color")&&(h=e.czr_Input("social-color")()),g=[serverControlParams.i18n.followUs,g].join(" "),d?(f=b.extend(f,{title:g,"social-color":h}),e.set(f)):(e.czr_Input("title").set(g),e.czr_Input("social-color")&&e.czr_Input("social-color").set(h))}},getTitleFromIcon:function(b){return a.CZR_Helpers.capitalize(b.replace("fa-","").replace("envelope","email"))},getIconFromTitle:function(a){return"fa-".title.toLowerCase().replace("envelope","email")},CZRSocialsInputMths:{setupSelect:function(){function a(a){if(!a.id)return a.text;var c=b('<span class="fa '+a.element.value.toLowerCase()+'">&nbsp;&nbsp;'+a.text+"</span>");return c}var d=this,e=d.input_parent,f=d.module,g=f.social_icons,h=e(),i=c.isEmpty(h.id);i&&(g=c.union([serverControlParams.i18n.selectSocialIcon],g)),c.each(g,function(a,c){var e=i&&0===c?"":"fa-"+a.toLowerCase(),g={value:e,html:f.getTitleFromIcon(a)};e==h["social-icon"]&&b.extend(g,{selected:"selected"}),b('select[data-type="social-icon"]',d.container).append(b("<option>",g))}),b('select[data-type="social-icon"]',d.container).select2({templateResult:a,templateSelection:a})},setupColorPicker:function(a){var d=this,e=(d.input_parent,d.module),f=b('input[data-type="social-color"]',d.container);f.iris({palettes:!0,hide:!1,defaultColor:serverControlParams.social_el_params.defaultSocialColor||"rgba(255,255,255,0.7)",change:function(a,d){c.has(d,"color")&&16777215==d.color._color?b(this).val(serverControlParams.social_el_params.defaultSocialColor||"rgba(255,255,255,0.7)"):b(this).val(d.color.toString()),b(this).trigger("colorpickerchange").trigger("change")}}),f.closest("div").on("click keydown",function(){e._adjustScrollExpandedBlock(d.container)})}},CZRSocialsItem:{ready:function(){var b=this;a.CZRItem.prototype.ready.call(b),b.bind("social-icon:changed",function(){b.module.updateItemModel(b)})},_buildTitle:function(b,c,d){var e=this,f=e.module;return b=b||("string"==typeof c?a.CZR_Helpers.capitalize(c.replace("fa-","")):""),b=a.CZR_Helpers.truncate(b,20),c=c||"fa-"+f.social_icons[0],d=d||serverControlParams.social_el_params.defaultSocialColor,'<div><span class="fa '+c+'" style="color:'+d+'"></span> '+b+"</div>"},writeItemViewTitle:function(a){var c=this,d=c.module,e=a||c(),f=d.getTitleFromIcon(e["social-icon"]);
24
- b("."+d.control.css_attr.item_title,c.container).html(c._buildTitle(f,e["social-icon"],e["social-color"]))}}})}(wp.customize,jQuery,_);var CZRWidgetAreaModuleMths=CZRWidgetAreaModuleMths||{};!function(a,b,c){b.extend(CZRWidgetAreaModuleMths,{initialize:function(d,e){var f=this;a.CZRDynModule.prototype.initialize.call(this,d,e),b.extend(f,{itemPreAddEl:"czr-module-widgets-pre-add-view-content",itemInputList:"czr-module-widgets-item-input-list",itemInputListReduced:"czr-module-widgets-item-input-list-reduced",ruItemPart:"czr-module-widgets-ru-item-part"}),f.inputConstructor=a.CZRInput.extend(f.CZRWZonesInputMths||{}),f.itemConstructor=a.CZRItem.extend(f.CZRWZonesItem||{}),f.serverParams=serverControlParams.widget_area_el_params||{},f.contexts=c.has(f.serverParams,"sidebar_contexts")?f.serverParams.sidebar_contexts:{},f.context_match_map={is_404:"404",is_category:"archive-category",is_home:"home",is_page:"page",is_search:"search",is_single:"single"},f.locations=c.has(f.serverParams,"sidebar_locations")?f.serverParams.sidebar_locations:{},f.defaultItemModel={id:"",title:serverControlParams.i18n.widgetZone,contexts:c.without(c.keys(f.contexts),"_all_"),locations:[f.serverParams.defaultWidgetLocation],description:""},this.itemAddedMessage=serverControlParams.i18n.widgetZoneAdded,c.has(a,"sidebar_insights")||(a.sidebar_insights=new a.Values,a.sidebar_insights.create("candidates"),a.sidebar_insights.create("actives"),a.sidebar_insights.create("inactives"),a.sidebar_insights.create("registered"),a.sidebar_insights.create("available_locations")),this.listenToSidebarInsights(),a.czr_widgetZoneSettings=a.czr_widgetZoneSettings||new a.Value,a.czr_widgetZoneSettings.bind(function(b,d){f.isReady.then(function(){c.each(b,function(b,c){a.sidebar_insights(c).set(b)})})}),f.preItem_location_alert_view_state=new a.Value("closed"),f.preItem_location_alert_view_state.callbacks.add(function(a,b){f._toggleLocationAlertExpansion(f.container,a)}),f.bind("item-added",function(a){f.addWidgetSidebar(a)}),f.bind("pre_item_api_remove",function(a){f.removeWidgetSidebar(a)});var g=new a.Values;g.create("fixed_for_current_session"),g.create("value"),a.section(f.serverParams.dynWidgetSection).fixTopMargin=g,a.section(f.serverParams.dynWidgetSection).fixTopMargin("fixed_for_current_session").set(!1),a.panel("widgets").expanded.callbacks.add(function(a,b){f.widgetPanelReact(),"resolved"!=f.isReady.state()&&f.ready()})},ready:function(){var b=this;a.CZRDynModule.prototype.ready.call(b),b.preItemExpanded.callbacks.add(function(a,c){a&&(b.preItem.czr_Input("locations")._setupLocationSelect(!0),b.preItem.czr_Input("locations").mayBeDisplayModelAlert())})},initializeModuleModel:function(a){var d=this,e=b.Deferred();return a.items=c.union(c.has(d.serverParams,"default_zones")?d.serverParams.default_zones:[],a.items),e.resolve(a).promise()},CZRWZonesInputMths:{ready:function(){var b=this;b.bind("locations:changed",function(){b.mayBeDisplayModelAlert()}),a.CZRInput.prototype.ready.call(b)},setupSelect:function(){"locations"==this.id&&this._setupLocationSelect(),"contexts"==this.id&&this._setupContextSelect()},_setupContextSelect:function(){var a=this,d=a(),e=(a.input_parent,a.module);c.each(e.contexts,function(e,f){var g={value:f,html:e};(f==d||c.contains(d,f))&&b.extend(g,{selected:"selected"}),b('select[data-type="contexts"]',a.container).append(b("<option>",g))}),b('select[data-type="contexts"]',a.container).select2()},_setupLocationSelect:function(d){function e(a){if(!a.id)return a.text;if(c.contains(i,a.element.value))return a.text;var d=b('<span class="czr-unavailable-location fa fa-ban" title="'+serverControlParams.i18n.unavailableLocation+'">&nbsp;&nbsp;'+a.text+"</span>");return d}var f=this,g=f(),h=(f.input_parent,f.module),i=a.sidebar_insights("available_locations")();b('select[data-type="locations"]',f.container).children().length||c.each(h.locations,function(a,d){var e={value:d,html:a};(d==g||c.contains(g,d))&&b.extend(e,{selected:"selected"}),b('select[data-type="locations"]',f.container).append(b("<option>",e))}),d&&b('select[data-type="locations"]',f.container).select2("destroy"),b('select[data-type="locations"]',f.container).select2({templateResult:e,templateSelection:e})},mayBeDisplayModelAlert:function(){var d=this,e=d.input_parent,f=d.module;if(c.has(e(),"locations")&&!c.isEmpty(e().locations)){var g=b('select[data-type="locations"]',d.container).val(),h=a.sidebar_insights("available_locations")(),i=c.filter(g,function(a){return!c.contains(h,a)});!c.has(e(),"id")||c.isEmpty(e().id)?f.preItem_location_alert_view_state.set(c.isEmpty(i)?"closed":"expanded"):e.czr_itemLocationAlert.set(c.isEmpty(i)?"closed":"expanded")}}},CZRWZonesItem:{initialize:function(b,c){var d=this;d.module;d.czr_itemLocationAlert=new a.Value,a.CZRItem.prototype.initialize.call(d,null,c)},itemWrapperViewSetup:function(){var b=this,c=b.module;a.CZRItem.prototype.itemWrapperViewSetup.call(b),b.czr_itemLocationAlert.set("closed"),b.czr_itemLocationAlert.callbacks.add(function(a,d){c._toggleLocationAlertExpansion(b.container,a)}),b.writeSubtitleInfos(b()),b.viewState.callbacks.add(function(a,c){-1!=a.indexOf("expanded")&&b.bind("contentRendered",function(){b.czr_Input("locations")._setupLocationSelect(!0),b.czr_Input("locations").mayBeDisplayModelAlert()})})},itemReact:function(b,c){var d=this;a.CZRItem.prototype.itemReact.call(d,b,c),d.writeSubtitleInfos(b),d.updateSectionTitle(b).setModelUpdateTimer()},writeSubtitleInfos:function(a){var d=this,e=d.module,f=c.clone(a||d()),g=[],h=[],i="";if(!d.container.length)return this;f.locations=c.isString(f.locations)?[f.locations]:f.locations,c.each(f.locations,function(a){c.has(e.locations,a)?g.push(e.locations[a]):g.push(a)}),f.contexts=c.isString(f.contexts)?[f.contexts]:f.contexts,d._hasModelAllContexts(a)?h.push(e.contexts._all_):c.each(f.contexts,function(a){c.has(e.contexts,a)?h.push(e.contexts[a]):h.push(a)});var j=serverControlParams.i18n.locations,k=serverControlParams.i18n.contexts,l=serverControlParams.i18n.notset;if(g=c.isEmpty(g)?'<span style="font-weight: bold;">'+l+"</span>":g.join(", "),h=c.isEmpty(h)?'<span style="font-weight: bold;">'+l+"</span>":h.join(", "),i="<u>"+j+"</u> : "+g+" <strong>|</strong> <u>"+k+"</u> : "+h,b(".czr-zone-infos",d.container).length)b(".czr-zone-infos",d.container).html(i);else{var m=b("<div/>",{"class":["czr-zone-infos",e.control.css_attr.item_sort_handle].join(" "),html:i});b("."+e.control.css_attr.item_btns,d.container).after(m)}return this},updateSectionTitle:function(c){var d="sidebar-widgets-"+c.id,e=c.title;return a.section.has(d)?(b(".accordion-section-title",a.section(d).container).text(e),b(".customize-section-title h3",a.section(d).container).html('<span class="customize-action">'+a.section(d).params.customizeAction+"</span>"+e),this):this},setModelUpdateTimer:function(){var a=this,c=a.module;clearTimeout(b.data(this,"modelUpdateTimer")),b.data(this,"modelUpdateTimer",setTimeout(function(){c.control.refreshPreview()},1e3))},_hasModelAllContexts:function(a){var b=this,d=b.module,e=c.keys(d.contexts);if(a=a||this(),c.has(a,"contexts"))return!!c.contains(a.contexts,"_all_")||c.isEmpty(c.difference(c.without(e,"_all_"),a.contexts))},_getMatchingContexts:function(b){var d=this,e=a.czr_wpQueryInfos().conditional_tags||{},f=c.filter(d.context_match_map,function(a,b){return!0===e[b]});return c.isEmpty(f)?b:f}},addWidgetSidebar:function(d,e){if(!c.isObject(d)&&c.isEmpty(e))throw new Error("No valid input were provided to add a new Widget Zone.");var f=this,g=c.isEmpty(d)?e:c.clone(d),h=c.isEmpty(d)?e:b.extend(c.clone(c.findWhere(a.Widgets.data.registeredSidebars,{id:f.serverParams.defaultWidgetSidebar})),{name:g.title,id:g.id});a.Widgets.registeredSidebars.add(h);var i=b.extend(c.clone(a.section("sidebar-widgets-"+f.serverParams.defaultWidgetSidebar).params),{id:"sidebar-widgets-"+g.id,instanceNumber:c.max(a.settings.sections,function(a){return a.instanceNumber}).instanceNumber+1,sidebarId:h.id,title:h.name,description:"undefined"!=typeof e?e.description:a.section("sidebar-widgets-"+f.serverParams.defaultWidgetSidebar).params.description,priority:c.max(c.omit(a.settings.sections,f.serverParams.dynWidgetSection),function(a){return a.instanceNumber}).priority+1});a.section.add(i.id,new a.sectionConstructor[i.type](i.id,{params:i})),a.settings.sections[i.id]=i.id;var j="sidebars_widgets["+g.id+"]",k=b.extend(c.clone(a.settings.settings["sidebars_widgets["+f.serverParams.defaultWidgetSidebar+"]"]),{value:[]});a.settings.settings[j]=k,a.create(j,j,k.value,{transport:k.transport,previewer:a.previewer,dirty:!1});var l=b.extend(c.clone(a.settings.controls["sidebars_widgets["+f.serverParams.defaultWidgetSidebar+"]"]),{settings:{"default":j}}),m={};c.each(l,function(a,b){"string"==typeof a&&(a=a.replace(f.serverParams.defaultWidgetSidebar,g.id)),m[b]=a}),m.instanceNumber=c.max(a.settings.controls,function(a){return a.instanceNumber}).instanceNumber+1,a.settings.controls[j]=m,a.control.add(j,new a.controlConstructor[m.type](j,{params:m,previewer:a.previewer})),c.has(this,"container")&&this.container.trigger("widget_zone_created",{model:g,section_id:"sidebar-widgets-"+g.id,setting_id:j})},removeWidgetSidebar:function(d){var e=this;if(!c.isObject(d)||c.isEmpty(d))throw new Error("No valid data were provided to remove a Widget Zone.");a.Widgets.registeredSidebars.remove(d.id),a.section.has("sidebar-widgets-"+d.id)&&(a.section("sidebar-widgets-"+d.id).container.remove(),a.section.remove("sidebar-widgets-"+d.id),delete a.settings.sections["sidebar-widgets-"+d.id]),a.has("sidebars_widgets["+d.id+"]")&&(a.remove("sidebars_widgets["+d.id+"]"),delete a.settings.settings["sidebars_widgets["+d.id+"]"]),a.control.has("sidebars_widgets["+d.id+"]")&&(a.control("sidebars_widgets["+d.id+"]").container.remove(),a.control.remove("sidebars_widgets["+d.id+"]"),delete a.settings.controls["sidebars_widgets["+d.id+"]"]);var f=function(){a.previewer.refresh()};f=c.debounce(f,500),b.when(f()).done(function(){e.trigger("widget_zone_removed",{model:d,section_id:"sidebar-widgets-"+d.id,setting_id:"sidebars_widgets["+d.id+"]"})})},widgetPanelReact:function(){var b=this,d=a.panel("widgets").container.find(".control-panel-content").css("margin-top");a.section(b.serverParams.dynWidgetSection).fixTopMargin("value").set(d);var e=a.section(b.serverParams.dynWidgetSection).container.find(".accordion-section-content"),f=a.panel("widgets").container.find(".control-panel-content"),g=function(){e.css("margin-top",""),f.css("margin-top",a.section(b.serverParams.dynWidgetSection).fixTopMargin("value")())};a.bind("pane-contents-reflowed",c.debounce(function(){g()},150)),b.closeAllItems().closeRemoveDialogs(),c.has(b,"preItemExpanded")&&b.preItemExpanded.set(!1)},widgetSectionReact:function(c,d){var e=this,f=a.section(e.serverParams.dynWidgetSection),g=f.container.closest(".wp-full-overlay-sidebar-content"),h=f.container.find(".accordion-section-content"),i=f.container.closest(".wp-full-overlay"),j=(f.container.find(".customize-section-back"),f.container.find(".accordion-section-title").first());b("#customize-header-actions").height();c&&(i.removeClass("section-open"),h.css("height","auto"),j.attr("tabindex","0"),h.css("margin-top",""),g.scrollTop(0)),e.closeAllItems().closeRemoveDialogs(),h.slideToggle()},listenToSidebarInsights:function(){var d=this;a.sidebar_insights("registered").callbacks.add(function(a){var b=c.clone(d.itemCollection());c.each(b,function(b){d.getViewEl(b.id).length&&d.getViewEl(b.id).css("display",c.contains(a,b.id)?"block":"none")})}),a.sidebar_insights("inactives").callbacks.add(function(a){var e=c.clone(d.itemCollection());c.each(e,function(e){d.getViewEl(e.id).length&&(c.contains(a,e.id)?(d.getViewEl(e.id).addClass("inactive"),d.getViewEl(e.id).find(".czr-inactive-alert").length||d.getViewEl(e.id).find(".czr-item-title").append(b("<span/>",{"class":"czr-inactive-alert",html:" [ "+serverControlParams.i18n.inactiveWidgetZone+" ]"}))):(d.getViewEl(e.id).removeClass("inactive"),d.getViewEl(e.id).find(".czr-inactive-alert").length&&d.getViewEl(e.id).find(".czr-inactive-alert").remove()))})}),a.sidebar_insights("candidates").callbacks.add(function(b){c.isArray(b)&&c.each(b,function(b){c.isObject(b)&&(a.section.has("sidebar-widgets-"+b.id)||(d.addWidgetSidebar({},b),c.has(a.sidebar_insights("actives")(),b.id)&&a.section.has("sidebar-widgets-"+b.id)&&a.section("sidebar-widgets-"+b.id).activate()))})})},_adjustScrollExpandedBlock:function(a,c){if(a.length){var d,e=b(".wp-full-overlay-sidebar-content").scrollTop(),f=c||90;setTimeout(function(){a.offset().top+a.height()+f>b(window.top).height()&&(d=a.offset().top+a.height()+f-b(window.top).height(),b(".wp-full-overlay-sidebar-content").animate({scrollTop:e+d},600))},50)}},getDefaultItemModel:function(a){var d=this,e=d.itemCollection(),f=c.clone(d.defaultItemModel);f.contexts;return b.extend(f,{title:"Widget Zone "+(1*c.size(e)+1)})},getTemplateEl:function(a,b){var d,e=this;switch("rudItemPart"==a?a=c.has(b,"is_builtin")&&b.is_builtin?"ruItemPart":a:"itemInputList"==a&&(a=c.has(b,"is_builtin")&&b.is_builtin?"itemInputListReduced":a),a){case"rudItemPart":d=e.rudItemPart;break;case"ruItemPart":d=e.ruItemPart;break;case"itemInputList":d=e.itemInputList;break;case"itemInputListReduced":d=e.itemInputListReduced}if(c.isEmpty(d))throw new Error("No valid template has been found in getTemplateEl()");return d},_toggleLocationAlertExpansion:function(c,d){var e=c.find(".czr-location-alert");if(!e.length){var f=["<span>"+serverControlParams.i18n.locationWarning+"</span>",a.CZR_Helpers.getDocSearchLink(serverControlParams.i18n.locationWarning)].join("");e=b("<div/>",{"class":"czr-location-alert",html:f,style:"display:none"}),b('select[data-type="locations"]',c).closest("div").after(e)}e.toggle("expanded"==d)}})}(wp.customize,jQuery,_);var CZRBodyBgModuleMths=CZRBodyBgModuleMths||{};!function(a,b,c){b.extend(CZRBodyBgModuleMths,{initialize:function(d,e){var f=this;a.CZRModule.prototype.initialize.call(f,d,e),b.extend(f,{itemInputList:"czr-module-bodybg-item-content"}),f.inputConstructor=a.CZRInput.extend(f.CZRBodyBgInputMths||{}),f.itemConstructor=a.CZRItem.extend(f.CZBodyBgItemMths||{}),f.defaultItemModel={"background-color":"#eaeaea","background-image":"","background-repeat":"no-repeat","background-attachment":"fixed","background-position":"center center","background-size":"cover"},a.consoleLog("New module instantiated : ",f.id),c.has(a,"czr_activeSectionId")&&f.control.section()==a.czr_activeSectionId()&&"resolved"!=f.isReady.state()&&f.ready(),a.section(f.control.section()).expanded.bind(function(a){"resolved"!=f.isReady.state()&&f.ready()})},CZRBodyBgInputMths:{setupSelect:function(){var a=this,d={"background-repeat":"bg_repeat_options","background-attachment":"bg_attachment_options","background-position":"bg_position_options"},e=(a.input_parent,serverControlParams.body_bg_module_params),f={};a.module;c.has(d,a.id)&&(c.isUndefined(e)||c.isUndefined(e[d[a.id]])||(f=e[d[a.id]],c.isEmpty(f)||(c.each(f,function(d,e){var f={value:e,html:d};(e==a()||c.contains(a(),e))&&b.extend(f,{selected:"selected"}),b("select[data-type]",a.container).append(b("<option>",f))}),b("select[data-type]",a.container).select2())))}},CZBodyBgItemMths:{ready:function(){var b=this;a.CZRItem.prototype.ready.call(b),b.inputCollection.bind(function(a){!c.isEmpty(_col)&&b.czr_Input&&b.czr_Input.has("background-image")&&b.czr_Input("background-image").isReady.done(function(a){var d=function(a){var d=!c.isEmpty(a)||c.isNumber(a);c.each(["background-repeat","background-attachment","background-position","background-size"],function(a){b.czr_Input(a).container.toggle(d||!1)})};d(a()),b.bind("background-image:changed",function(){d(b.czr_Input("background-image")())})})})}}})}(wp.customize,jQuery,_),function(a,b,c){a.czrModuleMap=a.czrModuleMap||{},b.extend(a.czrModuleMap,{czr_widget_areas_module:{mthds:CZRWidgetAreaModuleMths,crud:!0,sektion_allowed:!1,name:"Widget Areas"},czr_social_module:{mthds:CZRSocialModuleMths,crud:!0,name:"Social Icons",has_mod_opt:!0},czr_background:{mthds:CZRBodyBgModuleMths,crud:!1,multi_item:!1,name:"Slider"}})}(wp.customize,jQuery,_);var CZRMultiplePickerMths=CZRMultiplePickerMths||{};!function(a,b,c){b.extend(CZRMultiplePickerMths,{ready:function(){function a(a){return a.text.replace(/\u2013|\u2014/g,"")}var c=this,d=this.container.find("select");d.select2({closeOnSelect:!1,templateSelection:a}),d.on("change",function(a){0===b(this).find("option:selected").length&&c.setting.set([])})}})}(wp.customize,jQuery,_);var CZRCroppedImageMths=CZRCroppedImageMths||{};!function(a,b,c){"function"==typeof wp.media.controller.Cropper&&"function"==typeof a.CroppedImageControl&&(wp.media.controller.CZRCustomizeImageCropper=wp.media.controller.Cropper.extend({doCrop:function(a){var b=a.get("cropDetails"),c=this.get("control");return b.dst_width=c.params.dst_width,b.dst_height=c.params.dst_height,wp.ajax.post("crop-image",{wp_customize:"on",nonce:a.get("nonces").edit,id:a.get("id"),context:c.id,cropDetails:b})}}),b.extend(CZRCroppedImageMths,{initFrame:function(){var a=_wpMediaViewsL10n;this.frame=wp.media({button:{text:a.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CZRCustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var a=this.frame.state().get("selection").first().toJSON();return a.mime&&a.mime.indexOf("image")>-1?void(c.contains(["image/svg+xml","image/gif"],a.mime)||this.params.width===a.width&&this.params.height===a.height&&!this.params.flex_width&&!this.params.flex_height?(this.setImageFromAttachment(a),this.frame.close()):this.frame.setState("cropper")):void this.frame.trigger("content:error")}}))}(wp.customize,jQuery,_);var CZRUploadMths=CZRUploadMths||{};!function(a,b,c){b.extend(CZRUploadMths,{ready:function(){var c=this;this.params.removed=this.params.removed||"",this.success=b.proxy(this.success,this),this.uploader=b.extend({container:this.container,browser:this.container.find(".czr-upload"),success:this.success,plupload:{},params:{}},this.uploader||{}),c.params.extensions&&(c.uploader.plupload.filters=[{title:a.l10n.allowedFiles,extensions:c.params.extensions}]),c.params.context&&(c.uploader.params["post_data[context]"]=this.params.context),a.settings.theme.stylesheet&&(c.uploader.params["post_data[theme]"]=a.settings.theme.stylesheet),this.uploader=new wp.Uploader(this.uploader),this.remover=this.container.find(".remove"),this.remover.on("click keydown",function(a){"keydown"===a.type&&13!==a.which||(c.setting.set(c.params.removed),a.preventDefault())}),this.removerVisibility=b.proxy(this.removerVisibility,this),this.setting.bind(this.removerVisibility),this.removerVisibility(this.setting())},success:function(a){this.setting.set(a.get("id"))},removerVisibility:function(a){this.remover.toggle(a!=this.params.removed)}})}(wp.customize,jQuery,_);var CZRLayoutSelectMths=CZRLayoutSelectMths||{};!function(a,b,c){b.extend(CZRLayoutSelectMths,{ready:function(){this.setupSelect()},setupSelect:function(a){function d(a){if(!a.id)return a.text;if(c.has(e.params.layouts,a.element.value)){var d=e.params.layouts[a.element.value],f=d.src,g=d.label,h=b('<img src="'+f+'" class="czr-layout-img" title="'+g+'" /><span class="czr-layout-title">'+g+"</span>");return h}}var e=this;$_select=this.container.find("select"),$_select.select2({templateResult:d,templateSelection:d,minimumResultsForSearch:1/0})}})}(wp.customize,jQuery,_),function(a,b,c){a.CZRUploadControl=a.Control.extend(CZRUploadMths),a.CZRLayoutControl=a.Control.extend(CZRLayoutSelectMths),a.CZRMultiplePickerControl=a.Control.extend(CZRMultiplePickerMths),b.extend(a.controlConstructor,{czr_upload:a.CZRUploadControl,czr_multiple_picker:a.CZRMultiplePickerControl,czr_layouts:a.CZRLayoutControl}),"function"==typeof a.CroppedImageControl&&(a.CZRCroppedImageControl=a.CroppedImageControl.extend(CZRCroppedImageMths),b.extend(a.controlConstructor,{czr_cropped_image:a.CZRCroppedImageControl})),"function"==typeof a.CodeEditorControl&&b.extend(a.controlConstructor,{czr_code_editor:a.CodeEditorControl})}(wp.customize,jQuery,_),function(a,b,c){var d=serverControlParams.i18n||{};a.czr_CrtlDependenciesReady=b.Deferred(),a.bind("ready",function(){c.has(a,"czr_ctrlDependencies")||(serverControlParams.isSkopOn?"resolved"!=a.czr_skopeReady.state()&&a.czr_skopeReady.done(function(){a.czr_ctrlDependencies=new a.CZR_ctrlDependencies,a.czr_CrtlDependenciesReady.resolve()}):(a.czr_ctrlDependencies=new a.CZR_ctrlDependencies,a.czr_CrtlDependenciesReady.resolve()))}),a.CZR_ctrlDependencies=a.Class.extend({dominiDeps:[],initialize:function(){var b=this;if(this.defaultDominusParams={dominus:"",servi:[],visibility:null,actions:null,onSectionExpand:!0},this.dominiDeps=c.extend(this.dominiDeps,this._getControlDeps()),!c.isArray(b.dominiDeps))throw new Error("Visibilities : the dominos dependency array is not an array.");a.czr_activeSectionId.bind(function(d){if(!c.isEmpty(d)&&a.section.has(d))try{b.setServiDependencies(d)}catch(e){a.errorLog("In api.CZR_ctrlDependencies : "+e)}}),a.bind("awaken-section",function(d){if(serverControlParams.isSkopOn&&c.has(a,"czr_skopeBase"))a.czr_skopeBase.processSilentUpdates({candidates:{},section_id:d.target,refresh:!1}).then(function(){try{b.setServiDependencies(d.target,d.source)}catch(c){a.errorLog("On awaken-section, ctrl deps : "+c)}});else try{b.setServiDependencies(d.target,d.source)}catch(e){a.errorLog("On awaken-section, ctrl deps : "+e)}}),this._handleFaviconNote()},setServiDependencies:function(d,e,f){var g=this,h=b.Deferred();if(f=f||!1,c.isUndefined(d)||!a.section.has(d))throw new Error("Control Dependencies : the targetSectionId is missing or not registered : "+d);if(a.section(d).czr_ctrlDependenciesReady=a.section(d).czr_ctrlDependenciesReady||b.Deferred(),!f&&"resolved"==a.section(d).czr_ctrlDependenciesReady.state())return h.resolve().promise();c.each(g.dominiDeps,function(b){if(!c.has(b,"dominus")||!c.isString(b.dominus)||c.isEmpty(b.dominus))throw new Error("Control Dependencies : a dominus control id must be a not empty string.");var e=a.CZR_Helpers.build_setId(b.dominus);a.control.has(e)&&a.control(e).section()==d&&(b=g._prepareDominusParams(b),c.isEmpty(b)||g._processDominusCallbacks(b.dominus,b,f).fail(function(){a.consoleLog("self._processDominusCallbacks fail for section "+d),h.reject()}).done(function(){h.resolve()}))});var i=a.CZR_Helpers.getSectionControlIds(d),j=function(b){var d=[];return c.each(g.dominiDeps,function(e){if(!c.has(e,"servi")||!c.isArray(e.servi)||!c.has(e,"dominus")||c.isEmpty(e.dominus))return void a.errorLog("Control Dependencies : wrong params in _getServusDomini.");if(c.contains(e.servi,b)&&!c.contains(d,e.dominus)){if(e=g._prepareDominusParams(e),c.isEmpty(e))return;d.push(e.dominus)}}),c.isArray(d)?d:[]},k=[];return c.each(i,function(a){c.isEmpty(j(a))||(k=c.union(k,j(a)))}),c.each(k,function(b){var c=a.CZR_Helpers.build_setId(b);a.control(c).section()!=d&&e!=a.control(c).section()&&a.trigger("awaken-section",{target:a.control(c).section(),source:d})}),h.always(function(){a.section(d).czr_ctrlDependenciesReady.resolve()}),h.promise()},_deferCallbackForControl:function(d,e,f){var g=b.Deferred();if(c.isEmpty(d)||!c.isString(d))throw new Error("_deferCallbackForControl : the control id is missing.");if(!c.isFunction(e))throw new Error("_deferCallbackForControl : callback must be a funtion.");return f=c.isUndefined(f)||!c.isArray(f)?[]:f,a.control.has(d)?"resolved"==a.control(d).deferred.embedded.state()?b.when(e.apply(null,f)).fail(function(){g.reject()}).done(function(){g.resolve()}):a.control(d).deferred.embedded.then(function(){b.when(e.apply(null,f)).fail(function(){g.reject()}).done(function(){g.resolve()})}):a.control.when(d,function(){a.control(d).deferred.embedded.then(function(){b.when(e.apply(null,f)).fail(function(){g.reject()}).done(function(){g.resolve()})})}),g.promise()},_processDominusCallbacks:function(d,e,f){var g=this,h=a.CZR_Helpers.build_setId(d),i=a(h),j=b.Deferred(),k=!1;return c.each(e.servi,function(b){if(a.control.has(a.CZR_Helpers.build_setId(b))){var d=function(a,b,d,e){var f=arguments;c.each(d,function(a,b){switch(b){case"visibility":g._setVisibility.apply(null,f);break;case"actions":c.isFunction(a)&&a.apply(null,f)}})},f=function(c){c=c||i();var f=a.CZR_Helpers.build_setId(b);g._deferCallbackForControl(f,d,[c,b,e]).always(function(){k=!0}).fail(function(){j.reject()}).done(function(){j.resolve()})};f(),c.has(i,"czr_visibilityServi")||(i.czr_visibilityServi=new a.Value([]));var h=i.czr_visibilityServi();c.contains(h,b)||(i.bind(function(a){f(a)}),i.czr_visibilityServi(c.union(h,[b])))}}),k?j.promise():j.resolve().promise()},_setVisibility:function(b,d,e,f){var g=a.CZR_Helpers.build_setId(d),h=e.visibility(b,d,e.dominus);if(f=f||!1,c.isBoolean(h)&&("unchanged"!=h||f)){var i=function(){a.state.has("silent-update-processing")&&a.state("silent-update-processing")()||(a.control(g,function(a){var b={duration:"fast",completeCallback:function(){},unchanged:!1};c.has(a,"active")&&(h=h&&a.active()),c.has(a,"defaultActiveArguments")&&(b=control.defaultActiveArguments),a.onChangeActive(h,a.defaultActiveArguments)}),a.state.has("silent-update-processing")&&a.state("silent-update-processing").unbind(i))};a.state.has("silent-update-processing")&&a.state("silent-update-processing")()?a.state("silent-update-processing").bind(i):i()}},_getControlDeps:function(){return{}},_prepareDominusParams:function(b){var d=this,e={};if(!c.isObject(b))return a.errorLog("Visibilities : a dominus param definition must be an object."),e;if(!c.has(b,"visibility")&&!c.has(b,"actions"))return a.errorLog("Visibilities : a dominus definition must include a visibility or an actions callback."),e;if(!c.has(b,"dominus")||!c.isString(b.dominus)||c.isEmpty(b.dominus))return a.errorLog("Visibilities : a dominus control id must be a not empty string."),e;var f=a.CZR_Helpers.build_setId(b.dominus);return a.control.has(f)?!c.has(b,"servi")||c.isUndefined(b.servi)||!c.isArray(b.servi)||c.isEmpty(b.servi)?(a.errorLog("Visibilities : servi must be set as an array not empty."),e):(c.each(d.defaultDominusParams,function(a,d){var f=b[d];switch(d){case"visibility":if(!c.isUndefined(f)&&!c.isEmpty(f)&&!c.isFunction(f))throw new Error("Visibilities : a dominus visibility callback must be a function : "+b.dominus);break;case"actions":if(!c.isUndefined(f)&&!c.isEmpty(f)&&!c.isFunction(f))throw new Error("Visibilities : a dominus actions callback must be a function : "+b.dominus);break;case"onSectionExpand":if(!c.isUndefined(f)&&!c.isEmpty(f)&&!c.isBoolean(f))throw new Error("Visibilities : a dominus onSectionExpand param must be a boolean : "+b.dominus)}e[d]=f}),e):(a.errorLog("Visibilities : a dominus control id is not registered : "+f),e)},_handleFaviconNote:function(){var b=this,c=a.CZR_Helpers.build_setId(serverControlParams.faviconOptionName);if(!(!a.has("site_icon")||!a.control("site_icon")||a.has(c)&&0===+a(c)()||+a("site_icon")()>0)){var e=a.control("site_icon").params.description;_newDes=["<strong>",d.faviconNote||"","</strong><br/><br/>"].join("")+e,b._printFaviconNote(_newDes),a("site_icon").callbacks.add(function(d){+d>0?(a.control("site_icon").container.find(".description").text(e),a.has(c)&&a(c).set("")):b._printFaviconNote(_newDes)})}},_printFaviconNote:function(b){a.control("site_icon").container.find(".description").html(b)}})}(wp.customize,jQuery,_),function(a,b){b(function(b){function c(a){var c=a.siblings(".open");0!==c.length&&c.offset().top<0&&b(".wp-full-overlay-sidebar-content").animate({scrollTop:-b("#customize-theme-controls").offset().top-c.height()+a.offset().top+b(".wp-full-overlay-sidebar-content").offset().top},700)}var d=a.customize||d;b(".accordion-section").not(".control-panel").click(function(){c(b(this))}),d.czrSetupCheckbox=function(a,c){var e=d.control(a);b("input[type=checkbox]",e.container).each(function(){"tc_font_customizer_settings"!=e.params.section&&(0===b(this).val()||"0"==b(this).val()||"off"==b(this).val()||_.isEmpty(b(this).val())?b(this).prop("checked",!1):b(this).prop("checked",!0),0===b(this).closest('div[class^="icheckbox"]').length&&b(this).iCheck({checkboxClass:"icheckbox_flat-grey",radioClass:"iradio_flat-grey"}).on("ifChanged",function(a){b(this).val(!1===b(this).is(":checked")?0:1),b(a.currentTarget).trigger("change")}))})},d.czrSetupSelect=function(a,c){b("select[data-customize-setting-link]",d.control(a).container).not(".no-selecter-js").each(function(){b(this).selecter({})})},d.czrSetupStepper=function(a,c){var e=d.control(a);b('input[type="number"]',e.container).each(function(){b(this).stepper()})},d.control.each(function(a){if(_.has(a,"id")){"widget_"!=a.id.substring(0,"widget_".length)&&"nav_menu"!=a.id.substring(0,"nav_menu".length)&&d.czrSetupCheckbox(a.id),"nav_menu_locations"!=a.id.substring(0,"nav_menu_locations".length)&&d.czrSetupSelect(a.id);var b=["publish_settings","tc_font_customizer_settings"];0<a.container.find('input[type="number"]').length&&a.params&&a.params.section&&!_.contains(b,a.params.section)&&d.czrSetupStepper(a.id)}});var e=function(){var a=b("<span/>",{"class":"customize-controls-home fa fa-home",html:'<span class="screen-reader-text">Home</span>'});b.when(b("#customize-header-actions").append(a)).done(function(){a.keydown(function(a){9!==a.which&&(13===a.which&&this.click(),a.preventDefault())}).on("click.customize-controls-home",function(){d.section.has(d.czr_activeSectionId())?d.section(d.czr_activeSectionId()).expanded(!1):d.section.each(function(a){a.expanded(!1)}),d.panel.each(function(a){a.expanded(!1)})})})};e()})}(wp,jQuery);
1
+ window.addEventListener=window.addEventListener||function(e,t){window.attachEvent("on"+e,t)},Date.now||(Date.now=function(){return(new Date).getTime()}),Object.create||(Object.create=function(e,t){if(void 0!==t)throw"The multiple-argument version of Object.create is not provided by this browser and cannot be shimmed.";function i(){}return i.prototype=e,new i}),Array.prototype.filter||(Array.prototype.filter=function(e){"use strict";if(void 0===this||null===this)throw new TypeError;var t=Object(this),i=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=[],o=arguments.length>=2?arguments[1]:void 0,s=0;s<i;s++)if(s in t){var r=t[s];e.call(o,r,s,t)&&n.push(r)}return n}),Array.prototype.map||(Array.prototype.map=function(e,t){var i,n,o;if(null===this)throw new TypeError(" this is null or not defined");var s=Object(this),r=s.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(i=t),n=new Array(r),o=0;o<r;){var a,l;o in s&&(a=s[o],l=e.call(i,a,o,s),n[o]=l),o++}return n}),Array.from||(Array.from=function(){var e=Object.prototype.toString,t=function(t){return"function"==typeof t||"[object Function]"===e.call(t)},i=Math.pow(2,53)-1;return function(e){var n=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,s,r,a,l=arguments.length>1?arguments[1]:void 0;if(void 0!==l){if(!t(l))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var c,d=(s=n.length,r=void 0,a=void 0,r=Number(s),a=isNaN(r)?0:0!==r&&isFinite(r)?(r>0?1:-1)*Math.floor(Math.abs(r)):r,Math.min(Math.max(a,0),i)),u=t(this)?Object(new this(d)):new Array(d),p=0;p<d;)c=n[p],u[p]=l?void 0===o?l(c,p):l.call(o,c,p):c,p+=1;return u.length=d,u}}()),"function"!=typeof jQuery.fn.iCheck&&function(e){function t(e,t,o){var s=e[0],r=/er/.test(o)?m:/bl/.test(o)?h:u,a=o==g?{checked:s[u],disabled:s[h],indeterminate:"true"==e.attr(m)||"false"==e.attr(f)}:s[r];if(/^(ch|di|in)/.test(o)&&!a)i(e,r);else if(/^(un|en|de)/.test(o)&&a)n(e,r);else if(o==g)for(r in a)a[r]?i(e,r,!0):n(e,r,!0);else t&&"toggle"!=o||(t||e[b]("ifClicked"),a?s[_]!==d&&n(e,r):i(e,r))}function i(t,i,o){var g=t[0],b=t.parent(),w=i==u,C=i==m,z=i==h,S=C?f:w?p:"enabled",I=s(t,S+r(g[_])),E=s(t,i+r(g[_]));if(!0!==g[i]){if(!o&&i==u&&g[_]==d&&g.name){var M=t.closest("form"),R='input[name="'+g.name+'"]';(R=M.length?M.find(R):e(R)).each(function(){this!==g&&e(this).data(l)&&n(e(this),i)})}C?(g[i]=!0,g[u]&&n(t,u,"force")):(o||(g[i]=!0),w&&g[m]&&n(t,m,!1)),a(t,w,i,o)}g[h]&&s(t,k,!0)&&b.find("."+c).css(k,"default"),b[v](E||s(t,i)||""),z?b.attr("aria-disabled","true"):b.attr("aria-checked",C?"mixed":"true"),b[y](I||s(t,S)||"")}function n(e,t,i){var n=e[0],o=e.parent(),l=t==u,d=t==m,g=t==h,b=d?f:l?p:"enabled",w=s(e,b+r(n[_])),C=s(e,t+r(n[_]));!1!==n[t]&&((d||!i||"force"==i)&&(n[t]=!1),a(e,l,b,i)),!n[h]&&s(e,k,!0)&&o.find("."+c).css(k,"pointer"),o[y](C||s(e,t)||""),g?o.attr("aria-disabled","false"):o.attr("aria-checked","false"),o[v](w||s(e,b)||"")}function o(t,i){t.data(l)&&(t.parent().html(t.attr("style",t.data(l).s||"")),i&&t[b](i),t.off(".i").unwrap(),e(w+'[for="'+t[0].id+'"]').add(t.closest(w)).off(".i"))}function s(e,t,i){return e.data(l)?e.data(l).o[t+(i?"":"Class")]:void 0}function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e,t,i,n){n||(t&&e[b]("ifToggled"),e[b]("ifChanged")[b]("if"+r(i)))}var l="iCheck",c=l+"-helper",d="radio",u="checked",p="un"+u,h="disabled",f="determinate",m="in"+f,g="update",_="type",v="addClass",y="removeClass",b="trigger",w="label",k="cursor",C=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);e.fn[l]=function(s,r){var a='input[type="checkbox"], input[type="'+d+'"]',p=e(),f=function(t){t.each(function(){var t=e(this);p=t.is(a)?p.add(t):p.add(t.find(a))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(s))return s=s.toLowerCase(),f(this),p.each(function(){var i=e(this);"destroy"==s?o(i,"ifDestroyed"):t(i,!0,s),e.isFunction(r)&&r()});if("object"!=typeof s&&s)return this;var k=e.extend({checkedClass:u,disabledClass:h,indeterminateClass:m,labelHover:!0,aria:!1},s),z=k.handle,S=k.hoverClass||"hover",I=k.focusClass||"focus",E=k.activeClass||"active",M=!!k.labelHover,R=k.labelHoverClass||"hover",x=0|(""+k.increaseArea).replace("%","");return("checkbox"==z||z==d)&&(a='input[type="'+z+'"]'),-50>x&&(x=-50),f(this),p.each(function(){var s=e(this);o(s);var r=this,a=r.id,p={position:"absolute",top:f=-x+"%",left:f,display:"block",width:p=100+2*x+"%",height:p,margin:0,padding:0,background:"#fff",border:0,opacity:0},f=C?{position:"absolute",visibility:"hidden"}:x?p:{position:"absolute",opacity:0},m="checkbox"==r[_]?k.checkboxClass||"icheckbox":k.radioClass||"i"+d,z=e(w+'[for="'+a+'"]').add(s.closest(w)),P=!!k.aria,O=l+"-"+Math.random().toString(36).substr(2,6),D='<div class="'+m+'" '+(P?'role="'+r[_]+'" ':"");P&&z.each(function(){D+='aria-labelledby="',this.id?D+=this.id:(this.id=O,D+=O),D+='"'}),D=s.wrap(D+"/>")[b]("ifCreated").parent().append(k.insert),p=e('<ins class="'+c+'"/>').css(p).appendTo(D),s.data(l,{o:k,s:s.attr("style")}).css(f),k.inheritClass&&D[v](r.className||""),k.inheritID&&a&&D.attr("id",l+"-"+a),"static"==D.css("position")&&D.css("position","relative"),t(s,!0,g),z.length&&z.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(i){var n=i[_],o=e(this);if(!r[h]){if("click"==n){if(e(i.target).is("a"))return;t(s,!1,!0)}else M&&(/ut|nd/.test(n)?(D[y](S),o[y](R)):(D[v](S),o[v](R)));if(!C)return!1;i.stopPropagation()}}),s.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(e){var t=e[_];return e=e.keyCode,"click"!=t&&("keydown"==t&&32==e?(r[_]==d&&r[u]||(r[u]?n(s,u):i(s,u)),!1):void("keyup"==t&&r[_]==d?!r[u]&&i(s,u):/us|ur/.test(t)&&D["blur"==t?y:v](I)))}),p.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(e){var i=e[_],n=/wn|up/.test(i)?E:S;if(!r[h]){if("click"==i?t(s,!1,!0):(/wn|er|in/.test(i)?D[v](n):D[y](n+" "+E),z.length&&M&&n==S&&z[/ut|nd/.test(i)?y:v](R)),!C)return!1;e.stopPropagation()}})})}}(window.jQuery||window.Zepto),"function"!=typeof jQuery.fn.selecter&&function(e,t){"use strict";function i(t,i){if(!t.hasClass("selecter-element")){(i=e.extend({},i,t.data("selecter-options"))).external&&(i.links=!0);var s=t.find("option, optgroup"),u=s.filter("option"),h=u.filter(":selected"),g=""!==i.label?-1:u.index(h),v=i.links?"nav":"div";i.tabIndex=t[0].tabIndex,t[0].tabIndex=-1,i.multiple=t.prop("multiple"),i.disabled=t.is(":disabled");var y="<"+v+' class="selecter '+i.customClass;_?y+=" mobile":i.cover&&(y+=" cover"),y+=i.multiple?" multiple":" closed",i.disabled&&(y+=" disabled"),y+='" tabindex="'+i.tabIndex+'">',i.multiple||(y+='<span class="selecter-selected'+(""!==i.label?" placeholder":"")+'">',y+=e("<span></span").text(f(""!==i.label?i.label:h.text(),i.trim)).html(),y+="</span>"),y+='<div class="selecter-options">',y+="</div>",y+="</"+v+">",t.addClass("selecter-element").after(y);var b=t.next(".selecter"),w=e.extend({$select:t,$allOptions:s,$options:u,$selecter:b,$selected:b.find(".selecter-selected"),$itemsWrapper:b.find(".selecter-options"),index:-1,guid:m++},i);n(w),p(g,w),void 0!==e.fn.scroller&&w.$itemsWrapper.scroller(),w.$selecter.on("touchstart.selecter click.selecter",".selecter-selected",w,o).on("click.selecter",".selecter-item",w,a).on("close.selecter",w,r).data("selecter",w),w.$select.on("change.selecter",w,l),_||(w.$selecter.on("focus.selecter",w,c).on("blur.selecter",w,d),w.$select.on("focus.selecter",w,function(e){e.data.$selecter.trigger("focus")}))}}function n(t){for(var i="",n=t.links?"a":"span",o=0,s=t.$allOptions.length;s>o;o++){var r=t.$allOptions.eq(o);if("OPTGROUP"===r[0].tagName)i+='<span class="selecter-group',r.is(":disabled")&&(i+=" disabled"),i+='">'+r.attr("label")+"</span>";else{var a=r.val();r.attr("value")||r.attr("value",a),i+="<"+n+' class="selecter-item',r.is(":selected")&&""===t.label&&(i+=" selected"),r.is(":disabled")&&(i+=" disabled"),i+='" ',i+=t.links?'href="'+a+'"':'data-value="'+a+'"',i+=">"+e("<span></span>").text(f(r.text(),t.trim)).html()+"</"+n+">",0}}t.$itemsWrapper.html(i),t.$items=t.$selecter.find(".selecter-item")}function o(i){i.preventDefault(),i.stopPropagation();var n=i.data;if(!n.$select.is(":disabled"))if(e(".selecter").not(n.$selecter).trigger("close.selecter",[n]),_){var o=n.$select[0];if(t.document.createEvent){var a=t.document.createEvent("MouseEvents");a.initMouseEvent("mousedown",!1,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,null),o.dispatchEvent(a)}else o.fireEvent&&o.fireEvent("onmousedown")}else n.$selecter.hasClass("closed")?function(t){t.preventDefault(),t.stopPropagation();var i=t.data;if(!i.$selecter.hasClass("open")){var n=i.$selecter.offset(),o=v.outerHeight(),r=i.$itemsWrapper.outerHeight(!0),a=i.index>=0?i.$items.eq(i.index).position():{left:0,top:0};n.top+r>o&&i.$selecter.addClass("bottom"),i.$itemsWrapper.show(),i.$selecter.removeClass("closed").addClass("open"),v.on("click.selecter-"+i.guid,":not(.selecter-options)",i,s),void 0!==e.fn.scroller?i.$itemsWrapper.scroller("scroll",i.$itemsWrapper.find(".scroller-content").scrollTop()+a.top,0).scroller("reset"):i.$itemsWrapper.scrollTop(i.$itemsWrapper.scrollTop()+a.top)}}(i):n.$selecter.hasClass("open")&&r(i)}function s(t){t.preventDefault(),t.stopPropagation(),0===e(t.currentTarget).parents(".selecter").length&&r(t)}function r(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.hasClass("open")&&(t.$itemsWrapper.hide(),t.$selecter.removeClass("open bottom").addClass("closed"),v.off(".selecter-"+t.guid))}function a(t){t.preventDefault(),t.stopPropagation();var i=e(this),n=t.data;if(!n.$select.is(":disabled")){if(n.$itemsWrapper.is(":visible"))p(n.$items.index(i),n),h(n);n.multiple||r(t)}}function l(t,i){var n=e(this),o=t.data;i||o.multiple||(p(o.$options.index(o.$options.filter("[value='"+n.val().replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")+"']")),o),h(o))}function c(t){t.preventDefault(),t.stopPropagation();var i=t.data;i.$select.is(":disabled")||i.multiple||(i.$selecter.addClass("focus").on("keydown.selecter"+i.guid,i,u),e(".selecter").not(i.$selecter).trigger("close.selecter",[i]))}function d(t){t.preventDefault(),t.stopPropagation();var i=t.data;i.$selecter.removeClass("focus").off("keydown.selecter"+i.guid+" keyup.selecter"+i.guid),e(".selecter").not(i.$selecter).trigger("close.selecter",[i])}function u(t){var i=t.data;if(13===t.keyCode)i.$selecter.hasClass("open")&&(r(t),p(i.index,i)),h(i);else if(!(9===t.keyCode||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)){t.preventDefault(),t.stopPropagation();var n=i.$items.length-1,o=i.index<0?0:i.index;if(e.inArray(t.keyCode,g?[38,40,37,39]:[38,40])>-1)o+=38===t.keyCode||g&&37===t.keyCode?-1:1,0>o&&(o=0),o>n&&(o=n);else{var s,a,l=String.fromCharCode(t.keyCode).toUpperCase();for(a=i.index+1;n>=a;a++)if(s=i.$options.eq(a).text().charAt(0).toUpperCase(),s===l){o=a;break}if(0>o)for(a=0;n>=a;a++)if(s=i.$options.eq(a).text().charAt(0).toUpperCase(),s===l){o=a;break}}o>=0&&p(o,i)}}function p(e,t){var i=t.$items.eq(e),n=i.hasClass("selected");if(!i.hasClass("disabled")){if(-1===e&&""!==t.label)t.$selected.html(t.label);else if(n)t.multiple&&(t.$options.eq(e).prop("selected",null),i.removeClass("selected"));else{var o=i.html();i.data("value"),t.multiple?t.$options.eq(e).prop("selected",!0):(t.$selected.html(o).removeClass("placeholder"),t.$items.filter(".selected").removeClass("selected"),t.$select[0].selectedIndex=e),i.addClass("selected")}(!n||t.multiple)&&(t.index=e)}}function h(e){var i,n;e.links?(n=(i=e).$select.val(),i.external?t.open(n):t.location.href=n):(e.callback.call(e.$selecter,e.$select.val(),e.index),e.$select.trigger("change",[!0]))}function f(e,t){return 0===t?e:e.length>t?e.substring(0,t)+"...":e}var m=0,g=t.navigator.userAgent.toLowerCase().indexOf("firefox")>-1,_=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(t.navigator.userAgent||t.navigator.vendor||t.opera),v=null,y={callback:e.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,trim:0},b={defaults:function(t){return y=e.extend(y,t||{}),e(this)},disable:function(t){return e(this).each(function(i,n){var o=e(n).next(".selecter").data("selecter");if(o)if(void 0!==t){var s=o.$items.index(o.$items.filter("[data-value="+t+"]"));o.$items.eq(s).addClass("disabled"),o.$options.eq(s).prop("disabled",!0)}else o.$selecter.hasClass("open")&&o.$selecter.find(".selecter-selected").trigger("click.selecter"),o.$selecter.addClass("disabled"),o.$select.prop("disabled",!0)})},enable:function(t){return e(this).each(function(i,n){var o=e(n).next(".selecter").data("selecter");if(o)if(void 0!==t){var s=o.$items.index(o.$items.filter("[data-value="+t+"]"));o.$items.eq(s).removeClass("disabled"),o.$options.eq(s).prop("disabled",!1)}else o.$selecter.removeClass("disabled"),o.$select.prop("disabled",!1)})},destroy:function(){return e(this).each(function(t,i){var n=e(i).next(".selecter").data("selecter");n&&(n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==e.fn.scroller&&n.$selecter.find(".selecter-options").scroller("destroy"),n.$select[0].tabIndex=n.tabIndex,n.$select.off(".selecter").removeClass("selecter-element").show(),n.$selecter.off(".selecter").remove())})},refresh:function(){return e(this).each(function(t,i){var o=e(i).next(".selecter").data("selecter");if(o){var s=o.index;o.$allOptions=o.$select.find("option, optgroup"),o.$options=o.$allOptions.filter("option"),o.index=-1,s=o.$options.index(o.$options.filter(":selected")),n(o),p(s,o)}})}};e.fn.selecter=function(t){return b[t]?b[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?this:function(t){t=e.extend({},y,t||{}),null===v&&(v=e("body"));for(var n=e(this),o=0,s=n.length;s>o;o++)i(n.eq(o),t);return n}.apply(this,arguments)},e.selecter=function(e){"defaults"===e&&b.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window),"function"!=typeof jQuery.fn.stepper&&function(e){"use strict";function t(t,n){if(!t.hasClass("stepper-input")){n=e.extend({},n,t.data("stepper-options"));var o=parseFloat(t.attr("min")),s=parseFloat(t.attr("max")),r=parseFloat(t.attr("step"))||1;t.addClass("stepper-input").wrap('<div class="stepper '+n.customClass+'" />').after('<span class="stepper-arrow up">'+n.labels.up+'</span><span class="stepper-arrow down">'+n.labels.down+"</span>");var a=t.parent(".stepper"),l=e.extend({$stepper:a,$input:t,$arrow:a.find(".stepper-arrow"),min:void 0!==typeof o&&!isNaN(o)&&o,max:void 0!==typeof s&&!isNaN(s)&&s,step:void 0===typeof r||isNaN(r)?1:r,timer:null},n);l.digits=(c=l.step,(d=String(c)).indexOf(".")>-1?d.length-d.indexOf(".")-1:0),t.is(":disabled")&&a.addClass("disabled"),a.on("touchstart.stepper mousedown.stepper",".stepper-arrow",l,i).data("stepper",l)}var c,d}function i(t){t.preventDefault(),t.stopPropagation(),n(t);var i,r,a,l=t.data;if(!l.$input.is(":disabled")&&!l.$stepper.hasClass("disabled")){var c=e(t.target).hasClass("up")?l.step:-l.step;l.timer=(i=l.timer,r=125,a=function(){o(l,c)},s(i),setInterval(a,r)),o(l,c),e("body").on("touchend.stepper mouseup.stepper",l,n)}}function n(t){t.preventDefault(),t.stopPropagation(),s(t.data.timer),e("body").off(".stepper")}function o(e,t){var i=parseFloat(e.$input.val()),n=t;void 0===typeof i||isNaN(i)?n=!1!==e.min?e.min:0:!1!==e.min&&i<e.min?n=e.min:n+=i;var o,s,r,a=(n-e.min)%e.step;0!==a&&(n-=a),!1!==e.min&&n<e.min&&(n=e.min),!1!==e.max&&n>e.max&&(n-=e.step),n!==i&&(o=n,s=e.digits,r=Math.pow(10,s),n=Math.round(o*r)/r,e.$input.val(n).trigger("change"))}function s(e){e&&(clearInterval(e),e=null)}var r={customClass:"",labels:{up:"Up",down:"Down"}},a={defaults:function(t){return r=e.extend(r,t||{}),e(this)},destroy:function(){return e(this).each(function(){var t=e(this).data("stepper");t&&(t.$stepper.off(".stepper").find(".stepper-arrow").remove(),t.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return e(this).each(function(){var t=e(this).data("stepper");t&&(t.$input.attr("disabled","disabled"),t.$stepper.addClass("disabled"))})},enable:function(){return e(this).each(function(){var t=e(this).data("stepper");t&&(t.$input.attr("disabled",null),t.$stepper.removeClass("disabled"))})}};e.fn.stepper=function(i){return a[i]?a[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?this:function(i){i=e.extend({},r,i||{});for(var n=e(this),o=0,s=n.length;s>o;o++)t(n.eq(o),i);return n}.apply(this,arguments)},e.stepper=function(e){"defaults"===e&&a.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var i,n,o;return t&&t.requirejs||(t?n=t:t={},function(e){function t(e,t){return v.call(e,t)}function s(e,t){var i,n,o,s,r,a,l,c,d,u,p,h=t&&t.split("/"),f=g.map,m=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(r=(e=e.split("/")).length-1,g.nodeIdCompat&&b.test(e[r])&&(e[r]=e[r].replace(b,"")),e=h.slice(0,h.length-1).concat(e),d=0;d<e.length;d+=1)if(p=e[d],"."===p)e.splice(d,1),d-=1;else if(".."===p){if(1===d&&(".."===e[2]||".."===e[0]))break;d>0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||m)&&f){for(d=(i=e.split("/")).length;d>0;d-=1){if(n=i.slice(0,d).join("/"),h)for(u=h.length;u>0;u-=1)if(o=f[h.slice(0,u).join("/")],o&&(o=o[n])){s=o,a=d;break}if(s)break;!l&&m&&m[n]&&(l=m[n],c=d)}!s&&l&&(s=l,a=c),s&&(i.splice(0,a,s),e=i.join("/"))}return e}function r(t,i){return function(){var n=y.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),u.apply(e,n.concat([t,i]))}}function a(e){return function(t){f[e]=t}}function l(i){if(t(m,i)){var n=m[i];delete m[i],_[i]=!0,d.apply(e,n)}if(!t(f,i)&&!t(_,i))throw new Error("No "+i);return f[i]}function c(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}var d,u,p,h,f={},m={},g={},_={},v=Object.prototype.hasOwnProperty,y=[].slice,b=/\.js$/;p=function(e,t){var i,n,o=c(e),r=o[0];return e=o[1],r&&(i=l(r=s(r,t))),r?e=i&&i.normalize?i.normalize(e,(n=t,function(e){return s(e,n)})):s(e,t):(r=(o=c(e=s(e,t)))[0],e=o[1],r&&(i=l(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:i}},h={require:function(e){return r(e)},exports:function(e){var t=f[e];return void 0!==t?t:f[e]={}},module:function(e){return{id:e,uri:"",exports:f[e],config:(t=e,function(){return g&&g.config&&g.config[t]||{}})};var t}},d=function(i,n,o,s){var c,d,u,g,v,y,b=[],w=typeof o;if(s=s||i,"undefined"===w||"function"===w){for(n=!n.length&&o.length?["require","exports","module"]:n,v=0;v<n.length;v+=1)if(g=p(n[v],s),d=g.f,"require"===d)b[v]=h.require(i);else if("exports"===d)b[v]=h.exports(i),y=!0;else if("module"===d)c=b[v]=h.module(i);else if(t(f,d)||t(m,d)||t(_,d))b[v]=l(d);else{if(!g.p)throw new Error(i+" missing "+d);g.p.load(g.n,r(s,!0),a(d),{}),b[v]=f[d]}u=o?o.apply(f[i],b):void 0,i&&(c&&c.exports!==e&&c.exports!==f[i]?f[i]=c.exports:u===e&&y||(f[i]=u))}else i&&(f[i]=o)},i=n=u=function(t,i,n,o,s){if("string"==typeof t)return h[t]?h[t](i):l(p(t,i).f);if(!t.splice){if((g=t).deps&&u(g.deps,g.callback),!i)return;i.splice?(t=i,i=n,n=null):t=e}return i=i||function(){},"function"==typeof n&&(n=o,o=s),o?d(e,t,i,n):setTimeout(function(){d(e,t,i,n)},4),u},u.config=function(e){return u(e)},i._defined=f,(o=function(e,i,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");i.splice||(n=i,i=[]),t(f,e)||t(m,e)||(m[e]=[e,i,n])}).amd={jQuery:!0}}(),t.requirejs=i,t.require=n,t.define=o),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,i=[];for(var n in t){"function"==typeof t[n]&&"constructor"!==n&&i.push(n)}return i}var i={};i.Extend=function(e,t){function i(){this.constructor=e}var n={}.hasOwnProperty;for(var o in t)n.call(t,o)&&(e[o]=t[o]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},i.Decorate=function(e,i){function n(){var t=Array.prototype.unshift,n=i.prototype.constructor.length,o=e.prototype.constructor;n>0&&(t.call(arguments,e.prototype.constructor),o=i.prototype.constructor),o.apply(this,arguments)}var o=t(i),s=t(e);i.displayName=e.displayName,n.prototype=new function(){this.constructor=n};for(var r=0;r<s.length;r++){var a=s[r];n.prototype[a]=e.prototype[a]}for(var l=function(e){var t=function(){};e in n.prototype&&(t=n.prototype[e]);var o=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),o.apply(this,arguments)}},c=0;c<o.length;c++){var d=o[c];n.prototype[d]=l(d)}return n};var n=function(){this.listeners={}};return n.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},n.prototype.trigger=function(e){var t=Array.prototype.slice,i=t.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),i[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},n.prototype.invoke=function(e,t){for(var i=0,n=e.length;n>i;i++)e[i].apply(this,t)},i.Observable=n,i.generateChars=function(e){for(var t="",i=0;e>i;i++){t+=Math.floor(36*Math.random()).toString(36)}return t},i.bind=function(e,t){return function(){e.apply(t,arguments)}},i._convertData=function(e){for(var t in e){var i=t.split("-"),n=e;if(1!==i.length){for(var o=0;o<i.length;o++){var s=i[o];(s=s.substring(0,1).toLowerCase()+s.substring(1))in n||(n[s]={}),o==i.length-1&&(n[s]=e[t]),n=n[s]}delete e[t]}}return e},i.hasScroll=function(t,i){var n=e(i),o=i.style.overflowX,s=i.style.overflowY;return(o!==s||"hidden"!==s&&"visible"!==s)&&("scroll"===o||"scroll"===s||(n.innerHeight()<i.scrollHeight||n.innerWidth()<i.scrollWidth))},i.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(t,i){if("1.7"===e.fn.jquery.substr(0,3)){var n=e();e.map(i,function(e){n=n.add(e)}),i=n}t.append(i)},i}),t.define("select2/results",["jquery","./utils"],function(e,t){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(t){var i=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);n.append(i(o(t.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var i=0;i<e.results.length;i++){var n=e.results[i],o=this.option(n);t.push(o)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".select2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(i){var n=e.map(i,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var t=e(this),i=e.data(this,"data"),o=""+i.id;null!=i.element&&i.element.selected||null==i.element&&e.inArray(o,n)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},i=this.option(t);i.className+=" loading-results",this.$results.prepend(i)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(t){var i=document.createElement("li");i.className="select2-results__option";var n={role:"treeitem","aria-selected":"false"};t.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==t.id&&delete n["aria-selected"],null!=t._resultId&&(i.id=t._resultId),t.title&&(i.title=t.title),t.children&&(n.role="group",n["aria-label"]=t.text,delete n["aria-selected"]);for(var o in n){var s=n[o];i.setAttribute(o,s)}if(t.children){var r=e(i),a=document.createElement("strong");a.className="select2-results__group",e(a),this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var d=t.children[c],u=this.option(d);l.push(u)}var p=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),r.append(a),r.append(p)}else this.template(t,i);return e.data(i,"data",t),i},i.prototype.bind=function(t,i){var n=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",function(e){n.clear(),n.append(e.data),t.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),t.on("results:append",function(e){n.append(e.data),t.isOpen()&&n.setClasses()}),t.on("query",function(e){n.hideMessages(),n.showLoading(e)}),t.on("select",function(){t.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),t.on("open",function(){n.$results.attr("aria-expanded","true"),n.$results.attr("aria-hidden","false"),n.setClasses(),n.ensureHighlightVisible()}),t.on("close",function(){n.$results.attr("aria-expanded","false"),n.$results.attr("aria-hidden","true"),n.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=n.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=n.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?n.trigger("close",{}):n.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=n.getHighlightedResults(),t=n.$results.find("[aria-selected]"),i=t.index(e);if(0!==i){var o=i-1;0===e.length&&(o=0);var s=t.eq(o);s.trigger("mouseenter");var r=n.$results.offset().top,a=s.offset().top,l=n.$results.scrollTop()+(a-r);0===o?n.$results.scrollTop(0):0>a-r&&n.$results.scrollTop(l)}}),t.on("results:next",function(){var e=n.getHighlightedResults(),t=n.$results.find("[aria-selected]"),i=t.index(e)+1;if(!(i>=t.length)){var o=t.eq(i);o.trigger("mouseenter");var s=n.$results.offset().top+n.$results.outerHeight(!1),r=o.offset().top+o.outerHeight(!1),a=n.$results.scrollTop()+r-s;0===i?n.$results.scrollTop(0):r>s&&n.$results.scrollTop(a)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){n.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=n.$results.scrollTop(),i=n.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,s=e.deltaY<0&&i<=n.$results.height();o?(n.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):s&&(n.$results.scrollTop(n.$results.get(0).scrollHeight-n.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var i=e(this),o=i.data("data");return"true"===i.attr("aria-selected")?void(n.options.get("multiple")?n.trigger("unselect",{originalEvent:t,data:o}):n.trigger("close",{})):void n.trigger("select",{originalEvent:t,data:o})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var i=e(this).data("data");n.getHighlightedResults().removeClass("select2-results__option--highlighted"),n.trigger("results:focus",{data:i,element:e(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),i=this.$results.offset().top,n=e.offset().top,o=this.$results.scrollTop()+(n-i),s=n-i;o-=2*e.outerHeight(!1),2>=t?this.$results.scrollTop(0):(s>this.$results.outerHeight()||0>s)&&this.$results.scrollTop(o)}},i.prototype.template=function(t,i){var n=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),s=n(t,i);null==s?i.style.display="none":"string"==typeof s?i.innerHTML=o(s):e(i).append(s)},i}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,i){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},n.prototype.bind=function(e,t){var n=this,o=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",o),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},n.prototype._handleBlur=function(t){var i=this;window.setTimeout(function(){document.activeElement==i.$selection[0]||e.contains(i.$selection[0],document.activeElement)||i.trigger("blur",t)},1)},n.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var i=e(t.target).closest(".select2");e(".select2.select2-container--open").each(function(){var t=e(this);this!=i[0]&&t.data("element").select2("close")})})},n.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},n.prototype.position=function(e,t){t.find(".selection").append(e)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},n}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,i,n){function o(){o.__super__.constructor.apply(this,arguments)}return i.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var i=this;o.__super__.bind.apply(this,arguments);var n=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(e){1===e.which&&i.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||i.$selection.focus()}),e.on("selection:update",function(e){i.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0!==e.length){var t=e[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(t,i);i.empty().append(n),i.prop("title",t.title||t.text)}else this.clear()},o}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,i){function n(e,t){n.__super__.constructor.apply(this,arguments)}return i.Extend(n,t),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(t,i){var o=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!o.options.get("disabled")){var i=e(this).parent().data("data");o.trigger("unselect",{originalEvent:t,data:i})}})},n.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},n.prototype.display=function(e,t){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(e,t))},n.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var o=e[n],s=this.selectionContainer(),r=this.display(o,s);s.append(r),s.prop("title",o.title||o.text),s.data("data",o),t.push(s)}var a=this.$selection.find(".select2-selection__rendered");i.appendMany(a,t)}},n}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),e.call(this,t,i)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var i=this.selectionContainer();return i.html(this.display(t)),i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),i},t.prototype.update=function(e,t){var i=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||i)return e.call(this,t);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function i(){}return i.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){n._handleClear(e)}),t.on("keypress",function(e){n._handleKeyboardClear(e,t)})},i.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){t.stopPropagation();for(var n=i.data("data"),o=0;o<n.length;o++){var s={data:n[o]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},i.prototype._handleKeyboardClear=function(e,i,n){n.isOpen()||(i.which==t.DELETE||i.which==t.BACKSPACE)&&this._handleClear(i)},i.prototype.update=function(t,i){if(t.call(this,i),!(this.$selection.find(".select2-selection__placeholder").length>0||0===i.length)){var n=e('<span class="select2-selection__clear">&times;</span>');n.data("data",i),this.$selection.find(".select2-selection__rendered").prepend(n)}},i}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,i){function n(e,t,i){e.call(this,t,i)}return n.prototype.render=function(t){var i=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=i,this.$search=i.find("input");var n=t.call(this);return this._transferTabIndex(),n},n.prototype.bind=function(e,t,n){var o=this;e.call(this,t,n),t.on("open",function(){o.$search.trigger("focus")}),t.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),t.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),t.on("disable",function(){o.$search.prop("disabled",!0)}),t.on("focus",function(e){o.$search.trigger("focus")}),t.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===i.BACKSPACE&&""===o.$search.val()){var t=o.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var n=t.data("data");o.searchRemoveChoice(n),e.preventDefault()}}});var s=document.documentMode,r=s&&11>=s;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){return r?void o.$selection.off("input.search input.searchcheck"):void o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(r&&"input"===e.type)o.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=i.SHIFT&&t!=i.CTRL&&t!=i.ALT&&t!=i.TAB&&o.handleSearch(e)}})},n.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},n.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},n.prototype.update=function(e,t){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i&&this.$search.focus()},n.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},n.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},n.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},n}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,i,n){var o=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting"],r=["opening","closing","selecting","unselecting"];t.call(this,i,n),i.on("*",function(t,i){if(-1!==e.inArray(t,s)){i=i||{};var n=e.Event("select2:"+t,{params:i});o.$element.trigger(n),-1!==e.inArray(t,r)&&(i.prevented=n.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var n=t(e);i._cache[e]=n}return new i(i._cache[e])},i}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(e){function t(e,i){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,i){var n=t.id+"-result-";return(n+=e.generateChars(4))+(null!=i.id?"-"+i.id.toString():"-"+e.generateChars(4))},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,i){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var t=[],n=this;this.$element.find(":selected").each(function(){var e=i(this),o=n.item(e);t.push(o)}),e(t)},n.prototype.select=function(e){var t=this;if(e.selected=!0,i(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(n){var o=[];(e=[e]).push.apply(e,n);for(var s=0;s<e.length;s++){var r=e[s].id;-1===i.inArray(r,o)&&o.push(r)}t.$element.val(o),t.$element.trigger("change")});else{var n=e.id;this.$element.val(n),this.$element.trigger("change")}},n.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return e.selected=!1,i(e.element).is("option")?(e.element.selected=!1,void this.$element.trigger("change")):void this.current(function(n){for(var o=[],s=0;s<n.length;s++){var r=n[s].id;r!==e.id&&-1===i.inArray(r,o)&&o.push(r)}t.$element.val(o),t.$element.trigger("change")})},n.prototype.bind=function(e,t){var i=this;this.container=e,e.on("select",function(e){i.select(e.data)}),e.on("unselect",function(e){i.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){i.removeData(this,"data")})},n.prototype.query=function(e,t){var n=[],o=this;this.$element.children().each(function(){var t=i(this);if(t.is("option")||t.is("optgroup")){var s=o.item(t),r=o.matches(e,s);null!==r&&n.push(r)}}),t({results:n})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=i(t),o=this._normalizeItem(e);return o.element=t,i.data(t,"data",o),n},n.prototype.item=function(e){var t={};if(null!=(t=i.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),o=[],s=0;s<n.length;s++){var r=i(n[s]),a=this.item(r);o.push(a)}t.children=o}return(t=this._normalizeItem(t)).element=e[0],i.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){i.isPlainObject(e)||(e={id:e,text:e});return null!=(e=i.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),i.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,i){function n(e,t){var i=t.get("data")||[];n.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(i))}return t.Extend(n,e),n.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,i){return i.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),n.__super__.select.call(this,e)},n.prototype.convertToOptions=function(e){function n(e){return function(){return i(this).val()==e.id}}for(var o=this,s=this.$element.find("option"),r=s.map(function(){return o.item(i(this)).id}).get(),a=[],l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(i.inArray(c.id,r)>=0){var d=s.filter(n(c)),u=this.item(d),p=i.extend(!0,{},c,u),h=this.option(p);d.replaceWith(h)}else{var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(f,m)}a.push(f)}}return a},n}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,i){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return i.extend({},e,{q:e.term})},transport:function(e,t,n){var o=i.ajax(e);return o.then(t),o.fail(n),o}};return i.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(e,t){function n(){var n=s.transport(s,function(n){var s=o.processResults(n,e);o.options.get("debug")&&window.console&&console.error&&(s&&s.results&&i.isArray(s.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(s)},function(){n.status&&"0"===n.status||o.trigger("results:message",{message:"errorLoading"})});o._request=n}var o=this;null!=this._request&&(i.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var s=i.extend({type:"GET"},this.ajaxOptions);"function"==typeof s.url&&(s.url=s.url.call(this.$element,e)),"function"==typeof s.data&&(s.data=s.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(n,this.ajaxOptions.delay)):n()},n}),t.define("select2/data/tags",["jquery"],function(e){function t(t,i,n){var o=n.get("tags"),s=n.get("createTag");void 0!==s&&(this.createTag=s);var r=n.get("insertTag");if(void 0!==r&&(this.insertTag=r),t.call(this,i,n),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),d=this.option(c);this.$element.append(d)}}return t.prototype.query=function(e,t,i){var n=this;return this._removeOldTags(),null==t.term||null!=t.page?void e.call(this,t,i):void e.call(this,t,function e(o,s){for(var r=o.results,a=0;a<r.length;a++){var l=r[a],c=null!=l.children&&!e({results:l.children},!0);if(l.text===t.term||c)return!s&&(o.data=r,void i(o))}if(s)return!0;var d=n.createTag(t);if(null!=d){var u=n.option(d);u.attr("data-select2-tag",!0),n.addOptions([u]),n.insertTag(r,d)}o.results=r,i(o)})},t.prototype.createTag=function(t,i){var n=e.trim(i.term);return""===n?null:{id:n,text:n}},t.prototype.insertTag=function(e,t,i){t.unshift(i)},t.prototype._removeOldTags=function(t){(this._lastTag,this.$element.find("option[data-select2-tag]")).each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),e.call(this,t,i)}return t.prototype.bind=function(e,t,i){e.call(this,t,i),this.$search=t.dropdown.$search||t.selection.$search||i.find(".select2-search__field")},t.prototype.query=function(t,i,n){var o=this;i.term=i.term||"";var s=this.tokenizer(i,this.options,function(t){var i,n=o._normalizeItem(t);if(!o.$element.find("option").filter(function(){return e(this).val()===n.id}).length){var s=o.option(n);s.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([s])}i=n,o.trigger("select",{data:i})});s.term!==i.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),i.term=s.term),t.call(this,i,n)},t.prototype.tokenizer=function(t,i,n,o){for(var s=n.get("tokenSeparators")||[],r=i.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<r.length;){var c=r[a];if(-1!==e.inArray(c,s)){var d=r.substr(0,a),u=l(e.extend({},i,{term:d}));null!=u?(o(u),r=r.substr(a+1)||"",a=0):a++}else a++}return{term:r}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,i){this.minimumInputLength=i.get("minimumInputLength"),e.call(this,t,i)}return e.prototype.query=function(e,t,i){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,i)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,i){this.maximumInputLength=i.get("maximumInputLength"),e.call(this,t,i)}return e.prototype.query=function(e,t,i){return t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,i)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),e.call(this,t,i)}return e.prototype.query=function(e,t,i){var n=this;this.current(function(o){var s=null!=o?o.length:0;return n.maximumSelectionLength>0&&s>=n.maximumSelectionLength?void n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):void e.call(n,t,i)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},i.prototype.bind=function(){},i.prototype.position=function(e,t){},i.prototype.destroy=function(){this.$dropdown.remove()},i}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function i(){}return i.prototype.render=function(t){var i=t.call(this),n=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),i.prepend(n),i},i.prototype.bind=function(t,i,n){var o=this;t.call(this,i,n),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),i.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),i.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),i.on("focus",function(){i.isOpen()&&o.$search.focus()}),i.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(o.showSearch(e)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide"))})},i.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},i.prototype.showSearch=function(e,t){return!0},i}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),e.call(this,t,i,n)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var i=t.slice(0),n=t.length-1;n>=0;n--){var o=t[n];this.placeholder.id===o.id&&i.splice(n,1)}return i},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,i,n){this.lastParams={},e.call(this,t,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,i,n){var o=this;t.call(this,i,n),i.on("query",function(e){o.lastParams=e,o.loading=!0}),i.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);!o.loading&&t&&(o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore())})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),i=this.options.get("translations").get("loadingMore");return t.html(i(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function i(t,i,n){this.$dropdownParent=n.get("dropdownParent")||e(document.body),t.call(this,i,n)}return i.prototype.bind=function(e,t,i){var n=this,o=!1;e.call(this,t,i),t.on("open",function(){n._showDropdown(),n._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}))}),t.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},i.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},i.prototype.position=function(e,t,i){t.attr("class",i.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=i},i.prototype.render=function(t){var i=e("<span></span>"),n=t.call(this);return i.append(n),this.$dropdownContainer=i,i},i.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},i.prototype._attachPositioningHandler=function(i,n){var o=this,s="scroll.select2."+n.id,r="resize.select2."+n.id,a="orientationchange.select2."+n.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(s,function(t){var i=e(this).data("select2-scroll-position");e(this).scrollTop(i.y)}),e(window).on(s+" "+r+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},i.prototype._detachPositioningHandler=function(i,n){var o="scroll.select2."+n.id,s="resize.select2."+n.id,r="orientationchange.select2."+n.id;this.$container.parents().filter(t.hasScroll).off(o),e(window).off(o+" "+s+" "+r)},i.prototype._positionDropdown=function(){var t=e(window),i=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),o=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=s.top,r.bottom=s.top+r.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),d=l<s.top-a,u=c>s.bottom+a,p={left:s.left,top:r.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f=h.offset();p.top-=f.top,p.left-=f.left,i||n||(o="below"),u||!d||i?!d&&u&&i&&(o="below"):o="above",("above"==o||i&&"below"!==o)&&(p.top=r.top-f.top-a),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(p)},i.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},i.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},i}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,i,n)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var i=0,n=0;n<t.length;n++){var o=t[n];o.children?i+=e(o.children):i++}return i}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),t.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),t.on("close",function(e){n._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var i=t.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var n=this.getHighlightedResults();if(!(n.length<1)){var o=n.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),t.on("select",function(e){n._selectTriggered(e)}),t.on("unselect",function(e){n._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var i=t.originalEvent;i&&i.ctrlKey||this.trigger("close",{originalEvent:i,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,i="Please delete "+t+" character";return 1!=t&&(i+="s"),i},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,i,n,o,s,r,a,l,c,d,u,p,h,f,m,g,_,v,y,b,w,k,C,z,S,I,E,M){function R(){this.reset()}return R.prototype.apply=function(u){if(null==(u=e.extend(!0,{},this.defaults,u)).dataAdapter){if(null!=u.ajax?u.dataAdapter=f:null!=u.data?u.dataAdapter=h:u.dataAdapter=p,u.minimumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,_)),u.maximumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,v)),u.maximumSelectionLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)),u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,m)),(null!=u.tokenSeparators||null!=u.tokenizer)&&(u.dataAdapter=c.Decorate(u.dataAdapter,g)),null!=u.query){var M=t(u.amdBase+"compat/query");u.dataAdapter=c.Decorate(u.dataAdapter,M)}if(null!=u.initSelection){var R=t(u.amdBase+"compat/initSelection");u.dataAdapter=c.Decorate(u.dataAdapter,R)}}if(null==u.resultsAdapter&&(u.resultsAdapter=i,null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,C)),null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,k)),u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,I))),null==u.dropdownAdapter){if(u.multiple)u.dropdownAdapter=b;else{var x=c.Decorate(b,w);u.dropdownAdapter=x}if(0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,S)),u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,E)),null!=u.dropdownCssClass||null!=u.dropdownCss||null!=u.adaptDropdownCssClass){var P=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=c.Decorate(u.dropdownAdapter,P)}u.dropdownAdapter=c.Decorate(u.dropdownAdapter,z)}if(null==u.selectionAdapter){if(u.multiple?u.selectionAdapter=o:u.selectionAdapter=n,null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,s)),u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,r)),u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,a)),null!=u.containerCssClass||null!=u.containerCss||null!=u.adaptContainerCssClass){var O=t(u.amdBase+"compat/containerCss");u.selectionAdapter=c.Decorate(u.selectionAdapter,O)}u.selectionAdapter=c.Decorate(u.selectionAdapter,l)}if("string"==typeof u.language)if(u.language.indexOf("-")>0){var D=u.language.split("-")[0];u.language=[u.language,D]}else u.language=[u.language];if(e.isArray(u.language)){var A=new d;u.language.push("en");for(var T=u.language,$=0;$<T.length;$++){var Z=T[$],j={};try{j=d.loadPath(Z)}catch(e){try{Z=this.defaults.amdLanguageBase+Z,j=d.loadPath(Z)}catch(e){u.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+Z+'" could not be automatically loaded. A fallback will be used instead.');continue}}A.extend(j)}u.translations=A}else{var L=d.loadPath(this.defaults.amdLanguageBase+"en"),V=new d(u.language);V.extend(L),u.translations=V}return u},R.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return u[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:M,matcher:function i(n,o){if(""===e.trim(n.term))return o;if(o.children&&o.children.length>0){for(var s=e.extend(!0,{},o),r=o.children.length-1;r>=0;r--)null==i(n,o.children[r])&&s.children.splice(r,1);return s.children.length>0?s:i(n,s)}var a=t(o.text).toUpperCase(),l=t(n.term).toUpperCase();return a.indexOf(l)>-1?o:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},R.prototype.set=function(t,i){var n={};n[e.camelCase(t)]=i;var o=c._convertData(n);e.extend(this.defaults,o)},new R}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,i,n){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=i.apply(this.options),o&&o.is("input")){var s=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=n.Decorate(this.options.dataAdapter,s)}}return o.prototype.fromElement=function(e){var i=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var o;o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var s=t.extend(!0,{},o);s=n._convertData(s);for(var r in s)t.inArray(r,i)>-1||(t.isPlainObject(this.options[r])?t.extend(this.options[r],s[r]):this.options[r]=s[r]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,i,n){var o=function(e,i){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),i=i||{},this.options=new t(i,e),o.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var r=this.render();this._placeContainer(r);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var l=this.options.get("dropdownAdapter");this.dropdown=new l(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var c=this.options.get("resultsAdapter");this.results=new c(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var d=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){d.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return i.Extend(o,i.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var n=this._resolveWidth(e,"style");return null!=n?n:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return 0>=o?"auto":o+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;for(var r=s.split(";"),a=0,l=r.length;l>a;a+=1){var c=r[a].replace(/\s/g,"").match(i);if(null!==c&&c.length>=1)return c[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=n?(this._observer=new n(function(i){e.each(i,t._syncA),e.each(i,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,i){e.trigger(t,i)})},o.prototype._registerSelectionEvents=function(){var t=this,i=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(n,o){-1===e.inArray(n,i)&&t.trigger(n,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,i){e.trigger(t,i)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,i){e.trigger(t,i)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(i){e.trigger("results:all",{data:i,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(i){e.trigger("results:append",{data:i,query:t})})}),this.on("keypress",function(t){var i=t.which;e.isOpen()?i===n.ESC||i===n.TAB||i===n.UP&&t.altKey?(e.close(),t.preventDefault()):i===n.ENTER?(e.trigger("results:select",{}),t.preventDefault()):i===n.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):i===n.UP?(e.trigger("results:previous",{}),t.preventDefault()):i===n.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(i===n.ENTER||i===n.SPACE||i===n.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(e,t){var i=!1,n=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var o=0;o<t.addedNodes.length;o++){t.addedNodes[o].selected&&(i=!0)}else t.removedNodes&&t.removedNodes.length>0&&(i=!0);else i=!0;i&&this.dataAdapter.current(function(e){n.trigger("selection:update",{data:e})})}},o.prototype.trigger=function(e,t){var i=o.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in n){var s=n[e],r={prevented:!1,name:e,args:t};if(i.call(this,s,r),r.prevented)return void(t.prevented=!0)}i.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var i=t[0];e.isArray(i)&&(i=e.map(i,function(e){return e.toString()})),this.$element.val(i).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),t.define("jquery-mousewheel",["jquery"],function(e){return e}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,i,n){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var n=e.extend(!0,{},t);new i(e(this),n)}),this;if("string"==typeof t){var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var i=e(this).data("select2");null==i&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=i[t].apply(i,s)}),e.inArray(t,o)>-1?this:n}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=n),i}),{define:t.define,require:t.require}}(),i=t.require("jquery.select2");return e.fn.select2.amd=t,i}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";function t(e,t){function i(e){void 0!==e.open&&(e.open=!e.open)}var n=function(e){for(var t=[],i=e.parentNode;(n=i)&&(0===n.offsetWidth||0===n.offsetHeight||!1===n.open);)t.push(i),i=i.parentNode;var n;return t}(e),o=n.length,s=[],r=e[t];if(o){for(var a=0;a<o;a++)s[a]=n[a].style.cssText,n[a].style.setProperty?n[a].style.setProperty("display","block","important"):n[a].style.cssText+=";display: block !important",n[a].style.height="0",n[a].style.overflow="hidden",n[a].style.visibility="hidden",i(n[a]);r=e[t];for(var l=0;l<o;l++)n[l].style.cssText=s[l],i(n[l])}return r}function i(e,t){var i=parseFloat(e);return Number.isNaN(i)?t:i}function n(e){return e.charAt(0).toUpperCase()+e.substr(1)}function o(t,i){if(this.$window=e(window),this.$document=e(document),this.$element=e(t),this.options=e.extend({},c,i),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=d.orientation[this.orientation].dimension,this.DIRECTION=d.orientation[this.orientation].direction,this.DIRECTION_STYLE=d.orientation[this.orientation].directionStyle,this.COORDINATE=d.orientation[this.orientation].coordinate,this.polyfill&&l)return!1;this.identifier="js-"+r+"-"+a++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=e('<div class="'+this.options.fillClass+'" />'),this.$handle=e('<div class="'+this.options.handleClass+'" />'),this.$range=e('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=e.proxy(this.handleDown,this),this.handleMove=e.proxy(this.handleMove,this),this.handleEnd=e.proxy(this.handleEnd,this),this.init();var n,o,s=this;this.$window.on("resize."+this.identifier,(n=function(){!function(e,t){var i=Array.prototype.slice.call(arguments,2);setTimeout(function(){return e.apply(null,i)},t)}(function(){s.update(!1,!1)},300)},o=(o=20)||100,function(){if(!n.debouncing){var e=Array.prototype.slice.apply(arguments);n.lastReturnVal=n.apply(window,e),n.debouncing=!0}return clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(function(){n.debouncing=!1},o),n.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(e,t){if(!t||t.origin!==s.identifier){var i=e.target.value,n=s.getPositionFromValue(i);s.setPosition(n)}})}Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};var s,r="rangeslider",a=0,l=((s=document.createElement("input")).setAttribute("type","range"),"text"!==s.type),c={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},d={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return o.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},o.prototype.update=function(e,o){(e=e||!1)&&(this.min=i(this.$element[0].getAttribute("min"),0),this.max=i(this.$element[0].getAttribute("max"),100),this.value=i(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=i(this.$element[0].getAttribute("step"),1)),this.handleDimension=t(this.$handle[0],"offset"+n(this.DIMENSION)),this.rangeDimension=t(this.$range[0],"offset"+n(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,o)},o.prototype.handleDown=function(e){if(e.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),!((" "+e.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var t=this.getRelativePosition(e),i=this.$range[0].getBoundingClientRect()[this.DIRECTION],n=this.getPositionFromNode(this.$handle[0])-i,o="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(o),t>=n&&t<n+this.handleDimension&&(this.grabPos=t-n)}},o.prototype.handleMove=function(e){e.preventDefault();var t=this.getRelativePosition(e),i="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(i)},o.prototype.handleEnd=function(e){e.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},o.prototype.cap=function(e,t,i){return e<t?t:e>i?i:e},o.prototype.setPosition=function(e,t){var i,n;void 0===t&&(t=!0),i=this.getValueFromPosition(this.cap(e,0,this.maxHandlePos)),n=this.getPositionFromValue(i),this.$fill[0].style[this.DIMENSION]=n+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=n+"px",this.setValue(i),this.position=n,this.value=i,t&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(n,i)},o.prototype.getPositionFromNode=function(e){for(var t=0;null!==e;)t+=e.offsetLeft,e=e.offsetParent;return t},o.prototype.getRelativePosition=function(e){var t=n(this.COORDINATE),i=this.$range[0].getBoundingClientRect()[this.DIRECTION],o=0;return void 0!==e.originalEvent["client"+t]?o=e.originalEvent["client"+t]:e.originalEvent.touches&&e.originalEvent.touches[0]&&void 0!==e.originalEvent.touches[0]["client"+t]?o=e.originalEvent.touches[0]["client"+t]:e.currentPoint&&void 0!==e.currentPoint[this.COORDINATE]&&(o=e.currentPoint[this.COORDINATE]),o-i},o.prototype.getPositionFromValue=function(e){var t;return t=(e-this.min)/(this.max-this.min),Number.isNaN(t)?0:t*this.maxHandlePos},o.prototype.getValueFromPosition=function(e){var t,i;return t=e/(this.maxHandlePos||1),i=this.step*Math.round(t*(this.max-this.min)/this.step)+this.min,Number(i.toFixed(this.toFixed))},o.prototype.setValue=function(e){e===this.value&&""!==this.$element[0].value||this.$element.val(e).trigger("input",{origin:this.identifier})},o.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+r),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},e.fn[r]=function(t){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this),s=n.data("plugin_"+r);s||n.data("plugin_"+r,s=new o(this,t)),"string"==typeof t&&s[t].apply(s,i)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(e,t,i){e.bind("ready",function(){e.previewedDevice&&e.previewedDevice.bind(function(t){e.previewer.send("previewed-device",t)})})}(wp.customize,jQuery,_),function(e,t,i){e.czr_skopeReady=t.Deferred(),!i.isUndefined(serverControlParams.isSkopOn)&&serverControlParams.isSkopOn||e.czr_skopeReady.resolve();var n=function(e){e=i.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,n=Array.from(e.consoleArguments);return n=i.isEmpty(i.filter(n,function(e){return!i.isString(e)}))?n.join(" "):JSON.stringify(n.join(" ")),["%c "+(t=n,i.isString(t)?t.length>150?t.substr(0,149):t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]};e.consoleLog=function(){serverControlParams.isDevMode&&(i.isUndefined(console)&&"function"!=typeof window.console.log||(console.log.apply(console,n({consoleArguments:arguments})),console.log("Unstyled console message : ",arguments)))},e.errorLog=function(){i.isUndefined(console)&&"function"!=typeof window.console.log||(console.log.apply(console,n({bgCol:"#ffd5a0",textCol:"#000",consoleArguments:arguments})),console.log("Unstyled error message : ",arguments))},e.czr_isSkopOn=function(){return!i.isUndefined(serverControlParams.isSkopOn)&&serverControlParams.isSkopOn&&i.has(e,"czr_skopeBase")},e.czr_isChangeSetOn=function(){return serverControlParams.isChangeSetOn&&!0}}(wp.customize,jQuery,_),function(e,t,i){e.Value.prototype.set=function(n,o){var s=this._value,r=t.Deferred(),a=this,l=[];return n=this._setter.apply(this,arguments),n=this.validate(n),args=i.extend({silent:!1},i.isObject(o)?o:{}),null===n||i.isEqual(s,n)?r.resolveWith(a,[n,s,o]).promise():(this._value=n,this._dirty=!0,!0===args.silent?r.resolveWith(a,[n,s,o]).promise():this._deferreds?(i.each(a._deferreds,function(e){l.push(e.apply(null,[n,s,o]))}),t.when.apply(null,l).fail(function(){e.errorLog("A deferred callback failed in api.Value::set()")}).then(function(){a.callbacks.fireWith(a,[n,s,o]),r.resolveWith(a,[n,s,o])}),r.promise(a)):(this.callbacks.fireWith(this,[n,s,o]),r.resolveWith(a,[n,s,o]).promise(a)))},e.Value.prototype.bind=function(){var e=this,n=!1,o=[];return t.each(arguments,function(e,t){n||(n=i.isObject(t)&&t.deferred),i.isFunction(t)&&o.push(t)}),n?(e._deferreds=e._deferreds||[],i.each(o,function(t){i.contains(t,e._deferreds)||e._deferreds.push(t)})):e.callbacks.add.apply(e.callbacks,arguments),this},e.Setting.prototype.silent_set=function(t,n){var o=this._value,s=e.state("saved")();return t=this._setter.apply(this,arguments),null===(t=this.validate(t))||i.isEqual(o,t)?this:(this._value=t,this._dirty=i.isUndefined(n)||!i.isBoolean(n)?this._dirty:n,this.callbacks.fireWith(this,[t,o,{silent:!0}]),e.state("saved")(s),this)}}(wp.customize,jQuery,_),function(e,t,i){e.Setting.prototype.preview=function(n,o,s){var r,a=t.Deferred();return r=this.transport,serverControlParams.isSkopOn&&e.czr_isPreviewerSkopeAware&&"pending"==e.czr_isPreviewerSkopeAware.state()?(this.previewer.refresh(),a.resolve(arguments).promise()):i.isUndefined(o)||i.isEmpty(o)||i.isNull(o)||!i.isObject(s)||!0!==s.not_preview_sent?i.has(s,"silent")&&!1!==s.silent?a.resolve(arguments).promise():("postMessage"!==r||e.state("previewerAlive").get()||(r="refresh"),"postMessage"===r?(this.previewer.send("pre_setting",{set_id:this.id,data:s,value:n}),this.previewer.send("setting",[this.id,this()]),a.resolve(arguments)):"refresh"===r&&(serverControlParams.isSkopOn?this.previewer.refresh().always(function(){a.resolve(arguments)}):(this.previewer.refresh(),a.resolve(arguments))),a.promise()):a.resolve(arguments).promise()}}(wp.customize,jQuery,_),function(e,t,i){if("function"==typeof e.Section){var n=e.Section.prototype.initialize;e.Section.prototype.initialize=function(e,o){n.apply(this,[e,o]);var s=this;this.expanded.callbacks.add(function(e){if(e){var n=s.container.closest(".wp-full-overlay-sidebar-content"),o=s.container.find(".accordion-section-content");_resizeContentHeight=function(){o.css("height",n.innerHeight())},_resizeContentHeight(),t(window).on("resize.customizer-section",i.debounce(_resizeContentHeight,110))}})}}}(wp.customize,jQuery,_),function(e,t,i){e.CZR_Helpers=e.CZR_Helpers||{},e.CZR_Helpers=t.extend(e.CZR_Helpers,{getControlSettingId:function(t,n){return n="default",e.control.has(t)?!i.has(e.control(t),"settings")||i.isEmpty(e.control(t).settings)?t:i.has(e.control(t).settings,n)?i.isUndefined(e.control(t).settings[n].id)?(e.consoleLog("getControlSettingId : The requested control_id has no setting id assigned : "+t),t):e.control(t).settings[n].id:(e.consoleLog("getControlSettingId : The requested control_id does not have the requested setting type : "+t+" , "+n),t):(e.consoleLog("getControlSettingId : The requested control_id is not registered in the api yet : "+t),t)},getDocSearchLink:function(e){var t=(e=i.isString(e)?e:"").replace(/ /g,"+");return['<a href="'+[serverControlParams.docURL,"search?query=",t].join("")+'" title="'+serverControlParams.i18n.readDocumentation+'" target="_blank">'," ",'<span class="far fa-question-circle"></span>'].join("")},build_setId:function(e){return i.contains(serverControlParams.wpBuiltinSettings,e)?e:i.contains(serverControlParams.themeSettingList,e)&&-1==e.indexOf(serverControlParams.themeOptions)?[serverControlParams.themeOptions+"[",e,"]"].join(""):e},getOptionName:function(e){return-1==e.indexOf(serverControlParams.themeOptions)?e:e.replace(/\[|\]/g,"").replace(serverControlParams.themeOptions,"")},hasPartRefresh:function(t){if(i.has(e,"czr_partials"))return i.contains(i.map(e.czr_partials(),function(e,n){return i.contains(e.settings,t)}),!0)},getSectionControlIds:function(t){return t=t||e.czr_activeSectionId(),e.section.has(t)?i.map(e.section(t).controls(),function(e){return e.id}):[]},getSectionSettingIds:function(t){if(t=t||e.czr_activeSectionId(),e.section.has(t)){var n=[],o=this.getSectionControlIds(t);return i.each(o,function(t){i.each(e.control(t).settings,function(e,t){n.push(e.id)})}),n}},capitalize:function(e){return i.isString(e)?e.charAt(0).toUpperCase()+e.slice(1):e},truncate:function(e,t,n){if(!i.isString(e))return"";t=t||20;var o=e.length>t,s=o?e.substr(0,t-1):e;return s=n&&o?s.substr(0,s.lastIndexOf(" ")):s,o?s+"...":s},isMultiItemModule:function(t,n){if(!i.isUndefined(t)||i.isObject(n)){if(i.isObject(n)&&i.has(n,"module_type"))t=n.module_type;else if(i.isUndefined(t)||i.isNull(t))return;if(i.has(e.czrModuleMap,t))return e.czrModuleMap[t].crud||e.czrModuleMap[t].multi_item||!1}},isCrudModule:function(t,n){if(!i.isUndefined(t)||i.isObject(n)){if(i.isObject(n)&&i.has(n,"module_type"))t=n.module_type;else if(i.isUndefined(t)||i.isNull(t))return;if(i.has(e.czrModuleMap,t))return e.czrModuleMap[t].crud||!1}},hasModuleModOpt:function(t,n){if(!i.isUndefined(t)||i.isObject(n)){if(i.isObject(n)&&i.has(n,"module_type"))t=n.module_type;else if(i.isUndefined(t)||i.isNull(t))return;if(i.has(e.czrModuleMap,t))return e.czrModuleMap[t].has_mod_opt||!1}},setupInputCollectionFromDOM:function(){var n=this;if(!i.isFunction(n))throw new Error("setupInputCollectionFromDOM : inputParentInst is not valid.");var o=n.module,s=i.has(n(),"is_mod_opt");if(i.isEmpty(n.inputCollection())){n.czr_Input=n.czr_Input||new e.Values,n.inputConstructor=s?o.inputModOptConstructor:o.inputConstructor;var r=s?n.defaultModOptModel:n.defaultItemModel;if(i.isEmpty(r)||i.isUndefined(r))throw new Error("No default model found in item or mod opt "+n.id+".");var a=t.extend(!0,{},n());a=i.isObject(a)?t.extend(r,a):r;var l={};return t("."+o.control.css_attr.sub_set_wrapper,n.container).each(function(r){var c=t(this).find("[data-type]").attr("data-type"),d=i.has(a,c)?a[c]:"";if(i.isUndefined(c)||i.isEmpty(c))e.consoleLog("setupInputCollectionFromDOM : missing data-type for "+o.id);else{if(!i.has(a,c))throw new Error("The item or mod opt property : "+c+" has been found in the DOM but not in the item or mod opt model : "+n.id+". The input can not be instantiated.");var u=t(this).attr("data-input-type"),p=t(this).attr("data-transport")||"inherit",h=i.has(o.inputOptions,u)?o.inputOptions[u]:{};n.czr_Input.add(c,new n.inputConstructor(c,{id:c,type:u,transport:p,input_value:d,input_options:h,container:t(this),input_parent:n,is_mod_opt:s,module:o})),n.czr_Input(c).ready(),l[c]=d}}),n.inputCollection(l),n}},removeInputCollection:function(){var e=this;if(!i.isFunction(e))throw new Error("removeInputCollection : inputParentInst is not valid.");i.has(e,"czr_Input")&&(e.czr_Input.each(function(t){e.czr_Input.remove(t.id)}),e.inputCollection({}))},refreshModuleControl:function(i){var n=e.controlConstructor.czr_module,o=(e.control(i).params.type,e.settings.controls[i]);t.when(e.control(i).container.remove()).done(function(){e.control.remove(i),e.control.add(i,new n(i,{params:o,previewer:e.previewer}))})},hexToRgb:function(t){try{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,i,n){return t+t+i+i+n+n})}catch(i){return e.errorLog("Error in Helpers::hexToRgb : "+i),t}var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgb("+(i=i?[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]:[]).join(",")+")"},rgbToHex:function(e,t,i){var n=function(e){var t=e.toString(16);return 1==t.length?"0"+t:t};return"#"+n(e)+n(t)+n(i)}})}(wp.customize,jQuery,_),function(e,t,i){e.CZR_Helpers=e.CZR_Helpers||{},e.CZR_Helpers=t.extend(e.CZR_Helpers,{addActions:function(e,t,n){(n=n||this)[e]=n[e]||[],new_event_map=i.clone(n[e]),n[e]=i.union(new_event_map,i.isArray(t)?t:[t])},doActions:function(e,t,i){t.trigger(e,i)},setupDOMListeners:function(n,o,s){var r=this;s=s||r,i.isArray(n)?i.isObject(o)?!(o=i.extend({model:{},dom_el:{}},o)).dom_el instanceof jQuery||1>o.dom_el.length?e.errorLog("setupDomListeners : dom element should be an existing dom element",o):i.map(n,function(n){if(i.isString(n.selector)&&!i.isEmpty(n.selector))if(i.isString(n.selector)&&!i.isEmpty(n.selector)){var a=n.name&&!i.isEmpty(n.name)?n.name:[n.trigger,n.selector].join(""),l=o.dom_el.data("czr-listener-collection");if(l&&i.isArray(l)){if(l=i.isArray(l)?l:[],i.contains(l,a))return;l.push(a)}else l=[a];o.dom_el.data("czr-listener-collection",l),o.dom_el.on(n.trigger,n.selector,function(a,l){if(a.stopPropagation(),!e.utils.isKeydownButNotEnterEvent(a)){a.preventDefault();var c=t.extend(!0,{},o);if(i.has(c,"model")&&i.has(c.model,"id")&&(i.has(s,"get")?c.model=s():c.model=s.getModel(c.model.id)),t.extend(c,{event:n,dom_event:a}),t.extend(c,l),i.has(c,"event")&&i.has(c.event,"actions"))try{r.executeEventActionChain(c,s)}catch(t){e.errorLog("In setupDOMListeners : problem when trying to fire actions : "+c.event.actions),e.errorLog("Error : "+t)}else e.errorLog("executeEventActionChain : missing obj.event or obj.event.actions")}})}else e.errorLog("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+n.actions.join(","));else e.errorLog("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+n.actions.join(","))}):e.errorLog("setupDomListeners : args should be an object",n):e.errorLog("setupDomListeners : event_map should be an array",o)},executeEventActionChain:function(e,t){var n=this;if("function"==typeof e.event.actions)return e.event.actions.call(t,e);i.isArray(e.event.actions)||(e.event.actions=[e.event.actions]);var o=!1;i.map(e.event.actions,function(s){if(!o){var r=function(){};if("function"==typeof s)r=s;else{if("function"!=typeof t[s])throw new Error("executeEventActionChain : the action : "+s+" has not been found when firing event : "+e.event.selector);r=t[s]}var a=i.has(e,"dom_el")&&-1!=e.dom_el.length?e.dom_el:n.container;"string"==typeof s&&a.trigger("before_"+s,i.omit(e,"event")),!1===r.call(t,e)&&(o=!0),"string"==typeof s&&a.trigger("after_"+s,i.omit(e,"event"))}})}})}(wp.customize,jQuery,_),function(e,t,i){e.czr_wpQueryDataReady=t.Deferred(),e.czr_wpQueryInfos=e.czr_wpQueryInfos||new e.Value,e.czr_partials=e.czr_partials||new e.Value,e.bind("ready",function(){e.previewer.bind("houston-widget-settings",function(t){var n=i.filter(t.registeredSidebars,function(e){return!i.findWhere(_wpCustomizeWidgetsSettings.registeredSidebars,{id:e.id})}),o=i.filter(t.registeredSidebars,function(e){return!i.has(t.renderedSidebars,e.id)});o=i.map(o,function(e){return e.id});var s=i.map(t.registeredSidebars,function(e){return e.id});e.czr_widgetZoneSettings=e.czr_widgetZoneSettings||new e.Value,e.czr_widgetZoneSettings.set({actives:t.renderedSidebars,inactives:o,registered:s,candidates:n,available_locations:t.availableWidgetLocations})}),e.previewer.bind("czr-query-data-ready",function(t){e.czr_wpQueryInfos(t),"pending"==e.czr_wpQueryDataReady.state()&&e.czr_wpQueryDataReady.resolve(t)}),e.previewer.bind("czr-partial-refresh-data",function(t){e.czr_partials.set(t)}),e.previewer.bind("czr-partial-refresh-done",function(t){if(i.has(t,"set_id")){var n=e.CZR_Helpers.build_setId(t.set_id);if(e.has(n)){var o=e.CZR_Helpers.getControlSettingId(n);e.control.has(o)&&e.control(o).trigger("czr-partial-refresh-done")}}})})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(e,t,i){t.extend(CZRInputMths,{initialize:function(n,o){if(i.isUndefined(o.input_parent)||i.isEmpty(o.input_parent))throw new Error("No input_parent assigned to input "+o.id+". Aborting");if(i.isUndefined(o.module))throw new Error("No module assigned to input "+o.id+". Aborting");e.Value.prototype.initialize.call(this,null,o);var s=this;if(t.extend(s,o||{}),s.isReady=t.Deferred(),i.isUndefined(o.input_value)||s.set(o.input_value),e.czrInputMap&&i.has(e.czrInputMap,s.type)){var r=e.czrInputMap[s.type];i.isFunction(s[r])&&s[r](o.input_options||null)}else e.consoleLog("Warning an input : "+s.id+" has no corresponding method defined in api.czrInputMap.");s.input_event_map=[{trigger:t.trim(["change",{text:"keyup",textarea:"keyup",password:"keyup",color:"colorpickerchange",range:"input propertychange"}[s.type]||""].join(" ")),selector:"input[data-type], select[data-type], textarea[data-type]",name:"set_input_value",actions:function(e){if(!i.has(s.input_parent,"syncElements")||!i.has(s.input_parent.syncElements,s.id))throw new Error("WARNING : THE INPUT "+s.id+" HAS NO SYNCED ELEMENT.")}}],s.visible=new e.Value(!0),s.isReady.done(function(){s.visible.bind(function(e){e?s.container.stop(!0,!0).slideDown(200):s.container.stop(!0,!0).slideUp(200)})}),s.enabled=new e.Value(!0),s.isReady.done(function(){s.enabled.bind(function(e){s.container.toggleClass("disabled",!e)})})},ready:function(){var e=this;e.setupDOMListeners(e.input_event_map,{dom_el:e.container},e),e.callbacks.add(function(){return e.inputReact.apply(e,arguments)}),t.when(e.setupSynchronizer()).done(function(){e.isReady.resolve(e)})},setupSynchronizer:function(){var t=this.input_parent,i=this.container.find("[data-type]");if(this.container.find("[data-type]").is("textarea"))throw new Error("TO DO : THE TEXTAREA INPUT ARE NOT READY IN THE SYNCHRONIZER!");var n=new e.Element(i);t.syncElements=t.syncElements||{},t.syncElements[this.id]=n,n.sync(this),n.set(this())},inputReact:function(e,t,n){var o=this.input_parent(),s=i.clone(o),r=this.is_preItemInput;this.enabled()&&((s=!i.isObject(s)||i.isEmpty(s)?{}:s)[this.id]=e,this.input_parent.set(s,{input_changed:this.id,input_transport:this.transport,not_preview_sent:"postMessage"===this.transport}),r||(this.input_parent.trigger(this.id+":changed",e),i.isEmpty(t)&&(i.isUndefined(t)||"postMessage"!==this.transport)||this.module.sendInputToPreview({input_id:this.id,input_parent_id:this.input_parent.id,to:e,from:t})))},setupColorPicker:function(){this.container.find("input").iris({palettes:!0,hide:!1,change:function(e,i){t(this).val(i.color.toString()).trigger("colorpickerchange").trigger("change")}})},setupSelect:function(){t("select",this.container).not(".no-selecter-js").each(function(){t(this).selecter({})})},setupIcheck:function(e){t("input[type=checkbox]",this.container).each(function(e){0===t(this).closest('div[class^="icheckbox"]').length&&t(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){t(this).val(!1===t(this).is(":checked")?0:1),t(e.currentTarget).trigger("change")})})},setupStepper:function(e){t('input[type="number"]',this.container).each(function(e){t(this).stepper()})},setupRangeSlider:function(e){var i,n=function(e,t){e.textContent=t+"%"};t(this.container).find("input").rangeslider({polyfill:!1,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",onInit:function(){i=t(".rangeslider__handle",this.$range),t(".rangeslider__handle",this.$range),n(i[0],this.value)}}).on("input",function(){n(i[0],this.value)})}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(e,t,i){t.extend(CZRInputMths,{setupImageUploader:function(){var e=this,i=e();if(e.attachment={},!e.container)return this;this.tmplRendered=t.Deferred(),this.setupContentRendering(i,{}),this.tmplRendered.done(function(){e.czrImgUploaderBinding()})},setupContentRendering:function(e,t){var n,o=this;o.attachment.id!=e&&t!==e?(e||(o.attachment={},o.renderImageUploaderTemplate()),n=wp.media.attachment(e),i.isObject(n)&&i.has(n,"attributes")&&i.has(n.attributes,"sizes")?(o.attachment=n.attributes,o.renderImageUploaderTemplate()):wp.media.attachment(e).fetch().done(function(){o.attachment=this.attributes,o.renderImageUploaderTemplate()})):o.attachment.id&&o.attachment.id!==e||o.renderImageUploaderTemplate()},czrImgUploaderBinding:function(){var e=this;i.bindAll(e,"czrImgUploadRemoveFile","czrImgUploadOpenFrame","czrImgUploadSelect"),e.container.on("click keydown",".upload-button",e.czrImgUploadOpenFrame),e.container.on("click keydown",".thumbnail-image img",e.czrImgUploadOpenFrame),e.container.on("click keydown",".remove-button",e.czrImgUploadRemoveFile),e.bind(e.id+":changed",function(i,n){e.tmplRendered=t.Deferred(),e.setupContentRendering(i,n)})},czrImgUploadOpenFrame:function(t){e.utils.isKeydownButNotEnterEvent(t)||(t.preventDefault(),this.frame||this.czrImgUploadInitFrame(),this.frame.open())},czrImgUploadInitFrame:function(){var e=this.getUploaderLabels();this.frame=wp.media({button:{text:e.frame_button},states:[new wp.media.controller.Library({title:e.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1})]}),this.frame.on("select",this.czrImgUploadSelect)},czrImgUploadRemoveFile:function(t){e.utils.isKeydownButNotEnterEvent(t)||(t.preventDefault(),this.attachment={},this.set(""))},czrImgUploadSelect:function(){var e=this.frame.state().get("selection").first().toJSON();window._wpmejsSettings;this.attachment=e,this.set(e.id)},renderImageUploaderTemplate:function(){if(0!==t("#tmpl-czr-input-img-uploader-view-content").length){var e=wp.template("czr-input-img-uploader-view-content");if(e&&this.container){var i=this.container.find("."+this.module.control.css_attr.img_upload_container);if(i.length){var n={button_labels:this.getUploaderLabels(),settings:this.id,attachment:this.attachment,canUpload:!0};return i.html(e(n)),this.tmplRendered.resolve(),this.container.trigger(this.id+":content_rendered"),!0}}}},getUploaderLabels:function(){var t=serverControlParams.i18n,n={select:t.select_image,change:t.change_image,remove:t.remove_image,default:t.default_image,placeholder:t.placeholder_image,frame_title:t.frame_title_image,frame_button:t.frame_button_image};return i.each(n,function(t,n){if(i.isUndefined(t)){return e.errorLog("A translated string is missing ( "+n+" ) for the image uploader input in module : "+this.module.id),""}}),n}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(e,t,i){t.extend(CZRInputMths,{setupContentPicker:function(n){var o,s=this;t.extend({post:"",taxonomy:""},i.isObject(n)?n:{}),s.wpObjectTypes=n,s.container.find(".czr-input").append('<select data-select-type="content-picker-select" class="js-example-basic-simple"></select>'),o=[{trigger:"change",selector:"select[data-select-type]",name:"set_input_value",actions:function(n){var o=t(n.dom_event.currentTarget,n.dom_el),r=t(o,n.dom_el).select2("data"),a={};r=i.isArray(r)?r[0]:r,i.isObject(r)&&!i.isEmpty(r)?(i.each({id:"",type_label:"",title:"",object_type:"",url:""},function(t,n){"_custom_"===r.id||i.has(r,n)&&!i.isEmpty(r[n])?a[n]=r[n]:e.errorLog("content_picker : missing input param : "+n)}),s.set(a)):e.errorLog("Content Picker Input : the picked value should be an object not empty.")}}],s.setupDOMListeners(o,{dom_el:s.container},s),s.isReady.done(function(){s.setupContentSelecter()})},setupContentSelecter:function(){var e=this;if(!i.isEmpty(e())){var n={value:e().id||"",title:e().title||"",selected:"selected"};e.container.find("select").append(t("<option>",n))}e.container.find("select").select2({placeholder:{id:"-1",title:"Select"},data:e.setupSelectedContents(),ajax:{url:serverControlParams.AjaxUrl,type:"POST",dataType:"json",delay:250,debug:!0,data:function(t){var i=t.page?t.page:0;return i=t.term?t.page:i,{action:t.term?"search-available-content-items-customizer":"load-available-content-items-customizer",search:t.term,wp_customize:"on",page:i,wp_object_types:JSON.stringify(e.wpObjectTypes),CZRCpNonce:serverControlParams.CZRCpNonce}},processResults:function(t,n){if(e.defaultContentPickerOption=e.defaultContentPickerOption||[],!t.success)return{results:e.defaultContentPickerOption};var o=t.data.items,s=[];return i.each(o,function(e){s.push({id:e.id,title:e.title,type_label:e.type_label,object_type:e.object,url:e.url})}),{results:s,pagination:{more:t.data.items.length>=10}}}},templateSelection:e.czrFormatContentSelected,templateResult:e.czrFormatContentSelected,escapeMarkup:function(e){return e}})},czrFormatContentSelected:function(e){if(e.loading)return e.text;var t="<div class='content-picker-item clearfix'><div class='content-item-bar'><span class='czr-picker-item-title'>"+e.title+"</span>";return e.type_label&&(t+="<span class='czr-picker-item-type'>"+e.type_label+"</span>"),t+="</div></div>"},setupSelectedContents:function(){return this()}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(e,t,i){t.extend(CZRInputMths,{setupTextEditor:function(){this();if(!this.container)throw new Error("The input container is not set for WP text editor in module."+this.module.id);this.czrRenderInputTextEditorTemplate()&&(this.editor=tinyMCE("czr-customize-content_editor"),this.textarea=t("#czr-customize-content_editor"),this.editorPane=t("#czr-customize-content_editor-pane"),this.dragbar=t("#czr-customize-content_editor-dragbar"),this.editorFrame=t("#czr-customize-content_editor_ifr"),this.mceTools=t("#wp-czr-customize-content_editor-tools"),this.mceToolbar=this.editorPane.find(".mce-toolbar-grp"),this.mceStatusbar=this.editorPane.find(".mce-statusbar"),this.preview=t("#customize-preview"),this.collapse=t(".collapse-sidebar"),this.textpreview=this.container.find("textarea"),this.toggleButton=this.container.find("button.text_editor-button"),this.editorExpanded=new e.Value(!1),this.czrUpdateTextPreview(),this.czrSetToggleButtonText(this.editorExpanded()),this.czrTextEditorBinding(),this.czrResizeEditorOnUserRequest())},czrTextEditorBinding:function(){var n=this,o=n.editor,s=n.textarea,r=n.toggleButton,a=(n.editorExpanded,n.editorPane);n.bind(n.id+":changed",n.czrUpdateTextPreview),i.bindAll(n,"czrOnVisualEditorChange","czrOnTextEditorChange","czrResizeEditorOnWindowResize"),r.on("click",function(){n.editorExpanded.set(!n.editorExpanded()),n.editorExpanded()&&o.focus()}),n.module.czr_ModuleState.bind(function(e){"expanded"!=e&&n.editorExpanded.set(!1)}),n.editorExpanded.bind(function(i){e.consoleLog("in input.editorExpanded",i,n()),o.locker&&o.locker!==n&&(o.locker.editorExpanded.set(!1),o.locker=null),o.locker&&o.locker!==n||(t(document.body).toggleClass("czr-customize-content_editor-pane-open",i),o.locker=n),n.czrSetToggleButtonText(i),i?(o.setContent(wp.editor.autop(n())),o.on("input change keyup",n.czrOnVisualEditorChange),s.on("input",n.czrOnTextEditorChange),n.czrResizeEditor(window.innerHeight-a.height()),t(window).on("resize",n.czrResizeEditorOnWindowResize)):(o.off("input change keyup",n.czrOnVisualEditorChange),s.off("input",n.czrOnTextEditorChange),t(window).off("resize",n.czrResizeEditorOnWindowResize),n.czrResizeReset())})},czrOnVisualEditorChange:function(){var e,t=this.editor;e=wp.editor.removep(t.getContent()),this.set(e)},czrOnTextEditorChange:function(){var e;e=this.textarea.val(),this.set(e)},czrUpdateTextPreview:function(){var e;(e=this().replace(/(<([^>]+)>)/gi,"")).length>30&&(e=e.substring(0,34)+"..."),this.textpreview.val(e)},czrRenderInputTextEditorTemplate:function(){if(0===t("#tmpl-czr-input-text_editor-view-content").length)throw new Error("Missing js template for text editor input in module : "+this.module.id);var i=wp.template("czr-input-text_editor-view-content"),n=this.container.find("input");if(i&&this.container)return e.consoleLog("Model injected in text editor tmpl : ",this()),n.after(i(this())),!0},czrIsEditorExpanded:function(){return t(document.body).hasClass("czr-customize-content_editor-pane-open")},czrResizeReset:function(){var e=this.preview,t=this.collapse;this.container.closest("ul.accordion-section-content").css("padding-bottom",""),e.css("bottom",""),t.css("bottom","")},czrResizeEditor:function(e){var t=window.innerHeight,n=window.innerWidth,o={},s=this.container.closest("ul.accordion-section-content"),r=this.mceTools,a=this.mceToolbar,l=this.mceStatusbar,c=this.preview,d=this.collapse,u=this.editorPane,p=this.editorFrame;this.editorExpanded()&&(i.isNaN(e)||(resizeHeight=t-e),o.height=resizeHeight,o.components=r.outerHeight()+a.outerHeight()+l.outerHeight(),resizeHeight<40&&(o.height=40),resizeHeight>t-1&&(o.height=t-1),t<u.outerHeight()&&(o.height=t),c.css("bottom",o.height),u.css("height",o.height),p.css("height",o.height-o.components),d.css("bottom",o.height+8),56>t-o.height&&d.css("bottom",l.outerHeight()+4),n<=782?s.css("padding-bottom",o.height):s.css("padding-bottom",""))},czrResizeEditorOnWindowResize:function(){var e=this,t=e.editorPane;e.editorExpanded()&&i.delay(function(){e.czrResizeEditor(window.innerHeight-t.height())},50)},czrResizeEditorOnUserRequest:function(){var e=this,i=e.dragbar,n=e.editorFrame;i.on("mousedown",function(){e.editorExpanded()&&t(document).on("mousemove.czr-customize-content_editor",function(i){i.preventDefault(),t(document.body).addClass("czr-customize-content_editor-pane-resize"),n.css("pointer-events","none"),e.czrResizeEditor(i.pageY)})}),i.on("mouseup",function(){e.editorExpanded()&&(t(document).off("mousemove.czr-customize-content_editor"),t(document.body).removeClass("czr-customize-content_editor-pane-resize"),n.css("pointer-events",""))})},czrSetToggleButtonText:function(e){this.toggleButton.text(serverControlParams.i18n.mods.textEditor[e?"Close Editor":"Edit"])}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(e,t,i){t.extend(CZRItemMths,{initialize:function(n,o){if(i.isUndefined(o.module)||i.isEmpty(o.module))throw new Error("No module assigned to item "+n+". Aborting");var s=this;e.Value.prototype.initialize.call(s,null,o),s.isReady=t.Deferred(),s.embedded=t.Deferred(),s.container=null,s.contentContainer=null,s.czr_Input=new e.Values,s.inputCollection=new e.Value({}),s.viewState=new e.Value("closed"),s.removeDialogVisible=new e.Value(!1),t.extend(s,o||{}),s.defaultItemModel=i.clone(o.defaultItemModel)||{id:"",title:""};var r=t.extend(s.defaultItemModel,o.initial_item_model);r=s.validateItemModelOnInitialize(r),s.set(r),s.userEventMap=new e.Value([{trigger:"click keydown",selector:["."+s.module.control.css_attr.display_alert_btn,"."+s.module.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:function(){var e=this.removeDialogVisible();this.module.closeRemoveDialogs(),this.removeDialogVisible(!e)}},{trigger:"click keydown",selector:"."+s.module.control.css_attr.remove_view_btn,name:"remove_item",actions:["removeItem"]},{trigger:"click keydown",selector:["."+s.module.control.css_attr.edit_view_btn,"."+s.module.control.css_attr.item_title].join(","),name:"edit_view",actions:["setViewVisibility"]},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){this.module.toggleTabVisibility.call(this,e)}}]),s.isReady.done(function(){s.module.updateItemsCollection({item:s()}),s.callbacks.add(function(){return s.itemReact.apply(s,arguments)}),s.bind("contentRendered",function(){if(i.isEmpty(s.inputCollection()))try{e.CZR_Helpers.setupInputCollectionFromDOM.call(s),s.module.setupTabNav.call(s)}catch(t){e.errorLog("In item.isReady.done : "+t)}}),s.bind("contentRemoved",function(){i.has(s,"czr_Input")&&e.CZR_Helpers.removeInputCollection.call(s)}),s.mayBeRenderItemWrapper(),s.embedded.done(function(){s.itemWrapperViewSetup(r)})})},ready:function(){this.isReady.resolve()},validateItemModelOnInitialize:function(e){return e},itemReact:function(e,t,i){var n=this,o=n.module;i=i||{},o.updateItemsCollection({item:e,data:i}).done(function(){n.writeItemViewTitle(e,i)})}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(e,t,i){t.extend(CZRItemMths,{_sendItem:function(t,n){var o=this,s=o.module,r=[];i.each(n,function(e,i){e!=t[i]&&r.push(i)}),i.each(r,function(i){e.previewer.send("sub_setting",{set_id:s.control.id,id:t.id,changed_prop:i,value:t[i]}),s.trigger("item_sent",{item:t,dom_el:o.container,changed_prop:i})})},removeItem:function(){var e=this.module,n=i.clone(e.itemCollection());e.trigger("pre_item_dom_remove",this()),this._destroyView(),n=i.without(n,i.findWhere(n,{id:this.id})),e.itemCollection.set(n),e.trigger("pre_item_api_remove",this());var o=t.extend(!0,{},this());e.czr_Item.remove(this.id),e.trigger("item-removed",o)},getModel:function(e){return this()}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(e,t,i){t.extend(CZRItemMths,{mayBeRenderItemWrapper:function(){var e=this;"pending"==e.embedded.state()&&t.when(e.renderItemWrapper()).done(function(t){if(e.container=t,i.isUndefined(e.container)||!e.container.length)throw new Error("In mayBeRenderItemWrapper the Item view has not been rendered : "+e.id);e.embedded.resolve()})},renderItemWrapper:function(e){var i=this.module;if(e=e||this(),$_view_el=t("<li>",{class:i.control.css_attr.single_item,"data-id":e.id,id:e.id}),i.itemsWrapper.append($_view_el),i.isMultiItem()){var n=i.getTemplateEl("rudItemPart",e);if(0===t("#tmpl-"+n).length)throw new Error("Missing template for item "+this.id+". The provided template script has no been found : #tmpl-"+i.getTemplateEl("rudItemPart",e));$_view_el.append(t(wp.template(n)(e)))}return $_view_el.append(t("<div/>",{class:i.control.css_attr.item_content})),$_view_el},itemWrapperViewSetup:function(n){var o=this,s=this.module;n=o()||o.initial_item_model,o.writeItemViewTitle();var r=function(e,t,n){if(i.isUndefined(e)||!1===e.length)throw new Error("Module : "+o.module.id+", the item content has not been rendered for "+o.id);o.trigger("contentRendered"),o.contentContainer=e,o.toggleItemExpansion(t,n)};o.module.isMultiItem()?o.viewState.callbacks.add(function(n,a){var l=-1!==n.indexOf("expanded");s.hasModOpt()&&l&&e.czr_ModOptVisible(!1),l?i.isObject(o.contentContainer)&&!1!==o.contentContainer.length?o.toggleItemExpansion(n,a):t.when(o.renderItemContent(o()||o.initial_item_model)).done(function(e){(r=i.debounce(r,50))(e,n,a)}):o.toggleItemExpansion(n,a).done(function(){i.isObject(o.contentContainer)&&!1!==o.contentContainer.length&&(o.trigger("beforeContenRemoved"),t("."+s.control.css_attr.item_content,o.container).children().each(function(){t(this).remove()}),t("."+s.control.css_attr.item_content,o.container).html(""),o.contentContainer=null,o.trigger("contentRemoved"))})}):(o.viewState.callbacks.add(function(e,t){o.toggleItemExpansion.apply(o,arguments)}),t.when(o.renderItemContent(n)).done(function(e){r(e,!0)})),e.CZR_Helpers.setupDOMListeners(o.userEventMap(),{model:n,dom_el:o.container},o),o.removeDialogVisible.bind(function(n){var s=o.module,r=t("."+s.control.css_attr.remove_alert_wrapper,o.container).first();if(n&&s.closeAllItems(),n&&s.hasModOpt()&&e.czr_ModOptVisible(!1),n&&i.has(s,"preItem")&&s.preItemExpanded(!1),t("."+s.control.css_attr.remove_alert_wrapper,o.container).not(r).each(function(){t(this).hasClass("open")&&t(this).slideToggle({duration:200,done:function(){t(this).toggleClass("open",!1),t(this).siblings().find("."+s.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),n){if(!wp.template(s.AlertPart)||!o.container)return void e.consoleLog("No removal alert template available for items in module :"+s.id);r.html(wp.template(s.AlertPart)({title:o().title||o.id})),o.trigger("remove-dialog-rendered")}var a=function(e){r.toggleClass("open",e),o.container.find("."+s.control.css_attr.display_alert_btn).toggleClass("active",e),e&&s._adjustScrollExpandedBlock(o.container)};n?r.stop(!0,!0).slideDown(200,function(){a(n)}):r.stop(!0,!0).slideUp(200,function(){a(n)})})},renderItemContent:function(e){var i=this.module;if(e=e||this(),0===t("#tmpl-"+i.getTemplateEl("itemInputList",e)).length)throw new Error("No item content template defined for module "+i.id+". The template script id should be : #tmpl-"+i.getTemplateEl("itemInputList",e));var n=wp.template(i.getTemplateEl("itemInputList",e));return n?(t(n(e)).appendTo(t("."+i.control.css_attr.item_content,this.container)),t(t(n(e)),this.container)):this},writeItemViewTitle:function(n){var o=this.module,s=n||this(),r=i.has(s,"title")?e.CZR_Helpers.capitalize(s.title):s.id;r=e.CZR_Helpers.truncate(r,20),t("."+o.control.css_attr.item_title,this.container).text(r),e.CZR_Helpers.doActions("after_writeViewTitle",this.container,s,this)},setViewVisibility:function(e,t){var n=this.module;t?this.viewState.set("expanded_noscroll"):(n.closeAllItems(this.id),i.has(n,"preItem")&&n.preItemExpanded.set(!1),this.viewState.set("expanded"==this._getViewState()?"closed":"expanded"))},_getViewState:function(){return-1==this.viewState().indexOf("expanded")?"closed":"expanded"},toggleItemExpansion:function(e,i,n){var o="closed"!=e,s=this,r=this.module,a=t("."+r.control.css_attr.item_content,s.container).first(),l=t.Deferred(),c=function(t){s.container.toggleClass("open",t),t&&r.closeRemoveDialogs();var i=a.siblings().find("."+r.control.css_attr.edit_view_btn);i.toggleClass("active",t),t?i.removeClass("fa-pencil-alt").addClass("fa-minus-square").attr("title",serverControlParams.i18n.close):i.removeClass("fa-minus-square").addClass("fa-pencil-alt").attr("title",serverControlParams.i18n.edit),"expanded"==e&&r._adjustScrollExpandedBlock(s.container),l.resolve()};return o?a.stop(!0,!0).slideDown(n||200,function(){c(o)}):a.stop(!0,!0).slideUp(200,function(){c(o)}),l.promise()},_destroyView:function(e){this.container.fadeOut({duration:e||400,done:function(){t(this).remove()}})}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(e,t,i){t.extend(CZRModOptMths,{initialize:function(n){if(i.isUndefined(n.module)||i.isEmpty(n.module))throw new Error("No module assigned to modOpt.");var o=this;e.Value.prototype.initialize.call(o,null,n),o.isReady=t.Deferred(),o.container=null,o.inputCollection=new e.Value({}),t.extend(o,n||{}),o.defaultModOptModel=i.clone(n.defaultModOptModel)||{is_mod_opt:!0};var s=t.extend(o.defaultModOptModel,n.initial_modOpt_model),r=o.module.control;o.set(s),e.czr_ModOptVisible=new e.Value(!1),e.czr_ModOptVisible.bind(function(n,r,a){a=a||{},n?(o.module.closeRemoveDialogs().closeAllItems(),o.modOptWrapperViewSetup(s).done(function(t){o.container=t;try{e.CZR_Helpers.setupInputCollectionFromDOM.call(o).toggleModPanelView(n)}catch(t){e.consoleLog(t)}a.module&&a.focus&&i.delay(function(){!i.isNull(a.module.czr_ModOpt.container)&&a.module.czr_ModOpt.container.find('[data-tab-id="'+a.focus+'"] a').length&&a.module.czr_ModOpt.container.find('[data-tab-id="'+a.focus+'"] a').trigger("click")},200)})):o.toggleModPanelView(n).done(function(){!1!==o.container.length?t.when(o.container.remove()).done(function(){e.CZR_Helpers.removeInputCollection.call(o)}):e.CZR_Helpers.removeInputCollection.call(o),o.container=null})}),o.isReady.done(function(){t("."+r.css_attr.edit_modopt_icon,r.container).length||t.when(r.container.find(".customize-control-title").first().append(t("<span/>",{class:[r.css_attr.edit_modopt_icon,"fas fa-cog"].join(" "),title:serverControlParams.i18n.Settings}))).done(function(){t("."+r.css_attr.edit_modopt_icon,r.container).fadeIn(400)}),e.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+r.css_attr.edit_modopt_icon,name:"toggle_mod_option",actions:function(){e.czr_ModOptVisible(!e.czr_ModOptVisible())}}],{dom_el:r.container},o)})},ready:function(){this.isReady.resolve()}})}(wp.customize,jQuery,_);CZRModOptMths=CZRModOptMths||{};!function(e,t,i){t.extend(CZRModOptMths,{modOptWrapperViewSetup:function(n){var o=this,s=this.module,r=t.Deferred();return n=o()||o.initial_modOpt_model,t.when(o.renderModOptContent(n)).done(function(t){if(i.isUndefined(t)||!1===t.length)throw new Error("Module : "+o.module.id+", the modOpt content has not been rendered");var n;n=t,e.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+s.control.css_attr.close_modopt_icon,name:"close_mod_option",actions:function(){e.czr_ModOptVisible(!1)}},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){this.module.toggleTabVisibility.call(this,e)}}],{dom_el:n},o),r.resolve(t)}).then(function(){o.module.setupTabNav.call(o)}),r.promise()},renderModOptContent:function(i){var n=this.module;if(i=i||this(),0!==t("#tmpl-"+n.getTemplateEl("modOptInputList",i)).length){var o=wp.template(n.getTemplateEl("modOptInputList",i));if(!o)return this;var s="";try{s=[serverControlParams.i18n["Options for"],n.control.params.label].join(" ")}catch(t){e.errorLog("In renderModOptContent : "+t),s=serverControlParams.i18n.Settings}return t("#widgets-left").after(t("<div/>",{class:n.control.css_attr.mod_opt_wrapper,html:[['<h2 class="mod-opt-title">',s,"</h2>"].join(""),'<span class="fas fa-times '+n.control.css_attr.close_modopt_icon+'" title="close"></span>'].join("")})),t("."+n.control.css_attr.mod_opt_wrapper).append(t(o(i))),t("."+n.control.css_attr.mod_opt_wrapper)}e.errorLog("renderModOptContent : No modOpt content template defined for module "+n.id+". The template script id should be : #tmpl-"+n.getTemplateEl("modOptInputList",i))},toggleModPanelView:function(e){var n=this.module,o=(n.control,t.Deferred());return n.control.container.toggleClass("czr-modopt-visible",e),t("body").toggleClass("czr-editing-modopt",e),i.delay(function(){o.resolve()},200),o.promise()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(e,t,i){t.extend(CZRModuleMths,{initialize:function(n,o){if(i.isUndefined(o.control)||i.isEmpty(o.control))throw new Error("No control assigned to module "+n);var s=this;e.Value.prototype.initialize.call(this,null,o),s.isReady=t.Deferred(),t.extend(s,o||{}),t.extend(s,{crudModulePart:"czr-crud-module-part",rudItemPart:"czr-rud-item-part",ruItemPart:"czr-ru-item-part",itemInputList:"",modOptInputList:"",AlertPart:"czr-rud-item-alert-part"}),s.embedded=t.Deferred(),s.itemsWrapper="",s.isInSektion()||(s.container=t(s.control.selector),s.embedded.resolve()),s.embedded.done(function(){t.when(s.renderModuleParts()).done(function(e){if(!1===e.length)throw new Error("The items wrapper has not been rendered for module : "+s.id);s.itemsWrapper=e})}),s.defaultAPImodOptModel={initial_modOpt_model:{},defaultModOptModel:{},control:{},module:{}},s.defaultModOptModel={},s.modOptConstructor=e.CZRModOpt,s.itemCollection=new e.Value([]),s.defaultAPIitemModel={id:"",initial_item_model:{},defaultItemModel:{},control:{},module:{},is_added_by_user:!1},s.defaultItemModel={id:"",title:""},s.itemConstructor=e.CZRItem,s.czr_Item=new e.Values,s.inputConstructor=e.CZRInput,s.hasModOpt()&&(s.inputModOptConstructor=e.CZRInput),s.inputOptions={},s.isReady.done(function(){s.isDirty=new e.Value(o.dirty||!1),s.initializeModuleModel(o).done(function(e){s.set(e)}).fail(function(t){e.consoleLog("Module : "+s.id+" initialize module model failed : ",t)}).always(function(e){s.callbacks.add(function(){return s.moduleReact.apply(s,arguments)}),s.control.isModuleRegistered(s.id)||s.control.updateModulesCollection({module:o,is_registered:!1}),s.bind("items-collection-populated",function(e){s.itemCollection.callbacks.add(function(){return s.itemCollectionReact.apply(s,arguments)}),s.isMultiItem()&&s._makeItemsSortable()}),s.isInSektion()||s.populateSavedItemCollection(),s.hasModOpt()&&s.instantiateModOpt()})})},ready:function(){this.isReady.resolve()},initializeModuleModel:function(e){var n=t.Deferred();if(!this.isMultiItem()&&!this.isCrud()&&i.isEmpty(e.items)){var o=i.clone(this.defaultItemModel);e.items=[t.extend(o,{id:this.id})]}return n.resolve(e).promise()},itemCollectionReact:function(e,i,n){var o=this(),s=t.extend(!0,{},o);s.items=e,this.isDirty.set(!0),this.set(s,n||{})},moduleReact:function(e,n,o){var s=this.control;i.size(n.items)==i.size(e.items)&&i.isEmpty(i.difference(e.items,n.items)),e.column_id,n.column_id;s.updateModulesCollection({module:t.extend(!0,{},e),data:o})},getModuleSection:function(){return this.section},isInSektion:function(){return i.has(this,"sektion_id")},isMultiItem:function(){return e.CZR_Helpers.isMultiItemModule(null,this)},isCrud:function(){return e.CZR_Helpers.isCrudModule(null,this)},hasModOpt:function(){return e.CZR_Helpers.hasModuleModOpt(null,this)},instantiateModOpt:function(){var e=this,i=e.prepareModOptForAPI(e().modOpt||{});e.czr_ModOpt=new e.modOptConstructor(i),e.czr_ModOpt.ready(),e.czr_ModOpt.callbacks.add(function(i,n,o){var s=e(),r=t.extend(!0,{},s);r.modOpt=i,e.isDirty(!0),e(r,o)})},prepareModOptForAPI:function(e){var t=this,n={};return e=i.isObject(e)?e:{},i.each(t.defaultAPImodOptModel,function(o,s){e[s];switch(s){case"initial_modOpt_model":i.each(t.getDefaultModOptModel(),function(t,n){i.has(e,n)||(e[n]=t)}),n[s]=e;break;case"defaultModOptModel":n[s]=i.clone(t.defaultModOptModel);break;case"control":n[s]=t.control;break;case"module":n[s]=t}}),n},getDefaultModOptModel:function(e){return t.extend(i.clone(this.defaultModOptModel),{is_mod_opt:!0})},sendInputToPreview:function(n){n=i.extend({input_id:"",input_parent_id:"",to:null,from:null},n),i.isEqual(n.to,n.from)||(e.previewer.send("czr_input",{set_id:e.CZR_Helpers.getControlSettingId(this.control.id),module_id:this.id,module:{items:t.extend(!0,{},this().items),modOpt:this.hasModOpt()?t.extend(!0,{},this().modOpt):{}},input_parent_id:n.input_parent_id,input_id:n.input_id,value:n.to,isPartialRefresh:n.isPartialRefresh}),this.trigger("input_sent",{input:n.to,dom_el:this.container}))},sendModuleInputsToPreview:function(e){var n=this,o=function(){var o=this,s=t.extend(!0,{},o());s=i.omit(s,"id"),i.each(s,function(t,i){n.sendInputToPreview({input_id:i,input_parent_id:o.id,to:t,from:null,isPartialRefresh:e.isPartialRefresh})})};n.czr_Item.each(function(e){o.call(e)}),n.hasModOpt()&&o.call(n.czr_ModOpt)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,t,i){t.extend(CZRModuleMths,{populateSavedItemCollection:function(){var t=this,n=[];i.isArray(t().items)?(i.each(t().items,function(e,t){i.has(e,"id")&&!i.has(e,"is_mod_opt")&&n.push(e)}),i.each(n,function(i,n){try{t.instantiateItem(i).ready()}catch(t){e.errorLog("populateSavedItemCollection : "+t)}}),i.each(n,function(e){if(i.isUndefined(i.findWhere(t.itemCollection(),e.id)))throw new Error("populateSavedItemCollection : The saved items have not been properly populated in module : "+t.id)}),t.trigger("items-collection-populated")):e.errorLog("populateSavedItemCollection : The saved items collection must be an array in module :"+t.id)},instantiateItem:function(t,n){if(item_candidate=this.prepareItemForAPI(t),item_candidate&&!i.isNull(item_candidate)){if(!i.has(item_candidate,"id"))throw new Error("CZRModule::instantiateItem() : an item has no id and could not be added in the collection of : "+this.id);if(this.czr_Item.has(item_candidate.id))throw new Error("CZRModule::instantiateItem() : the following item id "+item_candidate.id+" already exists in module.czr_Item() for module "+this.id);if(this.czr_Item.add(item_candidate.id,new this.itemConstructor(item_candidate.id,item_candidate)),!this.czr_Item.has(item_candidate.id))throw new Error("CZRModule::instantiateItem() : instantiation failed for item id "+item_candidate.id+" for module "+this.id);return this.czr_Item(item_candidate.id)}e.consoleLog("item_candidate invalid. InstantiateItem aborted in module "+this.id)},prepareItemForAPI:function(e){var t=this,n={};return e=i.isObject(e)?e:{},i.each(t.defaultAPIitemModel,function(o,s){var r=e[s];switch(s){case"id":i.isEmpty(r)?n[s]=t.generateItemId(t.module_type):t.isItemRegistered(r)?t.generateItemId(r):n[s]=r;break;case"initial_item_model":i.each(t.getDefaultItemModel(),function(t,n){i.has(e,n)||(e[n]=t)}),n[s]=e;break;case"defaultItemModel":n[s]=i.clone(t.defaultItemModel);break;case"control":n[s]=t.control;break;case"module":n[s]=t;break;case"is_added_by_user":n[s]=!!i.isBoolean(r)&&r}}),i.has(n,"id")||(n.id=t.generateItemId(t.module_type)),n.initial_item_model.id=n.id,t.validateItemBeforeInstantiation(n)},validateItemBeforeInstantiation:function(e){return e},generateItemId:function(e,t,n){if((n=n||1)>100)throw new Error("Infinite loop when generating of a module id.");var o=e+"_"+(t=t||this._getNextItemKeyInCollection());if(!i.has(this,"itemCollection")||!i.isArray(this.itemCollection()))throw new Error("The item collection does not exist or is not properly set in module : "+this.id);return this.isItemRegistered(o)?(t++,n++,this.generateItemId(e,t,n)):o},_getNextItemKeyInCollection:function(){var e={},t=0;return i.isEmpty(this.itemCollection())?t:(e=i.isArray(this.itemCollection())&&1===i.size(this.itemCollection())?this.itemCollection()[0]:i.max(this.itemCollection(),function(e){return i.isNumber(e.id.replace(/[^\/\d]/g,""))?parseInt(e.id.replace(/[^\/\d]/g,""),10):0}),!i.isUndefined(e)&&i.isNumber(e.id.replace(/[^\/\d]/g,""))&&(t=parseInt(e.id.replace(/[^\/\d]/g,""),10)+1),t)},isItemRegistered:function(e){return!i.isUndefined(i.findWhere(this.itemCollection(),{id:e}))},updateItemsCollection:function(e){var n=this.itemCollection(),o=i.clone(n),s=t.Deferred();if(!i.has(e,"collection")){if(!i.has(e,"item"))throw new Error("updateItemsCollection, no item provided "+this.control.id+". Aborting");e=i.extend({data:{}},e);var r=i.clone(e.item);return i.each(this.defaultItemModel,function(e,t){if(!i.has(r,t))throw new Error('CZRModuleMths => updateItemsCollection : Missing property "'+t+'" for item candidate')}),i.findWhere(o,{id:r.id})?i.each(n,function(e,t){e.id==r.id&&(o[t]=r)}):o.push(r),this.itemCollection.set(o,e.data),s.resolve({collection:o,data:e.data}).promise()}this.itemCollection.set(e.collection)},_getSortedDOMItemCollection:function(){var e=i.clone(this.itemCollection()),n=[],o=t.Deferred();if(t("."+this.control.css_attr.single_item,this.container).each(function(o){var s=i.findWhere(e,{id:t(this).attr("data-id")});s&&(n[o]=s)}),e.length!=n.length)throw new Error("There was a problem when re-building the item collection from the DOM in module : "+this.id);return o.resolve(n).promise()},refreshItemCollection:function(){var i=this;i.czr_Item.each(function(e){t.when(i.czr_Item(e.id).container.remove()).done(function(){i.czr_Item.remove(e.id)})}),i.itemCollection=new e.Value([]),i.populateSavedItemCollection()}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,t,i){t.extend(CZRModuleMths,{getDefaultItemModel:function(e){return t.extend(i.clone(this.defaultItemModel),{id:e||""})},_initNewItem:function(e,n){var o,s={id:""};return n=void 0!==n?n:i.size(this.itemCollection()),i.isNumber(n)?o=this.module_type+"_"+n:(o=n,n=0),s=e&&!i.isEmpty(e)?t.extend(e,{id:o}):this.getDefaultItemModel(o),i.has(s,"id")&&this._isItemIdPossible(o)?(i.map(this.getDefaultItemModel(),function(e,t){i.has(s,t)||(s[t]=e)}),s):this._initNewItem(s,n+1)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,t,i){t.extend(CZRModuleMths,{renderModuleParts:function(){var e=this.isInSektion()?t(this.container).find(".czr-mod-content"):t(this.container);if(this.isCrud()){if(0===t("#tmpl-"+this.crudModulePart).length)throw new Error("No crud Module Part template for module "+this.id+". The template script id should be : #tmpl-"+this.crudModulePart);e.append(t(wp.template(this.crudModulePart)({})))}var i=t("<ul/>",{class:[this.control.css_attr.items_wrapper,this.module_type,this.isMultiItem()?"multi-item-mod":"mono-item-mod",this.isCrud()?"crud-mod":"not-crud-mod"].join(" ")});return e.append(i),t(i,e)},getTemplateEl:function(e,t){var n;switch(e){case"rudItemPart":n=this.rudItemPart;break;case"ruItemPart":n=this.ruItemPart;break;case"modOptInputList":n=this.modOptInputList;break;case"itemInputList":n=this.itemInputList}if(i.isEmpty(n))throw new Error("No valid template has been found in getTemplateEl() "+this.id+". Aborting");return n},getViewEl:function(e){return t('[data-id = "'+e+'"]',this.container)},closeAllItems:function(e){var t=this,n=i.clone(t.itemCollection()),o=i.filter(n,function(t){return t.id!=e});return i.each(o,function(e){t.czr_Item.has(e.id)&&"expanded"==t.czr_Item(e.id)._getViewState(e.id)&&t.czr_Item(e.id).viewState.set("closed")}),this},_adjustScrollExpandedBlock:function(e,n){if(e.length&&!i.isUndefined(this.getModuleSection())){var o,s=t(".accordion-section-content",this.section.container),r=s.scrollTop(),a=n||90;setTimeout(function(){e.offset().top+e.height()+a>t(window.top).height()&&(o=e.offset().top+e.height()+a-t(window.top).height())>0&&s.animate({scrollTop:r+o},500)},50)}},closeRemoveDialogs:function(){if(i.isArray(this.itemCollection()))return this.czr_Item.each(function(e){e.removeDialogVisible(!1)}),this},_makeItemsSortable:function(n){if(!wp.media.isTouchDevice&&t.fn.sortable){var o=this;t("."+o.control.css_attr.items_wrapper,o.container).sortable({handle:"."+o.control.css_attr.item_sort_handle,start:function(){i.has(e,"czrModulePanelState")&&e.czrModulePanelState.set(!1),i.has(e,"czrSekSettingsPanelState")&&e.czrSekSettingsPanelState.set(!1)},update:function(t,n){o._getSortedDOMItemCollection().done(function(e){o.itemCollection.set(e)}).then(function(){!function(){i.has(o,"preItem")&&o.preItemExpanded.set(!1),o.closeAllItems().closeRemoveDialogs();var t=function(){e.previewer.refresh()};"postMessage"!=e(o.control.id).transport||e.CZR_Helpers.hasPartRefresh(o.control.id)||(t=i.debounce(t,500))(),o.trigger("item-collection-sorted")}()})}})}},toggleTabVisibility:function(e){t(this.container).find("li"),t(this.container).find("section");var i=t(e.dom_event.currentTarget,e.dom_el).attr("data-tab-id");t(".tabs nav li",this.container).each(function(){t(this).removeClass("tab-current").addClass("tab-inactive")}),t(this.container).find('li[data-tab-id="'+i+'"]').addClass("tab-current").removeClass("tab-inactive"),t("section",this.container).each(function(){t(this).removeClass("content-current")}),t(this.container).find('section[id="'+i+'"]').addClass("content-current")},setupTabNav:function(){var e=this;setTimeout(function(){(function(){var i=t.Deferred(),n=t(".tabs nav li",e.container);n.each(function(){t(this).removeClass("tab-current").addClass("tab-inactive")}),n.first().addClass("tab-current").removeClass("tab-inactive"),t("section",e.container).first().addClass("content-current");var o=n.length;return n.each(function(){t(this).addClass(o>0?"cols-"+o:"")}),i.resolve().promise()})().done(function(){t(".tabs",e.container).fadeIn(450)})},20)}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(e,t,i){t.extend(CZRDynModuleMths,{initialize:function(i,n){e.CZRModule.prototype.initialize.call(this,i,n),t.extend(this,{itemPreAddEl:""}),this.preItemsWrapper="",this.preItemExpanded=new e.Value(!1),this.itemAddedMessage=serverControlParams.i18n.successMessage,this.userEventMap=new e.Value([{trigger:"click keydown",selector:["."+this.control.css_attr.open_pre_add_btn,"."+this.control.css_attr.cancel_pre_add_btn].join(","),name:"pre_add_item",actions:["closeAllItems","closeRemoveDialogs",function(e){this.preItemExpanded.set(!this.preItemExpanded())}]},{trigger:"click keydown",selector:"."+this.control.css_attr.add_new_btn,name:"add_item",actions:["closeRemoveDialogs","closeAllItems","addItem"]}])},ready:function(){var i=this;i.setupDOMListeners(i.userEventMap(),{dom_el:i.container}),i.preItem=new e.Value(i.getDefaultItemModel()),i.preItemExpanded.callbacks.add(function(n){n?i.renderPreItemView().done(function(e){i.preItemsWrapper=e,i.preItem(i.getDefaultItemModel()),i.trigger("before-pre-item-input-collection-setup"),i.setupPreItemInputCollection()}).fail(function(t){e.errorLog("Pre-Item : "+t)}):t.when(i.preItemsWrapper.remove()).done(function(){i.preItem.czr_Input={},i.preItemsWrapper=null,i.trigger("pre-item-input-collection-destroyed")}),i._togglePreItemViewExpansion(n)}),e.CZRModule.prototype.ready.call(i)},setupPreItemInputCollection:function(){var i=this;i.preItem.czr_Input=new e.Values,t("."+i.control.css_attr.pre_add_wrapper,i.container).find("."+i.control.css_attr.sub_set_wrapper).each(function(e){var n=t(this).find("[data-type]").attr("data-type")||"sub_set_"+e;i.preItem.czr_Input.add(n,new i.inputConstructor(n,{id:n,type:t(this).attr("data-input-type"),container:t(this),input_parent:i.preItem,module:i,is_preItemInput:!0})),i.preItem.czr_Input(n).ready()}),i.trigger("pre-item-input-collection-ready")},validateItemBeforeAddition:function(e){return e},addItem:function(n){var o=this,s=o.preItem(),r=function(){o.preItemExpanded.set(!1)},a=t.Deferred();return i.isEmpty(s)||!i.isObject(s)?(e.errorLog("addItem : an item_candidate should be an object and not empty. In : "+o.id+". Aborted."),a.resolve().promise()):(r=i.debounce(r,200),(s=o.validateItemBeforeAddition(s))&&!i.isNull(s)?(o.instantiateItem(s,!0).ready(),t.Deferred(function(){var t=this;o.czr_Item(s.id).isReady.then(function(){r(),o.trigger("item-added",s);var a=function(){e.previewer.unbind("ready",a),t.resolve()};"postMessage"!=e(o.control.id).transport||!i.has(n,"dom_event")||i.has(n.dom_event,"isTrigger")||e.CZR_Helpers.hasPartRefresh(o.control.id)?t.resolve():(e.previewer.bind("ready",a),e.previewer.refresh())})}).done(function(){o.czr_Item(s.id).viewState("expanded")}).always(function(){a.resolve()}),a.promise()):void e.consoleLog("item_candidate invalid. InstantiateItem aborted in module "+o.id))}})}(wp.customize,jQuery,_);CZRDynModuleMths=CZRDynModuleMths||{};!function(e,t,i){t.extend(CZRDynModuleMths,{renderPreItemView:function(e){var n=t.Deferred();if(i.isObject(this.preItemsWrapper)&&0<this.preItemsWrapper.length)return n.resolve(this.preItemsWrapper).promise();if(!i.has(this,"itemPreAddEl")||0===t("#tmpl-"+this.itemPreAddEl).length)return n.reject("Missing itemPreAddEl or template ").promise();var o=wp.template(this.itemPreAddEl);if(!o||!this.container)return n.reject("Missing html template ").promise();var s=t("."+this.control.css_attr.pre_add_item_content,this.container);return s.prepend(t("<div>",{class:"pre-item-wrapper"})),s.find(".pre-item-wrapper").append(o()),n.resolve(s.find(".pre-item-wrapper")).promise()},_getPreItemView:function(){return t("."+this.control.css_attr.pre_add_item_content,this.container)},_togglePreItemViewExpansion:function(e){var i=this;t("."+i.control.css_attr.pre_add_item_content,i.container).slideToggle({duration:200,done:function(){var n=t("."+i.control.css_attr.open_pre_add_btn,i.container);t(this).toggleClass("open",e),e?n.find(".fas").removeClass("fa-plus-square").addClass("fa-minus-square"):n.find(".fas").removeClass("fa-minus-square").addClass("fa-plus-square"),n.toggleClass("active",e),t(i.container).toggleClass(i.control.css_attr.adding_new,e),i._adjustScrollExpandedBlock(t(this),120)}})},toggleSuccessMessage:function(e){var i=this.itemAddedMessage,n=t("."+this.control.css_attr.pre_add_wrapper,this.container);return $_success_wrapper=t("."+this.control.css_attr.pre_add_success,this.container),"on"==e?($_success_wrapper.find("p").text(i),$_success_wrapper.css("z-index",1000001).css("height",n.height()+"px").css("line-height",n.height()+"px")):$_success_wrapper.attr("style",""),this.container.toggleClass("czr-model-added","on"==e),this}})}(wp.customize,jQuery,_);var CZRBaseControlMths=CZRBaseControlMths||{};!function(e,t,i){t.extend(CZRBaseControlMths,{initialize:function(t,n){var o=this;o.css_attr=i.has(serverControlParams,"css_attr")?serverControlParams.css_attr:{},e.Control.prototype.initialize.call(o,t,n),o.bind("czr-partial-refresh-done",function(){i.has(o,"czr_moduleCollection")&&i.each(o.czr_moduleCollection(),function(e){o.czr_Module(e.id)&&o.czr_Module(e.id).sendModuleInputsToPreview({isPartialRefresh:!0})})})},refreshPreview:function(e){this.previewer.refresh()}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(e,t,i){t.extend(CZRBaseModuleControlMths,{initialize:function(n,o){var s=this;s.czr_Module=new e.Values,s.czr_moduleCollection=new e.Value,s.czr_moduleCollection.set([]),s.moduleCollectionReady=t.Deferred(),s.moduleCollectionReady.done(function(e){s.isMultiModuleControl(o),s.czr_moduleCollection.callbacks.add(function(){return s.moduleCollectionReact.apply(s,arguments)})}),s.isMultiModuleControl(o)&&(s.syncSektionModule=new e.Value),e.CZRBaseControl.prototype.initialize.call(s,n,o),e.section(s.section()).expanded.bind(function(e){s.czr_Module.each(function(e){e.closeAllItems().closeRemoveDialogs(),i.has(e,"preItem")&&e.preItemExpanded(!1)})})},ready:function(){var t=this;if(t.isMultiModuleControl())t.syncSektionModule.bind(function(e,i){"resolved"!=t.moduleCollectionReady.state()&&(t.registerModulesOnInit(e),t.moduleCollectionReady.resolve())});else{var n={};i.each(t.getSavedModules(),function(i,o){n=i;try{t.instantiateModule(i,{})}catch(t){return void e.errorLog("Failed to instantiate module "+i.id+" "+t)}t.container.attr("data-module",i.id)}),t.moduleCollectionReady.resolve(n)}t.bind("user-module-candidate",function(i){var n;try{n=t.instantiateModule(i,{})}catch(t){return void e.errorLog("Failed to instantiate module "+i.id+" "+t)}n.ready(i.is_added_by_user)})},getDefaultModuleApiModel:function(){var e={id:"",module_type:"",modOpt:{},items:[],crud:!1,multi_item:!1,sortable:!1,control:{}};return this.isMultiModuleControl()?t.extend(e,{column_id:"",sektion:{},sektion_id:"",is_added_by_user:!1,dirty:!1}):t.extend(e,{section:""})},getDefaultModuleDBModel:function(){var e={items:[]};return this.isMultiModuleControl()?t.extend(e,{id:"",module_type:"",column_id:"",sektion_id:"",dirty:!1}):e},isMultiModuleControl:function(e){return"czr_multi_module"==(i.isUndefined(e)?i.has(this,"params")?this.params.type:this.type:i.has(e,"params")?e.params.type:e.type)},getSyncCollectionControl:function(){if(i.isUndefined(this.params.syncCollection))throw new Error("Control "+this.id+" has no synchronized sektion control defined.");return e.control(e.CZR_Helpers.build_setId(this.params.syncCollection))},getSavedModules:function(){var n=this,o=[],s=n.params.module_type,r=[],a=[],l={};return n.isMultiModuleControl()?o=t.extend(!0,[],e(n.id)()):(!e.CZR_Helpers.isMultiItemModule(s)||i.isEmpty(e(n.id)())||i.isObject(e(n.id)())||e.consoleLog("Module Control Init for "+n.id+" : a mono item module control value should be an object if not empty."),r=i.isArray(e(n.id)())?e(n.id)():[e(n.id)()],i.each(r,function(t,o){e.CZR_Helpers.hasModuleModOpt(s)&&0===o&&(i.has(t,"id")?e.consoleLog("getSavedModules : the module "+s+" in control "+n.id+" has no mod_opt defined while it should."):l=t),i.has(t,"id")&&!i.has(t,"is_mod_opt")&&a.push(t)}),o.push({id:e.CZR_Helpers.getOptionName(n.id)+"_"+n.params.type,module_type:n.params.module_type,section:n.section(),modOpt:t.extend(!0,{},l),items:t.extend(!0,[],a)})),o},isModuleRegistered:function(e){return!i.isUndefined(i.findWhere(this.czr_moduleCollection(),{id:e}))}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(e,t,i){t.extend(CZRBaseModuleControlMths,{instantiateModule:function(e,t){if(!i.has(e,"id"))throw new Error("CZRModule::instantiateModule() : a module has no id and could not be added in the collection of : "+this.id+". Aborted.");if((i.isUndefined(t)||i.isEmpty(t))&&(t=this.getModuleConstructor(e)),!i.isEmpty(e.id)&&this.czr_Module.has(e.id))throw new Error("The module id already exists in the collection in control : "+this.id);var n=this.prepareModuleForAPI(e);if(this.czr_Module.add(n.id,new t(n.id,n)),!this.czr_Module.has(n.id))throw new Error("instantiateModule() : instantiation failed for module id "+n.id+" in control "+this.id);return this.czr_Module(n.id)},getModuleConstructor:function(t){var n={},o={};if(!i.has(t,"module_type"))throw new Error("CZRModule::getModuleConstructor : no module type found for module "+t.id);if(!i.has(e.czrModuleMap,t.module_type))throw new Error("Module type "+t.module_type+" is not listed in the module map api.czrModuleMap.");var s=e.czrModuleMap[t.module_type].mthds,r=e.czrModuleMap[t.module_type].crud?e.CZRDynModule:e.CZRModule;if(o=i.isEmpty(t.sektion_id)?r.extend(s):(n=r.extend(s)).extend(this.getMultiModuleExtender(n)),i.isUndefined(o)||i.isEmpty(o)||!o)throw new Error("CZRModule::getModuleConstructor : no constructor found for module type : "+t.module_type+".");return o},prepareModuleForAPI:function(t){if(!i.isObject(t))throw new Error("prepareModuleForAPI : a module must be an object to be instantiated.");var n=this,o={};return i.each(n.getDefaultModuleApiModel(),function(s,r){var a=t[r];switch(r){case"id":i.isEmpty(a)?o[r]=n.generateModuleId(t.module_type):o[r]=a;break;case"module_type":if(!i.isString(a)||i.isEmpty(a))throw new Error("prepareModuleForAPI : a module type must a string not empty");o[r]=a;break;case"items":if(!i.isArray(a))throw new Error("prepareModuleForAPI : a module item list must be an array");o[r]=a;break;case"modOpt":if(!i.isObject(a))throw new Error("prepareModuleForAPI : a module modOpt property must be an object");o[r]=a;break;case"crud":if(i.has(e.czrModuleMap,t.module_type))a=e.czrModuleMap[t.module_type].crud;else if(!i.isUndefined(a)&&!i.isBoolean(a))throw new Error('prepareModuleForAPI : the module param "crud" must be a boolean');o[r]=a||!1;break;case"multi_item":if(i.has(e.czrModuleMap,t.module_type))a=e.czrModuleMap[t.module_type].crud||e.czrModuleMap[t.module_type].multi_item;else if(!i.isUndefined(a)&&!i.isBoolean(a))throw new Error('prepareModuleForAPI : the module param "multi_item" must be a boolean');o[r]=a||!1;break;case"sortable":if(i.has(e.czrModuleMap,t.module_type))a=e.czrModuleMap[t.module_type].sortable||e.czrModuleMap[t.module_type].crud||e.czrModuleMap[t.module_type].multi_item;else if(!i.isUndefined(a)&&!i.isBoolean(a))throw new Error('prepareModuleForAPI : the module param "sortable" must be a boolean');o[r]=a||!1;break;case"control":o[r]=n;break;case"section":if(!i.isString(a)||i.isEmpty(a))throw new Error("prepareModuleForAPI : a module section must be a string not empty");o[r]=a;break;case"column_id":if(!i.isString(a)||i.isEmpty(a))throw new Error("prepareModuleForAPI : a module column id must a string not empty");o[r]=a;break;case"sektion":if(!i.isObject(a)||i.isEmpty(a))throw new Error("prepareModuleForAPI : a module sektion must be an object not empty");o[r]=a;break;case"sektion_id":if(!i.isString(a)||i.isEmpty(a))throw new Error("prepareModuleForAPI : a module sektion id must be a string not empty");o[r]=a;break;case"is_added_by_user":if(!i.isUndefined(a)&&!i.isBoolean(a))throw new Error('prepareModuleForAPI : the module param "is_added_by_user" must be a boolean');o[r]=a||!1;break;case"dirty":o[r]=a||!1}}),o},generateModuleId:function(e,t,n){if((n=n||1)>100)throw new Error("Infinite loop when generating of a module id.");var o=e+"_"+(t=t||this._getNextModuleKeyInCollection());if(!i.has(this,"czr_moduleCollection")||!i.isArray(this.czr_moduleCollection()))throw new Error("The module collection does not exist or is not properly set in control : "+this.id);return this.isModuleRegistered(o)?(t++,n++,this.generateModuleId(e,t,n)):o},_getNextModuleKeyInCollection:function(){var e={},t=0;return i.isEmpty(this.czr_moduleCollection())||(e=i.max(this.czr_moduleCollection(),function(e){return parseInt(e.id.replace(/[^\/\d]/g,""),10)}),t=parseInt(e.id.replace(/[^\/\d]/g,""),10)+1),t}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(e,t,i){t.extend(CZRBaseModuleControlMths,{registerModulesOnInit:function(n){var o=this,s=[];i.each(o.getSavedModules(),function(r,a){if(!n.czr_Item.has(r.sektion_id))return e.errorLog("Warning Module "+r.id+" is orphan : it has no sektion to be embedded to. It Must be removed."),void s.push(r);var l=n.czr_Item(r.sektion_id);if(i.isUndefined(l))throw new Error("sektion instance missing. Impossible to instantiate module : "+r.id);t.extend(r,{sektion:l}),o.updateModulesCollection({module:r})}),o.moduleCollectionReady.then(function(){i.isEmpty(s)||o.moduleCollectionReact(o.czr_moduleCollection(),[],{orphans_module_removal:s})})},updateModulesCollection:function(e){var n=this.czr_moduleCollection(),o=t.extend(!0,[],n);if(i.has(e,"collection"))this.czr_moduleCollection.set(e.collection,e.data||{});else{if(!i.has(e,"module"))throw new Error("updateModulesCollection, no module provided "+this.id+". Aborting");var s=this.prepareModuleForAPI(i.clone(e.module));i.findWhere(o,{id:s.id})?i.each(n,function(e,t){e.id==s.id&&(o[t]=s)}):o.push(s);var r={};i.has(e,"data")&&(r=t.extend(!0,{},e.data),t.extend(r,{module:s})),this.czr_moduleCollection.set(o,r)}},moduleCollectionReact:function(n,o,s){var r=i.size(n)>i.size(o),a=i.size(o)>i.size(n);i.size(o),i.size(n);if(is_collection_sorted=!1,a){var l=i.filter(o,function(e){return i.isUndefined(i.findWhere(n,{id:e.id}))});l=l[0],this.czr_Module.remove(l.id)}i.isObject(s)&&i.has(s,"module")&&(s.module_id=s.module.id,s.module=this.prepareModuleForDB(t.extend(!0,{},s.module))),!this.isMultiModuleControl()&&r||e(this.id).set(this.filterModuleCollectionBeforeAjax(n),s)},filterModuleCollectionBeforeAjax:function(e){var n,o=this,s=t.extend(!0,[],e);if(i.each(e,function(e,i){var n=t.extend(!0,{},e);s[i]=o.prepareModuleForDB(n)}),o.isMultiModuleControl())return s;if(i.size(e)>1)throw new Error("There should not be several modules in the collection of control : "+o.id);if(!i.isArray(e)||i.isEmpty(e)||!i.has(e[0],"items"))throw new Error("The setting value could not be populated in control : "+o.id);var r=e[0].id;if(!o.czr_Module.has(r))throw new Error("The single module control ("+o.id+") has no module registered with the id "+r);var a=o.czr_Module(r);if(!i.isArray(a().items))throw new Error("The module "+r+" should be an array in control : "+o.id);return n=a.isMultiItem()?a().items:a().items[0]||[],a.hasModOpt()?i.union([a().modOpt],n):n},prepareModuleForDB:function(e){if(!i.isObject(e))throw new Error("MultiModule Control::prepareModuleForDB : a module must be an object. Aborting.");var t=this,n={};return i.each(t.getDefaultModuleDBModel(),function(o,s){if(!i.has(e,s))throw new Error("MultiModule Control::prepareModuleForDB : a module is missing the property : "+s+" . Aborting.");var r=e[s];switch(s){case"items":if(!i.isArray(r))throw new Error("prepareModuleForDB : a module item list must be an array");n[s]=r;break;case"id":if(!i.isString(r)||i.isEmpty(r))throw new Error("prepareModuleForDB : a module id must a string not empty");n[s]=r;break;case"module_type":if(!i.isString(r)||i.isEmpty(r))throw new Error("prepareModuleForDB : a module type must a string not empty");n[s]=r;break;case"column_id":if(!i.isString(r)||i.isEmpty(r))throw new Error("prepareModuleForDB : a module column id must a string not empty");n[s]=r;break;case"sektion_id":if(!i.isObject(e.sektion)||!i.has(e.sektion,"id"))throw new Error("prepareModuleForDB : a module sektion must be an object with an id.");n[s]=e.sektion.id;break;case"dirty":if(t.czr_Module.has(e.id)?n[s]=t.czr_Module(e.id).isDirty():n[s]=r,!i.isBoolean(n[s]))throw new Error("prepareModuleForDB : a module dirty state must be a boolean.")}}),n}})}(wp.customize,jQuery,_);var CZRMultiModuleControlMths=CZRMultiModuleControlMths||{};!function(e,t,i){t.extend(CZRMultiModuleControlMths,{initialize:function(t,i){var n=this;e.consoleLog("IN MULTI MODULE INITIALIZE ? ",i),e(t).callbacks.add(function(){return n.syncColumn.apply(n,arguments)}),e.CZRBaseModuleControl.prototype.initialize.call(n,t,i)},ready:function(){e.consoleLog("MODULE-COLLECTION CONTROL READY",this.id),e.CZRBaseModuleControl.prototype.ready.apply(this,arguments)},syncColumn:function(n,o,s){if(e.consoleLog("IN SYNC COLUMN",n,o,s),(i.isUndefined(s)||!s.silent)&&(e.consoleLog("IN SYNXXX",e.control("hu_theme_options[module-collection]").syncSektionModule()(),this.syncSektionModule()(),this.id),!i.has(s,"orphans_module_removal"))){var r=e.control(this.id),a=i.filter(n,function(e,t){return!i.findWhere(o,{id:e.id})});i.isEmpty(a)||(e.consoleLog("ADDED MODULE?",a),i.each(a,function(e){r.syncSektionModule().czr_Column(e.column_id).updateColumnModuleCollection({module:e})}));var l=i.filter(o,function(e,t){return!i.findWhere(n,{id:e.id})});i.isEmpty(l)||i.each(l,function(e){r.syncSektionModule().czr_Column(e.column_id).removeModuleFromColumnCollection(e)}),i.size(o)==i.size(n)&&i.has(s,"module")&&i.has(s,"source_column")&&i.has(s,"target_column")&&t.when(r.syncSektionModule().moveModuleFromTo(s.module,s.source_column,s.target_column)).done(function(){r.syncSektionModule().control.trigger("module-moved",{module:s.module,source_column:s.source_column,target_column:s.target_column})}),r.trigger("columns-synchronized",n)}},removeModule:function(e){this.czr_Module.has(e.id)&&"resolved"==this.czr_Module(e.id).embedded.state()&&this.czr_Module(e.id).container.remove(),this.removeModuleFromCollection(e)},removeModuleFromCollection:function(e){var n=this.czr_moduleCollection(),o=t.extend(!0,[],n);o=i.filter(o,function(t){return t.id!=e.id}),this.czr_moduleCollection.set(o)}})}(wp.customize,jQuery,_);CZRMultiModuleControlMths=CZRMultiModuleControlMths||{};!function(e,t,i){t.extend(CZRMultiModuleControlMths,{getMultiModuleExtender:function(n){return t.extend(this.CZRModuleExtended,{initialize:function(i,o){var s=this;n.prototype.initialize.call(s,i,o),e.consoleLog("MODULE INSTANTIATED : ",s.id),t.extend(s,{singleModuleWrapper:"czr-single-module-wrapper",sektionModuleTitle:"czr-module-sektion-title-part",ruModuleEl:"czr-ru-module-sektion-content"}),s.czr_ModuleState=new e.Value(!1),s.isReady.done(function(){s.setupModuleView()}),s.moduleTitleEmbedded=t.Deferred(),s.modColumn=new e.Value,s.modColumn.set(o.column_id),s.modColumn.bind(function(i,n){e.consoleLog("MODULE "+s.id+" HAS BEEN MOVED TO COLUMN",i,s());var o=s(),r=t.extend(!0,{},o);r.column_id=i,s.set(r,{target_column:i,source_column:n})})},ready:function(o){var s=this;e.consoleLog("MODULE READY IN EXTENDED MODULE CLASS : ",s.id),t.when(s.renderModuleWrapper(o)).done(function(e){if(i.isUndefined(e)||!1===e.length)throw new Error("Module container has not been embedded for module :"+s.id);s.container=e,s.embedded.resolve()}),n.prototype.ready.call(s)}}),this.CZRModuleExtended},CZRModuleExtended:{renderModuleWrapper:function(e){var i=this;if("resolved"==i.embedded.state())return i.container;if(0===t("#tmpl-"+i.singleModuleWrapper).length)throw new Error("No template for module "+i.id+". The template script id should be : #tmpl-"+i.singleModuleWrapper);var n=wp.template(i.singleModuleWrapper),o={id:i.id,type:i.module_type},s=t(n(o));return e?t.when(t(".czr-module-collection-wrapper",i._getColumn().container).find(".czr-module-candidate").after(s)).done(function(){t(".czr-module-collection-wrapper",i._getColumn().container).find(".czr-module-candidate").remove()}):t(".czr-module-collection-wrapper",i._getColumn().container).append(s),s},setupModuleView:function(){var t=this;t.view_event_map=[{trigger:"click keydown",selector:[".czr-remove-mod","."+t.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:["toggleModuleRemoveAlert"]},{trigger:"click keydown",selector:"."+t.control.css_attr.remove_view_btn,name:"remove_module",actions:["removeModule"]},{trigger:"click keydown",selector:".czr-edit-mod",name:"edit_module",actions:["setModuleViewVisibility","sendEditModule"]},{trigger:"click keydown",selector:".czr-module-back",name:"back_to_column",actions:["setModuleViewVisibility"]},{trigger:"mouseenter",selector:".czr-mod-header",name:"hovering_module",actions:function(i){e.previewer.send("start_hovering_module",{id:t.id})}},{trigger:"mouseleave",selector:".czr-mod-header",name:"hovering_module",actions:function(i){e.previewer.send("stop_hovering_module",{id:t.id})}}],t.embedded.done(function(){t.czr_ModuleState.callbacks.add(function(){return t.setupModuleViewStateListeners.apply(t,arguments)}),e.CZR_Helpers.setupDOMListeners(t.view_event_map,{module:{id:t.id},dom_el:t.container},t)})},setModuleViewVisibility:function(i,n){this.czr_ModuleState(!this.czr_ModuleState()),e.czrModulePanelState.set(!1),e.czrSekSettingsPanelState.set(!1),this.control.syncSektionModule().closeAllOtherSektions(t(i.dom_event.currentTarget,i.dom_el))},sendEditModule:function(t){e.previewer.send("edit_module",{id:this.id})},setupModuleViewStateListeners:function(i){var n=this;e.czr_isModuleExpanded=e.czr_isModuleExpanded||new e.Value,i?e.czr_isModuleExpanded(n):e.czr_isModuleExpanded(!1),t.when(n.toggleModuleViewExpansion(i)).done(function(){i?(n.renderModuleTitle(),n.populateSavedItemCollection()):n.czr_Item.each(function(e){e.viewState.set("closed"),e._destroyView(0),n.czr_Item.remove(e.id)})})},renderModuleTitle:function(){var e=this;if("resolved"!=e.moduleTitleEmbedded.state()){if(0===t("#tmpl-"+e.sektionModuleTitle).length)throw new Error("No sektion title Module Part template for module "+e.id+". The template script id should be : #tmpl-"+e.sektionModuleTitle);t.when(t(e.container).find(".czr-mod-content").prepend(t(wp.template(e.sektionModuleTitle)({id:e.id})))).done(function(){e.moduleTitleEmbedded.resolve()})}},toggleModuleViewExpansion:function(e,i){var n=this;t(".czr-mod-content",n.container).slideToggle({duration:i||200,done:function(){var t=n.container.closest(".wp-full-overlay"),i=n.container.find(".czr-module-back"),o=n.container.find(".czr-module-title");n.container.toggleClass("open",e),t.toggleClass("czr-module-open",e),o.attr("tabindex",e?"-1":"0"),i.attr("tabindex",e?"0":"-1"),e?i.focus():o.focus(),e&&n._adjustScrollExpandedBlock(n.container)}})},toggleModuleRemoveAlert:function(e){var n=this,o=this.control,s=t("."+n.control.css_attr.remove_alert_wrapper,n.container).first(),r=(e.dom_event,o.syncSektionModule().czr_Column(n.column_id).container);if(i.has(n,"preItem")&&o.syncSektionModule().preItemExpanded.set(!1),t("."+n.control.css_attr.remove_alert_wrapper,r).not(s).each(function(){t(this).hasClass("open")&&t(this).slideToggle({duration:200,done:function(){t(this).toggleClass("open",!1),t(this).siblings().find("."+n.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),!wp.template(n.AlertPart)||!n.container)throw new Error("No removal alert template available for module :"+n.id);s.html(wp.template(n.AlertPart)({title:n().title||n.id})),s.slideToggle({duration:200,done:function(){var i=!t(this).hasClass("open")&&t(this).is(":visible");t(this).toggleClass("open",i),t(e.dom_el).find("."+n.control.css_attr.display_alert_btn).toggleClass("active",i),i&&n._adjustScrollExpandedBlock(n.container)}})},removeModule:function(e){this.control.removeModule(e.module)},_getColumn:function(){return this.control.syncSektionModule().czr_Column(this.modColumn())},_getSektion:function(){}}})}(wp.customize,jQuery,_),function(e,t,i){t.extend(CZRBaseControlMths,e.Events),t.extend(e.Control.prototype,e.Events),t.extend(CZRModuleMths,e.Events),t.extend(CZRItemMths,e.Events),t.extend(CZRModOptMths,e.Events),t.extend(CZRBaseControlMths,e.CZR_Helpers),t.extend(CZRInputMths,e.CZR_Helpers),t.extend(CZRModuleMths,e.CZR_Helpers),e.CZRInput=e.Value.extend(CZRInputMths),e.czrInputMap=e.czrInputMap||{},t.extend(e.czrInputMap,{text:"",textarea:"",check:"setupIcheck",select:"setupSelect",number:"setupStepper",upload:"setupImageUploader",color:"setupColorPicker",content_picker:"setupContentPicker",text_editor:"setupTextEditor",password:"",range_slider:"setupRangeSlider",hidden:""}),e.CZRItem=e.Value.extend(CZRItemMths),e.CZRModOpt=e.Value.extend(CZRModOptMths),e.CZRModule=e.Value.extend(CZRModuleMths),e.CZRDynModule=e.CZRModule.extend(CZRDynModuleMths),i.isUndefined(window.CZRColumnMths)||(e.CZRColumn=e.Value.extend(CZRColumnMths)),e.CZRBaseControl=e.Control.extend(CZRBaseControlMths),e.CZRBaseModuleControl=e.CZRBaseControl.extend(CZRBaseModuleControlMths),e.CZRMultiModuleControl=e.CZRBaseModuleControl.extend(CZRMultiModuleControlMths),t.extend(e.controlConstructor,{czr_module:e.CZRBaseModuleControl,czr_multi_module:e.CZRMultiModuleControl})}(wp.customize,jQuery,_),function(e,t,i){e.bind("ready",function(){if(serverControlParams.isSkopOn){var n=e.previewer.query;e.previewer.query=function(o){if(!serverControlParams.isSkopOn)return n.apply(this);if(!i.has(e,"czr_skope"))return e.consoleLog("QUERY : SKOPE IS NOT FULLY READY YEY. FALLING BACK ON CORE QUERY"),n.apply(this);if("pending"==e.czr_initialSkopeCollectionPopulated.state())return e.consoleLog("QUERY : INITIAL SKOPE COLLECTION NOT POPULATED YET. FALLING BACK ON CORE QUERY"),n.apply(this);if("pending"==e.czr_isPreviewerSkopeAware.state()&&e.czr_isPreviewerSkopeAware.resolve(),!i.isObject(o)&&"resolved"==e.czr_initialSkopeCollectionPopulated.state()&&"resolved"==e.czr_initialSkopeCollectionPopulated.state())return n.apply(this);!i.isUndefined(o.skope_id)&&i.isString(o.skope_id)||(o.skope_id=e.czr_activeSkopeId()||e.czr_skopeBase.getGlobalSkopeId());var s,r={},a={};if(o=t.extend({skope_id:null,action:null,the_dirties:{},dyn_type:null,opt_name:null},o),!i.isObject(o.the_dirties))throw e.consoleLog("QUERY PARAMS : ",o),new Error("QUERY DIRTIES MUST BE AN OBJECT. Requested action : "+o.action);if("pending"!=e.czr_isPreviewerSkopeAware.state()&&i.isNull(o.skope_id))throw e.consoleLog("QUERY PARAMS : ",o),new Error("OVERRIDEN QUERY : NO SKOPE ID. FALLING BACK ON CORE QUERY. Requested action : "+o.action);if(!i.contains([null,"refresh","save","reset","changeset_update"],o.action))throw e.consoleLog("QUERY PARAMS : ",o),new Error("A REQUESTED QUERY HAS NO AUTHORIZED ACTION. Requested action : "+o.action);switch(i.isNull(o.the_dirties)||i.isEmpty(o.the_dirties)?(r=e.dirtyValues({unsaved:o.excludeCustomizedSaved||!1}),a=function(){if("pending"==e.czr_initialSkopeCollectionPopulated.state())return{};var t={};return i.each(e.czr_currentSkopesCollection(),function(i){"global"!=i.skope&&(t[i.id]=e.czr_skopeBase.getSkopeDirties(i.id))}),t}()):"global"==e.czr_skopeBase.getActiveSkopeName()?r=o.the_dirties:a[e.czr_activeSkopeId()]=o.the_dirties,o.action){case null:case"refresh":break;case"changeset_update":if(i.isUndefined(o.opt_name))throw new Error("Missing opt_name param in the changeset_update query for skope : "+o.skope_id);break;case"save":if(i.isNull(o.dyn_type)&&(o.dyn_type=e.czr_skope(o.skope_id)().dyn_type),i.isNull(o.dyn_type)||i.isUndefined(o.dyn_type))throw new Error("QUERY : A SAVE QUERY MUST HAVE A VALID DYN TYPE."+o.skope_id);break;case"reset":if(i.isNull(o.dyn_type)&&(o.dyn_type=e.czr_skope(o.skope_id)().dyn_type),i.isNull(o.dyn_type)||i.isUndefined(o.dyn_type))throw new Error("QUERY : A RESET QUERY MUST HAVE A VALID DYN TYPE."+o.skope_id)}var l={};return i.each(e.czr_currentSkopesCollection(),function(e){l[e.skope]={id:e.id,opt_name:e.opt_name}}),s={wp_customize:"on",customized:"{}"==JSON.stringify(r)?'{"__not_customized__"}':JSON.stringify(r),skopeCustomized:JSON.stringify(a),nonce:this.nonce.preview,skope:e.czr_skope(o.skope_id)().skope,level_id:e.czr_skope(o.skope_id)().level,skope_id:o.skope_id,dyn_type:o.dyn_type,opt_name:i.isNull(o.opt_name)?e.czr_skope(o.skope_id)().opt_name:o.opt_name,obj_id:e.czr_skope(o.skope_id)().obj_id,current_skopes:JSON.stringify(l)||{},channel:this.channel(),revisionIndex:e._latestRevision},s=e.czr_isChangeSetOn()?t.extend(s,{customize_theme:e.settings.theme.stylesheet,customize_changeset_uuid:e.settings.changeset.uuid}):t.extend(s,{theme:e.settings.theme.stylesheet})}}})}(wp.customize,jQuery,_),function(e,t,i){e.bind("czr-skope-started",function(){var t,n=e.previewer.save;e.previewer.save=function(s){return e.requestChangesetUpdate({},{autosave:!0}).always(function(r){t=r.response,n.apply(e.previewer,s).done(function(){e.state.has("selectedChangesetStatus")&&"publish"!=e.state("selectedChangesetStatus")()||e.previewer.refresh({waitSkopeSynced:!0}).fail(function(t){e.consoleLog("Refresh failed after a save action",t)}).done(function(e){t=i.extend({changeset_status:"publish"},t||{}),o(e.skopesServerData)})})}).fail(function(i){t=i.response,e.consoleLog("apiRequestChangesetUpdate failed => ",t)}).done(function(t){var n={};i.each(e.czr_currentSkopesCollection(),function(t){i.each(e.czr_skope(t.id).dirtyValues(),function(e,t){n[t]=e})}),i.isEmpty(n)&&(e.state("changesetStatus").set("auto-draft"==e.state("changesetStatus")()?"":e.state("changesetStatus")()),e.state("saved")(!0))})};var o=function(t){var n={};t=i.extend({czr_skopes:[],isChangesetDirty:!1},t),i.each(e.czr_skopeCollection(),function(t){n[t.opt_name]=e.czr_skopeBase.getSkopeDirties(t.id),e.czr_skope(t.id).dirtyValues({}),e.czr_skope(t.id).changesetValues({})});var o=[],s=t.czr_skopes;i.each(n,function(t,n){i.each(t,function(t,r){if(!i.isUndefined(i.findWhere(s,{opt_name:n}))&&e.czr_skopeBase.isSettingSkopeEligible(r)){var a=i.findWhere(s,{opt_name:n}).db,l=i.findWhere(s,{opt_name:n}).skope,c=e.CZR_Helpers.build_setId(r),d=e.CZR_Helpers.getOptionName(r),u=a[c];i.isUndefined(u)&&"global"==l&&t===serverControlParams.defaultOptionsValues[d]||!i.isUndefined(u)&&i.isEqual(u,t)||o.push({opt_name:n,setId:c,server_val:u,api_val:t})}})}),i.isEmpty(o)?e.consoleLog("ALL RIGHT, SERVER AND API ARE SYNCHRONIZED AFTER SAVE"):e.consoleLog("SOME SETTINGS HAVE NOT BEEN PROPERLY SAVED : ",o),e.czr_skopeBase.maybeSynchronizeGlobalSkope(),e.czr_skopeBase.updateCtrlSkpNot(e.CZR_Helpers.getSectionControlIds())}})}(wp.customize,jQuery,_),function(e,t,i){if(serverControlParams.isSkopOn){e.Element.synchronizer.checkbox.update=function(e){this.element.prop("checked",e),this.element.iCheck("update")};var n=e.Element.synchronizer.val.update;e.Element.synchronizer.val.update=function(t){var i=this,o=function(){i.element.is("select")?i.element.val(t).trigger("change"):i.element.hasClass("wp-color-picker")?i.element.val(t).trigger("change"):i.element.val(t)};if(serverControlParams.isSkopOn){if("resolved"!=e.czr_skopeReady.state())return n.call(i,t);e.czr_skopeReady.then(function(){o()})}else o()},e.Element.synchronizer.val.refresh=function(){return this.element.is("select")&&i.isNull(this.element.val())?i.isArray(this())?[]:i.isObject(this())?{}:"":this.element.val()}}}(wp.customize,jQuery,_),function(e,t,i){var n=e.Previewer.prototype.refresh,o=function(o){o=i.extend({waitSkopeSynced:!0,the_dirties:{}},o);var s=this,r=t.Deferred();if(!serverControlParams.isSkopOn)return r.resolve().promise();if(!i.has(e,"czr_activeSkopeId")||i.isUndefined(e.czr_activeSkopeId()))return e.consoleLog("The api.czr_activeSkopeId() is undefined in the api.previewer._new_refresh() method."),n.apply(s),r.resolve().promise();s.send("loading-initiated"),s.abort();var a=e.czr_getSkopeQueryParams({skope_id:e.czr_activeSkopeId(),action:"refresh",the_dirties:o.the_dirties||{}});return s.loading=new e.PreviewFrame({url:s.url(),previewUrl:s.previewUrl(),query:s.query(a)||{},container:s.container,signature:"WP_CUSTOMIZER_SIGNATURE"}),s.settingsModifiedWhileLoading={},onSettingChange=function(e){s.settingsModifiedWhileLoading[e.id]=!0},e.bind("change",onSettingChange),s.loading.always(function(){e.unbind("change",onSettingChange)}),e.czr_isChangeSetOn()||(s._previousPreview=s._previousPreview||s.preview),s.loading.done(function(t){var i,n=this;s.preview=n,s.targetWindow(n.targetWindow()),s.channel(n.channel()),i=function(t){n.unbind("synced",i),n.unbind("czr-skopes-synced",i),s._previousPreview?s._previousPreview.destroy():s.preview&&s.preview.destroy(),s._previousPreview=s.preview,s.deferred.active.resolve(),delete s.loading,e.trigger("pre_refresh_done",{previewer:s,skopesServerData:t||{}}),r.resolve({previewer:s,skopesServerData:t||{}})},e.czr_isChangeSetOn()||s.send("sync",{scroll:s.scroll,settings:e.get()}),o.waitSkopeSynced?n.bind("czr-skopes-synced",i):n.bind("synced",i),s.trigger("ready",t)}),s.loading.fail(function(t,i){e.consoleLog("LOADING FAILED : ",t,i,arguments),s.send("loading-failed"),e.czr_isChangeSetOn()||"redirect"===t&&i&&s.previewUrl(i),"logged out"===t&&(s.preview&&(s.preview.destroy(),delete s.preview),s.login().done(s.refresh)),"cheatin"===t&&s.cheatin(),r.reject(t)}),r.promise()};e.bind("czr-skope-started",function(){czr_override_refresh_for_skope(),e.Previewer.prototype.refresh=o}),e.czr_getSkopeQueryParams=function(n){if(!e.czr_isChangeSetOn())return n;switch((n=i.isObject(n)?n:{}).action||"refresh"){case"refresh":n=t.extend(n,{excludeCustomizedSaved:!0})}return n},czr_override_refresh_for_skope=function(){serverControlParams.isSkopOn&&(e.previewer.refresh=function(n){var s=t.Deferred(),r=function(t){var i,n=function(){return 0===e.state("processing").get()},r=function(){o.call(e.previewer,t).done(function(e){s.resolve(e)})};n()?r():(i=function(){n()&&(r(),e.state("processing").unbind(i))},e.state("processing").bind(i))};return(r=i.debounce(r,e.previewer.refreshBuffer))(n),s.promise()})}}(wp.customize,jQuery,_),function(e,t,i){serverControlParams.isSkopOn&&(e.dirtyValues=function(t){return e.czr_skopeBase.getSkopeDirties(e.czr_skopeBase.getGlobalSkopeId(),t)})}(wp.customize,jQuery,_),function(e,t,i){if(serverControlParams.isSkopOn&&e.czr_isChangeSetOn()){var n=e.requestChangesetUpdate;e.requestChangesetUpdate=function(o,s){var r=t.Deferred(),a=[],l=[],c=o||{},d=[],u=[],p=t.Deferred();if(s=s||{},!serverControlParams.isSkopOn)return n();(0===e._lastSavedRevision||i.isEmpty(e.state("changesetStatus")()))&&(c=i.extend(c,{blogname:{dummy_change:"dummy_change"}})),i.each(e.czr_currentSkopesCollection(),function(e){"global"!=e.skope&&a.push(e.id)});var h=function(n){if(i.isUndefined(a[n+1])&&l.length==a.length){if(i.isEmpty(d))p.resolve(u);else{p.reject((o=[],i.each(d,function(t){o.push(e.czr_skopeBase.buildServerResponse(t))}),t.trim(o.join(" | "))))}var o;return!0}},f=function(t){return(i.isUndefined(t)||0==t)&&e.state("processing").set(1),t=t||0,i.isUndefined(a[t])?(e.consoleLog("Undefined Skope in changeset recursive call ",t,a,a[t]),p.resolve(u).promise()):(e._requestSkopeChangetsetUpdate(o,a[t],s).always(function(){l.push(t)}).fail(function(i){d.push(i),e.consoleLog("CHANGESET UPDATE RECURSIVE FAIL FOR SKOPE : ",a[t]),h(t)||f(t+1)}).done(function(e){u.push(e),h(t)||f(t+1)}),p.promise())},m=e._lastSavedRevision;return n(c,s).fail(function(t){e.consoleLog("WP requestChangesetUpdateFail",t,e.czr_skopeBase.buildServerResponse(t)),e._lastSavedRevision=Math.max(e._latestRevision,e._lastSavedRevision),e.state("processing").set(0),r.reject(t),t=e.czr_skopeBase.buildServerResponse(t),i.isUndefined(e.notifications)?e.czr_serverNotification({status:"error",message:t}):(e.notifications.add(new wp.customize.Notification("changeset_update_failed",{type:"error",message:t,dismissible:!0})),i.delay(function(){if(e.notifications.has("changeset_update_failed")){var t=e.notifications("changeset_update_failed");t.parent?t.parent.remove(t.code):t.container.remove()}},5e3))}).done(function(t){"pending"==e.czr_initialSkopeCollectionPopulated.state()&&r.resolve(t),e._lastSavedRevision=m,f().always(function(){e._lastSavedRevision=Math.max(e._latestRevision,e._lastSavedRevision);var t={};i.each(e.czr_currentSkopesCollection(),function(n){i.each(e.czr_skope(n.id).dirtyValues(),function(e,i){t[i]=e})}),i.isEmpty(t)&&i.isEqual(c,{blogname:{dummy_change:"dummy_change"}})&&(e.state("changesetStatus").set("auto-draft"==e.state("changesetStatus")()?"":e.state("changesetStatus")()),e.state("saved")(!0)),e.state("processing").set(0)}).fail(function(t){r.reject(t),e.consoleLog("CHANGESET UPDATE RECURSIVE PUSH FAIL",t,u),e.trigger("changeset-error",t),e.czr_serverNotification({message:t,status:"error"})}).done(function(){r.resolve(t)})}),r.promise()},e._requestSkopeChangetsetUpdate=function(n,o,s){if(i.isUndefined(o)||!e.czr_skope.has(o))throw new Error("In api._requestSkopeChangetsetUpdate() : a valid and registered skope_id must be provided");var r,a,l=new t.Deferred,c={};if(o=o||e.czr_activeSkopeId(),a=i.extend({title:null,date:null,autosave:!1,force:!1},s),n&&i.extend(c,n),i.each(e.czr_skopeBase.getSkopeDirties(o),function(e,t){n&&null===n[t]||(c[t]=i.extend({},c[t]||{},{value:e}))}),!a.force&&i.isEmpty(c)&&null===a.title&&null===a.date)return l.resolve({}),l.promise();if(a.status)return l.reject({code:"illegal_status_in_changeset_update"}).promise();if(a.date&&a.autosave)return l.reject({code:"illegal_autosave_with_date_gmt"}).promise();if(e._latestRevision<=e._lastSavedRevision)return l.resolve({}),l.promise();e.trigger("skope-changeset-save",c);var d={skope_id:o,action:"changeset_update",opt_name:e.czr_skope(o).opt_name};return delete(r=e.previewer.query(i.extend(d,{excludeCustomizedSaved:!0}))).customized,i.extend(r,{nonce:e.settings.nonce.save,customize_changeset_data:JSON.stringify(c)}),wp.ajax.post("customize_skope_changeset_save",r).done(function(e){l.resolve(e)}).fail(function(t){e.consoleLog("SKOPE CHANGESET FAIL FOR SKOPE "+t.skope_id,t),l.reject(t)}).always(function(t){!i.isUndefined(t)&&t.setting_validities&&e._handleSettingValidities({settingValidities:t.setting_validities,focusInvalidControl:!0})}),l.promise()}}}(wp.customize,jQuery,_),function(e,t,i){e.bind("ready",function(){if(serverControlParams.isSkopOn){e.czr_isLoadingSkope=new e.Value(!1),e.czr_isLoadingSkope.bind(function(e){n(e)}),e.czr_skopeBase=new e.CZR_skopeBase,e.czr_skopeReset=new e.CZR_skopeReset,e.trigger("czr-skope-started");var t=function(){e.czr_skopeBase.toggleTopNote(!0,{title:serverControlParams.i18n.skope["There was a problem when trying to load the customizer."],message:[serverControlParams.i18n.skope["Please refer to"],'<a href="http://docs.presscustomizr.com/article/285-there-was-a-problem-when-trying-to-load-the-customizer" target="_blank">',serverControlParams.i18n.skope["this documentation page"],"</a>",serverControlParams.i18n.skope["to understand how to fix the problem."]].join(" "),selfCloseAfter:4e4})};e.czr_skopeReady.done(function(){e.trigger("czr-skope-ready")}).fail(function(i){e.errorLog("Skope could not be instantiated : "+i),t(),serverControlParams.isSkopOn=!1}).always(function(){e.czr_isLoadingSkope(!1)}),"rejected"!=e.czr_skopeReady.state()&&setTimeout(function(){"pending"==e.czr_skopeReady.state()&&(t(),e.czr_isLoadingSkope(!1))},4e4)}serverControlParams.isChangeSetOn&&(e.settings.timeouts.changesetAutoSave=1e4)}),i.has(e,"_latestRevision")||(e._latestRevision=0,e._latestSettingRevisions={},e.bind("change",function(t){e._latestRevision+=1,e._latestSettingRevisions[t.id]=e._latestRevision}),e.bind("ready",function(){e.bind("add",function(t){t._dirty&&(e._latestRevision+=1,e._latestSettingRevisions[t.id]=e._latestRevision)})}));var n=function(n){n=!!i.isUndefined(n)||n;var o,s=function(){i.delay(function(){t.when(t("body").removeClass("czr-skope-pane-open")).done(function(){i.delay(function(){t.when(t("body").removeClass("czr-skop-loading")).done(function(){!1!==t("#czr-skope-pane").length&&setTimeout(function(){t("#czr-skope-pane").remove()},400)})},200)})},50)};"pending"==e.czr_skopeReady.state()&&n&&(t("body").addClass("czr-skop-loading"),function(){var i=t.Deferred();try{_tmpl=wp.template("czr-skope-pane")({is_skope_loading:!0})}catch(t){e.errorLog("In toggleSkopeLoadPane : error when parsing the the reset skope template : "+t),i.resolve(!1)}return t.when(t("#customize-preview").after(t(_tmpl))).always(function(){i.resolve(t("#czr-skope-pane"))}),i.promise()}().done(function(e){o=e}).then(function(){o.length&&i.delay(function(){var e=t("#customize-preview").height();o.css("line-height",e+"px").css("height",e+"px"),t("body").addClass("czr-skope-pane-open")},50)})),e.czr_skopeReady.done(function(){s()}),n||s()}}(wp.customize,jQuery,_);var CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{globalSettingVal:{},initialize:function(){var n=this;n.skope_colors={global:"rgb(255, 255, 255)",special_group:"rgba(173, 213, 247, 0.55)",group:"rgba(120, 136, 158, 0.12)",local:"rgba(187, 211, 247, 0.28)"},e.czr_isPreviewerSkopeAware=t.Deferred(),e.czr_initialSkopeCollectionPopulated=t.Deferred(),n.skopeWrapperEmbedded=t.Deferred(),e.czr_skope=new e.Values,e.czr_skopeCollection=new e.Value([]),e.czr_currentSkopesCollection=new e.Value([]),e.czr_activeSkopeId=new e.Value,e.czr_dirtyness=new e.Value(!1),e.czr_isResettingSkope=new e.Value(!1),e.state.create("switching-skope")(!1),e.czr_dirtyness.callbacks.add(function(){return n.apiDirtynessReact.apply(n,arguments)}),e.czr_isLoadingSkope(!0),n.bindAPISettings(),e.czr_skopeReady.then(function(){"pending"==n.skopeWrapperEmbedded.state()&&t.when(n.embedSkopeWrapper()).done(function(){n.skopeWrapperEmbedded.resolve()})}),e.previewer.bind("czr-skopes-synced",function(t){if(serverControlParams.isSkopOn&&"rejected"!=e.czr_skopeReady.state()){var o=e.czr_currentSkopesCollection();if(!i.has(t,"czr_skopes"))return"resolved"!=e.czr_skopeReady.state()&&e.czr_skopeReady.reject(),void e.errorLog("On 'czr-skopes-synced' : missing skopes in the server data");try{e.czr_skopeBase.updateSkopeCollection(t.czr_skopes,this.channel())}catch(t){return void e.czr_skopeReady.reject(t)}var s=function(){n._writeCurrentSkopeTitle(),e.czr_bottomInfosVisible()?n.renderBottomInfosTmpl():e.czr_bottomInfosVisible(!0)};e.czr_initialSkopeCollectionPopulated.then(function(){var r=i.isUndefined(i.findWhere(e.czr_currentSkopesCollection(),{id:e.czr_activeSkopeId()}));e.czr_skopeBase.reactWhenSkopeSyncedDone(t).done(function(){if(r)try{e.czr_activeSkopeId(n.getActiveSkopeId()).done(function(){"resolved"!=e.czr_skopeReady.state()&&e.czr_skopeReady.resolve(n.getActiveSkopeId()),s()}).fail(function(){throw new Error("Error when trying to set the active skope after skope synced.")})}catch(t){e.errorLog("In reactWhenSkopeSyncedDone => api.czr_activeSkopeId() : "+t)}else if(!i.isEmpty(o)){var a=i.findWhere(o,{skope:"local"}).opt_name;i.findWhere(t.czr_skopes,{skope:"local"}).opt_name!==a&&"resolved"==e.czr_skopeReady.state()&&s()}})})}}),e.czr_currentSkopesCollection.bind(function(e,t){return n.currentSkopesCollectionReact(e,t)},{deferred:!0}),e.czr_initialSkopeCollectionPopulated.done(function(){e.czr_activeSkopeId.bind(function(t,o){return i.has(e,"czr_ModOptVisible")&&e.czr_ModOptVisible(!1),n.activeSkopeReact(t,o).then(function(i){e.trigger("skope-switched-done",{current_skope_id:t,previous_skope_id:o,updated_setting_ids:i||[]})})},{deferred:!0}),e.czr_activeSectionId.callbacks.add(function(){return n.activeSectionReact.apply(n,arguments)}),e.czr_activePanelId.callbacks.add(function(){return n.activePanelReact.apply(n,arguments)})}),e.bind("skope-switched-done",function(e){return e=i.extend({current_skope_id:"",previous_skope_id:"",updated_setting_ids:[]},e),n.skopeSwitchedDoneReact(e)}),e.czr_serverNotification=new e.Value({status:"success",message:"",expanded:!0}),e.czr_serverNotification.bind(function(e,t){n.toggleServerNotice(e)}),n._setupPreviewNotificationsBlocks(),n.scopeSwitcherEventMap=[{trigger:"click keydown",selector:".czr-dismiss-notification",name:"dismiss-notification",actions:function(){e.czr_serverNotification({expanded:!1})}},{trigger:"click keydown",selector:".czr-toggle-title-notice",name:"toggle-title-notice",actions:function(t){i.isUndefined(n.skopeTitleNoticeVisible)&&(n.skopeTitleNoticeVisible=new e.Value(!1),n.skopeTitleNoticeVisible.bind(function(e){t.dom_el.find(".czr-skope-title").toggleClass("notice-visible",e)})),n.skopeTitleNoticeVisible(!n.skopeTitleNoticeVisible())}}],n.skopeWrapperEmbedded.then(function(){e.CZR_Helpers.setupDOMListeners(n.scopeSwitcherEventMap,{dom_el:t(".czr-scope-switcher")},n)}),n.refreshedControls=["czr_cropped_image"],n.initWidgetSidebarSpecifics(),e.bind("czr-paint",function(t){e.czr_skopeReady.then(function(){n.wash(t).paint(t)})})},embedSkopeWrapper:function(){t("#customize-header-actions").append(t("<div/>",{class:"czr-scope-switcher",html:'<div class="czr-skopes-wrapper"></div>'})),t("body").addClass("czr-skop-on");var n=[{trigger:"click keydown",selector:".czr-skope-switch",name:"control_skope_switch",actions:function(n){var o=t(n.dom_event.currentTarget,n.dom_el).attr("data-skope-id");!i.isEmpty(o)&&e.czr_skope.has(o)&&e.czr_activeSkopeId(o)}}];e.CZR_Helpers.setupDOMListeners(n,{dom_el:t(".czr-scope-switcher")},this)},apiDirtynessReact:function(i){t("body").toggleClass("czr-api-dirty",i),e.state("saved")(!i)},setSaveButtonStates:function(){e.state.has("saving")||(e.state.create("saving"),e.state("saving").bind(function(e){t(document.body).toggleClass("saving",e)}));var i=t("#save"),n=t(".customize-controls-close"),o=e.state("saved"),s=e.state("saving"),r=e.state("activated"),a=e.state.has("changesetStatus")?e.state("changesetStatus")():"auto-draft";e.czr_dirtyness()||!o()?(i.val(e.l10n.save),n.find(".screen-reader-text").text(e.l10n.cancel)):(i.val(e.l10n.saved),n.find(".screen-reader-text").text(e.l10n.close));var l=!(s()||r()&&o()||"publish"===a);i.prop("disabled",!l)},skopeSwitchedDoneReact:function(n){var o=this,s=function(){e.czr_CrtlDependenciesReady.then(function(){if(!i.isUndefined(e.czr_activeSectionId())&&!i.isEmpty(e.czr_activeSectionId()))try{e.czr_ctrlDependencies.setServiDependencies(e.czr_activeSectionId(),null,!0)}catch(t){e.errorLog("On skope-switched-done : "+t)}}),o.updateCtrlSkpNot(e.CZR_Helpers.getSectionControlIds()),e.czr_skope.has(n.previous_skope_id)&&t("#customize-controls").removeClass(["czr-",e.czr_skope(n.previous_skope_id)().skope,"-skope-level"].join("")),e.czr_skope.has(n.current_skope_id)&&t("#customize-controls").addClass(["czr-",e.czr_skope(n.current_skope_id)().skope,"-skope-level"].join(""));e.czr_bottomInfosVisible()?o.renderBottomInfosTmpl():e.czr_bottomInfosVisible(!0),i.delay(function(){!function(){if(!i.isUndefined(e.czr_activeSectionId())&&!i.isEmpty(e.czr_activeSectionId())){var t=e.CZR_Helpers.getSectionControlIds(e.czr_activeSectionId());i.each(t,function(t){e.control.when(t,function(){var n=e.control(t);i.has(n,"czr_states")&&n.deferred.embedded.then(function(){n.czr_states("noticeVisible")(o.isCtrlNoticeVisible(t)),n.czr_states("resetVisible")(!1)})})})}}()},500)};e.czr_skopeReady.then(function(){s()})},_setupPreviewNotificationsBlocks:function(){var n=this;e.czr_topNoteVisible=new e.Value(!1),e.czr_skopeReady.then(function(){e.czr_topNoteVisible.bind(function(i){var o={};(o=t.extend({title:"",message:"",actions:"",selfCloseAfter:2e4},serverControlParams.topNoteParams)).actions=function(){var i=t.extend(e.previewer.query(),{nonce:e.previewer.nonce.save});wp.ajax.post("czr_dismiss_top_note",i).always(function(){}).fail(function(t){e.consoleLog("czr_dismiss_top_note failed",i,t)}).done(function(e){})},n.toggleTopNote(i,o)}),i.delay(function(){e.czr_topNoteVisible(!i.isEmpty(serverControlParams.isTopNoteOn)||1==serverControlParams.isTopNoteOn)},2e3)}),e.czr_bottomInfosVisible=new e.Value(!1),e.czr_skopeReady.then(function(){e.czr_bottomInfosVisible.bind(function(e){var i;return i=t.extend({title:"",message:"",actions:"",selfCloseAfter:2e4},{}),n.toggleBottomInfos(e,i)},{deferred:!0});var o=e.CZR_Helpers.build_setId("show-skope-infos");e.when(o,function(t){e.czr_bottomInfosVisible.validate=function(e){var i=t();return!!(0!==i&&"0"!==i&&!1!==i&&"off"!==i)&&e},t.bind(function(t){e.czr_bottomInfosVisible(0!==t&&"0"!==t&&!1!==t&&"off"!==t)})}),i.delay(function(){e.czr_bottomInfosVisible(!0)},2e3)})}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{toggleServerNotice:function(n){if(n=i.isObject(n)?n:{},"changeset_already_published"!=(n=i.extend({status:"success",expanded:!0,message:"",auto_collapse:!1},n)).message&&serverControlParams.isDevMode){this.serverNoticeEmbedded=this.serverNoticeEmbedded||t.Deferred();var o=this,s=function(){var e,s=t(".czr-server-notice",".czr-scope-switcher"),r=t(".wp-full-overlay-header");t(".wp-full-overlay-sidebar .wp-full-overlay-sidebar-content");o.skopeTitleNoticeVisible&&o.skopeTitleNoticeVisible(!1),n.expanded?(s.toggleClass("czr-server-error","error"==n.status),"error"==n.status?t(".czr-server-message",s).html(i.isEmpty(n.message)?"Server Problem.":n.message):t(".czr-server-message",s).html(i.isEmpty(n.message)?"Success.":n.message),e=t(".czr-server-notice",".czr-scope-switcher").outerHeight(),r.outerHeight()+e,setTimeout(function(){t.when(!0).done(function(){s.fadeIn({duration:200,complete:function(){t(this).css("height","auto")}})})},400)):(s.fadeOut({duration:200,complete:function(){}}),setTimeout(function(){},200))};"pending"==o.serverNoticeEmbedded.state()?t.when(void t(".czr-scope-switcher").prepend(t("<div/>",{class:"czr-server-notice",html:'<span class="czr-server-message"></span><span class="fas fa-times-circle czr-dismiss-notification"></span>'}))).done(function(){setTimeout(function(){o.serverNoticeEmbedded.resolve(),s()},200)}):s(),i.delay(function(){e.czr_serverNotification({expanded:!1})},"success"==n.status||!1!==n.auto_collapse?4e3:5e3)}},buildServerResponse:function(e){var t=!1;if(i.isObject(e)&&(!i.has(e,"responseJSON")||i.isUndefined(e.responseJSON.data)||i.isEmpty(e.responseJSON.data)?i.has(e,"statusText")&&!i.isEmpty(e.statusText)&&(t=e.statusText):t=e.responseJSON.data),i.isObject(e)&&!t)try{JSON.stringify(e)}catch(e){t="Server Error"}else t?"-1"===e&&(t="Identification issue detected, please refresh your page."):t="0"===e?"Not logged in.":e;return t}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{toggleTopNote:function(n,o){o=i.isObject(o)?o:{};var s=this,r=function(){var e=t.Deferred();return t("body").removeClass("czr-top-note-open"),s.welcomeNote.length?i.delay(function(){s.welcomeNote.remove(),e.resolve()},300):e.resolve(),e.promise()};o=t.extend({title:"",message:"",actions:"",selfCloseAfter:2e4},o),n?t.when(s.renderTopNoteTmpl(o)).done(function(n){s.welcomeNote=n,i.delay(function(){t("body").addClass("czr-top-note-open")},200),e.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:".czr-preview-note-close",actions:function(){r().done(function(){e.czr_topNoteVisible(!1),i.isFunction(o.actions)&&o.actions()})}}],{dom_el:s.welcomeNote},s)}):r().done(function(){e.czr_topNoteVisible(!1)}),i.delay(function(){e.czr_topNoteVisible(!1)},o.selfCloseAfter||2e4)},renderTopNoteTmpl:function(i){if(t("#czr-top-note").length)return t("#czr-top-note");var n="",o=i.title||"",s=i.message||"";try{n=wp.template("czr-top-note")({title:o})}catch(t){return e.errorLog("Error when parsing the the top note template : "+t),!1}return t("#customize-preview").after(t(n)),t(".czr-note-message","#czr-top-note").html(s),t("#czr-top-note")}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{bindAPISettings:function(t){var n=this,o=function(t,o,s){var r,a=this.id;serverControlParams.isSkopOn&&(i.has(e,"czr_activeSkopeId")&&!i.isUndefined(e.czr_activeSkopeId())||e.errorLog("The api.czr_activeSkopeId() is undefined in the api.czr_skopeBase.bindAPISettings method."),e(a)._dirty&&(r=n.isSettingSkopeEligible(a)?e.czr_activeSkopeId():n.getGlobalSkopeId(),e.czr_skope(r).updateSkopeDirties(a,t)),i.has(e.control(a),"czr_states")&&!e.control(a).czr_states("isResetting")()&&e.control(a).czr_states("resetVisible")(!1),n.isSettingSkopeEligible(a)&&n.updateCtrlSkpNot(a))};i.isUndefined(t)?e.each(function(e){e.bind(o)}):e(t).bind(o);var s=function(e){e.callbacks.has(o)||e.bind(o)};e.topics.change.has(s)||e.bind("change",s)}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{reactWhenSkopeSyncedDone:function(n){var o=t.Deferred();if(!i.has(n,"czr_skopes")||i.isEmpty(n.czr_skopes))return e.errorLog("Missing skope data after refresh",n),o.resolve().promise();e.czr_dirtyness()||e.czr_dirtyness(!!i.isBoolean(n.isChangesetDirty)&&n.isChangesetDirty);var s=n.czr_skopes;return i.each(e.czr_skopeCollection(),function(t){var n=i.findWhere(s,{opt_name:t.opt_name});if(!i.isUndefined(n)){var o=i.isEmpty(n.changeset||{})?{}:n.changeset,r={};i.each(o,function(t,i){e.has(i)||e.consoleLog("In reactWhenSkopeSyncedDone : attempting to update the changeset with a non registered setting : "+i),r[i]=t}),e.czr_skope(t.id).changesetValues(r)}}),i.each(e.czr_skopeCollection(),function(n){var o=i.findWhere(s,{opt_name:n.opt_name});if(!i.isUndefined(o)){var r=t.extend(!0,{},e.czr_skope(n.id).dbValues()),a=t.extend(r,o.db||{}),l={};i.each(a,function(t,i){e.has(i)||e.consoleLog("In reactWhenSkopeSyncedDone : attempting to update the db values with a non registered setting : "+i),l[i]=t}),e.czr_skope(n.id).dbValues(l)}}),i.delay(function(){o.resolve()},500),o.promise()}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{_maybeSetupAssignedMenuLocations:function(t){(i.isUndefined(t)||i.isEmpty(t)||!e.section.has(t.id))&&e.consoleLog("In _maybeSetupAssignedMenuLocations : no valid section_id provided.");if(t.assignedLocations){var n=function(e){};t.assignedLocations.callbacks.has(n)||t.assignedLocations.bind(n)}},activeSectionReact:function(t,n){"add_menu"!=t&&e.trigger("czr-paint",{active_section_id:t});var o=this,s=function(t,n){o.setupActiveSkopedControls({section_id:n}),o.processSilentUpdates({section_id:n}).fail(function(){throw new Error("Fail to process silent updates after initial skope collection has been populated")}).done(function(){i.delay(function(){var t;t=e.CZR_Helpers.getSectionControlIds(n),i.each(t,function(t){if(e.has(t)&&!i.isUndefined(e.control(t))){var n=e.control(t);i.has(n,"czr_states")&&n.czr_states("noticeVisible")(o.isCtrlNoticeVisible(t))}})},700),o.isExcludedSidebarsWidgets()||o.forceSidebarDirtyRefresh(n,e.czr_activeSkopeId())}),i.has(e.topics,"active-section-setup")||e.bind("active-section-setup",function(e){e=i.extend({controls:[],section_id:""},e),o._maybeSetupAssignedMenuLocations(e)}),e.czr_skopeReady.then(function(){var t=function(t){i.isUndefined(e.notifications)?e.czr_serverNotification({status:"success",message:[t,serverControlParams.i18n.skope["is always customized sitewide."]].join(" ")}):(e.notifications.add(new wp.customize.Notification(t,{type:"info",message:[t,serverControlParams.i18n.skope["is always customized sitewide."]].join(" "),dismissible:!0})),i.delay(function(){if(e.notifications.has(t)){var i=e.notifications(t);i.parent?i.parent.remove(i.code):i.container.remove()}},5e3)),e.czr_activeSkopeId(o.getGlobalSkopeId())};"global"!=e.czr_skope(e.czr_activeSkopeId())().skope&&(o.isExcludedWPCustomCss()&&"custom_css"==n&&t(e.section(n).params.title),i.contains(["admin_sec","tc_font_customizer_settings"],n)&&t(e.section(n).params.title),"nav_menu["!=n.substring(0,"nav_menu[".length)&&"add_menu"!=n||(i.isUndefined(e.notifications)?e.czr_serverNotification({status:"success",message:serverControlParams.i18n.skope["Menus are created sitewide."]}):(e.notifications.add(new wp.customize.Notification("nav_menus_sitewide",{type:"info",message:serverControlParams.i18n.skope["Menus are created sitewide."],dismissible:!0})),i.delay(function(){if(e.notifications.has("nav_menus_sitewide")){var t=e.notifications("nav_menus_sitewide");t.parent?t.parent.remove(t.code):t.container.remove()}},5e3))))}),e.trigger("active-section-setup",t)};e.czr_initialSkopeCollectionPopulated.then(function(){var o,r;e.section.when(t,function(i){"publish_settings"!=t&&i.deferred.embedded.then(function(){try{s(i,t)}catch(t){e.errorLog("activeSectionReact => _doReactActive : "+t)}})}),!i.isEmpty(n)&&e.section.has(n)&&(o=n,r=e.CZR_Helpers.getSectionControlIds(o),i.each(r,function(t){if(e.has(t)&&!i.isUndefined(e.control(t))){var n=e.control(t);i.has(n,"czr_states")&&n.czr_states("resetVisible")(!1)}}))})},activePanelReact:function(t,n){var o=this;e.czr_initialSkopeCollectionPopulated.then(function(){e.trigger("czr-paint",{active_panel_id:t});e.czr_skopeReady.then(function(){"global"!=e.czr_skope(e.czr_activeSkopeId())().skope&&o.isExcludedSidebarsWidgets()&&"widgets"==t&&(i.isUndefined(e.notifications)?e.czr_serverNotification({status:"success",message:serverControlParams.i18n.skope["Widgets are created sitewide."]}):(e.notifications.add(new wp.customize.Notification("widgets_are_sitewide",{type:"info",message:serverControlParams.i18n.skope["Widgets are created sitewide."],dismissible:!0})),i.delay(function(){if(e.notifications.has("widgets_are_sitewide")){var t=e.notifications("widgets_are_sitewide");t.parent?t.parent.remove(t.code):t.container.remove()}},5e3)))}),e.czr_skopeReady.then(function(){"nav_menus"==t&&i.each(e.panel(t).sections(),function(e){o.processSilentUpdates({section_id:e.id,awake_if_not_active:!0})})})})}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{wash:function(n){return e.czr_skopeBase.paintedElements&&(i.each(e.czr_skopeBase.paintedElements(),function(e){var n;n=e,i.has(n,"el")&&n.el.length&&t.when(n.el.removeClass("czr-painted")).done(function(){t(this).css("background","").css("color","")})}),e.czr_skopeBase.paintedElements([])),this},paint:function(n){var o="inherit",s={active_panel_id:e.czr_activePanelId(),active_section_id:e.czr_activeSectionId(),is_skope_switch:!1},r=[];n=t.extend(s,n),!i.isUndefined(e.czr_activeSkopeId())&&e.czr_skope.has(e.czr_activeSkopeId())&&(o=e.czr_skope(e.czr_activeSkopeId()).color);return e.czr_skopeBase.paintedElements=e.czr_skopeBase.paintedElements||new e.Value([]),i.isEmpty(n.active_panel_id)&&i.isEmpty(n.active_section_id)&&(r.push({el:t("#customize-info").find(".accordion-section-title").first()}),e.panel.each(function(e){r.push({el:e.container.find(".accordion-section-title").first()})}),e.section.each(function(e){i.isEmpty(e.panel())&&r.push({el:e.container.find(".accordion-section-title").first()})})),!i.isEmpty(n.active_panel_id)&&i.isEmpty(n.active_section_id)&&e.panel.when(n.active_panel_id,function(e){e.deferred.embedded.then(function(){r.push({el:e.container.find(".accordion-section-title, .customize-panel-back")})})}),i.isEmpty(n.active_section_id)||e.section.when(n.active_section_id,function(t){t.deferred.embedded.then(function(){r.push({el:t.container.find(".customize-section-title, .customize-section-back"),bgColor:"inherit"},{el:t.container}),e.czr_isChangeSetOn()||r.push({el:t.container.find(".accordion-section-content")})})}),i.each(r,function(s){var r;r=s,i.has(r,"el")&&r.el.length&&(n.is_skope_switch?t.when(r.el.addClass("czr-painted")).done(function(){t(this).css("background",r.bgColor||o)}):r.el.css("background",r.bgColor||o),"global"!=e.czr_skope(e.czr_activeSkopeId())().skope&&r.el.css("color","#000"))}),e.czr_skopeBase.paintedElements(r),this}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{toggleBottomInfos:function(n,o){o=i.isObject(o)?o:{};var s,r=this,a=t.Deferred(),l=e.CZR_Helpers.build_setId("show-skope-infos"),c=function(){return t.Deferred(function(){var e=this;t("body").removeClass("czr-bottom-infos-open"),r.bottomInfosContainer.length?i.delay(function(){r.bottomInfosContainer.remove(),r.bottomInfosContainer=!1,e.resolve()},300):e.resolve()})};return o=t.extend({title:"",message:"",actions:"",selfCloseAfter:2e4},o),n?(s=t.Deferred(),t.when(r.renderBottomInfosTmpl(o)).done(function(n){r.bottomInfosContainer=n,i.delay(function(){t("body").addClass("czr-bottom-infos-open"),s.resolve()},200),e.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:".czr-preview-note-close",actions:function(){c().done(function(){e.czr_bottomInfosVisible(!1),i.isFunction(o.actions)&&o.actions()})}},{trigger:"click keydown",selector:".czr-skope-switch",actions:function(n){var o=t(n.dom_event.currentTarget,n.dom_el).attr("data-skope-id");!i.isEmpty(o)&&e.czr_skope.has(o)&&e.czr_activeSkopeId(o)}},{trigger:"click keydown",selector:".czr-disable-bottom-infos",actions:function(t){e.control.has(l)&&e.control(l).focus()}}],{dom_el:r.bottomInfosContainer},r)}).fail(function(){s.resolve()}),s.promise()).always(function(){a.resolve()}):c().done(function(){e.czr_bottomInfosVisible(!1),a.resolve()}),a.promise()},renderBottomInfosTmpl:function(n){n=n||{};var o=this,s="",r=e.czr_activeSkopeId();if(!e.czr_skope.has(r)||!i.isObject(e.czr_skope(r)()))return!1;var a=e.czr_skope(r)().long_title,l=e.czr_skope(r)().ctx_title;a=i.isString(a)?a:"",l=i.isString(l)?l:"";var c=n.title||["Customizing",l.toLowerCase()].join(" "),d=n.message||o._getSkopeInfosMessage(r);return i.isUndefined(this.bottomInfosContainer)||1!=this.bottomInfosContainer.length?t.Deferred(function(){var i=this;try{s=wp.template("czr-bottom-infos")({title:c}),t("#customize-preview").after(t(s)),i.resolve()}catch(t){e.errorLog("Error when parsing the the bottom infos template : "+t),i.reject(t)}}).done(function(){t(".czr-note-message","#czr-bottom-infos").html(d)}):t(".czr-note-content",o.bottomInfosContainer).fadeOut({duration:"fast",complete:function(){t("h2",o.bottomInfosContainer).html(["&middot;",c,"&middot;"].join(" ")),t(".czr-note-message",o.bottomInfosContainer).html(d),t(this).fadeIn("fast")}}),this.bottomInfosContainer&&1==this.bottomInfosContainer.length?this.bottomInfosContainer:t("#czr-bottom-infos")},_getSkopeInfosMessage:function(n){n=n||e.czr_activeSkopeId();var o=i.findWhere(e.czr_currentSkopesCollection(),{skope:"local"}).id;if(!e.czr_skope.has(n)||!i.isObject(e.czr_skope(n)())||i.isUndefined(o))return"";var s,r=e.czr_skope(n)().skope,a=this.getInheritedSkopeTitles(),l=this.getOverridenSkopeTitles(),c=e.czr_skope(o)().ctx_title;e.czr_skope(n)().long_title;switch(r){case"global":s=[serverControlParams.i18n.skope["The customizations made site wide are inherited by all other levels of customization."],"<br/>",serverControlParams.i18n.skope["The current context"],["(",c,")"].join(" "),serverControlParams.i18n.skope["can be customized more specifically at the following level"]+"(s)",":",l+"."].join(" ");break;case"group":s=[serverControlParams.i18n.skope["The current customizations will be applied to"],e.czr_skope(n)().ctx_title.toLowerCase()+".","<br/>",serverControlParams.i18n.skope["The options not customized at this level will inherit their value from"],a,".<br/>",serverControlParams.i18n.skope["The current context"],["(",c,")"].join(" "),serverControlParams.i18n.skope["can be customized more specifically at the following level"],":",l+"."].join(" ");break;case"local":s=[serverControlParams.i18n.skope["The current context"],["(",c,")"].join(" "),serverControlParams.i18n.skope["can be customized with a specific set of options."],"<br/>",serverControlParams.i18n.skope["The options not customized at this level will inherit their value from"],a+"."].join(" ")}return t.trim(['<span class="czr-skope-bottom-infos">',s,"</span>"].join(" "))}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{isSkopeRegisteredInCollection:function(t,n){return n=n||e.czr_skopeCollection(),!i.isUndefined(i.findWhere(n,{id:t}))},isSkopeRegisteredInCurrentCollection:function(t,n){return n=n||e.czr_currentSkopesCollection(),!i.isUndefined(i.findWhere(n,{id:t}))},isGlobalSkopeRegistered:function(){var t=i.findWhere(e.czr_currentSkopesCollection(),{skope:"global"});return i.isObject(t)&&i.has(t,"id")},getGlobalSkopeId:function(){if(!i.has(e,"czr_skope"))return"";var t="";return e.czr_skope.each(function(e){"global"==e().skope&&(t=e().id)}),t},getChangedGlobalDBSettingValues:function(t){var n={};return i.each(t,function(t,o){_wpSetId=e.CZR_Helpers.build_setId(o),i.has(e.settings.settings,_wpSetId)&&(i.isEqual(t,e.settings.settings[_wpSetId].value)||(n[o]=t))}),n},getActiveSkopeId:function(t){var n,o,s;if(t=t||e.czr_currentSkopesCollection(),n=!i.isEmpty(e.czr_activeSkopeId())&&e.czr_skope.has(e.czr_activeSkopeId())?e.czr_skope(e.czr_activeSkopeId())().skope:serverControlParams.isLocalSkope?"local":"global",o=i.findWhere(t,{skope:n}),s=i.isUndefined(o)?i.findWhere(t,{skope:"global"}).id:o.id,i.isUndefined(s))throw new Error("No default skope was found in getActiveSkopeId ",t);return s},getActiveSkopeName:function(){return e.czr_skope.has(e.czr_activeSkopeId())?e.czr_skope(e.czr_activeSkopeId())().skope:"global"},isSettingSkopeEligible:function(t){var n=e.CZR_Helpers.getOptionName(t);return i.isUndefined(t)||!e.has(t)?(e.consoleLog("THE SETTING "+t+" IS NOT ELIGIBLE TO SKOPE BECAUSE UNDEFINED OR NOT REGISTERED IN THE API."),!1):!this.isExcludedWPBuiltinSetting(t)&&(!i.contains(serverControlParams.skopeExcludedSettings,n)&&(this.isThemeSetting(t),!0))},isSettingResetEligible:function(t){e.CZR_Helpers.getOptionName(t);if(!i.isUndefined(t)&&e.has(t)){if(!this.isExcludedWPBuiltinSetting(t))return!(!this.isThemeSetting(t)&&!this.isWPAuthorizedSetting(t))||void e.consoleLog("THE SETTING "+t+" IS NOT ELIGIBLE TO RESET BECAUSE NOT PART OF THE THEME OPTIONS AND NOT WP AUTHORIZED BUILT IN OPTIONS")}else e.consoleLog("THE SETTING "+t+" IS NOT ELIGIBLE TO RESET BECAUSE UNDEFINED OR NOT REGISTERED IN THE API.")},isThemeSetting:function(e){return i.isString(e)&&-1!==e.indexOf(serverControlParams.themeOptions)},isWPAuthorizedSetting:function(e){return i.isString(e)&&i.contains(serverControlParams.wpBuiltinSettings,e)},isExcludedWPBuiltinSetting:function(e){var t=this;if(i.isUndefined(e))return!0;if("active_theme"==e)return!0;if(i.contains(serverControlParams.wpBuiltinSettings,e))return!1;var n=!1;return i.each(["widget_","nav_menu","sidebars_","custom_css","nav_menu[","nav_menu_item","nav_menus_created_posts","nav_menu_locations"],function(i){switch(i){case"widget_":case"sidebars_":i==e.substring(0,i.length)&&(n=t.isExcludedSidebarsWidgets());break;case"nav_menu[":case"nav_menu_item":case"nav_menus_created_posts":i==e.substring(0,i.length)&&(n=!0);break;case"nav_menu_locations":i==e.substring(0,i.length)&&(n=t.isExcludedNavMenuLocations());break;case"custom_css":i==e.substring(0,i.length)&&(n=t.isExcludedWPCustomCss())}}),n},isExcludedSidebarsWidgets:function(){var e=serverControlParams.isSidebarsWigetsSkoped;return!(!i.isUndefined(e)&&!i.isEmpty(e)&&!1!==e)},isExcludedNavMenuLocations:function(){if(!e.czr_isChangeSetOn())return!0;var t=serverControlParams.isNavMenuLocationsSkoped;return!(!i.isUndefined(t)&&!i.isEmpty(t)&&!1!==t)},isExcludedWPCustomCss:function(){var e=serverControlParams.isWPCustomCssSkoped;return!(!i.isUndefined(e)&&!i.isEmpty(e)&&!1!==e)},_getDBSettingVal:function(t,n){var o=e.CZR_Helpers.getOptionName(t),s=e.CZR_Helpers.build_setId(t);return e.czr_skope.has(n)?i.has(e.czr_skope(n).dbValues(),s)?e.czr_skope(n).dbValues()[s]:i.has(e.czr_skope(n).dbValues(),o)?e.czr_skope(n).dbValues()[o]:"_no_db_val":(e.consoleLog("_getDBSettingVal : the requested skope id is not registered : "+n),"_no_db_val")},getSkopeDirties:function(t,n){if(!e.czr_skope.has(t))return{};n=n||{},n=i.extend({unsaved:!0},n);var o={};return i.each(e.czr_skope(t).dirtyValues(),function(t,s){var r;e.czr_isChangeSetOn()&&(r=e._latestSettingRevisions[s],e.state("changesetStatus").get()&&n&&n.unsaved&&(i.isUndefined(r)||r<=e._lastSavedRevision))||(o[s]=t)}),o},getSkopeExcludedDirties:function(){var t=this,n={};e.each(function(e,t){e._dirty&&(n[t]=e())});var o=t.getGlobalSkopeId();t.getSkopeDirties(o);return i.omit(n,function(e,i){return t.isSettingSkopeEligible(i)})},parseWidgetId:function(e,t){var n,o={number:null,id_base:null};return(n=e.match(/^(.+)-(\d+)$/))?(o.id_base=n[1],o.number=parseInt(n[2],10)):o.id_base=e,i.isUndefined(t)||(o.id_base=o.id_base.replace(t,"")),o},widgetIdToSettingId:function(e,t){var i,n=this.parseWidgetId(e,t);return i=n.id_base,n.number&&(i+="["+n.number+"]"),i},isWidgetRegisteredGlobally:function(e){var t=this;return registered=!1,i.each(_wpCustomizeWidgetsSettings.registeredWidgets,function(i,n){registered||"widget_"+t.widgetIdToSettingId(n)!=e||(registered=!0)}),registered}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{getAppliedPrioritySkopeId:function(t,n){if(!e.has(e.CZR_Helpers.build_setId(t)))return e.errorLog("getAppliedPrioritySkopeId : the requested setting id does not exist in the api : "+e.CZR_Helpers.build_setId(t)),n;if(!e.czr_skope.has(n))return e.errorLog("getAppliedPrioritySkopeId : the requested skope id is not registered : "+n),n;var o=this,s=i.findWhere(e.czr_currentSkopesCollection(),{skope:"local"}).id;if(i.isUndefined(s)||n==s)return n;var r=function(i){var s=e.CZR_Helpers.build_setId(t),a=e.czr_skope(i)();return i==n?n:e.czr_skope(i).getSkopeSettingAPIDirtyness(s)?a.id:e.czr_isChangeSetOn()&&e.czr_skope(i).getSkopeSettingChangesetDirtyness(s)?a.id:"_no_db_val"!=o._getDBSettingVal(t,i)?a.id:"global"==a.skope?a.id:r(o._getParentSkopeId(a))};return r(s)},getOverridenSkopeTitles:function(){var t=t||e.czr_activeSkopeId();if(!e.czr_skope.has(t))return e.errorLog("getInheritedSkopeTitles : the requested skope id is not registered : "+t),"";var n=this,o=i.findWhere(e.czr_currentSkopesCollection(),{skope:"local"}).id;if(i.isUndefined(o)||t==o)return"";var s=function(i,o){o=o||[];var r=e.czr_skope(i)();return i==t?o:(o.unshift(i),s(n._getParentSkopeId(r),o))};return i.map(s(o),function(e){return n.buildSkopeLink(e)}).join(" "+serverControlParams.i18n.skope.and+" ")},getInheritedSkopeId:function(t,n){if(!e.has(e.CZR_Helpers.build_setId(t)))return e.errorLog("getInheritedSkopeId : the requested setting id does not exist in the api : "+e.CZR_Helpers.build_setId(t)),n;if(!e.czr_skope.has(n))return e.errorLog("getInheritedSkopeId : the requested skope id is not registered : "+n),n;var o=e.CZR_Helpers.build_setId(t),s=e.czr_skope(n)();return i.has(e.settings.settings,o)?e.settings.settings[o].value:null,e.czr_skope(n).getSkopeSettingAPIDirtyness(o)?n:e.czr_isChangeSetOn()&&e.czr_skope(n).getSkopeSettingChangesetDirtyness(o)?n:"_no_db_val"!=this._getDBSettingVal(t,n)?n:"global"==s.skope?n:this.getInheritedSkopeId(t,this._getParentSkopeId(s))},getInheritedSkopeTitles:function(t,n){if(t=t||e.czr_activeSkopeId(),!e.czr_skope.has(t))return e.errorLog("getInheritedSkopeTitles : the requested skope id is not registered : "+t),"";n=n||[];var o=this,s=e.czr_skope(t)();return t!==e.czr_activeSkopeId()&&n.unshift(t),"global"!==s.skope?o.getInheritedSkopeTitles(o._getParentSkopeId(s),n):i.map(n,function(e){return o.buildSkopeLink(e)}).join(" "+serverControlParams.i18n.skope.and+" ")},buildSkopeLink:function(t){return e.czr_skope.has(t)?['<span class="czr-skope-switch" title=" '+[serverControlParams.i18n.skope["Switch to scope"],e.czr_skope(t)().title].join(" : ")+'" data-skope-id="'+t+'">',e.czr_skope(t)().title,"</span>"].join(""):(e.errorLog("buildSkopeLink : the requested skope id is not registered : "+t),"")},getSkopeSettingVal:function(t,n){if(!e.has(e.CZR_Helpers.build_setId(t)))return e.errorLog("getSkopeSettingVal : the requested setting id does not exist in the api : "+e.CZR_Helpers.build_setId(t)),null;if(!e.czr_skope.has(n))return e.errorLog("getSkopeSettingVal : the requested skope id is not registered : "+n),null;var o,s=e.CZR_Helpers.build_setId(t),r=e.czr_skope(n)();if(o=i.has(e.settings.settings,s)?e.settings.settings[s].value:null,e.czr_skope(n).getSkopeSettingAPIDirtyness(s))return e.czr_skope(n).dirtyValues()[s];if(e.czr_isChangeSetOn()&&e.czr_skope(n).getSkopeSettingChangesetDirtyness(s))return e.czr_skope(n).changesetValues()[s];var a=this._getDBSettingVal(t,n);return"_no_db_val"!=a?a:"global"==r.skope?o:this.getSkopeSettingVal(t,this._getParentSkopeId(r))},applyDirtyCustomizedInheritance:function(t,n){n=n||e.czr_activeSkopeId()||e.czr_skopeBase.getGlobalSkopeId(),t=t||{};var o=e.czr_skope(n)();if("global"==o.skope)return t;var s=this._getParentSkopeId(o),r=e.czr_skope(s).dirtyValues();return i.each(r,function(n,s){var r=e.CZR_Helpers.getOptionName(s);i.isUndefined(t[s])&&i.isUndefined(e.czr_skope(o.id).dbValues()[r])&&(t[s]=n)}),"global"==e.czr_skope(s)().skope?t:this.applyDirtyCustomizedInheritance(t,s)},_getParentSkopeId:function(t,n){var o=["local","group","special_group","global"],s=n||1*(i.findIndex(o,function(e){return t.skope==e})+1),r=o[s];return i.isUndefined(r)?i.findWhere(e.czr_currentSkopesCollection(),{skope:"global"}).id:i.isUndefined(i.findWhere(e.czr_currentSkopesCollection(),{skope:r}))?this._getParentSkopeId(t,s+1):i.findWhere(e.czr_currentSkopesCollection(),{skope:r}).id},_getChildSkopeId:function(t,n){var o=["local","group","special_group","global"],s=n||1*(i.findIndex(o,function(e){return t.skope==e})-1),r=o[s];return i.isUndefined(r)?i.findWhere(e.czr_currentSkopesCollection(),{skope:"local"}).id:i.isUndefined(i.findWhere(e.czr_currentSkopesCollection(),{skope:r}))?this._getParentSkopeId(t,s-1):i.findWhere(e.czr_currentSkopesCollection(),{skope:r}).id}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{updateSkopeCollection:function(n,o){var s=this;if(_api_ready_collection=[],i.each(n,function(e,i){var n=t.extend(!0,{},e);_api_ready_collection.push(s.prepareSkopeForAPI(n))}),s.isGlobalSkopeRegistered()){var r=[],a=t.extend(!0,{},e.czr_skope(s.getGlobalSkopeId())());i.each(_api_ready_collection,function(e,t){"global"==e.skope?r.push(a):r.push(e)}),_api_ready_collection=r}e.czr_currentSkopesCollection(_api_ready_collection)},prepareSkopeForAPI:function(e){if(!i.isObject(e))throw new Error("prepareSkopeForAPI : a skope must be an object to be API ready");var t={};if(i.each(serverControlParams.defaultSkopeModel,function(n,o){var s=e[o];switch(o){case"title":case"long_title":if(!i.isString(s))throw new Error("prepareSkopeForAPI : a skope title property must a string");t[o]=s;break;case"ctx_title":if(!i.isString(s))throw new Error("prepareSkopeForAPI : a skope context title property must a string");t[o]=s;break;case"skope":if(!i.isString(s)||i.isEmpty(s))throw new Error('prepareSkopeForAPI : a skope "skope" property must a string not empty');t[o]=s;break;case"level":if(!i.isString(s)||i.isEmpty(s))throw new Error("prepareSkopeForAPI : a skope level must a string not empty for skope "+s.skope);t[o]=s;break;case"dyn_type":if(!i.isString(s)||!i.contains(serverControlParams.skopeDynTypes,s))throw new Error("prepareSkopeForAPI : missing or invalid dyn type for skope "+e);t[o]=s;break;case"opt_name":if(!i.isString(s)||i.isEmpty(s))throw new Error('prepareSkopeForAPI : invalid "opt_name" property for skope '+s.skope);t[o]=s;break;case"obj_id":if(!i.isString(s))throw new Error('prepareSkopeForAPI : invalid "obj_id" for skope '+s.skope);t[o]=s;break;case"is_winner":if(!i.isUndefined(s)&&!i.isBoolean(s))throw new Error('prepareSkopeForAPI : skope property "is_winner" must be a boolean');t[o]=s;break;case"is_forced":if(!i.isUndefined(s)&&!i.isBoolean(s))throw new Error('prepareSkopeForAPI : skope property "is_primary" must be a boolean');t[o]=s;break;case"db":if((i.isArray(s)||i.isEmpty(s))&&(s={}),i.isUndefined(s)||!i.isObject(s))throw new Error('prepareSkopeForAPI : skope property "db" must be an object');t[o]=s;break;case"changeset":if((i.isArray(s)||i.isEmpty(s))&&(s={}),i.isUndefined(s)||!i.isObject(s))throw new Error('prepareSkopeForAPI : skope property "changeset" must be an object');t[o]=s;break;case"has_db_val":if(!i.isUndefined(s)&&!i.isBoolean(s))throw new Error('prepareSkopeForAPI : skope property "has_db_val" must be a boolean');t[o]=s}}),t.color=this.skope_colors[t.skope]||"rgb(255, 255, 255)",t.id=t.skope+"_"+t.level,!i.isString(t.id)||i.isEmpty(t.id))throw new Error("prepareSkopeForAPI : a skope id must a string not empty");return i.isString(t.title)&&!i.isEmpty(t.title)||(t.title=id,t.long_title=id),t},currentSkopesCollectionReact:function(n,o){var s=t.extend(!0,[],n)||[],r=(t.extend(!0,[],o),t.Deferred()),a=[];_to_remove=[],_to_update=[],_instantiateAndEmbed=function(n){i.each(n,function(i){i=t.extend(!0,{},i),e.czr_skope.add(i.id,new e.CZR_skope(i.id,i))}),i.each(n,function(t){if(!e.czr_skope.has(t.id))throw new Error("Skope id : "+t.id+" has not been instantiated.");"pending"==e.czr_skope(t.id).isReady.state()&&e.czr_skope(t.id).ready()})},i.each(s,function(t){e.czr_skope.has(t.id)||a.push(t)});try{_instantiateAndEmbed(a)}catch(t){return e.errorLog("currentSkopesCollectionReact : "+t),r.resolve().promise()}var l=function(){var n=i.size(s);e.czr_skope.each(function(e){if(i.isUndefined(i.findWhere(s,{id:e().id})))e.visible(!1),e.isReady.then(function(){e.container.toggleClass("active-collection",!1)});else{e.visible(!0);var o=function(){var o,s;s=(o=e).container.attr("class").split(" "),i.each(o.container.attr("class").split(" "),function(e){"width-"==e.substring(0,6)&&(s=i.without(s,e))}),t.when(o.container.attr("class",s.join(" "))).done(function(){o.container.addClass("width-"+Math.round(100/n))}),e.container.toggleClass("active-collection",!0)};"pending"==e.isReady.state()?e.isReady.then(function(){o()}):o()}})};return this.skopeWrapperEmbedded.then(function(){l()}),i.isEmpty(o)&&!i.isEmpty(n)&&e.czr_initialSkopeCollectionPopulated.resolve(),this.maybeSynchronizeGlobalSkope(),r.resolve("changed").promise()},maybeSynchronizeGlobalSkope:function(n){if(n=n||{},!i.isObject(n))throw new Error("maybeSynchronizeGlobalSkope : args must be an object");var o,s,r,a=this,l=t.Deferred();i.extend({isGlobalReset:!1,isSetting:!1,settingIdToReset:"",isSkope:!1,skopeIdToReset:""},n);if(a.isGlobalSkopeRegistered()){var c=e.czr_skope(a.getGlobalSkopeId()).dbValues();if(i.each(c,function(t,n){e.has(n)&&!i.isEqual(e.settings.settings[n].value,t)&&(e.settings.settings[n].value=t)}),n.isGlobalReset&&n.isSetting){if(o=n.settingIdToReset,s=e.CZR_Helpers.getOptionName(o),r=serverControlParams.defaultOptionsValues[s],i.isUndefined(e.settings.settings[o])||i.isUndefined(r))return;r!=e.settings.settings[o].value&&(e.settings.settings[o].value=r)}n.isGlobalReset&&n.isSkope&&i.each(e.settings.settings,function(t,n){a.isThemeSetting(n)&&(s=e.CZR_Helpers.getOptionName(n),i.has(serverControlParams.defaultOptionsValues,s)&&(e.settings.settings[n].value=serverControlParams.defaultOptionsValues[s]))})}return l.resolve().promise()}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{activeSkopeReact:function(n,o){var s=this,r=t.Deferred();if(!i.isUndefined(o)&&e.czr_skope.has(o))e.czr_skope(o).active(!1);else if(!i.isUndefined(o))throw new Error("listenToActiveSkope : previous scope does not exist in the collection",o);if(i.isUndefined(n)||!e.czr_skope.has(n))throw new Error("listenToActiveSkope : requested scope "+n+" does not exist in the collection");e.czr_skope(n).active(!0);var a=function(t){return e.czr_activeSkopeId(s.getGlobalSkopeId()),i.isUndefined(e.notifications)?e.czr_serverNotification({status:"success",message:[t,"is always customized sitewide."].join(" ")}):(e.notifications.add(new wp.customize.Notification(t,{type:"info",message:[t,"is always customized sitewide."].join(" "),dismissible:!0})),i.delay(function(){if(e.notifications.has(t)){var i=e.notifications(t);i.parent?i.parent.remove(i.code):i.container.remove()}},5e3)),r.resolve().promise()};if(s.isExcludedSidebarsWidgets()&&"widgets"==e.czr_activePanelId()&&n!=s.getGlobalSkopeId()&&(i.isUndefined(e.notifications)?e.czr_serverNotification({status:"success",message:[serverControlParams.i18n.skope["Widgets are created sitewide."]].join(" ")}):(e.notifications.add(new wp.customize.Notification("widgets_are_sidewide",{type:"info",message:serverControlParams.i18n.skope["Widgets are created sitewide."],dismissible:!0})),i.delay(function(){if(e.notifications.has("widgets_are_sidewide")){var t=e.notifications("widgets_are_sidewide");t.parent?t.parent.remove(t.code):t.container.remove()}},5e3))),s.isExcludedWPCustomCss()&&"custom_css"==e.czr_activeSectionId()&&n!=s.getGlobalSkopeId())return a(e.section(e.czr_activeSectionId()).params.title);if("admin_sec"==e.czr_activeSectionId()&&n!=s.getGlobalSkopeId())return a(e.section(e.czr_activeSectionId()).params.title);if("tc_font_customizer_settings"==e.czr_activeSectionId()&&n!=s.getGlobalSkopeId())return a(e.section(e.czr_activeSectionId()).params.title);if("nav_menu"!=e.czr_activeSectionId().substring(0,"nav_menu".length)&&"add_menu"!=e.czr_activeSectionId()||n==s.getGlobalSkopeId()||e.czr_serverNotification({status:"success",message:[serverControlParams.i18n.skope["Menus are created sitewide."]].join(" ")}),"nav_menus"==e.czr_activePanelId()&&i.each(e.panel(e.czr_activePanelId()).sections(),function(e){s.processSilentUpdates({section_id:e.id,awake_if_not_active:!0})}),e.state("switching-skope")(!0),s._writeCurrentSkopeTitle(n),e.trigger("czr-paint",{is_skope_switch:!0}),i.isUndefined(e.czr_activeSectionId()))return e.state("switching-skope")(!1),e.previewer.refresh(),r.resolve().promise();i.has(e,"czrModulePanelState")&&e.czrModulePanelState(!1);var l=s._getSilentUpdateCandidates();i.isUndefined(o)||i.each(e.czr_skope(o).dirtyValues(),function(e,t){i.contains(l,t)||l.push(t)}),i.isUndefined(n)||i.each(e.czr_skope(n).dirtyValues(),function(e,t){i.contains(l,t)||l.push(t)});var c=function(){s.processSilentUpdates({candidates:l,section_id:null,refresh:!1}).fail(function(){throw r.reject(),e.state("switching-skope")(!1),new Error("Fail to process silent updates in _debouncedProcessSilentUpdates")}).done(function(t){e.previewer.refresh().always(function(){r.resolve(t),e.state("switching-skope")(!1)})})};return i.has(e,"czr_isModuleExpanded")&&!1!==e.czr_isModuleExpanded()?(e.czr_isModuleExpanded().setupModuleViewStateListeners(!1),(c=i.debounce(c,400))()):c(),r.promise()},_writeCurrentSkopeTitle:function(n){var o=this,s=e.czr_skope(n||e.czr_activeSkopeId())().long_title,r=function(){var r=o.getInheritedSkopeTitles(),a=o.getOverridenSkopeTitles();return t.trim(['<span class="czr-main-title"><span class="czr-toggle-title-notice fas fa-info-circle"></span>',"global"==e.czr_skope(n||e.czr_activeSkopeId())().skope?s:["Customizing",s].join(" "),"</span>",'<span class="czr-skope-inherits-from">',serverControlParams.i18n.skope["In this context :"],i.isEmpty(r)?" ":serverControlParams.i18n.skope["inherits from"],r,i.isEmpty(r)?"":i.isEmpty(a)?".":[",",serverControlParams.i18n.skope.and].join(" "),i.isEmpty(a)?" ":serverControlParams.i18n.skope["overridden by"],a,i.isEmpty(a)?"":".","</span>"].join(" "))},a=function(e){e?t(".czr-scope-switcher").find(".spinner").fadeIn():t(".czr-scope-switcher").find(".spinner").fadeOut()};o.skopeWrapperEmbedded.then(function(){t(".czr-scope-switcher").find(".czr-current-skope-title").length?t.when(t(".czr-scope-switcher").find(".czr-skope-title").fadeOut(200)).done(function(){t(this).html(r()).fadeIn(200)}):t(".czr-scope-switcher").prepend(t("<h2/>",{class:"czr-current-skope-title",html:['<span class="czr-skope-title">','<span class="spinner">',r(),"</span>","</span>"].join("")})),i.isUndefined(e.state("switching-skope").isBound)&&(e.state("switching-skope").bind(a),e.state("switching-skope").isBound=!0)})}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{processSilentUpdates:function(n){n=i.isString(n)?{candidates:[n]}:n||{};var o=this,s={candidates:[],section_id:e.czr_activeSectionId(),refresh:!0,awake_if_not_active:!1},r=t.Deferred();if(n=t.extend(s,n),i.isString(n.candidates)&&(n.candidates=[n.candidates]),i.isEmpty(n.candidates)&&(n.candidates=o._getSilentUpdateCandidates(n.section_id,n.awake_if_not_active)),!i.isArray(n.candidates))throw new Error("processSilentUpdates : the update candidates must be an array.");if(i.isEmpty(n.candidates))return r.resolve([]).promise();var a=function(){o.silentlyUpdateSettings(n.candidates,n.refresh).fail(function(){r.reject()}).done(function(e){i.delay(function(){o.setupActiveSkopedControls({section_id:n.section_id})},1e3),r.resolve(e)})};return"resolved"!=e.czr_skopeReady.state()?(r.resolve([]),e.czr_skopeReady.done(function(){a()})):a(),r.promise()},silentlyUpdateSettings:function(n,o){e.state.has("silent-update-processing")||e.state.create("silent-update-processing")(!1),e.state("silent-update-processing")(!0);var s=this,r={},a=t.Deferred();o=!!i.isUndefined(o)||o,(i.isUndefined(n)||i.isEmpty(n))&&(n=s._getSilentUpdateCandidates()),i.isString(n)&&(n=[n]),i.each(n,function(t){e.control.has(t)&&"czr_multi_module"==e.control(t).params.type||(r[t]=s.getSettingUpdatePromise(t))});var l=[],c=[];return i.each(r,function(t,n){t.done(function(t){var o=e.CZR_Helpers.build_setId(n),s=e.czr_skope(e.czr_activeSkopeId()).getSkopeSettingDirtyness(n);i.isEqual(e(o)(),t)||c.push(n),e(o).silent_set(t,s)}),l.push(t)}),t.when.apply(null,l).fail(function(){throw a.reject(),new Error("silentlyUpdateSettings FAILED. Candidates : "+n)}).always(function(){e.state("silent-update-processing")(!1)}).then(function(){i.each(l,function(e){if(i.isObject(e)&&"resolved"!==e.state())throw new Error("a silent update promise is unresolved : "+n)}),o&&!i.isEmpty(c)?e.previewer.refresh().always(function(){a.resolve(c)}):a.resolve(c)}),a.promise()},getSettingUpdatePromise:function(n){if(i.isUndefined(n))throw new Error("getSettingUpdatePromise : the provided setId is not defined");if(!e.has(e.CZR_Helpers.build_setId(n)))throw new Error("getSettingUpdatePromise : the provided wpSetId is not registered : "+e.CZR_Helpers.build_setId(n));var o=e.CZR_Helpers.build_setId(n),s=e(o)(),r=t.Deferred(),a=!1,l=e.czr_activeSkopeId(),c=e.czr_skopeBase.getSkopeSettingVal(n,l);if(i.isEqual(s,c))return r.resolve(c).promise();if(e.control.has(o)){var d=e.control(o).params.type,u=e.settings.controls[o];switch(d){case"czr_cropped_image":a=this._getCzrCroppedImagePromise(o,u);break;case"czr_module":this._processCzrModuleSilentActions(o,d,l,u)}}return i.has(e.settings.controls,"header_image")&&"header_image"==o&&(a=this._getHeaderImagePromise(o,l)),a&&i.isObject(a)?a.always(function(){r.resolve(c)}):r.resolve(c),r.promise()},_getSilentUpdateCandidates:function(t,n){var o=this,s=[];if(t=i.isUndefined(t)||i.isNull(t)?e.czr_activeSectionId():t,i.isEmpty(e.czr_activeSectionId())&&!n)return[];if(i.isUndefined(t))return e.consoleLog("_getSilentUpdateCandidates : No active section provided"),[];if(!e.section.has(t))throw new Error("_getSilentUpdateCandidates : The section "+t+" is not registered in the API.");var r=e.CZR_Helpers.getSectionSettingIds(t);return r=i.filter(r,function(e){return o.isSettingSkopeEligible(e)}),i.each(r,function(e){s.push(e)}),s}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{_processCzrModuleSilentActions:function(n,o,s,r){var a,l,c,d,u,p=i.has(e.control(n).params,"syncCollection")?e.control(n).params.syncCollection:"",h=e.CZR_Helpers.build_setId(n),f=e.czr_skopeBase.getSkopeSettingVal(h,s),m=e.czr_skope(e.czr_activeSkopeId());i.isEmpty(p)||i.isUndefined(p)||(a=e.CZR_Helpers.build_setId(p),l=e.czr_skopeBase.getSkopeSettingVal(a,s),c=e.settings.controls[a],d=e.controlConstructor.czr_multi_module,u=e.control(a).syncSektionModule()().id,e.control(a).container.remove(),e.control.remove(a),e(a).silent_set(l,m.getSkopeSettingDirtyness(a)),t.extend(c,{czr_skope:s}),e.control.add(a,new d(a,{params:c,previewer:e.previewer}))),_constructor=e.controlConstructor[o],e.control(n).container.remove(),e.control.remove(n),e(n).silent_set(f,m.getSkopeSettingDirtyness(h)),t.extend(r,{czr_skope:s}),e.control.add(n,new _constructor(n,{params:r,previewer:e.previewer})),i.isEmpty(p)||i.isUndefined(p)||(e.consoleLog("FIRE SEKTION MODULE?",u,e.control(n).czr_Module(u).isReady.state()),e.control(n).czr_Module(u).fireSektionModule())},_getCzrCroppedImagePromise:function(n,o){var s=e.controlConstructor.czr_cropped_image,r=t.Deferred(),a=e.has(n)?e(n)():null;return a=null===a?"":a,wp.media.attachment(a).fetch().done(function(){e.control(n).container.remove(),e.control.remove(n),o.attachment=this.attributes,e.control.add(n,new s(n,{params:o,previewer:e.previewer})),r.resolve()}).fail(function(){e.control(n).container.remove(),e.control.remove(n),o=i.omit(o,"attachment"),e.control.add(n,new s(n,{params:o,previewer:e.previewer})),r.reject()}),r.promise()},_getHeaderImagePromise:function(n,o){var s=t.Deferred();if(!i.has(e.settings.controls,"header_image")||"header_image"!=n)return s.resolve().promise();var r,a=e.controlConstructor.header,l=t.extend(!0,{},e.settings.controls.header_image);header_image_data=null===e.czr_skopeBase.getSkopeSettingVal("header_image_data",o)?"":e.czr_skopeBase.getSkopeSettingVal("header_image_data",o);var c=function(t){t=t||l,e.control("header_image").container.remove(),e.control.remove("header_image"),e.HeaderTool.UploadsList=e.czr_HeaderTool.UploadsList,e.HeaderTool.DefaultsList=e.czr_HeaderTool.DefaultsList,e.HeaderTool.CombinedList=e.czr_HeaderTool.CombinedList;var n=function(){e.control.add("header_image",new a("header_image",{params:t,previewer:e.previewer}))};(n=i.debounce(n,800))()};return i.has(header_image_data,"attachment_id")?(r=header_image_data.attachment_id,wp.media.attachment(r).fetch().done(function(){l.attachment=this.attributes,c(l),s.resolve()}).fail(function(){l=i.omit(l,"attachment"),e.control("header_image").container.remove(),e.control.remove("header_image"),e.HeaderTool.UploadsList=e.czr_HeaderTool.UploadsList,e.HeaderTool.DefaultsList=e.czr_HeaderTool.DefaultsList,e.HeaderTool.CombinedList=e.czr_HeaderTool.CombinedList,e.control.add("header_image",new a("header_image",{params:l,previewer:e.previewer})),s.reject()})):(c(),s.resolve()),s.promise()}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{setupActiveSkopedControls:function(n){var o,s,r,a,l=this,c=t.Deferred();if(defaultSetupParams={controls:[],section_id:e.czr_activeSectionId()},r=t.extend(defaultSetupParams,n),!i.isObject(r)||!i.has(r,"controls")||!i.has(r,"section_id"))throw new Error("setupActiveSkopedControls : the setupParams param must be an object with properties controls and section_id.");return o=r.section_id,s=r.controls,[],!i.isEmpty(o)&&i.isString(o)||(o=e.czr_activeSectionId()),i.isEmpty(s)&&(s=e.CZR_Helpers.getSectionControlIds(o)),s=i.isString(s)?[s]:s,a=i.filter(s,function(t){var i=e.CZR_Helpers.getControlSettingId(t);return i&&!l.isSettingSkopeEligible(i)&&e.control(t).container.addClass("czr-not-skoped"),i&&l.isWPAuthorizedSetting(i)&&e.control(t).container.addClass("is-wp-authorized-setting"),i&&l.isSettingSkopeEligible(i)}),"nav_menu["==o.substring(0,"nav_menu[".length)?c.resolve().promise():(i.isEmpty(s)||(e.czr_skopeReady.then(function(){t.when(l.renderControlsSingleReset(a)).done(function(){i.each(s,function(e){l.listenSkopedControl(e)}),c.resolve()})}),"rejected"==e.czr_skopeReady.state()&&c.resolve()),l.renderCtrlSkpNotIcon(s),c.promise())},listenSkopedControl:function(n){var o=this;if(e.has(n)&&!i.isUndefined(e.control(n))){var s=e.control(n),r=e.CZR_Helpers.getControlSettingId(n);e.CZR_Helpers.getOptionName(r);if(!i.has(s,"czr_states")){s.czr_states=new e.Values,i.each({hasDBVal:!1,isDirty:!1,noticeVisible:!1,resetVisible:!1,isResetting:!1},function(e,t){s.czr_states.create(t),s.czr_states(t)(e)});try{o.bindControlStates(s)}catch(t){e.errorLog("bindControlStates : "+t)}}s.czr_states("hasDBVal")(e.czr_skope(e.czr_activeSkopeId()).hasSkopeSettingDBValues(r)),s.czr_states("isDirty")(e.czr_skope(e.czr_activeSkopeId()).getSkopeSettingDirtyness(r)),i.has(s,"userEventMap")||(s.userEventMap=[{trigger:"click keydown",selector:".czr-setting-reset, .czr-cancel-button",name:"control_reset_warning",actions:function(){(s.czr_states("isDirty")()||s.czr_states("hasDBVal")())&&(i.each(i.without(e.CZR_Helpers.getSectionControlIds(s.section()),n),function(t){i.has(e.control(t),"czr_states")&&e.control(t).czr_states("resetVisible")(!1)}),s.czr_states("resetVisible")(!s.czr_states("resetVisible")()),s.czr_states("noticeVisible")(!s.czr_states("resetVisible")()))}},{trigger:"click keydown",selector:".czr-control-do-reset",name:"control_do_reset",actions:function(){o.doResetSetting(n)}},{trigger:"click keydown",selector:".czr-skope-switch",name:"control_skope_switch",actions:function(n){var o=t(n.dom_event.currentTarget,n.dom_el).attr("data-skope-id");!i.isEmpty(o)&&e.czr_skope.has(o)&&e.czr_activeSkopeId(o)}},{trigger:"click keydown",selector:".czr-toggle-notice",name:"control_toggle_notice",actions:function(e){s.czr_states("noticeVisible")(!s.czr_states("noticeVisible")()),s.czr_states("noticeVisible")()&&s.czr_states("resetVisible")(!1)}}],e.CZR_Helpers.setupDOMListeners(s.userEventMap,{dom_el:s.container},o))}},bindControlStates:function(n){if(!e.control.has(n.id))throw new Error("in bindControlStates, the provided ctrl id is not registered in the api : "+n.id);var o=this;e.CZR_Helpers.getControlSettingId(n.id);n.czr_states("hasDBVal").bind(function(e){n.container.toggleClass("has-db-val",e),e?_title=serverControlParams.i18n.skope["Reset your customized ( and published ) value"]:n.czr_states("isDirty")()?_title=serverControlParams.i18n.skope["Reset your customized ( but not yet published ) value"]:_title=serverControlParams.i18n.skope["Not customized yet, nothing to reset"],n.container.find(".czr-setting-reset").attr("title",_title)}),n.czr_states("isDirty").bind(function(e){var t;n.container.toggleClass("is-dirty",e),t=e?serverControlParams.i18n.skope["Reset your customized ( but not yet published ) value"]:n.czr_states("hasDBVal")()?serverControlParams.i18n.skope["Reset your customized ( and published ) value"]:serverControlParams.i18n.skope["Not customized yet, nothing to reset"],n.container.find(".czr-setting-reset").attr("title",t)}),n.czr_states("noticeVisible").bind(function(e){n.container.toggleClass("czr-notice-visible",e);var i=n.getNotificationsContainerElement();!1!==i&&!1!==i.length&&(e?(o.updateCtrlSkpNot(n.id,!0),i.stop().slideDown("fast",null,function(){t(this).css("height","auto")})):t.when(i.stop().slideUp("fast",null,function(){t(this).css("height","auto")})).done(function(){o.removeCtrlSkpNot(n.id)}))}),n.czr_states("resetVisible").bind(function(s){n.section()||e.czr_activeSectionId();s?t.when(o.renderControlResetWarningTmpl(n.id)).done(function(e){i.isEmpty(e)||(n.czr_resetDialogContainer=e.container,e.container.slideToggle("fast"),e.is_authorized||i.delay(function(){t.when(n.czr_resetDialogContainer.slideToggle("fast")).done(function(){n.czr_resetDialogContainer.remove()})},3e3))}):i.has(n,"czr_resetDialogContainer")&&n.czr_resetDialogContainer.length&&t.when(n.czr_resetDialogContainer.slideToggle("fast")).done(function(){n.czr_resetDialogContainer.remove()})})}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{renderControlsSingleReset:function(n){var o=this,s=t.Deferred();(i.isUndefined(n)||i.isEmpty(n))&&(n=e.CZR_Helpers.getSectionControlIds(e.czr_activeSectionId()),n=i.filter(n,function(t){var i=e.CZR_Helpers.getControlSettingId(t);return i&&o.isSettingSkopeEligible(i)}));var r=i.isArray(n)?n:[n],a=function(n){i.isEmpty(n)?s.resolve():i.each(n,function(i){e.control.when(i,function(){var n=e.control(i);e.CZR_Helpers.getControlSettingId(i);t(".czr-setting-reset",n.container).length?s.resolve():n.deferred.embedded.then(function(){t.when(n.container.find(".customize-control-title").first().prepend(t("<span/>",{class:"czr-setting-reset fas fa-sync",title:""}))).done(function(){n.container.addClass("czr-skoped"),t(".czr-setting-reset",n.container).fadeIn(400),s.resolve()})})})})};return(a=i.debounce(a,200))(r),s.promise()},renderControlResetWarningTmpl:function(n){if(!e.control.has(n))return{};var o,s,r=e.control(n),a=e.CZR_Helpers.getControlSettingId(n),l="",c=!!i.contains(serverControlParams.wpBuiltinSettings,e.CZR_Helpers.getOptionName(a))||!i.contains(serverControlParams.themeSettingList,e.CZR_Helpers.getOptionName(a)),d=e.czr_skope(e.czr_activeSkopeId())();r.czr_states("isDirty")()?(o=["global"==d.skope?serverControlParams.i18n.skope["Please confirm that you want to reset your current customizations for this option"]:serverControlParams.i18n.skope["Please confirm that you want to reset your current customizations for this option in"],"global"==d.skope?serverControlParams.i18n.skope.sitewide:d.ctx_title].join(" "),s=serverControlParams.i18n.skope["Your customizations have been reset"]):c&&"global"==d.skope?o=serverControlParams.i18n.skope["This WordPress setting can not be reset sitewide"]:(o=["global"==d.skope?serverControlParams.i18n.skope["Please confirm that you want to reset this option"]:serverControlParams.i18n.skope["Please confirm that you want to reset this option in"],"global"==d.skope?serverControlParams.i18n.skope.sitewide:d.ctx_title].join(" "),s=serverControlParams.i18n.skope["The option has been reset"]);var u=!(c&&"global"==e.czr_skope(e.czr_activeSkopeId())().skope&&!r.czr_states("isDirty")()),p={warning_message:o+".",success_message:s+".",is_authorized:u};try{l=wp.template("czr-reset-control")(p)}catch(t){return e.errorLog("Error when parsing the the reset control template : "+t),{container:!1,is_authorized:!1}}return t(".customize-control-title",r.container).first().after(t(l)),{container:t(".czr-ctrl-reset-warning",r.container),is_authorized:u}},doResetSetting:function(n){var o=this,s=e.CZR_Helpers.getControlSettingId(n),r=e.control(n),a=e.czr_activeSkopeId(),l=r.czr_states("isDirty")()?"_resetControlDirtyness":"_resetControlAPIVal",c=function(){this.czr_states("resetVisible")(!1),this.czr_states("isResetting")(!1),this.container.removeClass("czr-resetting-control")};r.czr_states("isResetting")(!0),r.container.addClass("czr-resetting-control"),e.czr_skopeReset[r.czr_states("isDirty")()?"resetChangeset":"resetPublished"]({skope_id:a,setId:s,is_setting:!0}).done(function(r){var d,u;d=n,u=function(){e.czr_skopeBase.processSilentUpdates({candidates:d,refresh:!1}).fail(function(){e.consoleLog("Silent update failed after resetting control : "+d)}).done(function(){e.control.when(d,function(){var n=e.control(d);t.when(t(".czr-crtl-reset-dialog",n.container).fadeOut("300")).done(function(){t.when(t(".czr-reset-success",n.container).fadeIn("300")).done(function(e){i.delay(function(){t.when(e.fadeOut("300")).done(function(){o.setupActiveSkopedControls({controls:[d]}).done(function(){n.czr_states&&(c.call(n),n.czr_states("noticeVisible")(o.isCtrlNoticeVisible(d)))})})},500)})})})})},o[l](d).done(function(){e.consoleLog("REFRESH AFTER A SETTING RESET"),e.previewer.refresh().fail(function(t){e.errorLog("Setting reset refresh failed.",t)}).done(function(t){if("global"==e.czr_skope(a)().skope&&"_resetControlAPIVal"==l){var n,o=e.czr_skope(a)().opt_name;!i.isUndefined(t.skopesServerData)&&i.has(t.skopesServerData,"czr_skopes")&&(n=t.skopesServerData.czr_skopes,i.isUndefined(i.findWhere(n,{opt_name:o}))&&i.findWhere(n,{opt_name:o}).db),e.czr_skopeBase.maybeSynchronizeGlobalSkope({isGlobalReset:!0,isSetting:!0,settingIdToReset:s}).done(function(){u()})}else u()})})}).fail(function(s){e.errorLog("Reset failed",s),t.when(t(".czr-crtl-reset-dialog",r.container).fadeOut("300")).done(function(){t.when(t(".czr-reset-fail",r.container).fadeIn("300")).done(function(){t(".czr-reset-fail",r.container).append("<p>"+s+"</p>"),i.delay(function(){c.call(r),o.setupActiveSkopedControls({controls:[n]})},2e3)})})})},_resetControlDirtyness:function(n){var o,s=e.CZR_Helpers.getControlSettingId(n),r=e.czr_skope(e.czr_activeSkopeId()),a=t.extend(!0,{},r.dirtyValues()),l=t.extend(!0,{},r.changesetValues()),c=t.Deferred();return o=i.omit(a,s),i.omit(l,s),r.dirtyValues(o),r.changesetValues(o),c.resolve().promise()},_resetControlAPIVal:function(n){var o=e.CZR_Helpers.getControlSettingId(n),s=e.czr_skope(e.czr_activeSkopeId()).dbValues(),r=t.extend(!0,{},s),a=t.Deferred();return i.has(e.control(n),"czr_states")&&(e.control(n).czr_states("hasDBVal")(!1),e.czr_skope(e.czr_activeSkopeId()).dbValues(i.omit(r,o))),a.resolve().promise()}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{renderCtrlSkpNotIcon:function(n){var o=i.isArray(n)?n:[n];i.each(o,function(i){e.control.when(i,function(){var n=e.control(i);n.deferred.embedded.then(function(){t(".czr-toggle-notice",n.container).length||t.when(n.container.find(".customize-control-title").first().append(t("<span/>",{class:"czr-toggle-notice fas fa-info-circle",title:serverControlParams.i18n.skope["Display informations about the scope of this option."]}))).done(function(){t(".czr-toggle-notice",n.container).fadeIn(400)})})})})},updateCtrlSkpNot:function(n,o){var s=this,r=i.isArray(n)?n:[n],a=function(t,n){var o,r,a,l,c=e.czr_activeSkopeId(),d=s.getInheritedSkopeId(t,c),u=s.getAppliedPrioritySkopeId(t,c),p=[];return(l=t)&&s.isSettingSkopeEligible(l)?(d==u&&e.czr_skope.has(d)&&c==d&&(o=!i.isUndefined(e.czr_skope(c).dirtyValues()[t]),r=!i.isUndefined(e.czr_skope(c).dbValues()[t]),a=e.czr_skope(d)().ctx_title,a=(i.isString(a)?a:"").toLowerCase(),o?"global"==e.czr_skope(d)().skope?p.push([serverControlParams.i18n.skope["Customized. Will be applied sitewide once published."]].join(" ")):p.push([serverControlParams.i18n.skope["Customized. Will be applied to"],"<strong>"+a+"</strong>",serverControlParams.i18n.skope["once published."]].join(" ")):r?"global"==e.czr_skope(d)().skope?p.push([serverControlParams.i18n.skope["Customized and applied sitewide."]].join(" ")):p.push([serverControlParams.i18n.skope["Customized and applied to"],"<strong>"+a+".</strong>"].join(" ")):p.push(serverControlParams.i18n.skope["Default website value applied sitewide."])),d!==c&&e.czr_skope.has(d)&&(o=!i.isUndefined(e.czr_skope(d).dirtyValues()[t]),r=!i.isUndefined(e.czr_skope(d).dbValues()[t]),a=e.czr_skope(c)().ctx_title,a=(i.isString(a)?a:"").toLowerCase(),o||r?p.push([serverControlParams.i18n.skope["Currently inherited from"],s.buildSkopeLink(d)+".",serverControlParams.i18n.skope["You can customize this specifically for"],"<strong>"+a+".</strong>"].join(" ")):p.push([serverControlParams.i18n.skope["Default website value."],serverControlParams.i18n.skope["You can customize this specifically for"],"<strong>"+a+".</strong>"].join(" "))),u!==c&&e.czr_skope.has(u)&&(o=!i.isUndefined(e.czr_skope(u).dirtyValues()[t]),a=e.czr_skope(n)().ctx_title,a=(i.isString(a)?a:"").toLowerCase(),p.push([o?serverControlParams.i18n.skope["The value that will be applied to"]:serverControlParams.i18n.skope["The value currently applied to"],"<strong>"+a+"</strong>",o?serverControlParams.i18n.skope["is customized in"]:serverControlParams.i18n.skope["is set in"],s.buildSkopeLink(u),serverControlParams.i18n.skope["which has a higher priority than the current option scope"],"<strong>( "+e.czr_skope(c)().title+" ).</strong>"].join(" "))),p.join(" | ")):(p.push([serverControlParams.i18n.skope["This option is always customized sitewide and cannot be reset."]].join(" ")),p.join(" | "))};i.each(r,function(n){e.control.when(n,function(){var s=e.control(n),r=e.CZR_Helpers.getControlSettingId(n);(i.isUndefined(o)?s.czr_states&&s.czr_states("noticeVisible")():o)&&s.deferred.embedded.then(function(){var n=i.findWhere(e.czr_currentSkopesCollection(),{skope:"local"}).id,o=s.getNotificationsContainerElement();if(o&&o.length&&!i.isUndefined(n)){try{_html=a(r,n)}catch(t){e.errorLog("_generateControlNotice : "+t)}var l=t(".czr-skope-notice",o);l.length?l.html(_html):o.append(['<span class="czr-notice czr-skope-notice">',_html,"</span>"].join(""))}})})})},isCtrlNoticeVisible:function(t){if(!e.control.has(t))return!1;var i=this,n=e.CZR_Helpers.getControlSettingId(t),o=e.czr_activeSkopeId(),s=i.getAppliedPrioritySkopeId(n,o);return"global"!=e.czr_skope(o)().skope||!(s===o||!e.czr_skope.has(s))},removeCtrlSkpNot:function(n){var o=i.isArray(n)?n:[n];i.each(o,function(i){e.control.when(i,function(){var n=e.control(i);n.deferred.embedded.then(function(){var e=n.getNotificationsContainerElement();if(e&&e.length){var i=t(".czr-skope-notice",e);i.length&&i.remove()}})})})}})}(wp.customize,jQuery,_);var CZRSkopeResetMths=CZRSkopeResetMths||{};!function(e,t,i){t.extend(CZRSkopeResetMths,{initialize:function(){this.previewer=e.previewer,e.state.create("czr-resetting")(!1),e.state("czr-resetting").bind(function(e){t(document.body).toggleClass("czr-resetting",!1!==e)})},resetChangeset:function(n){var o,s,r,a,l,c=t.Deferred(),d=this,u=e.state("processing"),p={is_setting:!1,is_skope:!1,skope_id:e.czr_activeSkopeId()||"",setId:""},h=(n=i.extend(p,n)).skope_id,f=n.setId;return e.czr_isChangeSetOn()?(s=function(o,s){if(i.isUndefined(o))throw new Error("RESET: MISSING skope_id");if(e.state("czr-resetting")(!0),a={skope_id:o,action:"reset"},l=t.extend(d.previewer.query(a),{nonce:d.previewer.nonce.save}),n.is_setting)t.extend(l,{setting_id:s}),r="czr_changeset_setting_reset";else{if(!n.is_skope)return c.reject("reset_ajax_action_not_specified").promise();r="czr_changeset_skope_reset"}wp.ajax.post(r,l).always(function(){e.state("czr-resetting")(!1)}).fail(function(t){"0"===t?t="not_logged_in":"-1"===t&&(t="invalid_nonce"),"invalid_nonce"===t?d.previewer.cheatin():"not_logged_in"===t&&(d.previewer.preview.iframe.hide(),d.previewer.login().done(function(){d.resetChangeset(n),d.previewer.preview.iframe.show()})),e.consoleLog(r+" failed ",l,t),t=e.czr_skopeBase.buildServerResponse(t),e.trigger("error",t),e.czr_serverNotification({message:t,status:"error"}),c.reject(t)}).done(function(e){c.resolve(e)})},0===u()&&!1===e.state("czr-resetting")()?s(h,f):(o=function(){0===u()&&!1===e.state("czr-resetting")()&&(e.state.unbind("change",o),s(h,f))},e.state.bind("change",o)),c.promise()):c.resolve().promise()},resetPublished:function(n){var o,s,r,a,l,c=t.Deferred(),d=this,u=e.state("processing"),p={is_setting:!1,is_skope:!1,skope_id:e.czr_activeSkopeId()||"",setId:""},h=(n=i.extend(p,n)).skope_id,f=n.setId;return s=function(o,s){if(i.isUndefined(o))throw new Error("RESET: MISSING skope_id");if(e.state("czr-resetting")(!0),a={skope_id:o,action:"reset"},l=t.extend(d.previewer.query(a),{nonce:d.previewer.nonce.save}),n.is_setting)t.extend(l,{setting_id:s}),r="czr_published_setting_reset";else{if(!n.is_skope)return c.reject("reset_ajax_action_not_specified").promise();r="czr_published_skope_reset"}e.consoleLog("in czr_reset submit : ",o,l),wp.ajax.post(r,l).always(function(){e.state("czr-resetting")(!1)}).fail(function(t){"0"===t?t="not_logged_in":"-1"===t&&(t="invalid_nonce"),"invalid_nonce"===t?d.previewer.cheatin():"not_logged_in"===t&&(d.previewer.preview.iframe.hide(),d.previewer.login().done(function(){d.resetChangeset(n),d.previewer.preview.iframe.show()})),e.consoleLog(r+" failed ",l,t),t=e.czr_skopeBase.buildServerResponse(t),e.trigger("error",t),e.czr_serverNotification({message:t,status:"error"}),c.reject(t)}).done(function(e){c.resolve(e)})},0===u()&&!1===e.state("czr-resetting")()?s(h,f):(o=function(){0===u()&&!1===e.state("czr-resetting")()&&(e.state.unbind("change",o),s(h,f))},e.state.bind("change",o)),c.promise()}})}(wp.customize,jQuery,_);CZRSkopeBaseMths=CZRSkopeBaseMths||{};!function(e,t,i){t.extend(CZRSkopeBaseMths,{initWidgetSidebarSpecifics:function(){var i=this;i.isExcludedSidebarsWidgets()||e.czr_activeSkopeId.bind(function(t){i.forceSidebarDirtyRefresh(e.czr_activeSectionId(),t)}),t(document).bind("widget-added",function(t,n){if(!i.isExcludedSidebarsWidgets()){var o=n.closest(".customize-control").attr("id"),s=e.czr_skopeBase.widgetIdToSettingId(o,"customize-control-");if(!e.has(s))throw new Error("AN ADDED WIDGET COULD NOT BE BOUND IN SKOPE. "+s);i.listenAPISettings(s)}})},forceSidebarDirtyRefresh:function(t,n){var o=this;if(!o.isExcludedSidebarsWidgets()){var s=e.state("saved")(),r=function(){if(e.section.has(t)&&"sidebar"==e.section(t).params.type){var i=i||e.czr_activeSkopeId(),n="sidebars_widgets["+e.section(t).params.sidebarId+"]",r=o.getSkopeSettingVal(n,i);e.czr_skope(i).updateSkopeDirties(n,r),e.previewer.refresh({the_dirties:e.czr_skope(i).dirtyValues()}).done(function(){e.state("saved")(s)})}};(r=i.debounce(r,500))()}}})}(wp.customize,jQuery,_);var CZRSkopeMths=CZRSkopeMths||{};!function(e,t,i){t.extend(CZRSkopeMths,{initialize:function(n,o){var s=this;e.Value.prototype.initialize.call(s,null,o),s.isReady=t.Deferred(),s.embedded=t.Deferred(),s.el="czr-scope-"+n,t.extend(s,o||{}),s.visible=new e.Value(!0),s.winner=new e.Value(!1),s.priority=new e.Value,s.active=new e.Value(!1),s.dirtyness=new e.Value(!1),s.skopeResetDialogVisibility=new e.Value(!1),s.hasDBValues=new e.Value(!1),s.dirtyValues=new e.Value({}),s.dbValues=new e.Value({}),s.changesetValues=new e.Value({}),s.userEventMap=new e.Value([{trigger:"click keydown",selector:".czr-scope-switch, .czr-skp-switch-link",name:"skope_switch",actions:function(){e.czr_activeSkopeId(s().id)}},{trigger:"click keydown",selector:".czr-scope-reset",name:"skope_reset_warning",actions:"reactOnSkopeResetUserRequest"}]),s.skopeResetDialogVisibility.bind(function(e,t){return s.skopeResetDialogReact(e)},{deferred:!0}),s.dirtyValues.callbacks.add(function(){return s.dirtyValuesReact.apply(s,arguments)}),s.changesetValues.callbacks.add(function(){return s.changesetValuesReact.apply(s,arguments)}),s.dbValues.callbacks.add(function(){return s.dbValuesReact.apply(s,arguments)}),s.callbacks.add(function(){return s.skopeReact.apply(s,arguments)}),s.set(i.omit(o,function(e,t){return i.contains(["db","changeset","has_db_val"],t)})),s.setupObservableViewValuesCallbacks(),s.dirtyness(!i.isEmpty(o.changeset)),s.hasDBValues(!i.isEmpty(o.db)),s.winner(o.is_winner),s.embedded.fail(function(){throw new Error("The container of skope "+s().id+" has not been embededd")}).done(function(){s.setupDOMListeners(s.userEventMap(),{dom_el:s.container}),s.isReady.resolve()})},ready:function(){var i=this;e.czr_skopeBase.skopeWrapperEmbedded.done(function(){try{t.when(i.embedSkopeDialogBox()).done(function(e){!1!==e.length?(e.css("background-color",i.color),i.container=e,i.embedded.resolve(e)):i.embedded.reject()})}catch(t){e.errorLog("In skope base : "+t),i.embedded.reject()}})},dirtyValuesReact:function(t,n){this.dirtyness(!i.isEmpty(t)),e.czr_dirtyness(!i.isEmpty(t));var o=[];i.each(n,function(e,n){i.has(t,n)||o.push(n)}),this().id==e.czr_activeSkopeId()&&(i.each(o,function(t){i.has(e.control(t),"czr_states")&&e.control(t).czr_states("isDirty")(!1)}),i.each(t,function(t,n){i.has(e.control(n),"czr_states")&&e.control(n).czr_states("isDirty")(!0)}))},changesetValuesReact:function(e,i){var n=t.extend(!0,{},this.dirtyValues());this.dirtyValues(t.extend(n,e))},dbValuesReact:function(t,n){this.hasDBValues(!i.isEmpty("global"!=this().skope?t:i.omit(t,function(t,i){return!e.czr_skopeBase.isThemeSetting(i)})));var o=[];i.each(n,function(e,n){i.has(t,n)||o.push(n)}),this().id==e.czr_activeSkopeId()&&(i.each(o,function(t){i.has(e.control(t),"czr_states")&&e.control(t).czr_states("hasDBVal")(!1)}),i.each(t,function(t,n){i.has(e.control(n),"czr_states")&&e.control(n).czr_states("hasDBVal")(!0)}))},skopeReact:function(n,o){var s=this,r=[],a=[];e.czr_skopeBase.isSkopeRegisteredInCollection(n.id)?(r=t.extend(!0,[],e.czr_skopeCollection()),a=r,i.each(r,function(e,t){e.id==s().id&&(a[t]=n)}),e.czr_skopeCollection(a)):((r=t.extend(!0,[],e.czr_skopeCollection())).push(n),e.czr_skopeCollection(r))},setupObservableViewValuesCallbacks:function(){var e=this;e.visible.bind(function(t){"pending"==e.embedded.state()?e.embedded.done(function(){e.container.toggle(t)}):e.container.toggle(t)}),e.active.bind(function(){"pending"==e.embedded.state()?e.embedded.done(function(){e.activeStateReact.apply(e,arguments)}):e.activeStateReact.apply(e,arguments)}),e.dirtyness.bind(function(){"pending"==e.embedded.state()?e.embedded.done(function(){e.dirtynessReact.apply(e,arguments)}):e.dirtynessReact.apply(e,arguments)}),e.hasDBValues.bind(function(){"pending"==e.embedded.state()?e.embedded.done(function(){e.hasDBValuesReact.apply(e,arguments)}):e.hasDBValuesReact.apply(e,arguments)}),e.winner.bind(function(){"pending"==e.embedded.state()?e.embedded.done(function(){e.winnerReact.apply(e,arguments)}):e.winnerReact.apply(e,arguments)})},activeStateReact:function(e,i){this.container.toggleClass("inactive",!e).toggleClass("active",e),t(".czr-scope-switch",this.container).toggleClass("fa-toggle-on",e).toggleClass("fa-toggle-off",!e)},dirtynessReact:function(e,i){var n=this;t.when(this.container.toggleClass("dirty",e)).done(function(){e?t(".czr-scope-reset",n.container).fadeIn("slow").attr("title",[serverControlParams.i18n.skope["Reset the current customizations for"],n().title].join(" ")):n.hasDBValues()||t(".czr-scope-reset",n.container).fadeOut("fast")})},hasDBValuesReact:function(e,i){var n=this;t.when(n.container.toggleClass("has-db-val",e)).done(function(){e?t(".czr-scope-reset",n.container).fadeIn("slow").attr("title",["global"==n().skope?serverControlParams.i18n.skope["Reset the theme options published sitewide"]:serverControlParams.i18n.skope["Reset your website published options for"],"global"==n().skope?"":n().title].join(" ")):n.dirtyness()||t(".czr-scope-reset",n.container).fadeOut("fast")})},winnerReact:function(n){var o=this;this.container.toggleClass("is_winner",n),n&&i.each(e.czr_currentSkopesCollection(),function(i){if(i.id!=o().id){var n=t.extend(!0,{},i);t.extend(n,{is_winner:!1}),e.czr_skope(i.id)(n)}})},updateSkopeDirties:function(i,n){e.CZR_Helpers.getOptionName(i);if(!e.czr_skopeBase.isSettingSkopeEligible(i)&&"global"!=this().skope)return e.czr_skope(e.czr_skopeBase.getGlobalSkopeId()).updateSkopeDirties(i,n);var o=t.extend(!0,{},this.dirtyValues()),s={};return s[i]=n,this.dirtyValues.set(t.extend(o,s)),this.dirtyValues()},getSkopeSettingDirtyness:function(e){return this.getSkopeSettingAPIDirtyness(e)||this.getSkopeSettingChangesetDirtyness(e)},getSkopeSettingAPIDirtyness:function(t){return i.has(this.dirtyValues(),e.CZR_Helpers.build_setId(t))},getSkopeSettingChangesetDirtyness:function(t){return e.czr_isChangeSetOn()?i.has(this.changesetValues(),e.CZR_Helpers.build_setId(t)):this.getSkopeSettingAPIDirtyness(t)},hasSkopeSettingDBValues:function(t){var n=e.CZR_Helpers.build_setId(t);return!i.isUndefined(e.czr_skope(e.czr_activeSkopeId()).dbValues()[n])}})}(wp.customize,jQuery,_);CZRSkopeMths=CZRSkopeMths||{};!function(e,t,i){t.extend(CZRSkopeMths,{embedSkopeDialogBox:function(){var n=t.extend(!0,{},this()),o="";if(!t("#customize-header-actions").find(".czr-scope-switcher").length)throw new Error("The skope switcher wrapper is not printed, the skope can not be embedded.");try{o=wp.template("czr-skope")(i.extend(n,{el:this.el}))}catch(t){return e.errorLog("Error when parsing the template of a skope"+t),!1}return t(".czr-skopes-wrapper","#customize-header-actions").append(t(o)),t("."+this.el,".czr-skopes-wrapper")},renderResetWarningTmpl:function(){var n,o,s=t.extend(!0,{},this()),r="";this.dirtyness()?(n=[serverControlParams.i18n.skope["Please confirm that you want to reset your current ( not published ) customizations for"],this().ctx_title].join(" "),o=[serverControlParams.i18n.skope["Your customizations have been reset for"],this().ctx_title].join(" ")):(n=["global"==this().skope?serverControlParams.i18n.skope["Please confirm that you want to reset your sitewide published customizations. Note : this will not reset the customizations made in other option scopes"]:serverControlParams.i18n.skope["Please confirm that you want to reset your published customizations for"],"global"==this().skope?"":this().ctx_title].join(" "),o=[serverControlParams.i18n.skope["Your published customizations have been reset for"],this().title].join(" "));try{r=wp.template("czr-skope-pane")(i.extend(s,{el:this.el,warning_message:n+".",success_message:o+"."}))}catch(t){return e.errorLog("Error when parsing the the reset skope template : "+t),!1}return t("#customize-preview").after(t(r)),t("#czr-skope-pane")},getEl:function(){return t(this.el,"#customize-header-actions")}})}(wp.customize,jQuery,_);CZRSkopeMths=CZRSkopeMths||{};!function(e,t,i){t.extend(CZRSkopeMths,{reactOnSkopeResetUserRequest:function(){var t=this,i=function(){e.state("czr-resetting")(!0),e.czr_activeSkopeId()!=t().id?e.czr_activeSkopeId(t().id).done(function(){t.skopeResetDialogVisibility(!t.skopeResetDialogVisibility()).done(function(){e.state("czr-resetting")(!1)})}):t.skopeResetDialogVisibility(!t.skopeResetDialogVisibility()).done(function(){e.state("czr-resetting")(!1)})};e.state("czr-resetting")()||0!==e.state("processing")()?e.czr_serverNotification({message:"Slow down, you move too fast !",status:"success",auto_collapse:!0}):e.czr_activeSkopeId()!=t().id&&e.czr_skope(e.czr_activeSkopeId()).skopeResetDialogVisibility()?e.czr_skope(e.czr_activeSkopeId()).skopeResetDialogVisibility(!1).done(function(){i()}):i()},skopeResetDialogReact:function(n){var o=this,s=t.Deferred();return o.userResetEventMap=o.userResetEventMap||new e.Value([{trigger:"click keydown",selector:".czr-scope-reset-cancel",name:"skope_reset_cancel",actions:function(){o.skopeResetDialogVisibility(!o.skopeResetDialogVisibility())}},{trigger:"click keydown",selector:".czr-scope-do-reset",name:"skope_do_reset",actions:"doResetSkopeValues"}]),n?(e.czr_isResettingSkope(o().id),t.when(o.renderResetWarningTmpl()).done(function(e){o.resetPanel=e,o.resetPanel.addClass(o.dirtyness()?"dirty-reset":"db-reset"),o.setupDOMListeners(o.userResetEventMap(),{dom_el:o.resetPanel})}).then(function(){setTimeout(function(){var e=t("#customize-preview").height();o.resetPanel.css("line-height",e+"px").css("height",e+"px"),t("body").addClass("czr-skope-pane-open")},50)})):t.when(t("body").removeClass("czr-skope-pane-open")).done(function(){i.has(o,"resetPanel")&&!1!==o.resetPanel.length&&setTimeout(function(){o.resetPanel.remove(),e.czr_isResettingSkope(!1)},300)}),i.delay(function(){s.resolve()},350),s.promise()},doResetSkopeValues:function(){var n=this,o=n().id,s=n.dirtyness()?"_resetSkopeDirties":"_resetSkopeAPIValues";t("body").addClass("czr-resetting-skope"),e.czr_skopeReset[n.dirtyness()?"resetChangeset":"resetPublished"]({skope_id:n().id,is_skope:!0}).always(function(){t("body").removeClass("czr-resetting-skope")}).done(function(r){var a;a=function(){e.czr_skopeBase.processSilentUpdates({refresh:!1}).fail(function(){e.consoleLog("Silent update failed after resetting skope : "+o)}).done(function(){t.when(t(".czr-reset-warning",n.resetPanel).fadeOut("300")).done(function(){t.when(t(".czr-reset-success",n.resetPanel).fadeIn("300")).done(function(){i.delay(function(){e.czr_isResettingSkope(!1),n.skopeResetDialogVisibility(!1)},2e3)})})})},n[s]().done(function(){e.previewer.refresh().fail(function(t){e.consoleLog("SKOPE RESET REFRESH FAILED",t)}).done(function(t){if("global"==e.czr_skope(o)().skope&&"_resetSkopeAPIValues"==s){var n,r=e.czr_skope(o)().opt_name;!i.isUndefined(t.skopesServerData)&&i.has(t.skopesServerData,"czr_skopes")&&(n=t.skopesServerData.czr_skopes,i.isUndefined(i.findWhere(n,{opt_name:r}))&&i.findWhere(n,{opt_name:r}).db),e.czr_skopeBase.maybeSynchronizeGlobalSkope({isGlobalReset:!0,isSkope:!0,skopeIdToReset:o}).done(function(){a()})}else a()})})}).fail(function(t){n.skopeResetDialogVisibility(!1),e.consoleLog("Skope reset failed",t)})},_resetSkopeDirties:function(){var e=t.Deferred();return this.dirtyValues({}),this.changesetValues({}),e.resolve().promise()},_resetSkopeAPIValues:function(){var e=t.Deferred();return this.dbValues({}),e.resolve().promise()}})}(wp.customize,jQuery,_),function(e,t,i){t.extend(CZRSkopeBaseMths,e.Events),t.extend(CZRSkopeMths,e.Events),t.extend(CZRSkopeMths,e.CZR_Helpers),e.CZR_skopeBase=e.Class.extend(CZRSkopeBaseMths),e.CZR_skopeReset=e.Class.extend(CZRSkopeResetMths),e.CZR_skope=e.Value.extend(CZRSkopeMths),i.has(e,"HeaderTool")&&(e.czr_HeaderTool=t.extend(!0,{},e.HeaderTool))}(wp.customize,jQuery,_),function(e,t,i){e.bind("ready",function(){var n=function(){e.section("themes").active.bind(function(n){i.has(serverControlParams,"isThemeSwitchOn")&&i.isEmpty(serverControlParams.isThemeSwitchOn)&&(e.section("themes").active(serverControlParams.isThemeSwitchOn),e.section("themes").active.callbacks=t.Callbacks())})};e.section.has("themes")?n():e.section.when("themes",function(e){n()})})}(wp.customize,jQuery,_),function(e,t,i){e.czr_activeSectionId=new e.Value(""),e.czr_activePanelId=new e.Value(""),"function"==typeof e.Section&&e.control.bind("add",function(t){t.params.ubq_section&&t.params.ubq_section.section&&(t.params.original_priority=t.params.priority,t.params.original_section=t.params.section,e.section.when(t.params.ubq_section.section,function(e){e.expanded.bind(function(e){e?(t.params.ubq_section.priority&&t.priority(t.params.ubq_section.priority),t.section(t.params.ubq_section.section)):(t.priority(t.params.original_priority),t.section(t.params.original_section))})}))}),"function"==typeof e.Panel&&e.section.bind("add",function(t){t.params.ubq_panel&&t.params.ubq_panel.panel&&(t.params.original_priority=t.params.priority,t.params.original_panel=t.params.panel,e.panel.when(t.params.ubq_panel.panel,function(e){e.expanded.bind(function(e){e?(t.params.ubq_panel.priority&&t.priority(t.params.ubq_panel.priority),t.panel(t.params.ubq_panel.panel)):(t.priority(t.params.original_priority),t.panel(t.params.original_panel))})}))});var n=function(){i.has(e,"czr_ModOptVisible")&&e.czr_ModOptVisible(!1)};e.czr_activeSectionId.bind(n),e.czr_activePanelId.bind(n),e.bind("ready",function(){if("function"!=typeof e.Section)throw new Error("Your current version of WordPress does not support the customizer sections needed for this theme. Please upgrade WordPress to the latest version.");var t=function(t,i){e.czr_activeSectionId(t?i:"")};e.section.each(function(e){"publish_settings"!=e.id&&e.expanded.bind(function(i){t(i,e.id)})}),e.section.bind("add",function(i){"publish_settings"!=i.id&&(e.trigger("czr-paint",{active_panel_id:i.panel()}),i.expanded.bind(function(e){t(e,i.id)}))});var n=function(t,n){e.czr_activePanelId(t?n:""),i.isEmpty(e.czr_activePanelId())&&e.czr_activeSectionId("")};e.panel.each(function(e){e.expanded.bind(function(t){n(t,e.id)})}),e.panel.bind("add",function(e){e.expanded.bind(function(t){n(t,e.id)})})})}(wp.customize,jQuery,_),function(e,t,i){serverControlParams.isPro&&(i.each(["tc_font_customizer_settings","header_image_sec","content_blog_sec","static_front_page","content_single_sec","tc_fpu","nav","post_lists_sec","galleries_sec","footer_customizer_sec","custom_scripts_sec","contact_info_sec"],function(t){i.delay(function(){e.section.when(t,function(e){1>=e.headContainer.length&&e.headContainer.find(".accordion-section-title").prepend('<span class="pro-title-block">Pro</span>')})},1e3)}),i.each([],function(t){e.panel.when(t,function(e){1>=e.headContainer.length&&e.headContainer.find(".accordion-section-title").prepend('<span class="pro-title-block">Pro</span>')})})),!serverControlParams.isPro&&i.isFunction(e.Section)&&(proSectionConstructor=e.Section.extend({active:!0,attachEvents:function(){},isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}}),t.extend(e.sectionConstructor,{"czr-customize-section-pro":proSectionConstructor}))}(wp.customize,jQuery,_);var CZRSocialModuleMths=CZRSocialModuleMths||{};!function(e,t,i){t.extend(CZRSocialModuleMths,{initialize:function(n,o){var s=this;e.CZRDynModule.prototype.initialize.call(s,n,o),t.extend(s,{itemPreAddEl:"czr-module-social-pre-add-view-content",itemInputList:"czr-module-social-item-content",modOptInputList:"czr-module-social-mod-opt"}),this.social_icons=["500px","adn","amazon","android","angellist","apple","behance","behance-square","bitbucket","black-tie","btc","buysellads","chrome","codepen","codiepie","connectdevelop","contao","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","edge","empire","envelope","envelope-o","envelope-square","expeditedssl","facebook","facebook-f (alias)","facebook-square","firefox","flickr","fonticons","fort-awesome","forumbee","foursquare","get-pocket","gg","gg-circle","git","github","github-alt","github-square","gitlab","git-square","google","google-plus","google-plus-g","google-plus-square","google-wallet","gratipay","hacker-news","houzz","imdb","instagram","internet-explorer","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","leanpub","linkedin","linkedin-in","linux","maxcdn","meetup","medium","mixcloud","mobile","mobile-alt","modx","odnoklassniki","odnoklassniki-square","opencart","openid","opera","optin-monster","pagelines","paypal","phone","phone-square","pied-piper","pied-piper-alt","pinterest","pinterest-p","pinterest-square","product-hunt","qq","rebel","reddit","reddit-alien","reddit-square","renren","rss","rss-square","safari","scribd","sellsy","share-alt","share-alt-square","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","snapchat","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","telegram","tencent-weibo","trello","tripadvisor","tumblr","tumblr-square","twitch","twitter","twitter-square","usb","viacoin","vimeo","vimeo-square","vine","vk","weibo","weixin","whatsapp","wikipedia-w","windows","wordpress","xing","xing-square","yahoo","y-combinator","yelp","youtube","youtube-square"],this.fa_solid_icons=["fa-envelope","fa-envelope-square","fa-mobile","fa-mobile-alt","fa-phone","fa-phone-square","fa-rss","fa-rss-square","fa-share-alt","fa-share-alt-square"],this.fa_icons_replacement={"fa-bitbucket-square":"fa-bitbucket","fa-facebook-official":"fa-facebook-f","fa-google-plus-circle":"fa-google-plus","fa-google-plus-official":"fa-google-plus","fa-linkedin-square":"fa-linkedin","fa-youtube-play":"fa-youtube"},s.inputConstructor=e.CZRInput.extend(s.CZRSocialsInputMths||{}),s.itemConstructor=e.CZRItem.extend(s.CZRSocialsItem||{}),this.defaultModOptModel={is_mod_opt:!0,module_id:s.id,"social-size":serverControlParams.social_el_params.defaultSocialSize||14},this.defaultItemModel={id:"",title:"","social-icon":"","social-link":"","social-color":serverControlParams.social_el_params.defaultSocialColor,"social-target":1},this.itemAddedMessage=serverControlParams.i18n.socialLinkAdded,i.has(e,"czr_activeSectionId")&&s.control.section()==e.czr_activeSectionId()&&"resolved"!=s.isReady.state()&&s.ready(),e.section(s.control.section()).expanded.bind(function(e){"resolved"!=s.isReady.state()&&s.ready()}),s.isReady.then(function(){s.preItem.bind(function(e,t){i.has(e,"social-icon")&&(i.isEqual(e["social-icon"],t["social-icon"])||s.updateItemModel(s.preItem,!0))})})},updateItemModel:function(e,n){var o,s,r,a=e;(n=n||!1,i.has(a(),"social-icon")&&!i.isEmpty(a()["social-icon"]))&&(o=t.extend(!0,{},a()),s=this.getTitleFromIcon(o["social-icon"]),r=serverControlParams.social_el_params.defaultSocialColor,!n&&a.czr_Input.has("social-color")&&(r=a.czr_Input("social-color")()),s=[serverControlParams.i18n.followUs,s].join(" "),n?(o=t.extend(o,{title:s,"social-color":r}),a.set(o)):(a.czr_Input("title").set(s),a.czr_Input("social-color")&&a.czr_Input("social-color").set(r)))},getTitleFromIcon:function(t){return e.CZR_Helpers.capitalize(t.replace("fa-","").replace("envelope","email"))},getIconFromTitle:function(e){return"fa-".title.toLowerCase().replace("envelope","email")},_strReplace:function(e,t,i){return i.replace(new RegExp("("+("string"==typeof e?e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&"):e.map(function(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}).join("|"))+")","g"),"string"==typeof t?t:"string"==typeof e?t[0]:function(i){return t[e.indexOf(i)]})},buildFaIcon:function(e){var t="fab",n=e.toLowerCase(),o=this.fa_solid_icons,s=this.fa_icons_replacement;return(n=this._strReplace(i.keys(s),i.values(s),n)).match(/-o$/)?(t="far",n=n.replace(/-o$/,"")):i.contains(o,n)&&(t="fas"),t+" "+n},CZRSocialsInputMths:{setupSelect:function(){var e=this,n=e.input_parent,o=e.module,s=o.social_icons,r=(o.fa_solid_icons,o.fa_icons_eplacement,n()),a=i.isEmpty(r.id);function l(e){return e.id?t('<span class="'+o.buildFaIcon(e.element.value.toLowerCase())+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text}a&&(s=i.union([serverControlParams.i18n.selectSocialIcon],s)),i.each(s,function(i,n){var s=a&&0===n?"":"fa-"+i.toLowerCase(),l={value:s,html:o.getTitleFromIcon(i)};s==r["social-icon"]&&t.extend(l,{selected:"selected"}),t('select[data-type="social-icon"]',e.container).append(t("<option>",l))}),t('select[data-type="social-icon"]',e.container).select2({templateResult:l,templateSelection:l})},setupColorPicker:function(e){var n=this,o=(n.input_parent,n.module),s=t('input[data-type="social-color"]',n.container);s.iris({palettes:!0,hide:!1,defaultColor:serverControlParams.social_el_params.defaultSocialColor||"rgba(255,255,255,0.7)",change:function(e,n){i.has(n,"color")&&16777215==n.color._color?t(this).val(serverControlParams.social_el_params.defaultSocialColor||"rgba(255,255,255,0.7)"):t(this).val(n.color.toString()),t(this).trigger("colorpickerchange").trigger("change")}}),s.closest("div").on("click keydown",function(){o._adjustScrollExpandedBlock(n.container)})}},CZRSocialsItem:{ready:function(){var t=this;e.CZRItem.prototype.ready.call(t),t.bind("social-icon:changed",function(){t.module.updateItemModel(t)})},_buildTitle:function(t,i,n){var o=this.module;return t=t||("string"==typeof i?e.CZR_Helpers.capitalize(i.replace("fa-","")):""),t=e.CZR_Helpers.truncate(t,20),i=i||"fa-"+o.social_icons[0],n=n||serverControlParams.social_el_params.defaultSocialColor,'<div><span class="'+o.buildFaIcon(i)+'" style="color:'+n+'"></span> '+t+"</div>"},writeItemViewTitle:function(e){var i=this.module,n=e||this(),o=i.getTitleFromIcon(n["social-icon"]);t("."+i.control.css_attr.item_title,this.container).html(this._buildTitle(o,n["social-icon"],n["social-color"]))}}})}(wp.customize,jQuery,_);var CZRWidgetAreaModuleMths=CZRWidgetAreaModuleMths||{};!function(e,t,i){t.extend(CZRWidgetAreaModuleMths,{initialize:function(n,o){var s=this;e.CZRDynModule.prototype.initialize.call(this,n,o),t.extend(s,{itemPreAddEl:"czr-module-widgets-pre-add-view-content",itemInputList:"czr-module-widgets-item-input-list",itemInputListReduced:"czr-module-widgets-item-input-list-reduced",ruItemPart:"czr-module-widgets-ru-item-part"}),s.inputConstructor=e.CZRInput.extend(s.CZRWZonesInputMths||{}),s.itemConstructor=e.CZRItem.extend(s.CZRWZonesItem||{}),s.serverParams=serverControlParams.widget_area_el_params||{},s.contexts=i.has(s.serverParams,"sidebar_contexts")?s.serverParams.sidebar_contexts:{},s.context_match_map={is_404:"404",is_category:"archive-category",is_home:"home",is_page:"page",is_search:"search",is_single:"single"},s.locations=i.has(s.serverParams,"sidebar_locations")?s.serverParams.sidebar_locations:{},s.defaultItemModel={id:"",title:serverControlParams.i18n.widgetZone,contexts:i.without(i.keys(s.contexts),"_all_"),locations:[s.serverParams.defaultWidgetLocation],description:""},this.itemAddedMessage=serverControlParams.i18n.widgetZoneAdded,i.has(e,"sidebar_insights")||(e.sidebar_insights=new e.Values,e.sidebar_insights.create("candidates"),e.sidebar_insights.create("actives"),e.sidebar_insights.create("inactives"),e.sidebar_insights.create("registered"),e.sidebar_insights.create("available_locations")),this.listenToSidebarInsights(),e.czr_widgetZoneSettings=e.czr_widgetZoneSettings||new e.Value,e.czr_widgetZoneSettings.bind(function(t,n){s.isReady.then(function(){i.each(t,function(t,i){e.sidebar_insights(i).set(t)})})}),s.preItem_location_alert_view_state=new e.Value("closed"),s.preItem_location_alert_view_state.callbacks.add(function(e,t){s._toggleLocationAlertExpansion(s.container,e)}),s.bind("item-added",function(e){s.addWidgetSidebar(e)}),s.bind("pre_item_api_remove",function(e){s.removeWidgetSidebar(e)});var r=new e.Values;r.create("fixed_for_current_session"),r.create("value"),e.section(s.serverParams.dynWidgetSection).fixTopMargin=r,e.section(s.serverParams.dynWidgetSection).fixTopMargin("fixed_for_current_session").set(!1),e.panel("widgets").expanded.callbacks.add(function(e,t){s.widgetPanelReact(),"resolved"!=s.isReady.state()&&s.ready()})},ready:function(){var t=this;e.CZRDynModule.prototype.ready.call(t),t.preItemExpanded.callbacks.add(function(e,i){e&&(t.preItem.czr_Input("locations")._setupLocationSelect(!0),t.preItem.czr_Input("locations").mayBeDisplayModelAlert())})},initializeModuleModel:function(e){var n=t.Deferred();return e.items=i.union(i.has(this.serverParams,"default_zones")?this.serverParams.default_zones:[],e.items),n.resolve(e).promise()},CZRWZonesInputMths:{ready:function(){var t=this;t.bind("locations:changed",function(){t.mayBeDisplayModelAlert()}),e.CZRInput.prototype.ready.call(t)},setupSelect:function(){"locations"==this.id&&this._setupLocationSelect(),"contexts"==this.id&&this._setupContextSelect()},_setupContextSelect:function(){var e=this,n=e(),o=(e.input_parent,e.module);i.each(o.contexts,function(o,s){var r={value:s,html:o};(s==n||i.contains(n,s))&&t.extend(r,{selected:"selected"}),t('select[data-type="contexts"]',e.container).append(t("<option>",r))}),t('select[data-type="contexts"]',e.container).select2()},_setupLocationSelect:function(n){var o=this,s=o(),r=(o.input_parent,o.module),a=e.sidebar_insights("available_locations")();function l(e){return e.id?i.contains(a,e.element.value)?e.text:t('<span class="czr-unavailable-location fas fa-ban" title="'+serverControlParams.i18n.unavailableLocation+'">&nbsp;&nbsp;'+e.text+"</span>"):e.text}t('select[data-type="locations"]',o.container).children().length||i.each(r.locations,function(e,n){var r={value:n,html:e};(n==s||i.contains(s,n))&&t.extend(r,{selected:"selected"}),t('select[data-type="locations"]',o.container).append(t("<option>",r))}),n&&t('select[data-type="locations"]',o.container).select2("destroy"),t('select[data-type="locations"]',o.container).select2({templateResult:l,templateSelection:l})},mayBeDisplayModelAlert:function(){var n=this.input_parent,o=this.module;if(i.has(n(),"locations")&&!i.isEmpty(n().locations)){var s=t('select[data-type="locations"]',this.container).val(),r=e.sidebar_insights("available_locations")(),a=i.filter(s,function(e){return!i.contains(r,e)});!i.has(n(),"id")||i.isEmpty(n().id)?o.preItem_location_alert_view_state.set(i.isEmpty(a)?"closed":"expanded"):n.czr_itemLocationAlert.set(i.isEmpty(a)?"closed":"expanded")}}},CZRWZonesItem:{initialize:function(t,i){this.module;this.czr_itemLocationAlert=new e.Value,e.CZRItem.prototype.initialize.call(this,null,i)},itemWrapperViewSetup:function(){var t=this,i=t.module;e.CZRItem.prototype.itemWrapperViewSetup.call(t),t.czr_itemLocationAlert.set("closed"),t.czr_itemLocationAlert.callbacks.add(function(e,n){i._toggleLocationAlertExpansion(t.container,e)}),t.writeSubtitleInfos(t()),t.viewState.callbacks.add(function(e,i){-1!=e.indexOf("expanded")&&t.bind("contentRendered",function(){t.czr_Input("locations")._setupLocationSelect(!0),t.czr_Input("locations").mayBeDisplayModelAlert()})})},itemReact:function(t,i){e.CZRItem.prototype.itemReact.call(this,t,i),this.writeSubtitleInfos(t),this.updateSectionTitle(t).setModelUpdateTimer()},writeSubtitleInfos:function(e){var n,o=this.module,s=i.clone(e||this()),r=[],a=[];if(!this.container.length)return this;s.locations=i.isString(s.locations)?[s.locations]:s.locations,i.each(s.locations,function(e){i.has(o.locations,e)?r.push(o.locations[e]):r.push(e)}),s.contexts=i.isString(s.contexts)?[s.contexts]:s.contexts,this._hasModelAllContexts(e)?a.push(o.contexts._all_):i.each(s.contexts,function(e){i.has(o.contexts,e)?a.push(o.contexts[e]):a.push(e)});var l=serverControlParams.i18n.locations,c=serverControlParams.i18n.contexts,d=serverControlParams.i18n.notset;if(r=i.isEmpty(r)?'<span style="font-weight: bold;">'+d+"</span>":r.join(", "),a=i.isEmpty(a)?'<span style="font-weight: bold;">'+d+"</span>":a.join(", "),n="<u>"+l+"</u> : "+r+" <strong>|</strong> <u>"+c+"</u> : "+a,t(".czr-zone-infos",this.container).length)t(".czr-zone-infos",this.container).html(n);else{var u=t("<div/>",{class:["czr-zone-infos",o.control.css_attr.item_sort_handle].join(" "),html:n});t("."+o.control.css_attr.item_btns,this.container).after(u)}return this},updateSectionTitle:function(i){var n="sidebar-widgets-"+i.id,o=i.title;return e.section.has(n)?(t(".accordion-section-title",e.section(n).container).text(o),t(".customize-section-title h3",e.section(n).container).html('<span class="customize-action">'+e.section(n).params.customizeAction+"</span>"+o),this):this},setModelUpdateTimer:function(){var e=this.module;clearTimeout(t.data(this,"modelUpdateTimer")),t.data(this,"modelUpdateTimer",setTimeout(function(){e.control.refreshPreview()},1e3))},_hasModelAllContexts:function(e){var t=this.module,n=i.keys(t.contexts);if(e=e||this(),i.has(e,"contexts"))return!!i.contains(e.contexts,"_all_")||i.isEmpty(i.difference(i.without(n,"_all_"),e.contexts))},_getMatchingContexts:function(t){var n=e.czr_wpQueryInfos().conditional_tags||{},o=i.filter(this.context_match_map,function(e,t){return!0===n[t]});return i.isEmpty(o)?t:o}},addWidgetSidebar:function(n,o){if(!i.isObject(n)&&i.isEmpty(o))throw new Error("No valid input were provided to add a new Widget Zone.");var s=this,r=i.isEmpty(n)?o:i.clone(n),a=i.isEmpty(n)?o:t.extend(i.clone(i.findWhere(e.Widgets.data.registeredSidebars,{id:s.serverParams.defaultWidgetSidebar})),{name:r.title,id:r.id});e.Widgets.registeredSidebars.add(a);var l=t.extend(i.clone(e.section("sidebar-widgets-"+s.serverParams.defaultWidgetSidebar).params),{id:"sidebar-widgets-"+r.id,instanceNumber:i.max(e.settings.sections,function(e){return e.instanceNumber}).instanceNumber+1,sidebarId:a.id,title:a.name,description:void 0!==o?o.description:e.section("sidebar-widgets-"+s.serverParams.defaultWidgetSidebar).params.description,priority:i.max(i.omit(e.settings.sections,s.serverParams.dynWidgetSection),function(e){return e.instanceNumber}).priority+1});e.section.add(l.id,new e.sectionConstructor[l.type](l.id,{params:l})),e.settings.sections[l.id]=l.id;var c="sidebars_widgets["+r.id+"]",d=t.extend(i.clone(e.settings.settings["sidebars_widgets["+s.serverParams.defaultWidgetSidebar+"]"]),{value:[]});e.settings.settings[c]=d,e.create(c,c,d.value,{transport:d.transport,previewer:e.previewer,dirty:!1});var u=t.extend(i.clone(e.settings.controls["sidebars_widgets["+s.serverParams.defaultWidgetSidebar+"]"]),{settings:{default:c}}),p={};i.each(u,function(e,t){"string"==typeof e&&(e=e.replace(s.serverParams.defaultWidgetSidebar,r.id)),p[t]=e}),p.instanceNumber=i.max(e.settings.controls,function(e){return e.instanceNumber}).instanceNumber+1,e.settings.controls[c]=p,e.control.add(c,new e.controlConstructor[p.type](c,{params:p,previewer:e.previewer})),i.has(this,"container")&&this.container.trigger("widget_zone_created",{model:r,section_id:"sidebar-widgets-"+r.id,setting_id:c})},removeWidgetSidebar:function(n){var o=this;if(!i.isObject(n)||i.isEmpty(n))throw new Error("No valid data were provided to remove a Widget Zone.");e.Widgets.registeredSidebars.remove(n.id),e.section.has("sidebar-widgets-"+n.id)&&(e.section("sidebar-widgets-"+n.id).container.remove(),e.section.remove("sidebar-widgets-"+n.id),delete e.settings.sections["sidebar-widgets-"+n.id]),e.has("sidebars_widgets["+n.id+"]")&&(e.remove("sidebars_widgets["+n.id+"]"),delete e.settings.settings["sidebars_widgets["+n.id+"]"]),e.control.has("sidebars_widgets["+n.id+"]")&&(e.control("sidebars_widgets["+n.id+"]").container.remove(),e.control.remove("sidebars_widgets["+n.id+"]"),delete e.settings.controls["sidebars_widgets["+n.id+"]"]);var s=function(){e.previewer.refresh()};s=i.debounce(s,500),t.when(s()).done(function(){o.trigger("widget_zone_removed",{model:n,section_id:"sidebar-widgets-"+n.id,setting_id:"sidebars_widgets["+n.id+"]"})})},widgetPanelReact:function(){var t=this,n=e.panel("widgets").container.find(".control-panel-content").css("margin-top");e.section(t.serverParams.dynWidgetSection).fixTopMargin("value").set(n);var o=e.section(t.serverParams.dynWidgetSection).container.find(".accordion-section-content"),s=e.panel("widgets").container.find(".control-panel-content");e.bind("pane-contents-reflowed",i.debounce(function(){o.css("margin-top",""),s.css("margin-top",e.section(t.serverParams.dynWidgetSection).fixTopMargin("value")())},150)),t.closeAllItems().closeRemoveDialogs(),i.has(t,"preItemExpanded")&&t.preItemExpanded.set(!1)},widgetSectionReact:function(i,n){var o=e.section(this.serverParams.dynWidgetSection),s=o.container.closest(".wp-full-overlay-sidebar-content"),r=o.container.find(".accordion-section-content"),a=o.container.closest(".wp-full-overlay"),l=(o.container.find(".customize-section-back"),o.container.find(".accordion-section-title").first());t("#customize-header-actions").height();i&&(a.removeClass("section-open"),r.css("height","auto"),l.attr("tabindex","0"),r.css("margin-top",""),s.scrollTop(0)),this.closeAllItems().closeRemoveDialogs(),r.slideToggle()},listenToSidebarInsights:function(){var n=this;e.sidebar_insights("registered").callbacks.add(function(e){var t=i.clone(n.itemCollection());i.each(t,function(t){n.getViewEl(t.id).length&&n.getViewEl(t.id).css("display",i.contains(e,t.id)?"block":"none")})}),e.sidebar_insights("inactives").callbacks.add(function(e){var o=i.clone(n.itemCollection());i.each(o,function(o){n.getViewEl(o.id).length&&(i.contains(e,o.id)?(n.getViewEl(o.id).addClass("inactive"),n.getViewEl(o.id).find(".czr-inactive-alert").length||n.getViewEl(o.id).find(".czr-item-title").append(t("<span/>",{class:"czr-inactive-alert",html:" [ "+serverControlParams.i18n.inactiveWidgetZone+" ]"}))):(n.getViewEl(o.id).removeClass("inactive"),n.getViewEl(o.id).find(".czr-inactive-alert").length&&n.getViewEl(o.id).find(".czr-inactive-alert").remove()))})}),e.sidebar_insights("candidates").callbacks.add(function(t){i.isArray(t)&&i.each(t,function(t){i.isObject(t)&&(e.section.has("sidebar-widgets-"+t.id)||(n.addWidgetSidebar({},t),i.has(e.sidebar_insights("actives")(),t.id)&&e.section.has("sidebar-widgets-"+t.id)&&e.section("sidebar-widgets-"+t.id).activate()))})})},_adjustScrollExpandedBlock:function(e,i){if(e.length){var n,o=t(".wp-full-overlay-sidebar-content").scrollTop(),s=i||90;setTimeout(function(){e.offset().top+e.height()+s>t(window.top).height()&&(n=e.offset().top+e.height()+s-t(window.top).height(),t(".wp-full-overlay-sidebar-content").animate({scrollTop:o+n},600))},50)}},getDefaultItemModel:function(e){var n=this.itemCollection(),o=i.clone(this.defaultItemModel);o.contexts;return t.extend(o,{title:"Widget Zone "+(1*i.size(n)+1)})},getTemplateEl:function(e,t){var n;switch("rudItemPart"==e?e=i.has(t,"is_builtin")&&t.is_builtin?"ruItemPart":e:"itemInputList"==e&&(e=i.has(t,"is_builtin")&&t.is_builtin?"itemInputListReduced":e),e){case"rudItemPart":n=this.rudItemPart;break;case"ruItemPart":n=this.ruItemPart;break;case"itemInputList":n=this.itemInputList;break;case"itemInputListReduced":n=this.itemInputListReduced}if(i.isEmpty(n))throw new Error("No valid template has been found in getTemplateEl()");return n},_toggleLocationAlertExpansion:function(i,n){var o=i.find(".czr-location-alert");if(!o.length){var s=["<span>"+serverControlParams.i18n.locationWarning+"</span>",e.CZR_Helpers.getDocSearchLink(serverControlParams.i18n.locationWarning)].join("");o=t("<div/>",{class:"czr-location-alert",html:s,style:"display:none"}),t('select[data-type="locations"]',i).closest("div").after(o)}o.toggle("expanded"==n)}})}(wp.customize,jQuery,_);var CZRBodyBgModuleMths=CZRBodyBgModuleMths||{};!function(e,t,i){t.extend(CZRBodyBgModuleMths,{initialize:function(n,o){var s=this;e.CZRModule.prototype.initialize.call(s,n,o),t.extend(s,{itemInputList:"czr-module-bodybg-item-content"}),s.inputConstructor=e.CZRInput.extend(s.CZRBodyBgInputMths||{}),s.itemConstructor=e.CZRItem.extend(s.CZBodyBgItemMths||{}),s.defaultItemModel={"background-color":"#eaeaea","background-image":"","background-repeat":"no-repeat","background-attachment":"fixed","background-position":"center center","background-size":"cover"},e.consoleLog("New module instantiated : ",s.id),i.has(e,"czr_activeSectionId")&&s.control.section()==e.czr_activeSectionId()&&"resolved"!=s.isReady.state()&&s.ready(),e.section(s.control.section()).expanded.bind(function(e){"resolved"!=s.isReady.state()&&s.ready()})},CZRBodyBgInputMths:{setupSelect:function(){var e,n=this,o={"background-repeat":"bg_repeat_options","background-attachment":"bg_attachment_options","background-position":"bg_position_options"},s=(n.input_parent,serverControlParams.body_bg_module_params);n.module;i.has(o,n.id)&&(i.isUndefined(s)||i.isUndefined(s[o[n.id]])||(e=s[o[n.id]],i.isEmpty(e)||(i.each(e,function(e,o){var s={value:o,html:e};(o==n()||i.contains(n(),o))&&t.extend(s,{selected:"selected"}),t("select[data-type]",n.container).append(t("<option>",s))}),t("select[data-type]",n.container).select2())))}},CZBodyBgItemMths:{ready:function(){var t=this;e.CZRItem.prototype.ready.call(t),t.inputCollection.bind(function(e){!i.isEmpty(_col)&&t.czr_Input&&t.czr_Input.has("background-image")&&t.czr_Input("background-image").isReady.done(function(e){var n=function(e){var n=!i.isEmpty(e)||i.isNumber(e);i.each(["background-repeat","background-attachment","background-position","background-size"],function(e){t.czr_Input(e).container.toggle(n||!1)})};n(e()),t.bind("background-image:changed",function(){n(t.czr_Input("background-image")())})})})}}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_widget_areas_module:{mthds:CZRWidgetAreaModuleMths,crud:!0,sektion_allowed:!1,name:"Widget Areas"},czr_social_module:{mthds:CZRSocialModuleMths,crud:!0,name:"Social Icons",has_mod_opt:!0},czr_background:{mthds:CZRBodyBgModuleMths,crud:!1,multi_item:!1,name:"Slider"}})}(wp.customize,jQuery,_);var CZRMultiplePickerMths=CZRMultiplePickerMths||{};!function(e,t,i){t.extend(CZRMultiplePickerMths,{ready:function(){var e=this,i=this.container.find("select");i.select2({closeOnSelect:!1,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),i.on("change",function(i){0===t(this).find("option:selected").length&&e.setting.set([])})}})}(wp.customize,jQuery,_);var CZRCroppedImageMths=CZRCroppedImageMths||{};!function(e,t,i){"function"==typeof wp.media.controller.Cropper&&"function"==typeof e.CroppedImageControl&&(wp.media.controller.CZRCustomizeImageCropper=wp.media.controller.Cropper.extend({doCrop:function(e){var t=e.get("cropDetails"),i=this.get("control");return t.dst_width=i.params.dst_width,t.dst_height=i.params.dst_height,wp.ajax.post("crop-image",{wp_customize:"on",nonce:e.get("nonces").edit,id:e.get("id"),context:i.id,cropDetails:t})}}),t.extend(CZRCroppedImageMths,{initFrame:function(){var e=_wpMediaViewsL10n;this.frame=wp.media({button:{text:e.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CZRCustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var e=this.frame.state().get("selection").first().toJSON();e.mime&&e.mime.indexOf("image")>-1?i.contains(["image/svg+xml","image/gif"],e.mime)||this.params.width===e.width&&this.params.height===e.height&&!this.params.flex_width&&!this.params.flex_height?(this.setImageFromAttachment(e),this.frame.close()):this.frame.setState("cropper"):this.frame.trigger("content:error")}}))}(wp.customize,jQuery,_);var CZRUploadMths=CZRUploadMths||{};!function(e,t,i){t.extend(CZRUploadMths,{ready:function(){var i=this;this.params.removed=this.params.removed||"",this.success=t.proxy(this.success,this),this.uploader=t.extend({container:this.container,browser:this.container.find(".czr-upload"),success:this.success,plupload:{},params:{}},this.uploader||{}),i.params.extensions&&(i.uploader.plupload.filters=[{title:e.l10n.allowedFiles,extensions:i.params.extensions}]),i.params.context&&(i.uploader.params["post_data[context]"]=this.params.context),e.settings.theme.stylesheet&&(i.uploader.params["post_data[theme]"]=e.settings.theme.stylesheet),this.uploader=new wp.Uploader(this.uploader),this.remover=this.container.find(".remove"),this.remover.on("click keydown",function(e){"keydown"===e.type&&13!==e.which||(i.setting.set(i.params.removed),e.preventDefault())}),this.removerVisibility=t.proxy(this.removerVisibility,this),this.setting.bind(this.removerVisibility),this.removerVisibility(this.setting())},success:function(e){this.setting.set(e.get("id"))},removerVisibility:function(e){this.remover.toggle(e!=this.params.removed)}})}(wp.customize,jQuery,_);var CZRLayoutSelectMths=CZRLayoutSelectMths||{};!function(e,t,i){t.extend(CZRLayoutSelectMths,{ready:function(){this.setupSelect()},setupSelect:function(e){var n=this;function o(e){if(!e.id)return e.text;if(i.has(n.params.layouts,e.element.value)){var o=n.params.layouts[e.element.value],s=o.src,r=o.label;return t('<img src="'+s+'" class="czr-layout-img" title="'+r+'" /><span class="czr-layout-title">'+r+"</span>")}}$_select=this.container.find("select"),$_select.select2({templateResult:o,templateSelection:o,minimumResultsForSearch:1/0})}})}(wp.customize,jQuery,_),function(e,t,i){e.CZRUploadControl=e.Control.extend(CZRUploadMths),e.CZRLayoutControl=e.Control.extend(CZRLayoutSelectMths),e.CZRMultiplePickerControl=e.Control.extend(CZRMultiplePickerMths),t.extend(e.controlConstructor,{czr_upload:e.CZRUploadControl,czr_multiple_picker:e.CZRMultiplePickerControl,czr_layouts:e.CZRLayoutControl}),"function"==typeof e.CroppedImageControl&&(e.CZRCroppedImageControl=e.CroppedImageControl.extend(CZRCroppedImageMths),t.extend(e.controlConstructor,{czr_cropped_image:e.CZRCroppedImageControl})),"function"==typeof e.CodeEditorControl&&t.extend(e.controlConstructor,{czr_code_editor:e.CodeEditorControl})}(wp.customize,jQuery,_),function(e,t,i){var n=serverControlParams.i18n||{};e.czr_CrtlDependenciesReady=t.Deferred(),e.bind("ready",function(){i.has(e,"czr_ctrlDependencies")||(serverControlParams.isSkopOn?"resolved"!=e.czr_skopeReady.state()&&e.czr_skopeReady.done(function(){e.czr_ctrlDependencies=new e.CZR_ctrlDependencies,e.czr_CrtlDependenciesReady.resolve()}):(e.czr_ctrlDependencies=new e.CZR_ctrlDependencies,e.czr_CrtlDependenciesReady.resolve()))}),e.CZR_ctrlDependencies=e.Class.extend({dominiDeps:[],initialize:function(){var t=this;if(this.defaultDominusParams={dominus:"",servi:[],visibility:null,actions:null,onSectionExpand:!0},this.dominiDeps=i.extend(this.dominiDeps,this._getControlDeps()),!i.isArray(t.dominiDeps))throw new Error("Visibilities : the dominos dependency array is not an array.");e.czr_activeSectionId.bind(function(n){if(!i.isEmpty(n)&&e.section.has(n))try{t.setServiDependencies(n)}catch(t){e.errorLog("In api.CZR_ctrlDependencies : "+t)}}),e.bind("awaken-section",function(n){if(serverControlParams.isSkopOn&&i.has(e,"czr_skopeBase"))e.czr_skopeBase.processSilentUpdates({candidates:{},section_id:n.target,refresh:!1}).then(function(){try{t.setServiDependencies(n.target,n.source)}catch(t){e.errorLog("On awaken-section, ctrl deps : "+t)}});else try{t.setServiDependencies(n.target,n.source)}catch(t){e.errorLog("On awaken-section, ctrl deps : "+t)}}),this._handleFaviconNote()},setServiDependencies:function(n,o,s){var r=this,a=t.Deferred();if(s=s||!1,i.isUndefined(n)||!e.section.has(n))throw new Error("Control Dependencies : the targetSectionId is missing or not registered : "+n);if(e.section(n).czr_ctrlDependenciesReady=e.section(n).czr_ctrlDependenciesReady||t.Deferred(),!s&&"resolved"==e.section(n).czr_ctrlDependenciesReady.state())return a.resolve().promise();i.each(r.dominiDeps,function(t){if(!i.has(t,"dominus")||!i.isString(t.dominus)||i.isEmpty(t.dominus))throw new Error("Control Dependencies : a dominus control id must be a not empty string.");var o=e.CZR_Helpers.build_setId(t.dominus);e.control.has(o)&&e.control(o).section()==n&&(t=r._prepareDominusParams(t),i.isEmpty(t)||r._processDominusCallbacks(t.dominus,t,s).fail(function(){e.consoleLog("self._processDominusCallbacks fail for section "+n),a.reject()}).done(function(){a.resolve()}))});var l=e.CZR_Helpers.getSectionControlIds(n),c=function(t){var n=[];return i.each(r.dominiDeps,function(o){if(i.has(o,"servi")&&i.isArray(o.servi)&&i.has(o,"dominus")&&!i.isEmpty(o.dominus)){if(i.contains(o.servi,t)&&!i.contains(n,o.dominus)){if(o=r._prepareDominusParams(o),i.isEmpty(o))return;n.push(o.dominus)}}else e.errorLog("Control Dependencies : wrong params in _getServusDomini.")}),i.isArray(n)?n:[]},d=[];return i.each(l,function(e){i.isEmpty(c(e))||(d=i.union(d,c(e)))}),i.each(d,function(t){var i=e.CZR_Helpers.build_setId(t);e.control(i).section()!=n&&o!=e.control(i).section()&&e.trigger("awaken-section",{target:e.control(i).section(),source:n})}),a.always(function(){e.section(n).czr_ctrlDependenciesReady.resolve()}),a.promise()},_deferCallbackForControl:function(n,o,s){var r=t.Deferred();if(i.isEmpty(n)||!i.isString(n))throw new Error("_deferCallbackForControl : the control id is missing.");if(!i.isFunction(o))throw new Error("_deferCallbackForControl : callback must be a funtion.");return s=i.isUndefined(s)||!i.isArray(s)?[]:s,e.control.has(n)?"resolved"==e.control(n).deferred.embedded.state()?t.when(o.apply(null,s)).fail(function(){r.reject()}).done(function(){r.resolve()}):e.control(n).deferred.embedded.then(function(){t.when(o.apply(null,s)).fail(function(){r.reject()}).done(function(){r.resolve()})}):e.control.when(n,function(){e.control(n).deferred.embedded.then(function(){t.when(o.apply(null,s)).fail(function(){r.reject()}).done(function(){r.resolve()})})}),r.promise()},_processDominusCallbacks:function(n,o,s){var r=this,a=e.CZR_Helpers.build_setId(n),l=e(a),c=t.Deferred(),d=!1;return i.each(o.servi,function(t){if(e.control.has(e.CZR_Helpers.build_setId(t))){var n=function(e,t,n,o){var s=arguments;i.each(n,function(e,t){switch(t){case"visibility":r._setVisibility.apply(null,s);break;case"actions":i.isFunction(e)&&e.apply(null,s)}})},s=function(i){i=i||l();var s=e.CZR_Helpers.build_setId(t);r._deferCallbackForControl(s,n,[i,t,o]).always(function(){d=!0}).fail(function(){c.reject()}).done(function(){c.resolve()})};s(),i.has(l,"czr_visibilityServi")||(l.czr_visibilityServi=new e.Value([]));var a=l.czr_visibilityServi();i.contains(a,t)||(l.bind(function(e){s(e)}),l.czr_visibilityServi(i.union(a,[t])))}}),d?c.promise():c.resolve().promise()},_setVisibility:function(t,n,o,s){var r=e.CZR_Helpers.build_setId(n),a=o.visibility(t,n,o.dominus);if(s=s||!1,i.isBoolean(a)&&("unchanged"!=a||s)){var l=function(){e.state.has("silent-update-processing")&&e.state("silent-update-processing")()||(e.control(r,function(e){i.has(e,"active")&&(a=a&&e.active()),i.has(e,"defaultActiveArguments")&&control.defaultActiveArguments,e.onChangeActive(a,e.defaultActiveArguments)}),e.state.has("silent-update-processing")&&e.state("silent-update-processing").unbind(l))};e.state.has("silent-update-processing")&&e.state("silent-update-processing")()?e.state("silent-update-processing").bind(l):l()}},_getControlDeps:function(){return{}},_prepareDominusParams:function(t){var n={};if(!i.isObject(t))return e.errorLog("Visibilities : a dominus param definition must be an object."),n;if(!i.has(t,"visibility")&&!i.has(t,"actions"))return e.errorLog("Visibilities : a dominus definition must include a visibility or an actions callback."),n;if(!i.has(t,"dominus")||!i.isString(t.dominus)||i.isEmpty(t.dominus))return e.errorLog("Visibilities : a dominus control id must be a not empty string."),n;var o=e.CZR_Helpers.build_setId(t.dominus);return e.control.has(o)?!i.has(t,"servi")||i.isUndefined(t.servi)||!i.isArray(t.servi)||i.isEmpty(t.servi)?(e.errorLog("Visibilities : servi must be set as an array not empty."),n):(i.each(this.defaultDominusParams,function(e,o){var s=t[o];switch(o){case"visibility":if(!i.isUndefined(s)&&!i.isEmpty(s)&&!i.isFunction(s))throw new Error("Visibilities : a dominus visibility callback must be a function : "+t.dominus);break;case"actions":if(!i.isUndefined(s)&&!i.isEmpty(s)&&!i.isFunction(s))throw new Error("Visibilities : a dominus actions callback must be a function : "+t.dominus);break;case"onSectionExpand":if(!i.isUndefined(s)&&!i.isEmpty(s)&&!i.isBoolean(s))throw new Error("Visibilities : a dominus onSectionExpand param must be a boolean : "+t.dominus)}n[o]=s}),n):(e.errorLog("Visibilities : a dominus control id is not registered : "+o),n)},_handleFaviconNote:function(){var t=this,i=e.CZR_Helpers.build_setId(serverControlParams.faviconOptionName);if(!(!e.has("site_icon")||!e.control("site_icon")||e.has(i)&&0==+e(i)()||+e("site_icon")()>0)){var o=e.control("site_icon").params.description;_newDes=["<strong>",n.faviconNote||"","</strong><br/><br/>"].join("")+o,t._printFaviconNote(_newDes),e("site_icon").callbacks.add(function(n){+n>0?(e.control("site_icon").container.find(".description").text(o),e.has(i)&&e(i).set("")):t._printFaviconNote(_newDes)})}},_printFaviconNote:function(t){e.control("site_icon").container.find(".description").html(t)}})}(wp.customize,jQuery,_),function(e,t){jQuery(function(t){var i=e.customize||i;t(".accordion-section").not(".control-panel").click(function(){var e,i;e=t(this),0!==(i=e.siblings(".open")).length&&i.offset().top<0&&t(".wp-full-overlay-sidebar-content").animate({scrollTop:-t("#customize-theme-controls").offset().top-i.height()+e.offset().top+t(".wp-full-overlay-sidebar-content").offset().top},700)}),i.czrSetupCheckbox=function(e,n){var o=i.control(e);t("input[type=checkbox]",o.container).each(function(){"tc_font_customizer_settings"!=o.params.section&&(0===t(this).val()||"0"==t(this).val()||"off"==t(this).val()||_.isEmpty(t(this).val())?t(this).prop("checked",!1):t(this).prop("checked",!0),0===t(this).closest('div[class^="icheckbox"]').length&&t(this).iCheck({checkboxClass:"icheckbox_flat-grey",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){t(this).val(!1===t(this).is(":checked")?0:1),t(e.currentTarget).trigger("change")}))})},i.czrSetupSelect=function(e,n){t("select[data-customize-setting-link]",i.control(e).container).not(".no-selecter-js").each(function(){t(this).selecter({})})},i.czrSetupStepper=function(e,n){var o=i.control(e);t('input[type="number"]',o.container).each(function(){t(this).stepper()})},i.control.each(function(e){if(_.has(e,"id")){"widget_"!=e.id.substring(0,"widget_".length)&&"nav_menu"!=e.id.substring(0,"nav_menu".length)&&i.czrSetupCheckbox(e.id),"nav_menu_locations"!=e.id.substring(0,"nav_menu_locations".length)&&i.czrSetupSelect(e.id);0<e.container.find('input[type="number"]').length&&e.params&&e.params.section&&!_.contains(["publish_settings","tc_font_customizer_settings"],e.params.section)&&i.czrSetupStepper(e.id)}});var n;n=t("<span/>",{class:"customize-controls-home fas fa-home",html:'<span class="screen-reader-text">Home</span>'}),t.when(t("#customize-header-actions").append(n)).done(function(){n.keydown(function(e){9!==e.which&&(13===e.which&&this.click(),e.preventDefault())}).on("click.customize-controls-home",function(){i.section.has(i.czr_activeSectionId())?i.section(i.czr_activeSectionId()).expanded(!1):i.section.each(function(e){e.expanded(!1)}),i.panel.each(function(e){e.expanded(!1)})})})})}(wp);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
addons/assets/czr/js/czr-preview-base.min.js CHANGED
@@ -1 +1 @@
1
- !function(a,b,c){b(function(){a.preview.bind("sync",function(b){a.preview.send("czr-skopes-synced",{czr_skopes:_wpCustomizeSettings.czr_skopes||[],isChangesetDirty:_wpCustomizeSettings.isChangesetDirty||!1,skopeGlobalDBOpt:_wpCustomizeSettings.skopeGlobalDBOpt||[]})})}),wp.customize.bind("preview-ready",function(){wp.customize.preview.bind("edit_sek",function(a){c.has(a,"id")&&b('[data-sek-id="'+a.id+'"]').length&&b("html, body").animate({scrollTop:b('[data-sek-id="'+a.id+'"]').offset().top-50},"slow")}),wp.customize.preview.bind("start_hovering_sek",function(a){if(c.has(a,"id")&&b('[data-sek-id="'+a.id+'"]').length){var d=b('[data-sek-id="'+a.id+'"]'),e=d.outerWidth(),f=d.outerHeight();d.closest(".czr-sektion").find(".czr-hover-placeholder").each(function(){b(this).remove()}),b.when(d.append(b("<div/>",{"class":"czr-hover-placeholder",style:"width:"+e+"px;height:"+f+"px;line-height:"+f+"px;",html:'<i class="material-icons">create</i>'}))).done(function(){b(".czr-hover-placeholder").css("opacity",1).fitText(.3,{minFontSize:"50px",maxFontSize:"100px"})})}}),wp.customize.preview.bind("stop_hovering_sek",function(a){if(c.has(a,"id")&&b('[data-sek-id="'+a.id+'"]').length){var d=b('[data-sek-id="'+a.id+'"]');b.when(d.find(".czr-hover-placeholder").fadeOut(200)).done(function(){d.find(".czr-hover-placeholder").remove()})}}),wp.customize.preview.bind("edit_module",function(a){c.has(a,"id")&&b('[data-module-id="'+a.id+'"]').length&&b("html, body").animate({scrollTop:b('[data-module-id="'+a.id+'"]').offset().top-50},"slow")}),wp.customize.preview.bind("start_hovering_module",function(a){if(c.has(a,"id")&&b('[data-module-id="'+a.id+'"]').length){var d=b('[data-module-id="'+a.id+'"]'),e=d.outerWidth(),f=d.outerHeight();d.closest(".czr-sektion").find(".czr-hover-placeholder").each(function(){b(this).remove()}),b.when(d.append(b("<div/>",{"class":"czr-hover-placeholder",style:"width:"+e+"px;height:"+f+"px;line-height:"+f+"px;",html:'<i class="material-icons">create</i>'}))).done(function(){b(".czr-hover-placeholder").css("opacity",1).fitText(.3,{minFontSize:"50px",maxFontSize:"100px"})})}}),wp.customize.preview.bind("stop_hovering_module",function(a){if(c.has(a,"id")&&b('[data-module-id="'+a.id+'"]').length){var d=b('[data-module-id="'+a.id+'"]');b.when(d.find(".czr-hover-placeholder").fadeOut(200)).done(function(){d.find(".czr-hover-placeholder").remove()})}})}),CZRPreviewParams&&!CZRPreviewParams.preview_ready_event_exists?a.czr_preview=new a.CZR_preview:a.bind("preview-ready",function(){a.preview.bind("active",function(){a.czr_preview=new a.CZR_preview})}),a.CZR_preview=a.Class.extend({setting_cbs:{},subsetting_cbs:{},input_cbs:{},_wp_sets:CZRPreviewParams.wpBuiltinSettings||[],_theme_options_name:CZRPreviewParams.themeOptions,initialize:function(){var a=this;this.pre_setting_cbs=c.extend(a.pre_setting_cbs,a.getPreSettingCbs()),this.setting_cbs=c.extend(a.setting_cbs,a.getSettingCbs()),this.subsetting_cbs=c.extend(a.subsetting_cbs,a.getSubSettingCbs()),this.input_cbs=c.extend(a.input_cbs,a.getInputCbs()),this.syncData(),this.addCbs(),b("body").removeClass("wp-customizer-unloading")},getPreSettingCbs:function(){return{}},getSettingCbs:function(){return{}},getSubSettingCbs:function(){return{}},getInputCbs:function(){return{}},syncData:function(){a.preview.send("czr-query-data-ready",a.settings.czr_wpQueryInfos),a.preview.send("houston-widget-settings",c.extend(_wpWidgetCustomizerPreviewSettings,{availableWidgetLocations:c.values(a.settings.availableWidgetLocations)})),a.preview.send("czr-partial-refresh-data","undefined"==typeof _customizePartialRefreshExports?{}:_customizePartialRefreshExports.partials)},addCbs:function(){var b=this;a.preview.bind("pre_setting",function(d){d=d||{};var e=d.set_id;if(a.has(b._build_setId(e))){var f=b._get_option_name(d.set_id);c.has(b.pre_setting_cbs,f)&&c.isFunction(b.pre_setting_cbs[f])&&b.pre_setting_cbs[f](d)}}),c.each(b.setting_cbs,function(d,e){a.has(b._build_setId(e))&&c.isFunction(b.setting_cbs[e])&&a(b._build_setId(e)).bind(b.setting_cbs[e])}),a.preview.bind("sub_setting",function(a){var d=b._get_option_name(a.set_id);c.has(b.subsetting_cbs,d)&&c.has(b.subsetting_cbs[d],a.changed_prop)&&b.subsetting_cbs[d][a.changed_prop](a)}),a.preview.bind("czr_input",function(a){var d={set_id:"",module_id:"",item_id:"",input_id:"",value:null};a=c.extend(d,a);var e=b._get_option_name(a.set_id);c.has(b.input_cbs,e)&&c.has(b.input_cbs[e],a.input_id)&&b.input_cbs[e][a.input_id](a)}),a.selectiveRefresh.bind("partial-content-rendered",function(d){if(c.has(d,"partial")&&c.has(d.partial,"id")){d.partial.id;a.preview.send("czr-partial-refresh-done",{set_id:b._build_setId(d.partial.id)})}})},_build_setId:function(a){var b=this;return c.contains(b._wp_sets,a)?a:-1==a.indexOf(b._theme_options_name)?[b._theme_options_name+"[",a,"]"].join(""):a},_get_option_name:function(a){var b=this;return a.replace(/\[|\]/g,"").replace(b._theme_options_name,"")},_is_external:function(a){var c=b.trim(a),d=location.host.split(".").slice(-2).join("."),e=new RegExp(d);if(""!==c&&"#"!=c&&_isValidURL(c))return!e.test(c)},_isValidURL:function(a){var b=/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return b.test(a)}})}(wp.customize,jQuery,_);
1
+ !function(e,t,i){t(function(){e.preview.bind("sync",function(t){e.preview.send("czr-skopes-synced",{czr_skopes:_wpCustomizeSettings.czr_skopes||[],isChangesetDirty:_wpCustomizeSettings.isChangesetDirty||!1,skopeGlobalDBOpt:_wpCustomizeSettings.skopeGlobalDBOpt||[]})})}),wp.customize.bind("preview-ready",function(){wp.customize.preview.bind("edit_sek",function(e){i.has(e,"id")&&t('[data-sek-id="'+e.id+'"]').length&&t("html, body").animate({scrollTop:t('[data-sek-id="'+e.id+'"]').offset().top-50},"slow")}),wp.customize.preview.bind("start_hovering_sek",function(e){if(i.has(e,"id")&&t('[data-sek-id="'+e.id+'"]').length){var n=t('[data-sek-id="'+e.id+'"]'),s=n.outerWidth(),o=n.outerHeight();n.closest(".czr-sektion").find(".czr-hover-placeholder").each(function(){t(this).remove()}),t.when(n.append(t("<div/>",{class:"czr-hover-placeholder",style:"width:"+s+"px;height:"+o+"px;line-height:"+o+"px;",html:'<i class="material-icons">create</i>'}))).done(function(){t(".czr-hover-placeholder").css("opacity",1).fitText(.3,{minFontSize:"50px",maxFontSize:"100px"})})}}),wp.customize.preview.bind("stop_hovering_sek",function(e){if(i.has(e,"id")&&t('[data-sek-id="'+e.id+'"]').length){var n=t('[data-sek-id="'+e.id+'"]');t.when(n.find(".czr-hover-placeholder").fadeOut(200)).done(function(){n.find(".czr-hover-placeholder").remove()})}}),wp.customize.preview.bind("edit_module",function(e){i.has(e,"id")&&t('[data-module-id="'+e.id+'"]').length&&t("html, body").animate({scrollTop:t('[data-module-id="'+e.id+'"]').offset().top-50},"slow")}),wp.customize.preview.bind("start_hovering_module",function(e){if(i.has(e,"id")&&t('[data-module-id="'+e.id+'"]').length){var n=t('[data-module-id="'+e.id+'"]'),s=n.outerWidth(),o=n.outerHeight();n.closest(".czr-sektion").find(".czr-hover-placeholder").each(function(){t(this).remove()}),t.when(n.append(t("<div/>",{class:"czr-hover-placeholder",style:"width:"+s+"px;height:"+o+"px;line-height:"+o+"px;",html:'<i class="material-icons">create</i>'}))).done(function(){t(".czr-hover-placeholder").css("opacity",1).fitText(.3,{minFontSize:"50px",maxFontSize:"100px"})})}}),wp.customize.preview.bind("stop_hovering_module",function(e){if(i.has(e,"id")&&t('[data-module-id="'+e.id+'"]').length){var n=t('[data-module-id="'+e.id+'"]');t.when(n.find(".czr-hover-placeholder").fadeOut(200)).done(function(){n.find(".czr-hover-placeholder").remove()})}})}),CZRPreviewParams&&!CZRPreviewParams.preview_ready_event_exists?e.czr_preview=new e.CZR_preview:e.bind("preview-ready",function(){e.preview.bind("active",function(){e.czr_preview=new e.CZR_preview})}),e.CZR_preview=e.Class.extend({setting_cbs:{},subsetting_cbs:{},input_cbs:{},_wp_sets:CZRPreviewParams.wpBuiltinSettings||[],_theme_options_name:CZRPreviewParams.themeOptions,initialize:function(){this.pre_setting_cbs=i.extend(this.pre_setting_cbs,this.getPreSettingCbs()),this.setting_cbs=i.extend(this.setting_cbs,this.getSettingCbs()),this.subsetting_cbs=i.extend(this.subsetting_cbs,this.getSubSettingCbs()),this.input_cbs=i.extend(this.input_cbs,this.getInputCbs()),this.syncData(),this.addCbs(),t("body").removeClass("wp-customizer-unloading")},getPreSettingCbs:function(){return{}},getSettingCbs:function(){return{}},getSubSettingCbs:function(){return{}},getInputCbs:function(){return{}},syncData:function(){e.preview.send("czr-query-data-ready",e.settings.czr_wpQueryInfos),e.preview.send("houston-widget-settings",i.extend(_wpWidgetCustomizerPreviewSettings,{availableWidgetLocations:i.values(e.settings.availableWidgetLocations)})),e.preview.send("czr-partial-refresh-data","undefined"==typeof _customizePartialRefreshExports?{}:_customizePartialRefreshExports.partials)},addCbs:function(){var t=this;e.preview.bind("pre_setting",function(n){var s=(n=n||{}).set_id;if(e.has(t._build_setId(s))){var o=t._get_option_name(n.set_id);i.has(t.pre_setting_cbs,o)&&i.isFunction(t.pre_setting_cbs[o])&&t.pre_setting_cbs[o](n)}}),i.each(t.setting_cbs,function(n,s){e.has(t._build_setId(s))&&i.isFunction(t.setting_cbs[s])&&e(t._build_setId(s)).bind(t.setting_cbs[s])}),e.preview.bind("sub_setting",function(e){var n=t._get_option_name(e.set_id);i.has(t.subsetting_cbs,n)&&i.has(t.subsetting_cbs[n],e.changed_prop)&&t.subsetting_cbs[n][e.changed_prop](e)}),e.preview.bind("czr_input",function(e){e=i.extend({set_id:"",module_id:"",item_id:"",input_id:"",value:null},e);var n=t._get_option_name(e.set_id);i.has(t.input_cbs,n)&&i.has(t.input_cbs[n],e.input_id)&&t.input_cbs[n][e.input_id](e)}),e.selectiveRefresh.bind("partial-content-rendered",function(n){if(i.has(n,"partial")&&i.has(n.partial,"id")){n.partial.id;e.preview.send("czr-partial-refresh-done",{set_id:t._build_setId(n.partial.id)})}})},_build_setId:function(e){return i.contains(this._wp_sets,e)?e:-1==e.indexOf(this._theme_options_name)?[this._theme_options_name+"[",e,"]"].join(""):e},_get_option_name:function(e){return e.replace(/\[|\]/g,"").replace(this._theme_options_name,"")},_is_external:function(e){var i=t.trim(e),n=location.host.split(".").slice(-2).join("."),s=new RegExp(n);if(""!==i&&"#"!=i&&_isValidURL(i))return!s.test(i)},_isValidURL:function(e){return/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(e)}})}(wp.customize,jQuery,_);
addons/assets/front/js/jQuerySharrre.min.js CHANGED
@@ -1,7 +1 @@
1
- /*!
2
- * Sharrre.com - Make your sharing widget!
3
- * Version: 2.0.1
4
- * Author: Julien Hany
5
- * License: MIT http://en.wikipedia.org/wiki/MIT_License or GPLv2 http://en.wikipedia.org/wiki/GNU_General_Public_License
6
- */
7
- var SharrrePlatform=SharrrePlatform||function(){var a={};return{register:function(b,c){a[b]=c},get:function(b,c){return a[b]?new a[b](c):(console.error("Sharrre - No platform found for "+b),!1)}}}();!function(a,b){"undefined"!=typeof a&&(b.register("linkedin",function(b){return defaultSettings={url:"",urlCount:!1,counter:"",count:!0,popup:{width:550,height:550}},defaultSettings=a.extend(!0,{},defaultSettings,b),{settings:defaultSettings,url:function(a){return"https://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?"},trackingAction:{site:"linkedin",action:"share"},load:function(b){var c=this.settings;a(b.element).find(".buttons").append('<div class="button linkedin"><script type="IN/share" data-url="'+(""!==c.url?c.url:b.options.url)+'" data-counter="'+c.counter+'"></script></div>');var d=0;"undefined"==typeof window.IN&&0===d?(d=1,function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://platform.linkedin.com/in.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}()):"undefined"!=typeof window.IN&&window.IN.parse&&IN.parse(document)},tracking:function(){},popup:function(a){window.open("https://www.linkedin.com/cws/share?url="+encodeURIComponent(""!==this.settings.url?this.settings.url:a.url)+"&token=&isFramed=true","linkedin","toolbar=no, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),b.register("facebook",function(b){return defaultSettings={url:"",urlCount:!1,action:"like",layout:"button_count",count:!0,width:"",send:"false",faces:"false",colorscheme:"",font:"",lang:"en_US",share:"",appId:"",popup:{width:900,height:500}},defaultSettings=a.extend(!0,{},defaultSettings,b),{settings:defaultSettings,url:function(a){return"https://graph.facebook.com/?id={url}&callback=?"},trackingAction:{site:"facebook",action:"like"},load:function(b){var c=this.settings;a(b.element).find(".buttons").append('<div class="button facebook"><div id="fb-root"></div><div class="fb-like" data-href="'+(""!==c.url?c.url:b.options.url)+'" data-send="'+c.send+'" data-layout="'+c.layout+'" data-width="'+c.width+'" data-show-faces="'+c.faces+'" data-action="'+c.action+'" data-colorscheme="'+c.colorscheme+'" data-font="'+c.font+'" data-via="'+c.via+'" data-share="'+c.share+'"></div></div>');var d=0;"undefined"==typeof FB&&0===d?(d=1,function(a,b,d){var e,f=a.getElementsByTagName(b)[0];a.getElementById(d)||(e=a.createElement(b),e.id=d,e.src="https://connect.facebook.net/"+c.lang+"/all.js#xfbml=1",c.appId&&(e.src+="&appId="+c.appId),f.parentNode.insertBefore(e,f))}(document,"script","facebook-jssdk")):FB.XFBML.parse()},tracking:function(){fb=window.setInterval(function(){"undefined"!=typeof FB&&"undefined"!=typeof _gaq&&(FB.Event.subscribe("edge.create",function(a){_gaq.push(["_trackSocial","facebook","like",a])}),FB.Event.subscribe("edge.remove",function(a){_gaq.push(["_trackSocial","facebook","unlike",a])}),FB.Event.subscribe("message.send",function(a){_gaq.push(["_trackSocial","facebook","send",a])}),clearInterval(fb))},1e3)},popup:function(a){window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(""!==this.settings.url?this.settings.url:a.url)+"&t="+a.text,"","toolbar=0, status=0, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),b.register("googlePlus",function(b){return defaultSettings={url:"",urlCount:!1,size:"medium",lang:"en-US",annotation:"",count:!0,popup:{width:900,height:500}},defaultSettings=a.extend(!0,{},defaultSettings,b),{settings:defaultSettings,url:function(a){return a+"?url={url}&type=googlePlus"},trackingAction:{site:"Google",action:"+1"},load:function(b){var c=this.settings;a(b.element).find(".buttons").append('<div class="button googleplus"><div class="g-plusone" data-size="'+c.size+'" data-href="'+(""!==c.url?c.url:b.options.url)+'" data-annotation="'+c.annotation+'"></div></div>'),window.___gcfg={lang:c.lang};var d=0;"undefined"!=typeof gapi&&"undefined"!=typeof gapi.plusone||0!==d?gapi.plusone.go():(d=1,function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://apis.google.com/js/plusone.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}())},tracking:function(){},popup:function(a){window.open("https://plus.google.com/share?hl="+this.settings.lang+"&url="+encodeURIComponent(""!==this.settings.url?this.settings.url:a.url),"","toolbar=0, status=0, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),b.register("pinterest",function(b){return defaultSettings={url:"",media:"",description:"",layout:"horizontal",popup:{width:700,height:300}},defaultSettings=a.extend(!0,{},defaultSettings,b),{settings:defaultSettings,url:function(a){return"https://api.pinterest.com/v1/urls/count.json?url={url}&callback=?"},trackingAction:{site:"pinterest",action:"pin"},load:function(b){var c=this.settings;a(b.element).find(".buttons").append('<div class="button pinterest"><a href="https://www.pinterest.com/pin/create/button/?url='+(""!==c.url?c.url:b.options.url)+"&media="+c.media+"&description="+c.description+'" data-pin-do="buttonBookmark" count-layout="'+c.layout+'">Pin It</a></div>'),function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://assets.pinterest.com/js/pinit.js",a.setAttribute("data-pin-build","parsePinBtns");var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}(),window.parsePinBtns&&window.parsePinBtns(),a(b.element).find(".pinterest").on("click",function(){b.openPopup("pinterest")})},tracking:function(){},popup:function(a){window.open("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(""!==this.settings.url?this.settings.url:a.url)+"&media="+encodeURIComponent(this.settings.media)+"&description="+this.settings.description,"pinterest","toolbar=no,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),b.register("twitter",function(b){return defaultSettings={url:"",urlCount:!1,count:!1,hashtags:"",via:"",related:"",lang:"en",popup:{width:650,height:360}},defaultSettings=a.extend(!0,{},defaultSettings,b),{settings:defaultSettings,trackingAction:{site:"twitter",action:"tweet"},url:function(a){return"http://opensharecount.com/count.json?url={url}"},load:function(b){var c=this.settings;a(b.element).find(".buttons").append('<div class="button twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="'+(""!==c.url?c.url:b.options.url)+'" data-count="'+c.count+'" data-text="'+b.options.text+'" data-via="'+c.via+'" data-hashtags="'+c.hashtags+'" data-related="'+c.related+'" data-lang="'+c.lang+'">Tweet</a></div>');var d=0;"undefined"==typeof twttr&&0===d?(d=1,function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://platform.twitter.com/widgets.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}()):a.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script",cache:!0})},tracking:function(){tw=window.setInterval(function(){"undefined"!=typeof twttr&&(twttr.events.bind("tweet",function(a){a&&"undefined"!=typeof _gaq&&_gaq.push(["_trackSocial","twitter","tweet"])}),clearInterval(tw))},1e3)},popup:function(a){window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(a.text)+"&url="+encodeURIComponent(""!==this.settings.url?this.setting.url:a.url)+(""!==this.settings.via?"&via="+this.settings.via:""),"","toolbar=0, status=0,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),b.register("twitterFollow",function(b){return defaultSettings={url:"",urlCount:!1,count:!0,display:"horizontal",lang:"en",popup:{width:650,height:360},user:"",size:"default",showCount:"false"},defaultSettings=a.extend(!0,{},defaultSettings,b),{settings:defaultSettings,trackingAction:{site:"twitter",action:"follow"},url:function(a){return""},load:function(b){var c=this.settings;a(b.element).find(".buttons").append('<div class="button twitterFollow"><a href="https://twitter.com/'+c.user+'" class="twitter-follow-button"" data-size="'+c.size+'" data-show-count="'+c.showCount+'" data-lang="'+c.lang+'">Follow @'+c.user+"</a></div>");var d=0;"undefined"==typeof twttr&&0===d?(d=1,function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://platform.twitter.com/widgets.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}()):a.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script",cache:!0})},tracking:function(){},popup:function(a){window.open("https://twitter.com/intent/follow?screen_name="+encodeURIComponent(this.settings.user),"","toolbar=0, status=0, ,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}))}(window.jQuery,SharrrePlatform),function(a,b,c,d){function e(b,c){this.element=b,this.options=a.extend(!0,{},g,c),this.options.share=c.share,this._defaults=g,this._name=f,this.platforms={},this.init()}var f="sharrre",g={className:"sharrre",share:{},shareTotal:0,template:"",title:"",url:c.location.href,text:c.title,urlCurl:"sharrre.php",count:{},total:0,shorterTotal:!0,enableHover:!0,enableCounter:!0,enableTracking:!1,defaultUrl:"javascript:void(0);",popup:{width:900,height:500},hover:function(){},hide:function(){},click:function(){},render:function(){}};e.prototype.init=function(){var b=this;a.each(b.options.share,function(a,c){c===!0&&(b.platforms[a]=SharrrePlatform.get(a,b.options.buttons[a]))}),a(this.element).addClass(this.options.className),"undefined"!=typeof a(this.element).data("title")&&(this.options.title=a(this.element).attr("data-title")),"undefined"!=typeof a(this.element).data("url")&&(this.options.url=a(this.element).data("url")),"undefined"!=typeof a(this.element).data("text")&&(this.options.text=a(this.element).data("text")),a.each(this.options.share,function(a,c){c===!0&&b.options.shareTotal++}),b.options.enableCounter===!0?a.each(this.options.share,function(a,c){if(c===!0)try{b.getSocialJson(a)}catch(d){}}):""!==b.options.template&&(b.renderer(),b.options.count[name]=0,b.rendererPerso()),""!==b.options.template?this.options.render(this,this.options):this.loadButtons(),a(this.element).on("mouseenter",function(){0===a(this).find(".buttons").length&&b.options.enableHover===!0&&b.loadButtons(),b.options.hover(b,b.options)}).on("mouseleave",function(){b.options.hide(b,b.options)}),a(this.element).click(function(a){return a.preventDefault(),b.options.click(b,b.options),!1})},e.prototype.loadButtons=function(){var b=this;a(this.element).append('<div class="buttons"></div>'),a.each(b.options.share,function(a,c){c===!0&&(b.platforms[a].load(b),b.options.enableTracking===!0&&b.platforms[a].tracking())})},e.prototype.getSocialJson=function(b){var c=this,d=0,e=c.platforms[b].settings,f=c.platforms[b].url(this.options.urlCurl),g=encodeURIComponent(this.options.url);e.url.length&&(f=e.url),e.urlCount===!0&&""!==f&&(g=f),e.count===!1&&(f=""),url=f.replace("{url}",g),"twitter"==b&&(f=c.platforms[b].url()),""!==url?a.getJSON(url,function(a){if("undefined"!=typeof a.count){var e=a.count+"";e=e.replace(" ",""),d+=parseInt(e,10)}else"undefined"!=typeof a.share&&"undefined"!=typeof a.share.share_count?d+=parseInt(a.share.share_count,10):"undefined"!=typeof a[0]?d+=parseInt(a[0].total_posts,10):"undefined"!=typeof a[0];c.options.count[b]=d,c.options.total+=d,c.renderer(),c.rendererPerso()}).error(function(){c.options.count[b]=0,c.rendererPerso()}):(c.renderer(),c.options.count[b]=0,c.rendererPerso())},e.prototype.rendererPerso=function(){var a=0;for(var b in this.options.count)a++;a===this.options.shareTotal&&this.options.render(this,this.options)},e.prototype.renderer=function(){var b=this.options.total,c=this.options.template;this.options.shorterTotal===!0&&(b=this.shorterTotal(b)),""!==c?(c=c.replace("{total}",b),a(this.element).html(c)):a(this.element).html('<div class="box"><a class="count" href="'+this.options.defaultUrl+'">'+b+"</a>"+(""!==this.options.title?'<a class="share" href="'+this.options.defaultUrl+'">'+this.options.title+"</a>":"")+"</div>")},e.prototype.shorterTotal=function(a){return a>=1e6?a=(a/1e6).toFixed(2)+"M":a>=1e3&&(a=(a/1e3).toFixed(1)+"k"),a},e.prototype.openPopup=function(a){this.platforms[a].popup(this.options),this.options.enableTracking===!0&&"undefined"!=typeof _gaq&&(infos=this.platforms[a].trackingAction,_gaq.push(["_trackSocial",infos.site,infos.action]))},e.prototype.simulateClick=function(){var b=a(this.element).html();a(this.element).html(b.replace(this.options.total,this.options.total+1))},e.prototype.update=function(a,b){""!==a&&(this.options.url=a),""!==b&&(this.options.text=b)},a.fn[f]=function(b){var c=arguments;return b===d||"object"==typeof b?this.each(function(){a(this).data("plugin_"+f)||a(this).data("plugin_"+f,new e(this,b))}):"string"==typeof b&&"_"!==b[0]&&"init"!==b?this.each(function(){var d=a(this).data("plugin_"+f);d instanceof e&&"function"==typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(c,1))}):void 0}}(window.jQuery||window.Zepto,window,document);
1
+ var SharrrePlatform=SharrrePlatform||function(){var t={};return{register:function(e,n){t[e]=n},get:function(e,n){return t[e]?new t[e](n):(console.error("Sharrre - No platform found for "+e),!1)}}}();!function(t,e){void 0!==t&&(e.register("linkedin",function(e){return defaultSettings={url:"",urlCount:!1,counter:"",count:!0,popup:{width:550,height:550}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return"https://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?"},trackingAction:{site:"linkedin",action:"share"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button linkedin"><script type="IN/share" data-url="'+(""!==n.url?n.url:e.options.url)+'" data-counter="'+n.counter+'"><\/script></div>');var i=0;void 0===window.IN&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.linkedin.com/in.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):void 0!==window.IN&&window.IN.parse&&IN.parse(document)},tracking:function(){},popup:function(t){window.open("https://www.linkedin.com/cws/share?url="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&token=&isFramed=true","linkedin","toolbar=no, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("facebook",function(e){return defaultSettings={url:"",urlCount:!1,action:"like",layout:"button_count",count:!0,width:"",send:"false",faces:"false",colorscheme:"",font:"",lang:"en_US",share:"",appId:"",popup:{width:900,height:500}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return"https://graph.facebook.com/?id={url}&callback=?"},trackingAction:{site:"facebook",action:"like"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button facebook"><div id="fb-root"></div><div class="fb-like" data-href="'+(""!==n.url?n.url:e.options.url)+'" data-send="'+n.send+'" data-layout="'+n.layout+'" data-width="'+n.width+'" data-show-faces="'+n.faces+'" data-action="'+n.action+'" data-colorscheme="'+n.colorscheme+'" data-font="'+n.font+'" data-via="'+n.via+'" data-share="'+n.share+'"></div></div>');var i,o,s,a=0;"undefined"==typeof FB&&0===a?(a=1,i=document,s=i.getElementsByTagName("script")[0],i.getElementById("facebook-jssdk")||((o=i.createElement("script")).id="facebook-jssdk",o.src="https://connect.facebook.net/"+n.lang+"/all.js#xfbml=1",n.appId&&(o.src+="&appId="+n.appId),s.parentNode.insertBefore(o,s))):FB.XFBML.parse()},tracking:function(){fb=window.setInterval(function(){"undefined"!=typeof FB&&"undefined"!=typeof _gaq&&(FB.Event.subscribe("edge.create",function(t){_gaq.push(["_trackSocial","facebook","like",t])}),FB.Event.subscribe("edge.remove",function(t){_gaq.push(["_trackSocial","facebook","unlike",t])}),FB.Event.subscribe("message.send",function(t){_gaq.push(["_trackSocial","facebook","send",t])}),clearInterval(fb))},1e3)},popup:function(t){window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&t="+t.text,"","toolbar=0, status=0, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("googlePlus",function(e){return defaultSettings={url:"",urlCount:!1,size:"medium",lang:"en-US",annotation:"",count:!0,popup:{width:900,height:500}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return t+"?url={url}&type=googlePlus"},trackingAction:{site:"Google",action:"+1"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button googleplus"><div class="g-plusone" data-size="'+n.size+'" data-href="'+(""!==n.url?n.url:e.options.url)+'" data-annotation="'+n.annotation+'"></div></div>'),window.___gcfg={lang:n.lang};var i=0;"undefined"!=typeof gapi&&void 0!==gapi.plusone||0!==i?gapi.plusone.go():(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://apis.google.com/js/plusone.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}())},tracking:function(){},popup:function(t){window.open("https://plus.google.com/share?hl="+this.settings.lang+"&url="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url),"","toolbar=0, status=0, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("pinterest",function(e){return defaultSettings={url:"",media:"",description:"",layout:"horizontal",popup:{width:700,height:300}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return"https://api.pinterest.com/v1/urls/count.json?url={url}&callback=?"},trackingAction:{site:"pinterest",action:"pin"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button pinterest"><a href="https://www.pinterest.com/pin/create/button/?url='+(""!==n.url?n.url:e.options.url)+"&media="+n.media+"&description="+n.description+'" data-pin-do="buttonBookmark" count-layout="'+n.layout+'">Pin It</a></div>'),function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://assets.pinterest.com/js/pinit.js",t.setAttribute("data-pin-build","parsePinBtns");var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}(),window.parsePinBtns&&window.parsePinBtns(),t(e.element).find(".pinterest").on("click",function(){e.openPopup("pinterest")})},tracking:function(){},popup:function(t){window.open("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&media="+encodeURIComponent(this.settings.media)+"&description="+this.settings.description,"pinterest","toolbar=no,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("twitter",function(e){return defaultSettings={url:"",urlCount:!1,count:!1,hashtags:"",via:"",related:"",lang:"en",popup:{width:650,height:360}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,trackingAction:{site:"twitter",action:"tweet"},url:function(t){return"http://opensharecount.com/count.json?url={url}"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="'+(""!==n.url?n.url:e.options.url)+'" data-count="'+n.count+'" data-text="'+e.options.text+'" data-via="'+n.via+'" data-hashtags="'+n.hashtags+'" data-related="'+n.related+'" data-lang="'+n.lang+'">Tweet</a></div>');var i=0;"undefined"==typeof twttr&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.twitter.com/widgets.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):t.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script",cache:!0})},tracking:function(){tw=window.setInterval(function(){"undefined"!=typeof twttr&&(twttr.events.bind("tweet",function(t){t&&"undefined"!=typeof _gaq&&_gaq.push(["_trackSocial","twitter","tweet"])}),clearInterval(tw))},1e3)},popup:function(t){window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(t.text)+"&url="+encodeURIComponent(""!==this.settings.url?this.setting.url:t.url)+(""!==this.settings.via?"&via="+this.settings.via:""),"","toolbar=0, status=0,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("twitterFollow",function(e){return defaultSettings={url:"",urlCount:!1,count:!0,display:"horizontal",lang:"en",popup:{width:650,height:360},user:"",size:"default",showCount:"false"},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,trackingAction:{site:"twitter",action:"follow"},url:function(t){return""},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button twitterFollow"><a href="https://twitter.com/'+n.user+'" class="twitter-follow-button"" data-size="'+n.size+'" data-show-count="'+n.showCount+'" data-lang="'+n.lang+'">Follow @'+n.user+"</a></div>");var i=0;"undefined"==typeof twttr&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.twitter.com/widgets.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):t.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script",cache:!0})},tracking:function(){},popup:function(t){window.open("https://twitter.com/intent/follow?screen_name="+encodeURIComponent(this.settings.user),"","toolbar=0, status=0, ,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}))}(window.jQuery,SharrrePlatform),function(t,e,n,i){var o="sharrre",s={className:"sharrre",share:{},shareTotal:0,template:"",title:"",url:n.location.href,text:n.title,urlCurl:"sharrre.php",count:{},total:0,shorterTotal:!0,enableHover:!0,enableCounter:!0,enableTracking:!1,defaultUrl:"javascript:void(0);",popup:{width:900,height:500},hover:function(){},hide:function(){},click:function(){},render:function(){}};function a(e,n){this.element=e,this.options=t.extend(!0,{},s,n),this.options.share=n.share,this._defaults=s,this._name=o,this.platforms={},this.init()}a.prototype.init=function(){var e=this;t.each(e.options.share,function(t,n){!0===n&&(e.platforms[t]=SharrrePlatform.get(t,e.options.buttons[t]))}),t(this.element).addClass(this.options.className),void 0!==t(this.element).data("title")&&(this.options.title=t(this.element).attr("data-title")),void 0!==t(this.element).data("url")&&(this.options.url=t(this.element).data("url")),void 0!==t(this.element).data("text")&&(this.options.text=t(this.element).data("text")),t.each(this.options.share,function(t,n){!0===n&&e.options.shareTotal++}),!0===e.options.enableCounter?t.each(this.options.share,function(t,n){if(!0===n)try{e.getSocialJson(t)}catch(t){}}):""!==e.options.template&&(e.renderer(),e.options.count[name]=0,e.rendererPerso()),""!==e.options.template?this.options.render(this,this.options):this.loadButtons(),t(this.element).on("mouseenter",function(){0===t(this).find(".buttons").length&&!0===e.options.enableHover&&e.loadButtons(),e.options.hover(e,e.options)}).on("mouseleave",function(){e.options.hide(e,e.options)}),t(this.element).click(function(t){return t.preventDefault(),e.options.click(e,e.options),!1})},a.prototype.loadButtons=function(){var e=this;t(this.element).append('<div class="buttons"></div>'),t.each(e.options.share,function(t,n){!0===n&&(e.platforms[t].load(e),!0===e.options.enableTracking&&e.platforms[t].tracking())})},a.prototype.getSocialJson=function(e){var n=this,i=0,o=n.platforms[e].settings,s=n.platforms[e].url(this.options.urlCurl),a=encodeURIComponent(this.options.url);o.url.length&&(s=o.url),!0===o.urlCount&&""!==s&&(a=s),!1===o.count&&(s=""),url=s.replace("{url}",a),"twitter"==e&&(s=n.platforms[e].url()),""!==url?t.getJSON(url,function(t){if(void 0!==t.count){var o=t.count+"";o=o.replace(" ",""),i+=parseInt(o,10)}else void 0!==t.share&&void 0!==t.share.share_count?i+=parseInt(t.share.share_count,10):void 0!==t[0]?i+=parseInt(t[0].total_posts,10):t[0];n.options.count[e]=i,n.options.total+=i,n.renderer(),n.rendererPerso()}).error(function(){n.options.count[e]=0,n.rendererPerso()}):(n.renderer(),n.options.count[e]=0,n.rendererPerso())},a.prototype.rendererPerso=function(){var t=0;for(var e in this.options.count)t++;t===this.options.shareTotal&&this.options.render(this,this.options)},a.prototype.renderer=function(){var e=this.options.total,n=this.options.template;!0===this.options.shorterTotal&&(e=this.shorterTotal(e)),""!==n?(n=n.replace("{total}",e),t(this.element).html(n)):t(this.element).html('<div class="box"><a class="count" href="'+this.options.defaultUrl+'">'+e+"</a>"+(""!==this.options.title?'<a class="share" href="'+this.options.defaultUrl+'">'+this.options.title+"</a>":"")+"</div>")},a.prototype.shorterTotal=function(t){return t>=1e6?t=(t/1e6).toFixed(2)+"M":t>=1e3&&(t=(t/1e3).toFixed(1)+"k"),t},a.prototype.openPopup=function(t){this.platforms[t].popup(this.options),!0===this.options.enableTracking&&"undefined"!=typeof _gaq&&(infos=this.platforms[t].trackingAction,_gaq.push(["_trackSocial",infos.site,infos.action]))},a.prototype.simulateClick=function(){var e=t(this.element).html();t(this.element).html(e.replace(this.options.total,this.options.total+1))},a.prototype.update=function(t,e){""!==t&&(this.options.url=t),""!==e&&(this.options.text=e)},t.fn[o]=function(e){var n=arguments;return void 0===e||"object"==typeof e?this.each(function(){t(this).data("plugin_"+o)||t(this).data("plugin_"+o,new a(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?this.each(function(){var i=t(this).data("plugin_"+o);i instanceof a&&"function"==typeof i[e]&&i[e].apply(i,Array.prototype.slice.call(n,1))}):void 0}}(window.jQuery||window.Zepto,window,document);
 
 
 
 
 
 
addons/assets/global/oldBrowserCompat.min.js CHANGED
@@ -1,7 +1 @@
1
- /*! addEventListener Polyfill ie9- http://stackoverflow.com/a/27790212*/
2
- window.addEventListener=window.addEventListener||function(a,b){window.attachEvent("on"+a,b)},/*! Datenow Polyfill ie9- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now */
3
- Date.now||(Date.now=function(){return(new Date).getTime()}),/*! Object.create monkey patch ie8 http://stackoverflow.com/a/18020326 */
4
- Object.create||(Object.create=function(a,b){function c(){}if("undefined"!=typeof b)throw"The multiple-argument version of Object.create is not provided by this browser and cannot be shimmed.";return c.prototype=a,new c}),/*! https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter */
5
- Array.prototype.filter||(Array.prototype.filter=function(a){"use strict";if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments.length>=2?arguments[1]:void 0,f=0;f<c;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),/*! map was added to the ECMA-262 standard in the 5th edition */
6
- Array.prototype.map||(Array.prototype.map=function(a,b){var c,d,e;if(null===this)throw new TypeError(" this is null or not defined");var f=Object(this),g=f.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=new Array(g),e=0;e<g;){var h,i;e in f&&(h=f[e],i=a.call(c,h,e,f),d[e]=i),e++}return d}),/*! Array.from was added to the ECMA-262 standard in the 6th edition (ES2015) */
7
- Array.from||(Array.from=function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}());
1
+ window.addEventListener=window.addEventListener||function(r,t){window.attachEvent("on"+r,t)},Date.now||(Date.now=function(){return(new Date).getTime()}),Object.create||(Object.create=function(r,t){if(void 0!==t)throw"The multiple-argument version of Object.create is not provided by this browser and cannot be shimmed.";function e(){}return e.prototype=r,new e}),Array.prototype.filter||(Array.prototype.filter=function(r){"use strict";if(void 0===this||null===this)throw new TypeError;var t=Object(this),e=t.length>>>0;if("function"!=typeof r)throw new TypeError;for(var n=[],o=arguments.length>=2?arguments[1]:void 0,i=0;i<e;i++)if(i in t){var a=t[i];r.call(o,a,i,t)&&n.push(a)}return n}),Array.prototype.map||(Array.prototype.map=function(r,t){var e,n,o;if(null===this)throw new TypeError(" this is null or not defined");var i=Object(this),a=i.length>>>0;if("function"!=typeof r)throw new TypeError(r+" is not a function");for(arguments.length>1&&(e=t),n=new Array(a),o=0;o<a;){var f,u;o in i&&(f=i[o],u=r.call(e,f,o,i),n[o]=u),o++}return n}),Array.from||(Array.from=function(){var r=Object.prototype.toString,t=function(t){return"function"==typeof t||"[object Function]"===r.call(t)},e=Math.pow(2,53)-1,n=function(r){var t,n=(t=Number(r),isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t);return Math.min(Math.max(n,0),e)};return function(r){var e=Object(r);if(null==r)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,i=arguments.length>1?arguments[1]:void 0;if(void 0!==i){if(!t(i))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var a,f=n(e.length),u=t(this)?Object(new this(f)):new Array(f),c=0;c<f;)a=e[c],u[c]=i?void 0===o?i(a,c):i.call(o,a,c):a,c+=1;return u.length=f,u}}());
 
 
 
 
 
 
addons/czr/ha-czr.php CHANGED
@@ -35,17 +35,19 @@ class HA_Czr {
35
  * @since Hueman 3.3.0
36
  */
37
  function hu_customize_controls_js_css() {
 
 
 
38
  //Hueman Addons Specifics
39
  wp_enqueue_style(
40
  'ha-czr-addons-controls-style',
41
  sprintf( '%1$saddons/assets/czr/css/czr-control-footer.css', HU_AD() -> ha_get_base_url() ),
42
  array( 'customize-controls' ),
43
- time(),
44
  $media = 'all'
45
  );
46
 
47
- //Enqueue most recent fmk for js and css
48
- $hu_theme = wp_get_theme();
49
  $is_pro = HU_AD() -> ha_is_pro_addons() || HU_AD() -> ha_is_pro_theme();
50
  if ( $is_pro || true == version_compare( $hu_theme -> version, LAST_THEME_VERSION_FMK_SYNC , '<' ) ) {
51
  $wp_styles = wp_styles();
@@ -57,7 +59,7 @@ class HA_Czr {
57
  ( defined('WP_DEBUG') && true === WP_DEBUG ) ? '' : '.min'
58
  );
59
  $ver_css = $wp_styles->registered['hu-customizer-controls-style'] -> ver;
60
- $wp_styles->registered['hu-customizer-controls-style'] -> ver = ( defined('CZR_DEV') && true === CZR_DEV ) ? $ver_css . time() : $ver_css;
61
  }
62
  if ( isset( $wp_scripts->registered['hu-customizer-controls'] ) ) {
63
  $wp_scripts->registered['hu-customizer-controls'] -> src = sprintf(
@@ -67,7 +69,7 @@ class HA_Czr {
67
  ( defined('WP_DEBUG') && true === WP_DEBUG ) ? '' : '.min'
68
  );
69
  $ver = $wp_scripts->registered['hu-customizer-controls'] -> ver;
70
- $wp_scripts->registered['hu-customizer-controls'] -> ver = ( defined('CZR_DEV') && true === CZR_DEV ) ? $ver . time() : $ver;
71
  }
72
  }
73
  }
35
  * @since Hueman 3.3.0
36
  */
37
  function hu_customize_controls_js_css() {
38
+
39
+ $hu_theme = wp_get_theme();
40
+
41
  //Hueman Addons Specifics
42
  wp_enqueue_style(
43
  'ha-czr-addons-controls-style',
44
  sprintf( '%1$saddons/assets/czr/css/czr-control-footer.css', HU_AD() -> ha_get_base_url() ),
45
  array( 'customize-controls' ),
46
+ ( defined('CZR_DEV') && true === CZR_DEV ) ? $hu_theme -> version . time() : $hu_theme -> version,
47
  $media = 'all'
48
  );
49
 
50
+ //Enqueue most recent fmk for js and css;
 
51
  $is_pro = HU_AD() -> ha_is_pro_addons() || HU_AD() -> ha_is_pro_theme();
52
  if ( $is_pro || true == version_compare( $hu_theme -> version, LAST_THEME_VERSION_FMK_SYNC , '<' ) ) {
53
  $wp_styles = wp_styles();
59
  ( defined('WP_DEBUG') && true === WP_DEBUG ) ? '' : '.min'
60
  );
61
  $ver_css = $wp_styles->registered['hu-customizer-controls-style'] -> ver;
62
+ $wp_styles->registered['hu-customizer-controls-style'] -> ver = ( defined('WP_DEBUG') && true === WP_DEBUG ) ? $ver_css . time() : $ver_css;
63
  }
64
  if ( isset( $wp_scripts->registered['hu-customizer-controls'] ) ) {
65
  $wp_scripts->registered['hu-customizer-controls'] -> src = sprintf(
69
  ( defined('WP_DEBUG') && true === WP_DEBUG ) ? '' : '.min'
70
  );
71
  $ver = $wp_scripts->registered['hu-customizer-controls'] -> ver;
72
+ $wp_scripts->registered['hu-customizer-controls'] -> ver = ( defined('WP_DEBUG') && true === WP_DEBUG ) ? $ver . time() : $ver;
73
  }
74
  }
75
  }
addons/ha-functions.php CHANGED
@@ -3,15 +3,43 @@
3
 
4
  //@return an array of unfiltered options
5
  //=> all options or a single option val
6
- function ha_get_raw_option( $opt_name = null, $opt_group = null ) {
 
 
7
  $alloptions = wp_cache_get( 'alloptions', 'options' );
8
- $alloptions = maybe_unserialize($alloptions);
9
- if ( ! is_null( $opt_group ) && isset($alloptions[$opt_group]) ) {
10
- $alloptions = maybe_unserialize($alloptions[$opt_group]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  }
12
- if ( is_null( $opt_name ) )
13
- return $alloptions;
14
- return isset( $alloptions[$opt_name] ) ? maybe_unserialize($alloptions[$opt_name]) : false;
15
  }
16
 
17
 
3
 
4
  //@return an array of unfiltered options
5
  //=> all options or a single option val
6
+ //@param $report_error is used only when invoking HU_utils::set_option() to avoid a potential theme option reset
7
+ //=> prevent issue https://github.com/presscustomizr/hueman/issues/571
8
+ function ha_get_raw_option( $opt_name = null, $opt_group = null, $from_cache = true, $report_error = false ) {
9
  $alloptions = wp_cache_get( 'alloptions', 'options' );
10
+ $alloptions = maybe_unserialize( $alloptions );
11
+
12
+ //prevent issue https://github.com/presscustomizr/hueman/issues/492
13
+ //prevent issue https://github.com/presscustomizr/hueman/issues/571
14
+ if ( $report_error ) {
15
+ if ( ! is_array( $alloptions ) || empty( $alloptions ) ) {
16
+ return new WP_Error( 'wp_options_not_cached', '' );
17
+ }
18
+ }
19
+
20
+ $alloptions = ! is_array( $alloptions ) ? array() : $alloptions;//prevent issue https://github.com/presscustomizr/hueman/issues/492
21
+
22
+ //is there any option group requested ?
23
+ if ( ! is_null( $opt_group ) && array_key_exists( $opt_group, $alloptions ) ) {
24
+ $alloptions = maybe_unserialize( $alloptions[ $opt_group ] );
25
+ }
26
+ //shall we return a specific option ?
27
+ if ( is_null( $opt_name ) ) {
28
+ return $alloptions;
29
+ } else {
30
+ $opt_value = array_key_exists( $opt_name, $alloptions ) ? maybe_unserialize( $alloptions[ $opt_name ] ) : false;//fallback on cache option val
31
+ //do we need to get the db value instead of the cached one ? <= might be safer with some user installs not properly handling the wp cache
32
+ //=> typically used to checked the template name for czr_fn_isprevdem()
33
+ if ( ! $from_cache ) {
34
+ global $wpdb;
35
+ //@see wp-includes/option.php : get_option()
36
+ $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $opt_name ) );
37
+ if ( is_object( $row ) ) {
38
+ $opt_value = $row->option_value;
39
+ }
40
+ }
41
+ return maybe_unserialize( $opt_value );
42
  }
 
 
 
43
  }
44
 
45
 
addons/ha-init.php CHANGED
@@ -45,9 +45,13 @@ if ( ! class_exists( 'HU_AD' ) ) :
45
 
46
  //did_action('plugins_loaded') ?
47
 
48
-
49
  if( ! defined( 'HA_BASE_PATH' ) ) define( 'HA_BASE_PATH' , trailingslashit( dirname( dirname( __FILE__ ) ) ) );
50
 
 
 
 
 
 
51
  //are we in pro theme?
52
  if ( defined( 'HU_IS_PRO' ) && HU_IS_PRO ) {
53
  if( ! defined( 'HA_BASE_URL' ) ) define( 'HA_BASE_URL' , HU_BASE_URL );
@@ -56,7 +60,7 @@ if ( ! class_exists( 'HU_AD' ) ) :
56
  }
57
  //'enable-skope' option can take two string values : "yes" and "no".
58
  //If the option is not set yet, which is the most common case, it means that it is enabled ( @see default value == "yes" when registering the setting )
59
- $_skope_enable_val = $this -> ha_get_raw_option( 'enable-skope' , 'hu_theme_options');
60
  if( ! defined( 'HA_SKOP_ON' ) ) define( 'HA_SKOP_ON' , ! is_string( $_skope_enable_val ) || 'yes' == $_skope_enable_val );
61
 
62
  //PRO THEME / PRO ADDON ?
@@ -162,11 +166,6 @@ if ( ! class_exists( 'HU_AD' ) ) :
162
  * I am a man in constant sorrow
163
  /* ------------------------------------------------------------------------- */
164
  function ha_load() {
165
- /* ------------------------------------------------------------------------- *
166
- * Loads Functions
167
- /* ------------------------------------------------------------------------- */
168
- require_once( HA_BASE_PATH . 'addons/ha-functions.php' );
169
-
170
  /* ------------------------------------------------------------------------- *
171
  * Loads Features
172
  /* ------------------------------------------------------------------------- */
@@ -357,42 +356,21 @@ if ( ! class_exists( 'HU_AD' ) ) :
357
  return $this -> ha_is_customizing() && method_exists( $wp_customize, 'changeset_uuid');
358
  }
359
 
360
- //@return an array of unfiltered options
361
- //=> all options or a single option val
362
- function ha_get_raw_option( $opt_name = null, $opt_group = null, $from_cache = true ) {
363
- $alloptions = wp_cache_get( 'alloptions', 'options' );
364
- $alloptions = maybe_unserialize( $alloptions );
365
- //is there any option group requested ?
366
- if ( ! is_null( $opt_group ) && array_key_exists( $opt_group, $alloptions ) ) {
367
- $alloptions = maybe_unserialize( $alloptions[ $opt_group ] );
368
- }
369
- //shall we return a specific option ?
370
- if ( is_null( $opt_name ) ) {
371
- return $alloptions;
372
- } else {
373
- $opt_value = array_key_exists( $opt_name, $alloptions ) ? maybe_unserialize( $alloptions[ $opt_name ] ) : false;//fallback on cache option val
374
- //do we need to get the db value instead of the cached one ? <= might be safer with some user installs not properly handling the wp cache
375
- //=> typically used to checked the template name for czr_fn_isprevdem()
376
- if ( ! $from_cache ) {
377
- global $wpdb;
378
- //@see wp-includes/option.php : get_option()
379
- $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $opt_name ) );
380
- if ( is_object( $row ) ) {
381
- $opt_value = $row->option_value;
382
- }
383
- }
384
- return $opt_value;
385
- }
386
- }
387
 
388
  //@return bool
389
  function ha_isprevdem() {
390
- $_active_theme = $this -> ha_get_raw_option( 'template' );
391
- $hu_theme = wp_get_theme();
392
- $hu_theme = $hu_theme -> parent() ? $hu_theme -> parent() : $hu_theme;
393
- $hu_theme = strtolower( $hu_theme -> name );
394
- $hu_theme = str_replace(' ', '-', $hu_theme );
395
- return apply_filters( 'hu_isprevdem', ( $_active_theme != $hu_theme && ! is_child_theme() ) );
 
 
 
 
 
 
396
  }
397
 
398
  //hook : wp_head
45
 
46
  //did_action('plugins_loaded') ?
47
 
 
48
  if( ! defined( 'HA_BASE_PATH' ) ) define( 'HA_BASE_PATH' , trailingslashit( dirname( dirname( __FILE__ ) ) ) );
49
 
50
+ /* ------------------------------------------------------------------------- *
51
+ * Loads Functions
52
+ /* ------------------------------------------------------------------------- */
53
+ require_once( HA_BASE_PATH . 'addons/ha-functions.php' );
54
+
55
  //are we in pro theme?
56
  if ( defined( 'HU_IS_PRO' ) && HU_IS_PRO ) {
57
  if( ! defined( 'HA_BASE_URL' ) ) define( 'HA_BASE_URL' , HU_BASE_URL );
60
  }
61
  //'enable-skope' option can take two string values : "yes" and "no".
62
  //If the option is not set yet, which is the most common case, it means that it is enabled ( @see default value == "yes" when registering the setting )
63
+ $_skope_enable_val = ha_get_raw_option( 'enable-skope' , 'hu_theme_options');
64
  if( ! defined( 'HA_SKOP_ON' ) ) define( 'HA_SKOP_ON' , ! is_string( $_skope_enable_val ) || 'yes' == $_skope_enable_val );
65
 
66
  //PRO THEME / PRO ADDON ?
166
  * I am a man in constant sorrow
167
  /* ------------------------------------------------------------------------- */
168
  function ha_load() {
 
 
 
 
 
169
  /* ------------------------------------------------------------------------- *
170
  * Loads Features
171
  /* ------------------------------------------------------------------------- */
356
  return $this -> ha_is_customizing() && method_exists( $wp_customize, 'changeset_uuid');
357
  }
358
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
 
360
  //@return bool
361
  function ha_isprevdem() {
362
+ global $wp_customize;
363
+ $is_dirty = false;
364
+
365
+ if ( is_object( $wp_customize ) && method_exists( $wp_customize, 'unsanitized_post_values' ) ) {
366
+ $real_cust = $wp_customize -> unsanitized_post_values( array( 'exclude_changeset' => true ) );
367
+ $_preview_index = array_key_exists( 'customize_messenger_channel' , $_POST ) ? $_POST['customize_messenger_channel'] : '';
368
+ $_is_first_preview = false !== strpos( $_preview_index ,'-0' );
369
+ $_doing_ajax_partial = array_key_exists( 'wp_customize_render_partials', $_POST );
370
+ //There might be cases when the unsanitized post values contains old widgets infos on initial preview load, giving a wrong dirtyness information
371
+ $is_dirty = ( ! empty( $real_cust ) && ! $_is_first_preview ) || $_doing_ajax_partial;
372
+ }
373
+ return apply_filters( 'hu_isprevdem', ! $is_dirty && ha_get_raw_option( 'template', null, false ) != get_stylesheet() && ! is_child_theme() && ! ( defined('HU_IS_PRO') && HU_IS_PRO ) );
374
  }
375
 
376
  //hook : wp_head
addons/sharrre/ha-sharrre.php CHANGED
@@ -97,8 +97,16 @@ class HA_Sharrre {
97
  'notice' => __('Display social sharing buttons in each single articles.', 'hueman-addons'),
98
  'section' => 'content_single_sec',
99
  'type' => 'checkbox',
100
- 'priority' => 40,
101
- 'active_callback' => array( $this, 'ha_is_single')
 
 
 
 
 
 
 
 
102
  ),
103
  'sharrre-scrollable' => array(
104
  'default' => 1,
@@ -107,8 +115,7 @@ class HA_Sharrre {
107
  'notice' => __('Make the social share bar stick to the browser window when scrolling down a post.', 'hueman-addons'),
108
  'section' => 'content_single_sec',
109
  'type' => 'checkbox',
110
- 'priority' => 50,
111
- 'active_callback' => array( $this, 'ha_is_single')
112
  ),
113
  'sharrre-twitter-on' => array(
114
  'default' => 1,
@@ -117,8 +124,7 @@ class HA_Sharrre {
117
  'section' => 'content_single_sec',
118
  'type' => 'checkbox',
119
  'notice' => __('Since Nov. 2015, Twitter disabled the share counts from its API. If you want to get the display count anyway, you can create an account for free (as of Feb. 2016) on [https://opensharecount.com/]. The Hueman Addons plugin is configured to use opensharecount.', 'hueman-addons'),
120
- 'priority' => 60,
121
- 'active_callback' => array( $this, 'ha_is_single')
122
  ),
123
  'twitter-username' => array(
124
  'default' => '',
@@ -128,8 +134,7 @@ class HA_Sharrre {
128
  'section' => 'content_single_sec',
129
  'type' => 'text',
130
  'transport' => 'postMessage',
131
- 'priority' => 70,
132
- 'active_callback' => array( $this, 'ha_is_single')
133
  ),
134
  'sharrre-facebook-on' => array(
135
  'default' => 1,
@@ -137,8 +142,7 @@ class HA_Sharrre {
137
  'label' => __('Enable Facebook Button', 'hueman-addons'),
138
  'section' => 'content_single_sec',
139
  'type' => 'checkbox',
140
- 'priority' => 80,
141
- 'active_callback' => array( $this, 'ha_is_single')
142
  ),
143
  'sharrre-google-on' => array(
144
  'default' => 1,
@@ -146,8 +150,7 @@ class HA_Sharrre {
146
  'label' => __('Enable Google Plus Button', 'hueman-addons'),
147
  'section' => 'content_single_sec',
148
  'type' => 'checkbox',
149
- 'priority' => 90,
150
- 'active_callback' => array( $this, 'ha_is_single')
151
  ),
152
  'sharrre-pinterest-on' => array(
153
  'default' => 0,
@@ -155,8 +158,7 @@ class HA_Sharrre {
155
  'label' => __('Enable Pinterest Button', 'hueman-addons'),
156
  'section' => 'content_single_sec',
157
  'type' => 'checkbox',
158
- 'priority' => 100,
159
- 'active_callback' => array( $this, 'ha_is_single')
160
  ),
161
  'sharrre-linkedin-on' => array(
162
  'default' => 0,
@@ -164,8 +166,7 @@ class HA_Sharrre {
164
  'label' => __('Enable LinkedIn Button', 'hueman-addons'),
165
  'section' => 'content_single_sec',
166
  'type' => 'checkbox',
167
- 'priority' => 100,
168
- 'active_callback' => array( $this, 'ha_is_single')
169
  )
170
  );
171
 
97
  'notice' => __('Display social sharing buttons in each single articles.', 'hueman-addons'),
98
  'section' => 'content_single_sec',
99
  'type' => 'checkbox',
100
+ 'priority' => 40
101
+ ),
102
+ 'sharrre-counter' => array(
103
+ 'default' => 1,
104
+ 'control' => 'HU_controls',
105
+ 'label' => __('Display a counter on top', 'hueman-addons'),
106
+ //'notice' => __('The counter', 'hueman-addons'),
107
+ 'section' => 'content_single_sec',
108
+ 'type' => 'checkbox',
109
+ 'priority' => 40
110
  ),
111
  'sharrre-scrollable' => array(
112
  'default' => 1,
115
  'notice' => __('Make the social share bar stick to the browser window when scrolling down a post.', 'hueman-addons'),
116
  'section' => 'content_single_sec',
117
  'type' => 'checkbox',
118
+ 'priority' => 50
 
119
  ),
120
  'sharrre-twitter-on' => array(
121
  'default' => 1,
124
  'section' => 'content_single_sec',
125
  'type' => 'checkbox',
126
  'notice' => __('Since Nov. 2015, Twitter disabled the share counts from its API. If you want to get the display count anyway, you can create an account for free (as of Feb. 2016) on [https://opensharecount.com/]. The Hueman Addons plugin is configured to use opensharecount.', 'hueman-addons'),
127
+ 'priority' => 60
 
128
  ),
129
  'twitter-username' => array(
130
  'default' => '',
134
  'section' => 'content_single_sec',
135
  'type' => 'text',
136
  'transport' => 'postMessage',
137
+ 'priority' => 70
 
138
  ),
139
  'sharrre-facebook-on' => array(
140
  'default' => 1,
142
  'label' => __('Enable Facebook Button', 'hueman-addons'),
143
  'section' => 'content_single_sec',
144
  'type' => 'checkbox',
145
+ 'priority' => 80
 
146
  ),
147
  'sharrre-google-on' => array(
148
  'default' => 1,
150
  'label' => __('Enable Google Plus Button', 'hueman-addons'),
151
  'section' => 'content_single_sec',
152
  'type' => 'checkbox',
153
+ 'priority' => 90
 
154
  ),
155
  'sharrre-pinterest-on' => array(
156
  'default' => 0,
158
  'label' => __('Enable Pinterest Button', 'hueman-addons'),
159
  'section' => 'content_single_sec',
160
  'type' => 'checkbox',
161
+ 'priority' => 100
 
162
  ),
163
  'sharrre-linkedin-on' => array(
164
  'default' => 0,
166
  'label' => __('Enable LinkedIn Button', 'hueman-addons'),
167
  'section' => 'content_single_sec',
168
  'type' => 'checkbox',
169
+ 'priority' => 100
 
170
  )
171
  );
172
 
addons/sharrre/sharrre-template.php CHANGED
@@ -1,7 +1,7 @@
1
- <div class="sharrre-container">
2
  <span><?php _e('Share','hueman-addons'); ?></span>
3
  <?php if ( hu_is_checked('sharrre-twitter-on') ) : ?>
4
- <div id="twitter" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Tweet', 'hueman-addons'); ?>"><a class="box" href="#"><div class="count" href="#"><i class="fa fa-plus"></i></div><div class="share"><i class="fa fa-twitter"></i></div></a></div>
5
  <?php endif; ?>
6
  <?php if ( hu_is_checked('sharrre-facebook-on') ) : ?>
7
  <div id="facebook" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Like', 'hueman-addons'); ?>"></div>
@@ -16,16 +16,19 @@
16
  <div id="linkedin" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Publish on Linked In', 'hueman-addons'); ?>"></div>
17
  <?php endif; ?>
18
  </div><!--/.sharrre-container-->
19
-
20
  <script type="text/javascript">
21
  // Sharrre
22
  jQuery( function($) {
 
 
 
23
  <?php if ( hu_is_checked('sharrre-twitter-on') ) : ?>
24
  $('#twitter').sharrre({
25
  share: {
26
  twitter: true
27
  },
28
- template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><i class="fa fa-twitter"></i></div></a>',
29
  enableHover: false,
30
  enableTracking: true,
31
  buttons: { twitter: {via: '<?php echo esc_attr( hu_get_option("twitter-username") ); ?>'}},
@@ -40,7 +43,7 @@
40
  share: {
41
  facebook: true
42
  },
43
- template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><i class="fa fa-facebook-square"></i></div></a>',
44
  enableHover: false,
45
  enableTracking: true,
46
  buttons:{layout: 'box_count'},
@@ -56,7 +59,7 @@
56
  share: {
57
  googlePlus: true
58
  },
59
- template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><i class="fa fa-google-plus-square"></i></div></a>',
60
  enableHover: false,
61
  enableTracking: true,
62
  buttons:{size: 'tall'},
@@ -72,7 +75,7 @@
72
  share: {
73
  pinterest: true
74
  },
75
- template: '<a class="box" href="#" rel="nofollow"><div class="count" href="#">{total}</div><div class="share"><i class="fa fa-pinterest"></i></div></a>',
76
  enableHover: false,
77
  enableTracking: true,
78
  buttons: {
@@ -91,7 +94,7 @@
91
  share: {
92
  linkedin: true
93
  },
94
- template: '<a class="box" href="#" rel="nofollow"><div class="count" href="#">{total}</div><div class="share"><i class="fa fa-linkedin"></i></div></a>',
95
  enableHover: false,
96
  enableTracking: true,
97
  buttons: {
1
+ <div class="sharrre-container <?php echo ! hu_is_checked('sharrre-counter') ? 'no-counter' : ''; ?>">
2
  <span><?php _e('Share','hueman-addons'); ?></span>
3
  <?php if ( hu_is_checked('sharrre-twitter-on') ) : ?>
4
+ <div id="twitter" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Tweet', 'hueman-addons'); ?>"><a class="box" href="#"><div class="count" href="#"><i class="fas fa-plus"></i></div><div class="share"><i class="fab fa-twitter"></i></div></a></div>
5
  <?php endif; ?>
6
  <?php if ( hu_is_checked('sharrre-facebook-on') ) : ?>
7
  <div id="facebook" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Like', 'hueman-addons'); ?>"></div>
16
  <div id="linkedin" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Publish on Linked In', 'hueman-addons'); ?>"></div>
17
  <?php endif; ?>
18
  </div><!--/.sharrre-container-->
19
+ <style type="text/css"></style>
20
  <script type="text/javascript">
21
  // Sharrre
22
  jQuery( function($) {
23
+ //<temporary>
24
+ $('head').append( $( '<style>', { id : 'hide-sharre-count', type : 'text/css', html:'.sharrre-container.no-counter .box .count {display:none;}' } ) );
25
+ //</temporary>
26
  <?php if ( hu_is_checked('sharrre-twitter-on') ) : ?>
27
  $('#twitter').sharrre({
28
  share: {
29
  twitter: true
30
  },
31
+ template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><i class="fab fa-twitter"></i></div></a>',
32
  enableHover: false,
33
  enableTracking: true,
34
  buttons: { twitter: {via: '<?php echo esc_attr( hu_get_option("twitter-username") ); ?>'}},
43
  share: {
44
  facebook: true
45
  },
46
+ template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><i class="fab fa-facebook-square"></i></div></a>',
47
  enableHover: false,
48
  enableTracking: true,
49
  buttons:{layout: 'box_count'},
59
  share: {
60
  googlePlus: true
61
  },
62
+ template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><i class="fab fa-google-plus-square"></i></div></a>',
63
  enableHover: false,
64
  enableTracking: true,
65
  buttons:{size: 'tall'},
75
  share: {
76
  pinterest: true
77
  },
78
+ template: '<a class="box" href="#" rel="nofollow"><div class="count" href="#">{total}</div><div class="share"><i class="fab fa-pinterest"></i></div></a>',
79
  enableHover: false,
80
  enableTracking: true,
81
  buttons: {
94
  share: {
95
  linkedin: true
96
  },
97
+ template: '<a class="box" href="#" rel="nofollow"><div class="count" href="#">{total}</div><div class="share"><i class="fab fa-linkedin"></i></div></a>',
98
  enableHover: false,
99
  enableTracking: true,
100
  buttons: {
addons/skop/czr-skop.php CHANGED
@@ -21,19 +21,19 @@ function ha_get_skope_theme_name() {
21
  if ( ! post_type_exists( 'czr_skope_opt') ) {
22
  register_post_type( 'czr_skope_opt', array(
23
  'labels' => array(
24
- 'name' => _x( 'Hueman scopes', 'post type general name' ),
25
- 'singular_name' => _x( 'Hueman scope', 'post type singular name' ),
26
- 'menu_name' => _x( 'Hueman scopes', 'admin menu' ),
27
- 'name_admin_bar' => _x( 'Hueman scope', 'add new on admin bar' ),
28
- 'add_new' => _x( 'Add New', 'Customize Hueman scope' ),
29
- 'add_new_item' => __( 'Add New Hueman scope' ),
30
- 'new_item' => __( 'New Hueman scope' ),
31
- 'edit_item' => __( 'Edit Hueman scope' ),
32
- 'view_item' => __( 'View Hueman scope' ),
33
- 'all_items' => __( 'All Hueman scopes' ),
34
- 'search_items' => __( 'Search Hueman scopes' ),
35
- 'not_found' => __( 'No Hueman scopes found.' ),
36
- 'not_found_in_trash' => __( 'No Hueman scopes found in Trash.' ),
37
  ),
38
  'public' => false,
39
  '_builtin' => false,
@@ -98,18 +98,35 @@ function ha_create_skope_post( $reset = false ) {
98
  /* ------------------------------------------------------------------------- *
99
  * PLUGINS COMPAT
100
  /* ------------------------------------------------------------------------- */
101
- if ( ha_is_plugin_active('polylang/polylang.php') ) {
102
  add_filter( 'ha_skope_navmenu', '__return_false' );
103
  add_filter( 'ha_get_skope_excluded_options', 'ha_exclude_skoped_settings_with_polylang' );
104
  function ha_exclude_skoped_settings_with_polylang( $excluded_list ) {
105
- if ( ! is_array( $excluded_list ) )
106
  return array();
 
107
  $excluded_list[] = 'blogname';
108
  $excluded_list[] = 'blogdescription';
109
  return $excluded_list;
110
  }
111
  }
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
 
115
  /* ------------------------------------------------------------------------- *
@@ -1083,12 +1100,12 @@ if ( ! class_exists( 'HA_Skop_Chset_Base' ) ) :
1083
  $setting = $wp_customize->get_setting( $setting_id );
1084
  if ( ! $setting ) {
1085
  if ( $options['validate_existence'] ) {
1086
- $validities[ $setting_id ] = new WP_Error( 'unrecognized', __( 'Setting does not exist or is unrecognized.' ) );
1087
  }
1088
  continue;
1089
  }
1090
  if ( $options['validate_capability'] && ! current_user_can( $setting->capability ) ) {
1091
- $validity = new WP_Error( 'unauthorized', __( 'Unauthorized to modify setting due to capability.' ) );
1092
  } else {
1093
  if ( is_null( $unsanitized_value ) ) {
1094
  continue;
@@ -1111,7 +1128,7 @@ if ( ! class_exists( 'HA_Skop_Chset_Base' ) ) :
1111
  }
1112
  }
1113
  if ( false === $validity ) {
1114
- $validity = new WP_Error( 'invalid_value', __( 'Invalid value.' ) );
1115
  }
1116
  $validities[ $setting_id ] = $validity;
1117
  }
@@ -1255,7 +1272,7 @@ if ( ! class_exists( 'HA_Skop_Chset_Save' ) ) :
1255
  if ( $update_transactionally && $invalid_setting_count > 0 ) {
1256
  $response = array(
1257
  'setting_validities' => $setting_validities,
1258
- 'message' => sprintf( _n( 'There is %s invalid setting.', 'There are %s invalid settings.', $invalid_setting_count ), number_format_i18n( $invalid_setting_count ) ),
1259
  );
1260
  return new WP_Error( 'transaction_fail', '', $response );
1261
  }
@@ -2184,11 +2201,11 @@ if ( ! class_exists( 'HA_Skop_Cust_Register' ) ) :
2184
  'isNavMenuLocationsSkoped' => (bool)apply_filters( 'ha_skope_navmenu', true ),
2185
  'isChangeSetOn' => HU_AD() -> ha_is_changeset_enabled(),
2186
  'isLocalSkope' => apply_filters( 'skope_is_local', isset( $_GET['url'] ) ),
2187
- 'isTopNoteOn' => apply_filters( 'ha_czr_top_note_status', 'dismissed' != get_option( 'ha_czr_top_note_status' ) || ( defined('CZR_DEV') && true === CZR_DEV ) ),
2188
  'topNoteParams' => array(
2189
  'title' => __( 'Welcome in the new customizer interface !', 'hueman-addons' ),
2190
  'message' => sprintf ( __( 'Discover a new way to customize your pages on %1$s.', 'hueman-addons' ),
2191
- sprintf('<a href="%1$s" title="%2$s" target="_blank">%3$s <span class="fa fa-external-link"></span></a>',
2192
  esc_url('docs.presscustomizr.com/search?query=customize-hueman'),
2193
  __('Visit the documentation', 'hueman-addons'),
2194
  __('this page')
@@ -2435,6 +2452,16 @@ if ( ! class_exists( 'HA_Skop_Option_Base' ) ) :
2435
  return $this -> ha_filter_hu_opt_for_skope( $value, $_mod_name, null );
2436
  }
2437
  function ha_filter_hu_opt_for_skope( $_opt_val , $opt_name , $opt_group = HU_THEME_OPTIONS , $_default_val = null ) {
 
 
 
 
 
 
 
 
 
 
2438
  $_new_val = $_opt_val;
2439
  if ( HU_AD() -> ha_is_customize_preview_frame() && ! HU_AD() -> ha_is_previewing_live_changeset() ) {
2440
  $_new_val = $this -> _get_sanitized_preview_val( $_opt_val, $opt_name );
21
  if ( ! post_type_exists( 'czr_skope_opt') ) {
22
  register_post_type( 'czr_skope_opt', array(
23
  'labels' => array(
24
+ 'name' => _x( 'Hueman scopes', 'post type general name', 'hueman-addons' ),
25
+ 'singular_name' => _x( 'Hueman scope', 'post type singular name', 'hueman-addons' ),
26
+ 'menu_name' => _x( 'Hueman scopes', 'admin menu', 'hueman-addons' ),
27
+ 'name_admin_bar' => _x( 'Hueman scope', 'add new on admin bar', 'hueman-addons' ),
28
+ 'add_new' => _x( 'Add New', 'Customize Hueman scope', 'hueman-addons' ),
29
+ 'add_new_item' => __( 'Add New Hueman scope', 'hueman-addons' ),
30
+ 'new_item' => __( 'New Hueman scope', 'hueman-addons' ),
31
+ 'edit_item' => __( 'Edit Hueman scope', 'hueman-addons' ),
32
+ 'view_item' => __( 'View Hueman scope', 'hueman-addons' ),
33
+ 'all_items' => __( 'All Hueman scopes', 'hueman-addons' ),
34
+ 'search_items' => __( 'Search Hueman scopes', 'hueman-addons' ),
35
+ 'not_found' => __( 'No Hueman scopes found.', 'hueman-addons' ),
36
+ 'not_found_in_trash' => __( 'No Hueman scopes found in Trash.', 'hueman-addons' ),
37
  ),
38
  'public' => false,
39
  '_builtin' => false,
98
  /* ------------------------------------------------------------------------- *
99
  * PLUGINS COMPAT
100
  /* ------------------------------------------------------------------------- */
101
+ if ( ha_is_plugin_active('polylang/polylang.php') || ha_is_plugin_active('polylang-pro/polylang.php') ) {
102
  add_filter( 'ha_skope_navmenu', '__return_false' );
103
  add_filter( 'ha_get_skope_excluded_options', 'ha_exclude_skoped_settings_with_polylang' );
104
  function ha_exclude_skoped_settings_with_polylang( $excluded_list ) {
105
+ if ( ! is_array( $excluded_list ) ) {
106
  return array();
107
+ }
108
  $excluded_list[] = 'blogname';
109
  $excluded_list[] = 'blogdescription';
110
  return $excluded_list;
111
  }
112
  }
113
 
114
+ /* ------------------------------------------------------------------------- *
115
+ * MULTISITE COMPAT
116
+ /* ------------------------------------------------------------------------- */
117
+ /*
118
+ * Exclude blog name from skope for multisite subsites
119
+ * https://github.com/presscustomizr/hueman-addons/issues/43
120
+ */
121
+ if ( is_multisite() && ! is_main_site() ) {
122
+ add_filter( 'ha_get_skope_excluded_options', 'ha_exclude_skoped_settings_with_multisite' );
123
+ function ha_exclude_skoped_settings_with_multisite ( $excluded_list ) {
124
+ if ( ! is_array( $excluded_list ) ) {
125
+ return array();
126
+ }
127
+ return array_merge( $excluded_list, array( 'blogname' ) );
128
+ }
129
+ }
130
 
131
 
132
  /* ------------------------------------------------------------------------- *
1100
  $setting = $wp_customize->get_setting( $setting_id );
1101
  if ( ! $setting ) {
1102
  if ( $options['validate_existence'] ) {
1103
+ $validities[ $setting_id ] = new WP_Error( 'unrecognized', __( 'Setting does not exist or is unrecognized.', 'hueman-addons' ) );
1104
  }
1105
  continue;
1106
  }
1107
  if ( $options['validate_capability'] && ! current_user_can( $setting->capability ) ) {
1108
+ $validity = new WP_Error( 'unauthorized', __( 'Unauthorized to modify setting due to capability.', 'hueman-addons' ) );
1109
  } else {
1110
  if ( is_null( $unsanitized_value ) ) {
1111
  continue;
1128
  }
1129
  }
1130
  if ( false === $validity ) {
1131
+ $validity = new WP_Error( 'invalid_value', __( 'Invalid value.', 'hueman-addons' ) );
1132
  }
1133
  $validities[ $setting_id ] = $validity;
1134
  }
1272
  if ( $update_transactionally && $invalid_setting_count > 0 ) {
1273
  $response = array(
1274
  'setting_validities' => $setting_validities,
1275
+ 'message' => sprintf( _n( 'There is %s invalid setting.', 'There are %s invalid settings.', $invalid_setting_count, 'hueman-addons' ), number_format_i18n( $invalid_setting_count ) ),
1276
  );
1277
  return new WP_Error( 'transaction_fail', '', $response );
1278
  }
2201
  'isNavMenuLocationsSkoped' => (bool)apply_filters( 'ha_skope_navmenu', true ),
2202
  'isChangeSetOn' => HU_AD() -> ha_is_changeset_enabled(),
2203
  'isLocalSkope' => apply_filters( 'skope_is_local', isset( $_GET['url'] ) ),
2204
+ 'isTopNoteOn' => true || apply_filters( 'ha_czr_top_note_status', 'dismissed' != get_option( 'ha_czr_top_note_status' ) || ( defined('CZR_DEV') && true === CZR_DEV ) ),
2205
  'topNoteParams' => array(
2206
  'title' => __( 'Welcome in the new customizer interface !', 'hueman-addons' ),
2207
  'message' => sprintf ( __( 'Discover a new way to customize your pages on %1$s.', 'hueman-addons' ),
2208
+ sprintf('<a href="%1$s" title="%2$s" target="_blank">%3$s <span class="fas fa-external-link-alt"></span></a>',
2209
  esc_url('docs.presscustomizr.com/search?query=customize-hueman'),
2210
  __('Visit the documentation', 'hueman-addons'),
2211
  __('this page')
2452
  return $this -> ha_filter_hu_opt_for_skope( $value, $_mod_name, null );
2453
  }
2454
  function ha_filter_hu_opt_for_skope( $_opt_val , $opt_name , $opt_group = HU_THEME_OPTIONS , $_default_val = null ) {
2455
+ /*
2456
+ * Take care of the excluded options in front
2457
+ * needed for:
2458
+ * multisite blogname issue https://github.com/presscustomizr/hueman-addons/issues/43
2459
+ * polylang blogname and blogdescription issue https://github.com/presscustomizr/hueman/issues/628
2460
+ */
2461
+ $excluded_options = ha_get_skope_excluded_options();
2462
+ if ( $opt_name && is_array( $excluded_options ) && in_array( $opt_name, $excluded_options ) ) {
2463
+ return $_opt_val;
2464
+ }
2465
  $_new_val = $_opt_val;
2466
  if ( HU_AD() -> ha_is_customize_preview_frame() && ! HU_AD() -> ha_is_previewing_live_changeset() ) {
2467
  $_new_val = $this -> _get_sanitized_preview_val( $_opt_val, $opt_name );
addons/skop/tmpl/skope-tmpls.php CHANGED
@@ -15,15 +15,15 @@ function ha_print_skope_templates() {
15
  <script type="text/html" id="tmpl-czr-skope">
16
  <div class="{{data.el}} {{data.skope}} czr-scope inactive" data-scope-id="{{data.id}}" data-dyn-type="{{data.dyn_type}}">
17
  <div class="czr-scope-header">
18
- <span class="czr-scope-reset fa fa-refresh czr-pull-left" title="Reset"></span>
19
- <span class="czr-scope-switch fa fa-toggle-off czr-pull-right" title="Switch to / active ?"></span>
20
  </div>
21
  <div class="czr-scope-content"><h4 class="czr-skp-switch-link">{{data.title}}</h4></div>
22
  <div class="czr-scope-footer">
23
  <# if ( data.is_winner ) { #>
24
- <span class="czr-scope-winner fa fa-check czr-pull-left info" title="This scope of options will override any other scopes set site wide or in a parent scope."></span>
25
  <# } #>
26
- <span class="czr-scope-force fa fa-exclamation-circle czr-pull-right" title="Force priority"></span>
27
  </div>
28
  </div>
29
  </script>
@@ -89,10 +89,10 @@ function ha_print_skope_templates() {
89
  <script type="text/html" id="tmpl-czr-top-note">
90
  <div id="czr-top-note" class="czr-preview-notification">
91
  <div class="czr-note-content">
92
- <span class="fa fa-arrow-left"></span>
93
  <h2>{{data.title}}</h2>
94
  <p class="czr-note-message"></p>
95
- <span class="fa fa-times czr-preview-note-close" title="close"></span>
96
  </div>
97
  </div>
98
  </script>
@@ -103,15 +103,15 @@ function ha_print_skope_templates() {
103
  <div class="czr-note-content">
104
  <h2>{{data.title}}</h2>
105
  <p class="czr-note-message"></p>
106
- <span class="fa fa-times czr-preview-note-close" title="<?php _e( 'Close', 'hueman'); ?>"></span>
107
  </div>
108
 
109
  <p class="action-links-wrap">
110
  <span class="action-link">
111
- <span class="fa fa-info-circle"></span><a class="czr-doc-link" href="http://docs.presscustomizr.com/article/256-using-the-customizer-in-the-hueman-wordpress-theme" title="<?php _e( 'Using the customizer in the Hueman theme', 'hueman'); ?>" target="_blank"> <?php _e( 'Using the customizer in the Hueman theme', 'hueman'); ?></a>
112
  </span>
113
  <span class="action-link">
114
- <span class="fa fa-cog"></span><span class="czr-disable-bottom-infos" title="<?php _e( 'Permanently disable this notification', 'hueman'); ?>"> <?php _e( 'Permanently disable this notification.', 'hueman'); ?></span>
115
  </span>
116
  </p>
117
  </div>
15
  <script type="text/html" id="tmpl-czr-skope">
16
  <div class="{{data.el}} {{data.skope}} czr-scope inactive" data-scope-id="{{data.id}}" data-dyn-type="{{data.dyn_type}}">
17
  <div class="czr-scope-header">
18
+ <span class="czr-scope-reset fas fa-sync czr-pull-left" title="Reset"></span>
19
+ <span class="czr-scope-switch fas fa-toggle-off czr-pull-right" title="Switch to / active ?"></span>
20
  </div>
21
  <div class="czr-scope-content"><h4 class="czr-skp-switch-link">{{data.title}}</h4></div>
22
  <div class="czr-scope-footer">
23
  <# if ( data.is_winner ) { #>
24
+ <span class="czr-scope-winner fas fa-check czr-pull-left info" title="This scope of options will override any other scopes set site wide or in a parent scope."></span>
25
  <# } #>
26
+ <span class="czr-scope-force fas fa-exclamation-circle czr-pull-right" title="Force priority"></span>
27
  </div>
28
  </div>
29
  </script>
89
  <script type="text/html" id="tmpl-czr-top-note">
90
  <div id="czr-top-note" class="czr-preview-notification">
91
  <div class="czr-note-content">
92
+ <span class="fas fa-arrow-left"></span>
93
  <h2>{{data.title}}</h2>
94
  <p class="czr-note-message"></p>
95
+ <span class="fas fa-times czr-preview-note-close" title="close"></span>
96
  </div>
97
  </div>
98
  </script>
103
  <div class="czr-note-content">
104
  <h2>{{data.title}}</h2>
105
  <p class="czr-note-message"></p>
106
+ <span class="fas fa-times czr-preview-note-close" title="<?php _e( 'Close', 'hueman'); ?>"></span>
107
  </div>
108
 
109
  <p class="action-links-wrap">
110
  <span class="action-link">
111
+ <span class="fas fa-info-circle"></span><a class="czr-doc-link" href="http://docs.presscustomizr.com/article/256-using-the-customizer-in-the-hueman-wordpress-theme" title="<?php _e( 'Using the customizer in the Hueman theme', 'hueman'); ?>" target="_blank"> <?php _e( 'Using the customizer in the Hueman theme', 'hueman'); ?></a>
112
  </span>
113
  <span class="action-link">
114
+ <span class="fas fa-cog"></span><span class="czr-disable-bottom-infos" title="<?php _e( 'Permanently disable this notification', 'hueman'); ?>"> <?php _e( 'Permanently disable this notification.', 'hueman'); ?></span>
115
  </span>
116
  </p>
117
  </div>
ha-fire.php CHANGED
@@ -1,12 +1,12 @@
1
  <?php
2
  /**
3
  * Plugin Name: Hueman Addons
4
- * Plugin URI: http://presscustomizr.com
5
  * Description: Hueman Theme Addons
6
- * Version: 2.0.15
7
  * Text Domain: hueman-addons
8
  * Author: Press Customizr
9
- * Author URI: http://presscustomizr.com
10
  * License: GPLv2 or later
11
  */
12
 
1
  <?php
2
  /**
3
  * Plugin Name: Hueman Addons
4
+ * Plugin URI: https://presscustomizr.com
5
  * Description: Hueman Theme Addons
6
+ * Version: 2.0.16
7
  * Text Domain: hueman-addons
8
  * Author: Press Customizr
9
+ * Author URI: https://presscustomizr.com
10
  * License: GPLv2 or later
11
  */
12
 
lang/en_US.po CHANGED
@@ -1,6 +1,6 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Hueman Addons v2.0.15\n"
4
  "POT-Creation-Date: 2016-12-19 18:13+0100\n"
5
  "PO-Revision-Date: 2016-12-19 18:14+0100\n"
6
  "Last-Translator: \n"
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Hueman Addons v2.0.16\n"
4
  "POT-Creation-Date: 2016-12-19 18:13+0100\n"
5
  "PO-Revision-Date: 2016-12-19 18:14+0100\n"
6
  "Last-Translator: \n"
readme.txt CHANGED
@@ -4,8 +4,8 @@ Author URI: https://presscustomizr.com
4
  Plugin URI: https://wordpress.org/plugins/hueman-addons/
5
  Tags: hueman theme, hueman
6
  Requires at least: 3.4
7
- Tested up to: 4.9.0
8
- Stable tag: 2.0.15
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -18,7 +18,7 @@ The plugin has been designed specifically for the Hueman WordPress theme. Lightw
18
 
19
 
20
  == Installation ==
21
- 1. Install the plugin right from your WordPress admin in plugins > Add New.
22
  1-bis. Download the plugin, unzip the package and upload it to your /wp-content/plugins/ directory
23
  2. Activate the plugin
24
 
@@ -37,6 +37,11 @@ The plugin has been designed specifically for the Hueman WordPress theme. Lightw
37
 
38
 
39
  == Changelog ==
 
 
 
 
 
40
  = 2.0.15 November 21st 2017 =
41
  * Fix : WP 4.9 Code Editor issue could impact the custom css customizer option when checking errors in the code
42
 
4
  Plugin URI: https://wordpress.org/plugins/hueman-addons/
5
  Tags: hueman theme, hueman
6
  Requires at least: 3.4
7
+ Tested up to: 4.9.4
8
+ Stable tag: 2.0.16
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
18
 
19
 
20
  == Installation ==
21
+ 1. Install the plugin right from your WordPress admin in plugins > Add New.
22
  1-bis. Download the plugin, unzip the package and upload it to your /wp-content/plugins/ directory
23
  2. Activate the plugin
24
 
37
 
38
 
39
  == Changelog ==
40
+ = 2.0.16 February 14th 2018 =
41
+ * Fix : Multisite compatibility problem
42
+ * Fix : Title/Subtitle polylang plugin translation doesn't appear
43
+ * Added : new option to control the visibility of the sharre counters
44
+
45
  = 2.0.15 November 21st 2017 =
46
  * Fix : WP 4.9 Code Editor issue could impact the custom css customizer option when checking errors in the code
47