Plugin Directory

Changeset 2915886


Ignore:
Timestamp:
05/22/2023 01:32:46 PM (3 years ago)
Author:
andreadegiovine
Message:

4.0.0

Location:
custom-post-types
Files:
71 added
12 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • custom-post-types/trunk/assets/css/backend.css

    r2784140 r2915886  
    1 @keyframes bg-flash-in{0%{pointer-events:none}10%{background:transparent}20%{background:#d5d8da}100%{background:transparent;pointer-events:initial}}.cpt-fields-wrap{display:flex;flex-flow:row wrap;margin:-6px -12px -12px -12px}.cpt-fields-wrap.inner{border:1px solid #f0f1f2;border-bottom:0;border-right:0;margin:0 -1px -1px}.cpt-fields-wrap:not(.inner)>.cpt-field>.cpt-field-wrap:hover{background-color:#fcfcfd}.cpt-fields-wrap .cpt-field{display:flex;flex-wrap:wrap}.cpt-fields-wrap .cpt-field .cpt-field-wrap{border:1px solid #f0f1f2;border-left:0;border-top:0;display:flex;flex-flow:column wrap;padding:10px 15px;width:100%}.cpt-fields-wrap .cpt-field .cpt-field-wrap.horizontal{flex-flow:row wrap}.cpt-fields-wrap .cpt-field .cpt-field-wrap.horizontal .field-label{margin:0 3px 0 0;padding-right:10px;text-align:right;width:15%}.cpt-fields-wrap .cpt-field .cpt-field-wrap.horizontal .field-input{width:calc(50% - 26px)}.cpt-fields-wrap .cpt-field .cpt-field-wrap.horizontal .field-info{margin:0 0 0 3px;padding-left:10px;width:35%}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-label{margin:0 0 3px}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-label .required-icon{color:#ffb900;font-size:14px;margin-left:3px;vertical-align:inherit;width:14px;line-height:6px;height:14px}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-info{font-size:smaller;margin:3px 0 0;opacity:.7}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-info .required-label{font-size:smaller;font-variant:small-caps;font-weight:bold;margin-top:3px;text-transform:uppercase}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .color-field .color-wrap{align-items:center;display:flex;flex-flow:row nowrap;max-width:150px;width:100%}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .color-field .color-wrap .preview{background-color:#f5f5f5;box-shadow:0 1px 3px rgba(0,0,0,.4);border-radius:100%;cursor:pointer;flex:0 0 22px;height:22px;margin-right:10px}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field{position:relative}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field input{bottom:0;opacity:0;position:absolute;pointer-events:none;max-width:148px}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field .upload-wrap{height:150px;position:relative;width:150px}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field .upload-wrap .upload-preview{background-color:#f5f5f5;height:100%;width:100%;position:absolute}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field .upload-wrap .upload-preview img{position:relative;z-index:2;background-color:#fff}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field .upload-wrap .upload-actions{align-items:center;background-color:rgba(245,245,245,.7);display:flex;flex-flow:column wrap;height:calc(100% - 20px);justify-content:flex-end;padding:10px;position:relative;transition:opacity .2s;width:calc(100% - 20px);z-index:1}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field .upload-wrap .upload-actions .file-name{font-size:smaller;padding-bottom:10px;overflow:hidden;text-overflow:ellipsis;width:100%;white-space:nowrap}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field .upload-wrap .upload-actions .buttons .button{z-index:2}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .file-field .upload-wrap:hover .upload-actions{z-index:3}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field>.buttons{margin:10px 0 0}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field>.buttons .button,.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field>.buttons button{background:unset;border:0;color:#0071a1;cursor:pointer;height:30px;margin:0;width:34px;padding:0}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field>.buttons .button:focus,.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field>.buttons button:focus{box-shadow:unset;outline:none}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field>.buttons .button .dashicons,.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field>.buttons button .dashicons{font-size:30px;height:auto;width:auto}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap{counter-reset:seq}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner{display:flex;position:relative}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner .order{align-items:center;display:flex;margin:8px auto}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner .order:before{background:#fff;border-radius:4px;color:#444;counter-increment:seq;content:counter(seq);font-size:10px;font-weight:bold;line-height:18px;padding:0 6px}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner .confirm-remove-wrap .button{background-color:#dc3232;border-color:#dc3232}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner>.buttons{background-color:#f0f1f2;border:1px solid #fff;border-left:0;border-right:0;display:flex;flex-flow:column nowrap;margin:-1px 0 0}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner>.buttons .move{color:#444;cursor:grab}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner>.buttons .remove{color:#dc3232}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner>.buttons .button{border:0;padding:8px}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner>.buttons .button:focus{box-shadow:unset}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner .group-fields-wrap{display:flex;flex:1;flex-flow:row wrap}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner .confirm-remove-wrap{position:absolute;background:rgba(240,241,242,.9);width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s ease}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner .confirm-remove-wrap .button{align-items:center;display:inline-flex;padding:0 6px;position:absolute;left:50%;transform:translate(-50%, -50%);top:50%}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .group-field .group-field-wrap>.cpt-fields-wrap.inner .confirm-remove-wrap.active{opacity:1;pointer-events:inherit}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]),.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input select,.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input textarea{width:100%}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input textarea:not([class^=select2]){height:100px}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .select2-container .select2-selection{min-height:30px !important}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .select2-container .select2-search--inline .select2-search__field{vertical-align:top !important}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .select2-selection__arrow{height:29px !important}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .select2-container--default .select2-selection--multiple .select2-selection__choice{margin-bottom:0 !important;margin-top:4px !important}.cpt-fields-wrap .cpt-field .cpt-field-wrap .field-input .select2-container--default .select2-selection--multiple .select2-selection__clear{height:26px !important;margin-top:0 !important}.cpt-fields-wrap .cpt-field .cpt-field-wrap .buttons .button{align-items:center;display:inline-flex;padding:0 6px}.cpt-fields-wrap .cpt-field .cpt-field-wrap button.advanced-view{align-items:center;display:flex;justify-content:center;min-height:35px;text-align:center;width:100%}.cpt-fields-wrap .cpt-field .cpt-field-wrap button.advanced-view .dashicons{margin-right:10px}.cpt-fields-wrap .cpt-field.advanced-field{max-height:0;opacity:0;pointer-events:none;transition:opacity .2s ease,max-height .2s ease;width:100%}.cpt-fields-wrap .cpt-field.advanced-field.active{animation:bg-flash-in 1s;max-height:1000rem;opacity:1;pointer-events:initial}.cpt-pro-banner{border:5px dashed #ffb900;display:inline-block;margin:20px 0;max-width:300px;padding:0 1em;text-align:center;width:100%}.cpt-notice .title{text-transform:uppercase}.cpt-notice .actions{margin-top:15px}.cpt-notice .actions a .dashicons{text-decoration:none;vertical-align:sub}.cpt-container{overflow:hidden}.cpt-container .cpt-row{display:flex;flex-flow:row wrap;margin-left:-15px;margin-right:-15px}.cpt-container .cpt-row .cpt-col-3{padding:0 15px;width:calc(100% - 30px)}@media(min-width: 768px){.cpt-container .cpt-row .cpt-col-3{width:calc((100% / 3) - 30px)}}.cpt-import-svg{display:none !important}.cpt-load-spinner{align-items:center;background:#f0f1f2;display:flex;height:2.2rem;justify-content:center;width:100%}.cpt-load-spinner .spinner{background-position:center;height:20px;margin:0;visibility:visible;width:20px}.cpt-pro-status{color:#00a32a;font-weight:bold;margin-left:1rem;text-transform:uppercase}.cpt-pro-status.ko{color:#dc3232}
    2 .datepicker{display:none}.datepicker.active{display:block}.datepicker-dropdown{position:absolute;top:0;left:0;z-index:20;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:inline-block;border-radius:4px;background-color:#fff}.datepicker-dropdown .datepicker-picker{box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1)}.datepicker-picker span{display:block;flex:1;border:0;border-radius:4px;cursor:default;text-align:center;-webkit-touch-callout:none;user-select:none}.datepicker-main{padding:2px}.datepicker-footer{box-shadow:inset 0 1px 1px rgba(10,10,10,.1);background-color:#f5f5f5}.datepicker-grid,.datepicker-view .days-of-week,.datepicker-view,.datepicker-controls{display:flex}.datepicker-grid{flex-wrap:wrap}.datepicker-view .days .datepicker-cell,.datepicker-view .dow{flex-basis:14.2857142857%}.datepicker-view.datepicker-grid .datepicker-cell{flex-basis:25%}.datepicker-cell,.datepicker-view .week{height:2.25rem;line-height:2.25rem}.datepicker-title{box-shadow:inset 0 -1px 1px rgba(10,10,10,.1);background-color:#f5f5f5;padding:.375rem .75rem;text-align:center;font-weight:700}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-controls .button{display:inline-flex;position:relative;align-items:center;justify-content:center;margin:0;border:1px solid #dbdbdb;border-radius:4px;box-shadow:none;background-color:#fff;cursor:pointer;padding:calc(0.375em - 1px) .75em;height:2.25em;vertical-align:top;text-align:center;line-height:1.5;white-space:nowrap;color:#363636;font-size:1rem}.datepicker-controls .button:focus,.datepicker-controls .button:active{outline:none}.datepicker-controls .button:hover{border-color:#b5b5b5;color:#363636}.datepicker-controls .button:focus{border-color:#3273dc;color:#363636}.datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.datepicker-controls .button:active{border-color:#4a4a4a;color:#363636}.datepicker-controls .button[disabled]{cursor:not-allowed}.datepicker-header .datepicker-controls .button{border-color:transparent;font-weight:bold}.datepicker-header .datepicker-controls .button:hover{background-color:#f9f9f9}.datepicker-header .datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,255,255,.25)}.datepicker-header .datepicker-controls .button:active{background-color:#f2f2f2}.datepicker-header .datepicker-controls .button[disabled]{box-shadow:none}.datepicker-footer .datepicker-controls .button{margin:calc(0.375rem - 1px) .375rem;border-radius:2px;width:100%;font-size:.75rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .prev-btn,.datepicker-controls .next-btn{padding-right:.375rem;padding-left:.375rem;width:2.25rem}.datepicker-controls .prev-btn.disabled,.datepicker-controls .next-btn.disabled{visibility:hidden}.datepicker-view .dow{height:1.5rem;line-height:1.5rem;font-size:.875rem;font-weight:700}.datepicker-view .week{width:2.25rem;color:#b5b5b5;font-size:.75rem}@media(max-width: 22.5rem){.datepicker-view .week{width:1.96875rem}}.datepicker-grid{width:15.75rem}@media(max-width: 22.5rem){.calendar-weeks+.days .datepicker-grid{width:13.78125rem}}.datepicker-cell:not(.disabled):hover{background-color:#f9f9f9;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#e8e8e8}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:#3273dc;color:#fff;font-weight:600}.datepicker-cell.disabled{color:#dbdbdb}.datepicker-cell.prev:not(.disabled),.datepicker-cell.next:not(.disabled){color:#7a7a7a}.datepicker-cell.prev.selected,.datepicker-cell.next.selected{color:#e6e6e6}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f5f5f5}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#eee}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused{background-color:#e8e8e8}.datepicker-cell.today:not(.selected){background-color:#00d1b2}.datepicker-cell.today:not(.selected):not(.disabled){color:#fff}.datepicker-cell.today.focused:not(.selected){background-color:#00c4a7}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#b5b5b5;color:#fff}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#afafaf}.datepicker-cell.range-start{border-radius:4px 0 0 4px}.datepicker-cell.range-end{border-radius:0 4px 4px 0}.datepicker-cell.range{border-radius:0;background-color:#dbdbdb}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#d5d5d5}.datepicker-cell.range.disabled{color:#c2c2c2}.datepicker-cell.range.focused{background-color:#cfcfcf}.datepicker-view.datepicker-grid .datepicker-cell{height:4.5rem;line-height:4.5rem}.datepicker-input.in-edit{border-color:#2366d1}.datepicker-input.in-edit:focus,.datepicker-input.in-edit:active{box-shadow:0 0 .25em .25em rgba(35,102,209,.2)}
    3 .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{background-color:transparent;border:none;font-size:1em}.select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline;list-style:none;padding:0}.select2-container .select2-selection--multiple .select2-selection__clear{background-color:transparent;border:none;font-size:1em}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;margin-left:5px;padding:0;max-width:100%;resize:none;height:18px;vertical-align:bottom;font-family:sans-serif;overflow:hidden;word-break:keep-all}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option--selectable{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;padding-right:0px}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text;padding-bottom:5px;padding-right:5px;position:relative}.select2-container--default .select2-selection--multiple.select2-selection--clearable{padding-right:25px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;font-weight:bold;height:20px;margin-right:10px;margin-top:5px;position:absolute;right:0;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:inline-block;margin-left:5px;margin-top:5px;padding:0;padding-left:20px;position:relative;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-right:1px solid #aaa;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#999;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;position:absolute;left:0;top:0}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{background-color:#f1f1f1;color:#333;outline:none}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{border-left:1px solid #aaa;border-right:none;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__clear{float:left;margin-left:10px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--group{padding:0}.select2-container--default .select2-results__option--disabled{color:#999}.select2-container--default .select2-results__option--selected{background-color:#ddd}.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{background-color:#5897fb;color:#fff}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, white 50%, #eeeeee 100%);background-image:-o-linear-gradient(top, white 50%, #eeeeee 100%);background-image:linear-gradient(to bottom, white 50%, #eeeeee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF", endColorstr="#FFEEEEEE", GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE", endColorstr="#FFCCCCCC", GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, white 0%, #eeeeee 50%);background-image:-o-linear-gradient(top, white 0%, #eeeeee 50%);background-image:linear-gradient(to bottom, white 0%, #eeeeee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF", endColorstr="#FFEEEEEE", GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eeeeee 50%, white 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, white 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, white 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE", endColorstr="#FFFFFFFF", GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;padding-bottom:5px;padding-right:5px}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;display:inline-block;margin-left:5px;margin-top:5px;padding:0}.select2-container--classic .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#888;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;outline:none}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option--group{padding:0}.select2-container--classic .select2-results__option--disabled{color:gray}.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
     1.cpt-fields-section:not([data-template]),.cpt-field .cpt-repeater-fields:not([data-template]),.cpt-fields-section[data-template=post-type-form],.cpt-field [data-template=post-type-form].cpt-repeater-fields{margin-bottom:1em;background:#e0e0e0;display:flex;flex-flow:row wrap}.inside .cpt-fields-section:not([data-template]),.inside .cpt-field .cpt-repeater-fields:not([data-template]),.cpt-field .inside .cpt-repeater-fields:not([data-template]),.inside .cpt-fields-section[data-template=post-type-form],.inside .cpt-field [data-template=post-type-form].cpt-repeater-fields,.cpt-field .inside [data-template=post-type-form].cpt-repeater-fields{margin:-6px -12px -12px}.cpt-field{width:100%}.cpt-field .cpt-color-section{align-items:center;display:flex;flex-flow:row nowrap;max-width:150px;width:100%}.cpt-field .cpt-color-section .preview{background-color:#f0f1f2;box-shadow:0 1px 3px rgba(0,0,0,.4);border-radius:100%;cursor:pointer;flex:0 0 22px;height:22px;margin-right:10px}.cpt-field .cpt-file-section{position:relative}.cpt-field .cpt-file-section input{bottom:0;opacity:0;position:absolute;pointer-events:none;max-width:148px}.cpt-field .cpt-file-wrap{height:150px;position:relative;width:150px}.cpt-field .cpt-file-wrap:hover .cpt-file-actions{z-index:3}.cpt-field .cpt-file-preview{background-color:#f5f5f5;height:100%;width:100%;position:absolute}.cpt-field .cpt-file-preview img{position:relative;z-index:2;background-color:#fff}.cpt-field .cpt-file-actions{align-items:center;background-color:rgba(245,245,245,.7);border:1px dashed #d5d8da;display:flex;flex-flow:column wrap;height:calc(100% - 22px);justify-content:flex-end;padding:10px;position:relative;transition:opacity .2s;width:calc(100% - 22px);z-index:1}.cpt-field .cpt-file-actions .file-name{font-size:smaller;padding-bottom:10px;overflow:hidden;text-overflow:ellipsis;width:100%;white-space:nowrap}.cpt-field .cpt-file-actions .buttons .button{z-index:2;line-height:0}.cpt-field .cpt-repeater-section{counter-reset:seq}.cpt-field .cpt-repeater-group{display:flex;flex-flow:row nowrap;position:relative;width:100%}.cpt-field .cpt-repeater-group .buttons{background-color:#e0e0e0;border:1px solid #fff;border-left:0;border-right:0;display:flex;flex-flow:column wrap}.cpt-field .cpt-repeater-group .buttons .order{align-items:center;display:flex;margin:8px auto}.cpt-field .cpt-repeater-group .buttons .order:before{background:#fff;border-radius:4px;color:#444;counter-increment:seq;content:counter(seq);font-size:10px;font-weight:bold;line-height:18px;padding:0 6px}.cpt-field .cpt-repeater-group .buttons .move{color:#444;cursor:grab}.cpt-field .cpt-repeater-group .buttons .remove{color:#dc3232}.cpt-field .cpt-repeater-group .buttons .button{line-height:0;border:0;padding:8px;background:rgba(0,0,0,0)}.cpt-field .cpt-repeater-group .buttons .button:focus{box-shadow:unset}.cpt-field .cpt-repeater-group .buttons .button:hover{background:#fff}.cpt-field .cpt-repeater-group:first-child>.buttons{border-top:0}.cpt-field .cpt-repeater-group:last-child>.buttons{border-bottom:0}.cpt-field .cpt-repeater-fields{margin:0 !important;width:100%}.cpt-field .cpt-repeater-extra{display:flex;flex-flow:row wrap;width:100%}.cpt-field .cpt-repeater-remove{background:rgba(224,224,224,.9);position:absolute;z-index:2;display:flex;flex-flow:row wrap;justify-content:center;align-items:center;height:100%;width:100%;gap:20px;opacity:0;pointer-events:none;transition:opacity .3s ease}.cpt-field .cpt-repeater-remove.active{opacity:1;pointer-events:inherit}.cpt-field .cpt-repeater-add{margin:10px 0 0;background:unset;border:0;color:#0071a1;cursor:pointer;height:30px;width:34px;padding:0}.cpt-field .cpt-repeater-add:focus{box-shadow:unset;outline:none}.cpt-field .cpt-repeater-add .dashicons{font-size:30px;height:auto;width:auto}.cpt-field .cpt-repeater-add:disabled{display:none}.cpt-field .cpt-repeater-spinner{align-items:center;display:flex;height:40px;justify-content:center;width:100%}.cpt-field .cpt-repeater-spinner .spinner{background-position:center;height:20px;margin:0;visibility:visible;width:20px}.cpt-field .select2-container .select2-selection{min-height:40px !important}@media screen and (min-width: 783px){.cpt-field .select2-container .select2-selection{min-height:30px !important}}.cpt-field .select2-container .select2-search--inline .select2-search__field{vertical-align:top !important}.cpt-field .select2-selection__arrow{height:37px !important}@media screen and (min-width: 783px){.cpt-field .select2-selection__arrow{height:29px !important}}.cpt-field .select2-container--default .select2-selection--multiple .select2-selection__choice{margin-bottom:0 !important;margin-top:4px !important;line-height:27px}@media screen and (min-width: 783px){.cpt-field .select2-container--default .select2-selection--multiple .select2-selection__choice{line-height:18px}}.cpt-field .select2-selection__choice__remove{line-height:27px}@media screen and (min-width: 783px){.cpt-field .select2-selection__choice__remove{line-height:18px}}.cpt-field .select2-container--default .select2-selection--multiple .select2-selection__clear{height:34px !important;margin-top:0 !important}@media screen and (min-width: 783px){.cpt-field .select2-container--default .select2-selection--multiple .select2-selection__clear{height:26px !important}}.cpt-field .select2-selection__rendered:not(ul){line-height:38px !important}@media screen and (min-width: 783px){.cpt-field .select2-selection__rendered:not(ul){line-height:28px !important}}.cpt-field-tinymce textarea{display:inline-block !important}.cpt-field-tinymce textarea[aria-hidden=true]{opacity:0;pointer-events:none;position:absolute;bottom:0;left:0}@media screen and (max-width: 782px){.cpt-field{width:100% !important}}.cpt-field-required label[for]:after{content:"*";margin-left:4px;font-weight:bold}.cpt-field-inner{margin:1px}.cpt-field-wrap{background:#fff;display:flex;flex-flow:column wrap;padding:10px 15px;transition:background .1s ease-in-out}.cpt-field-wrap:hover{background:#fcfcfd}.cpt-field-wrap label{margin-bottom:3px}.cpt-field-wrap.advanced-field{height:0;overflow:hidden;pointer-events:none;padding:0;margin:-1px 0}.cpt-field-wrap.advanced-field.active{height:auto;overflow:auto;pointer-events:auto;padding:10px 15px;margin:unset}.cpt-field-wrap.advanced-field-btn .button{align-items:center;display:flex;justify-content:center;min-height:35px;text-align:center;width:100%}.cpt-field-wrap.advanced-field-btn .button .dashicons{margin-right:10px}.cpt-field-wrap .input input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]),.cpt-field-wrap .input select,.cpt-field-wrap .input textarea{width:100%}.cpt-field-wrap .input textarea:not([class^=select2]){height:100px}.cpt-field-wrap .input .template-shortcode{margin:15px 0 0}.cpt-field-wrap .input .template-shortcode input{border:0;background:rgba(0,0,0,0);cursor:copy;margin:0}.cpt-field-wrap .input .template-shortcode input:not(:last-child){margin:0 0 10px}.cpt-field-wrap .description{margin-top:3px}.cpt-field-wrap .description p{font-size:smaller;opacity:.7;margin:0;padding:0}@media screen and (min-width: 783px){.cpt-field-wrap.horizontal{flex-flow:row wrap}.cpt-field-wrap.horizontal label{display:flex;justify-content:end;text-align:right;width:15%;padding-right:13px;margin:0}.cpt-field-wrap.horizontal .input{flex:1}.cpt-field-wrap.horizontal .description{width:35%;padding-left:13px;margin:0}}.cpt-notice .notice-title{display:block}.cpt-notice .message{margin:.5em 0;padding:2px}.cpt-notice .message p:first-child{margin-top:0;padding-top:0}.cpt-notice .message p:last-child{margin-bottom:0;padding-bottom:0}.cpt-notice .actions{margin-top:1em;padding-top:.5em;border-top:1px solid #d5d8da}.cpt-notice .actions .dashicons{font-size:110%;text-decoration:none;vertical-align:middle}.cpt-notice .actions a:not(:last-child){margin-right:20px}.cpt-notice .cpt-dismiss-notice{color:#b32d2e}.cpt-pro-banner{border:5px dashed #ffb900;display:inline-block;margin:20px 0;max-width:300px;padding:0 1em;text-align:center;width:100%}.cpt-row{display:flex;flex-flow:row wrap;margin-left:-15px;margin-right:-15px}.cpt-col-3{padding:0 15px;width:calc(100% - 30px)}@media screen and (min-width: 783px){.cpt-col-3{width:calc(33.3333333333% - 30px)}}
     2.datepicker{display:none}.datepicker.active{display:block}.datepicker-dropdown{position:absolute;top:0;left:0;z-index:20;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:inline-block;border-radius:4px;background-color:#fff}.datepicker-dropdown .datepicker-picker{box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1)}.datepicker-picker span{display:block;flex:1;border:0;border-radius:4px;cursor:default;text-align:center;-webkit-touch-callout:none;user-select:none}.datepicker-main{padding:2px}.datepicker-footer{box-shadow:inset 0 1px 1px rgba(10,10,10,.1);background-color:#f5f5f5}.datepicker-grid,.datepicker-view .days-of-week,.datepicker-view,.datepicker-controls{display:flex}.datepicker-grid{flex-wrap:wrap}.datepicker-view .days .datepicker-cell,.datepicker-view .dow{flex-basis:14.2857142857%}.datepicker-view.datepicker-grid .datepicker-cell{flex-basis:25%}.datepicker-cell,.datepicker-view .week{height:2.25rem;line-height:2.25rem}.datepicker-title{box-shadow:inset 0 -1px 1px rgba(10,10,10,.1);background-color:#f5f5f5;padding:.375rem .75rem;text-align:center;font-weight:700}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-controls .button{display:inline-flex;position:relative;align-items:center;justify-content:center;margin:0;border:1px solid #dbdbdb;border-radius:4px;box-shadow:none;background-color:#fff;cursor:pointer;padding:calc(0.375em - 1px) .75em;height:2.25em;vertical-align:top;text-align:center;line-height:1.5;white-space:nowrap;color:#363636;font-size:1rem}.datepicker-controls .button:focus,.datepicker-controls .button:active{outline:none}.datepicker-controls .button:hover{border-color:#b5b5b5;color:#363636}.datepicker-controls .button:focus{border-color:#3273dc;color:#363636}.datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.datepicker-controls .button:active{border-color:#4a4a4a;color:#363636}.datepicker-controls .button[disabled]{cursor:not-allowed}.datepicker-header .datepicker-controls .button{border-color:rgba(0,0,0,0);font-weight:bold}.datepicker-header .datepicker-controls .button:hover{background-color:#f9f9f9}.datepicker-header .datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,255,255,.25)}.datepicker-header .datepicker-controls .button:active{background-color:#f2f2f2}.datepicker-header .datepicker-controls .button[disabled]{box-shadow:none}.datepicker-footer .datepicker-controls .button{margin:calc(.375rem - 1px) .375rem;border-radius:2px;width:100%;font-size:.75rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .prev-btn,.datepicker-controls .next-btn{padding-right:.375rem;padding-left:.375rem;width:2.25rem}.datepicker-controls .prev-btn.disabled,.datepicker-controls .next-btn.disabled{visibility:hidden}.datepicker-view .dow{height:1.5rem;line-height:1.5rem;font-size:.875rem;font-weight:700}.datepicker-view .week{width:2.25rem;color:#b5b5b5;font-size:.75rem}@media(max-width: 22.5rem){.datepicker-view .week{width:1.96875rem}}.datepicker-grid{width:15.75rem}@media(max-width: 22.5rem){.calendar-weeks+.days .datepicker-grid{width:13.78125rem}}.datepicker-cell:not(.disabled):hover{background-color:#f9f9f9;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#e8e8e8}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:#3273dc;color:#fff;font-weight:600}.datepicker-cell.disabled{color:#dbdbdb}.datepicker-cell.prev:not(.disabled),.datepicker-cell.next:not(.disabled){color:#7a7a7a}.datepicker-cell.prev.selected,.datepicker-cell.next.selected{color:#e6e6e6}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f5f5f5}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#eee}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused{background-color:#e8e8e8}.datepicker-cell.today:not(.selected){background-color:#00d1b2}.datepicker-cell.today:not(.selected):not(.disabled){color:#fff}.datepicker-cell.today.focused:not(.selected){background-color:#00c4a7}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#b5b5b5;color:#fff}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#afafaf}.datepicker-cell.range-start{border-radius:4px 0 0 4px}.datepicker-cell.range-end{border-radius:0 4px 4px 0}.datepicker-cell.range{border-radius:0;background-color:#dbdbdb}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#d5d5d5}.datepicker-cell.range.disabled{color:#c2c2c2}.datepicker-cell.range.focused{background-color:#cfcfcf}.datepicker-view.datepicker-grid .datepicker-cell{height:4.5rem;line-height:4.5rem}.datepicker-input.in-edit{border-color:#2366d1}.datepicker-input.in-edit:focus,.datepicker-input.in-edit:active{box-shadow:0 0 .25em .25em rgba(35,102,209,.2)}
     3.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{background-color:rgba(0,0,0,0);border:none;font-size:1em}.select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline;list-style:none;padding:0}.select2-container .select2-selection--multiple .select2-selection__clear{background-color:rgba(0,0,0,0);border:none;font-size:1em}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;margin-left:5px;padding:0;max-width:100%;resize:none;height:18px;vertical-align:bottom;font-family:sans-serif;overflow:hidden;word-break:keep-all}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option--selectable{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;padding-right:0px}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0);border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #888 rgba(0,0,0,0);border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text;padding-bottom:5px;padding-right:5px;position:relative}.select2-container--default .select2-selection--multiple.select2-selection--clearable{padding-right:25px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;font-weight:bold;height:20px;margin-right:10px;margin-top:5px;position:absolute;right:0;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:inline-block;margin-left:5px;margin-top:5px;padding:0;padding-left:20px;position:relative;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{background-color:rgba(0,0,0,0);border:none;border-right:1px solid #aaa;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#999;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;position:absolute;left:0;top:0}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{background-color:#f1f1f1;color:#333;outline:none}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{border-left:1px solid #aaa;border-right:none;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__clear{float:left;margin-left:10px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:rgba(0,0,0,0);border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--group{padding:0}.select2-container--default .select2-results__option--disabled{color:#999}.select2-container--default .select2-results__option--selected{background-color:#ddd}.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{background-color:#5897fb;color:#fff}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, white 50%, #eeeeee 100%);background-image:-o-linear-gradient(top, white 50%, #eeeeee 100%);background-image:linear-gradient(to bottom, white 50%, #eeeeee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF", endColorstr="#FFEEEEEE", GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE", endColorstr="#FFCCCCCC", GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0);border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:rgba(0,0,0,0);border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #888 rgba(0,0,0,0);border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, white 0%, #eeeeee 50%);background-image:-o-linear-gradient(top, white 0%, #eeeeee 50%);background-image:linear-gradient(to bottom, white 0%, #eeeeee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF", endColorstr="#FFEEEEEE", GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eeeeee 50%, white 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, white 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, white 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE", endColorstr="#FFFFFFFF", GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;padding-bottom:5px;padding-right:5px}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;display:inline-block;margin-left:5px;margin-top:5px;padding:0}.select2-container--classic .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{background-color:rgba(0,0,0,0);border:none;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#888;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;outline:none}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid rgba(0,0,0,0)}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option--group{padding:0}.select2-container--classic .select2-results__option--disabled{color:gray}.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
  • custom-post-types/trunk/assets/js/backend.js

    r2784149 r2915886  
    1 !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e){t.exports=jQuery},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){var r,i,o;i=[n(0)],void 0===(o="function"==typeof(r=function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;return function(){
     1!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t){e.exports=jQuery},function(e,t,n){},function(e,t,n){var i,r,s;r=[n(0)],void 0===(s="function"==typeof(i=function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;return function(){
    22/**
    33 * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
    44 * Released under MIT license, http://github.com/requirejs/almond/LICENSE
    55 */
    6 var t,n,r;e&&e.requirejs||(e?n=e:e={},function(e){var i,o,a,s,l={},u={},c={},d={},f=Object.prototype.hasOwnProperty,h=[].slice,p=/\.js$/;function v(t,e){return f.call(t,e)}function g(t,e){var n,r,i,o,a,s,l,u,d,f,h,v=e&&e.split("/"),g=c.map,m=g&&g["*"]||{};if(t){for(a=(t=t.split("/")).length-1,c.nodeIdCompat&&p.test(t[a])&&(t[a]=t[a].replace(p,"")),"."===t[0].charAt(0)&&v&&(t=v.slice(0,v.length-1).concat(t)),d=0;d<t.length;d++)if("."===(h=t[d]))t.splice(d,1),d-=1;else if(".."===h){if(0===d||1===d&&".."===t[2]||".."===t[d-1])continue;d>0&&(t.splice(d-1,2),d-=2)}t=t.join("/")}if((v||m)&&g){for(d=(n=t.split("/")).length;d>0;d-=1){if(r=n.slice(0,d).join("/"),v)for(f=v.length;f>0;f-=1)if((i=g[v.slice(0,f).join("/")])&&(i=i[r])){o=i,s=d;break}if(o)break;!l&&m&&m[r]&&(l=m[r],u=d)}!o&&l&&(o=l,s=u),o&&(n.splice(0,s,o),t=n.join("/"))}return t}function m(t,e){return function(){var n=h.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),o.apply(void 0,n.concat([t,e]))}}function y(t){return function(e){l[t]=e}}function _(t){if(v(u,t)){var e=u[t];delete u[t],d[t]=!0,i.apply(void 0,e)}if(!v(l,t)&&!v(d,t))throw new Error("No "+t);return l[t]}function b(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function w(t){return t?b(t):[]}function k(t){return function(){return c&&c.config&&c.config[t]||{}}}a=function(t,e){var n,r,i=b(t),o=i[0],a=e[1];return t=i[1],o&&(n=_(o=g(o,a))),o?t=n&&n.normalize?n.normalize(t,(r=a,function(t){return g(t,r)})):g(t,a):(o=(i=b(t=g(t,a)))[0],t=i[1],o&&(n=_(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:n}},s={require:function(t){return m(t)},exports:function(t){var e=l[t];return void 0!==e?e:l[t]={}},module:function(t){return{id:t,uri:"",exports:l[t],config:k(t)}}},i=function(t,e,n,r){var i,o,c,f,h,p,g,b=[],k=typeof n;if(p=w(r=r||t),"undefined"===k||"function"===k){for(e=!e.length&&n.length?["require","exports","module"]:e,h=0;h<e.length;h+=1)if("require"===(o=(f=a(e[h],p)).f))b[h]=s.require(t);else if("exports"===o)b[h]=s.exports(t),g=!0;else if("module"===o)i=b[h]=s.module(t);else if(v(l,o)||v(u,o)||v(d,o))b[h]=_(o);else{if(!f.p)throw new Error(t+" missing "+o);f.p.load(f.n,m(r,!0),y(o),{}),b[h]=l[o]}c=n?n.apply(l[t],b):void 0,t&&(i&&void 0!==i.exports&&i.exports!==l[t]?l[t]=i.exports:void 0===c&&g||(l[t]=c))}else t&&(l[t]=n)},t=n=o=function(t,e,n,r,l){if("string"==typeof t)return s[t]?s[t](e):_(a(t,w(e)).f);if(!t.splice){if((c=t).deps&&o(c.deps,c.callback),!e)return;e.splice?(t=e,e=n,n=null):t=void 0}return e=e||function(){},"function"==typeof n&&(n=r,r=l),r?i(void 0,t,e,n):setTimeout((function(){i(void 0,t,e,n)}),4),o},o.config=function(t){return o(t)},t._defined=l,(r=function(t,e,n){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(n=e,e=[]),v(l,t)||v(u,t)||(u[t]=[t,e,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=n,e.define=r)}(),e.define("almond",(function(){})),e.define("jquery",[],(function(){var e=t||$;return null==e&&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."),e})),e.define("select2/utils",["jquery"],(function(t){var e={};function n(t){var e=t.prototype,n=[];for(var r in e)"function"==typeof e[r]&&"constructor"!==r&&n.push(r);return n}e.Extend=function(t,e){var n={}.hasOwnProperty;function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},e.Decorate=function(t,e){var r=n(e),i=n(t);function o(){var n=Array.prototype.unshift,r=e.prototype.constructor.length,i=t.prototype.constructor;r>0&&(n.call(arguments,t.prototype.constructor),i=e.prototype.constructor),i.apply(this,arguments)}e.displayName=t.displayName,o.prototype=new function(){this.constructor=o};for(var a=0;a<i.length;a++){var s=i[a];o.prototype[s]=t.prototype[s]}for(var l=function(t){var n=function(){};t in o.prototype&&(n=o.prototype[t]);var r=e.prototype[t];return function(){var t=Array.prototype.unshift;return t.call(arguments,n),r.apply(this,arguments)}},u=0;u<r.length;u++){var c=r[u];o.prototype[c]=l(c)}return o};var r=function(){this.listeners={}};r.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},r.prototype.trigger=function(t){var e=Array.prototype.slice,n=e.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},r.prototype.invoke=function(t,e){for(var n=0,r=t.length;n<r;n++)t[n].apply(this,e)},e.Observable=r,e.generateChars=function(t){for(var e="",n=0;n<t;n++)e+=Math.floor(36*Math.random()).toString(36);return e},e.bind=function(t,e){return function(){t.apply(e,arguments)}},e._convertData=function(t){for(var e in t){var n=e.split("-"),r=t;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=t[e]),r=r[o]}delete t[e]}}return t},e.hasScroll=function(e,n){var r=t(n),i=n.style.overflowX,o=n.style.overflowY;return(i!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===i||"scroll"===o||r.innerHeight()<n.scrollHeight||r.innerWidth()<n.scrollWidth)},e.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,(function(t){return e[t]}))},e.__cache={};var i=0;return e.GetUniqueElementId=function(t){var n=t.getAttribute("data-select2-id");return null!=n||(n=t.id?"select2-data-"+t.id:"select2-data-"+(++i).toString()+"-"+e.generateChars(4),t.setAttribute("data-select2-id",n)),n},e.StoreData=function(t,n,r){var i=e.GetUniqueElementId(t);e.__cache[i]||(e.__cache[i]={}),e.__cache[i][n]=r},e.GetData=function(n,r){var i=e.GetUniqueElementId(n);return r?e.__cache[i]&&null!=e.__cache[i][r]?e.__cache[i][r]:t(n).data(r):e.__cache[i]},e.RemoveData=function(t){var n=e.GetUniqueElementId(t);null!=e.__cache[n]&&delete e.__cache[n],t.removeAttribute("data-select2-id")},e.copyNonInternalCssClasses=function(t,e){var n=t.getAttribute("class").trim().split(/\s+/);n=n.filter((function(t){return 0===t.indexOf("select2-")}));var r=e.getAttribute("class").trim().split(/\s+/);r=r.filter((function(t){return 0!==t.indexOf("select2-")}));var i=n.concat(r);t.setAttribute("class",i.join(" "))},e})),e.define("select2/results",["jquery","./utils"],(function(t,e){function n(t,e,r){this.$element=t,this.data=r,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(e){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var r=t('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(e.message);r.append(n(i(e.args))),r[0].className+=" select2-results__message",this.$results.append(r)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var n=0;n<t.results.length;n++){var r=t.results[n],i=this.option(r);e.push(i)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(t,e){e.find(".select2-results").append(t)},n.prototype.sort=function(t){return this.options.get("sorter")(t)},n.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option--selectable"),e=t.filter(".select2-results__option--selected");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current((function(r){var i=r.map((function(t){return t.id.toString()}));n.$results.find(".select2-results__option--selectable").each((function(){var n=t(this),r=e.GetData(this,"data"),o=""+r.id;null!=r.element&&r.element.selected||null==r.element&&i.indexOf(o)>-1?(this.classList.add("select2-results__option--selected"),n.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),n.attr("aria-selected","false"))}))}))},n.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},n=this.option(e);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var r=document.createElement("li");r.classList.add("select2-results__option"),r.classList.add("select2-results__option--selectable");var i={role:"option"},o=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var a in(null!=n.element&&o.call(n.element,":disabled")||null==n.element&&n.disabled)&&(i["aria-disabled"]="true",r.classList.remove("select2-results__option--selectable"),r.classList.add("select2-results__option--disabled")),null==n.id&&r.classList.remove("select2-results__option--selectable"),null!=n._resultId&&(r.id=n._resultId),n.title&&(r.title=n.title),n.children&&(i.role="group",i["aria-label"]=n.text,r.classList.remove("select2-results__option--selectable"),r.classList.add("select2-results__option--group")),i){var s=i[a];r.setAttribute(a,s)}if(n.children){var l=t(r),u=document.createElement("strong");u.className="select2-results__group",this.template(n,u);for(var c=[],d=0;d<n.children.length;d++){var f=n.children[d],h=this.option(f);c.push(h)}var p=t("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});p.append(c),l.append(u),l.append(p)}else this.template(n,r);return e.StoreData(r,"data",n),r},n.prototype.bind=function(n,r){var i=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",(function(t){i.clear(),i.append(t.data),n.isOpen()&&(i.setClasses(),i.highlightFirstItem())})),n.on("results:append",(function(t){i.append(t.data),n.isOpen()&&i.setClasses()})),n.on("query",(function(t){i.hideMessages(),i.showLoading(t)})),n.on("select",(function(){n.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())})),n.on("unselect",(function(){n.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())})),n.on("open",(function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()})),n.on("close",(function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")})),n.on("results:toggle",(function(){var t=i.getHighlightedResults();0!==t.length&&t.trigger("mouseup")})),n.on("results:select",(function(){var t=i.getHighlightedResults();if(0!==t.length){var n=e.GetData(t[0],"data");t.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:n})}})),n.on("results:previous",(function(){var t=i.getHighlightedResults(),e=i.$results.find(".select2-results__option--selectable"),n=e.index(t);if(!(n<=0)){var r=n-1;0===t.length&&(r=0);var o=e.eq(r);o.trigger("mouseenter");var a=i.$results.offset().top,s=o.offset().top,l=i.$results.scrollTop()+(s-a);0===r?i.$results.scrollTop(0):s-a<0&&i.$results.scrollTop(l)}})),n.on("results:next",(function(){var t=i.getHighlightedResults(),e=i.$results.find(".select2-results__option--selectable"),n=e.index(t)+1;if(!(n>=e.length)){var r=e.eq(n);r.trigger("mouseenter");var o=i.$results.offset().top+i.$results.outerHeight(!1),a=r.offset().top+r.outerHeight(!1),s=i.$results.scrollTop()+a-o;0===n?i.$results.scrollTop(0):a>o&&i.$results.scrollTop(s)}})),n.on("results:focus",(function(t){t.element[0].classList.add("select2-results__option--highlighted"),t.element[0].setAttribute("aria-selected","true")})),n.on("results:message",(function(t){i.displayMessage(t)})),t.fn.mousewheel&&this.$results.on("mousewheel",(function(t){var e=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-e+t.deltaY,r=t.deltaY>0&&e-t.deltaY<=0,o=t.deltaY<0&&n<=i.$results.height();r?(i.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):o&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),t.preventDefault(),t.stopPropagation())})),this.$results.on("mouseup",".select2-results__option--selectable",(function(n){var r=t(this),o=e.GetData(this,"data");r.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:n,data:o}):i.trigger("close",{}):i.trigger("select",{originalEvent:n,data:o})})),this.$results.on("mouseenter",".select2-results__option--selectable",(function(n){var r=e.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:r,element:t(this)})}))},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find(".select2-results__option--selectable").index(t),n=this.$results.offset().top,r=t.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},n.prototype.template=function(e,n){var r=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),o=r(e,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=i(o):t(n).append(o)},n})),e.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}})),e.define("select2/selection/base",["jquery","../utils","../keys"],(function(t,e,n){function r(t,e){this.$element=t,this.options=e,r.__super__.constructor.call(this)}return e.Extend(r,e.Observable),r.prototype.render=function(){var n=t('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=e.GetData(this.$element[0],"old-tabindex")?this._tabindex=e.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n,n},r.prototype.bind=function(t,e){var r=this,i=t.id+"-results";this.container=t,this.$selection.on("focus",(function(t){r.trigger("focus",t)})),this.$selection.on("blur",(function(t){r._handleBlur(t)})),this.$selection.on("keydown",(function(t){r.trigger("keypress",t),t.which===n.SPACE&&t.preventDefault()})),t.on("results:focus",(function(t){r.$selection.attr("aria-activedescendant",t.data._resultId)})),t.on("selection:update",(function(t){r.update(t.data)})),t.on("open",(function(){r.$selection.attr("aria-expanded","true"),r.$selection.attr("aria-owns",i),r._attachCloseHandler(t)})),t.on("close",(function(){r.$selection.attr("aria-expanded","false"),r.$selection.removeAttr("aria-activedescendant"),r.$selection.removeAttr("aria-owns"),r.$selection.trigger("focus"),r._detachCloseHandler(t)})),t.on("enable",(function(){r.$selection.attr("tabindex",r._tabindex),r.$selection.attr("aria-disabled","false")})),t.on("disable",(function(){r.$selection.attr("tabindex","-1"),r.$selection.attr("aria-disabled","true")}))},r.prototype._handleBlur=function(e){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||t.contains(n.$selection[0],document.activeElement)||n.trigger("blur",e)}),1)},r.prototype._attachCloseHandler=function(n){t(document.body).on("mousedown.select2."+n.id,(function(n){var r=t(n.target).closest(".select2");t(".select2.select2-container--open").each((function(){this!=r[0]&&e.GetData(this,"element").select2("close")}))}))},r.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},r.prototype.position=function(t,e){e.find(".selection").append(t)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r})),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(t,e,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,e),i.prototype.render=function(){var t=i.__super__.render.call(this);return t[0].classList.add("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.attr("aria-controls",r),this.$selection.on("mousedown",(function(t){1===t.which&&n.trigger("toggle",{originalEvent:t})})),this.$selection.on("focus",(function(t){})),this.$selection.on("blur",(function(t){})),t.on("focus",(function(e){t.isOpen()||n.$selection.trigger("focus")}))},i.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},i.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},i.prototype.selectionContainer=function(){return t("<span></span>")},i.prototype.update=function(t){if(0!==t.length){var e=t[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(e,n);n.empty().append(r);var i=e.title||e.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i})),e.define("select2/selection/multiple",["jquery","./base","../utils"],(function(t,e,n){function r(t,e){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,e),r.prototype.render=function(){var t=r.__super__.render.call(this);return t[0].classList.add("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},r.prototype.bind=function(e,i){var o=this;r.__super__.bind.apply(this,arguments);var a=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",a),this.$selection.on("click",(function(t){o.trigger("toggle",{originalEvent:t})})),this.$selection.on("click",".select2-selection__choice__remove",(function(e){if(!o.isDisabled()){var r=t(this).parent(),i=n.GetData(r[0],"data");o.trigger("unselect",{originalEvent:e,data:i})}})),this.$selection.on("keydown",".select2-selection__choice__remove",(function(t){o.isDisabled()||t.stopPropagation()}))},r.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},r.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},r.prototype.selectionContainer=function(){return t('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},r.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],r=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",i=0;i<t.length;i++){var o=t[i],a=this.selectionContainer(),s=this.display(o,a),l=r+n.generateChars(4)+"-";o.id?l+=o.id:l+=n.generateChars(4),a.find(".select2-selection__choice__display").append(s).attr("id",l);var u=o.title||o.text;u&&a.attr("title",u);var c=this.options.get("translations").get("removeItem"),d=a.find(".select2-selection__choice__remove");d.attr("title",c()),d.attr("aria-label",c()),d.attr("aria-describedby",l),n.StoreData(a[0],"data",o),e.push(a)}this.$selection.find(".select2-selection__rendered").append(e)}},r})),e.define("select2/selection/placeholder",[],(function(){function t(t,e,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n)}return t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.createPlaceholder=function(t,e){var n=this.selectionContainer();n.html(this.display(e)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");var r=e.title||e.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",r),n},t.prototype.update=function(t,e){var n=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||n)return t.call(this,e);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},t})),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function(t,e,n){function r(){}return r.prototype.bind=function(t,e,n){var r=this;t.call(this,e,n),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(t){r._handleClear(t)})),e.on("keypress",(function(t){r._handleKeyboardClear(t,e)}))},r.prototype._handleClear=function(t,e){if(!this.isDisabled()){var r=this.$selection.find(".select2-selection__clear");if(0!==r.length){e.stopPropagation();var i=n.GetData(r[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var a={data:i};if(this.trigger("clear",a),a.prevented)this.$element.val(o);else{for(var s=0;s<i.length;s++)if(a={data:i[s]},this.trigger("unselect",a),a.prevented)return void this.$element.val(o);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},r.prototype._handleKeyboardClear=function(t,n,r){r.isOpen()||n.which!=e.DELETE&&n.which!=e.BACKSPACE||this._handleClear(n)},r.prototype.update=function(e,r){if(e.call(this,r),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),!(this.$selection.find(".select2-selection__placeholder").length>0||0===r.length)){var i=this.$selection.find(".select2-selection__rendered").attr("id"),o=this.options.get("translations").get("removeAllItems"),a=t('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>');a.attr("title",o()),a.attr("aria-label",o()),a.attr("aria-describedby",i),n.StoreData(a[0],"data",r),this.$selection.prepend(a),this.$selection[0].classList.add("select2-selection--clearable")}},r})),e.define("select2/selection/search",["jquery","../utils","../keys"],(function(t,e,n){function r(t,e,n){t.call(this,e,n)}return r.prototype.render=function(e){var n=this.options.get("translations").get("search"),r=t('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=r,this.$search=r.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n());var i=e.call(this);return this._transferTabIndex(),i.append(this.$searchContainer),i},r.prototype.bind=function(t,r,i){var o=this,a=r.id+"-results",s=r.id+"-container";t.call(this,r,i),o.$search.attr("aria-describedby",s),r.on("open",(function(){o.$search.attr("aria-controls",a),o.$search.trigger("focus")})),r.on("close",(function(){o.$search.val(""),o.resizeSearch(),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),r.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),r.on("disable",(function(){o.$search.prop("disabled",!0)})),r.on("focus",(function(t){o.$search.trigger("focus")})),r.on("results:focus",(function(t){t.data._resultId?o.$search.attr("aria-activedescendant",t.data._resultId):o.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(t){o.trigger("focus",t)})),this.$selection.on("focusout",".select2-search--inline",(function(t){o._handleBlur(t)})),this.$selection.on("keydown",".select2-search--inline",(function(t){if(t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented(),t.which===n.BACKSPACE&&""===o.$search.val()){var r=o.$selection.find(".select2-selection__choice").last();if(r.length>0){var i=e.GetData(r[0],"data");o.searchRemoveChoice(i),t.preventDefault()}}})),this.$selection.on("click",".select2-search--inline",(function(t){o.$search.val()&&t.stopPropagation()}));var l=document.documentMode,u=l&&l<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(t){u?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(t){if(u&&"input"===t.type)o.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=n.SHIFT&&e!=n.CTRL&&e!=n.ALT&&e!=n.TAB&&o.handleSearch(t)}}))},r.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},r.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},r.prototype.update=function(t,e){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.resizeSearch(),n&&this.$search.trigger("focus")},r.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="100%";""===this.$search.attr("placeholder")&&(t=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",t)},r})),e.define("select2/selection/selectionCss",["../utils"],(function(t){function e(){}return e.prototype.render=function(e){var n=e.call(this),r=this.options.get("selectionCssClass")||"";return-1!==r.indexOf(":all:")&&(r=r.replace(":all:",""),t.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(r),n},e})),e.define("select2/selection/eventRelay",["jquery"],(function(t){function e(){}return e.prototype.bind=function(e,n,r){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],a=["opening","closing","selecting","unselecting","clearing"];e.call(this,n,r),n.on("*",(function(e,n){if(-1!==o.indexOf(e)){n=n||{};var r=t.Event("select2:"+e,{params:n});i.$element.trigger(r),-1!==a.indexOf(e)&&(n.prevented=r.isDefaultPrevented())}}))},e})),e.define("select2/translation",["jquery","require"],(function(t,e){function n(t){this.dict=t||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(t){return this.dict[t]},n.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},n._cache={},n.loadPath=function(t){if(!(t in n._cache)){var r=e(t);n._cache[t]=r}return new n(n._cache[t])},n})),e.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","Œ":"OE","Ƣ":"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","œ":"oe","ƣ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}})),e.define("select2/data/base",["../utils"],(function(t){function e(t,n){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,n){var r=e.id+"-result-";return r+=t.generateChars(4),null!=n.id?r+="-"+n.id.toString():r+="-"+t.generateChars(4),r},e})),e.define("select2/data/select",["./base","../utils","jquery"],(function(t,e,n){function r(t,e){this.$element=t,this.options=e,r.__super__.constructor.call(this)}return e.Extend(r,t),r.prototype.current=function(t){var e=this;t(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),(function(t){return e.item(n(t))})))},r.prototype.select=function(t){var e=this;if(t.selected=!0,null!=t.element&&"option"===t.element.tagName.toLowerCase())return t.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current((function(n){var r=[];(t=[t]).push.apply(t,n);for(var i=0;i<t.length;i++){var o=t[i].id;-1===r.indexOf(o)&&r.push(o)}e.$element.val(r),e.$element.trigger("input").trigger("change")}));else{var n=t.id;this.$element.val(n),this.$element.trigger("input").trigger("change")}},r.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,null!=t.element&&"option"===t.element.tagName.toLowerCase())return t.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current((function(n){for(var r=[],i=0;i<n.length;i++){var o=n[i].id;o!==t.id&&-1===r.indexOf(o)&&r.push(o)}e.$element.val(r),e.$element.trigger("input").trigger("change")}))}},r.prototype.bind=function(t,e){var n=this;this.container=t,t.on("select",(function(t){n.select(t.data)})),t.on("unselect",(function(t){n.unselect(t.data)}))},r.prototype.destroy=function(){this.$element.find("*").each((function(){e.RemoveData(this)}))},r.prototype.query=function(t,e){var r=[],i=this;this.$element.children().each((function(){if("option"===this.tagName.toLowerCase()||"optgroup"===this.tagName.toLowerCase()){var e=n(this),o=i.item(e),a=i.matches(t,o);null!==a&&r.push(a)}})),e({results:r})},r.prototype.addOptions=function(t){this.$element.append(t)},r.prototype.option=function(t){var r;t.children?(r=document.createElement("optgroup")).label=t.text:void 0!==(r=document.createElement("option")).textContent?r.textContent=t.text:r.innerText=t.text,void 0!==t.id&&(r.value=t.id),t.disabled&&(r.disabled=!0),t.selected&&(r.selected=!0),t.title&&(r.title=t.title);var i=this._normalizeItem(t);return i.element=r,e.StoreData(r,"data",i),n(r)},r.prototype.item=function(t){var r={};if(null!=(r=e.GetData(t[0],"data")))return r;var i=t[0];if("option"===i.tagName.toLowerCase())r={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if("optgroup"===i.tagName.toLowerCase()){r={text:t.prop("label"),children:[],title:t.prop("title")};for(var o=t.children("option"),a=[],s=0;s<o.length;s++){var l=n(o[s]),u=this.item(l);a.push(u)}r.children=a}return(r=this._normalizeItem(r)).element=t[0],e.StoreData(t[0],"data",r),r},r.prototype._normalizeItem=function(t){return t!==Object(t)&&(t={id:t,text:t}),null!=(t=n.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),n.extend({},{selected:!1,disabled:!1},t)},r.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},r})),e.define("select2/data/array",["./select","../utils","jquery"],(function(t,e,n){function r(t,e){this._dataToConvert=e.get("data")||[],r.__super__.constructor.call(this,t,e)}return e.Extend(r,t),r.prototype.bind=function(t,e){r.__super__.bind.call(this,t,e),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(t){var e=this.$element.find("option").filter((function(e,n){return n.value==t.id.toString()}));0===e.length&&(e=this.option(t),this.addOptions(e)),r.__super__.select.call(this,t)},r.prototype.convertToOptions=function(t){var e=this,r=this.$element.find("option"),i=r.map((function(){return e.item(n(this)).id})).get(),o=[];function a(t){return function(){return n(this).val()==t.id}}for(var s=0;s<t.length;s++){var l=this._normalizeItem(t[s]);if(i.indexOf(l.id)>=0){var u=r.filter(a(l)),c=this.item(u),d=n.extend(!0,{},l,c),f=this.option(d);u.replaceWith(f)}else{var h=this.option(l);if(l.children){var p=this.convertToOptions(l.children);h.append(p)}o.push(h)}}return o},r})),e.define("select2/data/ajax",["./array","../utils","jquery"],(function(t,e,n){function r(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),r.__super__.constructor.call(this,t,e)}return e.Extend(r,t),r.prototype._applyDefaults=function(t){var e={data:function(t){return n.extend({},t,{q:t.term})},transport:function(t,e,r){var i=n.ajax(t);return i.then(e),i.fail(r),i}};return n.extend({},e,t,!0)},r.prototype.processResults=function(t){return t},r.prototype.query=function(t,e){var r=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=n.extend({type:"GET"},this.ajaxOptions);function o(){var n=i.transport(i,(function(n){var i=r.processResults(n,t);r.options.get("debug")&&window.console&&console.error&&(i&&i.results&&Array.isArray(i.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(i)}),(function(){(!("status"in n)||0!==n.status&&"0"!==n.status)&&r.trigger("results:message",{message:"errorLoading"})}));r._request=n}"function"==typeof i.url&&(i.url=i.url.call(this.$element,t)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},r})),e.define("select2/data/tags",["jquery"],(function(t){function e(t,e,n){var r=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),t.call(this,e,n),Array.isArray(r))for(var a=0;a<r.length;a++){var s=r[a],l=this._normalizeItem(s),u=this.option(l);this.$element.append(u)}}return e.prototype.query=function(t,e,n){var r=this;this._removeOldTags(),null!=e.term&&null==e.page?t.call(this,e,(function t(i,o){for(var a=i.results,s=0;s<a.length;s++){var l=a[s],u=null!=l.children&&!t({results:l.children},!0);if((l.text||"").toUpperCase()===(e.term||"").toUpperCase()||u)return!o&&(i.data=a,void n(i))}if(o)return!0;var c=r.createTag(e);if(null!=c){var d=r.option(c);d.attr("data-select2-tag","true"),r.addOptions([d]),r.insertTag(a,c)}i.results=a,n(i)})):t.call(this,e,n)},e.prototype.createTag=function(t,e){if(null==e.term)return null;var n=e.term.trim();return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(t,e,n){e.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each((function(){this.selected||t(this).remove()}))},e})),e.define("select2/data/tokenizer",["jquery"],(function(t){function e(t,e,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),t.call(this,e,n)}return e.prototype.bind=function(t,e,n){t.call(this,e,n),this.$search=e.dropdown.$search||e.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,n,r){var i=this;n.term=n.term||"";var o=this.tokenizer(n,this.options,(function(e){var n=i._normalizeItem(e);if(!i.$element.find("option").filter((function(){return t(this).val()===n.id})).length){var r=i.option(n);r.attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([r])}!function(t){i.trigger("select",{data:t})}(n)}));o.term!==n.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.trigger("focus")),n.term=o.term),e.call(this,n,r)},e.prototype.tokenizer=function(e,n,r,i){for(var o=r.get("tokenSeparators")||[],a=n.term,s=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};s<a.length;){var u=a[s];if(-1!==o.indexOf(u)){var c=a.substr(0,s),d=l(t.extend({},n,{term:c}));null!=d?(i(d),a=a.substr(s+1)||"",s=0):s++}else s++}return{term:a}},e})),e.define("select2/data/minimumInputLength",[],(function(){function t(t,e,n){this.minimumInputLength=n.get("minimumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,n)},t})),e.define("select2/data/maximumInputLength",[],(function(){function t(t,e,n){this.maximumInputLength=n.get("maximumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,n)},t})),e.define("select2/data/maximumSelectionLength",[],(function(){function t(t,e,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),t.call(this,e,n)}return t.prototype.bind=function(t,e,n){var r=this;t.call(this,e,n),e.on("select",(function(){r._checkIfMaximumSelected()}))},t.prototype.query=function(t,e,n){var r=this;this._checkIfMaximumSelected((function(){t.call(r,e,n)}))},t.prototype._checkIfMaximumSelected=function(t,e){var n=this;this.current((function(t){var r=null!=t?t.length:0;n.maximumSelectionLength>0&&r>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):e&&e()}))},t})),e.define("select2/dropdown",["jquery","./utils"],(function(t,e){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},n.prototype.bind=function(){},n.prototype.position=function(t,e){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),e.define("select2/dropdown/search",["jquery"],(function(t){function e(){}return e.prototype.render=function(e){var n=e.call(this),r=this.options.get("translations").get("search"),i=t('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",r()),n.prepend(i),n},e.prototype.bind=function(e,n,r){var i=this,o=n.id+"-results";e.call(this,n,r),this.$search.on("keydown",(function(t){i.trigger("keypress",t),i._keyUpPrevented=t.isDefaultPrevented()})),this.$search.on("input",(function(e){t(this).off("keyup")})),this.$search.on("keyup input",(function(t){i.handleSearch(t)})),n.on("open",(function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",o),i.$search.trigger("focus"),window.setTimeout((function(){i.$search.trigger("focus")}),0)})),n.on("close",(function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")})),n.on("focus",(function(){n.isOpen()||i.$search.trigger("focus")})),n.on("results:all",(function(t){null!=t.query.term&&""!==t.query.term||(i.showSearch(t)?i.$searchContainer[0].classList.remove("select2-search--hide"):i.$searchContainer[0].classList.add("select2-search--hide"))})),n.on("results:focus",(function(t){t.data._resultId?i.$search.attr("aria-activedescendant",t.data._resultId):i.$search.removeAttr("aria-activedescendant")}))},e.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.showSearch=function(t,e){return!0},e})),e.define("select2/dropdown/hidePlaceholder",[],(function(){function t(t,e,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n,r)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var n=e.slice(0),r=e.length-1;r>=0;r--){var i=e[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},t})),e.define("select2/dropdown/infiniteScroll",["jquery"],(function(t){function e(t,e,n,r){this.lastParams={},t.call(this,e,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(t,e,n){var r=this;t.call(this,e,n),e.on("query",(function(t){r.lastParams=t,r.loading=!0})),e.on("query:append",(function(t){r.lastParams=t,r.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=t.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.loadMore()},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return e.html(n(this.lastParams)),e},e})),e.define("select2/dropdown/attachBody",["jquery","../utils"],(function(t,e){function n(e,n,r){this.$dropdownParent=t(r.get("dropdownParent")||document.body),e.call(this,n,r)}return n.prototype.bind=function(t,e,n){var r=this;t.call(this,e,n),e.on("open",(function(){r._showDropdown(),r._attachPositioningHandler(e),r._bindContainerResultHandlers(e)})),e.on("close",(function(){r._hideDropdown(),r._detachPositioningHandler(e)})),this.$dropdownContainer.on("mousedown",(function(t){t.stopPropagation()}))},n.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(t,e,n){e.attr("class",n.attr("class")),e[0].classList.remove("select2"),e[0].classList.add("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(e){var n=t("<span></span>"),r=e.call(this);return n.append(r),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(t,e){if(!this._containerResultsHandlersBound){var n=this;e.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),e.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})),e.on("results:message",(function(){n._positionDropdown(),n._resizeDropdown()})),e.on("select",(function(){n._positionDropdown(),n._resizeDropdown()})),e.on("unselect",(function(){n._positionDropdown(),n._resizeDropdown()})),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,r){var i=this,o="scroll.select2."+r.id,a="resize.select2."+r.id,s="orientationchange.select2."+r.id,l=this.$container.parents().filter(e.hasScroll);l.each((function(){e.StoreData(this,"select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})})),l.on(o,(function(n){var r=e.GetData(this,"select2-scroll-position");t(this).scrollTop(r.y)})),t(window).on(o+" "+a+" "+s,(function(t){i._positionDropdown(),i._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,r){var i="scroll.select2."+r.id,o="resize.select2."+r.id,a="orientationchange.select2."+r.id;this.$container.parents().filter(e.hasScroll).off(i),t(window).off(i+" "+o+" "+a)},n.prototype._positionDropdown=function(){var e=t(window),n=this.$dropdown[0].classList.contains("select2-dropdown--above"),r=this.$dropdown[0].classList.contains("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=o.top,a.bottom=o.top+a.height;var s=this.$dropdown.outerHeight(!1),l=e.scrollTop(),u=e.scrollTop()+e.height(),c=l<o.top-s,d=u>o.bottom+s,f={left:o.left,top:a.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var p={top:0,left:0};(t.contains(document.body,h[0])||h[0].isConnected)&&(p=h.offset()),f.top-=p.top,f.left-=p.left,n||r||(i="below"),d||!c||n?!c&&d&&n&&(i="below"):i="above",("above"==i||n&&"below"!==i)&&(f.top=a.top-p.top-s),null!=i&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+i),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+i)),this.$dropdownContainer.css(f)},n.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},n.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),e.define("select2/dropdown/minimumResultsForSearch",[],(function(){function t(t,e,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,n,r)}return t.prototype.showSearch=function(t,e){return!(function t(e){for(var n=0,r=0;r<e.length;r++){var i=e[r];i.children?n+=t(i.children):n++}return n}(e.data.results)<this.minimumResultsForSearch)&&t.call(this,e)},t})),e.define("select2/dropdown/selectOnClose",["../utils"],(function(t){function e(){}return e.prototype.bind=function(t,e,n){var r=this;t.call(this,e,n),e.on("close",(function(t){r._handleSelectOnClose(t)}))},e.prototype._handleSelectOnClose=function(e,n){if(n&&null!=n.originalSelect2Event){var r=n.originalSelect2Event;if("select"===r._type||"unselect"===r._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=t.GetData(i[0],"data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e})),e.define("select2/dropdown/closeOnSelect",[],(function(){function t(){}return t.prototype.bind=function(t,e,n){var r=this;t.call(this,e,n),e.on("select",(function(t){r._selectTriggered(t)})),e.on("unselect",(function(t){r._selectTriggered(t)}))},t.prototype._selectTriggered=function(t,e){var n=e.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:e})},t})),e.define("select2/dropdown/dropdownCss",["../utils"],(function(t){function e(){}return e.prototype.render=function(e){var n=e.call(this),r=this.options.get("dropdownCssClass")||"";return-1!==r.indexOf(":all:")&&(r=r.replace(":all:",""),t.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(r),n},e})),e.define("select2/dropdown/tagsSearchHighlight",["../utils"],(function(t){function e(){}return e.prototype.highlightFirstItem=function(e){var n=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(n.length>0){var r=n.first(),i=t.GetData(r[0],"data").element;if(i&&i.getAttribute&&"true"===i.getAttribute("data-select2-tag"))return void r.trigger("mouseenter")}e.call(this)},e})),e.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,n="Please delete "+e+" character";return 1!=e&&(n+="s"),n},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}})),e.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./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","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],(function(t,e,n,r,i,o,a,s,l,u,c,d,f,h,p,v,g,m,y,_,b,w,k,x,$,D,A,S,C,E,O){function L(){this.reset()}return L.prototype.apply=function(c){if(null==(c=t.extend(!0,{},this.defaults,c)).dataAdapter&&(null!=c.ajax?c.dataAdapter=p:null!=c.data?c.dataAdapter=h:c.dataAdapter=f,c.minimumInputLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,m)),c.maximumInputLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,y)),c.maximumSelectionLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,_)),c.tags&&(c.dataAdapter=u.Decorate(c.dataAdapter,v)),null==c.tokenSeparators&&null==c.tokenizer||(c.dataAdapter=u.Decorate(c.dataAdapter,g))),null==c.resultsAdapter&&(c.resultsAdapter=e,null!=c.ajax&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,x)),null!=c.placeholder&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,k)),c.selectOnClose&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,A)),c.tags&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,E))),null==c.dropdownAdapter){if(c.multiple)c.dropdownAdapter=b;else{var d=u.Decorate(b,w);c.dropdownAdapter=d}0!==c.minimumResultsForSearch&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,D)),c.closeOnSelect&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,S)),null!=c.dropdownCssClass&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,C)),c.dropdownAdapter=u.Decorate(c.dropdownAdapter,$)}null==c.selectionAdapter&&(c.multiple?c.selectionAdapter=r:c.selectionAdapter=n,null!=c.placeholder&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,i)),c.allowClear&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,o)),c.multiple&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,a)),null!=c.selectionCssClass&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,s)),c.selectionAdapter=u.Decorate(c.selectionAdapter,l)),c.language=this._resolveLanguage(c.language),c.language.push("en");for(var O=[],L=0;L<c.language.length;L++){var j=c.language[L];-1===O.indexOf(j)&&O.push(j)}return c.language=O,c.translations=this._processTranslations(c.language,c.debug),c},L.prototype.reset=function(){function e(t){return t.replace(/[^\u0000-\u007E]/g,(function(t){return d[t]||t}))}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:u.escapeMarkup,language:{},matcher:function n(r,i){if(null==r.term||""===r.term.trim())return i;if(i.children&&i.children.length>0){for(var o=t.extend(!0,{},i),a=i.children.length-1;a>=0;a--)null==n(r,i.children[a])&&o.children.splice(a,1);return o.children.length>0?o:n(r,o)}var s=e(i.text).toUpperCase(),l=e(r.term).toUpperCase();return s.indexOf(l)>-1?i:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},L.prototype.applyFromElement=function(t,e){var n=t.language,r=this.defaults.language,i=e.prop("lang"),o=e.closest("[lang]").prop("lang"),a=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(o));return t.language=a,t},L.prototype._resolveLanguage=function(e){if(!e)return[];if(t.isEmptyObject(e))return[];if(t.isPlainObject(e))return[e];var n;n=Array.isArray(e)?e:[e];for(var r=[],i=0;i<n.length;i++)if(r.push(n[i]),"string"==typeof n[i]&&n[i].indexOf("-")>0){var o=n[i].split("-")[0];r.push(o)}return r},L.prototype._processTranslations=function(e,n){for(var r=new c,i=0;i<e.length;i++){var o=new c,a=e[i];if("string"==typeof a)try{o=c.loadPath(a)}catch(t){try{a=this.defaults.amdLanguageBase+a,o=c.loadPath(a)}catch(t){n&&window.console&&console.warn&&console.warn('Select2: The language file for "'+a+'" could not be automatically loaded. A fallback will be used instead.')}}else o=t.isPlainObject(a)?new c(a):a;r.extend(o)}return r},L.prototype.set=function(e,n){var r={};r[t.camelCase(e)]=n;var i=u._convertData(r);t.extend(!0,this.defaults,i)},new L})),e.define("select2/options",["jquery","./defaults","./utils"],(function(t,e,n){function r(t,n){this.options=t,null!=n&&this.fromElement(n),null!=n&&(this.options=e.applyFromElement(this.options,n)),this.options=e.apply(this.options)}return r.prototype.fromElement=function(e){var r=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),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),n.GetData(e[0],"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.'),n.StoreData(e[0],"data",n.GetData(e[0],"select2Tags")),n.StoreData(e[0],"tags",!0)),n.GetData(e[0],"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",n.GetData(e[0],"ajaxUrl")),n.StoreData(e[0],"ajax-Url",n.GetData(e[0],"ajaxUrl")));var i={};function o(t,e){return e.toUpperCase()}for(var a=0;a<e[0].attributes.length;a++){var s=e[0].attributes[a].name;if("data-"==s.substr(0,"data-".length)){var l=s.substring("data-".length),u=n.GetData(e[0],l);i[l.replace(/-([a-z])/g,o)]=u}}t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset&&(i=t.extend(!0,{},e[0].dataset,i));var c=t.extend(!0,{},n.GetData(e[0]),i);for(var d in c=n._convertData(c))r.indexOf(d)>-1||(t.isPlainObject(this.options[d])?t.extend(this.options[d],c[d]):this.options[d]=c[d]);return this},r.prototype.get=function(t){return this.options[t]},r.prototype.set=function(t,e){this.options[t]=e},r})),e.define("select2/core",["jquery","./options","./utils","./keys"],(function(t,e,n,r){var i=function(t,r){null!=n.GetData(t[0],"select2")&&n.GetData(t[0],"select2").destroy(),this.$element=t,this.id=this._generateId(t),r=r||{},this.options=new e(r,t),i.__super__.constructor.call(this);var o=t.attr("tabindex")||0;n.StoreData(t[0],"old-tabindex",o),t.attr("tabindex","-1");var a=this.options.get("dataAdapter");this.dataAdapter=new a(t,this.options);var s=this.render();this._placeContainer(s);var l=this.options.get("selectionAdapter");this.selection=new l(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var u=this.options.get("dropdownAdapter");this.dropdown=new u(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(t,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(t){d.trigger("selection:update",{data:t})})),t[0].classList.add("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(t[0],"select2",this),t.data("select2",this)};return n.Extend(i,n.Observable),i.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},i.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},i.prototype._resolveWidth=function(t,e){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var r=this._resolveWidth(t,"style");return null!=r?r:this._resolveWidth(t,"element")}if("element"==e){var i=t.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"==e){var o=t.attr("style");if("string"!=typeof o)return null;for(var a=o.split(";"),s=0,l=a.length;s<l;s+=1){var u=a[s].replace(/\s/g,"").match(n);if(null!==u&&u.length>=1)return u[1]}return null}return"computedstyle"==e?window.getComputedStyle(t[0]).width:e},i.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)},i.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=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this._observer=new window.MutationObserver((function(e){t._syncA(),t._syncS(e)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},i.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",(function(e,n){t.trigger(e,n)}))},i.prototype._registerSelectionEvents=function(){var t=this,e=["toggle","focus"];this.selection.on("toggle",(function(){t.toggleDropdown()})),this.selection.on("focus",(function(e){t.focus(e)})),this.selection.on("*",(function(n,r){-1===e.indexOf(n)&&t.trigger(n,r)}))},i.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",(function(e,n){t.trigger(e,n)}))},i.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",(function(e,n){t.trigger(e,n)}))},i.prototype._registerEvents=function(){var t=this;this.on("open",(function(){t.$container[0].classList.add("select2-container--open")})),this.on("close",(function(){t.$container[0].classList.remove("select2-container--open")})),this.on("enable",(function(){t.$container[0].classList.remove("select2-container--disabled")})),this.on("disable",(function(){t.$container[0].classList.add("select2-container--disabled")})),this.on("blur",(function(){t.$container[0].classList.remove("select2-container--focus")})),this.on("query",(function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,(function(n){t.trigger("results:all",{data:n,query:e})}))})),this.on("query:append",(function(e){this.dataAdapter.query(e,(function(n){t.trigger("results:append",{data:n,query:e})}))})),this.on("keypress",(function(e){var n=e.which;t.isOpen()?n===r.ESC||n===r.UP&&e.altKey?(t.close(e),e.preventDefault()):n===r.ENTER||n===r.TAB?(t.trigger("results:select",{}),e.preventDefault()):n===r.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):n===r.UP?(t.trigger("results:previous",{}),e.preventDefault()):n===r.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(n===r.ENTER||n===r.SPACE||n===r.DOWN&&e.altKey)&&(t.open(),e.preventDefault())}))},i.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},i.prototype._isChangeMutation=function(t){var e=this;if(t.addedNodes&&t.addedNodes.length>0){for(var n=0;n<t.addedNodes.length;n++)if(t.addedNodes[n].selected)return!0}else{if(t.removedNodes&&t.removedNodes.length>0)return!0;if(Array.isArray(t))return t.some((function(t){return e._isChangeMutation(t)}))}return!1},i.prototype._syncSubtree=function(t){var e=this._isChangeMutation(t),n=this;e&&this.dataAdapter.current((function(t){n.trigger("selection:update",{data:t})}))},i.prototype.trigger=function(t,e){var n=i.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===e&&(e={}),t in r){var o=r[t],a={prevented:!1,name:t,args:e};if(n.call(this,o,a),a.prevented)return void(e.prevented=!0)}n.call(this,t,e)},i.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},i.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},i.prototype.close=function(t){this.isOpen()&&this.trigger("close",{originalEvent:t})},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},i.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},i.prototype.focus=function(t){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},i.prototype.enable=function(t){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!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},i.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 t=[];return this.dataAdapter.current((function(e){t=e})),t},i.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 e=t[0];Array.isArray(e)&&(e=e.map((function(t){return t.toString()}))),this.$element.val(e).trigger("input").trigger("change")},i.prototype.destroy=function(){n.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),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},i.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),n.StoreData(e[0],"element",this.$element),e},i})),e.define("jquery-mousewheel",["jquery"],(function(t){return t})),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function(t,e,n,r,i){if(null==t.fn.select2){var o=["open","close","destroy"];t.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each((function(){var r=t.extend(!0,{},e);new n(t(this),r)})),this;if("string"==typeof e){var r,a=Array.prototype.slice.call(arguments,1);return this.each((function(){var t=i.GetData(this,"select2");null==t&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),r=t[e].apply(t,a)})),o.indexOf(e)>-1?this:r}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=r),n})),{define:e.define,require:e.require}}(),n=e.require("jquery.select2");return t.fn.select2.amd=e,n})?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){(function(t,r){var i;
    7 /**
    8  * @license
    9  * Lodash <https://lodash.com/>
    10  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
    11  * Released under MIT license <https://lodash.com/license>
    12  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
    13  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
    14  */(function(){var o="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",v="[object Map]",g="[object Number]",m="[object Object]",y="[object RegExp]",_="[object Set]",b="[object String]",w="[object Symbol]",k="[object WeakMap]",x="[object ArrayBuffer]",$="[object DataView]",D="[object Float32Array]",A="[object Float64Array]",S="[object Int8Array]",C="[object Int16Array]",E="[object Int32Array]",O="[object Uint8Array]",L="[object Uint16Array]",j="[object Uint32Array]",T=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,I=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,N=/[&<>"']/g,z=RegExp(R.source),q=RegExp(N.source),P=/<%-([\s\S]+?)%>/g,W=/<%([\s\S]+?)%>/g,F=/<%=([\s\S]+?)%>/g,B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,U=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(V.source),G=/^\s+/,K=/\s/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,X=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,st=/^0o[0-7]+$/i,lt=/^(?:0|[1-9]\d*)$/,ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ct=/($^)/,dt=/['\n\r\u2028\u2029\\]/g,ft="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ht="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pt="[\\ud800-\\udfff]",vt="["+ht+"]",gt="["+ft+"]",mt="\\d+",yt="[\\u2700-\\u27bf]",_t="[a-z\\xdf-\\xf6\\xf8-\\xff]",bt="[^\\ud800-\\udfff"+ht+mt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",wt="\\ud83c[\\udffb-\\udfff]",kt="[^\\ud800-\\udfff]",xt="(?:\\ud83c[\\udde6-\\uddff]){2}",$t="[\\ud800-\\udbff][\\udc00-\\udfff]",Dt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",At="(?:"+_t+"|"+bt+")",St="(?:"+Dt+"|"+bt+")",Ct="(?:"+gt+"|"+wt+")"+"?",Et="[\\ufe0e\\ufe0f]?"+Ct+("(?:\\u200d(?:"+[kt,xt,$t].join("|")+")[\\ufe0e\\ufe0f]?"+Ct+")*"),Ot="(?:"+[yt,xt,$t].join("|")+")"+Et,Lt="(?:"+[kt+gt+"?",gt,xt,$t,pt].join("|")+")",jt=RegExp("['’]","g"),Tt=RegExp(gt,"g"),Mt=RegExp(wt+"(?="+wt+")|"+Lt+Et,"g"),It=RegExp([Dt+"?"+_t+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[vt,Dt,"$"].join("|")+")",St+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[vt,Dt+At,"$"].join("|")+")",Dt+"?"+At+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Dt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mt,Ot].join("|"),"g"),Rt=RegExp("[\\u200d\\ud800-\\udfff"+ft+"\\ufe0e\\ufe0f]"),Nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],qt=-1,Pt={};Pt[D]=Pt[A]=Pt[S]=Pt[C]=Pt[E]=Pt[O]=Pt["[object Uint8ClampedArray]"]=Pt[L]=Pt[j]=!0,Pt[l]=Pt[u]=Pt[x]=Pt[c]=Pt[$]=Pt[d]=Pt[f]=Pt[h]=Pt[v]=Pt[g]=Pt[m]=Pt[y]=Pt[_]=Pt[b]=Pt[k]=!1;var Wt={};Wt[l]=Wt[u]=Wt[x]=Wt[$]=Wt[c]=Wt[d]=Wt[D]=Wt[A]=Wt[S]=Wt[C]=Wt[E]=Wt[v]=Wt[g]=Wt[m]=Wt[y]=Wt[_]=Wt[b]=Wt[w]=Wt[O]=Wt["[object Uint8ClampedArray]"]=Wt[L]=Wt[j]=!0,Wt[f]=Wt[h]=Wt[k]=!1;var Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bt=parseFloat,Ht=parseInt,Ut="object"==typeof t&&t&&t.Object===Object&&t,Vt="object"==typeof self&&self&&self.Object===Object&&self,Yt=Ut||Vt||Function("return this")(),Gt=e&&!e.nodeType&&e,Kt=Gt&&"object"==typeof r&&r&&!r.nodeType&&r,Zt=Kt&&Kt.exports===Gt,Jt=Zt&&Ut.process,Qt=function(){try{var t=Kt&&Kt.require&&Kt.require("util").types;return t||Jt&&Jt.binding&&Jt.binding("util")}catch(t){}}(),Xt=Qt&&Qt.isArrayBuffer,te=Qt&&Qt.isDate,ee=Qt&&Qt.isMap,ne=Qt&&Qt.isRegExp,re=Qt&&Qt.isSet,ie=Qt&&Qt.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ae(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function se(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function le(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ue(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function ce(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function de(t,e){return!!(null==t?0:t.length)&&we(t,e,0)>-1}function fe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function he(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function pe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ve(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function ge(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function me(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ye=De("length");function _e(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function be(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function we(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):be(t,xe,n)}function ke(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function xe(t){return t!=t}function $e(t,e){var n=null==t?0:t.length;return n?Ce(t,e)/n:NaN}function De(t){return function(e){return null==e?void 0:e[t]}}function Ae(t){return function(e){return null==t?void 0:t[e]}}function Se(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ce(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function Ee(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Oe(t){return t?t.slice(0,Ge(t)+1).replace(G,""):t}function Le(t){return function(e){return t(e)}}function je(t,e){return he(e,(function(e){return t[e]}))}function Te(t,e){return t.has(e)}function Me(t,e){for(var n=-1,r=t.length;++n<r&&we(e,t[n],0)>-1;);return n}function Ie(t,e){for(var n=t.length;n--&&we(e,t[n],0)>-1;);return n}function Re(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Ne=Ae({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ze=Ae({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function qe(t){return"\\"+Ft[t]}function Pe(t){return Rt.test(t)}function We(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Fe(t,e){return function(n){return t(e(n))}}function Be(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function He(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function Ue(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Ve(t){return Pe(t)?function(t){var e=Mt.lastIndex=0;for(;Mt.test(t);)++e;return e}(t):ye(t)}function Ye(t){return Pe(t)?function(t){return t.match(Mt)||[]}(t):function(t){return t.split("")}(t)}function Ge(t){for(var e=t.length;e--&&K.test(t.charAt(e)););return e}var Ke=Ae({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Ze=function t(e){var n,r=(e=null==e?Yt:Ze.defaults(Yt.Object(),e,Ze.pick(Yt,zt))).Array,i=e.Date,K=e.Error,ft=e.Function,ht=e.Math,pt=e.Object,vt=e.RegExp,gt=e.String,mt=e.TypeError,yt=r.prototype,_t=ft.prototype,bt=pt.prototype,wt=e["__core-js_shared__"],kt=_t.toString,xt=bt.hasOwnProperty,$t=0,Dt=(n=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",At=bt.toString,St=kt.call(pt),Ct=Yt._,Et=vt("^"+kt.call(xt).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=Zt?e.Buffer:void 0,Lt=e.Symbol,Mt=e.Uint8Array,Rt=Ot?Ot.allocUnsafe:void 0,Ft=Fe(pt.getPrototypeOf,pt),Ut=pt.create,Vt=bt.propertyIsEnumerable,Gt=yt.splice,Kt=Lt?Lt.isConcatSpreadable:void 0,Jt=Lt?Lt.iterator:void 0,Qt=Lt?Lt.toStringTag:void 0,ye=function(){try{var t=to(pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ae=e.clearTimeout!==Yt.clearTimeout&&e.clearTimeout,Je=i&&i.now!==Yt.Date.now&&i.now,Qe=e.setTimeout!==Yt.setTimeout&&e.setTimeout,Xe=ht.ceil,tn=ht.floor,en=pt.getOwnPropertySymbols,nn=Ot?Ot.isBuffer:void 0,rn=e.isFinite,on=yt.join,an=Fe(pt.keys,pt),sn=ht.max,ln=ht.min,un=i.now,cn=e.parseInt,dn=ht.random,fn=yt.reverse,hn=to(e,"DataView"),pn=to(e,"Map"),vn=to(e,"Promise"),gn=to(e,"Set"),mn=to(e,"WeakMap"),yn=to(pt,"create"),_n=mn&&new mn,bn={},wn=Co(hn),kn=Co(pn),xn=Co(vn),$n=Co(gn),Dn=Co(mn),An=Lt?Lt.prototype:void 0,Sn=An?An.valueOf:void 0,Cn=An?An.toString:void 0;function En(t){if(Ua(t)&&!Ma(t)&&!(t instanceof Tn)){if(t instanceof jn)return t;if(xt.call(t,"__wrapped__"))return Eo(t)}return new jn(t)}var On=function(){function t(){}return function(e){if(!Ha(e))return{};if(Ut)return Ut(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Ln(){}function jn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Tn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function In(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Rn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Nn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Rn;++e<n;)this.add(t[e])}function zn(t){var e=this.__data__=new In(t);this.size=e.size}function qn(t,e){var n=Ma(t),r=!n&&Ta(t),i=!n&&!r&&za(t),o=!n&&!r&&!i&&Xa(t),a=n||r||i||o,s=a?Ee(t.length,gt):[],l=s.length;for(var u in t)!e&&!xt.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||so(u,l))||s.push(u);return s}function Pn(t){var e=t.length;return e?t[Nr(0,e-1)]:void 0}function Wn(t,e){return Do(yi(t),Zn(e,0,t.length))}function Fn(t){return Do(yi(t))}function Bn(t,e,n){(void 0!==n&&!Oa(t[e],n)||void 0===n&&!(e in t))&&Gn(t,e,n)}function Hn(t,e,n){var r=t[e];xt.call(t,e)&&Oa(r,n)&&(void 0!==n||e in t)||Gn(t,e,n)}function Un(t,e){for(var n=t.length;n--;)if(Oa(t[n][0],e))return n;return-1}function Vn(t,e,n,r){return er(t,(function(t,i,o){e(r,t,n(t),o)})),r}function Yn(t,e){return t&&_i(e,ws(e),t)}function Gn(t,e,n){"__proto__"==e&&ye?ye(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Kn(t,e){for(var n=-1,i=e.length,o=r(i),a=null==t;++n<i;)o[n]=a?void 0:gs(t,e[n]);return o}function Zn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Jn(t,e,n,r,i,o){var a,s=1&e,u=2&e,f=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!Ha(t))return t;var k=Ma(t);if(k){if(a=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&xt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!s)return yi(t,a)}else{var T=ro(t),M=T==h||T==p;if(za(t))return fi(t,s);if(T==m||T==l||M&&!i){if(a=u||M?{}:oo(t),!s)return u?function(t,e){return _i(t,no(t),e)}(t,function(t,e){return t&&_i(e,ks(e),t)}(a,t)):function(t,e){return _i(t,eo(t),e)}(t,Yn(a,t))}else{if(!Wt[T])return i?t:{};a=function(t,e,n){var r=t.constructor;switch(e){case x:return hi(t);case c:case d:return new r(+t);case $:return function(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case D:case A:case S:case C:case E:case O:case"[object Uint8ClampedArray]":case L:case j:return pi(t,n);case v:return new r;case g:case b:return new r(t);case y:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case _:return new r;case w:return i=t,Sn?pt(Sn.call(i)):{}}var i}(t,T,s)}}o||(o=new zn);var I=o.get(t);if(I)return I;o.set(t,a),Za(t)?t.forEach((function(r){a.add(Jn(r,e,n,r,t,o))})):Va(t)&&t.forEach((function(r,i){a.set(i,Jn(r,e,n,i,t,o))}));var R=k?void 0:(f?u?Yi:Vi:u?ks:ws)(t);return se(R||t,(function(r,i){R&&(r=t[i=r]),Hn(a,i,Jn(r,e,n,i,t,o))})),a}function Qn(t,e,n){var r=n.length;if(null==t)return!r;for(t=pt(t);r--;){var i=n[r],o=e[i],a=t[i];if(void 0===a&&!(i in t)||!o(a))return!1}return!0}function Xn(t,e,n){if("function"!=typeof t)throw new mt(o);return wo((function(){t.apply(void 0,n)}),e)}function tr(t,e,n,r){var i=-1,o=de,a=!0,s=t.length,l=[],u=e.length;if(!s)return l;n&&(e=he(e,Le(n))),r?(o=fe,a=!1):e.length>=200&&(o=Te,a=!1,e=new Nn(e));t:for(;++i<s;){var c=t[i],d=null==n?c:n(c);if(c=r||0!==c?c:0,a&&d==d){for(var f=u;f--;)if(e[f]===d)continue t;l.push(c)}else o(e,d,r)||l.push(c)}return l}En.templateSettings={escape:P,evaluate:W,interpolate:F,variable:"",imports:{_:En}},En.prototype=Ln.prototype,En.prototype.constructor=En,jn.prototype=On(Ln.prototype),jn.prototype.constructor=jn,Tn.prototype=On(Ln.prototype),Tn.prototype.constructor=Tn,Mn.prototype.clear=function(){this.__data__=yn?yn(null):{},this.size=0},Mn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Mn.prototype.get=function(t){var e=this.__data__;if(yn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return xt.call(e,t)?e[t]:void 0},Mn.prototype.has=function(t){var e=this.__data__;return yn?void 0!==e[t]:xt.call(e,t)},Mn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=yn&&void 0===e?"__lodash_hash_undefined__":e,this},In.prototype.clear=function(){this.__data__=[],this.size=0},In.prototype.delete=function(t){var e=this.__data__,n=Un(e,t);return!(n<0)&&(n==e.length-1?e.pop():Gt.call(e,n,1),--this.size,!0)},In.prototype.get=function(t){var e=this.__data__,n=Un(e,t);return n<0?void 0:e[n][1]},In.prototype.has=function(t){return Un(this.__data__,t)>-1},In.prototype.set=function(t,e){var n=this.__data__,r=Un(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(pn||In),string:new Mn}},Rn.prototype.delete=function(t){var e=Qi(this,t).delete(t);return this.size-=e?1:0,e},Rn.prototype.get=function(t){return Qi(this,t).get(t)},Rn.prototype.has=function(t){return Qi(this,t).has(t)},Rn.prototype.set=function(t,e){var n=Qi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Nn.prototype.add=Nn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(t){return this.__data__.has(t)},zn.prototype.clear=function(){this.__data__=new In,this.size=0},zn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},zn.prototype.get=function(t){return this.__data__.get(t)},zn.prototype.has=function(t){return this.__data__.has(t)},zn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof In){var r=n.__data__;if(!pn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Rn(r)}return n.set(t,e),this.size=n.size,this};var er=ki(ur),nr=ki(cr,!0);function rr(t,e){var n=!0;return er(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function ir(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=e(o);if(null!=a&&(void 0===s?a==a&&!Qa(a):n(a,s)))var s=a,l=o}return l}function or(t,e){var n=[];return er(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function ar(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=ao),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?ar(s,e-1,n,r,i):pe(i,s):r||(i[i.length]=s)}return i}var sr=xi(),lr=xi(!0);function ur(t,e){return t&&sr(t,e,ws)}function cr(t,e){return t&&lr(t,e,ws)}function dr(t,e){return ce(e,(function(e){return Wa(t[e])}))}function fr(t,e){for(var n=0,r=(e=li(e,t)).length;null!=t&&n<r;)t=t[So(e[n++])];return n&&n==r?t:void 0}function hr(t,e,n){var r=e(t);return Ma(t)?r:pe(r,n(t))}function pr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Qt&&Qt in pt(t)?function(t){var e=xt.call(t,Qt),n=t[Qt];try{t[Qt]=void 0;var r=!0}catch(t){}var i=At.call(t);r&&(e?t[Qt]=n:delete t[Qt]);return i}(t):function(t){return At.call(t)}(t)}function vr(t,e){return t>e}function gr(t,e){return null!=t&&xt.call(t,e)}function mr(t,e){return null!=t&&e in pt(t)}function yr(t,e,n){for(var i=n?fe:de,o=t[0].length,a=t.length,s=a,l=r(a),u=1/0,c=[];s--;){var d=t[s];s&&e&&(d=he(d,Le(e))),u=ln(d.length,u),l[s]=!n&&(e||o>=120&&d.length>=120)?new Nn(s&&d):void 0}d=t[0];var f=-1,h=l[0];t:for(;++f<o&&c.length<u;){var p=d[f],v=e?e(p):p;if(p=n||0!==p?p:0,!(h?Te(h,v):i(c,v,n))){for(s=a;--s;){var g=l[s];if(!(g?Te(g,v):i(t[s],v,n)))continue t}h&&h.push(v),c.push(p)}}return c}function _r(t,e,n){var r=null==(t=mo(t,e=li(e,t)))?t:t[So(Po(e))];return null==r?void 0:oe(r,t,n)}function br(t){return Ua(t)&&pr(t)==l}function wr(t,e,n,r,i){return t===e||(null==t||null==e||!Ua(t)&&!Ua(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var a=Ma(t),s=Ma(e),h=a?u:ro(t),p=s?u:ro(e),k=(h=h==l?m:h)==m,D=(p=p==l?m:p)==m,A=h==p;if(A&&za(t)){if(!za(e))return!1;a=!0,k=!1}if(A&&!k)return o||(o=new zn),a||Xa(t)?Hi(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case $:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case x:return!(t.byteLength!=e.byteLength||!o(new Mt(t),new Mt(e)));case c:case d:case g:return Oa(+t,+e);case f:return t.name==e.name&&t.message==e.message;case y:case b:return t==e+"";case v:var s=We;case _:var l=1&r;if(s||(s=He),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var h=Hi(s(t),s(e),r,i,o,a);return a.delete(t),h;case w:if(Sn)return Sn.call(t)==Sn.call(e)}return!1}(t,e,h,n,r,i,o);if(!(1&n)){var S=k&&xt.call(t,"__wrapped__"),C=D&&xt.call(e,"__wrapped__");if(S||C){var E=S?t.value():t,O=C?e.value():e;return o||(o=new zn),i(E,O,n,r,o)}}if(!A)return!1;return o||(o=new zn),function(t,e,n,r,i,o){var a=1&n,s=Vi(t),l=s.length,u=Vi(e).length;if(l!=u&&!a)return!1;var c=l;for(;c--;){var d=s[c];if(!(a?d in e:xt.call(e,d)))return!1}var f=o.get(t),h=o.get(e);if(f&&h)return f==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);var v=a;for(;++c<l;){d=s[c];var g=t[d],m=e[d];if(r)var y=a?r(m,g,d,e,t,o):r(g,m,d,t,e,o);if(!(void 0===y?g===m||i(g,m,n,r,o):y)){p=!1;break}v||(v="constructor"==d)}if(p&&!v){var _=t.constructor,b=e.constructor;_==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o)}(t,e,n,r,wr,i))}function kr(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=pt(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var l=(s=n[i])[0],u=t[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in t))return!1}else{var d=new zn;if(r)var f=r(u,c,l,t,e,d);if(!(void 0===f?wr(c,u,3,r,d):f))return!1}}return!0}function xr(t){return!(!Ha(t)||(e=t,Dt&&Dt in e))&&(Wa(t)?Et:at).test(Co(t));var e}function $r(t){return"function"==typeof t?t:null==t?Ys:"object"==typeof t?Ma(t)?Or(t[0],t[1]):Er(t):nl(t)}function Dr(t){if(!ho(t))return an(t);var e=[];for(var n in pt(t))xt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Ar(t){if(!Ha(t))return function(t){var e=[];if(null!=t)for(var n in pt(t))e.push(n);return e}(t);var e=ho(t),n=[];for(var r in t)("constructor"!=r||!e&&xt.call(t,r))&&n.push(r);return n}function Sr(t,e){return t<e}function Cr(t,e){var n=-1,i=Ra(t)?r(t.length):[];return er(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Er(t){var e=Xi(t);return 1==e.length&&e[0][2]?vo(e[0][0],e[0][1]):function(n){return n===t||kr(n,t,e)}}function Or(t,e){return uo(t)&&po(e)?vo(So(t),e):function(n){var r=gs(n,t);return void 0===r&&r===e?ms(n,t):wr(e,r,3)}}function Lr(t,e,n,r,i){t!==e&&sr(e,(function(o,a){if(i||(i=new zn),Ha(o))!function(t,e,n,r,i,o,a){var s=_o(t,n),l=_o(e,n),u=a.get(l);if(u)return void Bn(t,n,u);var c=o?o(s,l,n+"",t,e,a):void 0,d=void 0===c;if(d){var f=Ma(l),h=!f&&za(l),p=!f&&!h&&Xa(l);c=l,f||h||p?Ma(s)?c=s:Na(s)?c=yi(s):h?(d=!1,c=fi(l,!0)):p?(d=!1,c=pi(l,!0)):c=[]:Ga(l)||Ta(l)?(c=s,Ta(s)?c=ss(s):Ha(s)&&!Wa(s)||(c=oo(l))):d=!1}d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l));Bn(t,n,c)}(t,e,a,n,Lr,r,i);else{var s=r?r(_o(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Bn(t,a,s)}}),ks)}function jr(t,e){var n=t.length;if(n)return so(e+=e<0?n:0,n)?t[e]:void 0}function Tr(t,e,n){e=e.length?he(e,(function(t){return Ma(t)?function(e){return fr(e,1===t.length?t[0]:t)}:t})):[Ys];var r=-1;return e=he(e,Le(Ji())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Cr(t,(function(t,n,i){return{criteria:he(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var l=vi(i[r],o[r]);if(l){if(r>=s)return l;var u=n[r];return l*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)}))}function Mr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=fr(t,a);n(s,a)&&Fr(o,li(a,t),s)}return o}function Ir(t,e,n,r){var i=r?ke:we,o=-1,a=e.length,s=t;for(t===e&&(e=yi(e)),n&&(s=he(t,Le(n)));++o<a;)for(var l=0,u=e[o],c=n?n(u):u;(l=i(s,c,l,r))>-1;)s!==t&&Gt.call(s,l,1),Gt.call(t,l,1);return t}function Rr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;so(i)?Gt.call(t,i,1):ti(t,i)}}return t}function Nr(t,e){return t+tn(dn()*(e-t+1))}function zr(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=tn(e/2))&&(t+=t)}while(e);return n}function qr(t,e){return ko(go(t,e,Ys),t+"")}function Pr(t){return Pn(Os(t))}function Wr(t,e){var n=Os(t);return Do(n,Zn(e,0,n.length))}function Fr(t,e,n,r){if(!Ha(t))return t;for(var i=-1,o=(e=li(e,t)).length,a=o-1,s=t;null!=s&&++i<o;){var l=So(e[i]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=a){var c=s[l];void 0===(u=r?r(c,l,s):void 0)&&(u=Ha(c)?c:so(e[i+1])?[]:{})}Hn(s,l,u),s=s[l]}return t}var Br=_n?function(t,e){return _n.set(t,e),t}:Ys,Hr=ye?function(t,e){return ye(t,"toString",{configurable:!0,enumerable:!1,value:Hs(e),writable:!0})}:Ys;function Ur(t){return Do(Os(t))}function Vr(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Yr(t,e){var n;return er(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Gr(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Qa(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Kr(t,e,Ys,n)}function Kr(t,e,n,r){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!=e,s=null===e,l=Qa(e),u=void 0===e;i<o;){var c=tn((i+o)/2),d=n(t[c]),f=void 0!==d,h=null===d,p=d==d,v=Qa(d);if(a)var g=r||p;else g=u?p&&(r||f):s?p&&f&&(r||!h):l?p&&f&&!h&&(r||!v):!h&&!v&&(r?d<=e:d<e);g?i=c+1:o=c}return ln(o,4294967294)}function Zr(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Oa(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function Jr(t){return"number"==typeof t?t:Qa(t)?NaN:+t}function Qr(t){if("string"==typeof t)return t;if(Ma(t))return he(t,Qr)+"";if(Qa(t))return Cn?Cn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Xr(t,e,n){var r=-1,i=de,o=t.length,a=!0,s=[],l=s;if(n)a=!1,i=fe;else if(o>=200){var u=e?null:zi(t);if(u)return He(u);a=!1,i=Te,l=new Nn}else l=e?[]:s;t:for(;++r<o;){var c=t[r],d=e?e(c):c;if(c=n||0!==c?c:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue t;e&&l.push(d),s.push(c)}else i(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s}function ti(t,e){return null==(t=mo(t,e=li(e,t)))||delete t[So(Po(e))]}function ei(t,e,n,r){return Fr(t,e,n(fr(t,e)),r)}function ni(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Vr(t,r?0:o,r?o+1:i):Vr(t,r?o+1:0,r?i:o)}function ri(t,e){var n=t;return n instanceof Tn&&(n=n.value()),ve(e,(function(t,e){return e.func.apply(e.thisArg,pe([t],e.args))}),n)}function ii(t,e,n){var i=t.length;if(i<2)return i?Xr(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],l=-1;++l<i;)l!=o&&(a[o]=tr(a[o]||s,t[l],e,n));return Xr(ar(a,1),e,n)}function oi(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:void 0;n(a,t[r],s)}return a}function ai(t){return Na(t)?t:[]}function si(t){return"function"==typeof t?t:Ys}function li(t,e){return Ma(t)?t:uo(t,e)?[t]:Ao(ls(t))}var ui=qr;function ci(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Vr(t,e,n)}var di=Ae||function(t){return Yt.clearTimeout(t)};function fi(t,e){if(e)return t.slice();var n=t.length,r=Rt?Rt(n):new t.constructor(n);return t.copy(r),r}function hi(t){var e=new t.constructor(t.byteLength);return new Mt(e).set(new Mt(t)),e}function pi(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function vi(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,o=Qa(t),a=void 0!==e,s=null===e,l=e==e,u=Qa(e);if(!s&&!u&&!o&&t>e||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&t<e||u&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}function gi(t,e,n,i){for(var o=-1,a=t.length,s=n.length,l=-1,u=e.length,c=sn(a-s,0),d=r(u+c),f=!i;++l<u;)d[l]=e[l];for(;++o<s;)(f||o<a)&&(d[n[o]]=t[o]);for(;c--;)d[l++]=t[o++];return d}function mi(t,e,n,i){for(var o=-1,a=t.length,s=-1,l=n.length,u=-1,c=e.length,d=sn(a-l,0),f=r(d+c),h=!i;++o<d;)f[o]=t[o];for(var p=o;++u<c;)f[p+u]=e[u];for(;++s<l;)(h||o<a)&&(f[p+n[s]]=t[o++]);return f}function yi(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function _i(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),i?Gn(n,s,l):Hn(n,s,l)}return n}function bi(t,e){return function(n,r){var i=Ma(n)?ae:Vn,o=e?e():{};return i(n,t,Ji(r,2),o)}}function wi(t){return qr((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&lo(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=pt(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e}))}function ki(t,e){return function(n,r){if(null==n)return n;if(!Ra(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=pt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function xi(t){return function(e,n,r){for(var i=-1,o=pt(e),a=r(e),s=a.length;s--;){var l=a[t?s:++i];if(!1===n(o[l],l,o))break}return e}}function $i(t){return function(e){var n=Pe(e=ls(e))?Ye(e):void 0,r=n?n[0]:e.charAt(0),i=n?ci(n,1).join(""):e.slice(1);return r[t]()+i}}function Di(t){return function(e){return ve(Ws(Ts(e).replace(jt,"")),t,"")}}function Ai(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=On(t.prototype),r=t.apply(n,e);return Ha(r)?r:n}}function Si(t){return function(e,n,r){var i=pt(e);if(!Ra(e)){var o=Ji(n,3);e=ws(e),n=function(t){return o(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:void 0}}function Ci(t){return Ui((function(e){var n=e.length,r=n,i=jn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new mt(o);if(i&&!s&&"wrapper"==Ki(a))var s=new jn([],!0)}for(r=s?r:n;++r<n;){var l=Ki(a=e[r]),u="wrapper"==l?Gi(a):void 0;s=u&&co(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?s[Ki(u[0])].apply(s,u[3]):1==a.length&&co(a)?s[l]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&Ma(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Ei(t,e,n,i,o,a,s,l,u,c){var d=128&e,f=1&e,h=2&e,p=24&e,v=512&e,g=h?void 0:Ai(t);return function m(){for(var y=arguments.length,_=r(y),b=y;b--;)_[b]=arguments[b];if(p)var w=Zi(m),k=Re(_,w);if(i&&(_=gi(_,i,o,p)),a&&(_=mi(_,a,s,p)),y-=k,p&&y<c){var x=Be(_,w);return Ri(t,e,Ei,m.placeholder,n,_,x,l,u,c-y)}var $=f?n:this,D=h?$[t]:t;return y=_.length,l?_=yo(_,l):v&&y>1&&_.reverse(),d&&u<y&&(_.length=u),this&&this!==Yt&&this instanceof m&&(D=g||Ai(D)),D.apply($,_)}}function Oi(t,e){return function(n,r){return function(t,e,n,r){return ur(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Li(t,e){return function(n,r){var i;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Qr(n),r=Qr(r)):(n=Jr(n),r=Jr(r)),i=t(n,r)}return i}}function ji(t){return Ui((function(e){return e=he(e,Le(Ji())),qr((function(n){var r=this;return t(e,(function(t){return oe(t,r,n)}))}))}))}function Ti(t,e){var n=(e=void 0===e?" ":Qr(e)).length;if(n<2)return n?zr(e,t):e;var r=zr(e,Xe(t/Ve(e)));return Pe(e)?ci(Ye(r),0,t).join(""):r.slice(0,t)}function Mi(t){return function(e,n,i){return i&&"number"!=typeof i&&lo(e,n,i)&&(n=i=void 0),e=rs(e),void 0===n?(n=e,e=0):n=rs(n),function(t,e,n,i){for(var o=-1,a=sn(Xe((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=void 0===i?e<n?1:-1:rs(i),t)}}function Ii(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=as(e),n=as(n)),t(e,n)}}function Ri(t,e,n,r,i,o,a,s,l,u){var c=8&e;e|=c?32:64,4&(e&=~(c?64:32))||(e&=-4);var d=[t,e,i,c?o:void 0,c?a:void 0,c?void 0:o,c?void 0:a,s,l,u],f=n.apply(void 0,d);return co(t)&&bo(f,d),f.placeholder=r,xo(f,t,e)}function Ni(t){var e=ht[t];return function(t,n){if(t=as(t),(n=null==n?0:ln(is(n),292))&&rn(t)){var r=(ls(t)+"e").split("e");return+((r=(ls(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var zi=gn&&1/He(new gn([,-0]))[1]==1/0?function(t){return new gn(t)}:Qs;function qi(t){return function(e){var n=ro(e);return n==v?We(e):n==_?Ue(e):function(t,e){return he(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Pi(t,e,n,i,s,l,u,c){var d=2&e;if(!d&&"function"!=typeof t)throw new mt(o);var f=i?i.length:0;if(f||(e&=-97,i=s=void 0),u=void 0===u?u:sn(is(u),0),c=void 0===c?c:is(c),f-=s?s.length:0,64&e){var h=i,p=s;i=s=void 0}var v=d?void 0:Gi(t),g=[t,e,n,i,s,h,p,l,u,c];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var l=e[3];if(l){var u=t[3];t[3]=u?gi(u,l,e[4]):l,t[4]=u?Be(t[3],a):e[4]}(l=e[5])&&(u=t[5],t[5]=u?mi(u,l,e[6]):l,t[6]=u?Be(t[5],a):e[6]);(l=e[7])&&(t[7]=l);128&r&&(t[8]=null==t[8]?e[8]:ln(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(g,v),t=g[0],e=g[1],n=g[2],i=g[3],s=g[4],!(c=g[9]=void 0===g[9]?d?0:t.length:sn(g[9]-f,0))&&24&e&&(e&=-25),e&&1!=e)m=8==e||16==e?function(t,e,n){var i=Ai(t);return function o(){for(var a=arguments.length,s=r(a),l=a,u=Zi(o);l--;)s[l]=arguments[l];var c=a<3&&s[0]!==u&&s[a-1]!==u?[]:Be(s,u);if((a-=c.length)<n)return Ri(t,e,Ei,o.placeholder,void 0,s,c,void 0,void 0,n-a);var d=this&&this!==Yt&&this instanceof o?i:t;return oe(d,this,s)}}(t,e,c):32!=e&&33!=e||s.length?Ei.apply(void 0,g):function(t,e,n,i){var o=1&e,a=Ai(t);return function e(){for(var s=-1,l=arguments.length,u=-1,c=i.length,d=r(c+l),f=this&&this!==Yt&&this instanceof e?a:t;++u<c;)d[u]=i[u];for(;l--;)d[u++]=arguments[++s];return oe(f,o?n:this,d)}}(t,e,n,i);else var m=function(t,e,n){var r=1&e,i=Ai(t);return function e(){var o=this&&this!==Yt&&this instanceof e?i:t;return o.apply(r?n:this,arguments)}}(t,e,n);return xo((v?Br:bo)(m,g),t,e)}function Wi(t,e,n,r){return void 0===t||Oa(t,bt[n])&&!xt.call(r,n)?e:t}function Fi(t,e,n,r,i,o){return Ha(t)&&Ha(e)&&(o.set(e,t),Lr(t,e,void 0,Fi,o),o.delete(e)),t}function Bi(t){return Ga(t)?void 0:t}function Hi(t,e,n,r,i,o){var a=1&n,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var d=-1,f=!0,h=2&n?new Nn:void 0;for(o.set(t,e),o.set(e,t);++d<s;){var p=t[d],v=e[d];if(r)var g=a?r(v,p,d,e,t,o):r(p,v,d,t,e,o);if(void 0!==g){if(g)continue;f=!1;break}if(h){if(!me(e,(function(t,e){if(!Te(h,e)&&(p===t||i(p,t,n,r,o)))return h.push(e)}))){f=!1;break}}else if(p!==v&&!i(p,v,n,r,o)){f=!1;break}}return o.delete(t),o.delete(e),f}function Ui(t){return ko(go(t,void 0,Io),t+"")}function Vi(t){return hr(t,ws,eo)}function Yi(t){return hr(t,ks,no)}var Gi=_n?function(t){return _n.get(t)}:Qs;function Ki(t){for(var e=t.name+"",n=bn[e],r=xt.call(bn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Zi(t){return(xt.call(En,"placeholder")?En:t).placeholder}function Ji(){var t=En.iteratee||Gs;return t=t===Gs?$r:t,arguments.length?t(arguments[0],arguments[1]):t}function Qi(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Xi(t){for(var e=ws(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,po(i)]}return e}function to(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return xr(n)?n:void 0}var eo=en?function(t){return null==t?[]:(t=pt(t),ce(en(t),(function(e){return Vt.call(t,e)})))}:ol,no=en?function(t){for(var e=[];t;)pe(e,eo(t)),t=Ft(t);return e}:ol,ro=pr;function io(t,e,n){for(var r=-1,i=(e=li(e,t)).length,o=!1;++r<i;){var a=So(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ba(i)&&so(a,i)&&(Ma(t)||Ta(t))}function oo(t){return"function"!=typeof t.constructor||ho(t)?{}:On(Ft(t))}function ao(t){return Ma(t)||Ta(t)||!!(Kt&&t&&t[Kt])}function so(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&lt.test(t))&&t>-1&&t%1==0&&t<e}function lo(t,e,n){if(!Ha(n))return!1;var r=typeof e;return!!("number"==r?Ra(n)&&so(e,n.length):"string"==r&&e in n)&&Oa(n[e],t)}function uo(t,e){if(Ma(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Qa(t))||(H.test(t)||!B.test(t)||null!=e&&t in pt(e))}function co(t){var e=Ki(t),n=En[e];if("function"!=typeof n||!(e in Tn.prototype))return!1;if(t===n)return!0;var r=Gi(n);return!!r&&t===r[0]}(hn&&ro(new hn(new ArrayBuffer(1)))!=$||pn&&ro(new pn)!=v||vn&&"[object Promise]"!=ro(vn.resolve())||gn&&ro(new gn)!=_||mn&&ro(new mn)!=k)&&(ro=function(t){var e=pr(t),n=e==m?t.constructor:void 0,r=n?Co(n):"";if(r)switch(r){case wn:return $;case kn:return v;case xn:return"[object Promise]";case $n:return _;case Dn:return k}return e});var fo=wt?Wa:al;function ho(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||bt)}function po(t){return t==t&&!Ha(t)}function vo(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in pt(n)))}}function go(t,e,n){return e=sn(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=sn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var l=r(e+1);++o<e;)l[o]=i[o];return l[e]=n(s),oe(t,this,l)}}function mo(t,e){return e.length<2?t:fr(t,Vr(e,0,-1))}function yo(t,e){for(var n=t.length,r=ln(e.length,n),i=yi(t);r--;){var o=e[r];t[r]=so(o,n)?i[o]:void 0}return t}function _o(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var bo=$o(Br),wo=Qe||function(t,e){return Yt.setTimeout(t,e)},ko=$o(Hr);function xo(t,e,n){var r=e+"";return ko(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Z,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return se(s,(function(n){var r="_."+n[0];e&n[1]&&!de(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(J);return e?e[1].split(Q):[]}(r),n)))}function $o(t){var e=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Do(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n<e;){var o=Nr(n,i),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var Ao=function(t){var e=$a(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(U,(function(t,n,r,i){e.push(r?i.replace(et,"$1"):n||t)})),e}));function So(t){if("string"==typeof t||Qa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Co(t){if(null!=t){try{return kt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Eo(t){if(t instanceof Tn)return t.clone();var e=new jn(t.__wrapped__,t.__chain__);return e.__actions__=yi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Oo=qr((function(t,e){return Na(t)?tr(t,ar(e,1,Na,!0)):[]})),Lo=qr((function(t,e){var n=Po(e);return Na(n)&&(n=void 0),Na(t)?tr(t,ar(e,1,Na,!0),Ji(n,2)):[]})),jo=qr((function(t,e){var n=Po(e);return Na(n)&&(n=void 0),Na(t)?tr(t,ar(e,1,Na,!0),void 0,n):[]}));function To(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:is(n);return i<0&&(i=sn(r+i,0)),be(t,Ji(e,3),i)}function Mo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=is(n),i=n<0?sn(r+i,0):ln(i,r-1)),be(t,Ji(e,3),i,!0)}function Io(t){return(null==t?0:t.length)?ar(t,1):[]}function Ro(t){return t&&t.length?t[0]:void 0}var No=qr((function(t){var e=he(t,ai);return e.length&&e[0]===t[0]?yr(e):[]})),zo=qr((function(t){var e=Po(t),n=he(t,ai);return e===Po(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?yr(n,Ji(e,2)):[]})),qo=qr((function(t){var e=Po(t),n=he(t,ai);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?yr(n,void 0,e):[]}));function Po(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Wo=qr(Fo);function Fo(t,e){return t&&t.length&&e&&e.length?Ir(t,e):t}var Bo=Ui((function(t,e){var n=null==t?0:t.length,r=Kn(t,e);return Rr(t,he(e,(function(t){return so(t,n)?+t:t})).sort(vi)),r}));function Ho(t){return null==t?t:fn.call(t)}var Uo=qr((function(t){return Xr(ar(t,1,Na,!0))})),Vo=qr((function(t){var e=Po(t);return Na(e)&&(e=void 0),Xr(ar(t,1,Na,!0),Ji(e,2))})),Yo=qr((function(t){var e=Po(t);return e="function"==typeof e?e:void 0,Xr(ar(t,1,Na,!0),void 0,e)}));function Go(t){if(!t||!t.length)return[];var e=0;return t=ce(t,(function(t){if(Na(t))return e=sn(t.length,e),!0})),Ee(e,(function(e){return he(t,De(e))}))}function Ko(t,e){if(!t||!t.length)return[];var n=Go(t);return null==e?n:he(n,(function(t){return oe(e,void 0,t)}))}var Zo=qr((function(t,e){return Na(t)?tr(t,e):[]})),Jo=qr((function(t){return ii(ce(t,Na))})),Qo=qr((function(t){var e=Po(t);return Na(e)&&(e=void 0),ii(ce(t,Na),Ji(e,2))})),Xo=qr((function(t){var e=Po(t);return e="function"==typeof e?e:void 0,ii(ce(t,Na),void 0,e)})),ta=qr(Go);var ea=qr((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Ko(t,n)}));function na(t){var e=En(t);return e.__chain__=!0,e}function ra(t,e){return e(t)}var ia=Ui((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Kn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Tn&&so(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ra,args:[i],thisArg:void 0}),new jn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var oa=bi((function(t,e,n){xt.call(t,n)?++t[n]:Gn(t,n,1)}));var aa=Si(To),sa=Si(Mo);function la(t,e){return(Ma(t)?se:er)(t,Ji(e,3))}function ua(t,e){return(Ma(t)?le:nr)(t,Ji(e,3))}var ca=bi((function(t,e,n){xt.call(t,n)?t[n].push(e):Gn(t,n,[e])}));var da=qr((function(t,e,n){var i=-1,o="function"==typeof e,a=Ra(t)?r(t.length):[];return er(t,(function(t){a[++i]=o?oe(e,t,n):_r(t,e,n)})),a})),fa=bi((function(t,e,n){Gn(t,n,e)}));function ha(t,e){return(Ma(t)?he:Cr)(t,Ji(e,3))}var pa=bi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var va=qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&lo(t,e[0],e[1])?e=[]:n>2&&lo(e[0],e[1],e[2])&&(e=[e[0]]),Tr(t,ar(e,1),[])})),ga=Je||function(){return Yt.Date.now()};function ma(t,e,n){return e=n?void 0:e,Pi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function ya(t,e){var n;if("function"!=typeof e)throw new mt(o);return t=is(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var _a=qr((function(t,e,n){var r=1;if(n.length){var i=Be(n,Zi(_a));r|=32}return Pi(t,r,e,n,i)})),ba=qr((function(t,e,n){var r=3;if(n.length){var i=Be(n,Zi(ba));r|=32}return Pi(e,r,t,n,i)}));function wa(t,e,n){var r,i,a,s,l,u,c=0,d=!1,f=!1,h=!0;if("function"!=typeof t)throw new mt(o);function p(e){var n=r,o=i;return r=i=void 0,c=e,s=t.apply(o,n)}function v(t){return c=t,l=wo(m,e),d?p(t):s}function g(t){var n=t-u;return void 0===u||n>=e||n<0||f&&t-c>=a}function m(){var t=ga();if(g(t))return y(t);l=wo(m,function(t){var n=e-(t-u);return f?ln(n,a-(t-c)):n}(t))}function y(t){return l=void 0,h&&r?p(t):(r=i=void 0,s)}function _(){var t=ga(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===l)return v(u);if(f)return di(l),l=wo(m,e),p(u)}return void 0===l&&(l=wo(m,e)),s}return e=as(e)||0,Ha(n)&&(d=!!n.leading,a=(f="maxWait"in n)?sn(as(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),_.cancel=function(){void 0!==l&&di(l),c=0,r=u=i=l=void 0},_.flush=function(){return void 0===l?s:y(ga())},_}var ka=qr((function(t,e){return Xn(t,1,e)})),xa=qr((function(t,e,n){return Xn(t,as(e)||0,n)}));function $a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new mt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new($a.Cache||Rn),n}function Da(t){if("function"!=typeof t)throw new mt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}$a.Cache=Rn;var Aa=ui((function(t,e){var n=(e=1==e.length&&Ma(e[0])?he(e[0],Le(Ji())):he(ar(e,1),Le(Ji()))).length;return qr((function(r){for(var i=-1,o=ln(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return oe(t,this,r)}))})),Sa=qr((function(t,e){return Pi(t,32,void 0,e,Be(e,Zi(Sa)))})),Ca=qr((function(t,e){return Pi(t,64,void 0,e,Be(e,Zi(Ca)))})),Ea=Ui((function(t,e){return Pi(t,256,void 0,void 0,void 0,e)}));function Oa(t,e){return t===e||t!=t&&e!=e}var La=Ii(vr),ja=Ii((function(t,e){return t>=e})),Ta=br(function(){return arguments}())?br:function(t){return Ua(t)&&xt.call(t,"callee")&&!Vt.call(t,"callee")},Ma=r.isArray,Ia=Xt?Le(Xt):function(t){return Ua(t)&&pr(t)==x};function Ra(t){return null!=t&&Ba(t.length)&&!Wa(t)}function Na(t){return Ua(t)&&Ra(t)}var za=nn||al,qa=te?Le(te):function(t){return Ua(t)&&pr(t)==d};function Pa(t){if(!Ua(t))return!1;var e=pr(t);return e==f||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Ga(t)}function Wa(t){if(!Ha(t))return!1;var e=pr(t);return e==h||e==p||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Fa(t){return"number"==typeof t&&t==is(t)}function Ba(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ha(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ua(t){return null!=t&&"object"==typeof t}var Va=ee?Le(ee):function(t){return Ua(t)&&ro(t)==v};function Ya(t){return"number"==typeof t||Ua(t)&&pr(t)==g}function Ga(t){if(!Ua(t)||pr(t)!=m)return!1;var e=Ft(t);if(null===e)return!0;var n=xt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&kt.call(n)==St}var Ka=ne?Le(ne):function(t){return Ua(t)&&pr(t)==y};var Za=re?Le(re):function(t){return Ua(t)&&ro(t)==_};function Ja(t){return"string"==typeof t||!Ma(t)&&Ua(t)&&pr(t)==b}function Qa(t){return"symbol"==typeof t||Ua(t)&&pr(t)==w}var Xa=ie?Le(ie):function(t){return Ua(t)&&Ba(t.length)&&!!Pt[pr(t)]};var ts=Ii(Sr),es=Ii((function(t,e){return t<=e}));function ns(t){if(!t)return[];if(Ra(t))return Ja(t)?Ye(t):yi(t);if(Jt&&t[Jt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Jt]());var e=ro(t);return(e==v?We:e==_?He:Os)(t)}function rs(t){return t?(t=as(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function is(t){var e=rs(t),n=e%1;return e==e?n?e-n:e:0}function os(t){return t?Zn(is(t),0,4294967295):0}function as(t){if("number"==typeof t)return t;if(Qa(t))return NaN;if(Ha(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ha(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Oe(t);var n=ot.test(t);return n||st.test(t)?Ht(t.slice(2),n?2:8):it.test(t)?NaN:+t}function ss(t){return _i(t,ks(t))}function ls(t){return null==t?"":Qr(t)}var us=wi((function(t,e){if(ho(e)||Ra(e))_i(e,ws(e),t);else for(var n in e)xt.call(e,n)&&Hn(t,n,e[n])})),cs=wi((function(t,e){_i(e,ks(e),t)})),ds=wi((function(t,e,n,r){_i(e,ks(e),t,r)})),fs=wi((function(t,e,n,r){_i(e,ws(e),t,r)})),hs=Ui(Kn);var ps=qr((function(t,e){t=pt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&lo(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],a=ks(o),s=-1,l=a.length;++s<l;){var u=a[s],c=t[u];(void 0===c||Oa(c,bt[u])&&!xt.call(t,u))&&(t[u]=o[u])}return t})),vs=qr((function(t){return t.push(void 0,Fi),oe($s,void 0,t)}));function gs(t,e,n){var r=null==t?void 0:fr(t,e);return void 0===r?n:r}function ms(t,e){return null!=t&&io(t,e,mr)}var ys=Oi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=At.call(e)),t[e]=n}),Hs(Ys)),_s=Oi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=At.call(e)),xt.call(t,e)?t[e].push(n):t[e]=[n]}),Ji),bs=qr(_r);function ws(t){return Ra(t)?qn(t):Dr(t)}function ks(t){return Ra(t)?qn(t,!0):Ar(t)}var xs=wi((function(t,e,n){Lr(t,e,n)})),$s=wi((function(t,e,n,r){Lr(t,e,n,r)})),Ds=Ui((function(t,e){var n={};if(null==t)return n;var r=!1;e=he(e,(function(e){return e=li(e,t),r||(r=e.length>1),e})),_i(t,Yi(t),n),r&&(n=Jn(n,7,Bi));for(var i=e.length;i--;)ti(n,e[i]);return n}));var As=Ui((function(t,e){return null==t?{}:function(t,e){return Mr(t,e,(function(e,n){return ms(t,n)}))}(t,e)}));function Ss(t,e){if(null==t)return{};var n=he(Yi(t),(function(t){return[t]}));return e=Ji(e),Mr(t,n,(function(t,n){return e(t,n[0])}))}var Cs=qi(ws),Es=qi(ks);function Os(t){return null==t?[]:je(t,ws(t))}var Ls=Di((function(t,e,n){return e=e.toLowerCase(),t+(n?js(e):e)}));function js(t){return Ps(ls(t).toLowerCase())}function Ts(t){return(t=ls(t))&&t.replace(ut,Ne).replace(Tt,"")}var Ms=Di((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Is=Di((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Rs=$i("toLowerCase");var Ns=Di((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var zs=Di((function(t,e,n){return t+(n?" ":"")+Ps(e)}));var qs=Di((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ps=$i("toUpperCase");function Ws(t,e,n){return t=ls(t),void 0===(e=n?void 0:e)?function(t){return Nt.test(t)}(t)?function(t){return t.match(It)||[]}(t):function(t){return t.match(X)||[]}(t):t.match(e)||[]}var Fs=qr((function(t,e){try{return oe(t,void 0,e)}catch(t){return Pa(t)?t:new K(t)}})),Bs=Ui((function(t,e){return se(e,(function(e){e=So(e),Gn(t,e,_a(t[e],t))})),t}));function Hs(t){return function(){return t}}var Us=Ci(),Vs=Ci(!0);function Ys(t){return t}function Gs(t){return $r("function"==typeof t?t:Jn(t,1))}var Ks=qr((function(t,e){return function(n){return _r(n,t,e)}})),Zs=qr((function(t,e){return function(n){return _r(t,n,e)}}));function Js(t,e,n){var r=ws(e),i=dr(e,r);null!=n||Ha(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=dr(e,ws(e)));var o=!(Ha(n)&&"chain"in n&&!n.chain),a=Wa(t);return se(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=yi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,pe([this.value()],arguments))})})),t}function Qs(){}var Xs=ji(he),tl=ji(ue),el=ji(me);function nl(t){return uo(t)?De(So(t)):function(t){return function(e){return fr(e,t)}}(t)}var rl=Mi(),il=Mi(!0);function ol(){return[]}function al(){return!1}var sl=Li((function(t,e){return t+e}),0),ll=Ni("ceil"),ul=Li((function(t,e){return t/e}),1),cl=Ni("floor");var dl,fl=Li((function(t,e){return t*e}),1),hl=Ni("round"),pl=Li((function(t,e){return t-e}),0);return En.after=function(t,e){if("function"!=typeof e)throw new mt(o);return t=is(t),function(){if(--t<1)return e.apply(this,arguments)}},En.ary=ma,En.assign=us,En.assignIn=cs,En.assignInWith=ds,En.assignWith=fs,En.at=hs,En.before=ya,En.bind=_a,En.bindAll=Bs,En.bindKey=ba,En.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ma(t)?t:[t]},En.chain=na,En.chunk=function(t,e,n){e=(n?lo(t,e,n):void 0===e)?1:sn(is(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=r(Xe(i/e));o<i;)s[a++]=Vr(t,o,o+=e);return s},En.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},En.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return pe(Ma(n)?yi(n):[n],ar(e,1))},En.cond=function(t){var e=null==t?0:t.length,n=Ji();return t=e?he(t,(function(t){if("function"!=typeof t[1])throw new mt(o);return[n(t[0]),t[1]]})):[],qr((function(n){for(var r=-1;++r<e;){var i=t[r];if(oe(i[0],this,n))return oe(i[1],this,n)}}))},En.conforms=function(t){return function(t){var e=ws(t);return function(n){return Qn(n,t,e)}}(Jn(t,1))},En.constant=Hs,En.countBy=oa,En.create=function(t,e){var n=On(t);return null==e?n:Yn(n,e)},En.curry=function t(e,n,r){var i=Pi(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},En.curryRight=function t(e,n,r){var i=Pi(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},En.debounce=wa,En.defaults=ps,En.defaultsDeep=vs,En.defer=ka,En.delay=xa,En.difference=Oo,En.differenceBy=Lo,En.differenceWith=jo,En.drop=function(t,e,n){var r=null==t?0:t.length;return r?Vr(t,(e=n||void 0===e?1:is(e))<0?0:e,r):[]},En.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Vr(t,0,(e=r-(e=n||void 0===e?1:is(e)))<0?0:e):[]},En.dropRightWhile=function(t,e){return t&&t.length?ni(t,Ji(e,3),!0,!0):[]},En.dropWhile=function(t,e){return t&&t.length?ni(t,Ji(e,3),!0):[]},En.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&lo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=is(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:is(r))<0&&(r+=i),r=n>r?0:os(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},En.filter=function(t,e){return(Ma(t)?ce:or)(t,Ji(e,3))},En.flatMap=function(t,e){return ar(ha(t,e),1)},En.flatMapDeep=function(t,e){return ar(ha(t,e),1/0)},En.flatMapDepth=function(t,e,n){return n=void 0===n?1:is(n),ar(ha(t,e),n)},En.flatten=Io,En.flattenDeep=function(t){return(null==t?0:t.length)?ar(t,1/0):[]},En.flattenDepth=function(t,e){return(null==t?0:t.length)?ar(t,e=void 0===e?1:is(e)):[]},En.flip=function(t){return Pi(t,512)},En.flow=Us,En.flowRight=Vs,En.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},En.functions=function(t){return null==t?[]:dr(t,ws(t))},En.functionsIn=function(t){return null==t?[]:dr(t,ks(t))},En.groupBy=ca,En.initial=function(t){return(null==t?0:t.length)?Vr(t,0,-1):[]},En.intersection=No,En.intersectionBy=zo,En.intersectionWith=qo,En.invert=ys,En.invertBy=_s,En.invokeMap=da,En.iteratee=Gs,En.keyBy=fa,En.keys=ws,En.keysIn=ks,En.map=ha,En.mapKeys=function(t,e){var n={};return e=Ji(e,3),ur(t,(function(t,r,i){Gn(n,e(t,r,i),t)})),n},En.mapValues=function(t,e){var n={};return e=Ji(e,3),ur(t,(function(t,r,i){Gn(n,r,e(t,r,i))})),n},En.matches=function(t){return Er(Jn(t,1))},En.matchesProperty=function(t,e){return Or(t,Jn(e,1))},En.memoize=$a,En.merge=xs,En.mergeWith=$s,En.method=Ks,En.methodOf=Zs,En.mixin=Js,En.negate=Da,En.nthArg=function(t){return t=is(t),qr((function(e){return jr(e,t)}))},En.omit=Ds,En.omitBy=function(t,e){return Ss(t,Da(Ji(e)))},En.once=function(t){return ya(2,t)},En.orderBy=function(t,e,n,r){return null==t?[]:(Ma(e)||(e=null==e?[]:[e]),Ma(n=r?void 0:n)||(n=null==n?[]:[n]),Tr(t,e,n))},En.over=Xs,En.overArgs=Aa,En.overEvery=tl,En.overSome=el,En.partial=Sa,En.partialRight=Ca,En.partition=pa,En.pick=As,En.pickBy=Ss,En.property=nl,En.propertyOf=function(t){return function(e){return null==t?void 0:fr(t,e)}},En.pull=Wo,En.pullAll=Fo,En.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Ir(t,e,Ji(n,2)):t},En.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Ir(t,e,void 0,n):t},En.pullAt=Bo,En.range=rl,En.rangeRight=il,En.rearg=Ea,En.reject=function(t,e){return(Ma(t)?ce:or)(t,Da(Ji(e,3)))},En.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Ji(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Rr(t,i),n},En.rest=function(t,e){if("function"!=typeof t)throw new mt(o);return qr(t,e=void 0===e?e:is(e))},En.reverse=Ho,En.sampleSize=function(t,e,n){return e=(n?lo(t,e,n):void 0===e)?1:is(e),(Ma(t)?Wn:Wr)(t,e)},En.set=function(t,e,n){return null==t?t:Fr(t,e,n)},En.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Fr(t,e,n,r)},En.shuffle=function(t){return(Ma(t)?Fn:Ur)(t)},En.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&lo(t,e,n)?(e=0,n=r):(e=null==e?0:is(e),n=void 0===n?r:is(n)),Vr(t,e,n)):[]},En.sortBy=va,En.sortedUniq=function(t){return t&&t.length?Zr(t):[]},En.sortedUniqBy=function(t,e){return t&&t.length?Zr(t,Ji(e,2)):[]},En.split=function(t,e,n){return n&&"number"!=typeof n&&lo(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=ls(t))&&("string"==typeof e||null!=e&&!Ka(e))&&!(e=Qr(e))&&Pe(t)?ci(Ye(t),0,n):t.split(e,n):[]},En.spread=function(t,e){if("function"!=typeof t)throw new mt(o);return e=null==e?0:sn(is(e),0),qr((function(n){var r=n[e],i=ci(n,0,e);return r&&pe(i,r),oe(t,this,i)}))},En.tail=function(t){var e=null==t?0:t.length;return e?Vr(t,1,e):[]},En.take=function(t,e,n){return t&&t.length?Vr(t,0,(e=n||void 0===e?1:is(e))<0?0:e):[]},En.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Vr(t,(e=r-(e=n||void 0===e?1:is(e)))<0?0:e,r):[]},En.takeRightWhile=function(t,e){return t&&t.length?ni(t,Ji(e,3),!1,!0):[]},En.takeWhile=function(t,e){return t&&t.length?ni(t,Ji(e,3)):[]},En.tap=function(t,e){return e(t),t},En.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new mt(o);return Ha(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),wa(t,e,{leading:r,maxWait:e,trailing:i})},En.thru=ra,En.toArray=ns,En.toPairs=Cs,En.toPairsIn=Es,En.toPath=function(t){return Ma(t)?he(t,So):Qa(t)?[t]:yi(Ao(ls(t)))},En.toPlainObject=ss,En.transform=function(t,e,n){var r=Ma(t),i=r||za(t)||Xa(t);if(e=Ji(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Ha(t)&&Wa(o)?On(Ft(t)):{}}return(i?se:ur)(t,(function(t,r,i){return e(n,t,r,i)})),n},En.unary=function(t){return ma(t,1)},En.union=Uo,En.unionBy=Vo,En.unionWith=Yo,En.uniq=function(t){return t&&t.length?Xr(t):[]},En.uniqBy=function(t,e){return t&&t.length?Xr(t,Ji(e,2)):[]},En.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Xr(t,void 0,e):[]},En.unset=function(t,e){return null==t||ti(t,e)},En.unzip=Go,En.unzipWith=Ko,En.update=function(t,e,n){return null==t?t:ei(t,e,si(n))},En.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ei(t,e,si(n),r)},En.values=Os,En.valuesIn=function(t){return null==t?[]:je(t,ks(t))},En.without=Zo,En.words=Ws,En.wrap=function(t,e){return Sa(si(e),t)},En.xor=Jo,En.xorBy=Qo,En.xorWith=Xo,En.zip=ta,En.zipObject=function(t,e){return oi(t||[],e||[],Hn)},En.zipObjectDeep=function(t,e){return oi(t||[],e||[],Fr)},En.zipWith=ea,En.entries=Cs,En.entriesIn=Es,En.extend=cs,En.extendWith=ds,Js(En,En),En.add=sl,En.attempt=Fs,En.camelCase=Ls,En.capitalize=js,En.ceil=ll,En.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=as(n))==n?n:0),void 0!==e&&(e=(e=as(e))==e?e:0),Zn(as(t),e,n)},En.clone=function(t){return Jn(t,4)},En.cloneDeep=function(t){return Jn(t,5)},En.cloneDeepWith=function(t,e){return Jn(t,5,e="function"==typeof e?e:void 0)},En.cloneWith=function(t,e){return Jn(t,4,e="function"==typeof e?e:void 0)},En.conformsTo=function(t,e){return null==e||Qn(t,e,ws(e))},En.deburr=Ts,En.defaultTo=function(t,e){return null==t||t!=t?e:t},En.divide=ul,En.endsWith=function(t,e,n){t=ls(t),e=Qr(e);var r=t.length,i=n=void 0===n?r:Zn(is(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},En.eq=Oa,En.escape=function(t){return(t=ls(t))&&q.test(t)?t.replace(N,ze):t},En.escapeRegExp=function(t){return(t=ls(t))&&Y.test(t)?t.replace(V,"\\$&"):t},En.every=function(t,e,n){var r=Ma(t)?ue:rr;return n&&lo(t,e,n)&&(e=void 0),r(t,Ji(e,3))},En.find=aa,En.findIndex=To,En.findKey=function(t,e){return _e(t,Ji(e,3),ur)},En.findLast=sa,En.findLastIndex=Mo,En.findLastKey=function(t,e){return _e(t,Ji(e,3),cr)},En.floor=cl,En.forEach=la,En.forEachRight=ua,En.forIn=function(t,e){return null==t?t:sr(t,Ji(e,3),ks)},En.forInRight=function(t,e){return null==t?t:lr(t,Ji(e,3),ks)},En.forOwn=function(t,e){return t&&ur(t,Ji(e,3))},En.forOwnRight=function(t,e){return t&&cr(t,Ji(e,3))},En.get=gs,En.gt=La,En.gte=ja,En.has=function(t,e){return null!=t&&io(t,e,gr)},En.hasIn=ms,En.head=Ro,En.identity=Ys,En.includes=function(t,e,n,r){t=Ra(t)?t:Os(t),n=n&&!r?is(n):0;var i=t.length;return n<0&&(n=sn(i+n,0)),Ja(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&we(t,e,n)>-1},En.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:is(n);return i<0&&(i=sn(r+i,0)),we(t,e,i)},En.inRange=function(t,e,n){return e=rs(e),void 0===n?(n=e,e=0):n=rs(n),function(t,e,n){return t>=ln(e,n)&&t<sn(e,n)}(t=as(t),e,n)},En.invoke=bs,En.isArguments=Ta,En.isArray=Ma,En.isArrayBuffer=Ia,En.isArrayLike=Ra,En.isArrayLikeObject=Na,En.isBoolean=function(t){return!0===t||!1===t||Ua(t)&&pr(t)==c},En.isBuffer=za,En.isDate=qa,En.isElement=function(t){return Ua(t)&&1===t.nodeType&&!Ga(t)},En.isEmpty=function(t){if(null==t)return!0;if(Ra(t)&&(Ma(t)||"string"==typeof t||"function"==typeof t.splice||za(t)||Xa(t)||Ta(t)))return!t.length;var e=ro(t);if(e==v||e==_)return!t.size;if(ho(t))return!Dr(t).length;for(var n in t)if(xt.call(t,n))return!1;return!0},En.isEqual=function(t,e){return wr(t,e)},En.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?wr(t,e,void 0,n):!!r},En.isError=Pa,En.isFinite=function(t){return"number"==typeof t&&rn(t)},En.isFunction=Wa,En.isInteger=Fa,En.isLength=Ba,En.isMap=Va,En.isMatch=function(t,e){return t===e||kr(t,e,Xi(e))},En.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,kr(t,e,Xi(e),n)},En.isNaN=function(t){return Ya(t)&&t!=+t},En.isNative=function(t){if(fo(t))throw new K("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xr(t)},En.isNil=function(t){return null==t},En.isNull=function(t){return null===t},En.isNumber=Ya,En.isObject=Ha,En.isObjectLike=Ua,En.isPlainObject=Ga,En.isRegExp=Ka,En.isSafeInteger=function(t){return Fa(t)&&t>=-9007199254740991&&t<=9007199254740991},En.isSet=Za,En.isString=Ja,En.isSymbol=Qa,En.isTypedArray=Xa,En.isUndefined=function(t){return void 0===t},En.isWeakMap=function(t){return Ua(t)&&ro(t)==k},En.isWeakSet=function(t){return Ua(t)&&"[object WeakSet]"==pr(t)},En.join=function(t,e){return null==t?"":on.call(t,e)},En.kebabCase=Ms,En.last=Po,En.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=is(n))<0?sn(r+i,0):ln(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):be(t,xe,i,!0)},En.lowerCase=Is,En.lowerFirst=Rs,En.lt=ts,En.lte=es,En.max=function(t){return t&&t.length?ir(t,Ys,vr):void 0},En.maxBy=function(t,e){return t&&t.length?ir(t,Ji(e,2),vr):void 0},En.mean=function(t){return $e(t,Ys)},En.meanBy=function(t,e){return $e(t,Ji(e,2))},En.min=function(t){return t&&t.length?ir(t,Ys,Sr):void 0},En.minBy=function(t,e){return t&&t.length?ir(t,Ji(e,2),Sr):void 0},En.stubArray=ol,En.stubFalse=al,En.stubObject=function(){return{}},En.stubString=function(){return""},En.stubTrue=function(){return!0},En.multiply=fl,En.nth=function(t,e){return t&&t.length?jr(t,is(e)):void 0},En.noConflict=function(){return Yt._===this&&(Yt._=Ct),this},En.noop=Qs,En.now=ga,En.pad=function(t,e,n){t=ls(t);var r=(e=is(e))?Ve(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ti(tn(i),n)+t+Ti(Xe(i),n)},En.padEnd=function(t,e,n){t=ls(t);var r=(e=is(e))?Ve(t):0;return e&&r<e?t+Ti(e-r,n):t},En.padStart=function(t,e,n){t=ls(t);var r=(e=is(e))?Ve(t):0;return e&&r<e?Ti(e-r,n)+t:t},En.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),cn(ls(t).replace(G,""),e||0)},En.random=function(t,e,n){if(n&&"boolean"!=typeof n&&lo(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=rs(t),void 0===e?(e=t,t=0):e=rs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=dn();return ln(t+i*(e-t+Bt("1e-"+((i+"").length-1))),e)}return Nr(t,e)},En.reduce=function(t,e,n){var r=Ma(t)?ve:Se,i=arguments.length<3;return r(t,Ji(e,4),n,i,er)},En.reduceRight=function(t,e,n){var r=Ma(t)?ge:Se,i=arguments.length<3;return r(t,Ji(e,4),n,i,nr)},En.repeat=function(t,e,n){return e=(n?lo(t,e,n):void 0===e)?1:is(e),zr(ls(t),e)},En.replace=function(){var t=arguments,e=ls(t[0]);return t.length<3?e:e.replace(t[1],t[2])},En.result=function(t,e,n){var r=-1,i=(e=li(e,t)).length;for(i||(i=1,t=void 0);++r<i;){var o=null==t?void 0:t[So(e[r])];void 0===o&&(r=i,o=n),t=Wa(o)?o.call(t):o}return t},En.round=hl,En.runInContext=t,En.sample=function(t){return(Ma(t)?Pn:Pr)(t)},En.size=function(t){if(null==t)return 0;if(Ra(t))return Ja(t)?Ve(t):t.length;var e=ro(t);return e==v||e==_?t.size:Dr(t).length},En.snakeCase=Ns,En.some=function(t,e,n){var r=Ma(t)?me:Yr;return n&&lo(t,e,n)&&(e=void 0),r(t,Ji(e,3))},En.sortedIndex=function(t,e){return Gr(t,e)},En.sortedIndexBy=function(t,e,n){return Kr(t,e,Ji(n,2))},En.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Gr(t,e);if(r<n&&Oa(t[r],e))return r}return-1},En.sortedLastIndex=function(t,e){return Gr(t,e,!0)},En.sortedLastIndexBy=function(t,e,n){return Kr(t,e,Ji(n,2),!0)},En.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=Gr(t,e,!0)-1;if(Oa(t[n],e))return n}return-1},En.startCase=zs,En.startsWith=function(t,e,n){return t=ls(t),n=null==n?0:Zn(is(n),0,t.length),e=Qr(e),t.slice(n,n+e.length)==e},En.subtract=pl,En.sum=function(t){return t&&t.length?Ce(t,Ys):0},En.sumBy=function(t,e){return t&&t.length?Ce(t,Ji(e,2)):0},En.template=function(t,e,n){var r=En.templateSettings;n&&lo(t,e,n)&&(e=void 0),t=ls(t),e=ds({},e,r,Wi);var i,o,a=ds({},e.imports,r.imports,Wi),s=ws(a),l=je(a,s),u=0,c=e.interpolate||ct,d="__p += '",f=vt((e.escape||ct).source+"|"+c.source+"|"+(c===F?nt:ct).source+"|"+(e.evaluate||ct).source+"|$","g"),h="//# sourceURL="+(xt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++qt+"]")+"\n";t.replace(f,(function(e,n,r,a,s,l){return r||(r=a),d+=t.slice(u,l).replace(dt,qe),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(o=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+e.length,e})),d+="';\n";var p=xt.call(e,"variable")&&e.variable;if(p){if(tt.test(p))throw new K("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(T,""):d).replace(M,"$1").replace(I,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Fs((function(){return ft(s,h+"return "+d).apply(void 0,l)}));if(v.source=d,Pa(v))throw v;return v},En.times=function(t,e){if((t=is(t))<1||t>9007199254740991)return[];var n=4294967295,r=ln(t,4294967295);t-=4294967295;for(var i=Ee(r,e=Ji(e));++n<t;)e(n);return i},En.toFinite=rs,En.toInteger=is,En.toLength=os,En.toLower=function(t){return ls(t).toLowerCase()},En.toNumber=as,En.toSafeInteger=function(t){return t?Zn(is(t),-9007199254740991,9007199254740991):0===t?t:0},En.toString=ls,En.toUpper=function(t){return ls(t).toUpperCase()},En.trim=function(t,e,n){if((t=ls(t))&&(n||void 0===e))return Oe(t);if(!t||!(e=Qr(e)))return t;var r=Ye(t),i=Ye(e);return ci(r,Me(r,i),Ie(r,i)+1).join("")},En.trimEnd=function(t,e,n){if((t=ls(t))&&(n||void 0===e))return t.slice(0,Ge(t)+1);if(!t||!(e=Qr(e)))return t;var r=Ye(t);return ci(r,0,Ie(r,Ye(e))+1).join("")},En.trimStart=function(t,e,n){if((t=ls(t))&&(n||void 0===e))return t.replace(G,"");if(!t||!(e=Qr(e)))return t;var r=Ye(t);return ci(r,Me(r,Ye(e))).join("")},En.truncate=function(t,e){var n=30,r="...";if(Ha(e)){var i="separator"in e?e.separator:i;n="length"in e?is(e.length):n,r="omission"in e?Qr(e.omission):r}var o=(t=ls(t)).length;if(Pe(t)){var a=Ye(t);o=a.length}if(n>=o)return t;var s=n-Ve(r);if(s<1)return r;var l=a?ci(a,0,s).join(""):t.slice(0,s);if(void 0===i)return l+r;if(a&&(s+=l.length-s),Ka(i)){if(t.slice(s).search(i)){var u,c=l;for(i.global||(i=vt(i.source,ls(rt.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,void 0===d?s:d)}}else if(t.indexOf(Qr(i),s)!=s){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+r},En.unescape=function(t){return(t=ls(t))&&z.test(t)?t.replace(R,Ke):t},En.uniqueId=function(t){var e=++$t;return ls(t)+e},En.upperCase=qs,En.upperFirst=Ps,En.each=la,En.eachRight=ua,En.first=Ro,Js(En,(dl={},ur(En,(function(t,e){xt.call(En.prototype,e)||(dl[e]=t)})),dl),{chain:!1}),En.VERSION="4.17.21",se(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){En[t].placeholder=En})),se(["drop","take"],(function(t,e){Tn.prototype[t]=function(n){n=void 0===n?1:sn(is(n),0);var r=this.__filtered__&&!e?new Tn(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Tn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),se(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Tn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ji(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),se(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Tn.prototype[t]=function(){return this[n](1).value()[0]}})),se(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Tn.prototype[t]=function(){return this.__filtered__?new Tn(this):this[n](1)}})),Tn.prototype.compact=function(){return this.filter(Ys)},Tn.prototype.find=function(t){return this.filter(t).head()},Tn.prototype.findLast=function(t){return this.reverse().find(t)},Tn.prototype.invokeMap=qr((function(t,e){return"function"==typeof t?new Tn(this):this.map((function(n){return _r(n,t,e)}))})),Tn.prototype.reject=function(t){return this.filter(Da(Ji(t)))},Tn.prototype.slice=function(t,e){t=is(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Tn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=is(e))<0?n.dropRight(-e):n.take(e-t)),n)},Tn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Tn.prototype.toArray=function(){return this.take(4294967295)},ur(Tn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=En[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(En.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,s=e instanceof Tn,l=a[0],u=s||Ma(e),c=function(t){var e=i.apply(En,pe([t],a));return r&&d?e[0]:e};u&&n&&"function"==typeof l&&1!=l.length&&(s=u=!1);var d=this.__chain__,f=!!this.__actions__.length,h=o&&!d,p=s&&!f;if(!o&&u){e=p?e:new Tn(this);var v=t.apply(e,a);return v.__actions__.push({func:ra,args:[c],thisArg:void 0}),new jn(v,d)}return h&&p?t.apply(this,a):(v=this.thru(c),h?r?v.value()[0]:v.value():v)})})),se(["pop","push","shift","sort","splice","unshift"],(function(t){var e=yt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);En.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ma(i)?i:[],t)}return this[n]((function(n){return e.apply(Ma(n)?n:[],t)}))}})),ur(Tn.prototype,(function(t,e){var n=En[e];if(n){var r=n.name+"";xt.call(bn,r)||(bn[r]=[]),bn[r].push({name:e,func:n})}})),bn[Ei(void 0,2).name]=[{name:"wrapper",func:void 0}],Tn.prototype.clone=function(){var t=new Tn(this.__wrapped__);return t.__actions__=yi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=yi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=yi(this.__views__),t},Tn.prototype.reverse=function(){if(this.__filtered__){var t=new Tn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Tn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ma(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=ln(e,t+a);break;case"takeRight":t=sn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,f=0,h=ln(l,this.__takeCount__);if(!n||!r&&i==l&&h==l)return ri(t,this.__actions__);var p=[];t:for(;l--&&f<h;){for(var v=-1,g=t[u+=e];++v<d;){var m=c[v],y=m.iteratee,_=m.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue t;break t}}p[f++]=g}return p},En.prototype.at=ia,En.prototype.chain=function(){return na(this)},En.prototype.commit=function(){return new jn(this.value(),this.__chain__)},En.prototype.next=function(){void 0===this.__values__&&(this.__values__=ns(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},En.prototype.plant=function(t){for(var e,n=this;n instanceof Ln;){var r=Eo(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},En.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Tn){var e=t;return this.__actions__.length&&(e=new Tn(this)),(e=e.reverse()).__actions__.push({func:ra,args:[Ho],thisArg:void 0}),new jn(e,this.__chain__)}return this.thru(Ho)},En.prototype.toJSON=En.prototype.valueOf=En.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},En.prototype.first=En.prototype.head,Jt&&(En.prototype[Jt]=function(){return this}),En}();Yt._=Ze,void 0===(i=function(){return Ze}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n(6),n(7)(t))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){jQuery(document).ready((function(t){t("body").on("click",".file-field button.upload",(function(e){e.preventDefault();var n=wp.i18n,r=n.__;n._x,n._n,n._nx;upload_wrap=t(this).closest(".file-field"),upload_type=t(upload_wrap).data("type"),media_input=t(upload_wrap).find("input"),media_preview=t(upload_wrap).find("img"),file_name=t(upload_wrap).find(".file-name"),remove_btn=t(upload_wrap).find(".remove");t(this);var i=wp.media({title:r("Add file","custom-post-types"),frame:"select",library:{type:upload_type,uploadedTo:wp.media.view.settings.post.id},button:{text:r("Choose file","custom-post-types")},multiple:!1}).on("select",(function(){var e=i.state().get("selection").first().toJSON(),n=!!e.sizes&&e.sizes.thumbnail.url;n&&(t(media_preview).attr("src",n),t(media_preview).show());var r=e.mime;r.startsWith("image")&&(r="image"),r.startsWith("audio")&&(r="audio"),r.startsWith("video")&&(r="video"),"-1"!=t.inArray(r,upload_type)?(t(file_name).html(e.url.split("/").reverse()[0]),t(media_input).val(e.id),t(remove_btn).prop("disabled",!1)):(t(file_name).html(""),t(media_input).val(""),t(media_preview).removeAttr("src"),t(media_preview).hide())})).open()})),t("body").on("click",".file-field button.remove",(function(e){e.preventDefault(),upload_wrap=t(this).closest(".file-field"),media_input=t(upload_wrap).find("input"),media_preview=t(upload_wrap).find("img"),file_name=t(upload_wrap).find(".file-name"),remove_btn=t(upload_wrap).find(".remove"),t(file_name).html(""),t(media_input).val(""),t(media_preview).removeAttr("src"),t(media_preview).hide(),t(remove_btn).prop("disabled",!0)}))}))},function(t,e,n){"use strict";n.r(e);n.p,n.p,n(1);var r=n(0),i=n.n(r);window.jQuery=i.a,window.jquery=i.a,window.$=i.a;var o=function(t){t=(t=t.replace(/^\s+|\s+$/g,"")).toLowerCase();for(var e="àáäâèéëêìíïîòóöôùúüûñçěščřžýúůďťň·/_,:;",n=0,r=e.length;n<r;n++)t=t.replace(new RegExp(e.charAt(n),"g"),"aaaaeeeeiiiioooouuuuncescrzyuudtn------".charAt(n));return t=t.replace(".","-").replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/\//g,"")},a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""!=t)return localStorage.setItem(t,e)},s=function(){var t=new URLSearchParams(location.search);return t.get("post")&&t.get("post").length?t.get("post"):""},l=function(t,e){$(t).on("focusout",(function(){var t=$(this).val(),n=$(e).val();!t.length&&n.length&&$(this).val(o(n))})),$(e).on("focusout",(function(){var e=$(t).val(),n=$(this).val();!e.length&&n.length&&$(t).val(o(n))}))};window.jQuery=i.a,window.jquery=i.a,window.$=i.a;var u=function(){var t=wp.i18n,e=t.__,n=(t._x,t._n,t._nx,!1);i()(".field-input :input").on("change",(function(){n=!0})),i()("body").on("submit","form#post",(function(t){n=!1})),i()("body").on("submit","form#edittag",(function(t){n=!1})),i()("body").on("submit","form#your-profile",(function(t){n=!1})),i()("body").on("submit","form[action^='options']",(function(t){n=!1})),i()(document).ajaxComplete((function(t,e,r){r.data.match(/action=add-tag/)&&(n=!1)})),i()("body").on("click",".edit-post-header__settings .editor-post-publish-button",(function(t){wp.data.subscribe((function(){var t=wp.data.select("core/editor").isSavingPost(),e=wp.data.select("core/editor").isAutosavingPost();t&&!e&&(n=!1)}))})),i()(window).on("beforeunload",(function(){if(n)return e("You have unsaved changes on this page. Do you want to leave this page and discard your changes?","custom-post-types")})),i()(document).on("cpt-load-ux",(function(){i()('.postbox[id$="-settings"] .group-fields-wrap').each((function(){var t=i()(this).find('input[id$="-label"]').first(),e=i()(this).find('input[id$="-key"]').first();l(e,t)})),i()('.postbox[id$="-settings"] .cpt-fields-wrap').each((function(){var t=i()(this).find('input[id$="-singular"]').first(),e=i()(this).find('input[id$="-id"]').first();l(e,t),function(t){$(t).on("focusout",(function(){var t=$(this).val();t.length&&$(this).val(o(t))}))}(i()(this).find('input[id$="-slug"]').first())}))})),i()("body").on("click",".cpt-field button.advanced-view",(function(t){t.preventDefault();var n=i()(this).closest(".cpt-fields-wrap"),r=i()(n).find(".cpt-field.advanced-field");i()(this).hasClass("is-advanced")?(i()(r).removeClass("active"),i()(this).removeClass("is-advanced"),i()(this).find(".dashicons").attr("class","dashicons dashicons-insert"),i()(this).find(".label").html(e("Advanced view","custom-post-types")),a("cpt_edit_screen_"+s(),"normal")):(i()(r).addClass("active"),i()(this).addClass("is-advanced"),i()(this).find(".dashicons").attr("class","dashicons dashicons-remove"),i()(this).find(".label").html(e("Simple view","custom-post-types")),a("cpt_edit_screen_"+s(),"advanced"))}));var r=i()(".cpt-field button.advanced-view");"advanced"!=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!=t)return localStorage.getItem(t)}("cpt_edit_screen_"+s())||i()(r).hasClass("is-advanced")||i()(r).click(),i()("body").on("change",".group-field .field-type select",(function(t){t.preventDefault();var e=!!i()(this).val().length&&i()(this).val(),n=i()(this).closest(".group-fields-wrap"),r=i()(n).children(".extra-fields");if(i()(r).html(""),i()(r).html(i()('<div class="cpt-load-spinner"><div class="spinner"></div></div>')),e){var o=i()(this).attr("name").replace("meta-fields","").replace("[type]",""),a=[];a.push({name:"action",value:"cpt_get_extra_fields"}),a.push({name:"nonce",value:cpt.ajax_nonce}),a.push({name:"field-type",value:e}),a.push({name:"parent",value:o}),i.a.ajax({type:"post",dataType:"json",url:cpt.ajax_url,data:a,success:function(t){t.success?(i()(r).html(i()(t.data)),i()(document).trigger("cpt-load-ux")):console.log("Error")}})}else i()(r).html("")})),i()("body").on("change",".cpt-field.template-for select",(function(t){t.preventDefault();var e=!!i()(this).val().length&&i()(this).val(),n=i()(this).closest(".cpt-fields-wrap"),r=i()(n).children(".extra-fields");if(i()(r).html(""),i()(r).html(i()('<div class="cpt-load-spinner"><div class="spinner"></div></div>')),e){var o=[];o.push({name:"action",value:"cpt_get_template_fields"}),o.push({name:"nonce",value:cpt.ajax_nonce}),o.push({name:"post-type",value:e}),i.a.ajax({type:"post",dataType:"json",url:cpt.ajax_url,data:o,success:function(t){t.success?i()(r).html(i()(t.data)):console.log("Error")}})}else i()(r).html("")})),i()("body").on("click",".cpt-field.extra-fields input.copy",(function(t){t.preventDefault();var n=i()(this);if(!i()(this).hasClass("copying")){var r=i()(n).val();(function(t){var e=$("<input>");return $("body").append(e),e.val($(t).val()).select(),document.execCommand("copy"),e.remove(),!0})(i()(this))&&(i()(n).val(e("Copied to the clipboard...","custom-post-types")),i()(n).addClass("copying"),i()(n).mouseleave((function(){i()(this).val(r),i()(this).removeClass("copying")})))}}))};i()(document).ready((function(){u()})),i()(document).ready((function(){$=n(0),window.jQuery=$,window.jquery=$,window.$=$,$(document).trigger("cpt-load-ux")}));var c=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},d=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(t){return 0===this.indexOf(t)},String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var h={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var v=function(){function t(e,n,r,i){c(this,t);var o=this;if(void 0===e);else if(Array.isArray(e))this.rgba=e;else if(void 0===r){var a=e&&""+e;a&&function(e){if(e.startsWith("hsl")){var n=e.match(/([\-\d\.e]+)/g).map(Number),r=f(n,4),i=r[0],a=r[1],s=r[2],l=r[3];void 0===l&&(l=1),i/=360,a/=100,s/=100,o.hsla=[i,a,s,l]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),c=f(u,4),d=c[0],h=c[1],p=c[2],v=c[3];void 0===v&&(v=1),o.rgba=[d,h,p,v]}else e.startsWith("#")?o.rgba=t.hexToRgb(e):o.rgba=t.nameToRgb(e)||t.hexToRgb(e)}(a.toLowerCase())}else this.rgba=[e,n,r,void 0===i?1:i]}return d(t,[{key:"printRGB",value:function(t){var e=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,e){return p(t,3===e?3:0)}));return t?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(t){var e=[360,100,100,1],n=["","%","%",""],r=(t?this.hsla:this.hsla.slice(0,3)).map((function(t,r){return p(t*e[r],3===r?3:1)+n[r]}));return t?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(t){var e=this.hex;return t?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(t){3===t.length&&(t[3]=1),this._rgba=t,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(t){3===t.length&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(t,e){return e<3?t.toString(16):Math.round(255*t).toString(16)})).map((function(t){return t.padStart(2,"0")})).join("")},set:function(e){this.rgba=t.hexToRgb(e)}}],[{key:"hexToRgb",value:function(t){var e=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var n=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(t){return parseInt(t,16)}));return n[3]=n[3]/255,n}},{key:"nameToRgb",value:function(e){var n=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=h[n];return void 0===r?r:t.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var e=f(t,4),n=e[0],r=e[1],i=e[2],o=e[3];n/=255,r/=255,i/=255;var a=Math.max(n,r,i),s=Math.min(n,r,i),l=void 0,u=void 0,c=(a+s)/2;if(a===s)l=u=0;else{var d=a-s;switch(u=c>.5?d/(2-a-s):d/(a+s),a){case n:l=(r-i)/d+(r<i?6:0);break;case r:l=(i-n)/d+2;break;case i:l=(n-r)/d+4}l/=6}return[l,u,c,o]}},{key:"hslToRgb",value:function(t){var e=f(t,4),n=e[0],r=e[1],i=e[2],o=e[3],a=void 0,s=void 0,l=void 0;if(0===r)a=s=l=i;else{var u=function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;a=u(d,c,n+1/3),s=u(d,c,n),l=u(d,c,n-1/3)}var h=[255*a,255*s,255*l].map(Math.round);return h[3]=o,h}}]),t}(),g=function(){function t(){c(this,t),this._events=[]}return d(t,[{key:"add",value:function(t,e,n){t.addEventListener(e,n,!1),this._events.push({target:t,type:e,handler:n})}},{key:"remove",value:function(e,n,r){this._events=this._events.filter((function(i){var o=!0;return e&&e!==i.target&&(o=!1),n&&n!==i.type&&(o=!1),r&&r!==i.handler&&(o=!1),o&&t._doRemove(i.target,i.type,i.handler),!o}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return t._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(t,e,n){t.removeEventListener(e,n,!1)}}]),t}();function m(t,e,n){var r=!1;function i(t,e,n){return Math.max(e,Math.min(t,n))}function o(t,o,a){if(a&&(r=!0),r){t.preventDefault();var s=e.getBoundingClientRect(),l=s.width,u=s.height,c=o.clientX,d=o.clientY,f=i(c-s.left,0,l),h=i(d-s.top,0,u);n(f/l,h/u)}}function a(t,e){1===(void 0===t.buttons?t.which:t.buttons)?o(t,t,e):r=!1}function s(t,e){1===t.touches.length?o(t,t.touches[0],e):r=!1}t.add(e,"mousedown",(function(t){a(t,!0)})),t.add(e,"touchstart",(function(t){s(t,!0)})),t.add(window,"mousemove",a),t.add(e,"touchmove",s),t.add(window,"mouseup",(function(t){r=!1})),t.add(e,"touchend",(function(t){r=!1})),t.add(e,"touchcancel",(function(t){r=!1}))}function y(t,e){return(e||document).querySelector(t)}function _(t){t.preventDefault(),t.stopPropagation()}function b(t,e,n,r,i){t.add(e,"keydown",(function(t){n.indexOf(t.key)>=0&&(i&&_(t),r(t))}))}var w=document.createElement("style");w.textContent=".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-flow:row wrap;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:stretch;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;-webkit-box-ordinal-group:2;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{-webkit-box-ordinal-group:2;order:1;-webkit-box-flex:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{-webkit-box-ordinal-group:2;order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px dodgerblue}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:whitesmoke;background-image:-webkit-gradient(linear, left bottom, left top, from(gainsboro), to(transparent));background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:-webkit-gradient(linear, left bottom, left top, from(transparent), to(gainsboro));background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:white}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}",document.documentElement.firstElementChild.appendChild(w);var k=function(){function t(e){c(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new g,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return d(t,[{key:"setOptions",value:function(t){var e=this;if(t){var n=this.settings;if(t instanceof HTMLElement)n.parent=t;else{n.parent&&t.parent&&n.parent!==t.parent&&(this._events.remove(n.parent),this._popupInited=!1),function(t,e,n){for(var r in t)n&&n.indexOf(r)>=0||(e[r]=t[r])}(t,n),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var r=t.color||t.colour;r&&this._setColor(r)}var i=n.parent;if(i&&n.popup&&!this._popupInited){var o=function(t){return e.openHandler(t)};this._events.add(i,"click",o),b(this._events,i,[" ","Spacebar","Enter"],o),this._popupInited=!0}else t.parent&&!n.popup&&this.show()}}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=t&&"keydown"===t.type?this._domEdit:this.domElement;setTimeout((function(){return e.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var e=t&&t.type,n=!1;if(t)if("mousedown"===e||"focusin"===e){var r=(this.__containedEvent||0)+100;t.timeStamp>r&&(n=!0)}else _(t),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}},{key:"setColor",value:function(t,e){this._setColor(t,{silent:e})}},{key:"_setColor",value:function(t,e){if("string"==typeof t&&(t=t.trim()),t){e=e||{};var n=void 0;try{n=new v(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(t,e){this.setColor(t,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var e,n,r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',i=(e=r,(n=document.createElement("div")).innerHTML=e,n.firstElementChild);return this.domElement=i,this._domH=y(".picker_hue",i),this._domSL=y(".picker_sl",i),this._domA=y(".picker_alpha",i),this._domEdit=y(".picker_editor input",i),this._domSample=y(".picker_sample",i),this._domOkay=y(".picker_done button",i),this._domCancel=y(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var t=this,e=this,n=this.domElement,r=this._events;function i(t,e,n){r.add(t,e,n)}i(n,"click",(function(t){return t.preventDefault()})),m(r,this._domH,(function(t,n){return e._setHSLA(t)})),m(r,this._domSL,(function(t,n){return e._setHSLA(null,t,1-n)})),this.settings.alpha&&m(r,this._domA,(function(t,n){return e._setHSLA(null,null,null,1-n)}));var o=this._domEdit;i(o,"input",(function(t){e._setColor(this.value,{fromEditor:!0,failSilently:!0})})),i(o,"focus",(function(t){this.selectionStart===this.selectionEnd&&this.select()})),this._ifPopup((function(){var e=function(e){return t.closeHandler(e)};i(window,"mousedown",e),i(window,"focusin",e),b(r,n,["Esc","Escape"],e);var o=function(e){t.__containedEvent=e.timeStamp};i(n,"mousedown",o),i(n,"focusin",o),i(t._domCancel,"click",e)}));var a=function(e){t._ifPopup((function(){return t.closeHandler(e)})),t.onDone&&t.onDone(t.colour)};i(this._domOkay,"click",a),b(r,n,["Enter"],a)}},{key:"_setPosition",value:function(){var t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup((function(n){"static"===getComputedStyle(t).position&&(t.style.position="relative");var r=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(t){t===r?e.classList.add(t):e.classList.remove(t)})),e.classList.add(r)}))}},{key:"_setHSLA",value:function(t,e,n,r,i){i=i||{};var o=this.colour,a=o.hsla;[t,e,n,r].forEach((function(t,e){(t||0===t)&&(a[e]=t)})),o.hsla=a,this._updateUI(i),this.onChange&&!i.silent&&this.onChange(o)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var e=this.colour,n=e.hsla,r="hsl("+360*n[0]+", 100%, 50%)",i=e.hslString,o=e.hslaString,a=this._domH,s=this._domSL,l=this._domA,u=y(".picker_selector",a),c=y(".picker_selector",s),d=y(".picker_selector",l);_(0,u,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,_(0,c,n[1]),b(0,c,1-n[2]),s.style.color=i,b(0,d,1-n[3]);var f=i,h=f.replace("hsl","hsla").replace(")",", 0)"),p="linear-gradient("+[f,h]+")";if(this._domA.style.backgroundImage=p+", url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",!t.fromEditor){var v=this.settings.editorFormat,g=this.settings.alpha,m=void 0;switch(v){case"rgb":m=e.printRGB(g);break;case"hsl":m=e.printHSL(g);break;default:m=e.printHex(g)}this._domEdit.value=m}this._domSample.style.color=o}function _(t,e,n){e.style.left=100*n+"%"}function b(t,e,n){e.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(t){var e=this.domElement;if(!e)return!1;var n=t?"":"none",r=e.style.display!==n;return r&&(e.style.display=n),r}}],[{key:"StyleElement",get:function(){return w}}]),t}();$(document).on("cpt-load-ux",(function(){$(".field-input > .color-field").each((function(){var t=$(this).children(".color-wrap"),e=$(t).children("input"),n=$(t).children(".preview"),r="yes"==$(this).data("alpha");new k({parent:t[0],popup:"top",alpha:r,color:e[0].value,onChange:function(t){n[0].style.backgroundColor=t.rgbaString,e[0].setAttribute("value",t.hex.endsWith("ff")&&t.hex.length>6?t.hex.slice(0,-2):t.hex)}})}))}));n(2);function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function D(t){return t[t.length-1]}function A(t,...e){return e.forEach(e=>{t.includes(e)||t.push(e)}),t}function S(t,e){return t?t.split(e):[]}function C(t,e,n){return(void 0===e||t>=e)&&(void 0===n||t<=n)}function E(t,e,n){return t<e?e:t>n?n:t}function O(t,e,n={},r=0,i=""){i+=`<${Object.keys(n).reduce((t,e)=>{let i=n[e];return"function"==typeof i&&(i=i(r)),`${t} ${e}="${i}"`},t)}></${t}>`;const o=r+1;return o<e?O(t,e,n,o,i):i}function L(t){return t.replace(/>\s+/g,">").replace(/\s+</,"<")}function j(t){return new Date(t).setHours(0,0,0,0)}function T(){return(new Date).setHours(0,0,0,0)}function M(...t){switch(t.length){case 0:return T();case 1:return j(t[0])}const e=new Date(0);return e.setFullYear(...t),e.setHours(0,0,0,0)}function I(t,e){const n=new Date(t);return n.setDate(n.getDate()+e)}function R(t,e){const n=new Date(t),r=n.getMonth()+e;let i=r%12;i<0&&(i+=12);const o=n.setMonth(r);return n.getMonth()!==i?n.setDate(0):o}function N(t,e){const n=new Date(t),r=n.getMonth(),i=n.setFullYear(n.getFullYear()+e);return 1===r&&2===n.getMonth()?n.setDate(0):i}function z(t,e){return(t-e+7)%7}function q(t,e,n=0){const r=new Date(t).getDay();return I(t,z(e,n)-z(r,n))}function P(t,e){const n=new Date(t).getFullYear();return Math.floor(n/e)*e}const W=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,F=/[\s!-/:-@[-`{-~年月日]+/;let B={};const H={y:(t,e)=>new Date(t).setFullYear(parseInt(e,10)),m(t,e,n){const r=new Date(t);let i=parseInt(e,10)-1;if(isNaN(i)){if(!e)return NaN;const t=e.toLowerCase(),r=e=>e.toLowerCase().startsWith(t);if(i=n.monthsShort.findIndex(r),i<0&&(i=n.months.findIndex(r)),i<0)return NaN}return r.setMonth(i),r.getMonth()!==function t(e){return e>-1?e%12:t(e+12)}(i)?r.setDate(0):r.getTime()},d:(t,e)=>new Date(t).setDate(parseInt(e,10))},U={d:t=>t.getDate(),dd:t=>V(t.getDate(),2),D:(t,e)=>e.daysShort[t.getDay()],DD:(t,e)=>e.days[t.getDay()],m:t=>t.getMonth()+1,mm:t=>V(t.getMonth()+1,2),M:(t,e)=>e.monthsShort[t.getMonth()],MM:(t,e)=>e.months[t.getMonth()],y:t=>t.getFullYear(),yy:t=>V(t.getFullYear(),2).slice(-2),yyyy:t=>V(t.getFullYear(),4)};function V(t,e){return t.toString().padStart(e,"0")}function Y(t){if("string"!=typeof t)throw new Error("Invalid date format.");if(t in B)return B[t];const e=t.split(W),n=t.match(new RegExp(W,"g"));if(0===e.length||!n)throw new Error("Invalid date format.");const r=n.map(t=>U[t]),i=Object.keys(H).reduce((t,e)=>(n.find(t=>"D"!==t[0]&&t[0].toLowerCase()===e)&&t.push(e),t),[]);return B[t]={parser(t,e){const r=t.split(F).reduce((t,e,r)=>{if(e.length>0&&n[r]){const i=n[r][0];"M"===i?t.m=e:"D"!==i&&(t[i]=e)}return t},{});return i.reduce((t,n)=>{const i=H[n](t,r[n],e);return isNaN(i)?t:i},T())},formatter:(t,n)=>r.reduce((r,i,o)=>r+`${e[o]}${i(t,n)}`,"")+D(e)}}function G(t,e,n){if(t instanceof Date||"number"==typeof t){const e=j(t);return isNaN(e)?void 0:e}if(t){if("today"===t)return T();if(e&&e.toValue){const r=e.toValue(t,e,n);return isNaN(r)?void 0:j(r)}return Y(e).parser(t,n)}}function K(t,e,n){if(isNaN(t)||!t&&0!==t)return"";const r="number"==typeof t?new Date(t):t;return e.toDisplay?e.toDisplay(r,e,n):Y(e).formatter(r,n)}const Z=new WeakMap,{addEventListener:J,removeEventListener:Q}=EventTarget.prototype;function X(t,e){let n=Z.get(t);n||(n=[],Z.set(t,n)),e.forEach(t=>{J.call(...t),n.push(t)})}function tt(t){let e=Z.get(t);e&&(e.forEach(t=>{Q.call(...t)}),Z.delete(t))}if(!Event.prototype.composedPath){const t=(e,n=[])=>{let r;return n.push(e),e.parentNode?r=e.parentNode:e.host?r=e.host:e.defaultView&&(r=e.defaultView),r?t(r,n):n};Event.prototype.composedPath=function(){return t(this.target)}}function et(t,e){const n="function"==typeof e?e:t=>t.matches(e);return function t(e,n,r,i=0){const o=e[i];return n(o)?o:o!==r&&o.parentElement?t(e,n,r,i+1):void 0}(t.composedPath(),n,t.currentTarget)}const nt={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}};var rt={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"»",orientation:"auto",pickLevel:0,prevArrow:"«",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0};const it=document.createRange();function ot(t){return it.createContextualFragment(t)}function at(t){"none"!==t.style.display&&(t.style.display&&(t.dataset.styleDisplay=t.style.display),t.style.display="none")}function st(t){"none"===t.style.display&&(t.dataset.styleDisplay?(t.style.display=t.dataset.styleDisplay,delete t.dataset.styleDisplay):t.style.display="")}function lt(t){t.firstChild&&(t.removeChild(t.firstChild),lt(t))}const{language:ut,format:ct,weekStart:dt}=rt;function ft(t,e){return t.length<6&&e>=0&&e<7?A(t,e):t}function ht(t){return(t+6)%7}function pt(t,e,n,r){const i=G(t,e,n);return void 0!==i?i:r}function vt(t,e,n=3){const r=parseInt(t,10);return r>=0&&r<=n?r:e}function gt(t,e){const n=Object.assign({},t),r={},i=e.constructor.locales;let{format:o,language:a,locale:s,maxDate:l,maxView:u,minDate:c,pickLevel:d,startView:f,weekStart:h}=e.config||{};if(n.language){let t;if(n.language!==a&&(i[n.language]?t=n.language:(t=n.language.split("-")[0],void 0===i[t]&&(t=!1))),delete n.language,t){a=r.language=t;const e=s||i[ut];s=Object.assign({format:ct,weekStart:dt},i[ut]),a!==ut&&Object.assign(s,i[a]),r.locale=s,o===e.format&&(o=r.format=s.format),h===e.weekStart&&(h=r.weekStart=s.weekStart,r.weekEnd=ht(s.weekStart))}}if(n.format){const t="function"==typeof n.format.toDisplay,e="function"==typeof n.format.toValue,i=W.test(n.format);(t&&e||i)&&(o=r.format=n.format),delete n.format}let p=c,v=l;if(void 0!==n.minDate&&(p=null===n.minDate?M(0,0,1):pt(n.minDate,o,s,p),delete n.minDate),void 0!==n.maxDate&&(v=null===n.maxDate?void 0:pt(n.maxDate,o,s,v),delete n.maxDate),v<p?(c=r.minDate=v,l=r.maxDate=p):(c!==p&&(c=r.minDate=p),l!==v&&(l=r.maxDate=v)),n.datesDisabled&&(r.datesDisabled=n.datesDisabled.reduce((t,e)=>{const n=G(e,o,s);return void 0!==n?A(t,n):t},[]),delete n.datesDisabled),void 0!==n.defaultViewDate){const t=G(n.defaultViewDate,o,s);void 0!==t&&(r.defaultViewDate=t),delete n.defaultViewDate}if(void 0!==n.weekStart){const t=Number(n.weekStart)%7;isNaN(t)||(h=r.weekStart=t,r.weekEnd=ht(t)),delete n.weekStart}if(n.daysOfWeekDisabled&&(r.daysOfWeekDisabled=n.daysOfWeekDisabled.reduce(ft,[]),delete n.daysOfWeekDisabled),n.daysOfWeekHighlighted&&(r.daysOfWeekHighlighted=n.daysOfWeekHighlighted.reduce(ft,[]),delete n.daysOfWeekHighlighted),void 0!==n.maxNumberOfDates){const t=parseInt(n.maxNumberOfDates,10);t>=0&&(r.maxNumberOfDates=t,r.multidate=1!==t),delete n.maxNumberOfDates}n.dateDelimiter&&(r.dateDelimiter=String(n.dateDelimiter),delete n.dateDelimiter);let g=d;void 0!==n.pickLevel&&(g=vt(n.pickLevel,2),delete n.pickLevel),g!==d&&(d=r.pickLevel=g);let m=u;void 0!==n.maxView&&(m=vt(n.maxView,u),delete n.maxView),m=d>m?d:m,m!==u&&(u=r.maxView=m);let y=f;if(void 0!==n.startView&&(y=vt(n.startView,y),delete n.startView),y<d?y=d:y>u&&(y=u),y!==f&&(r.startView=y),n.prevArrow){const t=ot(n.prevArrow);t.childNodes.length>0&&(r.prevArrow=t.childNodes),delete n.prevArrow}if(n.nextArrow){const t=ot(n.nextArrow);t.childNodes.length>0&&(r.nextArrow=t.childNodes),delete n.nextArrow}if(void 0!==n.disableTouchKeyboard&&(r.disableTouchKeyboard="ontouchstart"in document&&!!n.disableTouchKeyboard,delete n.disableTouchKeyboard),n.orientation){const t=n.orientation.toLowerCase().split(/\s+/g);r.orientation={x:t.find(t=>"left"===t||"right"===t)||"auto",y:t.find(t=>"top"===t||"bottom"===t)||"auto"},delete n.orientation}if(void 0!==n.todayBtnMode){switch(n.todayBtnMode){case 0:case 1:r.todayBtnMode=n.todayBtnMode}delete n.todayBtnMode}return Object.keys(n).forEach(t=>{void 0!==n[t]&&x(rt,t)&&(r[t]=n[t])}),r}var mt=L('<div class="datepicker">\n  <div class="datepicker-picker">\n    <div class="datepicker-header">\n      <div class="datepicker-title"></div>\n      <div class="datepicker-controls">\n        <button type="button" class="%buttonClass% prev-btn"></button>\n        <button type="button" class="%buttonClass% view-switch"></button>\n        <button type="button" class="%buttonClass% next-btn"></button>\n      </div>\n    </div>\n    <div class="datepicker-main"></div>\n    <div class="datepicker-footer">\n      <div class="datepicker-controls">\n        <button type="button" class="%buttonClass% today-btn"></button>\n        <button type="button" class="%buttonClass% clear-btn"></button>\n      </div>\n    </div>\n  </div>\n</div>');var yt=L(`<div class="days">\n  <div class="days-of-week">${O("span",7,{class:"dow"})}</div>\n  <div class="datepicker-grid">${O("span",42)}</div>\n</div>`);var _t=L(`<div class="calendar-weeks">\n  <div class="days-of-week"><span class="dow"></span></div>\n  <div class="weeks">${O("span",6,{class:"week"})}</div>\n</div>`);class bt{constructor(t,e){Object.assign(this,e,{picker:t,element:ot('<div class="datepicker-view"></div>').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}init(t){void 0!==t.pickLevel&&(this.isMinView=this.id===t.pickLevel),this.setOptions(t),this.updateFocus(),this.updateSelection()}performBeforeHook(t,e,n){let r=this.beforeShow(new Date(n));switch(typeof r){case"boolean":r={enabled:r};break;case"string":r={classes:r}}if(r){if(!1===r.enabled&&(t.classList.add("disabled"),A(this.disabled,e)),r.classes){const n=r.classes.split(/\s+/);t.classList.add(...n),n.includes("disabled")&&A(this.disabled,e)}r.content&&function(t,e){lt(t),e instanceof DocumentFragment?t.appendChild(e):"string"==typeof e?t.appendChild(ot(e)):"function"==typeof e.forEach&&e.forEach(e=>{t.appendChild(e)})}(t,r.content)}}}class wt extends bt{constructor(t){super(t,{id:0,name:"days",cellClass:"day"})}init(t,e=!0){if(e){const t=ot(yt).firstChild;this.dow=t.firstChild,this.grid=t.lastChild,this.element.appendChild(t)}super.init(t)}setOptions(t){let e;if(x(t,"minDate")&&(this.minDate=t.minDate),x(t,"maxDate")&&(this.maxDate=t.maxDate),t.datesDisabled&&(this.datesDisabled=t.datesDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,e=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),void 0!==t.todayHighlight&&(this.todayHighlight=t.todayHighlight),void 0!==t.weekStart&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,e=!0),t.locale){const n=this.locale=t.locale;this.dayNames=n.daysMin,this.switchLabelFormat=n.titleFormat,e=!0}if(void 0!==t.beforeShowDay&&(this.beforeShow="function"==typeof t.beforeShowDay?t.beforeShowDay:void 0),void 0!==t.calendarWeeks)if(t.calendarWeeks&&!this.calendarWeeks){const t=ot(_t).firstChild;this.calendarWeeks={element:t,dow:t.firstChild,weeks:t.lastChild},this.element.insertBefore(t,this.element.firstChild)}else this.calendarWeeks&&!t.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==t.showDaysOfWeek&&(t.showDaysOfWeek?(st(this.dow),this.calendarWeeks&&st(this.calendarWeeks.dow)):(at(this.dow),this.calendarWeeks&&at(this.calendarWeeks.dow))),e&&Array.from(this.dow.children).forEach((t,e)=>{const n=(this.weekStart+e)%7;t.textContent=this.dayNames[n],t.className=this.daysOfWeekDisabled.includes(n)?"dow disabled":"dow"})}updateFocus(){const t=new Date(this.picker.viewDate),e=t.getFullYear(),n=t.getMonth(),r=M(e,n,1),i=q(r,this.weekStart,this.weekStart);this.first=r,this.last=M(e,n+1,0),this.start=i,this.focused=this.picker.viewDate}updateSelection(){const{dates:t,rangepicker:e}=this.picker.datepicker;this.selected=t,e&&(this.range=e.dates)}render(){this.today=this.todayHighlight?T():void 0,this.disabled=[...this.datesDisabled];const t=K(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(t),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){const t=q(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((e,n)=>{e.textContent=function(t){const e=q(t,4,1),n=q(new Date(e).setMonth(0,4),4,1);return Math.round((e-n)/6048e5)+1}(I(t,7*n))})}Array.from(this.grid.children).forEach((t,e)=>{const n=t.classList,r=I(this.start,e),i=new Date(r),o=i.getDay();if(t.className="datepicker-cell "+this.cellClass,t.dataset.date=r,t.textContent=i.getDate(),r<this.first?n.add("prev"):r>this.last&&n.add("next"),this.today===r&&n.add("today"),(r<this.minDate||r>this.maxDate||this.disabled.includes(r))&&n.add("disabled"),this.daysOfWeekDisabled.includes(o)&&(n.add("disabled"),A(this.disabled,r)),this.daysOfWeekHighlighted.includes(o)&&n.add("highlighted"),this.range){const[t,e]=this.range;r>t&&r<e&&n.add("range"),r===t&&n.add("range-start"),r===e&&n.add("range-end")}this.selected.includes(r)&&n.add("selected"),r===this.focused&&n.add("focused"),this.beforeShow&&this.performBeforeHook(t,r,r)})}refresh(){const[t,e]=this.range||[];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(t=>{t.classList.remove("range","range-start","range-end","selected","focused")}),Array.from(this.grid.children).forEach(n=>{const r=Number(n.dataset.date),i=n.classList;r>t&&r<e&&i.add("range"),r===t&&i.add("range-start"),r===e&&i.add("range-end"),this.selected.includes(r)&&i.add("selected"),r===this.focused&&i.add("focused")})}refreshFocus(){const t=Math.round((this.focused-this.start)/864e5);this.grid.querySelectorAll(".focused").forEach(t=>{t.classList.remove("focused")}),this.grid.children[t].classList.add("focused")}}function kt(t,e){if(!t||!t[0]||!t[1])return;const[[n,r],[i,o]]=t;return n>e||i<e?void 0:[n===e?r:-1,i===e?o:12]}class xt extends bt{constructor(t){super(t,{id:1,name:"months",cellClass:"month"})}init(t,e=!0){e&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(ot(O("span",12,{"data-month":t=>t})))),super.init(t)}setOptions(t){if(t.locale&&(this.monthNames=t.locale.monthsShort),x(t,"minDate"))if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{const e=new Date(t.minDate);this.minYear=e.getFullYear(),this.minMonth=e.getMonth(),this.minDate=e.setDate(1)}if(x(t,"maxDate"))if(void 0===t.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{const e=new Date(t.maxDate);this.maxYear=e.getFullYear(),this.maxMonth=e.getMonth(),this.maxDate=M(this.maxYear,this.maxMonth+1,0)}void 0!==t.beforeShowMonth&&(this.beforeShow="function"==typeof t.beforeShowMonth?t.beforeShowMonth:void 0)}updateFocus(){const t=new Date(this.picker.viewDate);this.year=t.getFullYear(),this.focused=t.getMonth()}updateSelection(){const{dates:t,rangepicker:e}=this.picker.datepicker;this.selected=t.reduce((t,e)=>{const n=new Date(e),r=n.getFullYear(),i=n.getMonth();return void 0===t[r]?t[r]=[i]:A(t[r],i),t},{}),e&&e.dates&&(this.range=e.dates.map(t=>{const e=new Date(t);return isNaN(e)?void 0:[e.getFullYear(),e.getMonth()]}))}render(){this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);const t=this.selected[this.year]||[],e=this.year<this.minYear||this.year>this.maxYear,n=this.year===this.minYear,r=this.year===this.maxYear,i=kt(this.range,this.year);Array.from(this.grid.children).forEach((o,a)=>{const s=o.classList,l=M(this.year,a,1);if(o.className="datepicker-cell "+this.cellClass,this.isMinView&&(o.dataset.date=l),o.textContent=this.monthNames[a],(e||n&&a<this.minMonth||r&&a>this.maxMonth)&&s.add("disabled"),i){const[t,e]=i;a>t&&a<e&&s.add("range"),a===t&&s.add("range-start"),a===e&&s.add("range-end")}t.includes(a)&&s.add("selected"),a===this.focused&&s.add("focused"),this.beforeShow&&this.performBeforeHook(o,a,l)})}refresh(){const t=this.selected[this.year]||[],[e,n]=kt(this.range,this.year)||[];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(t=>{t.classList.remove("range","range-start","range-end","selected","focused")}),Array.from(this.grid.children).forEach((r,i)=>{const o=r.classList;i>e&&i<n&&o.add("range"),i===e&&o.add("range-start"),i===n&&o.add("range-end"),t.includes(i)&&o.add("selected"),i===this.focused&&o.add("focused")})}refreshFocus(){this.grid.querySelectorAll(".focused").forEach(t=>{t.classList.remove("focused")}),this.grid.children[this.focused].classList.add("focused")}}class $t extends bt{constructor(t,e){super(t,e)}init(t,e=!0){var n;e&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow"+(n=this.cellClass,[...n].reduce((t,e,n)=>t+(n?e:e.toUpperCase()),"")),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(ot(O("span",12)))),super.init(t)}setOptions(t){if(x(t,"minDate")&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=P(t.minDate,this.step),this.minDate=M(this.minYear,0,1))),x(t,"maxDate")&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=P(t.maxDate,this.step),this.maxDate=M(this.maxYear,11,31))),void 0!==t[this.beforeShowOption]){const e=t[this.beforeShowOption];this.beforeShow="function"==typeof e?e:void 0}}updateFocus(){const t=new Date(this.picker.viewDate),e=P(t,this.navStep),n=e+9*this.step;this.first=e,this.last=n,this.start=e-this.step,this.focused=P(t,this.step)}updateSelection(){const{dates:t,rangepicker:e}=this.picker.datepicker;this.selected=t.reduce((t,e)=>A(t,P(e,this.step)),[]),e&&e.dates&&(this.range=e.dates.map(t=>{if(void 0!==t)return P(t,this.step)}))}render(){this.disabled=[],this.picker.setViewSwitchLabel(`${this.first}-${this.last}`),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((t,e)=>{const n=t.classList,r=this.start+e*this.step,i=M(r,0,1);if(t.className="datepicker-cell "+this.cellClass,this.isMinView&&(t.dataset.date=i),t.textContent=t.dataset.year=r,0===e?n.add("prev"):11===e&&n.add("next"),(r<this.minYear||r>this.maxYear)&&n.add("disabled"),this.range){const[t,e]=this.range;r>t&&r<e&&n.add("range"),r===t&&n.add("range-start"),r===e&&n.add("range-end")}this.selected.includes(r)&&n.add("selected"),r===this.focused&&n.add("focused"),this.beforeShow&&this.performBeforeHook(t,r,i)})}refresh(){const[t,e]=this.range||[];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(t=>{t.classList.remove("range","range-start","range-end","selected","focused")}),Array.from(this.grid.children).forEach(n=>{const r=Number(n.textContent),i=n.classList;r>t&&r<e&&i.add("range"),r===t&&i.add("range-start"),r===e&&i.add("range-end"),this.selected.includes(r)&&i.add("selected"),r===this.focused&&i.add("focused")})}refreshFocus(){const t=Math.round((this.focused-this.start)/this.step);this.grid.querySelectorAll(".focused").forEach(t=>{t.classList.remove("focused")}),this.grid.children[t].classList.add("focused")}}function Dt(t,e){const n={date:t.getDate(),viewDate:new Date(t.picker.viewDate),viewId:t.picker.currentView.id,datepicker:t};t.element.dispatchEvent(new CustomEvent(e,{detail:n}))}function At(t,e){const{minDate:n,maxDate:r}=t.config,{currentView:i,viewDate:o}=t.picker;let a;switch(i.id){case 0:a=R(o,e);break;case 1:a=N(o,e);break;default:a=N(o,e*i.navStep)}a=E(a,n,r),t.picker.changeFocus(a).render()}function St(t){const e=t.picker.currentView.id;e!==t.config.maxView&&t.picker.changeView(e+1).render()}function Ct(t){t.config.updateOnBlur?t.update({autohide:!0}):(t.refresh("input"),t.hide())}function Et(t,e){const n=t.picker,r=new Date(n.viewDate),i=n.currentView.id,o=1===i?R(r,e-r.getMonth()):N(r,e-r.getFullYear());n.changeFocus(o).changeView(i-1).render()}function Ot(t){const e=t.picker,n=T();if(1===t.config.todayBtnMode){if(t.config.autohide)return void t.setDate(n);t.setDate(n,{render:!1}),e.update()}e.viewDate!==n&&e.changeFocus(n),e.changeView(0).render()}function Lt(t){t.setDate({clear:!0})}function jt(t){St(t)}function Tt(t){At(t,-1)}function Mt(t){At(t,1)}function It(t,e){const n=et(e,".datepicker-cell");if(!n||n.classList.contains("disabled"))return;const{id:r,isMinView:i}=t.picker.currentView;i?t.setDate(Number(n.dataset.date)):Et(t,Number(1===r?n.dataset.month:n.dataset.year))}function Rt(t){t.inline||t.config.disableTouchKeyboard||t.inputField.focus()}function Nt(t,e){if(void 0!==e.title&&(e.title?(t.controls.title.textContent=e.title,st(t.controls.title)):(t.controls.title.textContent="",at(t.controls.title))),e.prevArrow){const n=t.controls.prevBtn;lt(n),e.prevArrow.forEach(t=>{n.appendChild(t.cloneNode(!0))})}if(e.nextArrow){const n=t.controls.nextBtn;lt(n),e.nextArrow.forEach(t=>{n.appendChild(t.cloneNode(!0))})}if(e.locale&&(t.controls.todayBtn.textContent=e.locale.today,t.controls.clearBtn.textContent=e.locale.clear),void 0!==e.todayBtn&&(e.todayBtn?st(t.controls.todayBtn):at(t.controls.todayBtn)),x(e,"minDate")||x(e,"maxDate")){const{minDate:e,maxDate:n}=t.datepicker.config;t.controls.todayBtn.disabled=!C(T(),e,n)}void 0!==e.clearBtn&&(e.clearBtn?st(t.controls.clearBtn):at(t.controls.clearBtn))}function zt(t){const{dates:e,config:n}=t;return E(e.length>0?D(e):n.defaultViewDate,n.minDate,n.maxDate)}function qt(t,e){const n=new Date(t.viewDate),r=new Date(e),{id:i,year:o,first:a,last:s}=t.currentView,l=r.getFullYear();switch(t.viewDate=e,l!==n.getFullYear()&&Dt(t.datepicker,"changeYear"),r.getMonth()!==n.getMonth()&&Dt(t.datepicker,"changeMonth"),i){case 0:return e<a||e>s;case 1:return l!==o;default:return l<a||l>s}}function Pt(t){return window.getComputedStyle(t).direction}class Wt{constructor(t){this.datepicker=t;const e=mt.replace(/%buttonClass%/g,t.config.buttonClass),n=this.element=ot(e).firstChild,[r,i,o]=n.firstChild.children,a=r.firstElementChild,[s,l,u]=r.lastElementChild.children,[c,d]=o.firstChild.children,f={title:a,prevBtn:s,viewSwitch:l,nextBtn:u,todayBtn:c,clearBtn:d};this.main=i,this.controls=f;const h=t.inline?"inline":"dropdown";n.classList.add("datepicker-"+h),Nt(this,t.config),this.viewDate=zt(t),X(t,[[n,"click",Rt.bind(null,t),{capture:!0}],[i,"click",It.bind(null,t)],[f.viewSwitch,"click",jt.bind(null,t)],[f.prevBtn,"click",Tt.bind(null,t)],[f.nextBtn,"click",Mt.bind(null,t)],[f.todayBtn,"click",Ot.bind(null,t)],[f.clearBtn,"click",Lt.bind(null,t)]]),this.views=[new wt(this),new xt(this),new $t(this,{id:2,name:"years",cellClass:"year",step:1}),new $t(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[t.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),t.config.container.appendChild(this.element)}setOptions(t){Nt(this,t),this.views.forEach(e=>{e.init(t,!1)}),this.currentView.render()}detach(){this.datepicker.config.container.removeChild(this.element)}show(){if(this.active)return;this.element.classList.add("active"),this.active=!0;const t=this.datepicker;if(!t.inline){const e=Pt(t.inputField);e!==Pt(t.config.container)?this.element.dir=e:this.element.dir&&this.element.removeAttribute("dir"),this.place(),t.config.disableTouchKeyboard&&t.inputField.blur()}Dt(t,"show")}hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active"),this.active=!1,Dt(this.datepicker,"hide"))}place(){const{classList:t,style:e}=this.element,{config:n,inputField:r}=this.datepicker,i=n.container,{width:o,height:a}=this.element.getBoundingClientRect(),{left:s,top:l,width:u}=i.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=r.getBoundingClientRect();let p,v,g,{x:m,y:y}=n.orientation;i===document.body?(p=window.scrollY,v=c+window.scrollX,g=d+p):(p=i.scrollTop,v=c-s,g=d-l+p),"auto"===m&&(v<0?(m="left",v=10):m=v+o>u||"rtl"===Pt(r)?"right":"left"),"right"===m&&(v-=o-f),"auto"===y&&(y=g-a<p?"bottom":"top"),"top"===y?g-=a:g+=h,t.remove("datepicker-orient-top","datepicker-orient-bottom","datepicker-orient-right","datepicker-orient-left"),t.add("datepicker-orient-"+y,"datepicker-orient-"+m),e.top=g?g+"px":g,e.left=v?v+"px":v}setViewSwitchLabel(t){this.controls.viewSwitch.textContent=t}setPrevBtnDisabled(t){this.controls.prevBtn.disabled=t}setNextBtnDisabled(t){this.controls.nextBtn.disabled=t}changeView(t){const e=this.currentView,n=this.views[t];return n.id!==e.id&&(this.currentView=n,this._renderMethod="render",Dt(this.datepicker,"changeView"),this.main.replaceChild(n.element,e.element)),this}changeFocus(t){return this._renderMethod=qt(this,t)?"render":"refreshFocus",this.views.forEach(t=>{t.updateFocus()}),this}update(){const t=zt(this.datepicker);return this._renderMethod=qt(this,t)?"render":"refresh",this.views.forEach(t=>{t.updateFocus(),t.updateSelection()}),this}render(t=!0){const e=t&&this._renderMethod||"render";delete this._renderMethod,this.currentView[e]()}}function Ft(t,e,n,r){const i=t.picker,o=i.currentView,a=o.step||1;let s,l,u=i.viewDate;switch(o.id){case 0:u=r?I(u,7*n):e.ctrlKey||e.metaKey?N(u,n):I(u,n),s=I,l=t=>o.disabled.includes(t);break;case 1:u=R(u,r?4*n:n),s=R,l=t=>{const e=new Date(t),{year:n,disabled:r}=o;return e.getFullYear()===n&&r.includes(e.getMonth())};break;default:u=N(u,n*(r?4:1)*a),s=N,l=t=>o.disabled.includes(P(t,a))}u=function t(e,n,r,i,o,a){if(C(e,o,a)){if(i(e)){return t(n(e,r),n,r,i,o,a)}return e}}(u,s,n<0?-a:a,l,o.minDate,o.maxDate),void 0!==u&&i.changeFocus(u).render()}function Bt(t,e){if("Tab"===e.key)return void Ct(t);const n=t.picker,{id:r,isMinView:i}=n.currentView;if(n.active)if(t.editMode)switch(e.key){case"Escape":n.hide();break;case"Enter":t.exitEditMode({update:!0,autohide:t.config.autohide});break;default:return}else switch(e.key){case"Escape":n.hide();break;case"ArrowLeft":if(e.ctrlKey||e.metaKey)At(t,-1);else{if(e.shiftKey)return void t.enterEditMode();Ft(t,e,-1,!1)}break;case"ArrowRight":if(e.ctrlKey||e.metaKey)At(t,1);else{if(e.shiftKey)return void t.enterEditMode();Ft(t,e,1,!1)}break;case"ArrowUp":if(e.ctrlKey||e.metaKey)St(t);else{if(e.shiftKey)return void t.enterEditMode();Ft(t,e,-1,!0)}break;case"ArrowDown":if(e.shiftKey&&!e.ctrlKey&&!e.metaKey)return void t.enterEditMode();Ft(t,e,1,!0);break;case"Enter":i?t.setDate(n.viewDate):n.changeView(r-1).render();break;case"Backspace":case"Delete":return void t.enterEditMode();default:return void(1!==e.key.length||e.ctrlKey||e.metaKey||t.enterEditMode())}else switch(e.key){case"ArrowDown":case"Escape":n.show();break;case"Enter":t.update();break;default:return}e.preventDefault(),e.stopPropagation()}function Ht(t){t.config.showOnFocus&&!t._showing&&t.show()}function Ut(t,e){const n=e.target;(t.picker.active||t.config.showOnClick)&&(n._active=n===document.activeElement,n._clicking=setTimeout(()=>{delete n._active,delete n._clicking},2e3))}function Vt(t,e){const n=e.target;n._clicking&&(clearTimeout(n._clicking),delete n._clicking,n._active&&t.enterEditMode(),delete n._active,t.config.showOnClick&&t.show())}function Yt(t,e){e.clipboardData.types.includes("text/plain")&&t.enterEditMode()}function Gt(t,e){const n=t.element;if(n!==document.activeElement)return;const r=t.picker.element;et(e,t=>t===n||t===r)||Ct(t)}function Kt(t,e){return t.map(t=>K(t,e.format,e.locale)).join(e.dateDelimiter)}function Zt(t,e,n=!1){const{config:r,dates:i,rangepicker:o}=t;if(0===e.length)return n?[]:void 0;const a=o&&t===o.datepickers[1];let s=e.reduce((t,e)=>{let n=G(e,r.format,r.locale);if(void 0===n)return t;if(r.pickLevel>0){const t=new Date(n);n=1===r.pickLevel?a?t.setMonth(t.getMonth()+1,0):t.setDate(1):a?t.setFullYear(t.getFullYear()+1,0,0):t.setMonth(0,1)}return!C(n,r.minDate,r.maxDate)||t.includes(n)||r.datesDisabled.includes(n)||r.daysOfWeekDisabled.includes(new Date(n).getDay())||t.push(n),t},[]);return 0!==s.length?(r.multidate&&!n&&(s=s.reduce((t,e)=>(i.includes(e)||t.push(e),t),i.filter(t=>!s.includes(t)))),r.maxNumberOfDates&&s.length>r.maxNumberOfDates?s.slice(-1*r.maxNumberOfDates):s):void 0}function Jt(t,e=3,n=!0){const{config:r,picker:i,inputField:o}=t;if(2&e){const t=i.active?r.pickLevel:r.startView;i.update().changeView(t).render(n)}1&e&&o&&(o.value=Kt(t.dates,r))}function Qt(t,e,n){let{clear:r,render:i,autohide:o}=n;void 0===i&&(i=!0),i?void 0===o&&(o=t.config.autohide):o=!1;const a=Zt(t,e,r);a&&(a.toString()!==t.dates.toString()?(t.dates=a,Jt(t,i?3:1),Dt(t,"changeDate")):Jt(t,1),o&&t.hide())}class Xt{constructor(t,e={},n){t.datepicker=this,this.element=t;const r=this.config=Object.assign({buttonClass:e.buttonClass&&String(e.buttonClass)||"button",container:document.body,defaultViewDate:T(),maxDate:void 0,minDate:void 0},gt(rt,this));this._options=e,Object.assign(r,gt(e,this));const i=this.inline="INPUT"!==t.tagName;let o,a;if(i)r.container=t,a=S(t.dataset.date,r.dateDelimiter),delete t.dataset.date;else{const n=e.container?document.querySelector(e.container):null;n&&(r.container=n),o=this.inputField=t,o.classList.add("datepicker-input"),a=S(o.value,r.dateDelimiter)}if(n){const t=n.inputs.indexOf(o),e=n.datepickers;if(t<0||t>1||!Array.isArray(e))throw Error("Invalid rangepicker object.");e[t]=this,Object.defineProperty(this,"rangepicker",{get:()=>n})}this.dates=[];const s=Zt(this,a);s&&s.length>0&&(this.dates=s),o&&(o.value=Kt(this.dates,r));const l=this.picker=new Wt(this);if(i)this.show();else{const t=Gt.bind(null,this);X(this,[[o,"keydown",Bt.bind(null,this)],[o,"focus",Ht.bind(null,this)],[o,"mousedown",Ut.bind(null,this)],[o,"click",Vt.bind(null,this)],[o,"paste",Yt.bind(null,this)],[document,"mousedown",t],[document,"touchstart",t],[window,"resize",l.place.bind(l)]])}}static formatDate(t,e,n){return K(t,e,n&&nt[n]||nt.en)}static parseDate(t,e,n){return G(t,e,n&&nt[n]||nt.en)}static get locales(){return nt}get active(){return!(!this.picker||!this.picker.active)}get pickerElement(){return this.picker?this.picker.element:void 0}setOptions(t){const e=this.picker,n=gt(t,this);Object.assign(this._options,t),Object.assign(this.config,n),e.setOptions(n),Jt(this,3)}show(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}destroy(){return this.hide(),tt(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}getDate(t){const e=t?e=>K(e,t,this.config.locale):t=>new Date(t);return this.config.multidate?this.dates.map(e):this.dates.length>0?e(this.dates[0]):void 0}setDate(...t){const e=[...t],n={},r=D(t);"object"!=typeof r||Array.isArray(r)||r instanceof Date||!r||Object.assign(n,e.pop());Qt(this,Array.isArray(e[0])?e[0]:e,n)}update(t){if(this.inline)return;const e={clear:!0,autohide:!(!t||!t.autohide)};Qt(this,S(this.inputField.value,this.config.dateDelimiter),e)}refresh(t,e=!1){let n;t&&"string"!=typeof t&&(e=t,t=void 0),n="picker"===t?2:"input"===t?1:3,Jt(this,n,!e)}enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit"))}exitEditMode(t){if(this.inline||!this.editMode)return;const e=Object.assign({update:!1},t);delete this.editMode,this.inputField.classList.remove("in-edit"),e.update&&this.update(e)}}$(document).on("cpt-load-ux",(function(){$(".field-input > .date-field").each((function(){var t="no"!==$(this).data("max")&&$(this).data("max"),e="no"!==$(this).data("min")&&$(this).data("min"),n=this.querySelector("input");new Xt(n,{autohide:!0,clearBtn:!0,maxDate:t,minDate:e,format:"dd/mm/yyyy"})}))}));n(3),n(4);var te=function(){$(".field-input > select").each((function(){if(!$(this).hasClass("select2-hidden-accessible")){var t="yes"==$(this).data("multiple"),e={placeholder:$(this).data("placeholder")?$(this).data("placeholder"):" ... ",allowClear:!0,multiple:t},n=!!$(this).data("taxonomy")&&$(this).data("taxonomy");n&&(e.ajax={url:cpt.ajax_url,data:function(t){return{action:"cpt_get_terms_array",nonce:cpt.ajax_nonce,search:t.term,taxonomy:n}},processResults:function(t){return{results:t.data}}});var r=!!$(this).data("post-type")&&$(this).data("post-type");r&&(e.ajax={url:cpt.ajax_url,data:function(t){return{action:"cpt_get_posts_array",nonce:cpt.ajax_nonce,search:t.term,post_type:r}},processResults:function(t){return{results:t.data}}}),$(this).select2(e)}}))};$(document).on("cpt-load-ux",(function(){te()})),$(window).on("resize",(function(){te()}));n(5);$(document).on("cpt-load-ux",(function(){$(".field-input > .group-field > .group-field-wrap").each((function(){var t=$(this);$(t).sortable({handle:".move",cursor:"grab",axis:"y",delay:150,dropOnEmpty:!1,items:"> .cpt-fields-wrap",opacity:.5,revert:!0})}))})),$(document).on("cpt-load-ux",(function(){$(".field-input > .time-field").each((function(){for(var t=function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"00:00",r=0;if(!n)return r;var i=!!n.split(":")&&n.split(":"),o=null!==(t=i[0])&&void 0!==t&&t,a=null!==(e=i[1])&&void 0!==e&&e,s=Number(o+a);return Number.isInteger(s)?s:r},e=t("no"!==$(this).data("min")&&$(this).data("min")),n=t("no"!==$(this).data("max")&&$(this).data("max")),r=this.querySelector("select"),i=$(this).find("select :selected").val(),o=0;o<=23;o++){o=o<10?"0"+o:o;for(var a=0;a<=59;a++){var s=o+":"+(a=a<10?"0"+a:a);(e>0&&t(s)<e||n>0&&t(s)>n)&&n>e||i==s||$(r).append($('<option value="'+s+'">'+s+"</option>"))}}}))})),$(document).on("cpt-load-ux",(function(){var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={tinymce:{wpautop:!1,plugins:"charmap colorpicker hr lists paste tabfocus textcolor fullscreen wordpress wpautoresize wpeditimage wpemoji wpgallery wplink wptextpattern",toolbar1:"formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,wp_more,spellchecker,fullscreen,wp_adv,listbuttons",toolbar2:"styleselect,strikethrough,hr,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help",textarea_rows:20,wp_autoresize_on:e,autoresize_min_height:50},quicktags:{buttons:"strong,em,link,block,del,ins,img,ul,ol,li,code,more,close"},mediaButtons:!0};wp.oldEditor.initialize(t,n)},e=function(t){wp.oldEditor.remove(t)},n=function(t){var e=$("#"+t).closest("form");if($(e).find("#submit").length>0){var n=tinyMCE.editors[t];e.on("submit",(function(t){n.save()})),n.on("blur",(function(t){n.save()})),$(document).ajaxComplete((function(t,e,r){r.data.match(/action=add-tag/)&&(n.setContent(""),n.save())}))}};$(".field-input > .wysiwyg-field textarea").each((function(){var r=$(this).closest(".meta-box-sortables"),i=$(this).attr("id"),o="yes"==$(this).attr("autoresize");!function(r,i){var o=!1,a=setInterval((function(){!$("#post-title-0")&&$("body").hasClass("block-editor-page")||(o=!0,e(r),t(r,i),n(r)),o&&clearInterval(a)}),500)}(i,o),r.on("sortstart",(function(){e(i)})),r.on("sortstop",(function(){t(i,o)}))}))}));n(8);$(document).ready((function(){$("body").on("click",".group-field button.add",(function(t){t.preventDefault();var e=$(this).closest(".group-field"),n=$(e).children(".group-field-wrap");n.append($('<div class="cpt-load-spinner"><div class="spinner"></div></div>'));var r=$(e).data("fields"),i=$(e).data("name"),o=$(n).children(".cpt-fields-wrap").length,a=[];a.push({name:"action",value:"cpt_get_fields"}),a.push({name:"nonce",value:cpt.ajax_nonce}),a.push({name:"fields",value:JSON.stringify(r)}),a.push({name:"parent",value:i+"["+o+"]"}),$.ajax({type:"post",dataType:"json",url:cpt.ajax_url,data:a,success:function(t){t.success?(n.find(".cpt-load-spinner").remove(),n.append($(t.data)),$(document).trigger("cpt-load-ux")):console.log("Error")}})})),$("body").on("click",".group-field > .group-field-wrap > .cpt-fields-wrap > .buttons > button.remove",(function(t){t.preventDefault();var e=$(this).closest(".cpt-fields-wrap"),n=$(e).children(".confirm-remove-wrap");$(n).addClass("active"),$(n).mouseleave((function(){$(this).removeClass("active")}))})),$("body").on("click",".group-field button.confirm-remove",(function(t){t.preventDefault();var e=$(this).closest(".cpt-fields-wrap");$(e).remove()}))}))}]);
     6var e,n,i;t&&t.requirejs||(t?n=t:t={},function(t){var r,s,o,a,l={},c={},d={},u={},p=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/;function g(e,t){return p.call(e,t)}function m(e,t){var n,i,r,s,o,a,l,c,u,p,h,g=t&&t.split("/"),m=d.map,v=m&&m["*"]||{};if(e){for(o=(e=e.split("/")).length-1,d.nodeIdCompat&&f.test(e[o])&&(e[o]=e[o].replace(f,"")),"."===e[0].charAt(0)&&g&&(e=g.slice(0,g.length-1).concat(e)),u=0;u<e.length;u++)if("."===(h=e[u]))e.splice(u,1),u-=1;else if(".."===h){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((g||v)&&m){for(u=(n=e.split("/")).length;u>0;u-=1){if(i=n.slice(0,u).join("/"),g)for(p=g.length;p>0;p-=1)if((r=m[g.slice(0,p).join("/")])&&(r=r[i])){s=r,a=u;break}if(s)break;!l&&v&&v[i]&&(l=v[i],c=u)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function v(e,t){return function(){var n=h.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),s.apply(void 0,n.concat([e,t]))}}function y(e){return function(t){l[e]=t}}function b(e){if(g(c,e)){var t=c[e];delete c[e],u[e]=!0,r.apply(void 0,t)}if(!g(l,e)&&!g(u,e))throw new Error("No "+e);return l[e]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function _(e){return e?w(e):[]}function k(e){return function(){return d&&d.config&&d.config[e]||{}}}o=function(e,t){var n,i,r=w(e),s=r[0],o=t[1];return e=r[1],s&&(n=b(s=m(s,o))),s?e=n&&n.normalize?n.normalize(e,(i=o,function(e){return m(e,i)})):m(e,o):(s=(r=w(e=m(e,o)))[0],e=r[1],s&&(n=b(s))),{f:s?s+"!"+e:e,n:e,pr:s,p:n}},a={require:function(e){return v(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:k(e)}}},r=function(e,t,n,i){var r,s,d,p,h,f,m,w=[],k=typeof n;if(f=_(i=i||e),"undefined"===k||"function"===k){for(t=!t.length&&n.length?["require","exports","module"]:t,h=0;h<t.length;h+=1)if("require"===(s=(p=o(t[h],f)).f))w[h]=a.require(e);else if("exports"===s)w[h]=a.exports(e),m=!0;else if("module"===s)r=w[h]=a.module(e);else if(g(l,s)||g(c,s)||g(u,s))w[h]=b(s);else{if(!p.p)throw new Error(e+" missing "+s);p.p.load(p.n,v(i,!0),y(s),{}),w[h]=l[s]}d=n?n.apply(l[e],w):void 0,e&&(r&&void 0!==r.exports&&r.exports!==l[e]?l[e]=r.exports:void 0===d&&m||(l[e]=d))}else e&&(l[e]=n)},e=n=s=function(e,t,n,i,l){if("string"==typeof e)return a[e]?a[e](t):b(o(e,_(t)).f);if(!e.splice){if((d=e).deps&&s(d.deps,d.callback),!t)return;t.splice?(e=t,t=n,n=null):e=void 0}return t=t||function(){},"function"==typeof n&&(n=i,i=l),i?r(void 0,e,t,n):setTimeout((function(){r(void 0,e,t,n)}),4),s},s.config=function(e){return s(e)},e._defined=l,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),g(l,e)||g(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i)}(),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){var t={};function n(e){var t=e.prototype,n=[];for(var i in t)"function"==typeof t[i]&&"constructor"!==i&&n.push(i);return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),r=n(e);function s(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,r=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),r=t.prototype.constructor),r.apply(this,arguments)}t.displayName=e.displayName,s.prototype=new function(){this.constructor=s};for(var o=0;o<r.length;o++){var a=r[o];s.prototype[a]=e.prototype[a]}for(var l=function(e){var n=function(){};e in s.prototype&&(n=s.prototype[e]);var i=t.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,n),i.apply(this,arguments)}},c=0;c<i.length;c++){var d=i[c];s.prototype[d]=l(d)}return s};var i=function(){this.listeners={}};i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},t.Observable=i,t.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var s=n[r];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),r==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},t.hasScroll=function(t,n){var i=e(n),r=n.style.overflowX,s=n.style.overflowY;return(r!==s||"hidden"!==s&&"visible"!==s)&&("scroll"===r||"scroll"===s||i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth)},t.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]}))},t.__cache={};var r=0;return t.GetUniqueElementId=function(e){var n=e.getAttribute("data-select2-id");return null!=n||(n=e.id?"select2-data-"+e.id:"select2-data-"+(++r).toString()+"-"+t.generateChars(4),e.setAttribute("data-select2-id",n)),n},t.StoreData=function(e,n,i){var r=t.GetUniqueElementId(e);t.__cache[r]||(t.__cache[r]={}),t.__cache[r][n]=i},t.GetData=function(n,i){var r=t.GetUniqueElementId(n);return i?t.__cache[r]&&null!=t.__cache[r][i]?t.__cache[r][i]:e(n).data(i):t.__cache[r]},t.RemoveData=function(e){var n=t.GetUniqueElementId(e);null!=t.__cache[n]&&delete t.__cache[n],e.removeAttribute("data-select2-id")},t.copyNonInternalCssClasses=function(e,t){var n=e.getAttribute("class").trim().split(/\s+/);n=n.filter((function(e){return 0===e.indexOf("select2-")}));var i=t.getAttribute("class").trim().split(/\s+/);i=i.filter((function(e){return 0!==e.indexOf("select2-")}));var r=n.concat(i);e.setAttribute("class",r.join(" "))},t})),t.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current((function(i){var r=i.map((function(e){return e.id.toString()}));n.$results.find(".select2-results__option--selectable").each((function(){var n=e(this),i=t.GetData(this,"data"),s=""+i.id;null!=i.element&&i.element.selected||null==i.element&&r.indexOf(s)>-1?(this.classList.add("select2-results__option--selected"),n.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),n.attr("aria-selected","false"))}))}))},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var i=document.createElement("li");i.classList.add("select2-results__option"),i.classList.add("select2-results__option--selectable");var r={role:"option"},s=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var o in(null!=n.element&&s.call(n.element,":disabled")||null==n.element&&n.disabled)&&(r["aria-disabled"]="true",i.classList.remove("select2-results__option--selectable"),i.classList.add("select2-results__option--disabled")),null==n.id&&i.classList.remove("select2-results__option--selectable"),null!=n._resultId&&(i.id=n._resultId),n.title&&(i.title=n.title),n.children&&(r.role="group",r["aria-label"]=n.text,i.classList.remove("select2-results__option--selectable"),i.classList.add("select2-results__option--group")),r){var a=r[o];i.setAttribute(o,a)}if(n.children){var l=e(i),c=document.createElement("strong");c.className="select2-results__group",this.template(n,c);for(var d=[],u=0;u<n.children.length;u++){var p=n.children[u],h=this.option(p);d.push(h)}var f=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});f.append(d),l.append(c),l.append(f)}else this.template(n,i);return t.StoreData(i,"data",n),i},n.prototype.bind=function(n,i){var r=this,s=n.id+"-results";this.$results.attr("id",s),n.on("results:all",(function(e){r.clear(),r.append(e.data),n.isOpen()&&(r.setClasses(),r.highlightFirstItem())})),n.on("results:append",(function(e){r.append(e.data),n.isOpen()&&r.setClasses()})),n.on("query",(function(e){r.hideMessages(),r.showLoading(e)})),n.on("select",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("unselect",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("open",(function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()})),n.on("close",(function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")})),n.on("results:toggle",(function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),n.on("results:select",(function(){var e=r.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");e.hasClass("select2-results__option--selected")?r.trigger("close",{}):r.trigger("select",{data:n})}})),n.on("results:previous",(function(){var e=r.getHighlightedResults(),t=r.$results.find(".select2-results__option--selectable"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var s=t.eq(i);s.trigger("mouseenter");var o=r.$results.offset().top,a=s.offset().top,l=r.$results.scrollTop()+(a-o);0===i?r.$results.scrollTop(0):a-o<0&&r.$results.scrollTop(l)}})),n.on("results:next",(function(){var e=r.getHighlightedResults(),t=r.$results.find(".select2-results__option--selectable"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var s=r.$results.offset().top+r.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),a=r.$results.scrollTop()+o-s;0===n?r.$results.scrollTop(0):o>s&&r.$results.scrollTop(a)}})),n.on("results:focus",(function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")})),n.on("results:message",(function(e){r.displayMessage(e)})),e.fn.mousewheel&&this.$results.on("mousewheel",(function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-t+e.deltaY,i=e.deltaY>0&&t-e.deltaY<=0,s=e.deltaY<0&&n<=r.$results.height();i?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):s&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option--selectable",(function(n){var i=e(this),s=t.GetData(this,"data");i.hasClass("select2-results__option--selected")?r.options.get("multiple")?r.trigger("unselect",{originalEvent:n,data:s}):r.trigger("close",{}):r.trigger("select",{originalEvent:n,data:s})})),this.$results.on("mouseenter",".select2-results__option--selectable",(function(n){var i=t.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),r.trigger("results:focus",{data:i,element:e(this)})}))},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find(".select2-results__option--selectable").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),s=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),s=i(t,n);null==s?n.style.display="none":"string"==typeof s?n.innerHTML=r(s):e(n).append(s)},n})),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,n){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 n=e('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n,n},i.prototype.bind=function(e,t){var i=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",(function(e){i.trigger("focus",e)})),this.$selection.on("blur",(function(e){i._handleBlur(e)})),this.$selection.on("keydown",(function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){i.update(e.data)})),e.on("open",(function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)})),e.on("close",(function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.trigger("focus"),i._detachCloseHandler(e)})),e.on("enable",(function(){i.$selection.attr("tabindex",i._tabindex),i.$selection.attr("aria-disabled","false")})),e.on("disable",(function(){i.$selection.attr("tabindex","-1"),i.$selection.attr("aria-disabled","true")}))},i.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,(function(n){var i=e(n.target).closest(".select2");e(".select2.select2-container--open").each((function(){this!=i[0]&&t.GetData(this,"element").select2("close")}))}))},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i})),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.attr("aria-controls",i),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("blur",(function(e){})),e.on("focus",(function(t){e.isOpen()||n.$selection.trigger("focus")}))},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r})),t.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,r){var s=this;i.__super__.bind.apply(this,arguments);var o=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",o),this.$selection.on("click",(function(e){s.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){if(!s.isDisabled()){var i=e(this).parent(),r=n.GetData(i[0],"data");s.trigger("unselect",{originalEvent:t,data:r})}})),this.$selection.on("keydown",".select2-selection__choice__remove",(function(e){s.isDisabled()||e.stopPropagation()}))},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",r=0;r<e.length;r++){var s=e[r],o=this.selectionContainer(),a=this.display(s,o),l=i+n.generateChars(4)+"-";s.id?l+=s.id:l+=n.generateChars(4),o.find(".select2-selection__choice__display").append(a).attr("id",l);var c=s.title||s.text;c&&o.attr("title",c);var d=this.options.get("translations").get("removeItem"),u=o.find(".select2-selection__choice__remove");u.attr("title",d()),u.attr("aria-label",d()),u.attr("aria-describedby",l),n.StoreData(o[0],"data",s),t.push(o)}this.$selection.find(".select2-selection__rendered").append(t)}},i})),t.define("select2/selection/placeholder",[],(function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");var i=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",i),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},e})),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function(e,t,n){function i(){}return i.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),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){i._handleClear(e)})),t.on("keypress",(function(e){i._handleKeyboardClear(e,t)}))},i.prototype._handleClear=function(e,t){if(!this.isDisabled()){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){t.stopPropagation();var r=n.GetData(i[0],"data"),s=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger("clear",o),o.prevented)this.$element.val(s);else{for(var a=0;a<r.length;a++)if(o={data:r[a]},this.trigger("unselect",o),o.prevented)return void this.$element.val(s);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},i.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},i.prototype.update=function(t,i){if(t.call(this,i),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),!(this.$selection.find(".select2-selection__placeholder").length>0||0===i.length)){var r=this.$selection.find(".select2-selection__rendered").attr("id"),s=this.options.get("translations").get("removeAllItems"),o=e('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>');o.attr("title",s()),o.attr("aria-label",s()),o.attr("aria-describedby",r),n.StoreData(o[0],"data",i),this.$selection.prepend(o),this.$selection[0].classList.add("select2-selection--clearable")}},i})),t.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=this.options.get("translations").get("search"),i=e('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=i,this.$search=i.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n());var r=t.call(this);return this._transferTabIndex(),r.append(this.$searchContainer),r},i.prototype.bind=function(e,i,r){var s=this,o=i.id+"-results",a=i.id+"-container";e.call(this,i,r),s.$search.attr("aria-describedby",a),i.on("open",(function(){s.$search.attr("aria-controls",o),s.$search.trigger("focus")})),i.on("close",(function(){s.$search.val(""),s.resizeSearch(),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")})),i.on("enable",(function(){s.$search.prop("disabled",!1),s._transferTabIndex()})),i.on("disable",(function(){s.$search.prop("disabled",!0)})),i.on("focus",(function(e){s.$search.trigger("focus")})),i.on("results:focus",(function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(e){s.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){s._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){if(e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===s.$search.val()){var i=s.$selection.find(".select2-selection__choice").last();if(i.length>0){var r=t.GetData(i[0],"data");s.searchRemoveChoice(r),e.preventDefault()}}})),this.$selection.on("click",".select2-search--inline",(function(e){s.$search.val()&&e.stopPropagation()}));var l=document.documentMode,c=l&&l<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(e){c?s.$selection.off("input.search input.searchcheck"):s.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(e){if(c&&"input"===e.type)s.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&s.handleSearch(e)}}))},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},i})),t.define("select2/selection/selectionCss",["../utils"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("selectionCssClass")||"";return-1!==i.indexOf(":all:")&&(i=i.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(i),n},t})),t.define("select2/selection/eventRelay",["jquery"],(function(e){function t(){}return t.prototype.bind=function(t,n,i){var r=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,i),n.on("*",(function(t,n){if(-1!==s.indexOf(t)){n=n||{};var i=e.Event("select2:"+t,{params:n});r.$element.trigger(i),-1!==o.indexOf(t)&&(n.prevented=i.isDefaultPrevented())}}))},t})),t.define("select2/translation",["jquery","require"],(function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n})),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","Œ":"OE","Ƣ":"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","œ":"oe","ƣ":"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,n){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,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t})),t.define("select2/data/select",["./base","../utils","jquery"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),(function(e){return t.item(n(e))})))},i.prototype.select=function(e){var t=this;if(e.selected=!0,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current((function(n){var i=[];(e=[e]).push.apply(e,n);for(var r=0;r<e.length;r++){var s=e[r].id;-1===i.indexOf(s)&&i.push(s)}t.$element.val(i),t.$element.trigger("input").trigger("change")}));else{var n=e.id;this.$element.val(n),this.$element.trigger("input").trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current((function(n){for(var i=[],r=0;r<n.length;r++){var s=n[r].id;s!==e.id&&-1===i.indexOf(s)&&i.push(s)}t.$element.val(i),t.$element.trigger("input").trigger("change")}))}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",(function(e){n.select(e.data)})),e.on("unselect",(function(e){n.unselect(e.data)}))},i.prototype.destroy=function(){this.$element.find("*").each((function(){t.RemoveData(this)}))},i.prototype.query=function(e,t){var i=[],r=this;this.$element.children().each((function(){if("option"===this.tagName.toLowerCase()||"optgroup"===this.tagName.toLowerCase()){var t=n(this),s=r.item(t),o=r.matches(e,s);null!==o&&i.push(o)}})),t({results:i})},i.prototype.addOptions=function(e){this.$element.append(e)},i.prototype.option=function(e){var i;e.children?(i=document.createElement("optgroup")).label=e.text:void 0!==(i=document.createElement("option")).textContent?i.textContent=e.text:i.innerText=e.text,void 0!==e.id&&(i.value=e.id),e.disabled&&(i.disabled=!0),e.selected&&(i.selected=!0),e.title&&(i.title=e.title);var r=this._normalizeItem(e);return r.element=i,t.StoreData(i,"data",r),n(i)},i.prototype.item=function(e){var i={};if(null!=(i=t.GetData(e[0],"data")))return i;var r=e[0];if("option"===r.tagName.toLowerCase())i={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===r.tagName.toLowerCase()){i={text:e.prop("label"),children:[],title:e.prop("title")};for(var s=e.children("option"),o=[],a=0;a<s.length;a++){var l=n(s[a]),c=this.item(l);o.push(c)}i.children=o}return(i=this._normalizeItem(i)).element=e[0],t.StoreData(e[0],"data",i),i},i.prototype._normalizeItem=function(e){return e!==Object(e)&&(e={id:e,text:e}),null!=(e=n.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)),n.extend({},{selected:!1,disabled:!1},e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i})),t.define("select2/data/array",["./select","../utils","jquery"],(function(e,t,n){function i(e,t){this._dataToConvert=t.get("data")||[],i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(e){var t=this.$element.find("option").filter((function(t,n){return n.value==e.id.toString()}));0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){var t=this,i=this.$element.find("option"),r=i.map((function(){return t.item(n(this)).id})).get(),s=[];function o(e){return function(){return n(this).val()==e.id}}for(var a=0;a<e.length;a++){var l=this._normalizeItem(e[a]);if(r.indexOf(l.id)>=0){var c=i.filter(o(l)),d=this.item(c),u=n.extend(!0,{},l,d),p=this.option(u);c.replaceWith(p)}else{var h=this.option(l);if(l.children){var f=this.convertToOptions(l.children);h.append(f)}s.push(h)}}return s},i})),t.define("select2/data/ajax",["./array","../utils","jquery"],(function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);return r.then(t),r.fail(i),r}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){var i=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);function s(){var n=r.transport(r,(function(n){var r=i.processResults(n,e);i.options.get("debug")&&window.console&&console.error&&(r&&r.results&&Array.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r)}),(function(){(!("status"in n)||0!==n.status&&"0"!==n.status)&&i.trigger("results:message",{message:"errorLoading"})}));i._request=n}"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(s,this.ajaxOptions.delay)):s()},i})),t.define("select2/data/tags",["jquery"],(function(e){function t(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var s=n.get("insertTag");if(void 0!==s&&(this.insertTag=s),e.call(this,t,n),Array.isArray(i))for(var o=0;o<i.length;o++){var a=i[o],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return t.prototype.query=function(e,t,n){var i=this;this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,(function e(r,s){for(var o=r.results,a=0;a<o.length;a++){var l=o[a],c=null!=l.children&&!e({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!s&&(r.data=o,void n(r))}if(s)return!0;var d=i.createTag(t);if(null!=d){var u=i.option(d);u.attr("data-select2-tag","true"),i.addOptions([u]),i.insertTag(o,d)}r.results=o,n(r)})):e.call(this,t,n)},t.prototype.createTag=function(e,t){if(null==t.term)return null;var n=t.term.trim();return""===n?null:{id:n,text:n}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){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,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){var r=this;n.term=n.term||"";var s=this.tokenizer(n,this.options,(function(t){var n=r._normalizeItem(t);if(!r.$element.find("option").filter((function(){return e(this).val()===n.id})).length){var i=r.option(n);i.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([i])}!function(e){r.trigger("select",{data:e})}(n)}));s.term!==n.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.trigger("focus")),n.term=s.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,r){for(var s=i.get("tokenSeparators")||[],o=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<o.length;){var c=o[a];if(-1!==s.indexOf(c)){var d=o.substr(0,a),u=l(e.extend({},n,{term:d}));null!=u?(r(u),o=o.substr(a+1)||"",a=0):a++}else a++}return{term:o}},t})),t.define("select2/data/minimumInputLength",[],(function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumInputLength",[],(function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(){i._checkIfMaximumSelected()}))},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected((function(){e.call(i,t,n)}))},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current((function(e){var i=null!=e?e.length:0;n.maximumSelectionLength>0&&i>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()}))},e})),t.define("select2/dropdown",["jquery","./utils"],(function(e,t){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-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),t.define("select2/dropdown/search",["jquery"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("translations").get("search"),r=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=r,this.$search=r.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",i()),n.prepend(r),n},t.prototype.bind=function(t,n,i){var r=this,s=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",(function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){r.handleSearch(e)})),n.on("open",(function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",s),r.$search.trigger("focus"),window.setTimeout((function(){r.$search.trigger("focus")}),0)})),n.on("close",(function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")})),n.on("focus",(function(){n.isOpen()||r.$search.trigger("focus")})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer[0].classList.remove("select2-search--hide"):r.$searchContainer[0].classList.add("select2-search--hide"))})),n.on("results:focus",(function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}))},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t})),t.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}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 n=t.slice(0),i=t.length-1;i>=0;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e})),t.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),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),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",(function(e){i.lastParams=e,i.loading=!0})),t.on("query:append",(function(e){i.lastParams=e,i.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&t&&this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.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="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),t.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)})),t.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:message",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("select",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("unselect",(function(){n._positionDropdown(),n._resizeDropdown()})),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var r=this,s="scroll.select2."+i.id,o="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each((function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),l.on(s,(function(n){var i=t.GetData(this,"select2-scroll-position");e(this).scrollTop(i.y)})),e(window).on(s+" "+o+" "+a,(function(e){r._positionDropdown(),r._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,s="resize.select2."+i.id,o="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+s+" "+o)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown[0].classList.contains("select2-dropdown--above"),i=this.$dropdown[0].classList.contains("select2-dropdown--below"),r=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=s.top,o.bottom=s.top+o.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:o.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f={top:0,left:0};(e.contains(document.body,h[0])||h[0].isConnected)&&(f=h.offset()),p.top-=f.top,p.left-=f.left,n||i||(r="below"),u||!d||n?!d&&u&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(p.top=o.top-f.top-a),null!=r&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+r),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+r)),this.$dropdownContainer.css(p)},n.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)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),t.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e})),t.define("select2/dropdown/selectOnClose",["../utils"],(function(e){function t(){}return t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",(function(e){i._handleSelectOnClose(e)}))},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalSelect2Event){var i=n.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var s=e.GetData(r[0],"data");null!=s.element&&s.element.selected||null==s.element&&s.selected||this.trigger("select",{data:s})}},t})),t.define("select2/dropdown/closeOnSelect",[],(function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(e){i._selectTriggered(e)})),t.on("unselect",(function(e){i._selectTriggered(e)}))},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e})),t.define("select2/dropdown/dropdownCss",["../utils"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("dropdownCssClass")||"";return-1!==i.indexOf(":all:")&&(i=i.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(i),n},t})),t.define("select2/dropdown/tagsSearchHighlight",["../utils"],(function(e){function t(){}return t.prototype.highlightFirstItem=function(t){var n=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(n.length>0){var i=n.first(),r=e.GetData(i[0],"data").element;if(r&&r.getAttribute&&"true"===r.getAttribute("data-select2-tag"))return void i.trigger("mouseenter")}t.call(this)},t})),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,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},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…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}})),t.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./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","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],(function(e,t,n,i,r,s,o,a,l,c,d,u,p,h,f,g,m,v,y,b,w,_,k,x,D,$,S,E,C,A,L){function O(){this.reset()}return O.prototype.apply=function(d){if(null==(d=e.extend(!0,{},this.defaults,d)).dataAdapter&&(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=h:d.dataAdapter=p,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,b)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,m))),null==d.resultsAdapter&&(d.resultsAdapter=t,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,x)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,k)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,S)),d.tags&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,A))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=w;else{var u=c.Decorate(w,_);d.dropdownAdapter=u}0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,$)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,E)),null!=d.dropdownCssClass&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,C)),d.dropdownAdapter=c.Decorate(d.dropdownAdapter,D)}null==d.selectionAdapter&&(d.multiple?d.selectionAdapter=i:d.selectionAdapter=n,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,o)),null!=d.selectionCssClass&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),d.selectionAdapter=c.Decorate(d.selectionAdapter,l)),d.language=this._resolveLanguage(d.language),d.language.push("en");for(var L=[],O=0;O<d.language.length;O++){var j=d.language[O];-1===L.indexOf(j)&&L.push(j)}return d.language=L,d.translations=this._processTranslations(d.language,d.debug),d},O.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,(function(e){return u[e]||e}))}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:{},matcher:function n(i,r){if(null==i.term||""===i.term.trim())return r;if(r.children&&r.children.length>0){for(var s=e.extend(!0,{},r),o=r.children.length-1;o>=0;o--)null==n(i,r.children[o])&&s.children.splice(o,1);return s.children.length>0?s:n(i,s)}var a=t(r.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?r:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},O.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,r=t.prop("lang"),s=t.closest("[lang]").prop("lang"),o=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(s));return e.language=o,e},O.prototype._resolveLanguage=function(t){if(!t)return[];if(e.isEmptyObject(t))return[];if(e.isPlainObject(t))return[t];var n;n=Array.isArray(t)?t:[t];for(var i=[],r=0;r<n.length;r++)if(i.push(n[r]),"string"==typeof n[r]&&n[r].indexOf("-")>0){var s=n[r].split("-")[0];i.push(s)}return i},O.prototype._processTranslations=function(t,n){for(var i=new d,r=0;r<t.length;r++){var s=new d,o=t[r];if("string"==typeof o)try{s=d.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,s=d.loadPath(o)}catch(e){n&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else s=e.isPlainObject(o)?new d(o):o;i.extend(s)}return i},O.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var r=c._convertData(i);e.extend(!0,this.defaults,r)},new O})),t.define("select2/options",["jquery","./defaults","./utils"],(function(e,t,n){function i(e,n){this.options=e,null!=n&&this.fromElement(n),null!=n&&(this.options=t.applyFromElement(this.options,n)),this.options=t.apply(this.options)}return i.prototype.fromElement=function(t){var i=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.autocomplete&&t.prop("autocomplete")&&(this.options.autocomplete=t.prop("autocomplete")),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),n.GetData(t[0],"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.'),n.StoreData(t[0],"data",n.GetData(t[0],"select2Tags")),n.StoreData(t[0],"tags",!0)),n.GetData(t[0],"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."),t.attr("ajax--url",n.GetData(t[0],"ajaxUrl")),n.StoreData(t[0],"ajax-Url",n.GetData(t[0],"ajaxUrl")));var r={};function s(e,t){return t.toUpperCase()}for(var o=0;o<t[0].attributes.length;o++){var a=t[0].attributes[o].name;if("data-"==a.substr(0,"data-".length)){var l=a.substring("data-".length),c=n.GetData(t[0],l);r[l.replace(/-([a-z])/g,s)]=c}}e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset&&(r=e.extend(!0,{},t[0].dataset,r));var d=e.extend(!0,{},n.GetData(t[0]),r);for(var u in d=n._convertData(d))i.indexOf(u)>-1||(e.isPlainObject(this.options[u])?e.extend(this.options[u],d[u]):this.options[u]=d[u]);return this},i.prototype.get=function(e){return this.options[e]},i.prototype.set=function(e,t){this.options[e]=t},i})),t.define("select2/core",["jquery","./options","./utils","./keys"],(function(e,t,n,i){var r=function(e,i){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),i=i||{},this.options=new t(i,e),r.__super__.constructor.call(this);var s=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",s),e.attr("tabindex","-1");var o=this.options.get("dataAdapter");this.dataAdapter=new o(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var d=this.options.get("resultsAdapter");this.results=new d(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(e){u.trigger("selection:update",{data:e})})),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;for(var o=s.split(";"),a=0,l=o.length;a<l;a+=1){var c=o[a].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return"computedstyle"==t?window.getComputedStyle(e[0]).width:t},r.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)},r.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",(function(){e.dataAdapter.current((function(t){e.trigger("selection:update",{data:t})}))})),this.$element.on("focus.select2",(function(t){e.trigger("focus",t)})),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this._observer=new window.MutationObserver((function(t){e._syncA(),e._syncS(t)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerSelectionEvents=function(){var e=this,t=["toggle","focus"];this.selection.on("toggle",(function(){e.toggleDropdown()})),this.selection.on("focus",(function(t){e.focus(t)})),this.selection.on("*",(function(n,i){-1===t.indexOf(n)&&e.trigger(n,i)}))},r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerEvents=function(){var e=this;this.on("open",(function(){e.$container[0].classList.add("select2-container--open")})),this.on("close",(function(){e.$container[0].classList.remove("select2-container--open")})),this.on("enable",(function(){e.$container[0].classList.remove("select2-container--disabled")})),this.on("disable",(function(){e.$container[0].classList.add("select2-container--disabled")})),this.on("blur",(function(){e.$container[0].classList.remove("select2-container--focus")})),this.on("query",(function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,(function(n){e.trigger("results:all",{data:n,query:t})}))})),this.on("query:append",(function(t){this.dataAdapter.query(t,(function(n){e.trigger("results:append",{data:n,query:t})}))})),this.on("keypress",(function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.UP&&t.altKey?(e.close(t),t.preventDefault()):n===i.ENTER||n===i.TAB?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())}))},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&e.addedNodes.length>0){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&e.removedNodes.length>0)return!0;if(Array.isArray(e))return e.some((function(e){return t._isChangeMutation(e)}))}return!1},r.prototype._syncSubtree=function(e){var t=this._isChangeMutation(e),n=this;t&&this.dataAdapter.current((function(e){n.trigger("selection:update",{data:e})}))},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var s=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,s,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},r.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},r.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},r.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},r.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},r.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)},r.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},r.prototype.val=function(e){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==e||0===e.length)return this.$element.val();var t=e[0];Array.isArray(t)&&(t=t.map((function(e){return e.toString()}))),this.$element.val(t).trigger("input").trigger("change")},r.prototype.destroy=function(){n.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),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},r.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[0].classList.add("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},r})),t.define("jquery-mousewheel",["jquery"],(function(e){return e})),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function(e,t,n,i,r){if(null==e.fn.select2){var s=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each((function(){var i=e.extend(!0,{},t);new n(e(this),i)})),this;if("string"==typeof t){var i,o=Array.prototype.slice.call(arguments,1);return this.each((function(){var e=r.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=e[t].apply(e,o)})),s.indexOf(t)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n})),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n})?i.apply(t,r):i)||(e.exports=s)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n.p,n.p,n(3);var i=n(0),r=n.n(i);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function d(e,t,n,i){var r=t&&t.prototype instanceof h?t:h,s=Object.create(r.prototype),o=new $(i||[]);return s._invoke=function(e,t,n){var i="suspendedStart";return function(r,s){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw s;return E()}for(n.method=r,n.arg=s;;){var o=n.delegate;if(o){var a=k(o,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=u(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}(e,n,o),s}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var p={};function h(){}function f(){}function g(){}var m={};c(m,r,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==t&&n.call(y,r)&&(m=y);var b=g.prototype=h.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;this._invoke=function(r,o){function a(){return new t((function(i,a){!function i(r,o,a,l){var c=u(e[r],e,o);if("throw"!==c.type){var d=c.arg,p=d.value;return p&&"object"==s(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):t.resolve(p).then((function(e){d.value=e,a(d)}),(function(e){return i("throw",e,a,l)}))}l(c.arg)}(r,o,i,a)}))}return i=i?i.then(a,a):a()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function S(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return s.next=s}}return{next:E}}function E(){return{value:void 0,done:!0}}return f.prototype=g,c(b,"constructor",g),c(g,"constructor",f),f.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},w(_.prototype),c(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,i,r,s){void 0===s&&(s=Promise);var o=new _(d(t,n,i,r),s);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},w(b),c(b,l,"Generator"),c(b,r,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=S,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return o.type="throw",o.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],o=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var a=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(a&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(a){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var s=r;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var o=s?s.completion:{};return o.type=e,o.arg=t,s?(this.method="next",this.next=s.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;D(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var s=e.apply(t,n);function o(e){a(s,i,r,o,l,"next",e)}function l(e){a(s,i,r,o,l,"throw",e)}o(void 0)}))}}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"appendFieldEvents",value:function(e,t){this.fieldsEvents=wp.hooks.applyFilters(cpt.js_fields_events_hook,[]);var n=this.fieldsEvents[e];n&&r.a.each(n,(function(e,n){r()(t).on(e,(function(e){n(t,e)}))}))}},{key:"sanitizeTitle",value:function(e){e=(e=e.replace(/^\s+|\s+$/g,"")).toLowerCase();for(var t="àáäâèéëêìíïîòóöôùúüûñçěščřžýúůďťň·/_,:;",n=0,i=t.length;n<i;n++)e=e.replace(new RegExp(t.charAt(n),"g"),"aaaaeeeeiiiioooouuuuncescrzyuudtn------".charAt(n));return e=e.replace(".","-").replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/\//g,"")}},{key:"autoFillKey",value:function(e,t){var n=this;r()(t).add(e).on("focusout",(function(){var i=r()(e).val(),s=r()(t).val();!i.length&&s.length&&r()(e).val(n.sanitizeTitle(s))}))}},{key:"copyToClipboard",value:function(e){var t=navigator.clipboard.writeText(r()(e).val()).then((function(){return!0}),(function(){return!1}));return l(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))}}])&&c(t.prototype,n),i&&c(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();window.cptUtils=new d,wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.checkbox={load:function(e,t){var n=r()(e).find('input[type="checkbox"][required]');r()(n).on("click",(function(t){r()(n).prop("required",!r()(e).find('input[type="checkbox"]:checked').length)}))}},e}));
     7/*!
     8 * vanilla-picker v2.12.1
     9 * https://vanilla-picker.js.org
     10 *
     11 * Copyright 2017-2021 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
     12 * Released under the ISC license.
     13 */
     14var u=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),h=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var n=this;n.length<e;)n=t+n;return n};var f={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString();return n||"0"}var m=function(){function e(t,n,i,r){u(this,e);var s=this;if(void 0===t);else if(Array.isArray(t))this.rgba=t;else if(void 0===i){var o=t&&""+t;o&&function(t){if(t.startsWith("hsl")){var n=t.match(/([\-\d\.e]+)/g).map(Number),i=h(n,4),r=i[0],o=i[1],a=i[2],l=i[3];void 0===l&&(l=1),r/=360,o/=100,a/=100,s.hsla=[r,o,a,l]}else if(t.startsWith("rgb")){var c=t.match(/([\-\d\.e]+)/g).map(Number),d=h(c,4),u=d[0],p=d[1],f=d[2],g=d[3];void 0===g&&(g=1),s.rgba=[u,p,f,g]}else t.startsWith("#")?s.rgba=e.hexToRgb(t):s.rgba=e.nameToRgb(t)||e.hexToRgb(t)}(o.toLowerCase())}else this.rgba=[t,n,i,void 0===r?1:r]}return p(e,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map((function(e,t){return g(e,3===t?3:0)}));return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var t=[360,100,100,1],n=["","%","%",""],i=(e?this.hsla:this.hsla.slice(0,3)).map((function(e,i){return g(e*t[i],3===i?3:1)+n[i]}));return e?"hsla("+i+")":"hsl("+i+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=e.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=e.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)})).map((function(e){return e.padStart(2,"0")})).join("")},set:function(t){this.rgba=e.hexToRgb(t)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var n=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(e){return parseInt(e,16)}));return n[3]=n[3]/255,n}},{key:"nameToRgb",value:function(t){var n=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=f[n];return void 0===i?i:e.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=h(e,4),n=t[0],i=t[1],r=t[2],s=t[3];n/=255,i/=255,r/=255;var o=Math.max(n,i,r),a=Math.min(n,i,r),l=void 0,c=void 0,d=(o+a)/2;if(o===a)l=c=0;else{var u=o-a;switch(c=d>.5?u/(2-o-a):u/(o+a),o){case n:l=(i-r)/u+(i<r?6:0);break;case i:l=(r-n)/u+2;break;case r:l=(n-i)/u+4}l/=6}return[l,c,d,s]}},{key:"hslToRgb",value:function(e){var t=h(e,4),n=t[0],i=t[1],r=t[2],s=t[3],o=void 0,a=void 0,l=void 0;if(0===i)o=a=l=r;else{var c=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},d=r<.5?r*(1+i):r+i-r*i,u=2*r-d;o=c(u,d,n+1/3),a=c(u,d,n),l=c(u,d,n-1/3)}var p=[255*o,255*a,255*l].map(Math.round);return p[3]=s,p}}]),e}(),v=function(){function e(){u(this,e),this._events=[]}return p(e,[{key:"add",value:function(e,t,n){e.addEventListener(t,n,!1),this._events.push({target:e,type:t,handler:n})}},{key:"remove",value:function(t,n,i){this._events=this._events.filter((function(r){var s=!0;return t&&t!==r.target&&(s=!1),n&&n!==r.type&&(s=!1),i&&i!==r.handler&&(s=!1),s&&e._doRemove(r.target,r.type,r.handler),!s}))}},{key:"destroy",value:function(){this._events.forEach((function(t){return e._doRemove(t.target,t.type,t.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(e,t,n){e.removeEventListener(t,n,!1)}}]),e}();function y(e,t,n){var i=!1;function r(e,t,n){return Math.max(t,Math.min(e,n))}function s(e,s,o){if(o&&(i=!0),i){e.preventDefault();var a=t.getBoundingClientRect(),l=a.width,c=a.height,d=s.clientX,u=s.clientY,p=r(d-a.left,0,l),h=r(u-a.top,0,c);n(p/l,h/c)}}function o(e,t){1===(void 0===e.buttons?e.which:e.buttons)?s(e,e,t):i=!1}function a(e,t){1===e.touches.length?s(e,e.touches[0],t):i=!1}e.add(t,"mousedown",(function(e){o(e,!0)})),e.add(t,"touchstart",(function(e){a(e,!0)})),e.add(window,"mousemove",o),e.add(t,"touchmove",a),e.add(window,"mouseup",(function(e){i=!1})),e.add(t,"touchend",(function(e){i=!1})),e.add(t,"touchcancel",(function(e){i=!1}))}function b(e,t){return(t||document).querySelector(e)}function w(e){e.preventDefault(),e.stopPropagation()}function _(e,t,n,i,r){e.add(t,"keydown",(function(e){n.indexOf(e.key)>=0&&(r&&w(e),i(e))}))}var k=function(){function e(t){u(this,e),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new v,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return p(e,[{key:"setOptions",value:function(e){var t=this;if(e){var n=this.settings;if(e instanceof HTMLElement)n.parent=e;else{n.parent&&e.parent&&n.parent!==e.parent&&(this._events.remove(n.parent),this._popupInited=!1),function(e,t,n){for(var i in e)n&&n.indexOf(i)>=0||(t[i]=e[i])}(e,n),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var i=e.color||e.colour;i&&this._setColor(i)}var r=n.parent;if(r&&n.popup&&!this._popupInited){var s=function(e){return t.openHandler(e)};this._events.add(r,"click",s),_(this._events,r,[" ","Spacebar","Enter"],s),this._popupInited=!0}else e.parent&&!n.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&"keydown"===e.type?this._domEdit:this.domElement;setTimeout((function(){return t.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,n=!1;if(e)if("mousedown"===t||"focusin"===t){var i=(this.__containedEvent||0)+100;e.timeStamp>i&&(n=!0)}else w(e),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==t&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var n=void 0;try{n=new m(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var i=n.hsla;i[3]=1,n.hsla=i}this.colour=this.color=n,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t,n,i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',r=(t=i,(n=document.createElement("div")).innerHTML=t,n.firstElementChild);return this.domElement=r,this._domH=b(".picker_hue",r),this._domSL=b(".picker_sl",r),this._domA=b(".picker_alpha",r),this._domEdit=b(".picker_editor input",r),this._domSample=b(".picker_sample",r),this._domOkay=b(".picker_done button",r),this._domCancel=b(".picker_cancel button",r),r.classList.add("layout_"+this.settings.layout),this.settings.alpha||r.classList.add("no_alpha"),this.settings.editor||r.classList.add("no_editor"),this.settings.cancelButton||r.classList.add("no_cancel"),this._ifPopup((function(){return r.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,t=this,n=this.domElement,i=this._events;function r(e,t,n){i.add(e,t,n)}r(n,"click",(function(e){return e.preventDefault()})),y(i,this._domH,(function(e,n){return t._setHSLA(e)})),y(i,this._domSL,(function(e,n){return t._setHSLA(null,e,1-n)})),this.settings.alpha&&y(i,this._domA,(function(e,n){return t._setHSLA(null,null,null,1-n)}));var s=this._domEdit;r(s,"input",(function(e){t._setColor(this.value,{fromEditor:!0,failSilently:!0})})),r(s,"focus",(function(e){this.selectionStart===this.selectionEnd&&this.select()})),this._ifPopup((function(){var t=function(t){return e.closeHandler(t)};r(window,"mousedown",t),r(window,"focusin",t),_(i,n,["Esc","Escape"],t);var s=function(t){e.__containedEvent=t.timeStamp};r(n,"mousedown",s),r(n,"focusin",s),r(e._domCancel,"click",t)}));var o=function(t){e._ifPopup((function(){return e.closeHandler(t)})),e.onDone&&e.onDone(e.colour)};r(this._domOkay,"click",o),_(i,n,["Enter"],o)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup((function(n){"static"===getComputedStyle(e).position&&(e.style.position="relative");var i=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(e){e===i?t.classList.add(e):t.classList.remove(e)})),t.classList.add(i)}))}},{key:"_setHSLA",value:function(e,t,n,i,r){r=r||{};var s=this.colour,o=s.hsla;[e,t,n,i].forEach((function(e,t){(e||0===e)&&(o[t]=e)})),s.hsla=o,this._updateUI(r),this.onChange&&!r.silent&&this.onChange(s)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,n=t.hsla,i="hsl("+360*n[0]+", 100%, 50%)",r=t.hslString,s=t.hslaString,o=this._domH,a=this._domSL,l=this._domA,c=b(".picker_selector",o),d=b(".picker_selector",a),u=b(".picker_selector",l);y(0,c,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,y(0,d,n[1]),w(0,d,1-n[2]),a.style.color=r,w(0,u,1-n[3]);var p=r,h=p.replace("hsl","hsla").replace(")",", 0)"),f="linear-gradient("+[p,h]+")";if(this._domA.style.background=f+", linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n                   linear-gradient(45deg, lightgrey 25%,       white 25%,       white 75%, lightgrey 75%) 1em 1em / 2em 2em",!e.fromEditor){var g=this.settings.editorFormat,m=this.settings.alpha,v=void 0;switch(g){case"rgb":v=t.printRGB(m);break;case"hsl":v=t.printHSL(m);break;default:v=t.printHex(m)}this._domEdit.value=v}this._domSample.style.color=s}function y(e,t,n){t.style.left=100*n+"%"}function w(e,t,n){t.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var n=e?"":"none",i=t.style.display!==n;return i&&(t.style.display=n),i}}]),e}(),x=document.createElement("style");x.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(x),k.StyleElement=x,wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.color={load:function(e,t){var n=r()(e).find(".cpt-color-section:first"),i=r()(n).children("input"),s=r()(n).children(".preview"),o=void 0!==r()(i).attr("alpha");new k({parent:n[0],popup:"top",alpha:o,color:i[0].value,onChange:function(e){s[0].style.backgroundColor=e.rgbaString,i[0].setAttribute("value",e.hex.endsWith("ff")&&e.hex.length>6?e.hex.slice(0,-2):e.hex)}})}},e}));n(4);function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $(e){return e[e.length-1]}function S(e,...t){return t.forEach(t=>{e.includes(t)||e.push(t)}),e}function E(e,t){return e?e.split(t):[]}function C(e,t,n){return(void 0===t||e>=t)&&(void 0===n||e<=n)}function A(e,t,n){return e<t?t:e>n?n:e}function L(e,t,n={},i=0,r=""){r+=`<${Object.keys(n).reduce((e,t)=>{let r=n[t];return"function"==typeof r&&(r=r(i)),`${e} ${t}="${r}"`},e)}></${e}>`;const s=i+1;return s<t?L(e,t,n,s,r):r}function O(e){return e.replace(/>\s+/g,">").replace(/\s+</,"<")}function j(e){return new Date(e).setHours(0,0,0,0)}function T(){return(new Date).setHours(0,0,0,0)}function M(...e){switch(e.length){case 0:return T();case 1:return j(e[0])}const t=new Date(0);return t.setFullYear(...e),t.setHours(0,0,0,0)}function F(e,t){const n=new Date(e);return n.setDate(n.getDate()+t)}function N(e,t){const n=new Date(e),i=n.getMonth()+t;let r=i%12;r<0&&(r+=12);const s=n.setMonth(i);return n.getMonth()!==r?n.setDate(0):s}function I(e,t){const n=new Date(e),i=n.getMonth(),r=n.setFullYear(n.getFullYear()+t);return 1===i&&2===n.getMonth()?n.setDate(0):r}function P(e,t){return(e-t+7)%7}function q(e,t,n=0){const i=new Date(e).getDay();return F(e,P(t,n)-P(i,n))}function H(e,t){const n=new Date(e).getFullYear();return Math.floor(n/t)*t}function R(e,t,n){if(1!==t&&2!==t)return e;const i=new Date(e);return 1===t?n?i.setMonth(i.getMonth()+1,0):i.setDate(1):n?i.setFullYear(i.getFullYear()+1,0,0):i.setMonth(0,1),i.setHours(0,0,0,0)}const B=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,z=/[\s!-/:-@[-`{-~年月日]+/;let W={};const V={y:(e,t)=>new Date(e).setFullYear(parseInt(t,10)),m(e,t,n){const i=new Date(e);let r=parseInt(t,10)-1;if(isNaN(r)){if(!t)return NaN;const e=t.toLowerCase(),i=t=>t.toLowerCase().startsWith(e);if(r=n.monthsShort.findIndex(i),r<0&&(r=n.months.findIndex(i)),r<0)return NaN}return i.setMonth(r),i.getMonth()!==function e(t){return t>-1?t%12:e(t+12)}(r)?i.setDate(0):i.getTime()},d:(e,t)=>new Date(e).setDate(parseInt(t,10))},U={d:e=>e.getDate(),dd:e=>Y(e.getDate(),2),D:(e,t)=>t.daysShort[e.getDay()],DD:(e,t)=>t.days[e.getDay()],m:e=>e.getMonth()+1,mm:e=>Y(e.getMonth()+1,2),M:(e,t)=>t.monthsShort[e.getMonth()],MM:(e,t)=>t.months[e.getMonth()],y:e=>e.getFullYear(),yy:e=>Y(e.getFullYear(),2).slice(-2),yyyy:e=>Y(e.getFullYear(),4)};function Y(e,t){return e.toString().padStart(t,"0")}function G(e){if("string"!=typeof e)throw new Error("Invalid date format.");if(e in W)return W[e];const t=e.split(B),n=e.match(new RegExp(B,"g"));if(0===t.length||!n)throw new Error("Invalid date format.");const i=n.map(e=>U[e]),r=Object.keys(V).reduce((e,t)=>(n.find(e=>"D"!==e[0]&&e[0].toLowerCase()===t)&&e.push(t),e),[]);return W[e]={parser(e,t){const i=e.split(z).reduce((e,t,i)=>{if(t.length>0&&n[i]){const r=n[i][0];"M"===r?e.m=t:"D"!==r&&(e[r]=t)}return e},{});return r.reduce((e,n)=>{const r=V[n](e,i[n],t);return isNaN(r)?e:r},T())},formatter:(e,n)=>i.reduce((i,r,s)=>i+`${t[s]}${r(e,n)}`,"")+$(t)}}function K(e,t,n){if(e instanceof Date||"number"==typeof e){const t=j(e);return isNaN(t)?void 0:t}if(e){if("today"===e)return T();if(t&&t.toValue){const i=t.toValue(e,t,n);return isNaN(i)?void 0:j(i)}return G(t).parser(e,n)}}function Z(e,t,n){if(isNaN(e)||!e&&0!==e)return"";const i="number"==typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(i,t,n):G(t).formatter(i,n)}const J=document.createRange();function Q(e){return J.createContextualFragment(e)}function X(e){return e.parentElement||(e.parentNode instanceof ShadowRoot?e.parentNode.host:void 0)}function ee(e){return e.getRootNode().activeElement===e}function te(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function ne(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function ie(e){e.firstChild&&(e.removeChild(e.firstChild),ie(e))}const re=new WeakMap,{addEventListener:se,removeEventListener:oe}=EventTarget.prototype;function ae(e,t){let n=re.get(e);n||(n=[],re.set(e,n)),t.forEach(e=>{se.call(...e),n.push(e)})}function le(e){let t=re.get(e);t&&(t.forEach(e=>{oe.call(...e)}),re.delete(e))}if(!Event.prototype.composedPath){const e=(t,n=[])=>{let i;return n.push(t),t.parentNode?i=t.parentNode:t.host?i=t.host:t.defaultView&&(i=t.defaultView),i?e(i,n):n};Event.prototype.composedPath=function(){return e(this.target)}}function ce(e,t){const n="function"==typeof t?t:e=>e instanceof Element&&e.matches(t);return function e(t,n,i){const[r,...s]=t;return n(r)?r:r!==i&&"HTML"!==r.tagName&&0!==s.length?e(s,n,i):void 0}(e.composedPath(),n,e.currentTarget)}const de={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}};var ue={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"»",orientation:"auto",pickLevel:0,prevArrow:"«",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0};const{language:pe,format:he,weekStart:fe}=ue;function ge(e,t){return e.length<6&&t>=0&&t<7?S(e,t):e}function me(e){return(e+6)%7}function ve(e,t,n,i){const r=K(e,t,n);return void 0!==r?r:i}function ye(e,t,n=3){const i=parseInt(e,10);return i>=0&&i<=n?i:t}function be(e,t){const n=Object.assign({},e),i={},r=t.constructor.locales,s=t.rangeSideIndex;let{format:o,language:a,locale:l,maxDate:c,maxView:d,minDate:u,pickLevel:p,startView:h,weekStart:f}=t.config||{};if(n.language){let e;if(n.language!==a&&(r[n.language]?e=n.language:(e=n.language.split("-")[0],void 0===r[e]&&(e=!1))),delete n.language,e){a=i.language=e;const t=l||r[pe];l=Object.assign({format:he,weekStart:fe},r[pe]),a!==pe&&Object.assign(l,r[a]),i.locale=l,o===t.format&&(o=i.format=l.format),f===t.weekStart&&(f=i.weekStart=l.weekStart,i.weekEnd=me(l.weekStart))}}if(n.format){const e="function"==typeof n.format.toDisplay,t="function"==typeof n.format.toValue,r=B.test(n.format);(e&&t||r)&&(o=i.format=n.format),delete n.format}let g=p;void 0!==n.pickLevel&&(g=ye(n.pickLevel,2),delete n.pickLevel),g!==p&&(g>p&&(void 0===n.minDate&&(n.minDate=u),void 0===n.maxDate&&(n.maxDate=c)),n.datesDisabled||(n.datesDisabled=[]),p=i.pickLevel=g);let m=u,v=c;if(void 0!==n.minDate){const e=M(0,0,1);m=null===n.minDate?e:ve(n.minDate,o,l,m),m!==e&&(m=R(m,p,!1)),delete n.minDate}if(void 0!==n.maxDate&&(v=null===n.maxDate?void 0:ve(n.maxDate,o,l,v),void 0!==v&&(v=R(v,p,!0)),delete n.maxDate),v<m?(u=i.minDate=v,c=i.maxDate=m):(u!==m&&(u=i.minDate=m),c!==v&&(c=i.maxDate=v)),n.datesDisabled&&(i.datesDisabled=n.datesDisabled.reduce((e,t)=>{const n=K(t,o,l);return void 0!==n?S(e,R(n,p,s)):e},[]),delete n.datesDisabled),void 0!==n.defaultViewDate){const e=K(n.defaultViewDate,o,l);void 0!==e&&(i.defaultViewDate=e),delete n.defaultViewDate}if(void 0!==n.weekStart){const e=Number(n.weekStart)%7;isNaN(e)||(f=i.weekStart=e,i.weekEnd=me(e)),delete n.weekStart}if(n.daysOfWeekDisabled&&(i.daysOfWeekDisabled=n.daysOfWeekDisabled.reduce(ge,[]),delete n.daysOfWeekDisabled),n.daysOfWeekHighlighted&&(i.daysOfWeekHighlighted=n.daysOfWeekHighlighted.reduce(ge,[]),delete n.daysOfWeekHighlighted),void 0!==n.maxNumberOfDates){const e=parseInt(n.maxNumberOfDates,10);e>=0&&(i.maxNumberOfDates=e,i.multidate=1!==e),delete n.maxNumberOfDates}n.dateDelimiter&&(i.dateDelimiter=String(n.dateDelimiter),delete n.dateDelimiter);let y=d;void 0!==n.maxView&&(y=ye(n.maxView,d),delete n.maxView),y=p>y?p:y,y!==d&&(d=i.maxView=y);let b=h;if(void 0!==n.startView&&(b=ye(n.startView,b),delete n.startView),b<p?b=p:b>d&&(b=d),b!==h&&(i.startView=b),n.prevArrow){const e=Q(n.prevArrow);e.childNodes.length>0&&(i.prevArrow=e.childNodes),delete n.prevArrow}if(n.nextArrow){const e=Q(n.nextArrow);e.childNodes.length>0&&(i.nextArrow=e.childNodes),delete n.nextArrow}if(void 0!==n.disableTouchKeyboard&&(i.disableTouchKeyboard="ontouchstart"in document&&!!n.disableTouchKeyboard,delete n.disableTouchKeyboard),n.orientation){const e=n.orientation.toLowerCase().split(/\s+/g);i.orientation={x:e.find(e=>"left"===e||"right"===e)||"auto",y:e.find(e=>"top"===e||"bottom"===e)||"auto"},delete n.orientation}if(void 0!==n.todayBtnMode){switch(n.todayBtnMode){case 0:case 1:i.todayBtnMode=n.todayBtnMode}delete n.todayBtnMode}return Object.keys(n).forEach(e=>{void 0!==n[e]&&D(ue,e)&&(i[e]=n[e])}),i}var we=O('<div class="datepicker">\n  <div class="datepicker-picker">\n    <div class="datepicker-header">\n      <div class="datepicker-title"></div>\n      <div class="datepicker-controls">\n        <button type="button" class="%buttonClass% prev-btn"></button>\n        <button type="button" class="%buttonClass% view-switch"></button>\n        <button type="button" class="%buttonClass% next-btn"></button>\n      </div>\n    </div>\n    <div class="datepicker-main"></div>\n    <div class="datepicker-footer">\n      <div class="datepicker-controls">\n        <button type="button" class="%buttonClass% today-btn"></button>\n        <button type="button" class="%buttonClass% clear-btn"></button>\n      </div>\n    </div>\n  </div>\n</div>');var _e=O(`<div class="days">\n  <div class="days-of-week">${L("span",7,{class:"dow"})}</div>\n  <div class="datepicker-grid">${L("span",42)}</div>\n</div>`);var ke=O(`<div class="calendar-weeks">\n  <div class="days-of-week"><span class="dow"></span></div>\n  <div class="weeks">${L("span",6,{class:"week"})}</div>\n</div>`);class xe{constructor(e,t){Object.assign(this,t,{picker:e,element:Q('<div class="datepicker-view"></div>').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}performBeforeHook(e,t,n){let i=this.beforeShow(new Date(n));switch(typeof i){case"boolean":i={enabled:i};break;case"string":i={classes:i}}if(i){if(!1===i.enabled&&(e.classList.add("disabled"),S(this.disabled,t)),i.classes){const n=i.classes.split(/\s+/);e.classList.add(...n),n.includes("disabled")&&S(this.disabled,t)}i.content&&function(e,t){ie(e),t instanceof DocumentFragment?e.appendChild(t):"string"==typeof t?e.appendChild(Q(t)):"function"==typeof t.forEach&&t.forEach(t=>{e.appendChild(t)})}(e,i.content)}}}class De extends xe{constructor(e){super(e,{id:0,name:"days",cellClass:"day"})}init(e,t=!0){if(t){const e=Q(_e).firstChild;this.dow=e.firstChild,this.grid=e.lastChild,this.element.appendChild(e)}super.init(e)}setOptions(e){let t;if(D(e,"minDate")&&(this.minDate=e.minDate),D(e,"maxDate")&&(this.maxDate=e.maxDate),e.datesDisabled&&(this.datesDisabled=e.datesDisabled),e.daysOfWeekDisabled&&(this.daysOfWeekDisabled=e.daysOfWeekDisabled,t=!0),e.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=e.daysOfWeekHighlighted),void 0!==e.todayHighlight&&(this.todayHighlight=e.todayHighlight),void 0!==e.weekStart&&(this.weekStart=e.weekStart,this.weekEnd=e.weekEnd,t=!0),e.locale){const n=this.locale=e.locale;this.dayNames=n.daysMin,this.switchLabelFormat=n.titleFormat,t=!0}if(void 0!==e.beforeShowDay&&(this.beforeShow="function"==typeof e.beforeShowDay?e.beforeShowDay:void 0),void 0!==e.calendarWeeks)if(e.calendarWeeks&&!this.calendarWeeks){const e=Q(ke).firstChild;this.calendarWeeks={element:e,dow:e.firstChild,weeks:e.lastChild},this.element.insertBefore(e,this.element.firstChild)}else this.calendarWeeks&&!e.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==e.showDaysOfWeek&&(e.showDaysOfWeek?(ne(this.dow),this.calendarWeeks&&ne(this.calendarWeeks.dow)):(te(this.dow),this.calendarWeeks&&te(this.calendarWeeks.dow))),t&&Array.from(this.dow.children).forEach((e,t)=>{const n=(this.weekStart+t)%7;e.textContent=this.dayNames[n],e.className=this.daysOfWeekDisabled.includes(n)?"dow disabled":"dow"})}updateFocus(){const e=new Date(this.picker.viewDate),t=e.getFullYear(),n=e.getMonth(),i=M(t,n,1),r=q(i,this.weekStart,this.weekStart);this.first=i,this.last=M(t,n+1,0),this.start=r,this.focused=this.picker.viewDate}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e,t&&(this.range=t.dates)}render(){this.today=this.todayHighlight?T():void 0,this.disabled=[...this.datesDisabled];const e=Z(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(e),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){const e=q(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((t,n)=>{t.textContent=function(e){const t=q(e,4,1),n=q(new Date(t).setMonth(0,4),4,1);return Math.round((t-n)/6048e5)+1}(F(e,7*n))})}Array.from(this.grid.children).forEach((e,t)=>{const n=e.classList,i=F(this.start,t),r=new Date(i),s=r.getDay();if(e.className="datepicker-cell "+this.cellClass,e.dataset.date=i,e.textContent=r.getDate(),i<this.first?n.add("prev"):i>this.last&&n.add("next"),this.today===i&&n.add("today"),(i<this.minDate||i>this.maxDate||this.disabled.includes(i))&&n.add("disabled"),this.daysOfWeekDisabled.includes(s)&&(n.add("disabled"),S(this.disabled,i)),this.daysOfWeekHighlighted.includes(s)&&n.add("highlighted"),this.range){const[e,t]=this.range;i>e&&i<t&&n.add("range"),i===e&&n.add("range-start"),i===t&&n.add("range-end")}this.selected.includes(i)&&n.add("selected"),i===this.focused&&n.add("focused"),this.beforeShow&&this.performBeforeHook(e,i,i)})}refresh(){const[e,t]=this.range||[];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(e=>{e.classList.remove("range","range-start","range-end","selected","focused")}),Array.from(this.grid.children).forEach(n=>{const i=Number(n.dataset.date),r=n.classList;i>e&&i<t&&r.add("range"),i===e&&r.add("range-start"),i===t&&r.add("range-end"),this.selected.includes(i)&&r.add("selected"),i===this.focused&&r.add("focused")})}refreshFocus(){const e=Math.round((this.focused-this.start)/864e5);this.grid.querySelectorAll(".focused").forEach(e=>{e.classList.remove("focused")}),this.grid.children[e].classList.add("focused")}}function $e(e,t){if(!e||!e[0]||!e[1])return;const[[n,i],[r,s]]=e;return n>t||r<t?void 0:[n===t?i:-1,r===t?s:12]}class Se extends xe{constructor(e){super(e,{id:1,name:"months",cellClass:"month"})}init(e,t=!0){t&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(Q(L("span",12,{"data-month":e=>e})))),super.init(e)}setOptions(e){if(e.locale&&(this.monthNames=e.locale.monthsShort),D(e,"minDate"))if(void 0===e.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{const t=new Date(e.minDate);this.minYear=t.getFullYear(),this.minMonth=t.getMonth(),this.minDate=t.setDate(1)}if(D(e,"maxDate"))if(void 0===e.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{const t=new Date(e.maxDate);this.maxYear=t.getFullYear(),this.maxMonth=t.getMonth(),this.maxDate=M(this.maxYear,this.maxMonth+1,0)}this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e.beforeShowMonth&&(this.beforeShow="function"==typeof e.beforeShowMonth?e.beforeShowMonth:void 0)}updateFocus(){const e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce((e,t)=>{const n=new Date(t),i=n.getFullYear(),r=n.getMonth();return void 0===e[i]?e[i]=[r]:S(e[i],r),e},{}),t&&t.dates&&(this.range=t.dates.map(e=>{const t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]}))}render(){this.disabled=this.datesDisabled.reduce((e,t)=>{const n=new Date(t);return this.year===n.getFullYear()&&e.push(n.getMonth()),e},[]),this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);const e=this.selected[this.year]||[],t=this.year<this.minYear||this.year>this.maxYear,n=this.year===this.minYear,i=this.year===this.maxYear,r=$e(this.range,this.year);Array.from(this.grid.children).forEach((s,o)=>{const a=s.classList,l=M(this.year,o,1);if(s.className="datepicker-cell "+this.cellClass,this.isMinView&&(s.dataset.date=l),s.textContent=this.monthNames[o],(t||n&&o<this.minMonth||i&&o>this.maxMonth||this.disabled.includes(o))&&a.add("disabled"),r){const[e,t]=r;o>e&&o<t&&a.add("range"),o===e&&a.add("range-start"),o===t&&a.add("range-end")}e.includes(o)&&a.add("selected"),o===this.focused&&a.add("focused"),this.beforeShow&&this.performBeforeHook(s,o,l)})}refresh(){const e=this.selected[this.year]||[],[t,n]=$e(this.range,this.year)||[];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(e=>{e.classList.remove("range","range-start","range-end","selected","focused")}),Array.from(this.grid.children).forEach((i,r)=>{const s=i.classList;r>t&&r<n&&s.add("range"),r===t&&s.add("range-start"),r===n&&s.add("range-end"),e.includes(r)&&s.add("selected"),r===this.focused&&s.add("focused")})}refreshFocus(){this.grid.querySelectorAll(".focused").forEach(e=>{e.classList.remove("focused")}),this.grid.children[this.focused].classList.add("focused")}}class Ee extends xe{constructor(e,t){super(e,t)}init(e,t=!0){var n;t&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow"+(n=this.cellClass,[...n].reduce((e,t,n)=>e+(n?t:t.toUpperCase()),"")),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(Q(L("span",12)))),super.init(e)}setOptions(e){if(D(e,"minDate")&&(void 0===e.minDate?this.minYear=this.minDate=void 0:(this.minYear=H(e.minDate,this.step),this.minDate=M(this.minYear,0,1))),D(e,"maxDate")&&(void 0===e.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=H(e.maxDate,this.step),this.maxDate=M(this.maxYear,11,31))),this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e[this.beforeShowOption]){const t=e[this.beforeShowOption];this.beforeShow="function"==typeof t?t:void 0}}updateFocus(){const e=new Date(this.picker.viewDate),t=H(e,this.navStep),n=t+9*this.step;this.first=t,this.last=n,this.start=t-this.step,this.focused=H(e,this.step)}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce((e,t)=>S(e,H(t,this.step)),[]),t&&t.dates&&(this.range=t.dates.map(e=>{if(void 0!==e)return H(e,this.step)}))}render(){this.disabled=this.datesDisabled.map(e=>new Date(e).getFullYear()),this.picker.setViewSwitchLabel(`${this.first}-${this.last}`),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((e,t)=>{const n=e.classList,i=this.start+t*this.step,r=M(i,0,1);if(e.className="datepicker-cell "+this.cellClass,this.isMinView&&(e.dataset.date=r),e.textContent=e.dataset.year=i,0===t?n.add("prev"):11===t&&n.add("next"),(i<this.minYear||i>this.maxYear||this.disabled.includes(i))&&n.add("disabled"),this.range){const[e,t]=this.range;i>e&&i<t&&n.add("range"),i===e&&n.add("range-start"),i===t&&n.add("range-end")}this.selected.includes(i)&&n.add("selected"),i===this.focused&&n.add("focused"),this.beforeShow&&this.performBeforeHook(e,i,r)})}refresh(){const[e,t]=this.range||[];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(e=>{e.classList.remove("range","range-start","range-end","selected","focused")}),Array.from(this.grid.children).forEach(n=>{const i=Number(n.textContent),r=n.classList;i>e&&i<t&&r.add("range"),i===e&&r.add("range-start"),i===t&&r.add("range-end"),this.selected.includes(i)&&r.add("selected"),i===this.focused&&r.add("focused")})}refreshFocus(){const e=Math.round((this.focused-this.start)/this.step);this.grid.querySelectorAll(".focused").forEach(e=>{e.classList.remove("focused")}),this.grid.children[e].classList.add("focused")}}function Ce(e,t){const n={date:e.getDate(),viewDate:new Date(e.picker.viewDate),viewId:e.picker.currentView.id,datepicker:e};e.element.dispatchEvent(new CustomEvent(t,{detail:n}))}function Ae(e,t){const{minDate:n,maxDate:i}=e.config,{currentView:r,viewDate:s}=e.picker;let o;switch(r.id){case 0:o=N(s,t);break;case 1:o=I(s,t);break;default:o=I(s,t*r.navStep)}o=A(o,n,i),e.picker.changeFocus(o).render()}function Le(e){const t=e.picker.currentView.id;t!==e.config.maxView&&e.picker.changeView(t+1).render()}function Oe(e){e.config.updateOnBlur?e.update({revert:!0}):e.refresh("input"),e.hide()}function je(e,t){const n=e.picker,i=new Date(n.viewDate),r=n.currentView.id,s=1===r?N(i,t-i.getMonth()):I(i,t-i.getFullYear());n.changeFocus(s).changeView(r-1).render()}function Te(e){const t=e.picker,n=T();if(1===e.config.todayBtnMode){if(e.config.autohide)return void e.setDate(n);e.setDate(n,{render:!1}),t.update()}t.viewDate!==n&&t.changeFocus(n),t.changeView(0).render()}function Me(e){e.setDate({clear:!0})}function Fe(e){Le(e)}function Ne(e){Ae(e,-1)}function Ie(e){Ae(e,1)}function Pe(e,t){const n=ce(t,".datepicker-cell");if(!n||n.classList.contains("disabled"))return;const{id:i,isMinView:r}=e.picker.currentView;r?e.setDate(Number(n.dataset.date)):je(e,Number(1===i?n.dataset.month:n.dataset.year))}function qe(e){e.preventDefault()}const He=["left","top","right","bottom"].reduce((e,t)=>(e[t]="datepicker-orient-"+t,e),{}),Re=e=>e?e+"px":e;function Be(e,t){if(void 0!==t.title&&(t.title?(e.controls.title.textContent=t.title,ne(e.controls.title)):(e.controls.title.textContent="",te(e.controls.title))),t.prevArrow){const n=e.controls.prevBtn;ie(n),t.prevArrow.forEach(e=>{n.appendChild(e.cloneNode(!0))})}if(t.nextArrow){const n=e.controls.nextBtn;ie(n),t.nextArrow.forEach(e=>{n.appendChild(e.cloneNode(!0))})}if(t.locale&&(e.controls.todayBtn.textContent=t.locale.today,e.controls.clearBtn.textContent=t.locale.clear),void 0!==t.todayBtn&&(t.todayBtn?ne(e.controls.todayBtn):te(e.controls.todayBtn)),D(t,"minDate")||D(t,"maxDate")){const{minDate:t,maxDate:n}=e.datepicker.config;e.controls.todayBtn.disabled=!C(T(),t,n)}void 0!==t.clearBtn&&(t.clearBtn?ne(e.controls.clearBtn):te(e.controls.clearBtn))}function ze(e){const{dates:t,config:n}=e;return A(t.length>0?$(t):n.defaultViewDate,n.minDate,n.maxDate)}function We(e,t){const n=new Date(e.viewDate),i=new Date(t),{id:r,year:s,first:o,last:a}=e.currentView,l=i.getFullYear();switch(e.viewDate=t,l!==n.getFullYear()&&Ce(e.datepicker,"changeYear"),i.getMonth()!==n.getMonth()&&Ce(e.datepicker,"changeMonth"),r){case 0:return t<o||t>a;case 1:return l!==s;default:return l<o||l>a}}function Ve(e){return window.getComputedStyle(e).direction}class Ue{constructor(e){const{config:t}=this.datepicker=e,n=we.replace(/%buttonClass%/g,t.buttonClass),i=this.element=Q(n).firstChild,[r,s,o]=i.firstChild.children,a=r.firstElementChild,[l,c,d]=r.lastElementChild.children,[u,p]=o.firstChild.children,h={title:a,prevBtn:l,viewSwitch:c,nextBtn:d,todayBtn:u,clearBtn:p};this.main=s,this.controls=h;const f=e.inline?"inline":"dropdown";i.classList.add("datepicker-"+f),Be(this,t),this.viewDate=ze(e),ae(e,[[i,"mousedown",qe],[s,"click",Pe.bind(null,e)],[h.viewSwitch,"click",Fe.bind(null,e)],[h.prevBtn,"click",Ne.bind(null,e)],[h.nextBtn,"click",Ie.bind(null,e)],[h.todayBtn,"click",Te.bind(null,e)],[h.clearBtn,"click",Me.bind(null,e)]]),this.views=[new De(this),new Se(this),new Ee(this,{id:2,name:"years",cellClass:"year",step:1}),new Ee(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[t.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),t.container?t.container.appendChild(this.element):e.inputField.after(this.element)}setOptions(e){Be(this,e),this.views.forEach(t=>{t.init(e,!1)}),this.currentView.render()}detach(){this.element.remove()}show(){if(this.active)return;const{datepicker:e,element:t}=this;if(e.inline)t.classList.add("active");else{const n=Ve(e.inputField);n!==Ve(X(t))?t.dir=n:t.dir&&t.removeAttribute("dir"),t.style.visiblity="hidden",t.classList.add("active"),this.place(),t.style.visiblity="",e.config.disableTouchKeyboard&&e.inputField.blur()}this.active=!0,Ce(e,"show")}hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active"),this.active=!1,Ce(this.datepicker,"hide"))}place(){const{classList:e,offsetParent:t,style:n}=this.element,{config:i,inputField:r}=this.datepicker,{width:s,height:o}=this.element.getBoundingClientRect(),{left:a,top:l,right:c,bottom:d,width:u,height:p}=r.getBoundingClientRect();let{x:h,y:f}=i.orientation,g=a,m=l;if(t!==document.body&&t){const e=t.getBoundingClientRect();g-=e.left-t.scrollLeft,m-=e.top-t.scrollTop}else g+=window.scrollX,m+=window.scrollY;const v=function e(t){const n=X(t);if(n!==document.body&&n)return"visible"!==window.getComputedStyle(n).overflow?n:e(n)}(r);let y=0,b=0,{clientWidth:w,clientHeight:_}=document.documentElement;if(v){const e=v.getBoundingClientRect();e.top>0&&(b=e.top),e.left>0&&(y=e.left),e.right<w&&(w=e.right),e.bottom<_&&(_=e.bottom)}let k=0;"auto"===h&&(a<y?(h="left",k=y-a):a+s>w?(h="right",w<c&&(k=w-c)):h="rtl"===Ve(r)?c-s<y?"left":"right":"left"),"right"===h&&(g+=u-s),g+=k,"auto"===f&&(f=l-o>b&&d+o>_?"top":"bottom"),"top"===f?m-=o:m+=p,e.remove(...Object.values(He)),e.add(He[h],He[f]),n.left=Re(g),n.top=Re(m)}setViewSwitchLabel(e){this.controls.viewSwitch.textContent=e}setPrevBtnDisabled(e){this.controls.prevBtn.disabled=e}setNextBtnDisabled(e){this.controls.nextBtn.disabled=e}changeView(e){const t=this.currentView,n=this.views[e];return n.id!==t.id&&(this.currentView=n,this._renderMethod="render",Ce(this.datepicker,"changeView"),this.main.replaceChild(n.element,t.element)),this}changeFocus(e){return this._renderMethod=We(this,e)?"render":"refreshFocus",this.views.forEach(e=>{e.updateFocus()}),this}update(){const e=ze(this.datepicker);return this._renderMethod=We(this,e)?"render":"refresh",this.views.forEach(e=>{e.updateFocus(),e.updateSelection()}),this}render(e=!0){const t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}function Ye(e,t,n,i){const r=e.picker,s=r.currentView,o=s.step||1;let a,l,c=r.viewDate;switch(s.id){case 0:c=i?F(c,7*n):t.ctrlKey||t.metaKey?I(c,n):F(c,n),a=F,l=e=>s.disabled.includes(e);break;case 1:c=N(c,i?4*n:n),a=N,l=e=>{const t=new Date(e),{year:n,disabled:i}=s;return t.getFullYear()===n&&i.includes(t.getMonth())};break;default:c=I(c,n*(i?4:1)*o),a=I,l=e=>s.disabled.includes(H(e,o))}c=function e(t,n,i,r,s,o){if(C(t,s,o)){if(r(t)){return e(n(t,i),n,i,r,s,o)}return t}}(c,a,n<0?-o:o,l,s.minDate,s.maxDate),void 0!==c&&r.changeFocus(c).render()}function Ge(e,t){const n=t.key;if("Tab"===n)return void Oe(e);const i=e.picker,{id:r,isMinView:s}=i.currentView;if(i.active){if(e.editMode)return void("Enter"===n?e.exitEditMode({update:!0,autohide:e.config.autohide}):"Escape"===n&&i.hide());if("ArrowLeft"===n)if(t.ctrlKey||t.metaKey)Ae(e,-1);else{if(t.shiftKey)return void e.enterEditMode();Ye(e,t,-1,!1)}else if("ArrowRight"===n)if(t.ctrlKey||t.metaKey)Ae(e,1);else{if(t.shiftKey)return void e.enterEditMode();Ye(e,t,1,!1)}else if("ArrowUp"===n)if(t.ctrlKey||t.metaKey)Le(e);else{if(t.shiftKey)return void e.enterEditMode();Ye(e,t,-1,!0)}else if("ArrowDown"===n){if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();Ye(e,t,1,!0)}else{if("Enter"!==n)return void("Escape"===n?i.hide():"Backspace"!==n&&"Delete"!==n&&(1!==n.length||t.ctrlKey||t.metaKey)||e.enterEditMode());if(s)return void e.setDate(i.viewDate);i.changeView(r-1).render()}}else{if("ArrowDown"!==n)return void("Enter"===n?e.update():"Escape"===n&&i.show());i.show()}t.preventDefault()}function Ke(e){e.config.showOnFocus&&!e._showing&&e.show()}function Ze(e,t){const n=t.target;(e.picker.active||e.config.showOnClick)&&(n._active=ee(n),n._clicking=setTimeout(()=>{delete n._active,delete n._clicking},2e3))}function Je(e,t){const n=t.target;n._clicking&&(clearTimeout(n._clicking),delete n._clicking,n._active&&e.enterEditMode(),delete n._active,e.config.showOnClick&&e.show())}function Qe(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}function Xe(e,t){const{element:n,picker:i}=e;if(!i.active&&!ee(n))return;const r=i.element;ce(t,e=>e===n||e===r)||Oe(e)}function et(e,t){return e.map(e=>Z(e,t.format,t.locale)).join(t.dateDelimiter)}function tt(e,t,n=!1){const{config:i,dates:r,rangeSideIndex:s}=e;if(0===t.length)return n?[]:void 0;let o=t.reduce((e,t)=>{let n=K(t,i.format,i.locale);return void 0===n||(n=R(n,i.pickLevel,s),!C(n,i.minDate,i.maxDate)||e.includes(n)||i.datesDisabled.includes(n)||!(i.pickLevel>0)&&i.daysOfWeekDisabled.includes(new Date(n).getDay())||e.push(n)),e},[]);return 0!==o.length?(i.multidate&&!n&&(o=o.reduce((e,t)=>(r.includes(t)||e.push(t),e),r.filter(e=>!o.includes(e)))),i.maxNumberOfDates&&o.length>i.maxNumberOfDates?o.slice(-1*i.maxNumberOfDates):o):void 0}function nt(e,t=3,n=!0){const{config:i,picker:r,inputField:s}=e;if(2&t){const e=r.active?i.pickLevel:i.startView;r.update().changeView(e).render(n)}1&t&&s&&(s.value=et(e.dates,i))}function it(e,t,n){let{clear:i,render:r,autohide:s,revert:o}=n;void 0===r&&(r=!0),r?void 0===s&&(s=e.config.autohide):s=!1;const a=tt(e,t,i);(a||o)&&(a&&a.toString()!==e.dates.toString()?(e.dates=a,nt(e,r?3:1),Ce(e,"changeDate")):nt(e,1),s&&e.hide())}class rt{constructor(e,t={},n){e.datepicker=this,this.element=e;const i=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:null,defaultViewDate:T(),maxDate:void 0,minDate:void 0},be(ue,this)),r=this.inline="INPUT"!==e.tagName;let s,o;if(r?i.container=e:(t.container&&(i.container=t.container instanceof HTMLElement?t.container:document.querySelector(t.container)),s=this.inputField=e,s.classList.add("datepicker-input")),n){const e=n.inputs.indexOf(s),t=n.datepickers;if(e<0||e>1||!Array.isArray(t))throw Error("Invalid rangepicker object.");t[e]=this,Object.defineProperty(this,"rangepicker",{get:()=>n}),Object.defineProperty(this,"rangeSideIndex",{get:()=>e})}this._options=t,Object.assign(i,be(t,this)),r?(o=E(e.dataset.date,i.dateDelimiter),delete e.dataset.date):o=E(s.value,i.dateDelimiter),this.dates=[];const a=tt(this,o);a&&a.length>0&&(this.dates=a),s&&(s.value=et(this.dates,i));const l=this.picker=new Ue(this);if(r)this.show();else{const e=Xe.bind(null,this);ae(this,[[s,"keydown",Ge.bind(null,this)],[s,"focus",Ke.bind(null,this)],[s,"mousedown",Ze.bind(null,this)],[s,"click",Je.bind(null,this)],[s,"paste",Qe.bind(null,this)],[document,"mousedown",e],[document,"touchstart",e],[window,"resize",l.place.bind(l)]])}}static formatDate(e,t,n){return Z(e,t,n&&de[n]||de.en)}static parseDate(e,t,n){return K(e,t,n&&de[n]||de.en)}static get locales(){return de}get active(){return!(!this.picker||!this.picker.active)}get pickerElement(){return this.picker?this.picker.element:void 0}setOptions(e){const t=this.picker,n=be(e,this);Object.assign(this._options,e),Object.assign(this.config,n),t.setOptions(n),nt(this,3)}show(){if(this.inputField){if(this.inputField.disabled)return;ee(this.inputField)||this.config.disableTouchKeyboard||(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}destroy(){return this.hide(),le(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}getDate(e){const t=e?t=>Z(t,e,this.config.locale):e=>new Date(e);return this.config.multidate?this.dates.map(t):this.dates.length>0?t(this.dates[0]):void 0}setDate(...e){const t=[...e],n={},i=$(e);"object"!=typeof i||Array.isArray(i)||i instanceof Date||!i||Object.assign(n,t.pop());it(this,Array.isArray(t[0])?t[0]:t,n)}update(e){if(this.inline)return;const t=Object.assign(e||{},{clear:!0,render:!0});it(this,E(this.inputField.value,this.config.dateDelimiter),t)}refresh(e,t=!1){let n;e&&"string"!=typeof e&&(t=e,e=void 0),n="picker"===e?2:"input"===e?1:3,nt(this,n,!t)}enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit"))}exitEditMode(e){if(this.inline||!this.editMode)return;const t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit"),t.update&&this.update(t)}}function st(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.date={load:function(e,t){var n=r()(e).find(".cpt-date-section:first"),i=r()(n).children("input"),s="no"!==r()(i).data("max")&&r()(i).data("max"),o="no"!==r()(i).data("min")&&r()(i).data("min");new rt(i[0],{autohide:!0,clearBtn:!0,maxDate:s,minDate:o,format:"dd/mm/yyyy"})}},e}));var ot=wp.i18n,at=ot.__;ot._x,ot._n,ot._nx;wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.file={load:function(e,t){new lt(e)}},e}));var lt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.fileSection=r()(t).find(".cpt-file-section:first"),this.fileTypes=r()(this.fileSection).data("type"),this.fileInput=r()(this.fileSection).find("input"),this.filePreview=r()(this.fileSection).find("img"),this.fileActions=r()(this.fileSection).find(".cpt-file-actions"),this.fileName=r()(this.fileSection).find(".file-name"),this.addButton=r()(this.fileSection).find(".upload"),this.removeButton=r()(this.fileSection).find(".remove"),this.listenRemoveEvent(),this.listenAddEvent()}var t,n,i;return t=e,(n=[{key:"listenAddEvent",value:function(){var e=this;r()(this.addButton).on("click",(function(t){t.preventDefault();var n=wp.media({title:at("Add file","custom-post-types"),frame:"select",library:wp.media.query({type:e.fileTypes,uploadedTo:wp.media.view.settings.post.id}),button:{text:at("Choose file","custom-post-types")},multiple:!1}).on("select",(function(){var t=n.state().get("selection").first().toJSON(),i=!!t.sizes&&t.sizes.thumbnail.url;i&&(r()(e.filePreview).attr("src",i),r()(e.filePreview).show());var s=t.mime;s.startsWith("image")&&(s="image"),s.startsWith("audio")&&(s="audio"),s.startsWith("video")&&(s="video"),"-1"!=r.a.inArray(s,e.fileTypes)?(r()(e.fileName).html(t.url.split("/").reverse()[0]),r()(e.fileActions).attr("title",t.url.split("/").reverse()[0]),r()(e.fileInput).val(t.id),r()(e.removeButton).prop("disabled",!1)):e.resetField()})).open()}))}},{key:"listenRemoveEvent",value:function(){var e=this;r()(this.removeButton).on("click",(function(t){t.preventDefault(),e.resetField()}))}},{key:"resetField",value:function(){r()(this.fileName).html(""),r()(this.fileInput).val(""),r()(this.filePreview).removeAttr("src"),r()(this.filePreview).hide(),r()(this.removeButton).prop("disabled",!0),r()(this.fileActions).attr("title",at("Choose","custom-post-types"))}}])&&st(t.prototype,n),i&&st(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();n(1),n(2);function ct(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.post_rel={load:function(e,t){var n=r()(e).find("select:first"),i=r()(n).data("type"),s={placeholder:r()(n).attr("placeholder")?r()(n).attr("placeholder"):" ... ",allowClear:!0,multiple:r()(n).prop("multiple")};i.length>0&&(s.ajax={url:cpt.ajax_url,data:function(e){return{action:"cpt-get-post_rel-options",nonce:cpt.ajax_nonce,search:e.term,post_type:i}},processResults:function(e){return{results:e.data}}}),r()(n).select2(s)}},e}));var dt=wp.i18n;dt.__,dt._x,dt._n,dt._nx;wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.repeater={load:function(e,t){new ut(e)}},e}));var ut=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.repeaterSection=r()(t).find(".cpt-repeater-section:first"),this.parent=r()(this.repeaterSection).data("parent"),this.fields=r()(this.repeaterSection).data("fields"),this.initSortable();var i=r()(this.repeaterSection).parent().children(".cpt-repeater-add:first");i.length>0&&this.listenAddEvent(i);var s=r()(this.repeaterSection).find(".cpt-repeater-group");r.a.each(s,(function(e,t){n.initFieldGroup(t)}))}var t,n,i;return t=e,(n=[{key:"listenAddEvent",value:function(e){var t=this;r()(e).on("click",(function(n){n.preventDefault(),r()(e).prop("disabled",!0);var i=r()('<div class="cpt-repeater-spinner"><div class="spinner"></div></div>');r()(t.repeaterSection).append(i);var s=r()(t.repeaterSection).children(".cpt-repeater-group").length,o=[];o.push({name:"action",value:"cpt-get-repeater-group"}),o.push({name:"nonce",value:cpt.ajax_nonce}),o.push({name:"fields",value:JSON.stringify(t.fields)}),o.push({name:"parent",value:t.parent+"["+s+"]"}),r.a.ajax({type:"post",dataType:"json",url:cpt.ajax_url,data:o,success:function(n){if(n.success){r()(e).prop("disabled",!1),r()(i).remove();var s=r()(n.data);r()(t.repeaterSection).append(s),t.initFieldGroup(s)}else r()(e).prop("disabled",!1),r()(i).remove(),console.log("Error",n)}})}))}},{key:"initSortable",value:function(){var e=r()(this.repeaterSection).children(".cpt-repeater-group").children(".buttons").find(".move");r()(e).on("click",(function(e){e.preventDefault()})),r()(this.repeaterSection).sortable({handle:".move",cancel:"",cursor:"grab",axis:"y",delay:150,dropOnEmpty:!1,opacity:.5,revert:!0})}},{key:"initFieldGroup",value:function(e){var t=r()(e).find(".cpt-repeater-fields:first").children(".cpt-field"),n=r()(e).find(".cpt-repeater-fields:first .cpt-repeater-extra").children(".cpt-field");r.a.each(r.a.merge(t,n),(function(e,t){var n=r()(t).data("field-type");window.cptUtils.appendFieldEvents(n,t),r()(t).trigger("load")})),this.listenRemoveEvent(e),this.autofillKeyInput(e),this.listenSwitchFieldTypeEvent(e)}},{key:"listenRemoveEvent",value:function(e){var t=r()(e).find(".remove:first"),n=r()(t).closest(".cpt-repeater-group").children(".cpt-repeater-remove");r()(t).on("click",(function(e){e.preventDefault(),r()(n).addClass("active")})),r()(n).find(".abort:first").on("click",(function(e){e.preventDefault(),r()(n).removeClass("active")})),r()(n).find(".confirm:first").on("click",(function(t){t.preventDefault(),r()(e).remove()}))}},{key:"autofillKeyInput",value:function(e){var t=r()(e).find('input[id$="-label"]:first'),n=r()(e).find('input[id$="-key"]:first');window.cptUtils.autoFillKey(n,t)}},{key:"listenSwitchFieldTypeEvent",value:function(e){var t=r()(e).find(".cpt-repeater-field-type:first").find("select"),n=r()(e).find(".cpt-repeater-extra:first");r()(t).on("change",(function(e){r()(n).empty();var i=r()('<div class="cpt-repeater-spinner"><div class="spinner"></div></div>');r()(n).append(i);var s=!!r()(t).val().length&&r()(t).val();if(s){var o=r()(t).attr("name").replace("meta-fields","").replace("[type]",""),a=[];a.push({name:"action",value:"cpt-get-repeater-extra-fields"}),a.push({name:"nonce",value:cpt.ajax_nonce}),a.push({name:"field-type",value:s}),a.push({name:"parent",value:o}),r.a.ajax({type:"post",dataType:"json",url:cpt.ajax_url,data:a,success:function(e){if(e.success){r()(i).remove();var t=r()(e.data);r()(n).append(t),r()(n).children(".cpt-field"),r.a.each(t,(function(e,t){var n=r()(t).data("field-type");window.cptUtils.appendFieldEvents(n,t),r()(t).trigger("load")}))}else r()(i).remove(),console.log("Error",e)}})}}))}}])&&ct(t.prototype,n),i&&ct(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function pt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.select={load:function(e,t){var n=r()(e).find("select:first"),i={placeholder:r()(n).attr("placeholder")?r()(n).attr("placeholder"):" ... ",allowClear:!0,multiple:r()(n).prop("multiple")};r()(n).select2(i)}},e})),wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.tax_rel={load:function(e,t){var n=r()(e).find("select:first"),i=r()(n).data("type"),s={placeholder:r()(n).attr("placeholder")?r()(n).attr("placeholder"):" ... ",allowClear:!0,multiple:r()(n).prop("multiple")};i.length>0&&(s.ajax={url:cpt.ajax_url,data:function(e){return{action:"cpt-get-tax_rel-options",nonce:cpt.ajax_nonce,search:e.term,taxonomy:i}},processResults:function(e){return{results:e.data}}}),r()(n).select2(s)}},e})),wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.text={load:function(e,t){}},e})),wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.time={load:function(e,t){for(var n=r()(e).find(".cpt-time-section:first"),i=r()(n).children("select"),s=r()(i).data("value")?r()(i).data("value"):"",o="no"!==r()(i).data("max")&&r()(i).data("max"),a="no"!==r()(i).data("min")&&r()(i).data("min"),l=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"00:00",i=0;if(!n)return i;var r=!!n.split(":")&&n.split(":"),s=null!==(e=r[0])&&void 0!==e&&e,o=null!==(t=r[1])&&void 0!==t&&t,a=Number(s+o);return Number.isInteger(a)?a:i},c=l(o),d=l(a),u=0;u<=23;u++){u=u<10?"0"+u:u;for(var p=0;p<=59;p++){var h=u+":"+(p=p<10?"0"+p:p);(d>0&&l(h)<d||c>0&&l(h)>c)&&c>d||r()(i).append(r()('<option value="'+h+'"'+(s==h?' selected="selected"':"")+">"+h+"</option>"))}}var f={placeholder:r()(i).attr("placeholder")?r()(selectEl).attr("placeholder"):" ... ",allowClear:!0,multiple:!1};r()(i).select2(f)}},e})),wp.hooks.addFilter(cpt.js_fields_events_hook,cpt.js_fields_events_namespace,(function(e){return e.tinymce={load:function(e,t){new ft(e)}},e}));var ft=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ht(this,"editorEl",void 0),ht(this,"editorId",void 0),ht(this,"editorForm",void 0),ht(this,"defaultArgs",{tinymce:{wpautop:!1,plugins:"charmap colorpicker hr lists paste tabfocus textcolor fullscreen wordpress wpautoresize wpeditimage wpemoji wpgallery wplink wptextpattern",toolbar1:"formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,wp_more,spellchecker,fullscreen,wp_adv,listbuttons",toolbar2:"styleselect,strikethrough,hr,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help",textarea_rows:20,wp_autoresize_on:!1,autoresize_min_height:50},quicktags:{buttons:"strong,em,link,block,del,ins,img,ul,ol,li,code,more,close"},mediaButtons:!0}),this.editorEl=r()(t).find("textarea:first"),this.editorId=r()(this.editorEl).attr("id"),this.defaultArgs.tinymce.wp_autoresize_on=r()(this.editorEl).is("[autoresize]"),this.editorForm=r()(t).closest("form"),this.startEditor()}var t,n,i;return t=e,(n=[{key:"startEditor",value:function(){var e=this,t=!1,n=setInterval((function(){!r()("#post-title-0")&&r()("body").hasClass("block-editor-page")||(t=!0,e.removeEditor(),e.initializeEditor(),e.listenSubmitEvent(),e.listenSortableEvent()),t&&clearInterval(n)}),500)}},{key:"initializeEditor",value:function(){wp.oldEditor.initialize(this.editorId,this.defaultArgs)}},{key:"removeEditor",value:function(){wp.oldEditor.remove(this.editorId)}},{key:"listenSubmitEvent",value:function(){var e=tinyMCE.editors[this.editorId];r()(this.editorForm).on("submit",(function(t){e.save()})),e.on("blur",(function(t){e.save()})),r()(document).ajaxComplete((function(t,n,i){i.data&&i.data.match(/action=add-tag/)&&(e.setContent(""),e.save())}))}},{key:"listenSortableEvent",value:function(){var e=this,t=r()(this.editorEl).closest(".ui-sortable");r()(t).on("sortstart",(function(){e.removeEditor()})),r()(t).on("sortstop",(function(){e.initializeEditor()}))}}])&&pt(t.prototype,n),i&&pt(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function gt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var mt=wp.i18n,vt=mt.__;mt._x,mt._n,mt._nx;new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.utils=new d,this.loadFields(),this.loadUiFeatures()}var t,n,i;return t=e,(n=[{key:"loadUiFeatures",value:function(){var e=this;r()("body").on("click",".cpt-field-wrap.advanced-field-btn .button",(function(e){e.preventDefault();var t=r()(this).closest(".cpt-fields-section"),n=r()(t).find(".cpt-field-wrap.advanced-field");r()(this).hasClass("button-secondary")?(r()(n).removeClass("active"),r()(this).removeClass("button-secondary").addClass("button-primary"),r()(this).find(".dashicons").attr("class","dashicons dashicons-insert"),r()(this).find(".label").html(vt("Advanced view","custom-post-types"))):(r()(n).addClass("active"),r()(this).addClass("button-secondary").removeClass("button-primary"),r()(this).find(".dashicons").attr("class","dashicons dashicons-remove"),r()(this).find(".label").html(vt("Simple view","custom-post-types")))})),r()("body").on("click",".cpt-field-wrap .template-shortcode input.copy-shortcode",(function(t){t.preventDefault();var n=r()(t.currentTarget);if(!r()(n).hasClass("copying")){var i=r()(n).val();e.utils.copyToClipboard(r()(n))&&(r()(n).val(vt("Copied to the clipboard...","custom-post-types")),r()(n).addClass("copying"),r()(n).mouseleave((function(){r()(this).val(i),r()(this).removeClass("copying")})))}})),r()("body").on("select2:select",".cpt-field-wrap.template-supports select",(function(e){e.preventDefault();var t=r()(this).val().length>0&&r()(this).val(),n=r()(this).closest(".cpt-fields-section"),i=r()('<div class="cpt-repeater-spinner"><div class="spinner"></div></div>');if(r()(n).find(".template-shortcode").html(""),r()(n).find(".template-shortcode").append(i),t){var s=[];s.push({name:"action",value:"cpt-get-template-shortcodes"}),s.push({name:"nonce",value:cpt.ajax_nonce}),s.push({name:"post-type",value:t}),r.a.ajax({type:"post",dataType:"json",url:cpt.ajax_url,data:s,success:function(e){e.success?(r()(n).find(".template-shortcode").html(""),r()(n).find(".template-shortcode.fields").html(e.data.fields.join("")),r()(n).find(".template-shortcode.taxs").html(e.data.taxonomies.join(""))):console.log("Error",e)}})}else r()(i).remove()})),r()(window).on("load",(function(){if(r()("body").hasClass("block-editor-page")){var e=r()('.cpt-fields-section *[id^="meta-fields-"][required]');e.length<=0||setInterval((function(){!function(e){var t=!0;r.a.each(e,(function(e,n){var i=r()(n).val().length>0;t=!!t&&i}));var n=r()(".edit-post-header__settings button.editor-post-publish-button__button");t?(r()(n).removeAttr("disabled"),r()(n).attr("aria-disabled","false")):(r()(n).attr("disabled","disabled"),r()(n).attr("aria-disabled","true"))}(e)}),200)}})),r()("body").on("click",".cpt-notice.is-dismissible a.cpt-dismiss-notice",(function(e){e.preventDefault();var t=r()(this).closest(".cpt-notice").find("button.notice-dismiss"),n=r()(this).data("notice"),i=r()(this).data("duration"),s=[];s.push({name:"action",value:"cpt-dismiss-notice"}),s.push({name:"nonce",value:cpt.ajax_nonce}),s.push({name:"key",value:n}),s.push({name:"duration",value:i}),r.a.ajax({type:"post",dataType:"json",url:cpt.ajax_url,data:s,success:function(e){e.success?t.click():console.log("Error",e)}})}));var t=r()('div[data-id="manage_cpt"].cpt-fields-section, div[data-id="manage_cpt_tax"].cpt-fields-section');r.a.each(t,(function(t,n){var i=r()(n).find('input[id$="-plural"]:first'),s=r()(n).find('input[id$="-id"]:first');e.utils.autoFillKey(s,i)}))}},{key:"loadFields",value:function(){var e=this;this.$fieldGroups=r()(".cpt-fields-section"),this.$fieldGroups&&(this.fieldsEvents=wp.hooks.applyFilters(cpt.js_fields_events_hook,[]),r.a.each(this.$fieldGroups,(function(t,n){var i=r()(n).children(".cpt-field");i&&r.a.each(i,(function(t,n){var i=r()(n).data("field-type");e.utils.appendFieldEvents(i,n),r()(n).trigger("load")}))})))}}])&&gt(t.prototype,n),i&&gt(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}())}]);
  • custom-post-types/trunk/custom-post-types.php

    r2911291 r2915886  
    33Plugin Name: Custom post types
    44Plugin URI: https://totalpress.org/plugins/custom-post-types?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types
    5 Description: Create / manage custom post types, custom taxonomies, custom fields and custom templates easily, directly from the WordPress dashboard without writing code.
     5Description: Create / manage custom post types, custom taxonomies, custom admin pages, custom fields and custom templates easily, directly from the WordPress dashboard without writing code.
    66Author: TotalPress.org
    77Author URI: https://totalpress.org/?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types
    88Text Domain: custom-post-types
    99Domain Path: /languages/
    10 Version: 3.1.3
     10Version: 4.0.0
    1111*/
     12
     13namespace CustomPostTypesPlugin;
     14
     15use CustomPostTypesPlugin\Includes\Component;
     16use CustomPostTypesPlugin\Includes\Fields;
     17use CustomPostTypesPlugin\Includes\Notices;
     18use CustomPostTypesPlugin\Includes\PostTypes;
     19use CustomPostTypesPlugin\Includes\Taxonomies;
     20use CustomPostTypesPlugin\Includes\Templates;
     21use CustomPostTypesPlugin\Includes\Pages;
    1222
    1323if (!defined('ABSPATH')) {
     
    1525}
    1626
    17 define('CPT_VER', get_file_data(__FILE__, ['Version' => 'Version'], false)['Version']);
    18 define('CPT_PATH', plugin_dir_path(__FILE__));
    19 define('CPT_URL', plugin_dir_url(__FILE__));
    20 define('CPT_PLUGIN_URL', 'https://totalpress.org/plugins/custom-post-types?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types');
    21 define('CPT_PLUGIN_DEV_URL', 'https://www.andreadegiovine.it/?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types');
    22 define('CPT_PLUGIN_DOC_URL', 'https://totalpress.org/docs/custom-post-types.html?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types');
    23 define('CPT_PLUGIN_DONATE_URL', 'https://totalpress.org/donate?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types');
    24 define('CPT_PLUGIN_WP_URL', 'https://wordpress.org/plugin/custom-post-types');
    25 define('CPT_PLUGIN_SUPPORT_URL', 'https://wordpress.org/support/plugin/custom-post-types');
    26 define('CPT_PLUGIN_REVIEW_URL', 'https://wordpress.org/support/plugin/custom-post-types/reviews/#new-post');
    27 
    28 foreach (glob(CPT_PATH . "inc/*.php") as $filename) {
     27define('CPT_INFOS', [
     28    'version' => get_file_data(__FILE__, ['Version' => 'Version'], false)['Version'],
     29    'path' => plugin_dir_path(__FILE__),
     30    'url' => plugin_dir_url(__FILE__),
     31    'plugin_url' => 'https://totalpress.org/plugins/custom-post-types?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types',
     32    'plugin_dev_url' => 'https://www.andreadegiovine.it/?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types',
     33    'plugin_doc_url' => 'https://totalpress.org/docs/custom-post-types.html?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types',
     34    'plugin_donate_url' => 'https://totalpress.org/donate?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types',
     35    'plugin_wporg_url' => 'https://wordpress.org/plugin/custom-post-types',
     36    'plugin_support_url' => 'https://wordpress.org/support/plugin/custom-post-types',
     37    'plugin_review_url' => 'https://wordpress.org/support/plugin/custom-post-types/reviews/#new-post',
     38    'hook_prefix' => 'cpt_',
     39    'ui_prefix' => 'manage_cpt',
     40    'options_prefix' => 'custom_post_types_',
     41    'nonce_key' => 'cpt-nonce'
     42], false);
     43
     44// Autoload
     45foreach (
     46    array_merge(
     47        glob(CPT_INFOS['path'] . "includes/*.php"),
     48        glob(CPT_INFOS['path'] . "parts/fields/*.php")
     49    ) as $filename
     50) {
    2951    include_once $filename;
    3052}
    3153
    32 if (!class_exists('totalpress_custom_post_types')) {
    33     class totalpress_custom_post_types
    34     {
    35         public $cpt_ui_name = 'manage_cpt';
    36         public $priority = PHP_INT_MAX;
    37 
    38         public function __construct()
    39         {
    40             add_action('init', [$this, 'textdomain'], -1);
    41             add_action('init', [$this, 'action_links']);
    42             add_action('init', [$this, 'settings_page']);
    43             add_action('init', [$this, 'ui_cpts'], $this->priority);
    44             add_action('init', [$this, 'ui_cpts_hooks']);
    45             add_action('init', [$this, 'created_cpts'], 0);
    46             add_action('init', [$this, 'created_taxs'], 0);
    47             add_action('init', [$this, 'created_fields_groups'], $this->priority);
    48             add_action('init', [$this, 'created_templates'], $this->priority);
    49             add_action('init', [$this, 'notices']);
    50             add_action('init', [$this, 'init_assets'], $this->priority);
    51             add_action('wp', [$this, 'shortcodes']);
    52 
    53             add_action('init', [$this, 'update_from_old_version']);
    54        
    55             $this->applyUpdates();
    56         }
    57 
    58         public function update_from_old_version()
    59         {
    60             if ((isset($_GET['post_type']) ? $_GET['post_type'] : '') == $this->cpt_ui_name &&
    61                 (isset($_GET['page']) ? $_GET['page'] : '') == 'tools' &&
    62                 (isset($_GET['action']) ? $_GET['action'] : '') == 'database-update' &&
    63                 wp_verify_nonce((isset($_GET['nonce']) ? $_GET['nonce'] : ''), 'cpt-nonce')
    64             ) {
    65                 update_option('custom_post_types_update_post_types_from_old_version', 0);
    66                 update_option('custom_post_types_update_taxs_from_old_version', 0);
    67                 update_option('custom_post_types_update_fieldsgroups_from_old_version', 0);
    68                 update_option('custom_post_types_update_templates_from_old_version', 0);
    69                 (new CPT\Notice)->add(
    70                     'db_update_notice',
    71                     __('The database update process was repeated.', 'custom-post-types'),
    72                     'warning',
    73                     true,
    74                     false
    75                 );
    76             }
    77 
    78             $post_types_from_old_version = get_option('custom_post_types_update_post_types_from_old_version', 0);
    79             if ($post_types_from_old_version != 1) {
    80                 $created_post_types = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name]);
    81                 foreach ($created_post_types as $post) {
    82                     $post_meta = get_post_meta($post->ID, '_cpt_settings_meta', true);
    83                     (new CPT\PostType())->update_old_post_meta($post_meta, $post->ID);
    84                 }
    85                 update_option('custom_post_types_update_post_types_from_old_version', 1);
    86             }
    87 
    88             $taxs_from_old_version = get_option('custom_post_types_update_taxs_from_old_version', 0);
    89             if ($taxs_from_old_version != 1) {
    90                 $created_taxs = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name . '_tax']);
    91                 foreach ($created_taxs as $post) {
    92                     $post_meta = get_post_meta($post->ID, '_tax_settings_meta', true);
    93                     (new CPT\Taxonomy())->update_old_post_meta($post_meta, $post->ID);
    94                 }
    95                 update_option('custom_post_types_update_taxs_from_old_version', 1);
    96             }
    97 
    98             $fieldsgroups_from_old_version = get_option('custom_post_types_update_fieldsgroups_from_old_version', 0);
    99             if ($fieldsgroups_from_old_version != 1) {
    100                 $created_fieldsgroups = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name . '_field']);
    101                 foreach ($created_fieldsgroups as $post) {
    102                     $post_meta = get_post_meta($post->ID, '_field_settings_meta', true);
    103                     (new CPT\MetaBox())->update_old_post_meta($post_meta, $post->ID);
    104                 }
    105                 update_option('custom_post_types_update_fieldsgroups_from_old_version', 1);
    106             }
    107 
    108             $templates_from_old_version = get_option('custom_post_types_update_templates_from_old_version', 0);
    109             if ($templates_from_old_version != 1) {
    110                 $created_templates = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name . '_template']);
    111                 foreach ($created_templates as $post) {
    112                     $post_meta = get_post_meta($post->ID, '_template_settings_meta', true);
    113                     (new CPT\Template())->update_old_post_meta($post_meta, $post->ID);
    114                 }
    115                 update_option('custom_post_types_update_templates_from_old_version', 1);
    116             }
    117         }
    118 
    119         public function textdomain()
    120         {
    121             load_plugin_textdomain('custom-post-types', false, CPT_PATH . 'languages');
    122         }
    123 
    124         public function ui_cpts()
    125         {
    126 
     54class Core extends Component
     55{
     56    /**
     57     * @var PostTypes
     58     */
     59    private $postTypes;
     60
     61    /**
     62     * @var Taxonomies
     63     */
     64    private $taxonomies;
     65
     66    /**
     67     * @var Fields
     68     */
     69    private $fields;
     70
     71    /**
     72     * @var Templates
     73     */
     74    private $templates;
     75
     76    /**
     77     * @var Pages
     78     */
     79    private $adminPages;
     80
     81    /**
     82     * @var Notices
     83     */
     84    private $notices;
     85
     86    public function __construct()
     87    {
     88        // UI
     89        $this->registerUiPostTypes();
     90        $this->manipulateUiPostTypeTitle();
     91        $this->registerUiPages();
     92        $this->registerUiFields();
     93        $this->registerWelcomeNotices();
     94        $this->enqueueUiAssets();
     95        $this->initPluginUi();
     96        // Utilities
     97        $this->registerShortcodes();
     98        $this->ajaxAction();
     99        $this->applyUpdates();
     100        $this->pluginActions();
     101        // Lets go
     102        $this->initRegisteredContents();
     103    }
     104
     105    /**
     106     * @return PostTypes
     107     */
     108    private function getPostTypes()
     109    {
     110        if ($this->postTypes instanceof PostTypes) {
     111            return $this->postTypes;
     112        }
     113
     114        $this->postTypes = new PostTypes();
     115        return $this->postTypes;
     116    }
     117
     118    /**
     119     * @return Taxonomies
     120     */
     121    private function getTaxonomies()
     122    {
     123        if ($this->taxonomies instanceof Taxonomies) {
     124            return $this->taxonomies;
     125        }
     126
     127        $this->taxonomies = new Taxonomies();
     128        return $this->taxonomies;
     129    }
     130
     131    /**
     132     * @return Fields
     133     */
     134    private function getFields()
     135    {
     136        if ($this->fields instanceof Fields) {
     137            return $this->fields;
     138        }
     139
     140        $this->fields = new Fields();
     141        return $this->fields;
     142    }
     143
     144    /**
     145     * @return Templates
     146     */
     147    public function getTemplates()
     148    {
     149        if ($this->templates instanceof Templates) {
     150            return $this->templates;
     151        }
     152
     153        $this->templates = new Templates();
     154        return $this->templates;
     155    }
     156
     157    /**
     158     * @return Pages
     159     */
     160    private function getAdminPages()
     161    {
     162        if ($this->adminPages instanceof Pages) {
     163            return $this->adminPages;
     164        }
     165
     166        $this->adminPages = new Pages();
     167        return $this->adminPages;
     168    }
     169
     170    /**
     171     * @return Notices
     172     */
     173    public function getNotices()
     174    {
     175        if ($this->notices instanceof Notices) {
     176            return $this->notices;
     177        }
     178
     179        $this->notices = new Notices();
     180        return $this->notices;
     181    }
     182
     183    /**
     184     * @return void
     185     */
     186    private function registerUiPostTypes()
     187    {
     188        // Register ui post types
     189        add_filter($this->getHookName('register_post_types'), function ($args) {
    127190            $default_args = [
    128                 'public'             => false,
     191                'public' => false,
    129192                'publicly_queryable' => false,
    130                 'show_ui'            => true,
    131                 'show_in_menu'       => true,
    132                 'query_var'          => false,
    133                 'rewrite'            => false,
     193                'show_ui' => true,
     194                'show_in_menu' => true,
     195                'show_in_rest' => false,
     196                'query_var' => false,
     197                'rewrite' => false,
    134198                'capabilities' => [
    135                     'edit_post'          => 'update_core',
    136                     'read_post'          => 'update_core',
    137                     'delete_post'        => 'update_core',
    138                     'edit_posts'         => 'update_core',
    139                     'edit_others_posts'  => 'update_core',
    140                     'delete_posts'       => 'update_core',
    141                     'publish_posts'      => 'update_core',
     199                    'edit_post' => 'update_core',
     200                    'read_post' => 'update_core',
     201                    'delete_post' => 'update_core',
     202                    'edit_posts' => 'update_core',
     203                    'edit_others_posts' => 'update_core',
     204                    'delete_posts' => 'update_core',
     205                    'publish_posts' => 'update_core',
    142206                    'read_private_posts' => 'update_core'
    143207                ],
    144                 'has_archive'        => false,
    145                 'hierarchical'       => false,
    146                 'menu_position'      => null,
    147                 'supports'           => [''], //['title'],
    148                 'menu_icon'          => 'dashicons-index-card',
    149                 'can_export'         => false,
    150             ];
    151 
    152             $advanced_view_button_field = [
    153                 'key' => 'advanced_fields',
    154                 'label' => '',
    155                 'info' => '',
    156                 'required' => false,
    157                 'type' => 'html',
    158                 'extra' => [
    159                     'content' => sprintf(
    160                         '<button class="button button-secondary advanced-view"><span class="dashicons dashicons-insert"></span><span class="label">%s</span></button>',
    161                         __('Advanced view', 'custom-post-types')
    162                     )
     208                'has_archive' => false,
     209                'hierarchical' => false,
     210                'menu_position' => null,
     211                'supports' => [''],
     212                'menu_icon' => 'dashicons-index-card',
     213                'can_export' => false,
     214            ];
     215            // Create/edit new post type
     216            $args[] = [
     217                'id' => $this->getInfo('ui_prefix'),
     218                'singular' => __('Post type', 'custom-post-types'),
     219                'plural' => __('Post types', 'custom-post-types'),
     220                'labels' => [
     221                    'name' => _x('Custom post types', 'Dashboard menu', 'custom-post-types'),
     222                    'singular_name' => __('Post type', 'custom-post-types'),
     223                    'menu_name' => __('Extend / Manage', 'custom-post-types'),
     224                    'name_admin_bar' => __('Post type', 'custom-post-types'),
     225                    'add_new' => __('Add post type', 'custom-post-types'),
     226                    'add_new_item' => __('Add new post type', 'custom-post-types'),
     227                    'new_item' => __('New post type', 'custom-post-types'),
     228                    'edit_item' => __('Edit post type', 'custom-post-types'),
     229                    'view_item' => __('View post type', 'custom-post-types'),
     230                    'item_updated' => __('Post type updated', 'custom-post-types'),
     231                    'all_items' => _x('Post types', 'Dashboard menu', 'custom-post-types'),
     232                    'search_items' => __('Search post type', 'custom-post-types'),
     233                    'not_found' => __('No post type available.', 'custom-post-types'),
     234                    'not_found_in_trash' => __('No post type in the trash.', 'custom-post-types')
    163235                ],
    164                 'wrap' => [
    165                     'width' => '',
    166                     'class' => '',
    167                     'id' => '',
     236                'args' => array_replace_recursive($default_args, [
     237                    'description' => __('Create and manage custom post types.', 'custom-post-types'),
     238                ]),
     239                'columns' => [
     240                    'title' => [
     241                        'label' => __('Plural', 'custom-post-types'),
     242                    ],
     243                    'item_key' => [
     244                        'label' => __('Key', 'custom-post-types'),
     245                        'callback' => function ($post_id) {
     246                            echo get_post_meta($post_id, 'id', true);
     247                        }
     248                    ],
     249                    'item_count' => [
     250                        'label' => __('Count', 'custom-post-types'),
     251                        'callback' => function ($post_id) {
     252                            $key = get_post_meta($post_id, 'id', true);
     253                            if (empty($key) || !(isset(wp_count_posts($key)->publish) ? wp_count_posts($key)->publish : false)) {
     254                                echo "0";
     255                                return;
     256                            }
     257                            printf(
     258                                '<a href="%s" title="%s">%s</a>',
     259                                admin_url('edit.php?post_type=' . $key),
     260                                __('View', 'custom-post-types'),
     261                                wp_count_posts($key)->publish
     262                            );
     263                        }
     264                    ],
     265                    'date' => [],
    168266                ]
    169267            ];
    170 
    171             $ui_cpt_args = cpt_get_ui_cpts($this->cpt_ui_name);
    172 
    173             foreach ($ui_cpt_args as $cpt_id => $ui_cpt) {
    174                 $cpt_args = array_replace_recursive($default_args, $ui_cpt['args']);
    175 
    176                 (new CPT\PostType)->register(
    177                     $ui_cpt['id'],
    178                     $ui_cpt['singular'],
    179                     $ui_cpt['plural'],
    180                     $cpt_args,
    181                     $ui_cpt['labels']
     268            // Create/edit new tax
     269            $args[] = [
     270                'id' => $this->getInfo('ui_prefix') . '_tax',
     271                'singular' => __('Taxonomy', 'custom-post-types'),
     272                'plural' => __('Taxonomies', 'custom-post-types'),
     273                'labels' => [
     274                    'name' => __('Custom taxonomies', 'custom-post-types'),
     275                    'singular_name' => __('Taxonomy', 'custom-post-types'),
     276                    'menu_name' => __('Taxonomy', 'custom-post-types'),
     277                    'name_admin_bar' => __('Taxonomy', 'custom-post-types'),
     278                    'add_new' => __('Add taxonomy', 'custom-post-types'),
     279                    'add_new_item' => __('Add new taxonomy', 'custom-post-types'),
     280                    'new_item' => __('New taxonomy', 'custom-post-types'),
     281                    'edit_item' => __('Edit taxonomy', 'custom-post-types'),
     282                    'view_item' => __('View taxonomy', 'custom-post-types'),
     283                    'item_updated' => __('Taxonomy updated', 'custom-post-types'),
     284                    'all_items' => __('Taxonomies', 'custom-post-types'),
     285                    'search_items' => __('Search taxonomy', 'custom-post-types'),
     286                    'not_found' => __('No taxonomy available.', 'custom-post-types'),
     287                    'not_found_in_trash' => __('No taxonomy in the trash.', 'custom-post-types')
     288                ],
     289                'args' => array_replace_recursive($default_args, [
     290                    'description' => __('Create and manage custom taxonomies.', 'custom-post-types'),
     291                    'show_in_menu' => 'edit.php?post_type=' . $this->getInfo('ui_prefix')
     292                ]),
     293                'columns' => [
     294                    'title' => [
     295                        'label' => __('Plural', 'custom-post-types'),
     296                    ],
     297                    'item_key' => [
     298                        'label' => __('Key', 'custom-post-types'),
     299                        'callback' => function ($post_id) {
     300                            echo get_post_meta($post_id, 'id', true);
     301                        }
     302                    ],
     303                    'item_count' => [
     304                        'label' => __('Count', 'custom-post-types'),
     305                        'callback' => function ($post_id) {
     306                            $key = get_post_meta($post_id, 'id', true);
     307                            if (empty($key) || is_wp_error(wp_count_terms(['taxonomy' => $key]))) {
     308                                echo "0";
     309                                return;
     310                            }
     311                            printf(
     312                                '<a href="%s" title="%s">%s</a>',
     313                                admin_url('edit-tags.php?taxonomy=' . $key),
     314                                __('View', 'custom-post-types'),
     315                                wp_count_terms(['taxonomy' => $key])
     316                            );
     317                        }
     318                    ],
     319                    'used_by' => [
     320                        'label' => __('Used by', 'custom-post-types'),
     321                        'callback' => function ($post_id) {
     322                            $supports = get_post_meta($post_id, 'supports', true);
     323                            if (empty($supports)) return;
     324                            $output = [];
     325                            foreach ($supports as $post_type) {
     326                                if (!get_post_type_object($post_type)) continue;
     327                                $output[] = sprintf(
     328                                    '<a href="%s" title="%s">%s</a>',
     329                                    admin_url('edit.php?post_type=' . $post_type),
     330                                    __('View', 'custom-post-types'),
     331                                    get_post_type_object($post_type)->labels->name
     332                                );
     333                            }
     334                            echo implode(', ', $output);
     335                        }
     336                    ],
     337                    'date' => [],
     338                ]
     339            ];
     340            // Create/edit new fieldsgroup
     341            $args[] = [
     342                'id' => $this->getInfo('ui_prefix') . '_field',
     343                'singular' => __('Field group', 'custom-post-types'),
     344                'plural' => __('Field groups', 'custom-post-types'),
     345                'labels' => [
     346                    'name' => __('Custom field groups', 'custom-post-types'),
     347                    'singular_name' => __('Field group', 'custom-post-types'),
     348                    'menu_name' => __('Field group', 'custom-post-types'),
     349                    'name_admin_bar' => __('Field group', 'custom-post-types'),
     350                    'add_new' => __('Add field group', 'custom-post-types'),
     351                    'add_new_item' => __('Add new field group', 'custom-post-types'),
     352                    'new_item' => __('New field group', 'custom-post-types'),
     353                    'edit_item' => __('Edit field group', 'custom-post-types'),
     354                    'view_item' => __('View field group', 'custom-post-types'),
     355                    'item_updated' => __('Field group updated', 'custom-post-types'),
     356                    'all_items' => __('Field groups', 'custom-post-types'),
     357                    'search_items' => __('Search field group', 'custom-post-types'),
     358                    'not_found' => __('No field group available.', 'custom-post-types'),
     359                    'not_found_in_trash' => __('No field group in the trash.', 'custom-post-types')
     360                ],
     361                'args' => array_replace_recursive($default_args, [
     362                    'description' => __('Create and manage custom field groups.', 'custom-post-types'),
     363                    'show_in_menu' => 'edit.php?post_type=' . $this->getInfo('ui_prefix'),
     364                    'supports' => ['title']
     365                ]),
     366                'columns' => [
     367                    'title' => [
     368                        'label' => __('Field group name', 'custom-post-types'),
     369                    ],
     370                    'item_count' => [
     371                        'label' => __('Fields', 'custom-post-types'),
     372                        'callback' => function ($post_id) {
     373                            $fields = get_post_meta($post_id, 'fields', true);
     374                            if (empty($fields)) return;
     375                            $fields_labels_array = array_map(
     376                                function ($field) {
     377                                    return $field['label'];
     378                                },
     379                                $fields
     380                            );
     381                            echo implode(', ', $fields_labels_array);
     382                        }
     383                    ],
     384                    'item_position' => [
     385                        'label' => __('Position', 'custom-post-types'),
     386                        'callback' => function ($post_id) {
     387                            $available = [
     388                                '' => __('NORMAL', 'custom-post-types'),
     389                                'normal' => __('NORMAL', 'custom-post-types'),
     390                                'side' => __('SIDEBAR', 'custom-post-types'),
     391                                'advanced' => __('ADVANCED', 'custom-post-types'),
     392                            ];
     393                            echo $available[get_post_meta($post_id, 'position', true)];
     394                        }
     395                    ],
     396                    'used_by' => [
     397                        'label' => __('Used by', 'custom-post-types'),
     398                        'callback' => function ($post_id) {
     399                            $supports = get_post_meta($post_id, 'supports', true);
     400                            if (empty($supports)) return;
     401                            $output = [];
     402                            foreach ($supports as $post_type) {
     403                                $content_type = 'cpt';
     404                                $content = $post_type;
     405
     406                                if (strpos($post_type, '/') !== false) {
     407                                    $content_type = explode('/', $post_type)[0];
     408                                    $content = explode('/', $post_type)[1];
     409                                }
     410
     411                                switch ($content_type) {
     412                                    case 'cpt':
     413                                        if (get_post_type_object($content)) {
     414                                            $output[] = sprintf(
     415                                                '<a href="%s" title="%s">%s</a>',
     416                                                admin_url('edit.php?post_type=' . $content),
     417                                                __('View', 'custom-post-types'),
     418                                                get_post_type_object($content)->labels->name
     419                                            );
     420                                        }
     421                                        break;
     422                                    case 'tax':
     423                                        if (get_taxonomy($content)) {
     424                                            $output[] = sprintf(
     425                                                '<a href="%s" title="%s">%s</a>',
     426                                                admin_url('edit-tags.php?taxonomy=' . $content),
     427                                                __('View', 'custom-post-types'),
     428                                                get_taxonomy($content)->labels->name
     429                                            );
     430                                        }
     431                                        break;
     432                                    case 'extra':
     433                                        if ($content == 'users') {
     434                                            $output[] = sprintf(
     435                                                '<a href="%s" title="%s">%s</a>',
     436                                                admin_url('users.php'),
     437                                                __('View', 'custom-post-types'),
     438                                                __('Users')
     439                                            );
     440                                        }
     441                                        break;
     442                                    case 'options':
     443                                        if (isset($this->getSettingsPagesOptions()[$content])) {
     444                                            $pageUrl = !empty($this->getSettingsPagesOptions()[$content]['url']) ? admin_url($this->getSettingsPagesOptions()[$content]['url']) : menu_page_url($content, false);
     445                                            $output[] = sprintf(
     446                                                '<a href="%s" title="%s">%s</a>',
     447                                                $pageUrl,
     448                                                __('View', 'custom-post-types'),
     449                                                $this->getSettingsPagesOptions()[$content]['title']
     450                                            );
     451                                        }
     452                                        break;
     453                                }
     454                            }
     455                            echo implode(', ', $output);
     456                        }
     457                    ],
     458                    'date' => [],
     459                ]
     460            ];
     461            return $args;
     462        });
     463
     464        // Remove quick edit links
     465        add_filter('post_row_actions', function ($actions, $post) {
     466            $postType = $post->post_type;
     467            if (stripos($postType, $this->getInfo('ui_prefix')) !== false) {
     468                unset($actions['inline hide-if-no-js']);
     469            }
     470            return $actions;
     471        }, 1, 2);
     472
     473        // Update ui notices
     474        add_filter('post_updated_messages', function ($messages) {
     475            $messages[$this->getInfo('ui_prefix')] = [
     476                1 => __('Post type updated', 'custom-post-types'),
     477                4 => __('Post type updated', 'custom-post-types'),
     478                6 => __('Post type published', 'custom-post-types'),
     479                7 => __('Post type saved', 'custom-post-types'),
     480                8 => __('Post type submitted', 'custom-post-types'),
     481                9 => __('Post type scheduled', 'custom-post-types'),
     482                10 => __('Post type draft updated', 'custom-post-types'),
     483            ];
     484            $messages[$this->getInfo('ui_prefix') . '_tax'] = [
     485                1 => __('Taxonomy updated', 'custom-post-types'),
     486                4 => __('Taxonomy updated', 'custom-post-types'),
     487                6 => __('Taxonomy published', 'custom-post-types'),
     488                7 => __('Taxonomy saved', 'custom-post-types'),
     489                8 => __('Taxonomy submitted', 'custom-post-types'),
     490                9 => __('Taxonomy scheduled', 'custom-post-types'),
     491                10 => __('Taxonomy draft updated', 'custom-post-types'),
     492            ];
     493            $messages[$this->getInfo('ui_prefix') . '_field'] = [
     494                1 => __('Field group updated', 'custom-post-types'),
     495                4 => __('Field group updated', 'custom-post-types'),
     496                6 => __('Field group published', 'custom-post-types'),
     497                7 => __('Field group saved', 'custom-post-types'),
     498                8 => __('Field group submitted', 'custom-post-types'),
     499                9 => __('Field group scheduled', 'custom-post-types'),
     500                10 => __('Field group draft updated', 'custom-post-types'),
     501            ];
     502            $messages[$this->getInfo('ui_prefix') . '_template'] = [
     503                1 => __('Template updated', 'custom-post-types'),
     504                4 => __('Template updated', 'custom-post-types'),
     505                6 => __('Template published', 'custom-post-types'),
     506                7 => __('Template saved', 'custom-post-types'),
     507                8 => __('Template submitted', 'custom-post-types'),
     508                9 => __('Template scheduled', 'custom-post-types'),
     509                10 => __('Template draft updated', 'custom-post-types'),
     510            ];
     511            $messages[$this->getInfo('ui_prefix') . '_page'] = [
     512                1 => __('Admin page updated', 'custom-post-types'),
     513                4 => __('Admin page updated', 'custom-post-types'),
     514                6 => __('Admin page published', 'custom-post-types'),
     515                7 => __('Admin page saved', 'custom-post-types'),
     516                8 => __('Admin page submitted', 'custom-post-types'),
     517                9 => __('Admin page scheduled', 'custom-post-types'),
     518                10 => __('Admin page draft updated', 'custom-post-types'),
     519            ];
     520            return $messages;
     521        });
     522    }
     523
     524    /**
     525     * @return void
     526     */
     527    private function manipulateUiPostTypeTitle()
     528    {
     529        $no_title_ui_cpts = [$this->getInfo('ui_prefix'), $this->getInfo('ui_prefix') . '_tax'];
     530
     531        // Override ui post title using singular label
     532        add_action('save_post', function ($post_id) use ($no_title_ui_cpts) {
     533            $post_type = get_post($post_id)->post_type;
     534            $post_status = get_post($post_id)->post_status;
     535            if (!in_array($post_type, $no_title_ui_cpts) || (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || $post_status == 'trash') return $post_id;
     536            $new_title = isset($_POST['meta-fields']['plural']) && !empty($_POST['meta-fields']['plural']) ? $_POST['meta-fields']['plural'] : 'CPT_' . $post_id;
     537            global $wpdb;
     538            $wpdb->update($wpdb->posts, ['post_title' => $new_title], ['ID' => $post_id]);
     539            return $post_id;
     540        });
     541
     542        // Show on ui post types title
     543        add_action('edit_form_after_title', function () use ($no_title_ui_cpts) {
     544            $screen = get_current_screen();
     545            $post = isset($_GET['post']) && get_post($_GET['post']) ? get_post($_GET['post']) : false;
     546            if (!in_array($screen->post_type, $no_title_ui_cpts) || !in_array($screen->id, $no_title_ui_cpts) || !$post) return;
     547            printf('<h1 style="padding: 0;">%s</h1>', $post->post_title);
     548        });
     549    }
     550
     551    /**
     552     * @return void
     553     */
     554    private function registerUiPages()
     555    {
     556        // Remove new post type menu
     557        add_action('admin_menu', function () {
     558            remove_submenu_page('edit.php?post_type=' . $this->getInfo('ui_prefix'), 'post-new.php?post_type=' . $this->getInfo('ui_prefix'));
     559        });
     560
     561        // Add settings page
     562        add_filter($this->getHookName('register_admin_pages'), function ($args) {
     563
     564            if (!$this->isProVersionActive()) {
     565                $args[] = [
     566                    'id' => 'manage_template',
     567                    'parent' => 'edit.php?post_type=' . $this->getInfo('ui_prefix'),
     568                    'order' => null,
     569                    'menu_icon' => null,
     570                    'title' => __('Templates', 'custom-post-types'),
     571                    'content' => $this->getProBanner(),
     572                    'admin_only' => true
     573                ];
     574                $args[] = [
     575                    'id' => 'manage_admin_pages',
     576                    'parent' => 'edit.php?post_type=' . $this->getInfo('ui_prefix'),
     577                    'order' => null,
     578                    'menu_icon' => null,
     579                    'title' => __('Admin pages', 'custom-post-types'),
     580                    'content' => $this->getProBanner(),
     581                    'admin_only' => true
     582                ];
     583                $args[] = [
     584                    'id' => 'manage_admin_notices',
     585                    'parent' => 'edit.php?post_type=' . $this->getInfo('ui_prefix'),
     586                    'order' => null,
     587                    'menu_icon' => null,
     588                    'title' => __('Admin notices', 'custom-post-types'),
     589                    'content' => $this->getProBanner(),
     590                    'admin_only' => true
     591                ];
     592            }
     593
     594            ob_start();
     595            require_once($this->getInfo('path') . 'parts/pages/tools.php');
     596            $template = ob_get_clean();
     597
     598            $args[] = [
     599                'id' => 'tools',
     600                'parent' => 'edit.php?post_type=' . $this->getInfo('ui_prefix'),
     601                'order' => null,
     602                'menu_icon' => null,
     603                'title' => __('Tools & Infos', 'custom-post-types'),
     604                'content' => $template,
     605                'admin_only' => true
     606            ];
     607            return $args;
     608        });
     609    }
     610
     611    /**
     612     * @return void
     613     */
     614    private function registerUiFields()
     615    {
     616        // Register ui fields
     617        add_filter($this->getHookName('register_fields'), function ($fields) {
     618            $fields[] = $this->getFields()->getPostTypeFields();
     619            $fields[] = $this->getFields()->getTaxonomyFields();
     620            $fields[] = $this->getFields()->getNewFieldGroupFields();
     621            return $fields;
     622        });
     623    }
     624
     625    /**
     626     * @return void
     627     */
     628    private function registerWelcomeNotices()
     629    {
     630        // Register welcome notices
     631        add_filter($this->getHookName('register_notices'), function ($args) {
     632            $buttons = [
     633                [
     634                    'link' => $this->getInfo('plugin_review_url'),
     635                    'label' => __('Write a Review', 'custom-post-types'),
     636                    'target' => '_blank',
     637                    'cta' => true
     638                ],
     639                [
     640                    'link' => $this->getInfo('plugin_donate_url'),
     641                    'label' => __('Make a Donation', 'custom-post-types'),
     642                    'target' => '_blank'
     643                ]
     644            ];
     645            if (!$this->isProVersionActive()) {
     646                $buttons[] = [
     647                    'link' => $this->getInfo('plugin_url'),
     648                    'label' => __('Get PRO version', 'custom-post-types'),
     649                    'target' => '_blank'
     650                ];
     651            }
     652
     653            // After installation notice
     654            $welcomeNotice = [
     655                'id' => 'welcome_notice_400',
     656                'title' => $this->getNoticesTitle(),
     657                'message' => __('Thanks for using this plugin! Do you want to help us grow to add new features?', 'custom-post-types') . '<br><br>' . sprintf(__('The new version %s introduces a lot of new features and improves the core of the plugin.<br>For any problems you can download the previous version %s from the official page of the plugin from WordPress.org (Advanced View > Previous version).', 'custom-post-types'), '<u>' . $this->getInfo('version') . '</u>', '<u>3.1.1</u>'),
     658                'type' => 'success',
     659                'dismissible' => true,
     660                'buttons' => $buttons,
     661            ];
     662
     663            if(time() < 1688169599){ // 30-06-2023 23:59:59
     664                $welcomeNotice['message'] = $welcomeNotice['message'] . '<br><br>' . sprintf('Use the coupon <strong><u>%s</u></strong> and get the PRO version with special discount until %s.', 'WELCOME-CPT-4', '30/06/2023');
     665            }
     666
     667            $args[] = $welcomeNotice;
     668
     669            $installationTime = get_option($this->getOptionName('installation_time'), null);
     670            if ($installationTime && strtotime("+7 day", $installationTime) < time()) {
     671                // After 7 days notice
     672                $args[] = [
     673                    'id' => 'welcome_notice_400_1',
     674                    'title' => $this->getNoticesTitle(),
     675                    'message' => __('Wow! More than 7 days of using this amazing plugin. Your support is really important.', 'custom-post-types'),
     676                    'type' => 'success',
     677                    'dismissible' => true,
     678                    'buttons' => $buttons,
     679                ];
     680            }
     681
     682            return $args;
     683        });
     684    }
     685
     686    /**
     687     * @return void
     688     */
     689    private function enqueueUiAssets()
     690    {
     691        // Enqueue ui assets
     692        add_action('admin_enqueue_scripts', function () {
     693            wp_enqueue_style($this->getInfo('ui_prefix'), $this->getInfo('url') . 'assets/css/backend.css');
     694            if ($this->loadJs()) {
     695                wp_enqueue_media();
     696                wp_enqueue_editor();
     697                wp_enqueue_script($this->getInfo('options_prefix'), $this->getInfo('url') . 'assets/js/backend.js', ['jquery', 'wp-i18n', 'wp-util', 'wp-hooks', 'wp-editor'], null, true);
     698                wp_localize_script($this->getInfo('options_prefix'), 'cpt', [
     699                    'js_fields_events_hook' => 'cpt-fields-events',
     700                    'js_fields_events_namespace' => 'custom-post-types',
     701                    'ajax_url' => admin_url('admin-ajax.php'),
     702                    'ajax_nonce' => wp_create_nonce($this->getInfo('nonce_key')),
     703                ]);
     704                wp_set_script_translations($this->getInfo('options_prefix'), 'custom-post-types');
     705            }
     706        });
     707    }
     708
     709    /**
     710     * @return void
     711     */
     712    private function initPluginUi()
     713    {
     714        add_filter('plugin_action_links', function ($links, $file) {
     715            if ($file == 'custom-post-types/custom-post-types.php') {
     716                $links[] = sprintf(
     717                    '<a href="%1$s" target="_blank" aria-label="%2$s"> %2$s </a>',
     718                    $this->getInfo('plugin_support_url'),
     719                    __('Support', 'custom-post-types')
    182720                );
    183 
    184                 (new CPT\Column())->add(
    185                     $ui_cpt['id'],
    186                     isset($ui_cpt['columns']) ? $ui_cpt['columns'] : []
    187                 );
    188 
    189                 $cpt_metabox = 'cpt_get_metabox_' . $ui_cpt['id'];
    190                 if (!function_exists($cpt_metabox)) continue;
    191                 $meta_fields =  $cpt_metabox($this->cpt_ui_name);
    192                 if (in_array($ui_cpt['id'], [$this->cpt_ui_name, $this->cpt_ui_name . '_tax'])) array_push($meta_fields, $advanced_view_button_field);
    193 
    194                 (new CPT\MetaBox())->add(
    195                     $ui_cpt['id'],
    196                     sprintf(__('%s settings', 'custom-post-types'), $ui_cpt['singular']),
    197                     $meta_fields,
    198                     isset($ui_cpt['metabox_position']) ? $ui_cpt['metabox_position'] : 'normal'
    199                 );
    200             }
    201         }
    202 
    203         public function ui_cpts_hooks()
    204         {
    205             $no_title_ui_cpts = [$this->cpt_ui_name, $this->cpt_ui_name . '_tax'];
    206 
    207             add_action('save_post', function ($post_id) use ($no_title_ui_cpts) {
    208                 $post_type = get_post($post_id)->post_type;
    209                 $post_status = get_post($post_id)->post_status;
    210                 if (!in_array($post_type, $no_title_ui_cpts) || (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || $post_status == 'trash') return $post_id;
    211                 $new_title = isset($_POST['meta-fields']['plural']) && !empty($_POST['meta-fields']['plural']) ? $_POST['meta-fields']['plural'] : 'CPT_' . $post_id;
    212                 global $wpdb;
    213                 $wpdb->update($wpdb->posts, ['post_title' => $new_title], ['ID' => $post_id]);
    214                 return $post_id;
    215             }, $this->priority);
    216 
    217             add_action('edit_form_after_title', function () use ($no_title_ui_cpts) {
    218                 $screen = get_current_screen();
    219                 $post = isset($_GET['post']) && get_post($_GET['post']) ? get_post($_GET['post']) : false;
    220                 if (!in_array($screen->post_type, $no_title_ui_cpts) || !in_array($screen->id, $no_title_ui_cpts) || !$post) return;
    221                 printf('<h1 style="padding: 0;">%s</h1>', $post->post_title);
    222             }, $this->priority);
    223 
    224             add_action('wp_ajax_cpt_get_extra_fields', function () {
    225                 $nonce = isset($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'cpt-nonce') ? true : false;
    226                 $field_type = isset($_POST['field-type']) ? $_POST['field-type'] : false;
    227                 $available_fields = (new CPT\Fields)->available_fields;
    228                 $fields = isset($available_fields[$field_type]['fields']) ? $available_fields[$field_type]['fields'] : [];
    229                 if (empty($field_type) || !is_array($fields) || !$nonce) wp_send_json_error();
    230                 $fields_parent = isset($_POST['parent']) ? $_POST['parent'] : '';
    231                 ob_start();
    232                 foreach ($fields as $field) {
    233                     $field['parent'] = $fields_parent . '[extra][' . $field_type . ']';
    234                     (new CPT\MetaBox())->the_field_wrap($field);
    235                 }
    236                 $output = ob_get_clean();
    237                 wp_send_json_success($output);
    238             });
    239 
    240             add_action('wp_ajax_cpt_get_terms_array', function () {
    241                 $nonce = isset($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'cpt-nonce') ? true : false;
    242                 $taxonomy = isset($_REQUEST['taxonomy']) ? $_REQUEST['taxonomy'] : false;
    243                 $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : '';
    244                 if (empty($taxonomy) || !$nonce) wp_send_json_error();
    245                 $terms = get_terms([
    246                     'taxonomy' => $taxonomy,
    247                     'name__like' => $search,
    248                     'hide_empty' => false,
    249                     'number' => 10
    250                 ]);
    251                 $output = [];
    252                 foreach ($terms as $term) {
    253                     $output[] = [
    254                         'id' => $term->term_id,
    255                         'text' => cpt_get_term_title_with_parents($term->term_id)
    256                     ];
    257                 }
    258                 wp_send_json_success($output);
    259             });
    260 
    261             add_action('wp_ajax_cpt_get_posts_array', function () {
    262                 $nonce = isset($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'cpt-nonce') ? true : false;
    263                 $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : false;
    264                 $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : '';
    265                 if (empty($post_type) || !$nonce) wp_send_json_error();
    266                 $posts = get_posts([
    267                     'post_type' => $post_type,
    268                     's' => $search,
    269                     'numberposts' => 10
    270                 ]);
    271                 $output = [];
    272                 foreach ($posts as $post) {
    273                     $output[] = [
    274                         'id' => $post->ID,
    275                         'text' => cpt_get_post_title_with_parents($post->ID)
    276                     ];
    277                 }
    278                 wp_send_json_success($output);
    279             });
    280 
    281             add_action('wp_ajax_cpt_get_template_fields', function () {
    282                 $nonce = isset($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'cpt-nonce') ? true : false;
    283                 $post_type = isset($_POST['post-type']) ? $_POST['post-type'] : false;
    284                 if (!$post_type || !$nonce) wp_send_json_error();
    285                 $post_type_fields = cpt_get_fields_by_post_type($post_type);
    286                 $post_type_taxs = get_object_taxonomies($post_type);
    287                 $list = '';
    288                 if (!empty($post_type_fields)) {
    289                     $list .= '<div class="cpt-field" style="width: 100%;">' . sprintf(
    290                         '<div class="cpt-field-wrap"><div class="field-input">%s</div></div>',
    291                         __('Shortcodes of available fields and taxonomies:', 'custom-post-types')
    292                     ) . '</div>';
    293                 }
    294                 foreach ($post_type_fields as $key => $field) {
    295                     ob_start(); ?>
    296                     <div class="cpt-field" style="width: 100%;">
    297                         <div class="cpt-field-wrap">
    298                             <div class="field-input">
    299                                 <input type="text" value="<?php echo htmlentities(sprintf('[cpt-field key="%s"]', $key)); ?>" title="<?php _e('Click to copy', 'custom-post-types'); ?>" class="copy" readonly>
    300                             </div>
    301                         </div>
    302                     </div>
    303                 <?php
    304                     $list .= ob_get_clean();
    305                 }
    306                 foreach ($post_type_taxs as $tax) {
    307                     ob_start(); ?>
    308                     <div class="cpt-field" style="width: 100%;">
    309                         <div class="cpt-field-wrap">
    310                             <div class="field-input">
    311                                 <input type="text" value="<?php echo htmlentities(sprintf('[cpt-terms key="%s"]', $tax)); ?>" title="<?php _e('Click to copy', 'custom-post-types'); ?>" class="copy" readonly>
    312                             </div>
    313                         </div>
    314                     </div>
    315                 <?php
    316                     $list .= ob_get_clean();
    317                 }
    318                 if (!empty($post_type_fields)) {
    319                     $list .= '<div class="cpt-field" style="width: 100%;">' . sprintf(
    320                         '<div class="cpt-field-wrap"><div class="field-input">%s</div></div>',
    321                         __('Use these shortcodes to dynamically show values ​​based on the single post of the chosen post type.', 'custom-post-types')
    322                     ) . '</div>';
    323                 }
    324                 wp_send_json_success($list);
    325             });
    326         }
    327 
    328         public function created_cpts()
    329         {
    330             $created_post_types = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name]);
    331 
    332             foreach ($created_post_types as $post_type) {
    333 
    334                 $post_metas = get_post_meta($post_type->ID, '');
    335 
    336                 if (!isset($post_metas['id']) || !isset($post_metas['singular']) || !isset($post_metas['plural'])) continue;
    337 
    338                 $cpt_key = $post_metas['id'][0];
    339                 $cpt_singular = $post_metas['singular'][0];
    340                 $cpt_plural = $post_metas['plural'][0];
    341                 $cpt_slug = isset($post_metas['slug'][0]) && !empty($post_metas['slug'][0]) ? sanitize_title($post_metas['slug'][0]) : sanitize_title($post_metas['plural'][0]);
    342 
    343                 unset($post_metas['id']);
    344                 unset($post_metas['singular']);
    345                 unset($post_metas['plural']);
    346                 unset($post_metas['slug']);
    347 
    348                 foreach ($post_metas as $key => $value) {
    349                     $single_meta = get_post_meta($post_type->ID, $key, true);
    350                     if (substr($key, 0, 7) === "labels_") {
    351                         if (!empty($single_meta)) {
    352                             $post_metas['labels'][str_replace("labels_", "", $key)] = $single_meta;
    353                         }
    354                         unset($post_metas[$key]);
    355                     } elseif (substr($key, 0, 1) === "_" || empty($single_meta)) {
    356                         unset($post_metas[$key]);
    357                     } else {
    358                         $post_metas[$key] = in_array($single_meta, ['true', 'false']) ? ($single_meta === 'true') : $single_meta;
    359                     }
    360                 }
    361 
    362                 $registration_labels = apply_filters("cpt_register_labels_$cpt_key", isset($post_metas['labels']) && is_array($post_metas['labels']) ? $post_metas['labels'] : []);
    363                 unset($post_metas['labels']);
    364 
    365                 $post_metas['rewrite']['slug'] = $cpt_slug;
    366 
    367                 $registration_args = apply_filters("cpt_register_args_$cpt_key", $post_metas);
    368 
    369                 (new CPT\PostType)->register(
    370                     $cpt_key,
    371                     $cpt_singular,
    372                     $cpt_plural,
    373                     $registration_args,
    374                     $registration_labels
    375                 );
    376             }
    377 
    378             $this->flush_rewrite_rules($created_post_types);
    379         }
    380 
    381         public function created_taxs()
    382         {
    383             $created_post_types = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name . '_tax']);
    384 
    385             foreach ($created_post_types as $post_type) {
    386 
    387                 $post_metas = get_post_meta($post_type->ID, '');
    388 
    389                 if (!isset($post_metas['id']) || !isset($post_metas['singular']) || !isset($post_metas['plural'])) continue;
    390 
    391                 $cpt_key = $post_metas['id'][0];
    392                 $cpt_singular = $post_metas['singular'][0];
    393                 $cpt_plural = $post_metas['plural'][0];
    394                 $cpt_slug = isset($post_metas['slug'][0]) && !empty($post_metas['slug'][0]) ? sanitize_title($post_metas['slug'][0]) : sanitize_title($post_metas['plural'][0]);
    395 
    396                 unset($post_metas['id']);
    397                 unset($post_metas['singular']);
    398                 unset($post_metas['plural']);
    399                 unset($post_metas['slug']);
    400 
    401                 foreach ($post_metas as $key => $value) {
    402                     $single_meta = get_post_meta($post_type->ID, $key, true);
    403                     if (substr($key, 0, 7) === "labels_") {
    404                         if (!empty($single_meta)) {
    405                             $post_metas['labels'][str_replace("labels_", "", $key)] = $single_meta;
    406                         }
    407                         unset($post_metas[$key]);
    408                     } elseif (substr($key, 0, 1) === "_" || empty($single_meta)) {
    409                         unset($post_metas[$key]);
    410                     } else {
    411                         $post_metas[$key] = in_array($single_meta, ['true', 'false']) ? ($single_meta === 'true') : $single_meta;
    412                     }
    413                 }
    414 
    415                 $post_types = isset($post_metas['supports']) ? $post_metas['supports'] : [];
    416                 unset($post_metas['supports']);
    417 
    418                 $registration_labels = apply_filters("cpt_register_tax_labels_$cpt_key", isset($post_metas['labels']) && is_array($post_metas['labels']) ? $post_metas['labels'] : []);
    419                 unset($post_metas['labels']);
    420 
    421                 $post_metas['rewrite']['slug'] = $cpt_slug;
    422 
    423                 $registration_args = apply_filters("cpt_register_tax_args_$cpt_key", $post_metas);
    424 
    425                 (new CPT\Taxonomy)->register(
    426                     $cpt_key,
    427                     $cpt_singular,
    428                     $cpt_plural,
    429                     $post_types,
    430                     $registration_args,
    431                     $registration_labels
    432                 );
    433             }
    434 
    435             $this->flush_rewrite_rules($created_post_types);
    436         }
    437 
    438         public function created_fields_groups()
    439         {
    440             $created_fields_groups = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name . '_field']);
    441 
    442             foreach ($created_fields_groups as $fields_group) {
    443                 $position = !empty(get_post_meta($fields_group->ID, 'position', true)) ? get_post_meta($fields_group->ID, 'position', true) : 'normal';
    444                 $order = get_post_meta($fields_group->ID, 'order', true);
    445                 $supports = get_post_meta($fields_group->ID, 'supports', true);
    446                 $admin_only = get_post_meta($fields_group->ID, 'admin_only', true);
    447                 $fields = !empty(get_post_meta($fields_group->ID, 'fields', true)) ? array_map(
    448                     function ($field) {
    449                         $field['extra'] = isset($field['extra'][$field['type']]) ? $field['extra'][$field['type']] : [];
    450                         foreach ($field as $key => $value) {
    451                             if (substr($key, 0, 5) === "wrap_") {
    452                                 if (!empty($value)) {
    453                                     $field['wrap'][str_replace("wrap_", "", $key)] = $value;
    454                                 }
    455                                 unset($field[$key]);
    456                             }
    457                         }
    458                         return $field;
    459                     },
    460                     get_post_meta($fields_group->ID, 'fields', true)
    461                 ) : [];
    462                 if (is_array($supports) && (($admin_only == 'true' && current_user_can('administrator')) || ($admin_only !== 'true' && current_user_can('edit_posts')))) {
    463                     foreach ($supports as $content) {
    464                         $content_type = 'cpt';
    465 
    466                         if(strpos($content, '/') !== false){
    467                             $content_type = explode('/', $content)[0];
    468                             $content = explode('/', $content)[1];
    469                         }
    470 
    471                         (new CPT\MetaBox())->add(
    472                             $content,
    473                             __($fields_group->post_title, 'custom-post-types'),
    474                             $fields,
    475                             $position,
    476                             $content_type
    477                         );
    478                     }
     721                if (!$this->isProVersionActive()) {
     722                    $links[] = sprintf(
     723                        '<a href="%1$s" target="_blank" aria-label="%2$s" style="font-weight: bold;"> %2$s </a>',
     724                        $this->getInfo('plugin_url'),
     725                        __('Get PRO', 'custom-post-types')
     726                    );
    479727                }
    480728            }
    481         }
    482 
    483         public function created_templates()
    484         {
    485             $created_templates = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name . '_template']);
    486 
    487             add_filter('template_include', function ($load_template) use ($created_templates) {
    488                 $template = new CPT\Template();
    489                 $template_blank_path = $template->get_blank_template();
    490                 $themes_supports_rules = apply_filters('cpt_themes_supports_rules', []);
    491                 if (!$template_blank_path) {
    492                     if ($template->copy_from_current_theme($themes_supports_rules) || $template->copy_from_old_version())
    493                         $template_blank_path = $template->get_blank_template();
    494                 }
    495                 if (!$template_blank_path) return $load_template;
    496 
    497                 global $post;
    498                 $current_post_type = isset($post->post_type) ? $post->post_type : false;
    499 
    500                 foreach ($created_templates as $created_template) {
    501                     $created_template_post_type = get_post_meta($created_template->ID, 'supports', true);
    502                     $created_template_wrap = get_post_meta($created_template->ID, 'wrap', true);
    503                     if (empty($created_template_post_type)) continue;
    504                     if ($created_template_wrap !== 'blank') continue;
    505                     if ($created_template_post_type == $current_post_type) return $template_blank_path;
    506                 }
    507 
    508                 return $load_template;
    509             }, 0);
    510 
    511             add_filter('the_content', [$this, 'filter_the_content'], $this->priority);
    512         }
    513 
    514         public function filter_the_content($content)
    515         {
    516             $created_templates = get_posts(['posts_per_page' => -1, 'post_type' => $this->cpt_ui_name . '_template']);
    517             global $post;
    518             $current_post_type = $post->post_type;
    519 
    520             foreach ($created_templates as $created_template) {
    521                 $created_template_post_type = get_post_meta($created_template->ID, 'supports', true);
    522                 if (empty($created_template_post_type)) continue;
    523                 if ($created_template_post_type == $current_post_type) {
    524                     remove_filter('the_content', [$this, 'filter_the_content'], $this->priority);
    525                     $content = apply_filters('the_content', $created_template->post_content);
    526                     add_filter('the_content', [$this, 'filter_the_content'], $this->priority);
    527                 };
    528             }
    529 
    530             return $content;
    531         }
    532 
    533         public function init_assets()
    534         {
    535             add_action('admin_enqueue_scripts', function () {
    536                 wp_enqueue_media();
    537                 wp_enqueue_editor();
    538                 wp_enqueue_style($this->cpt_ui_name . '_css', plugins_url('assets/css/backend.css', __FILE__));
    539                 wp_enqueue_script($this->cpt_ui_name . '_js', plugins_url('assets/js/backend.js', __FILE__), ['jquery', 'wp-i18n']);
    540                 wp_add_inline_script($this->cpt_ui_name . '_js', "window.lodash = _.noConflict();");
    541                 $vars = [
    542                     'ajax_url' => admin_url('admin-ajax.php'),
    543                     'ajax_nonce' => wp_create_nonce('cpt-nonce'),
    544                 ];
    545                 wp_localize_script($this->cpt_ui_name . '_js', 'cpt', $vars);
    546                 wp_set_script_translations($this->cpt_ui_name . '_js', 'custom-post-types');
    547             });
    548             add_action('admin_footer', function () {
    549                 echo '<div class="cpt-import-svg">';
    550                 foreach (glob(CPT_PATH . "assets/*.svg") as $filename) {
    551                     echo file_get_contents($filename);
    552                 }
    553                 echo '</div>';
    554             });
    555         }
    556 
    557         public function action_links()
    558         {
    559             add_filter('plugin_action_links', function ($links, $file) {
    560                 if ($file == 'custom-post-types/custom-post-types.php') {
    561                     $links[] = sprintf('<a href="%s" target="_blank"> %s </a>', CPT_PLUGIN_SUPPORT_URL, __('Support', 'custom-post-types'));
    562                 }
    563                 return $links;
    564             }, $this->priority, 2);
    565         }
    566 
    567         public function notices()
    568         {
    569             if (!is_admin()) return;
    570             if (
    571                 cpt_is_current_screen($this->cpt_ui_name) ||
    572                 cpt_is_current_screen($this->cpt_ui_name . '_tax') ||
    573                 cpt_is_current_screen($this->cpt_ui_name . '_field') ||
    574                 cpt_is_current_screen($this->cpt_ui_name . '_template')
    575                 ) {
    576                 $buttons = [
    577                     [
    578                         'link' => CPT_PLUGIN_REVIEW_URL,
    579                         'label' => __('Write a Review', 'custom-post-types'),
    580                         'target' => '_blank',
    581                         'cta' => true
    582                     ],
    583                     [
    584                         'link' => CPT_PLUGIN_DONATE_URL,
    585                         'label' => __('Make a Donation', 'custom-post-types'),
    586                         'target' => '_blank'
    587                     ],
    588                     [
    589                         'link' => CPT_PLUGIN_URL,
    590                         'label' => __('Get PRO version', 'custom-post-types'),
    591                         'target' => '_blank'
    592                     ],
    593                 ];
    594                 if ($this->is_pro_version_active()) {
    595                     unset($buttons[0]);
    596                 }
    597                 (new CPT\Notice)->add(
    598                     'welcome_notice',
    599                     __('Thanks for using this plugin! Do you want to help us grow to add new features?', 'custom-post-types') . '<br><br>' . sprintf(__('The new version %s introduces a lot of new features and improves the core of the plugin.<br>For any problems you can download the previous version %s from the official page of the plugin from WordPress.org (Advanced View > Previous version).', 'custom-post-types'), '<u>' . CPT_VER . '</u>', '<u>2.1.19</u>'),
    600                     'success',
    601                     false,
    602                     -1,
    603                     $buttons
    604                 );
    605             }
    606 
    607            
    608             (new CPT\Notice)->add(
    609                 'version_4_notice',
    610                 "<strong><u>Version 4.x.x will be released on May 1, 2023. This version contains important changes.</u></strong><br><br>
    611                 Thanks to the support of the <strong>thousands of users who use this amazing plugin</strong>, we have worked to improve and make this the best plugin for customizing WordPress.<br>
    612                 The new version makes the plugin a real framework, it will make it easy to extend WordPress with post types, taxonomies, field groups, templates and <strong>settings pages</strong> directly from the WordPress dashboard.<br>
    613                 The same customizations will be possible via PHP code using specific hooks, also allowing you to add <strong>administrative notices</strong>.<br>
    614                 We are sure that this will make your experience with the plugin much better.<br>
    615                 As with all major releases that include major changes to avoid problems or data loss, <strong>we encourage all users using versions prior to 4.x.x to backup the database or turn off automatic updates</strong>.<br><br>
    616                 <strong><u>We are not responsible for any problems or loss of data.</u></strong><br><br>
    617                 The previous FREE version is always available, to download previous versions visit the <strong>PREVIOUS VERSIONS</strong> section on the Advanced View page.<br>
    618                 After the release, for all users who report bugs or malfunctions we will offer <strong>special discount coupons</strong>.<br><br>
    619                 Thank you all for the support ❤",
    620                 'warning',
    621                 false,
    622                 -1
    623             );
    624 
    625            
    626             (new CPT\Notice)->add(
    627                 'beta_4_notice',
    628                 "<strong><u>Version 4.x.x BETA is ready.</u></strong><br><br>
    629                 You can download and install the new version (in staging or local environment or new websites).<br>
    630                 Here are 100 reasons to ask for your help ☺︎<br>
    631                 The <strong>first 50 users who send bug reports or suggestions</strong> will receive the <strong><u>PRO version free for lifetime</u></strong>.<br>
    632                 The <strong>following 50 users who send bug reports or suggestions</strong> will receive a <strong><u>lifetime discount code (70% value) for the PRO version</u></strong>.<br>
    633                 All users who send bug reports or valid suggestions will be able to try the PRO version free for 1 month (<strong>use online file sharing services to attach links to screenshots or screen recordings</strong>).<br><br>
    634                 Thank you all for the support ❤",
    635                 'success',
    636                 false,
    637                 -1,
    638                 [
    639                     [
    640                         'link' => 'https://99zw.short.gy/cpt-4-beta',
    641                         'label' => __('Download BETA version', 'custom-post-types'),
    642                         'target' => '_blank',
    643                         'cta' => true
    644                     ],
    645                     [
    646                         'link' => 'https://totalpress.org/support?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types-beta',
    647                         'label' => __('Send bug reports or suggestions', 'custom-post-types'),
    648                         'target' => '_blank'
    649                     ]
    650                 ]
    651             );
    652 
    653 
    654             if (cpt_is_current_screen($this->cpt_ui_name . '_template')) {
    655                 $template = new CPT\Template();
    656                 $template_blank_path = $template->get_blank_template();
    657                 $themes_supports_rules = apply_filters('cpt_themes_supports_rules', []);
    658                 if (!$template_blank_path) {
    659                     if ($template->copy_from_current_theme($themes_supports_rules) || $template->copy_from_old_version())
    660                         $template_blank_path = $template->get_blank_template();
    661                 }
    662                 if (!$template_blank_path) {
    663                     $buttons = [
    664                         [
    665                             'link' => CPT_PLUGIN_SUPPORT_URL,
    666                             'label' => __('Ask for integration', 'custom-post-types'),
    667                             'target' => '_blank'
    668                         ],
    669                         [
    670                             'link' => 'https://developer.wordpress.org/themes/template-files-section/post-template-files/',
    671                             'label' => __('WordPress documentation', 'custom-post-types'),
    672                             'target' => '_blank'
    673                         ]
    674                     ];
    675                     (new CPT\Notice)->add('theme_not_supported', __('The "Blank" wrap type cannot be used for custom templates.<br>The current theme folder does not contain the "single.php" file or the file does not contain the classic loop (<em>while (have_posts()) {...}</em>).', 'custom-post-types'), 'error', true, false, $buttons);
    676                 }
    677             }
    678         }
    679 
    680         public function shortcodes()
    681         {
    682             if (!is_admin() && !cpt_is_rest()) {
     729            return $links;
     730        }, PHP_INT_MAX, 2);
     731    }
     732
     733    /**
     734     * @return void
     735     */
     736    private function registerShortcodes()
     737    {
     738        // Shortcodes
     739        add_action('wp', function () {
     740            if (!is_admin() && !$this->isRest()) {
    683741                global $post;
    684742                add_shortcode('custom-field', function ($atts) { // 2.x Compatibility
     
    700758                        return current_user_can('edit_posts') ? "<pre>" . implode("</pre><pre>", $errors) . "</pre>" : '';
    701759                    }
    702                     return cpt_get_field($a['key'], $a['post-id']);
     760                    return $this->getPostField($a['key'], $a['post-id']);
    703761                });
    704762                add_shortcode('custom-tax', function ($atts) { // 2.x Compatibility
     
    729787                });
    730788            }
    731         }
    732 
    733         public function settings_page()
    734         {
    735             add_action('admin_menu', function () {
    736                 remove_submenu_page('edit.php?post_type=' . $this->cpt_ui_name, 'post-new.php?post_type=' . $this->cpt_ui_name);
    737                 add_submenu_page('edit.php?post_type=' . $this->cpt_ui_name, __('Tools & Infos &lsaquo; Extend / Manage', 'custom-post-types'), __('Tools & Infos', 'custom-post-types'), 'administrator', 'tools', function () {
    738                     $main_page_url = menu_page_url('tools', false);
    739                     $export_page_url = $main_page_url . '&action=export';
    740                     $import_page_url = $main_page_url . '&action=import';
    741                     $db_update_page_url = $main_page_url . '&action=database-update&nonce=' . wp_create_nonce('cpt-nonce');
    742                     $request_page = isset($_GET['action']) && !empty($_GET['action']) && in_array($_GET['action'], ['export', 'import']) ? $_GET['action'] : 'main';
    743                     $is_current_page = function ($current) use ($request_page) {
    744                         return $current == $request_page;
    745                     };
    746 
    747                 ?>
    748                     <div class="cpt-tools-page">
    749                         <h1><?php _e('Custom post types &rsaquo; Tools & Infos', 'custom-post-types'); ?></h1>
    750                         <nav class="nav-tab-wrapper wp-clearfix" aria-label="Secondary menu">
    751                             <?php
    752                             printf(
    753                                 '<a href="%s" class="nav-tab %s">%s</a>',
    754                                 $main_page_url,
    755                                 $is_current_page('main') ? 'nav-tab-active' : '',
    756                                 __('Infos', 'custom-post-types')
    757                             );
    758                             printf(
    759                                 '<a href="%s" class="nav-tab %s">%s</a>',
    760                                 $export_page_url,
    761                                 $is_current_page('export') ? 'nav-tab-active' : '',
    762                                 __('Export', 'custom-post-types')
    763                             );
    764                             printf(
    765                                 '<a href="%s" class="nav-tab %s">%s</a>',
    766                                 $import_page_url,
    767                                 $is_current_page('import') ? 'nav-tab-active' : '',
    768                                 __('Import', 'custom-post-types')
    769                             );
    770                             printf(
    771                                 '<a href="%s" class="nav-tab" target="_blank">%s <span class="dashicons dashicons-external" style="text-decoration: none;"></span></a>',
    772                                 CPT_PLUGIN_DOC_URL,
    773                                 __('Documentation', 'custom-post-types')
    774                             );
    775                             ?>
    776                         </nav>
    777                         <div class="cpt-tools-page-content page-<?php echo $request_page; ?>">
    778                             <?php
    779                             switch ($request_page) {
    780                                 case 'import':
    781                                     echo '<p>' . __('This tool allows you to <u>import</u> all plugin settings (post types, taxonomies, field groups and templates).', 'custom-post-types') . '</p>';
    782                                     if (!$this->is_pro_version_active()) {
    783                                         echo $this->get_pro_banner();
    784                                     } else {
    785                                         do_action('cpt_import_page');
    786                                     }
    787                                     break;
    788                                 case 'export':
    789                                     echo '<p>' . __('This tool allows you to <u>export</u> all plugin settings (post types, taxonomies, field groups and templates).', 'custom-post-types') . '</p>';
    790                                     if (!$this->is_pro_version_active()) {
    791                                         echo $this->get_pro_banner();
    792                                     } else {
    793                                         do_action('cpt_export_page');
    794                                     }
    795                                     break;
    796                                 default:
    797                             ?>
    798                                     <p>
    799                                         <?php printf(__('This plugin was created and designed entirely by <strong>Andrea De Giovine</strong>, an <a href="%s" title="italian freelance developer">Italian freelance developer <span class="dashicons dashicons-external" style="text-decoration: none;"></span></a> with over 10 years of experience in developing WordPress components (themes and plugins).', 'custom-post-types'), CPT_PLUGIN_DEV_URL); ?>
    800                                     </p>
    801                                     <p>
    802                                         <?php _e('The purpose of the plugin is to <u>extend the features of the CMS</u> by adding custom content types without writing code or knowledge of development languages.', 'custom-post-types'); ?>
    803                                     </p>
    804                                     <p>
    805                                         <?php _e('This plugin is <strong>FREE</strong> and the developer guarantees frequent updates (for security and compatibility), if this plugin is useful <u>please support the development</u>.', 'custom-post-types'); ?>
    806                                     </p>
    807                                     <?php do_action('cpt_license_key_form'); ?>
    808                                     <div class="cpt-container">
    809                                         <div class="cpt-row">
    810                                             <div class="cpt-col-3">
    811                                                 <h2><?php _e('Support the project', 'custom-post-types'); ?></h2>
    812                                                 <?php
    813                                                 if (!$this->is_pro_version_active()) {
    814                                                     printf(
    815                                                         '<p><a href="%s" class="button button-primary button-hero" target="_blank">%s</a></p>',
    816                                                         CPT_PLUGIN_URL,
    817                                                         __('Get PRO version', 'custom-post-types')
    818                                                     );
    819                                                 }
    820                                                 printf(
    821                                                     '<p><a href="%s" class="button button-primary" target="_blank">%s</a></p>',
    822                                                     CPT_PLUGIN_DONATE_URL,
    823                                                     __('Make a Donation', 'custom-post-types')
    824                                                 );
    825                                                 printf(
    826                                                     '<p><a href="%s" class="button button-primary" target="_blank">%s</a></p>',
    827                                                     CPT_PLUGIN_REVIEW_URL,
    828                                                     __('Write a Review', 'custom-post-types')
    829                                                 );
    830                                                 ?>
    831                                             </div>
    832                                             <div class="cpt-col-3">
    833                                                 <h2><?php _e('Other infos', 'custom-post-types'); ?></h2>
    834                                                 <?php
    835                                                 printf(
    836                                                     '<p><a href="%s" class="button button-secondary" target="_blank">%s</a></p>',
    837                                                     CPT_PLUGIN_WP_URL,
    838                                                     __('WordPress.org Plugin Page', 'custom-post-types')
    839                                                 );
    840                                                 printf(
    841                                                     '<p><a href="%s" class="button button-secondary" target="_blank">%s</a></p>',
    842                                                     CPT_PLUGIN_SUPPORT_URL,
    843                                                     __('Official Support Page', 'custom-post-types')
    844                                                 );
    845                                                 printf(
    846                                                     '<p><a href="%s" class="button button-secondary" target="_blank">%s</a></p>',
    847                                                     CPT_PLUGIN_DOC_URL,
    848                                                     __('Plugin Documentation', 'custom-post-types')
    849                                                 );
    850                                                 ?>
    851                                             </div>
    852                                             <div class="cpt-col-3">
    853                                                 <h2><?php _e('Tools', 'custom-post-types'); ?></h2>
    854                                                 <?php
    855                                                 printf(
    856                                                     '<p><a href="%s" class="button button-secondary">%s</a></p>',
    857                                                     $export_page_url,
    858                                                     __('Export settings', 'custom-post-types')
    859                                                 );
    860                                                 printf(
    861                                                     '<p><a href="%s" class="button button-secondary">%s</a></p>',
    862                                                     $import_page_url,
    863                                                     __('Import settings', 'custom-post-types')
    864                                                 );
    865                                                 // printf(
    866                                                 //     '<p><a href="%s" class="button button-secondary">%s</a></p>',
    867                                                 //     $db_update_page_url,
    868                                                 //     __('Redo database update (2.x -> 3.x)', 'custom-post-types')
    869                                                 // );
    870                                                 ?>
    871                                             </div>
    872                                         </div>
    873                                     </div>
    874                             <?php
    875                                     break;
    876                             }
    877                             ?>
    878                         </div>
    879                     </div>
    880 <?php
    881                 });
     789        });
     790    }
     791
     792    /**
     793     * @return void
     794     */
     795    private function ajaxAction()
     796    {
     797        $this->getNotices()->ajaxAction();
     798        $this->getTemplates()->ajaxAction();
     799
     800        $ajaxActions = (array)apply_filters($this->getHookName('register_ajax_actions'), []);
     801        foreach ($ajaxActions as $action => $args) {
     802            add_action('wp_ajax_' . $action, function () use ($args) {
     803                $nonce = !empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], $this->getInfo('nonce_key')) ? true : false;
     804                if (!$nonce) {
     805                    wp_send_json_error();
     806                }
     807                foreach ($args['requiredParams'] as $param) {
     808                    if (empty($_REQUEST[$param])) {
     809                        wp_send_json_error();
     810                    }
     811                }
     812                if (empty($args['callback']) || !is_callable($args['callback'])) {
     813                    wp_send_json_error();
     814                }
     815                $result = $args['callback']($_REQUEST);
     816                wp_send_json_success($result);
    882817            });
    883818        }
    884 
    885         public function get_pro_banner()
    886         {
    887             $output = '<p><strong>' . __('This feature is included in the <u>PRO version</u> only.', 'custom-post-types') . '</strong></p>';
    888             $output .= sprintf(
    889                 '<p><a href="%s" class="button button-primary button-hero" target="_blank">%s</a></p>',
    890                 CPT_PLUGIN_URL,
    891                 __('Get PRO version', 'custom-post-types')
     819    }
     820
     821    /**
     822     * @return void
     823     */
     824    private function applyUpdates()
     825    {
     826        $installedVersion = get_option($this->getOptionName('version'), null);
     827        $currentVersion = $this->getInfo('version');
     828
     829        if (version_compare($installedVersion, $currentVersion, '=')) {
     830            return;
     831        }
     832
     833        if (version_compare($installedVersion, $currentVersion, '<')) {
     834            // Apply updates
     835        }
     836
     837        update_option($this->getOptionName('version'), $currentVersion);
     838        update_option($this->getOptionName('installation_time'), time());
     839    }
     840
     841    private function pluginActions(){
     842        register_activation_hook( __FILE__, function(){
     843            $request_url = add_query_arg(
     844                ['id' => 92, 'action' => 'activate', 'domain' => md5(get_home_url())],
     845                'https://totalpress.org/wp-json/totalpress/v1/plugin-growth'
    892846            );
    893             return '<div class="cpt-pro-banner">' . $output . '</div>';
    894         }
    895 
    896         public function is_pro_version_active()
    897         {
    898             $return = false;
    899             $pro_version = in_array('custom-post-types-pro/custom-post-types-pro.php', apply_filters('active_plugins', get_option('active_plugins')));
    900             if ($pro_version) {
    901                 $return = true;
    902             }
    903             return $return;
    904         }
    905 
    906         public function flush_rewrite_rules($posts = [])
    907         {
    908             $ids = [];
    909             foreach ($posts as $post) {
    910                 if ($post->ID) $ids[] = $post->ID;
    911             }
    912             if (!empty($ids)) {
    913                 $registered_cpt_ids = get_option('custom_post_types_registered_cpt_ids', []);
    914                 $cpt_ids_already_registered = !array_diff($ids, $registered_cpt_ids);
    915                 if (empty($registered_cpt_ids) || !$cpt_ids_already_registered) {
    916                     $new_registered_cpt_ids = array_merge($registered_cpt_ids, $ids);
    917                     update_option('custom_post_types_registered_cpt_ids', array_unique($new_registered_cpt_ids));
    918                     flush_rewrite_rules();
    919                 }
    920             }
    921         }
    922 
    923         private function applyUpdates()
    924         {
    925             $installedVersion = get_option('custom_post_types_version', null);
    926             $currentVersion = '3.1.3';
    927    
    928             if (version_compare($installedVersion, $currentVersion, '=')) {
    929                 return;
    930             }
    931    
    932             update_option('custom_post_types_version', $currentVersion);
    933             update_option('custom_post_types_installation_time', time());
    934         }
    935     }
    936     new totalpress_custom_post_types();
     847            wp_remote_get($request_url);
     848        });
     849        register_deactivation_hook( __FILE__, function(){
     850            $request_url = add_query_arg(
     851                ['id' => 92, 'action' => 'deactivate', 'domain' => md5(get_home_url())],
     852                'https://totalpress.org/wp-json/totalpress/v1/plugin-growth'
     853            );
     854            wp_remote_get($request_url);
     855        });
     856    }
     857
     858    /**
     859     * @return void
     860     */
     861    private function initRegisteredContents()
     862    {
     863        // Init registered content
     864        add_action('init', function () {
     865            $this->getPostTypes()->initRegisteredPostTypes();
     866            $this->getTaxonomies()->initRegisteredTaxonomies();
     867            $this->getFields()->initRegisteredGroups();
     868            $this->getAdminPages()->initRegisteredPages();
     869            $this->getNotices()->initRegisteredNotices();
     870        }, PHP_INT_MAX);
     871    }
     872
     873    /**
     874     * @return bool
     875     */
     876    private function loadJs()
     877    {
     878        $currentScreen = get_current_screen();
     879        if (
     880            (!empty($currentScreen->id) &&
     881                (
     882                    in_array($currentScreen->id, $this->getFields()->screensWithFields) ||
     883                    (
     884                        explode('_page_', $currentScreen->id) &&
     885                        !empty(explode('_page_', $currentScreen->id)[1]) &&
     886                        in_array('_page_' . explode('_page_', $currentScreen->id)[1], $this->getFields()->screensWithFields)
     887                    )
     888                )
     889            ) ||
     890            $this->getNotices()->hasNotices
     891        ) {
     892            return true;
     893        }
     894        return false;
     895    }
     896
     897    /**
     898     * @param $key
     899     * @param $post_id
     900     * @return string
     901     */
     902    private function getPostField($key, $post_id = false)
     903    {
     904        global $post;
     905        $post = $post_id && get_post($post_id) ? get_post($post_id) : $post;
     906        $core_fields = [
     907            'title' => get_the_title($post->ID),
     908            'content' => get_the_content($post->ID),
     909            'excerpt' => get_the_excerpt($post->ID),
     910            'thumbnail' => get_the_post_thumbnail($post->ID, 'full'),
     911            'author' => sprintf('<a href="%1$s" title="%2$s" aria-title="%2$s">%2$s</a>', get_author_posts_url(get_the_author_meta('ID')), get_the_author()),
     912            'written_date' => get_the_date(get_option('date_format', "d/m/Y"), $post->ID),
     913            'modified_date' => get_the_modified_date(get_option('date_format', "d/m/Y"), $post->ID),
     914        ];
     915        $value = isset($core_fields[$key]) ? $core_fields[$key] : get_post_meta($post->ID, $key, true);
     916        $post_type_fields = $this->getFieldsByPostType($post->post_type);
     917        $type = isset($post_type_fields[$key]['type']) ? $post_type_fields[$key]['type'] : $key;
     918        $output = $value;
     919        $type_get_callback = $this->getFields()->getAvailableFieldGetCallback($type);
     920        if ($type_get_callback) {
     921            add_filter($this->getHookName("get_field_type_" . $type), $type_get_callback);
     922        }
     923        $output = apply_filters($this->getHookName("get_field_type_" . $type), $output, $value, $post->post_type, $post->ID);
     924        $output = apply_filters($this->getHookName("get_field_" . $key), $output, $value, $post->post_type, $post->ID);
     925        $output = is_array($output) ? (current_user_can('edit_posts') ? '<pre>' . print_r($output, true) . '</pre>' : '') : $output;
     926        return $output;
     927    }
    937928}
     929
     930if (!in_array('custom-post-types-pro/custom-post-types-pro.php', apply_filters('active_plugins', get_option('active_plugins')))) {
     931    new Core();
     932}
  • custom-post-types/trunk/readme.txt

    r2911291 r2915886  
    44Donate link: https://totalpress.org/donate?utm_source=wordpress_org&utm_medium=plugin_page&utm_campaign=custom_post_types
    55Requires at least: 4.0
    6 Tested up to: 6.1
    7 Stable tag: 3.1.3
     6Tested up to: 6.2
     7Stable tag: 4.0.0
    88Requires PHP: 5.6
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Custom post types, custom taxonomies, custom fields and custom templates easily, directly from the WordPress dashboard without writing code.
     12Custom post types, custom taxonomies, custom fields, custom templates, custom admin pages and custom admin notices easily, directly from the WordPress dashboard without writing code.
    1313
    1414== Description ==
     
    1818* create custom post types;
    1919* create custom taxonomies (eg: categories, tags, etc.);
     20* create custom admin pages;
     21* create custom admin notices;
    2022* create custom fields on post types;
    2123* create custom fields on taxonomies;
    2224* create custom fields on users;
    23 * create custom fields on settings pages;
     25* create custom fields on admin pages;
    2426* create custom templates;
    2527
     
    4042Do you like the **Custom post types** plugin? Leave a [5-Star Review](https://wordpress.org/support/plugin/custom-post-types/reviews/?filter=5 "Write Review") to recommend it to other users.
    4143
    42 == ⚠⚠ NEW MAJOR VERSION COOMING SOON ⚠⚠ ==
    43 
    44 **Version 4.x.x will be released on May 1, 2023. This version contains important changes.**
     44== ⚠⚠ NEW MAJOR VERSION IS OUT (4.x.x) ⚠⚠ ==
     45
     46**Version 4.x.x will be released. This version contains important changes.**
    4547
    4648Thanks to the support of the **thousands of users who use this amazing plugin**, we have worked to improve and make this the best plugin for customizing WordPress.
     
    6264Thank you all for the support ❤
    6365
    64 == 💯 Version 4.x.x BETA is ready 💯 ==
    65 
    66 You can download and install the new version (in staging or local environment or new websites).
    67 Here are 100 reasons to ask for your help 💯
    68 The **first 50 users who send bug reports or suggestions** will receive the **PRO version free for lifetime**.
    69 The **following 50 users who send bug reports or suggestions** will receive a **lifetime discount code (70% value) for the PRO version**.
    70 All users who send bug reports or valid suggestions will be able to try the PRO version free for 1 month (**use online file sharing services to attach links to screenshots or screen recordings**).
    71 
    72 Thank you all for the support ❤
    73 
    74 **[DOWNLOAD NEW BETA VERSION](https://99zw.short.gy/cpt-4-beta "Download beta version")**
    7566**[SEND BUG REPORTS OR SUGGESTION](https://totalpress.org/support?utm_source=wordpress_org&utm_medium=plugin_page&utm_campaign=custom-post-types-beta "Send bug reports or suggestions")**
    7667
     
    9081== ⚡ Custom post types - PRO FEATURES ⚡ ==
    9182
    92 ✔ **CREATE CUSTOM POST TYPES** BY CODE
    93 ✔ **CREATE CUSTOM TAXONOMIES** BY CODE
    94 ✔ **CREATE CUSTOM FIELDS** BY CODE
     83✔ **CREATE CUSTOM ADMIN PAGES**
     84✔ **CREATE CUSTOM ADMIN NOTICES**
     85✔ **CREATE CUSTOM TEMPLAES**
    9586✔ **EXPORT** ALL SETTINGS
    9687✔ **IMPORT** ALL SETTINGS
     
    174165* create / edit custom taxonomies;
    175166* create / edit custom fields;
     167* create / edit custom admin pages;
     168* create / edit custom admin notices;
    176169* create / edit custom templates.
    177170
     
    246239
    247240== Changelog ==
     241
     242= 4.0.0 =
     243* New major release
    248244
    249245= 3.1.2 =
     
    512508== Upgrade Notice ==
    513509
     510= 4.0.0 =
     511New major release
     512
    514513= 3.1.2 =
    515514Announcement of version 4.x.x
Note: See TracChangeset for help on using the changeset viewer.