diff --git a/acf.php b/acf.php
index 854b4cf..f1b0884 100644
--- a/acf.php
+++ b/acf.php
@@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields.
-Version: 5.9.7
+Version: 5.9.8
Author: Delicious Brains
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
@@ -17,7 +17,7 @@ if( ! class_exists('ACF') ) :
class ACF {
/** @var string The plugin version number. */
- var $version = '5.9.7';
+ var $version = '5.9.8';
/** @var array The plugin settings array. */
var $settings = array();
diff --git a/assets/build/css/acf-dark.css b/assets/build/css/acf-dark.css
new file mode 100644
index 0000000..2154f93
--- /dev/null
+++ b/assets/build/css/acf-dark.css
@@ -0,0 +1,316 @@
+/*--------------------------------------------------------------------------------------------
+*
+* Dark mode
+*
+* WordPress plugin: https://en-au.wordpress.org/plugins/dark-mode/
+* Github Documentation: https://github.com/danieltj27/Dark-Mode/wiki/Help:-Plugin-Compatibility-Guide
+*
+*--------------------------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------------------------
+*
+* Global
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-box {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+.acf-box .title,
+.acf-box .footer {
+ border-color: #23282d;
+}
+.acf-box h2 {
+ color: #bbc8d4;
+}
+.acf-box table, .acf-box tbody, .acf-box tr {
+ background: transparent !important;
+}
+
+.acf-thead {
+ color: #bbc8d4;
+ border-color: #191f25;
+}
+
+.acf-tfoot {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-table.-clear,
+.acf-table.-clear tr {
+ background: transparent !important;
+}
+
+.acf-loading-overlay {
+ background: rgba(0, 0, 0, 0.5);
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Fields
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-fields > .acf-field {
+ border-color: #23282d;
+}
+
+.acf-fields.-left > .acf-field:before {
+ background: rgba(0, 0, 0, 0.1);
+ border-color: #23282d;
+}
+
+.acf-fields.-border {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+
+.acf-field[data-width] + .acf-field[data-width] {
+ border-color: #23282d;
+}
+
+.acf-input-prepend,
+.acf-input-append {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+
+.acf-fields > .acf-tab-wrap {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+.acf-fields > .acf-tab-wrap .acf-tab-group {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-fields > .acf-tab-wrap .acf-tab-group li a {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-fields > .acf-tab-wrap .acf-tab-group li a:hover {
+ background-color: #2d3136;
+ border-color: #23282d;
+ color: #bbc8d4;
+}
+.acf-fields > .acf-tab-wrap .acf-tab-group li.active a {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+
+.acf-fields.-sidebar:before {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-fields.-sidebar.-left:before {
+ background-color: #2d3136;
+ border-color: #23282d;
+ background: #23282d;
+}
+.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group li a {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group li.active a {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-file-uploader .show-if-value {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+.acf-file-uploader .show-if-value .file-icon {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-oembed {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-oembed .title {
+ background-color: #50626f;
+ border-color: #191f25;
+ color: #fff;
+}
+
+.acf-gallery {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-gallery .acf-gallery-main {
+ background: #23282d;
+}
+.acf-gallery .acf-gallery-attachment .margin {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-gallery .acf-gallery-side {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-gallery .acf-gallery-side .acf-gallery-side-info {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-gallery .acf-gallery-toolbar {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-button-group label:not(.selected) {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-switch:not(.-on) {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-switch:not(.-on) .acf-switch-slider {
+ background-color: #50626f;
+ border-color: #191f25;
+ color: #fff;
+}
+
+.acf-link .link-wrap {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-relationship .filters {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+.acf-relationship .selection {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-relationship .selection .choices,
+.acf-relationship .selection .choices-list,
+.acf-relationship .selection .values {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-taxonomy-field .categorychecklist-holder {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+.acf-google-map {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-google-map .title {
+ background-color: #50626f;
+ border-color: #191f25;
+ color: #fff;
+}
+
+.acf-accordion {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+
+.acf-field.acf-accordion .acf-accordion-content > .acf-fields {
+ border-color: #191f25;
+}
+
+.acf-flexible-content .layout {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+.acf-flexible-content .layout .acf-fc-layout-handle {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+.acf-flexible-content .layout .acf-fc-layout-handle .acf-fc-layout-order {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+
+#wpbody .acf-table {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+#wpbody .acf-table > tbody > tr,
+#wpbody .acf-table > thead > tr {
+ background: transparent;
+}
+#wpbody .acf-table > tbody > tr > td,
+#wpbody .acf-table > tbody > tr > th,
+#wpbody .acf-table > thead > tr > td,
+#wpbody .acf-table > thead > tr > th {
+ border-color: #191f25;
+}
+
+.acf-field select optgroup, .acf-field select optgroup:nth-child(2n) {
+ background: #50626f;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Field Group
+*
+*---------------------------------------------------------------------------------------------*/
+#acf-field-group-fields .acf-field-list-wrap {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+#acf-field-group-fields .acf-field-list .no-fields-message {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+}
+#acf-field-group-fields .acf-field-object {
+ background-color: #32373c;
+ border-color: #191f25;
+ color: #bbc8d4;
+ border-color: #23282d;
+}
+#acf-field-group-fields .acf-field-object table, #acf-field-group-fields .acf-field-object tbody, #acf-field-group-fields .acf-field-object tr, #acf-field-group-fields .acf-field-object td, #acf-field-group-fields .acf-field-object th {
+ background: transparent;
+ border-color: #23282d;
+}
+#acf-field-group-fields .acf-field-object .acf-field .acf-label {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+#acf-field-group-fields .acf-field-object.ui-sortable-helper {
+ border-color: #191f25;
+ box-shadow: none;
+}
+#acf-field-group-fields .acf-field-object.ui-sortable-placeholder {
+ background-color: #2d3136;
+ border-color: #23282d;
+ box-shadow: none;
+}
+#acf-field-group-fields .acf-field-object + .acf-field-object-tab::before,
+#acf-field-group-fields .acf-field-object + .acf-field-object-accordion::before {
+ background-color: #2d3136;
+ border-color: #23282d;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Admin: Tools
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-meta-box-wrap .acf-fields {
+ background-color: #50626f;
+ border-color: #191f25;
+ color: #fff;
+ background: transparent;
+}
\ No newline at end of file
diff --git a/assets/build/css/acf-dark.min.css b/assets/build/css/acf-dark.min.css
new file mode 100644
index 0000000..cbe89a0
--- /dev/null
+++ b/assets/build/css/acf-dark.min.css
@@ -0,0 +1 @@
+.acf-box{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-box .footer,.acf-box .title{border-color:#23282d}.acf-box h2{color:#bbc8d4}.acf-box table,.acf-box tbody,.acf-box tr{background:0 0!important}.acf-thead{color:#bbc8d4;border-color:#191f25}.acf-tfoot{background-color:#2d3136;border-color:#23282d}.acf-table.-clear,.acf-table.-clear tr{background:0 0!important}.acf-loading-overlay{background:rgba(0,0,0,.5)}.acf-fields>.acf-field{border-color:#23282d}.acf-fields.-left>.acf-field:before{background:rgba(0,0,0,.1);border-color:#23282d}.acf-fields.-border{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-field[data-width]+.acf-field[data-width]{border-color:#23282d}.acf-input-append,.acf-input-prepend{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-fields>.acf-tab-wrap{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-fields>.acf-tab-wrap .acf-tab-group{background-color:#2d3136;border-color:#23282d}.acf-fields>.acf-tab-wrap .acf-tab-group li a{background-color:#2d3136;border-color:#23282d}.acf-fields>.acf-tab-wrap .acf-tab-group li a:hover{background-color:#2d3136;border-color:#23282d;color:#bbc8d4}.acf-fields>.acf-tab-wrap .acf-tab-group li.active a{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-fields.-sidebar:before{background-color:#2d3136;border-color:#23282d}.acf-fields.-sidebar.-left:before{background-color:#2d3136;border-color:#23282d;background:#23282d}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li a{background-color:#2d3136;border-color:#23282d}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li.active a{background-color:#2d3136;border-color:#23282d}.acf-file-uploader .show-if-value{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-file-uploader .show-if-value .file-icon{background-color:#2d3136;border-color:#23282d}.acf-oembed{background-color:#2d3136;border-color:#23282d}.acf-oembed .title{background-color:#50626f;border-color:#191f25;color:#fff}.acf-gallery{background-color:#2d3136;border-color:#23282d}.acf-gallery .acf-gallery-main{background:#23282d}.acf-gallery .acf-gallery-attachment .margin{background-color:#2d3136;border-color:#23282d}.acf-gallery .acf-gallery-side{background-color:#2d3136;border-color:#23282d}.acf-gallery .acf-gallery-side .acf-gallery-side-info{background-color:#2d3136;border-color:#23282d}.acf-gallery .acf-gallery-toolbar{background-color:#2d3136;border-color:#23282d}.acf-button-group label:not(.selected){background-color:#2d3136;border-color:#23282d}.acf-switch:not(.-on){background-color:#2d3136;border-color:#23282d}.acf-switch:not(.-on) .acf-switch-slider{background-color:#50626f;border-color:#191f25;color:#fff}.acf-link .link-wrap{background-color:#2d3136;border-color:#23282d}.acf-relationship .filters{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-relationship .selection{background-color:#2d3136;border-color:#23282d}.acf-relationship .selection .choices,.acf-relationship .selection .choices-list,.acf-relationship .selection .values{background-color:#2d3136;border-color:#23282d}.acf-taxonomy-field .categorychecklist-holder{background-color:#2d3136;border-color:#23282d}.acf-google-map{background-color:#2d3136;border-color:#23282d}.acf-google-map .title{background-color:#50626f;border-color:#191f25;color:#fff}.acf-accordion{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-field.acf-accordion .acf-accordion-content>.acf-fields{border-color:#191f25}.acf-flexible-content .layout{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-flexible-content .layout .acf-fc-layout-handle{background-color:#2d3136;border-color:#23282d}.acf-flexible-content .layout .acf-fc-layout-handle .acf-fc-layout-order{background-color:#32373c;border-color:#191f25;color:#bbc8d4}#wpbody .acf-table{background-color:#2d3136;border-color:#23282d}#wpbody .acf-table>tbody>tr,#wpbody .acf-table>thead>tr{background:0 0}#wpbody .acf-table>tbody>tr>td,#wpbody .acf-table>tbody>tr>th,#wpbody .acf-table>thead>tr>td,#wpbody .acf-table>thead>tr>th{border-color:#191f25}.acf-field select optgroup,.acf-field select optgroup:nth-child(2n){background:#50626f}#acf-field-group-fields .acf-field-list-wrap{background-color:#32373c;border-color:#191f25;color:#bbc8d4}#acf-field-group-fields .acf-field-list .no-fields-message{background-color:#32373c;border-color:#191f25;color:#bbc8d4}#acf-field-group-fields .acf-field-object{background-color:#32373c;border-color:#191f25;color:#bbc8d4;border-color:#23282d}#acf-field-group-fields .acf-field-object table,#acf-field-group-fields .acf-field-object tbody,#acf-field-group-fields .acf-field-object td,#acf-field-group-fields .acf-field-object th,#acf-field-group-fields .acf-field-object tr{background:0 0;border-color:#23282d}#acf-field-group-fields .acf-field-object .acf-field .acf-label{background-color:#2d3136;border-color:#23282d}#acf-field-group-fields .acf-field-object.ui-sortable-helper{border-color:#191f25;box-shadow:none}#acf-field-group-fields .acf-field-object.ui-sortable-placeholder{background-color:#2d3136;border-color:#23282d;box-shadow:none}#acf-field-group-fields .acf-field-object+.acf-field-object-accordion::before,#acf-field-group-fields .acf-field-object+.acf-field-object-tab::before{background-color:#2d3136;border-color:#23282d}.acf-meta-box-wrap .acf-fields{background-color:#50626f;border-color:#191f25;color:#fff;background:0 0}
\ No newline at end of file
diff --git a/assets/build/css/acf-field-group.css b/assets/build/css/acf-field-group.css
new file mode 100644
index 0000000..d0afe76
--- /dev/null
+++ b/assets/build/css/acf-field-group.css
@@ -0,0 +1,481 @@
+/*--------------------------------------------------------------------------------------------
+*
+* Vars
+*
+*--------------------------------------------------------------------------------------------*/
+/* colors */
+/* acf-field */
+/* responsive */
+/*--------------------------------------------------------------------------------------------
+*
+* Mixins
+*
+*--------------------------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------------------------
+*
+* Field Group
+*
+*--------------------------------------------------------------------------------------------*/
+#acf-field-group-fields > .inside,
+#acf-field-group-locations > .inside,
+#acf-field-group-options > .inside {
+ padding: 0;
+ margin: 0;
+}
+
+.postbox .handle-order-higher,
+.postbox .handle-order-lower {
+ display: none;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Postbox: Publish
+*
+*---------------------------------------------------------------------------------------------*/
+#minor-publishing-actions,
+#misc-publishing-actions #visibility,
+#misc-publishing-actions .edit-timestamp {
+ display: none;
+}
+
+#minor-publishing {
+ border-bottom: 0 none;
+}
+
+#misc-pub-section {
+ border-bottom: 0 none;
+}
+
+#misc-publishing-actions .misc-pub-section {
+ border-bottom-color: #F5F5F5;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Postbox: Fields
+*
+*---------------------------------------------------------------------------------------------*/
+#acf-field-group-fields {
+ border: 0 none;
+ box-shadow: none;
+ /* links */
+ /* table header */
+ /* show keys */
+ /* fields */
+}
+#acf-field-group-fields > .postbox-header,
+#acf-field-group-fields > .handlediv,
+#acf-field-group-fields > .hndle {
+ display: none;
+}
+#acf-field-group-fields a {
+ text-decoration: none;
+}
+#acf-field-group-fields a:active, #acf-field-group-fields a:focus {
+ outline: none;
+ box-shadow: none;
+}
+#acf-field-group-fields .li-field-order {
+ width: 20%;
+}
+#acf-field-group-fields .li-field-label {
+ width: 30%;
+}
+#acf-field-group-fields .li-field-name {
+ width: 25%;
+}
+#acf-field-group-fields .li-field-type {
+ width: 25%;
+}
+#acf-field-group-fields .li-field-key {
+ display: none;
+}
+#acf-field-group-fields.show-field-keys .li-field-label,
+#acf-field-group-fields.show-field-keys .li-field-name,
+#acf-field-group-fields.show-field-keys .li-field-type,
+#acf-field-group-fields.show-field-keys .li-field-key {
+ width: 20%;
+}
+#acf-field-group-fields.show-field-keys .li-field-key {
+ display: block;
+}
+#acf-field-group-fields .acf-field-list-wrap {
+ border: #ccd0d4 solid 1px;
+}
+#acf-field-group-fields .acf-field-list {
+ background: #f5f5f5;
+ margin-top: -1px;
+ /* no fields */
+ /* empty */
+}
+#acf-field-group-fields .acf-field-list .no-fields-message {
+ padding: 15px 15px;
+ background: #fff;
+ display: none;
+}
+#acf-field-group-fields .acf-field-list.-empty .no-fields-message {
+ display: block;
+}
+.acf-admin-3-8 #acf-field-group-fields .acf-field-list-wrap {
+ border-color: #dfdfdf;
+}
+
+/* field object */
+.acf-field-object {
+ border-top: #eeeeee solid 1px;
+ background: #fff;
+ /* sortable */
+ /* meta */
+ /* handle */
+ /* open */
+ /*
+ // debug
+ &[data-save="meta"] {
+ > .handle {
+ border-left: #ffb700 solid 5px !important;
+ }
+ }
+
+ &[data-save="settings"] {
+ > .handle {
+ border-left: #0ec563 solid 5px !important;
+ }
+ }
+ */
+ /* hover */
+ /* settings */
+ /* conditional logic */
+}
+.acf-field-object.ui-sortable-helper {
+ border-top-color: #fff;
+ box-shadow: 0 0 0 1px #DFDFDF, 0 1px 4px rgba(0, 0, 0, 0.1);
+}
+.acf-field-object.ui-sortable-placeholder {
+ box-shadow: 0 -1px 0 0 #DFDFDF;
+ visibility: visible !important;
+ background: #F9F9F9;
+ border-top-color: transparent;
+ min-height: 54px;
+}
+.acf-field-object.ui-sortable-placeholder:after, .acf-field-object.ui-sortable-placeholder:before {
+ visibility: hidden;
+}
+.acf-field-object > .meta {
+ display: none;
+}
+.acf-field-object > .handle a {
+ -webkit-transition: none;
+ -moz-transition: none;
+ -o-transition: none;
+ transition: none;
+}
+.acf-field-object > .handle li {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ word-wrap: break-word;
+}
+.acf-field-object > .handle .acf-icon {
+ margin: 1px 0 0;
+ cursor: move;
+ background: transparent;
+ float: left;
+ height: 28px;
+ line-height: 26px;
+ width: 28px;
+ font-size: 13px;
+ color: #444;
+ position: relative;
+ z-index: 1;
+}
+.acf-field-object > .handle strong {
+ display: block;
+ padding-bottom: 6px;
+ font-size: 14px;
+ line-height: 14px;
+ min-height: 14px;
+}
+.acf-field-object > .handle .row-options {
+ visibility: hidden;
+}
+.acf-field-object > .handle .row-options a {
+ margin-right: 4px;
+}
+.acf-field-object > .handle .row-options a.delete-field {
+ color: #a00;
+}
+.acf-field-object > .handle .row-options a.delete-field:hover {
+ color: #f00;
+}
+.acf-field-object.open + .acf-field-object {
+ border-top-color: #E1E1E1;
+}
+.acf-field-object.open > .handle {
+ background: #2a9bd9;
+ border: #2696d3 solid 1px;
+ text-shadow: #268FBB 0 1px 0;
+ color: #fff;
+ position: relative;
+ margin: -1px -1px 0 -1px;
+}
+.acf-field-object.open > .handle a {
+ color: #fff !important;
+}
+.acf-field-object.open > .handle a:hover {
+ text-decoration: underline !important;
+}
+.acf-field-object.open > .handle .acf-icon {
+ border-color: #fff;
+ color: #fff;
+}
+.acf-field-object.open > .handle .acf-required {
+ color: #fff;
+}
+.acf-field-object:hover > .handle .row-options, .acf-field-object.-hover > .handle .row-options {
+ visibility: visible;
+}
+.acf-field-object > .settings {
+ display: none;
+ width: 100%;
+}
+.acf-field-object > .settings > .acf-table {
+ border: none;
+}
+.acf-field-object .rule-groups {
+ margin-top: 20px;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Postbox: Locations
+*
+*---------------------------------------------------------------------------------------------*/
+.rule-groups h4 {
+ margin: 3px 0;
+}
+.rule-groups .rule-group {
+ margin: 0 0 5px;
+ /* Don't allow user to delete the first field group */
+}
+.rule-groups .rule-group h4 {
+ margin: 0 0 3px;
+}
+.rule-groups .rule-group td.param {
+ width: 35%;
+}
+.rule-groups .rule-group td.operator {
+ width: 20%;
+}
+.rule-groups .rule-group td.add {
+ width: 40px;
+}
+.rule-groups .rule-group td.remove {
+ width: 28px;
+ vertical-align: middle;
+}
+.rule-groups .rule-group td.remove a {
+ visibility: hidden;
+}
+.rule-groups .rule-group tr:hover td.remove a {
+ visibility: visible;
+}
+.rule-groups .rule-group:first-child tr:first-child td.remove a {
+ visibility: hidden !important;
+}
+.rule-groups .rule-group select:empty {
+ background: #f8f8f8;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Options
+*
+*---------------------------------------------------------------------------------------------*/
+#acf-field-group-options tr[data-name=hide_on_screen] li {
+ float: left;
+ width: 33%;
+}
+
+@media (max-width: 1100px) {
+ #acf-field-group-options tr[data-name=hide_on_screen] li {
+ width: 50%;
+ }
+}
+/*---------------------------------------------------------------------------------------------
+*
+* Conditional Logic
+*
+*---------------------------------------------------------------------------------------------*/
+table.conditional-logic-rules {
+ background: transparent;
+ border: 0 none;
+ border-radius: 0;
+}
+
+table.conditional-logic-rules tbody td {
+ background: transparent;
+ border: 0 none !important;
+ padding: 5px 2px !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Field: Tab
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-object-tab .acf-field-setting-name, .acf-field-object-accordion .acf-field-setting-name,
+.acf-field-object-tab .acf-field-setting-instructions,
+.acf-field-object-accordion .acf-field-setting-instructions,
+.acf-field-object-tab .acf-field-setting-required,
+.acf-field-object-accordion .acf-field-setting-required,
+.acf-field-object-tab .acf-field-setting-warning,
+.acf-field-object-accordion .acf-field-setting-warning,
+.acf-field-object-tab .acf-field-setting-wrapper,
+.acf-field-object-accordion .acf-field-setting-wrapper {
+ display: none;
+}
+.acf-field-object-tab .li-field-name, .acf-field-object-accordion .li-field-name {
+ visibility: hidden;
+}
+.acf-field-object + .acf-field-object-tab:before, .acf-field-object + .acf-field-object-accordion:before {
+ display: block;
+ content: "";
+ height: 5px;
+ width: 100%;
+ background: #f5f5f5;
+ border-top: #e1e1e1 solid 1px;
+ border-bottom: #e1e1e1 solid 1px;
+ margin-top: -1px;
+}
+.acf-admin-3-8 .acf-field-object + .acf-field-object-tab:before, .acf-admin-3-8 .acf-field-object + .acf-field-object-accordion:before {
+ border-color: #E5E5E5;
+}
+.acf-field-object-tab p:first-child, .acf-field-object-accordion p:first-child {
+ margin: 0.5em 0;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Field: Accordion
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-object-accordion .acf-field-setting-instructions {
+ display: table-row;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Field: Message
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-object-message tr[data-name=name],
+.acf-field-object-message tr[data-name=instructions],
+.acf-field-object-message tr[data-name=required] {
+ display: none !important;
+}
+
+.acf-field-object-message .li-field-name {
+ visibility: hidden;
+}
+
+.acf-field-object-message textarea {
+ height: 175px !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Field: Separator
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-object-separator tr[data-name=name],
+.acf-field-object-separator tr[data-name=instructions],
+.acf-field-object-separator tr[data-name=required] {
+ display: none !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Field: Date Picker
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-object-date-picker .acf-radio-list li,
+.acf-field-object-time-picker .acf-radio-list li,
+.acf-field-object-date-time-picker .acf-radio-list li {
+ line-height: 25px;
+}
+.acf-field-object-date-picker .acf-radio-list span,
+.acf-field-object-time-picker .acf-radio-list span,
+.acf-field-object-date-time-picker .acf-radio-list span {
+ display: inline-block;
+ min-width: 10em;
+}
+.acf-field-object-date-picker .acf-radio-list input[type=text],
+.acf-field-object-time-picker .acf-radio-list input[type=text],
+.acf-field-object-date-time-picker .acf-radio-list input[type=text] {
+ width: 100px;
+}
+
+.acf-field-object-date-time-picker .acf-radio-list span {
+ min-width: 15em;
+}
+.acf-field-object-date-time-picker .acf-radio-list input[type=text] {
+ width: 200px;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* Slug
+*
+*--------------------------------------------------------------------------------------------*/
+#slugdiv .inside {
+ padding: 12px;
+ margin: 0;
+}
+#slugdiv input[type=text] {
+ width: 100%;
+ height: 28px;
+ font-size: 14px;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* RTL
+*
+*--------------------------------------------------------------------------------------------*/
+html[dir=rtl] .acf-field-object.open > .handle {
+ margin: -1px -1px 0;
+}
+
+html[dir=rtl] .acf-field-object.open > .handle .acf-icon {
+ float: right;
+}
+
+html[dir=rtl] .acf-field-object.open > .handle .li-field-order {
+ padding-left: 0 !important;
+ padding-right: 15px !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Device
+*
+*---------------------------------------------------------------------------------------------*/
+@media only screen and (max-width: 850px) {
+ tr.acf-field,
+td.acf-label,
+td.acf-input {
+ display: block !important;
+ width: auto !important;
+ border: 0 none !important;
+ }
+
+ tr.acf-field {
+ border-top: #ededed solid 1px !important;
+ margin-bottom: 0 !important;
+ }
+
+ td.acf-label {
+ background: transparent !important;
+ padding-bottom: 0 !important;
+ }
+}
\ No newline at end of file
diff --git a/assets/build/css/acf-field-group.min.css b/assets/build/css/acf-field-group.min.css
new file mode 100644
index 0000000..0484ca2
--- /dev/null
+++ b/assets/build/css/acf-field-group.min.css
@@ -0,0 +1 @@
+#acf-field-group-fields>.inside,#acf-field-group-locations>.inside,#acf-field-group-options>.inside{padding:0;margin:0}.postbox .handle-order-higher,.postbox .handle-order-lower{display:none}#minor-publishing-actions,#misc-publishing-actions #visibility,#misc-publishing-actions .edit-timestamp{display:none}#minor-publishing{border-bottom:0 none}#misc-pub-section{border-bottom:0 none}#misc-publishing-actions .misc-pub-section{border-bottom-color:#f5f5f5}#acf-field-group-fields{border:0 none;box-shadow:none}#acf-field-group-fields>.handlediv,#acf-field-group-fields>.hndle,#acf-field-group-fields>.postbox-header{display:none}#acf-field-group-fields a{text-decoration:none}#acf-field-group-fields a:active,#acf-field-group-fields a:focus{outline:0;box-shadow:none}#acf-field-group-fields .li-field-order{width:20%}#acf-field-group-fields .li-field-label{width:30%}#acf-field-group-fields .li-field-name{width:25%}#acf-field-group-fields .li-field-type{width:25%}#acf-field-group-fields .li-field-key{display:none}#acf-field-group-fields.show-field-keys .li-field-key,#acf-field-group-fields.show-field-keys .li-field-label,#acf-field-group-fields.show-field-keys .li-field-name,#acf-field-group-fields.show-field-keys .li-field-type{width:20%}#acf-field-group-fields.show-field-keys .li-field-key{display:block}#acf-field-group-fields .acf-field-list-wrap{border:#ccd0d4 solid 1px}#acf-field-group-fields .acf-field-list{background:#f5f5f5;margin-top:-1px}#acf-field-group-fields .acf-field-list .no-fields-message{padding:15px 15px;background:#fff;display:none}#acf-field-group-fields .acf-field-list.-empty .no-fields-message{display:block}.acf-admin-3-8 #acf-field-group-fields .acf-field-list-wrap{border-color:#dfdfdf}.acf-field-object{border-top:#eee solid 1px;background:#fff}.acf-field-object.ui-sortable-helper{border-top-color:#fff;box-shadow:0 0 0 1px #dfdfdf,0 1px 4px rgba(0,0,0,.1)}.acf-field-object.ui-sortable-placeholder{box-shadow:0 -1px 0 0 #dfdfdf;visibility:visible!important;background:#f9f9f9;border-top-color:transparent;min-height:54px}.acf-field-object.ui-sortable-placeholder:after,.acf-field-object.ui-sortable-placeholder:before{visibility:hidden}.acf-field-object>.meta{display:none}.acf-field-object>.handle a{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.acf-field-object>.handle li{padding-top:10px;padding-bottom:10px;word-wrap:break-word}.acf-field-object>.handle .acf-icon{margin:1px 0 0;cursor:move;background:0 0;float:left;height:28px;line-height:26px;width:28px;font-size:13px;color:#444;position:relative;z-index:1}.acf-field-object>.handle strong{display:block;padding-bottom:6px;font-size:14px;line-height:14px;min-height:14px}.acf-field-object>.handle .row-options{visibility:hidden}.acf-field-object>.handle .row-options a{margin-right:4px}.acf-field-object>.handle .row-options a.delete-field{color:#a00}.acf-field-object>.handle .row-options a.delete-field:hover{color:red}.acf-field-object.open+.acf-field-object{border-top-color:#e1e1e1}.acf-field-object.open>.handle{background:#2a9bd9;border:#2696d3 solid 1px;text-shadow:#268fbb 0 1px 0;color:#fff;position:relative;margin:-1px -1px 0 -1px}.acf-field-object.open>.handle a{color:#fff!important}.acf-field-object.open>.handle a:hover{text-decoration:underline!important}.acf-field-object.open>.handle .acf-icon{border-color:#fff;color:#fff}.acf-field-object.open>.handle .acf-required{color:#fff}.acf-field-object.-hover>.handle .row-options,.acf-field-object:hover>.handle .row-options{visibility:visible}.acf-field-object>.settings{display:none;width:100%}.acf-field-object>.settings>.acf-table{border:none}.acf-field-object .rule-groups{margin-top:20px}.rule-groups h4{margin:3px 0}.rule-groups .rule-group{margin:0 0 5px}.rule-groups .rule-group h4{margin:0 0 3px}.rule-groups .rule-group td.param{width:35%}.rule-groups .rule-group td.operator{width:20%}.rule-groups .rule-group td.add{width:40px}.rule-groups .rule-group td.remove{width:28px;vertical-align:middle}.rule-groups .rule-group td.remove a{visibility:hidden}.rule-groups .rule-group tr:hover td.remove a{visibility:visible}.rule-groups .rule-group:first-child tr:first-child td.remove a{visibility:hidden!important}.rule-groups .rule-group select:empty{background:#f8f8f8}#acf-field-group-options tr[data-name=hide_on_screen] li{float:left;width:33%}@media (max-width:1100px){#acf-field-group-options tr[data-name=hide_on_screen] li{width:50%}}table.conditional-logic-rules{background:0 0;border:0 none;border-radius:0}table.conditional-logic-rules tbody td{background:0 0;border:0 none!important;padding:5px 2px!important}.acf-field-object-accordion .acf-field-setting-instructions,.acf-field-object-accordion .acf-field-setting-name,.acf-field-object-accordion .acf-field-setting-required,.acf-field-object-accordion .acf-field-setting-warning,.acf-field-object-accordion .acf-field-setting-wrapper,.acf-field-object-tab .acf-field-setting-instructions,.acf-field-object-tab .acf-field-setting-name,.acf-field-object-tab .acf-field-setting-required,.acf-field-object-tab .acf-field-setting-warning,.acf-field-object-tab .acf-field-setting-wrapper{display:none}.acf-field-object-accordion .li-field-name,.acf-field-object-tab .li-field-name{visibility:hidden}.acf-field-object+.acf-field-object-accordion:before,.acf-field-object+.acf-field-object-tab:before{display:block;content:"";height:5px;width:100%;background:#f5f5f5;border-top:#e1e1e1 solid 1px;border-bottom:#e1e1e1 solid 1px;margin-top:-1px}.acf-admin-3-8 .acf-field-object+.acf-field-object-accordion:before,.acf-admin-3-8 .acf-field-object+.acf-field-object-tab:before{border-color:#e5e5e5}.acf-field-object-accordion p:first-child,.acf-field-object-tab p:first-child{margin:.5em 0}.acf-field-object-accordion .acf-field-setting-instructions{display:table-row}.acf-field-object-message tr[data-name=instructions],.acf-field-object-message tr[data-name=name],.acf-field-object-message tr[data-name=required]{display:none!important}.acf-field-object-message .li-field-name{visibility:hidden}.acf-field-object-message textarea{height:175px!important}.acf-field-object-separator tr[data-name=instructions],.acf-field-object-separator tr[data-name=name],.acf-field-object-separator tr[data-name=required]{display:none!important}.acf-field-object-date-picker .acf-radio-list li,.acf-field-object-date-time-picker .acf-radio-list li,.acf-field-object-time-picker .acf-radio-list li{line-height:25px}.acf-field-object-date-picker .acf-radio-list span,.acf-field-object-date-time-picker .acf-radio-list span,.acf-field-object-time-picker .acf-radio-list span{display:inline-block;min-width:10em}.acf-field-object-date-picker .acf-radio-list input[type=text],.acf-field-object-date-time-picker .acf-radio-list input[type=text],.acf-field-object-time-picker .acf-radio-list input[type=text]{width:100px}.acf-field-object-date-time-picker .acf-radio-list span{min-width:15em}.acf-field-object-date-time-picker .acf-radio-list input[type=text]{width:200px}#slugdiv .inside{padding:12px;margin:0}#slugdiv input[type=text]{width:100%;height:28px;font-size:14px}html[dir=rtl] .acf-field-object.open>.handle{margin:-1px -1px 0}html[dir=rtl] .acf-field-object.open>.handle .acf-icon{float:right}html[dir=rtl] .acf-field-object.open>.handle .li-field-order{padding-left:0!important;padding-right:15px!important}@media only screen and (max-width:850px){td.acf-input,td.acf-label,tr.acf-field{display:block!important;width:auto!important;border:0 none!important}tr.acf-field{border-top:#ededed solid 1px!important;margin-bottom:0!important}td.acf-label{background:0 0!important;padding-bottom:0!important}}
\ No newline at end of file
diff --git a/assets/build/css/acf-global.css b/assets/build/css/acf-global.css
new file mode 100644
index 0000000..7232d99
--- /dev/null
+++ b/assets/build/css/acf-global.css
@@ -0,0 +1,1662 @@
+@charset "UTF-8";
+/*--------------------------------------------------------------------------------------------
+*
+* Vars
+*
+*--------------------------------------------------------------------------------------------*/
+/* colors */
+/* acf-field */
+/* responsive */
+/*--------------------------------------------------------------------------------------------
+*
+* Mixins
+*
+*--------------------------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------------------------
+*
+* Global
+*
+*--------------------------------------------------------------------------------------------*/
+/* Horizontal List */
+.acf-hl {
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ display: block;
+ position: relative;
+}
+
+.acf-hl > li {
+ float: left;
+ display: block;
+ margin: 0;
+ padding: 0;
+}
+
+.acf-hl > li.acf-fr {
+ float: right;
+}
+
+/* Horizontal List: Clearfix */
+.acf-hl:before, .acf-hl:after,
+.acf-bl:before, .acf-bl:after,
+.acf-cf:before, .acf-cf:after {
+ content: "";
+ display: block;
+ line-height: 0;
+}
+
+.acf-hl:after,
+.acf-bl:after,
+.acf-cf:after {
+ clear: both;
+}
+
+/* Block List */
+.acf-bl {
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ display: block;
+ position: relative;
+}
+
+.acf-bl > li {
+ display: block;
+ margin: 0;
+ padding: 0;
+ float: none;
+}
+
+/* Visibility */
+.acf-hidden {
+ display: none !important;
+}
+
+.acf-empty {
+ display: table-cell !important;
+}
+.acf-empty * {
+ display: none !important;
+}
+
+/* Float */
+.acf-fl {
+ float: left;
+}
+
+.acf-fr {
+ float: right;
+}
+
+.acf-fn {
+ float: none;
+}
+
+/* Align */
+.acf-al {
+ text-align: left;
+}
+
+.acf-ar {
+ text-align: right;
+}
+
+.acf-ac {
+ text-align: center;
+}
+
+/* loading */
+.acf-loading,
+.acf-spinner {
+ display: inline-block;
+ height: 20px;
+ width: 20px;
+ vertical-align: text-top;
+ background: transparent url(../../images/spinner.gif) no-repeat 50% 50%;
+}
+
+/* spinner */
+.acf-spinner {
+ display: none;
+}
+
+.acf-spinner.is-active {
+ display: inline-block;
+}
+
+/* WP < 4.2 */
+.spinner.is-active {
+ display: inline-block;
+}
+
+/* required */
+.acf-required {
+ color: #f00;
+}
+
+/* show on hover */
+.acf-soh .acf-soh-target {
+ -webkit-transition: opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
+ -moz-transition: opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
+ -o-transition: opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
+ transition: opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
+ visibility: hidden;
+ opacity: 0;
+}
+
+.acf-soh:hover .acf-soh-target {
+ -webkit-transition-delay: 0s;
+ -moz-transition-delay: 0s;
+ -o-transition-delay: 0s;
+ transition-delay: 0s;
+ visibility: visible;
+ opacity: 1;
+}
+
+/* show if value */
+.show-if-value {
+ display: none;
+}
+
+.hide-if-value {
+ display: block;
+}
+
+.has-value .show-if-value {
+ display: block;
+}
+
+.has-value .hide-if-value {
+ display: none;
+}
+
+/* select2 WP animation fix */
+.select2-search-choice-close {
+ -webkit-transition: none;
+ -moz-transition: none;
+ -o-transition: none;
+ transition: none;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* tooltip
+*
+*---------------------------------------------------------------------------------------------*/
+/* tooltip */
+.acf-tooltip {
+ background: #2F353E;
+ border-radius: 5px;
+ color: #fff;
+ padding: 5px 10px;
+ position: absolute;
+ font-size: 12px;
+ line-height: 1.4em;
+ z-index: 900000;
+ /* tip */
+ /* positions */
+}
+.acf-tooltip:before {
+ border: solid;
+ border-color: transparent;
+ border-width: 6px;
+ content: "";
+ position: absolute;
+}
+.acf-tooltip.top {
+ margin-top: -8px;
+}
+.acf-tooltip.top:before {
+ top: 100%;
+ left: 50%;
+ margin-left: -6px;
+ border-top-color: #2F353E;
+ border-bottom-width: 0;
+}
+.acf-tooltip.right {
+ margin-left: 8px;
+}
+.acf-tooltip.right:before {
+ top: 50%;
+ margin-top: -6px;
+ right: 100%;
+ border-right-color: #2F353E;
+ border-left-width: 0;
+}
+.acf-tooltip.bottom {
+ margin-top: 8px;
+}
+.acf-tooltip.bottom:before {
+ bottom: 100%;
+ left: 50%;
+ margin-left: -6px;
+ border-bottom-color: #2F353E;
+ border-top-width: 0;
+}
+.acf-tooltip.left {
+ margin-left: -8px;
+}
+.acf-tooltip.left:before {
+ top: 50%;
+ margin-top: -6px;
+ left: 100%;
+ border-left-color: #2F353E;
+ border-right-width: 0;
+}
+.acf-tooltip .acf-overlay {
+ z-index: -1;
+}
+
+/* confirm */
+.acf-tooltip.-confirm {
+ z-index: 900001;
+}
+.acf-tooltip.-confirm a {
+ text-decoration: none;
+ color: #9ea3a8;
+}
+.acf-tooltip.-confirm a:hover {
+ text-decoration: underline;
+}
+.acf-tooltip.-confirm a[data-event=confirm] {
+ color: #F55E4F;
+}
+
+.acf-overlay {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ cursor: default;
+}
+
+.acf-tooltip-target {
+ position: relative;
+ z-index: 900002;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* loading
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-loading-overlay {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ cursor: default;
+ z-index: 99;
+ background: rgba(249, 249, 249, 0.5);
+}
+.acf-loading-overlay i {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-icon
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-icon {
+ display: inline-block;
+ height: 28px;
+ width: 28px;
+ border: transparent solid 1px;
+ border-radius: 100%;
+ font-size: 20px;
+ line-height: 21px;
+ text-align: center;
+ text-decoration: none;
+ vertical-align: top;
+ box-sizing: border-box;
+}
+.acf-icon:before {
+ font-family: dashicons;
+ display: inline-block;
+ line-height: 1;
+ font-weight: 400;
+ font-style: normal;
+ speak: none;
+ text-decoration: inherit;
+ text-transform: none;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ width: 1em;
+ height: 1em;
+ vertical-align: middle;
+ text-align: center;
+}
+
+.acf-icon.-plus:before {
+ content: "";
+}
+
+.acf-icon.-minus:before {
+ content: "";
+}
+
+.acf-icon.-cancel:before {
+ content: "";
+}
+
+.acf-icon.-pencil:before {
+ content: "";
+}
+
+.acf-icon.-location:before {
+ content: "";
+}
+
+.acf-icon.-up:before {
+ content: "";
+ margin-top: -0.1em;
+}
+
+.acf-icon.-down:before {
+ content: "";
+ margin-top: 0.1em;
+}
+
+.acf-icon.-left:before {
+ content: "";
+ margin-left: -0.1em;
+}
+
+.acf-icon.-right:before {
+ content: "";
+ margin-left: 0.1em;
+}
+
+.acf-icon.-sync:before {
+ content: "";
+}
+
+.acf-icon.-globe:before {
+ content: "";
+ margin-top: 0.1em;
+ margin-left: 0.1em;
+}
+
+.acf-icon.-picture:before {
+ content: "";
+}
+
+.acf-icon.-check:before {
+ content: "";
+ margin-left: -0.1em;
+}
+
+.acf-icon.-dot-3:before {
+ content: "";
+ margin-top: -0.1em;
+}
+
+.acf-icon.-arrow-combo:before {
+ content: "";
+}
+
+.acf-icon.-arrow-up:before {
+ content: "";
+ margin-left: -0.1em;
+}
+
+.acf-icon.-arrow-down:before {
+ content: "";
+ margin-left: -0.1em;
+}
+
+.acf-icon.-search:before {
+ content: "";
+}
+
+.acf-icon.-link-ext:before {
+ content: "";
+}
+
+.acf-icon.-duplicate {
+ position: relative;
+}
+.acf-icon.-duplicate:before, .acf-icon.-duplicate:after {
+ content: "";
+ display: block;
+ box-sizing: border-box;
+ width: 46%;
+ height: 46%;
+ position: absolute;
+ top: 33%;
+ left: 23%;
+}
+.acf-icon.-duplicate:before {
+ margin: -1px 0 0 1px;
+ box-shadow: 2px -2px 0px 0px currentColor;
+}
+.acf-icon.-duplicate:after {
+ border: solid 2px currentColor;
+}
+
+.acf-icon.-collapse:before {
+ content: "";
+ margin-left: -0.1em;
+}
+
+.-collapsed .acf-icon.-collapse:before {
+ content: "";
+ margin-left: -0.1em;
+}
+
+span.acf-icon {
+ color: #555d66;
+ border-color: #b5bcc2;
+ background-color: #fff;
+}
+
+a.acf-icon {
+ color: #555d66;
+ border-color: #b5bcc2;
+ background-color: #fff;
+ position: relative;
+ transition: none;
+ cursor: pointer;
+}
+a.acf-icon:hover {
+ background: #f3f5f6;
+ border-color: #0071a1;
+ color: #0071a1;
+}
+a.acf-icon.-minus:hover, a.acf-icon.-cancel:hover {
+ background: #f7efef;
+ border-color: #a10000;
+ color: #dc3232;
+}
+a.acf-icon:active, a.acf-icon:focus {
+ outline: none;
+ box-shadow: none;
+}
+
+.acf-icon.-clear {
+ border-color: transparent;
+ background: transparent;
+ color: #444;
+}
+
+.acf-icon.light {
+ border-color: transparent;
+ background: #F5F5F5;
+ color: #23282d;
+}
+
+.acf-icon.dark {
+ border-color: transparent !important;
+ background: #23282D;
+ color: #eee;
+}
+
+a.acf-icon.dark:hover {
+ background: #191E23;
+ color: #00b9eb;
+}
+a.acf-icon.dark.-minus:hover, a.acf-icon.dark.-cancel:hover {
+ color: #D54E21;
+}
+
+.acf-icon.grey {
+ border-color: transparent !important;
+ background: #b4b9be;
+ color: #fff !important;
+}
+.acf-icon.grey:hover {
+ background: #00A0D2;
+ color: #fff;
+}
+.acf-icon.grey.-minus:hover, .acf-icon.grey.-cancel:hover {
+ background: #32373C;
+}
+
+.acf-icon.small,
+.acf-icon.-small {
+ width: 20px;
+ height: 20px;
+ line-height: 14px;
+ font-size: 14px;
+}
+.acf-icon.small.-duplicate:before, .acf-icon.small.-duplicate:after,
+.acf-icon.-small.-duplicate:before,
+.acf-icon.-small.-duplicate:after {
+ opacity: 0.8;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-box
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-box {
+ background: #FFFFFF;
+ border: 1px solid #ccd0d4;
+ position: relative;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
+ /* title */
+ /* footer */
+}
+.acf-box .title {
+ border-bottom: 1px solid #ccd0d4;
+ margin: 0;
+ padding: 15px;
+}
+.acf-box .title h3 {
+ font-size: 14px;
+ line-height: 1em;
+ margin: 0;
+ padding: 0;
+}
+.acf-box .inner {
+ padding: 15px;
+}
+.acf-box h2 {
+ color: #333333;
+ font-size: 26px;
+ line-height: 1.25em;
+ margin: 0.25em 0 0.75em;
+ padding: 0;
+}
+.acf-box h3 {
+ margin: 1.5em 0 0;
+}
+.acf-box p {
+ margin-top: 0.5em;
+}
+.acf-box a {
+ text-decoration: none;
+}
+.acf-box i.dashicons-external {
+ margin-top: -1px;
+}
+.acf-box .footer {
+ border-top: 1px solid #ccd0d4;
+ padding: 12px;
+ font-size: 13px;
+ line-height: 1.5;
+}
+.acf-box .footer p {
+ margin: 0;
+}
+.acf-admin-3-8 .acf-box {
+ border-color: #E5E5E5;
+}
+.acf-admin-3-8 .acf-box .title,
+.acf-admin-3-8 .acf-box .footer {
+ border-color: #E5E5E5;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-notice
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-notice {
+ position: relative;
+ display: block;
+ color: #fff;
+ margin: 5px 0 15px;
+ padding: 3px 12px;
+ background: #2a9bd9;
+ border-left: #1f7db1 solid 3px;
+}
+.acf-notice p {
+ font-size: 13px;
+ line-height: 1.5;
+ margin: 0.5em 0;
+ text-shadow: none;
+ color: inherit;
+}
+.acf-notice .acf-notice-dismiss {
+ position: absolute;
+ top: 9px;
+ right: 12px;
+ background: transparent !important;
+ color: inherit !important;
+ border-color: #fff !important;
+ opacity: 0.75;
+}
+.acf-notice .acf-notice-dismiss:hover {
+ opacity: 1;
+}
+.acf-notice.-dismiss {
+ padding-right: 40px;
+}
+.acf-notice.-error {
+ background: #d94f4f;
+ border-color: #c92c2c;
+}
+.acf-notice.-success {
+ background: #49ad52;
+ border-color: #3a8941;
+}
+.acf-notice.-warning {
+ background: #fd8d3b;
+ border-color: #fc7009;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-table
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-table {
+ border: #ccd0d4 solid 1px;
+ background: #fff;
+ border-spacing: 0;
+ border-radius: 0;
+ table-layout: auto;
+ padding: 0;
+ margin: 0;
+ width: 100%;
+ clear: both;
+ box-sizing: content-box;
+ /* defaults */
+ /* thead */
+ /* tbody */
+ /* -clear */
+}
+.acf-table > tbody > tr > th, .acf-table > tbody > tr > td,
+.acf-table > thead > tr > th,
+.acf-table > thead > tr > td {
+ padding: 8px;
+ vertical-align: top;
+ background: #fff;
+ text-align: left;
+ border-style: solid;
+ font-weight: normal;
+}
+.acf-table > tbody > tr > th,
+.acf-table > thead > tr > th {
+ position: relative;
+ color: #333333;
+}
+.acf-table > thead > tr > th {
+ border-color: #d5d9dd;
+ border-width: 0 0 1px 1px;
+}
+.acf-table > thead > tr > th:first-child {
+ border-left-width: 0;
+}
+.acf-table > tbody > tr {
+ z-index: 1;
+}
+.acf-table > tbody > tr > td {
+ border-color: #eeeeee;
+ border-width: 1px 0 0 1px;
+}
+.acf-table > tbody > tr > td:first-child {
+ border-left-width: 0;
+}
+.acf-table > tbody > tr:first-child > td {
+ border-top-width: 0;
+}
+.acf-table.-clear {
+ border: 0 none;
+}
+.acf-table.-clear > tbody > tr > td, .acf-table.-clear > tbody > tr > th,
+.acf-table.-clear > thead > tr > td,
+.acf-table.-clear > thead > tr > th {
+ border: 0 none;
+ padding: 4px;
+}
+
+/* remove tr */
+.acf-remove-element {
+ -webkit-transition: all 0.25s ease-out;
+ -moz-transition: all 0.25s ease-out;
+ -o-transition: all 0.25s ease-out;
+ transition: all 0.25s ease-out;
+ transform: translate(50px, 0);
+ opacity: 0;
+}
+
+/* fade-up */
+.acf-fade-up {
+ -webkit-transition: all 0.25s ease-out;
+ -moz-transition: all 0.25s ease-out;
+ -o-transition: all 0.25s ease-out;
+ transition: all 0.25s ease-out;
+ transform: translate(0, -10px);
+ opacity: 0;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Fake table
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-thead,
+.acf-tbody,
+.acf-tfoot {
+ width: 100%;
+ padding: 0;
+ margin: 0;
+}
+.acf-thead > li,
+.acf-tbody > li,
+.acf-tfoot > li {
+ box-sizing: border-box;
+ padding: 8px 12px;
+ font-size: 12px;
+ line-height: 14px;
+}
+
+.acf-thead {
+ border-bottom: #ccd0d4 solid 1px;
+ color: #23282d;
+}
+.acf-thead > li {
+ font-size: 14px;
+ line-height: 1.4;
+ font-weight: bold;
+}
+.acf-admin-3-8 .acf-thead {
+ border-color: #dfdfdf;
+}
+
+.acf-tfoot {
+ background: #f5f5f5;
+ border-top: #d5d9dd solid 1px;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* Settings
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-settings-wrap #poststuff {
+ padding-top: 15px;
+}
+.acf-settings-wrap .acf-box {
+ margin: 20px 0;
+}
+.acf-settings-wrap table {
+ margin: 0;
+}
+.acf-settings-wrap table .button {
+ vertical-align: middle;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-popup
+*
+*--------------------------------------------------------------------------------------------*/
+#acf-popup {
+ position: fixed;
+ z-index: 900000;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ text-align: center;
+}
+#acf-popup .bg {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 0;
+ background: rgba(0, 0, 0, 0.25);
+}
+#acf-popup:before {
+ content: "";
+ display: inline-block;
+ height: 100%;
+ vertical-align: middle;
+}
+#acf-popup .acf-popup-box {
+ display: inline-block;
+ vertical-align: middle;
+ z-index: 1;
+ min-width: 300px;
+ min-height: 160px;
+ border-color: #aaaaaa;
+ box-shadow: 0 5px 30px -5px rgba(0, 0, 0, 0.25);
+ text-align: left;
+}
+html[dir=rtl] #acf-popup .acf-popup-box {
+ text-align: right;
+}
+#acf-popup .acf-popup-box .title {
+ min-height: 15px;
+ line-height: 15px;
+}
+#acf-popup .acf-popup-box .title .acf-icon {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+}
+html[dir=rtl] #acf-popup .acf-popup-box .title .acf-icon {
+ right: auto;
+ left: 10px;
+}
+#acf-popup .acf-popup-box .inner {
+ min-height: 50px;
+ padding: 0;
+ margin: 15px;
+}
+#acf-popup .acf-popup-box .loading {
+ position: absolute;
+ top: 45px;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 2;
+ background: rgba(0, 0, 0, 0.1);
+ display: none;
+}
+#acf-popup .acf-popup-box .loading i {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+
+.acf-submit {
+ margin-bottom: 0;
+ line-height: 28px;
+}
+.acf-submit span {
+ float: right;
+ color: #999;
+}
+.acf-submit span.-error {
+ color: #dd4232;
+}
+.acf-submit .button {
+ margin-right: 5px;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* upgrade notice
+*
+*--------------------------------------------------------------------------------------------*/
+#acf-upgrade-notice {
+ position: relative;
+ background: #fff;
+ border-left: 4px solid #00a0d2;
+ padding: 20px;
+}
+#acf-upgrade-notice:after {
+ display: block;
+ clear: both;
+ content: "";
+}
+#acf-upgrade-notice .col-content {
+ float: left;
+ width: 55%;
+ padding-left: 90px;
+}
+#acf-upgrade-notice .col-actions {
+ float: right;
+ text-align: center;
+ padding: 10px;
+}
+#acf-upgrade-notice img {
+ float: left;
+ width: 70px;
+ height: 70px;
+ margin: 0 0 0 -90px;
+}
+#acf-upgrade-notice h2 {
+ font-size: 16px;
+ margin: 2px 0 6.5px;
+}
+#acf-upgrade-notice p {
+ padding: 0;
+ margin: 0;
+}
+#acf-upgrade-notice .button:before {
+ margin-top: 11px;
+}
+@media screen and (max-width: 640px) {
+ #acf-upgrade-notice .col-content,
+#acf-upgrade-notice .col-actions {
+ float: none;
+ padding-left: 90px;
+ width: auto;
+ text-align: left;
+ }
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* Welcome
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-wrap h1 {
+ margin-top: 0;
+ padding-top: 20px;
+}
+.acf-wrap .about-text {
+ margin-top: 0.5em;
+ min-height: 50px;
+}
+.acf-wrap .about-headline-callout {
+ font-size: 2.4em;
+ font-weight: 300;
+ line-height: 1.3;
+ margin: 1.1em 0 0.2em;
+ text-align: center;
+}
+.acf-wrap .feature-section {
+ padding: 40px 0;
+}
+.acf-wrap .feature-section h2 {
+ margin-top: 20px;
+}
+.acf-wrap .changelog {
+ list-style: disc;
+ padding-left: 15px;
+}
+.acf-wrap .changelog li {
+ margin: 0 0 0.75em;
+}
+.acf-wrap .acf-three-col {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+}
+.acf-wrap .acf-three-col > div {
+ flex: 1;
+ align-self: flex-start;
+ min-width: 31%;
+ max-width: 31%;
+}
+@media screen and (max-width: 880px) {
+ .acf-wrap .acf-three-col > div {
+ min-width: 48%;
+ }
+}
+@media screen and (max-width: 640px) {
+ .acf-wrap .acf-three-col > div {
+ min-width: 100%;
+ }
+}
+.acf-wrap .acf-three-col h3 .badge {
+ display: inline-block;
+ vertical-align: top;
+ border-radius: 5px;
+ background: #fc9700;
+ color: #fff;
+ font-weight: normal;
+ font-size: 12px;
+ padding: 2px 5px;
+}
+.acf-wrap .acf-three-col img + h3 {
+ margin-top: 0.5em;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-hl cols
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-hl[data-cols] {
+ margin-left: -10px;
+ margin-right: -10px;
+}
+.acf-hl[data-cols] > li {
+ padding: 0 10px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+/* sizes */
+.acf-hl[data-cols="2"] > li {
+ width: 50%;
+}
+
+.acf-hl[data-cols="3"] > li {
+ width: 33.333%;
+}
+
+.acf-hl[data-cols="4"] > li {
+ width: 25%;
+}
+
+/* mobile */
+@media screen and (max-width: 640px) {
+ .acf-hl[data-cols] {
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: -10px;
+ }
+ .acf-hl[data-cols] > li {
+ width: 100% !important;
+ padding: 10px 0 0;
+ }
+}
+/*--------------------------------------------------------------------------------------------
+*
+* misc
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-actions {
+ text-align: right;
+ z-index: 1;
+ /* hover */
+ /* rtl */
+}
+.acf-actions.-hover {
+ position: absolute;
+ display: none;
+ top: 0;
+ right: 0;
+ padding: 5px;
+}
+html[dir=rtl] .acf-actions.-hover {
+ right: auto;
+ left: 0;
+}
+
+/* ul compatibility */
+ul.acf-actions li {
+ float: right;
+ margin-left: 4px;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* RTL
+*
+*--------------------------------------------------------------------------------------------*/
+html[dir=rtl] .acf-fl {
+ float: right;
+}
+
+html[dir=rtl] .acf-fr {
+ float: left;
+}
+
+html[dir=rtl] .acf-hl > li {
+ float: right;
+}
+
+html[dir=rtl] .acf-hl > li.acf-fr {
+ float: left;
+}
+
+html[dir=rtl] .acf-icon.logo {
+ left: 0;
+ right: auto;
+}
+
+html[dir=rtl] .acf-table thead th {
+ text-align: right;
+ border-right-width: 1px;
+ border-left-width: 0px;
+}
+
+html[dir=rtl] .acf-table > tbody > tr > td {
+ text-align: right;
+ border-right-width: 1px;
+ border-left-width: 0px;
+}
+
+html[dir=rtl] .acf-table > thead > tr > th:first-child,
+html[dir=rtl] .acf-table > tbody > tr > td:first-child {
+ border-right-width: 0;
+}
+
+html[dir=rtl] .acf-table > tbody > tr > td.order + td {
+ border-right-color: #e1e1e1;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* acf-postbox-columns
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-postbox-columns {
+ position: relative;
+ margin-top: -11px;
+ margin-bottom: -12px;
+ margin-left: -12px;
+ margin-right: 268px;
+}
+.acf-postbox-columns:after {
+ display: block;
+ clear: both;
+ content: "";
+}
+.acf-postbox-columns .acf-postbox-main,
+.acf-postbox-columns .acf-postbox-side {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 0 12px 12px;
+}
+.acf-postbox-columns .acf-postbox-main {
+ float: left;
+ width: 100%;
+}
+.acf-postbox-columns .acf-postbox-side {
+ float: right;
+ width: 280px;
+ margin-right: -280px;
+}
+.acf-postbox-columns .acf-postbox-side:before {
+ content: "";
+ display: block;
+ position: absolute;
+ width: 1px;
+ height: 100%;
+ top: 0;
+ right: 0;
+ background: #d5d9dd;
+}
+.acf-admin-3-8 .acf-postbox-columns .acf-postbox-side:before {
+ background: #dfdfdf;
+}
+
+/* mobile */
+@media only screen and (max-width: 850px) {
+ .acf-postbox-columns {
+ margin: 0;
+ }
+ .acf-postbox-columns .acf-postbox-main,
+.acf-postbox-columns .acf-postbox-side {
+ float: none;
+ width: auto;
+ margin: 0;
+ padding: 0;
+ }
+ .acf-postbox-columns .acf-postbox-side {
+ margin-top: 1em;
+ }
+ .acf-postbox-columns .acf-postbox-side:before {
+ display: none;
+ }
+}
+/*---------------------------------------------------------------------------------------------
+*
+* acf-panel
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-panel {
+ margin-top: -1px;
+ border-top: 1px solid #d5d9dd;
+ border-bottom: 1px solid #d5d9dd;
+ /* open */
+ /* inside postbox */
+ /* fields */
+}
+.acf-panel .acf-panel-title {
+ margin: 0;
+ padding: 12px;
+ font-weight: bold;
+ cursor: pointer;
+ font-size: inherit;
+}
+.acf-panel .acf-panel-title i {
+ float: right;
+}
+.acf-panel .acf-panel-inside {
+ margin: 0;
+ padding: 0 12px 12px;
+ display: none;
+}
+.acf-panel.-open .acf-panel-inside {
+ display: block;
+}
+.postbox .acf-panel {
+ margin-left: -12px;
+ margin-right: -12px;
+}
+.acf-panel .acf-field {
+ margin: 20px 0 0;
+}
+.acf-panel .acf-field .acf-label label {
+ color: #555d66;
+ font-weight: normal;
+}
+.acf-panel .acf-field:first-child {
+ margin-top: 0;
+}
+.acf-admin-3-8 .acf-panel {
+ border-color: #dfdfdf;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Admin Tools
+*
+*---------------------------------------------------------------------------------------------*/
+#acf-admin-tools .notice {
+ margin-top: 10px;
+}
+
+.acf-meta-box-wrap {
+ margin-top: 10px;
+ /* acf-fields */
+}
+.acf-meta-box-wrap .postbox {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.acf-meta-box-wrap .postbox .inside {
+ margin-bottom: 0;
+}
+.acf-meta-box-wrap .postbox .hndle {
+ font-size: 14px;
+ padding: 8px 12px;
+ margin: 0;
+ line-height: 1.4;
+ position: relative;
+ z-index: 1;
+ cursor: default;
+}
+.acf-meta-box-wrap .postbox .handlediv,
+.acf-meta-box-wrap .postbox .handle-order-higher,
+.acf-meta-box-wrap .postbox .handle-order-lower {
+ display: none;
+}
+.acf-meta-box-wrap .acf-fields {
+ border: #ebebeb solid 1px;
+ background: #fafafa;
+ border-radius: 3px;
+}
+
+/* grid */
+.acf-meta-box-wrap.-grid {
+ margin-left: 8px;
+ margin-right: 8px;
+}
+.acf-meta-box-wrap.-grid .postbox {
+ float: left;
+ clear: left;
+ width: 50%;
+ margin: 0 0 16px;
+}
+.acf-meta-box-wrap.-grid .postbox:nth-child(odd) {
+ margin-left: -8px;
+}
+.acf-meta-box-wrap.-grid .postbox:nth-child(even) {
+ float: right;
+ clear: right;
+ margin-right: -8px;
+}
+
+/* mobile */
+@media only screen and (max-width: 850px) {
+ .acf-meta-box-wrap.-grid {
+ margin-left: 0;
+ margin-right: 0;
+ }
+ .acf-meta-box-wrap.-grid .postbox {
+ margin-left: 0 !important;
+ margin-right: 0 !important;
+ width: 100%;
+ }
+}
+/* export tool */
+#acf-admin-tool-export {
+ /* panel: selection */
+}
+#acf-admin-tool-export p {
+ max-width: 800px;
+}
+#acf-admin-tool-export ul {
+ column-width: 200px;
+}
+#acf-admin-tool-export .acf-postbox-side .button {
+ margin: 0;
+ width: 100%;
+}
+#acf-admin-tool-export textarea {
+ display: block;
+ width: 100%;
+ min-height: 500px;
+ background: #fafafa;
+ box-shadow: none;
+ padding: 7px;
+ border-radius: 3px;
+}
+#acf-admin-tool-export .acf-panel-selection .acf-label {
+ display: none;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Admin Navigation
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-admin-toolbar {
+ background: #fff;
+ border-bottom: 1px solid #ccd0d4;
+ padding-top: 10px;
+}
+.acf-admin-toolbar h2 {
+ font-size: 14px;
+ line-height: 2.5714285714;
+ display: inline-block;
+ padding: 5px 0;
+ margin: 0 10px 0 0;
+}
+.acf-admin-toolbar h2 i {
+ vertical-align: middle;
+ color: #babbbc;
+}
+.acf-admin-toolbar .acf-tab {
+ display: inline-block;
+ font-size: 14px;
+ line-height: 2.5714285714;
+ padding: 5px;
+ margin: 0 5px;
+ text-decoration: none;
+ color: inherit;
+}
+.acf-admin-toolbar .acf-tab.is-active {
+ border-bottom: #0071a4 solid 3px;
+ padding-bottom: 10px;
+}
+.acf-admin-toolbar .acf-tab:hover {
+ color: #00a0d2;
+}
+.acf-admin-toolbar .acf-tab:focus {
+ box-shadow: none;
+}
+.acf-admin-toolbar a.btn-upgrade {
+ display: inline-flex;
+ background: #dee3ff;
+ border: 1px solid #c6d3f8;
+ box-sizing: border-box;
+ border-radius: 0.25rem;
+ padding: 0 0.75rem;
+ cursor: pointer;
+ vertical-align: middle;
+ margin-top: -6px;
+ margin-left: 20px;
+ text-decoration: none;
+}
+.acf-admin-toolbar a.btn-upgrade:hover {
+ background: #d1ddff;
+ border-color: #b9caf9;
+}
+.acf-admin-toolbar a.btn-upgrade p {
+ font-family: system-ui;
+ font-weight: 600;
+ letter-spacing: 0.2;
+ line-height: 1;
+ font-size: 0.625rem;
+ text-transform: uppercase;
+ color: #425fdd;
+ margin-left: 0.65rem;
+}
+#wpcontent .acf-admin-toolbar {
+ margin-left: -20px;
+ padding-left: 20px;
+}
+@media screen and (max-width: 600px) {
+ .acf-admin-toolbar {
+ display: none;
+ }
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Field Groups
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-admin-field-groups .tablenav.top {
+ display: none;
+}
+.acf-admin-field-groups .subsubsub {
+ margin-bottom: 3px;
+}
+.acf-admin-field-groups .wp-list-table td, .acf-admin-field-groups .wp-list-table th {
+ box-sizing: border-box;
+}
+.acf-admin-field-groups .wp-list-table tr:hover {
+ background: #f7f7f7;
+}
+@media screen and (min-width: 782px) {
+ .acf-admin-field-groups .wp-list-table .column-acf-count {
+ width: 10%;
+ }
+}
+.acf-admin-field-groups .wp-list-table .row-actions span.file {
+ display: block;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.acf-admin-field-groups .acf-secondary-text {
+ color: #a0a5aa;
+}
+
+.acf-multi-dashicon {
+ position: relative;
+ z-index: 1;
+}
+.acf-multi-dashicon:before, .acf-multi-dashicon:after {
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+ font-size: 14px;
+ background: #fff;
+ border: #7e8993 solid 1px;
+ border-radius: 2px;
+ display: block;
+}
+.acf-multi-dashicon:after {
+ content: "";
+ position: absolute;
+ top: -3px;
+ left: -3px;
+ z-index: -1;
+ background: #e7e7e7;
+}
+
+.acf-css-tooltip {
+ position: relative;
+}
+.acf-css-tooltip:before {
+ content: attr(aria-label);
+ display: none;
+ position: absolute;
+ z-index: 999;
+ bottom: 100%;
+ left: 50%;
+ transform: translate(-50%, -8px);
+ background: #191e23;
+ border-radius: 2px;
+ padding: 5px 10px;
+ color: #fff;
+ font-size: 12px;
+ line-height: 1.4em;
+ white-space: pre;
+}
+.acf-css-tooltip:after {
+ content: "";
+ display: none;
+ position: absolute;
+ z-index: 998;
+ bottom: 100%;
+ left: 50%;
+ transform: translate(-50%, 4px);
+ border: solid 6px transparent;
+ border-top-color: #191e23;
+}
+.acf-css-tooltip:hover:before, .acf-css-tooltip:hover:after, .acf-css-tooltip:focus:before, .acf-css-tooltip:focus:after {
+ display: block;
+}
+
+.acf-diff .acf-diff-title {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 40px;
+ padding: 14px 16px;
+ background: #f3f3f3;
+ border-bottom: #dddddd solid 1px;
+}
+.acf-diff .acf-diff-title strong {
+ font-size: 14px;
+ display: block;
+}
+.acf-diff .acf-diff-title .acf-diff-title-left,
+.acf-diff .acf-diff-title .acf-diff-title-right {
+ width: 50%;
+ float: left;
+}
+.acf-diff .acf-diff-content {
+ position: absolute;
+ top: 70px;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ overflow: auto;
+}
+.acf-diff table.diff {
+ border-spacing: 0;
+}
+.acf-diff table.diff col.diffsplit.middle {
+ width: 0;
+}
+.acf-diff table.diff td, .acf-diff table.diff th {
+ padding-top: 0.25em;
+ padding-bottom: 0.25em;
+}
+.acf-diff table.diff tr td:nth-child(2) {
+ width: auto;
+}
+.acf-diff table.diff td:nth-child(3) {
+ border-left: #dddddd solid 1px;
+}
+@media screen and (max-width: 600px) {
+ .acf-diff .acf-diff-title {
+ height: 70px;
+ }
+ .acf-diff .acf-diff-content {
+ top: 100px;
+ }
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Modal
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-modal {
+ position: fixed;
+ top: 30px;
+ left: 30px;
+ right: 30px;
+ bottom: 30px;
+ z-index: 160000;
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
+ background: #fcfcfc;
+}
+.acf-modal .acf-modal-title,
+.acf-modal .acf-modal-content,
+.acf-modal .acf-modal-toolbar {
+ box-sizing: border-box;
+ position: absolute;
+ left: 0;
+ right: 0;
+}
+.acf-modal .acf-modal-title {
+ height: 50px;
+ top: 0;
+ border-bottom: 1px solid #ddd;
+}
+.acf-modal .acf-modal-title h2 {
+ margin: 0;
+ padding: 0 16px;
+ line-height: 50px;
+}
+.acf-modal .acf-modal-title .acf-modal-close {
+ position: absolute;
+ top: 0;
+ right: 0;
+ height: 50px;
+ width: 50px;
+ border: none;
+ border-left: 1px solid #ddd;
+ background: transparent;
+ cursor: pointer;
+ color: #666;
+}
+.acf-modal .acf-modal-title .acf-modal-close:hover {
+ color: #00a0d2;
+}
+.acf-modal .acf-modal-content {
+ top: 50px;
+ bottom: 60px;
+ background: #fff;
+ overflow: auto;
+ padding: 16px;
+}
+.acf-modal .acf-modal-feedback {
+ position: absolute;
+ top: 50%;
+ margin: -10px 0;
+ left: 0;
+ right: 0;
+ text-align: center;
+ opacity: 0.75;
+}
+.acf-modal .acf-modal-feedback.error {
+ opacity: 1;
+ color: #b52727;
+}
+.acf-modal .acf-modal-toolbar {
+ height: 60px;
+ bottom: 0;
+ padding: 15px 16px;
+ border-top: 1px solid #ddd;
+}
+.acf-modal .acf-modal-toolbar .button {
+ float: right;
+}
+@media only screen and (max-width: 640px) {
+ .acf-modal {
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ }
+}
+
+.acf-modal-backdrop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: #000;
+ opacity: 0.7;
+ z-index: 159900;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Retina
+*
+*---------------------------------------------------------------------------------------------*/
+@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
+ .acf-loading,
+.acf-spinner {
+ background-image: url(../../images/spinner@2x.gif);
+ background-size: 20px 20px;
+ }
+}
\ No newline at end of file
diff --git a/assets/build/css/acf-global.min.css b/assets/build/css/acf-global.min.css
new file mode 100644
index 0000000..a42627d
--- /dev/null
+++ b/assets/build/css/acf-global.min.css
@@ -0,0 +1 @@
+@charset "UTF-8";.acf-hl{padding:0;margin:0;list-style:none;display:block;position:relative}.acf-hl>li{float:left;display:block;margin:0;padding:0}.acf-hl>li.acf-fr{float:right}.acf-bl:after,.acf-bl:before,.acf-cf:after,.acf-cf:before,.acf-hl:after,.acf-hl:before{content:"";display:block;line-height:0}.acf-bl:after,.acf-cf:after,.acf-hl:after{clear:both}.acf-bl{padding:0;margin:0;list-style:none;display:block;position:relative}.acf-bl>li{display:block;margin:0;padding:0;float:none}.acf-hidden{display:none!important}.acf-empty{display:table-cell!important}.acf-empty *{display:none!important}.acf-fl{float:left}.acf-fr{float:right}.acf-fn{float:none}.acf-al{text-align:left}.acf-ar{text-align:right}.acf-ac{text-align:center}.acf-loading,.acf-spinner{display:inline-block;height:20px;width:20px;vertical-align:text-top;background:transparent url(../../images/spinner.gif) no-repeat 50% 50%}.acf-spinner{display:none}.acf-spinner.is-active{display:inline-block}.spinner.is-active{display:inline-block}.acf-required{color:red}.acf-soh .acf-soh-target{-webkit-transition:opacity .25s 0s ease-in-out,visibility 0s linear .25s;-moz-transition:opacity .25s 0s ease-in-out,visibility 0s linear .25s;-o-transition:opacity .25s 0s ease-in-out,visibility 0s linear .25s;transition:opacity .25s 0s ease-in-out,visibility 0s linear .25s;visibility:hidden;opacity:0}.acf-soh:hover .acf-soh-target{-webkit-transition-delay:0s;-moz-transition-delay:0s;-o-transition-delay:0s;transition-delay:0s;visibility:visible;opacity:1}.show-if-value{display:none}.hide-if-value{display:block}.has-value .show-if-value{display:block}.has-value .hide-if-value{display:none}.select2-search-choice-close{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.acf-tooltip{background:#2f353e;border-radius:5px;color:#fff;padding:5px 10px;position:absolute;font-size:12px;line-height:1.4em;z-index:900000}.acf-tooltip:before{border:solid;border-color:transparent;border-width:6px;content:"";position:absolute}.acf-tooltip.top{margin-top:-8px}.acf-tooltip.top:before{top:100%;left:50%;margin-left:-6px;border-top-color:#2f353e;border-bottom-width:0}.acf-tooltip.right{margin-left:8px}.acf-tooltip.right:before{top:50%;margin-top:-6px;right:100%;border-right-color:#2f353e;border-left-width:0}.acf-tooltip.bottom{margin-top:8px}.acf-tooltip.bottom:before{bottom:100%;left:50%;margin-left:-6px;border-bottom-color:#2f353e;border-top-width:0}.acf-tooltip.left{margin-left:-8px}.acf-tooltip.left:before{top:50%;margin-top:-6px;left:100%;border-left-color:#2f353e;border-right-width:0}.acf-tooltip .acf-overlay{z-index:-1}.acf-tooltip.-confirm{z-index:900001}.acf-tooltip.-confirm a{text-decoration:none;color:#9ea3a8}.acf-tooltip.-confirm a:hover{text-decoration:underline}.acf-tooltip.-confirm a[data-event=confirm]{color:#f55e4f}.acf-overlay{position:fixed;top:0;bottom:0;left:0;right:0;cursor:default}.acf-tooltip-target{position:relative;z-index:900002}.acf-loading-overlay{position:absolute;top:0;bottom:0;left:0;right:0;cursor:default;z-index:99;background:rgba(249,249,249,.5)}.acf-loading-overlay i{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.acf-icon{display:inline-block;height:28px;width:28px;border:transparent solid 1px;border-radius:100%;font-size:20px;line-height:21px;text-align:center;text-decoration:none;vertical-align:top;box-sizing:border-box}.acf-icon:before{font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:1em;height:1em;vertical-align:middle;text-align:center}.acf-icon.-plus:before{content:""}.acf-icon.-minus:before{content:""}.acf-icon.-cancel:before{content:""}.acf-icon.-pencil:before{content:""}.acf-icon.-location:before{content:""}.acf-icon.-up:before{content:"";margin-top:-.1em}.acf-icon.-down:before{content:"";margin-top:.1em}.acf-icon.-left:before{content:"";margin-left:-.1em}.acf-icon.-right:before{content:"";margin-left:.1em}.acf-icon.-sync:before{content:""}.acf-icon.-globe:before{content:"";margin-top:.1em;margin-left:.1em}.acf-icon.-picture:before{content:""}.acf-icon.-check:before{content:"";margin-left:-.1em}.acf-icon.-dot-3:before{content:"";margin-top:-.1em}.acf-icon.-arrow-combo:before{content:""}.acf-icon.-arrow-up:before{content:"";margin-left:-.1em}.acf-icon.-arrow-down:before{content:"";margin-left:-.1em}.acf-icon.-search:before{content:""}.acf-icon.-link-ext:before{content:""}.acf-icon.-duplicate{position:relative}.acf-icon.-duplicate:after,.acf-icon.-duplicate:before{content:"";display:block;box-sizing:border-box;width:46%;height:46%;position:absolute;top:33%;left:23%}.acf-icon.-duplicate:before{margin:-1px 0 0 1px;box-shadow:2px -2px 0 0 currentColor}.acf-icon.-duplicate:after{border:solid 2px currentColor}.acf-icon.-collapse:before{content:"";margin-left:-.1em}.-collapsed .acf-icon.-collapse:before{content:"";margin-left:-.1em}span.acf-icon{color:#555d66;border-color:#b5bcc2;background-color:#fff}a.acf-icon{color:#555d66;border-color:#b5bcc2;background-color:#fff;position:relative;transition:none;cursor:pointer}a.acf-icon:hover{background:#f3f5f6;border-color:#0071a1;color:#0071a1}a.acf-icon.-cancel:hover,a.acf-icon.-minus:hover{background:#f7efef;border-color:#a10000;color:#dc3232}a.acf-icon:active,a.acf-icon:focus{outline:0;box-shadow:none}.acf-icon.-clear{border-color:transparent;background:0 0;color:#444}.acf-icon.light{border-color:transparent;background:#f5f5f5;color:#23282d}.acf-icon.dark{border-color:transparent!important;background:#23282d;color:#eee}a.acf-icon.dark:hover{background:#191e23;color:#00b9eb}a.acf-icon.dark.-cancel:hover,a.acf-icon.dark.-minus:hover{color:#d54e21}.acf-icon.grey{border-color:transparent!important;background:#b4b9be;color:#fff!important}.acf-icon.grey:hover{background:#00a0d2;color:#fff}.acf-icon.grey.-cancel:hover,.acf-icon.grey.-minus:hover{background:#32373c}.acf-icon.-small,.acf-icon.small{width:20px;height:20px;line-height:14px;font-size:14px}.acf-icon.-small.-duplicate:after,.acf-icon.-small.-duplicate:before,.acf-icon.small.-duplicate:after,.acf-icon.small.-duplicate:before{opacity:.8}.acf-box{background:#fff;border:1px solid #ccd0d4;position:relative;box-shadow:0 1px 1px rgba(0,0,0,.04)}.acf-box .title{border-bottom:1px solid #ccd0d4;margin:0;padding:15px}.acf-box .title h3{font-size:14px;line-height:1em;margin:0;padding:0}.acf-box .inner{padding:15px}.acf-box h2{color:#333;font-size:26px;line-height:1.25em;margin:.25em 0 .75em;padding:0}.acf-box h3{margin:1.5em 0 0}.acf-box p{margin-top:.5em}.acf-box a{text-decoration:none}.acf-box i.dashicons-external{margin-top:-1px}.acf-box .footer{border-top:1px solid #ccd0d4;padding:12px;font-size:13px;line-height:1.5}.acf-box .footer p{margin:0}.acf-admin-3-8 .acf-box{border-color:#e5e5e5}.acf-admin-3-8 .acf-box .footer,.acf-admin-3-8 .acf-box .title{border-color:#e5e5e5}.acf-notice{position:relative;display:block;color:#fff;margin:5px 0 15px;padding:3px 12px;background:#2a9bd9;border-left:#1f7db1 solid 3px}.acf-notice p{font-size:13px;line-height:1.5;margin:.5em 0;text-shadow:none;color:inherit}.acf-notice .acf-notice-dismiss{position:absolute;top:9px;right:12px;background:0 0!important;color:inherit!important;border-color:#fff!important;opacity:.75}.acf-notice .acf-notice-dismiss:hover{opacity:1}.acf-notice.-dismiss{padding-right:40px}.acf-notice.-error{background:#d94f4f;border-color:#c92c2c}.acf-notice.-success{background:#49ad52;border-color:#3a8941}.acf-notice.-warning{background:#fd8d3b;border-color:#fc7009}.acf-table{border:#ccd0d4 solid 1px;background:#fff;border-spacing:0;border-radius:0;table-layout:auto;padding:0;margin:0;width:100%;clear:both;box-sizing:content-box}.acf-table>tbody>tr>td,.acf-table>tbody>tr>th,.acf-table>thead>tr>td,.acf-table>thead>tr>th{padding:8px;vertical-align:top;background:#fff;text-align:left;border-style:solid;font-weight:400}.acf-table>tbody>tr>th,.acf-table>thead>tr>th{position:relative;color:#333}.acf-table>thead>tr>th{border-color:#d5d9dd;border-width:0 0 1px 1px}.acf-table>thead>tr>th:first-child{border-left-width:0}.acf-table>tbody>tr{z-index:1}.acf-table>tbody>tr>td{border-color:#eee;border-width:1px 0 0 1px}.acf-table>tbody>tr>td:first-child{border-left-width:0}.acf-table>tbody>tr:first-child>td{border-top-width:0}.acf-table.-clear{border:0 none}.acf-table.-clear>tbody>tr>td,.acf-table.-clear>tbody>tr>th,.acf-table.-clear>thead>tr>td,.acf-table.-clear>thead>tr>th{border:0 none;padding:4px}.acf-remove-element{-webkit-transition:all .25s ease-out;-moz-transition:all .25s ease-out;-o-transition:all .25s ease-out;transition:all .25s ease-out;transform:translate(50px,0);opacity:0}.acf-fade-up{-webkit-transition:all .25s ease-out;-moz-transition:all .25s ease-out;-o-transition:all .25s ease-out;transition:all .25s ease-out;transform:translate(0,-10px);opacity:0}.acf-tbody,.acf-tfoot,.acf-thead{width:100%;padding:0;margin:0}.acf-tbody>li,.acf-tfoot>li,.acf-thead>li{box-sizing:border-box;padding:8px 12px;font-size:12px;line-height:14px}.acf-thead{border-bottom:#ccd0d4 solid 1px;color:#23282d}.acf-thead>li{font-size:14px;line-height:1.4;font-weight:700}.acf-admin-3-8 .acf-thead{border-color:#dfdfdf}.acf-tfoot{background:#f5f5f5;border-top:#d5d9dd solid 1px}.acf-settings-wrap #poststuff{padding-top:15px}.acf-settings-wrap .acf-box{margin:20px 0}.acf-settings-wrap table{margin:0}.acf-settings-wrap table .button{vertical-align:middle}#acf-popup{position:fixed;z-index:900000;top:0;left:0;right:0;bottom:0;text-align:center}#acf-popup .bg{position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;background:rgba(0,0,0,.25)}#acf-popup:before{content:"";display:inline-block;height:100%;vertical-align:middle}#acf-popup .acf-popup-box{display:inline-block;vertical-align:middle;z-index:1;min-width:300px;min-height:160px;border-color:#aaa;box-shadow:0 5px 30px -5px rgba(0,0,0,.25);text-align:left}html[dir=rtl] #acf-popup .acf-popup-box{text-align:right}#acf-popup .acf-popup-box .title{min-height:15px;line-height:15px}#acf-popup .acf-popup-box .title .acf-icon{position:absolute;top:10px;right:10px}html[dir=rtl] #acf-popup .acf-popup-box .title .acf-icon{right:auto;left:10px}#acf-popup .acf-popup-box .inner{min-height:50px;padding:0;margin:15px}#acf-popup .acf-popup-box .loading{position:absolute;top:45px;left:0;right:0;bottom:0;z-index:2;background:rgba(0,0,0,.1);display:none}#acf-popup .acf-popup-box .loading i{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.acf-submit{margin-bottom:0;line-height:28px}.acf-submit span{float:right;color:#999}.acf-submit span.-error{color:#dd4232}.acf-submit .button{margin-right:5px}#acf-upgrade-notice{position:relative;background:#fff;border-left:4px solid #00a0d2;padding:20px}#acf-upgrade-notice:after{display:block;clear:both;content:""}#acf-upgrade-notice .col-content{float:left;width:55%;padding-left:90px}#acf-upgrade-notice .col-actions{float:right;text-align:center;padding:10px}#acf-upgrade-notice img{float:left;width:70px;height:70px;margin:0 0 0 -90px}#acf-upgrade-notice h2{font-size:16px;margin:2px 0 6.5px}#acf-upgrade-notice p{padding:0;margin:0}#acf-upgrade-notice .button:before{margin-top:11px}@media screen and (max-width:640px){#acf-upgrade-notice .col-actions,#acf-upgrade-notice .col-content{float:none;padding-left:90px;width:auto;text-align:left}}.acf-wrap h1{margin-top:0;padding-top:20px}.acf-wrap .about-text{margin-top:.5em;min-height:50px}.acf-wrap .about-headline-callout{font-size:2.4em;font-weight:300;line-height:1.3;margin:1.1em 0 .2em;text-align:center}.acf-wrap .feature-section{padding:40px 0}.acf-wrap .feature-section h2{margin-top:20px}.acf-wrap .changelog{list-style:disc;padding-left:15px}.acf-wrap .changelog li{margin:0 0 .75em}.acf-wrap .acf-three-col{display:flex;flex-wrap:wrap;justify-content:space-between}.acf-wrap .acf-three-col>div{flex:1;align-self:flex-start;min-width:31%;max-width:31%}@media screen and (max-width:880px){.acf-wrap .acf-three-col>div{min-width:48%}}@media screen and (max-width:640px){.acf-wrap .acf-three-col>div{min-width:100%}}.acf-wrap .acf-three-col h3 .badge{display:inline-block;vertical-align:top;border-radius:5px;background:#fc9700;color:#fff;font-weight:400;font-size:12px;padding:2px 5px}.acf-wrap .acf-three-col img+h3{margin-top:.5em}.acf-hl[data-cols]{margin-left:-10px;margin-right:-10px}.acf-hl[data-cols]>li{padding:0 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.acf-hl[data-cols="2"]>li{width:50%}.acf-hl[data-cols="3"]>li{width:33.333%}.acf-hl[data-cols="4"]>li{width:25%}@media screen and (max-width:640px){.acf-hl[data-cols]{margin-left:0;margin-right:0;margin-top:-10px}.acf-hl[data-cols]>li{width:100%!important;padding:10px 0 0}}.acf-actions{text-align:right;z-index:1}.acf-actions.-hover{position:absolute;display:none;top:0;right:0;padding:5px}html[dir=rtl] .acf-actions.-hover{right:auto;left:0}ul.acf-actions li{float:right;margin-left:4px}html[dir=rtl] .acf-fl{float:right}html[dir=rtl] .acf-fr{float:left}html[dir=rtl] .acf-hl>li{float:right}html[dir=rtl] .acf-hl>li.acf-fr{float:left}html[dir=rtl] .acf-icon.logo{left:0;right:auto}html[dir=rtl] .acf-table thead th{text-align:right;border-right-width:1px;border-left-width:0}html[dir=rtl] .acf-table>tbody>tr>td{text-align:right;border-right-width:1px;border-left-width:0}html[dir=rtl] .acf-table>tbody>tr>td:first-child,html[dir=rtl] .acf-table>thead>tr>th:first-child{border-right-width:0}html[dir=rtl] .acf-table>tbody>tr>td.order+td{border-right-color:#e1e1e1}.acf-postbox-columns{position:relative;margin-top:-11px;margin-bottom:-12px;margin-left:-12px;margin-right:268px}.acf-postbox-columns:after{display:block;clear:both;content:""}.acf-postbox-columns .acf-postbox-main,.acf-postbox-columns .acf-postbox-side{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 12px 12px}.acf-postbox-columns .acf-postbox-main{float:left;width:100%}.acf-postbox-columns .acf-postbox-side{float:right;width:280px;margin-right:-280px}.acf-postbox-columns .acf-postbox-side:before{content:"";display:block;position:absolute;width:1px;height:100%;top:0;right:0;background:#d5d9dd}.acf-admin-3-8 .acf-postbox-columns .acf-postbox-side:before{background:#dfdfdf}@media only screen and (max-width:850px){.acf-postbox-columns{margin:0}.acf-postbox-columns .acf-postbox-main,.acf-postbox-columns .acf-postbox-side{float:none;width:auto;margin:0;padding:0}.acf-postbox-columns .acf-postbox-side{margin-top:1em}.acf-postbox-columns .acf-postbox-side:before{display:none}}.acf-panel{margin-top:-1px;border-top:1px solid #d5d9dd;border-bottom:1px solid #d5d9dd}.acf-panel .acf-panel-title{margin:0;padding:12px;font-weight:700;cursor:pointer;font-size:inherit}.acf-panel .acf-panel-title i{float:right}.acf-panel .acf-panel-inside{margin:0;padding:0 12px 12px;display:none}.acf-panel.-open .acf-panel-inside{display:block}.postbox .acf-panel{margin-left:-12px;margin-right:-12px}.acf-panel .acf-field{margin:20px 0 0}.acf-panel .acf-field .acf-label label{color:#555d66;font-weight:400}.acf-panel .acf-field:first-child{margin-top:0}.acf-admin-3-8 .acf-panel{border-color:#dfdfdf}#acf-admin-tools .notice{margin-top:10px}.acf-meta-box-wrap{margin-top:10px}.acf-meta-box-wrap .postbox{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.acf-meta-box-wrap .postbox .inside{margin-bottom:0}.acf-meta-box-wrap .postbox .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;position:relative;z-index:1;cursor:default}.acf-meta-box-wrap .postbox .handle-order-higher,.acf-meta-box-wrap .postbox .handle-order-lower,.acf-meta-box-wrap .postbox .handlediv{display:none}.acf-meta-box-wrap .acf-fields{border:#ebebeb solid 1px;background:#fafafa;border-radius:3px}.acf-meta-box-wrap.-grid{margin-left:8px;margin-right:8px}.acf-meta-box-wrap.-grid .postbox{float:left;clear:left;width:50%;margin:0 0 16px}.acf-meta-box-wrap.-grid .postbox:nth-child(odd){margin-left:-8px}.acf-meta-box-wrap.-grid .postbox:nth-child(even){float:right;clear:right;margin-right:-8px}@media only screen and (max-width:850px){.acf-meta-box-wrap.-grid{margin-left:0;margin-right:0}.acf-meta-box-wrap.-grid .postbox{margin-left:0!important;margin-right:0!important;width:100%}}#acf-admin-tool-export p{max-width:800px}#acf-admin-tool-export ul{column-width:200px}#acf-admin-tool-export .acf-postbox-side .button{margin:0;width:100%}#acf-admin-tool-export textarea{display:block;width:100%;min-height:500px;background:#fafafa;box-shadow:none;padding:7px;border-radius:3px}#acf-admin-tool-export .acf-panel-selection .acf-label{display:none}.acf-admin-toolbar{background:#fff;border-bottom:1px solid #ccd0d4;padding-top:10px}.acf-admin-toolbar h2{font-size:14px;line-height:2.5714285714;display:inline-block;padding:5px 0;margin:0 10px 0 0}.acf-admin-toolbar h2 i{vertical-align:middle;color:#babbbc}.acf-admin-toolbar .acf-tab{display:inline-block;font-size:14px;line-height:2.5714285714;padding:5px;margin:0 5px;text-decoration:none;color:inherit}.acf-admin-toolbar .acf-tab.is-active{border-bottom:#0071a4 solid 3px;padding-bottom:10px}.acf-admin-toolbar .acf-tab:hover{color:#00a0d2}.acf-admin-toolbar .acf-tab:focus{box-shadow:none}.acf-admin-toolbar a.btn-upgrade{display:inline-flex;background:#dee3ff;border:1px solid #c6d3f8;box-sizing:border-box;border-radius:.25rem;padding:0 .75rem;cursor:pointer;vertical-align:middle;margin-top:-6px;margin-left:20px;text-decoration:none}.acf-admin-toolbar a.btn-upgrade:hover{background:#d1ddff;border-color:#b9caf9}.acf-admin-toolbar a.btn-upgrade p{font-family:system-ui;font-weight:600;letter-spacing:.2;line-height:1;font-size:.625rem;text-transform:uppercase;color:#425fdd;margin-left:.65rem}#wpcontent .acf-admin-toolbar{margin-left:-20px;padding-left:20px}@media screen and (max-width:600px){.acf-admin-toolbar{display:none}}.acf-admin-field-groups .tablenav.top{display:none}.acf-admin-field-groups .subsubsub{margin-bottom:3px}.acf-admin-field-groups .wp-list-table td,.acf-admin-field-groups .wp-list-table th{box-sizing:border-box}.acf-admin-field-groups .wp-list-table tr:hover{background:#f7f7f7}@media screen and (min-width:782px){.acf-admin-field-groups .wp-list-table .column-acf-count{width:10%}}.acf-admin-field-groups .wp-list-table .row-actions span.file{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.acf-admin-field-groups .acf-secondary-text{color:#a0a5aa}.acf-multi-dashicon{position:relative;z-index:1}.acf-multi-dashicon:after,.acf-multi-dashicon:before{width:18px;height:18px;line-height:18px;font-size:14px;background:#fff;border:#7e8993 solid 1px;border-radius:2px;display:block}.acf-multi-dashicon:after{content:"";position:absolute;top:-3px;left:-3px;z-index:-1;background:#e7e7e7}.acf-css-tooltip{position:relative}.acf-css-tooltip:before{content:attr(aria-label);display:none;position:absolute;z-index:999;bottom:100%;left:50%;transform:translate(-50%,-8px);background:#191e23;border-radius:2px;padding:5px 10px;color:#fff;font-size:12px;line-height:1.4em;white-space:pre}.acf-css-tooltip:after{content:"";display:none;position:absolute;z-index:998;bottom:100%;left:50%;transform:translate(-50%,4px);border:solid 6px transparent;border-top-color:#191e23}.acf-css-tooltip:focus:after,.acf-css-tooltip:focus:before,.acf-css-tooltip:hover:after,.acf-css-tooltip:hover:before{display:block}.acf-diff .acf-diff-title{position:absolute;top:0;left:0;right:0;height:40px;padding:14px 16px;background:#f3f3f3;border-bottom:#ddd solid 1px}.acf-diff .acf-diff-title strong{font-size:14px;display:block}.acf-diff .acf-diff-title .acf-diff-title-left,.acf-diff .acf-diff-title .acf-diff-title-right{width:50%;float:left}.acf-diff .acf-diff-content{position:absolute;top:70px;left:0;right:0;bottom:0;overflow:auto}.acf-diff table.diff{border-spacing:0}.acf-diff table.diff col.diffsplit.middle{width:0}.acf-diff table.diff td,.acf-diff table.diff th{padding-top:.25em;padding-bottom:.25em}.acf-diff table.diff tr td:nth-child(2){width:auto}.acf-diff table.diff td:nth-child(3){border-left:#ddd solid 1px}@media screen and (max-width:600px){.acf-diff .acf-diff-title{height:70px}.acf-diff .acf-diff-content{top:100px}}.acf-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc}.acf-modal .acf-modal-content,.acf-modal .acf-modal-title,.acf-modal .acf-modal-toolbar{box-sizing:border-box;position:absolute;left:0;right:0}.acf-modal .acf-modal-title{height:50px;top:0;border-bottom:1px solid #ddd}.acf-modal .acf-modal-title h2{margin:0;padding:0 16px;line-height:50px}.acf-modal .acf-modal-title .acf-modal-close{position:absolute;top:0;right:0;height:50px;width:50px;border:none;border-left:1px solid #ddd;background:0 0;cursor:pointer;color:#666}.acf-modal .acf-modal-title .acf-modal-close:hover{color:#00a0d2}.acf-modal .acf-modal-content{top:50px;bottom:60px;background:#fff;overflow:auto;padding:16px}.acf-modal .acf-modal-feedback{position:absolute;top:50%;margin:-10px 0;left:0;right:0;text-align:center;opacity:.75}.acf-modal .acf-modal-feedback.error{opacity:1;color:#b52727}.acf-modal .acf-modal-toolbar{height:60px;bottom:0;padding:15px 16px;border-top:1px solid #ddd}.acf-modal .acf-modal-toolbar .button{float:right}@media only screen and (max-width:640px){.acf-modal{top:0;left:0;right:0;bottom:0}}.acf-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;z-index:159900}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2/1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.acf-loading,.acf-spinner{background-image:url(../../images/spinner@2x.gif);background-size:20px 20px}}
\ No newline at end of file
diff --git a/assets/build/css/acf-input.css b/assets/build/css/acf-input.css
new file mode 100644
index 0000000..7204169
--- /dev/null
+++ b/assets/build/css/acf-input.css
@@ -0,0 +1,2932 @@
+/*--------------------------------------------------------------------------------------------
+*
+* Vars
+*
+*--------------------------------------------------------------------------------------------*/
+/* colors */
+/* acf-field */
+/* responsive */
+/*--------------------------------------------------------------------------------------------
+*
+* Mixins
+*
+*--------------------------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------------------------
+*
+* acf-field
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-field,
+.acf-field .acf-label,
+.acf-field .acf-input {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ position: relative;
+}
+
+.acf-field {
+ margin: 15px 0;
+ clear: both;
+}
+.acf-field p.description {
+ display: block;
+ margin: 0;
+ padding: 0;
+}
+.acf-field .acf-label {
+ vertical-align: top;
+ margin: 0 0 10px;
+}
+.acf-field .acf-label label {
+ display: block;
+ font-weight: bold;
+ margin: 0 0 3px;
+ padding: 0;
+}
+.acf-field .acf-label:empty {
+ margin-bottom: 0;
+}
+.acf-field .acf-input {
+ vertical-align: top;
+}
+.acf-field .acf-input > p.description {
+ margin-top: 5px;
+}
+.acf-field .acf-notice {
+ margin: 0 0 15px;
+ background: #edf2ff;
+ color: #0c6ca0;
+ border-color: #2183b9;
+}
+.acf-field .acf-notice.-error {
+ background: #ffe6e6;
+ color: #cc2727;
+ border-color: #d12626;
+}
+.acf-field .acf-notice.-success {
+ background: #eefbe8;
+ color: #0e7b17;
+ border-color: #32a23b;
+}
+.acf-field .acf-notice.-warning {
+ background: #fff3e6;
+ color: #bd4b0e;
+ border-color: #d16226;
+}
+td.acf-field, tr.acf-field {
+ margin: 0;
+}
+
+.acf-field[data-width] {
+ float: left;
+ clear: none;
+ /*
+ @media screen and (max-width: $sm) {
+ float: none;
+ width: auto;
+ border-left-width: 0;
+ border-right-width: 0;
+ }
+ */
+}
+.acf-field[data-width] + .acf-field[data-width] {
+ border-left: 1px solid #eeeeee;
+}
+html[dir=rtl] .acf-field[data-width] {
+ float: right;
+}
+html[dir=rtl] .acf-field[data-width] + .acf-field[data-width] {
+ border-left: none;
+ border-right: 1px solid #eeeeee;
+}
+td.acf-field[data-width], tr.acf-field[data-width] {
+ float: none;
+}
+
+.acf-field.-c0 {
+ clear: both;
+ border-left-width: 0 !important;
+}
+html[dir=rtl] .acf-field.-c0 {
+ border-left-width: 1px !important;
+ border-right-width: 0 !important;
+}
+
+.acf-field.-r0 {
+ border-top-width: 0 !important;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-fields
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-fields {
+ position: relative;
+}
+.acf-fields:after {
+ display: block;
+ clear: both;
+ content: "";
+}
+.acf-fields.-border {
+ border: #ccd0d4 solid 1px;
+ background: #fff;
+}
+.acf-fields > .acf-field {
+ position: relative;
+ margin: 0;
+ padding: 15px 12px;
+ border-top: #EEEEEE solid 1px;
+}
+.acf-fields > .acf-field:first-child {
+ border-top: none;
+ margin-top: 0;
+}
+td.acf-fields {
+ padding: 0 !important;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-fields (clear)
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-fields.-clear > .acf-field {
+ border: none;
+ padding: 0;
+ margin: 15px 0;
+}
+.acf-fields.-clear > .acf-field[data-width] {
+ border: none !important;
+}
+.acf-fields.-clear > .acf-field > .acf-label {
+ padding: 0;
+}
+.acf-fields.-clear > .acf-field > .acf-input {
+ padding: 0;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-fields (left)
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-fields.-left > .acf-field {
+ padding: 15px 0;
+}
+.acf-fields.-left > .acf-field:after {
+ display: block;
+ clear: both;
+ content: "";
+}
+.acf-fields.-left > .acf-field:before {
+ content: "";
+ display: block;
+ position: absolute;
+ z-index: 0;
+ background: #F9F9F9;
+ border-color: #E1E1E1;
+ border-style: solid;
+ border-width: 0 1px 0 0;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 20%;
+}
+.acf-fields.-left > .acf-field[data-width] {
+ float: none;
+ width: auto !important;
+ border-left-width: 0 !important;
+ border-right-width: 0 !important;
+}
+.acf-fields.-left > .acf-field > .acf-label {
+ float: left;
+ width: 20%;
+ margin: 0;
+ padding: 0 12px;
+}
+.acf-fields.-left > .acf-field > .acf-input {
+ float: left;
+ width: 80%;
+ margin: 0;
+ padding: 0 12px;
+}
+html[dir=rtl] .acf-fields.-left > .acf-field:before {
+ border-width: 0 0 0 1px;
+ left: auto;
+ right: 0;
+}
+html[dir=rtl] .acf-fields.-left > .acf-field > .acf-label {
+ float: right;
+}
+html[dir=rtl] .acf-fields.-left > .acf-field > .acf-input {
+ float: right;
+}
+#side-sortables .acf-fields.-left > .acf-field:before {
+ display: none;
+}
+#side-sortables .acf-fields.-left > .acf-field > .acf-label {
+ width: 100%;
+ margin-bottom: 10px;
+}
+#side-sortables .acf-fields.-left > .acf-field > .acf-input {
+ width: 100%;
+}
+@media screen and (max-width: 640px) {
+ .acf-fields.-left > .acf-field:before {
+ display: none;
+ }
+ .acf-fields.-left > .acf-field > .acf-label {
+ width: 100%;
+ margin-bottom: 10px;
+ }
+ .acf-fields.-left > .acf-field > .acf-input {
+ width: 100%;
+ }
+}
+
+/* clear + left */
+.acf-fields.-clear.-left > .acf-field {
+ padding: 0;
+ border: none;
+}
+.acf-fields.-clear.-left > .acf-field:before {
+ display: none;
+}
+.acf-fields.-clear.-left > .acf-field > .acf-label {
+ padding: 0;
+}
+.acf-fields.-clear.-left > .acf-field > .acf-input {
+ padding: 0;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-table
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-table tr.acf-field > td.acf-label {
+ padding: 15px 12px;
+ margin: 0;
+ background: #F9F9F9;
+ width: 20%;
+}
+.acf-table tr.acf-field > td.acf-input {
+ padding: 15px 12px;
+ margin: 0;
+ border-left-color: #E1E1E1;
+}
+
+.acf-sortable-tr-helper {
+ position: relative !important;
+ display: table-row !important;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* acf-postbox
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-postbox {
+ position: relative;
+}
+.acf-postbox > .inside {
+ margin: 0 !important;
+ /* override WP style - do not delete - you have tried this before */
+ padding: 0 !important;
+ /* override WP style - do not delete - you have tried this before */
+}
+.acf-postbox .acf-hndle-cog {
+ color: #72777c;
+ font-size: 16px;
+ line-height: 36px;
+ height: 36px;
+ width: 1.62rem;
+ position: relative;
+ display: none;
+}
+.acf-postbox .acf-hndle-cog:hover {
+ color: #191e23;
+}
+.acf-postbox > .hndle:hover .acf-hndle-cog,
+.acf-postbox > .postbox-header:hover .acf-hndle-cog {
+ display: inline-block;
+}
+.acf-postbox > .hndle .acf-hndle-cog {
+ height: 20px;
+ line-height: 20px;
+ float: right;
+ width: auto;
+}
+.acf-postbox > .hndle .acf-hndle-cog:hover {
+ color: #777777;
+}
+.acf-postbox .acf-replace-with-fields {
+ padding: 15px;
+ text-align: center;
+}
+
+#post-body-content #acf_after_title-sortables {
+ margin: 20px 0 -20px;
+}
+
+/* seamless */
+.acf-postbox.seamless {
+ border: 0 none;
+ background: transparent;
+ box-shadow: none;
+ /* hide hndle */
+ /* inside */
+}
+.acf-postbox.seamless > .postbox-header,
+.acf-postbox.seamless > .hndle,
+.acf-postbox.seamless > .handlediv {
+ display: none !important;
+}
+.acf-postbox.seamless > .inside {
+ display: block !important;
+ /* stop metabox from hiding when closed */
+ margin-left: -12px !important;
+ margin-right: -12px !important;
+}
+.acf-postbox.seamless > .inside > .acf-field {
+ border-color: transparent;
+}
+
+/* seamless (left) */
+.acf-postbox.seamless > .acf-fields.-left {
+ /* hide sidebar bg */
+ /* mobile */
+}
+.acf-postbox.seamless > .acf-fields.-left > .acf-field:before {
+ display: none;
+}
+@media screen and (max-width: 782px) {
+ .acf-postbox.seamless > .acf-fields.-left {
+ /* remove padding */
+ }
+ .acf-postbox.seamless > .acf-fields.-left > .acf-field > .acf-label, .acf-postbox.seamless > .acf-fields.-left > .acf-field > .acf-input {
+ padding: 0;
+ }
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Inputs
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field input[type=text],
+.acf-field input[type=password],
+.acf-field input[type=date],
+.acf-field input[type=datetime],
+.acf-field input[type=datetime-local],
+.acf-field input[type=email],
+.acf-field input[type=month],
+.acf-field input[type=number],
+.acf-field input[type=search],
+.acf-field input[type=tel],
+.acf-field input[type=time],
+.acf-field input[type=url],
+.acf-field input[type=week],
+.acf-field textarea,
+.acf-field select {
+ width: 100%;
+ padding: 4px 8px;
+ margin: 0;
+ box-sizing: border-box;
+ font-size: 14px;
+ line-height: 1.4;
+}
+.acf-admin-3-8 .acf-field input[type=text],
+.acf-admin-3-8 .acf-field input[type=password],
+.acf-admin-3-8 .acf-field input[type=date],
+.acf-admin-3-8 .acf-field input[type=datetime],
+.acf-admin-3-8 .acf-field input[type=datetime-local],
+.acf-admin-3-8 .acf-field input[type=email],
+.acf-admin-3-8 .acf-field input[type=month],
+.acf-admin-3-8 .acf-field input[type=number],
+.acf-admin-3-8 .acf-field input[type=search],
+.acf-admin-3-8 .acf-field input[type=tel],
+.acf-admin-3-8 .acf-field input[type=time],
+.acf-admin-3-8 .acf-field input[type=url],
+.acf-admin-3-8 .acf-field input[type=week],
+.acf-admin-3-8 .acf-field textarea,
+.acf-admin-3-8 .acf-field select {
+ padding: 3px 5px;
+}
+.acf-field textarea {
+ resize: vertical;
+}
+
+body.acf-browser-firefox .acf-field select {
+ padding: 4px 5px;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Text
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-input-prepend,
+.acf-input-append,
+.acf-input-wrap {
+ box-sizing: border-box;
+}
+
+.acf-input-prepend,
+.acf-input-append {
+ font-size: 14px;
+ line-height: 1.4;
+ padding: 4px 8px;
+ background: #f5f5f5;
+ border: #7e8993 solid 1px;
+ min-height: 30px;
+}
+.acf-admin-3-8 .acf-input-prepend,
+.acf-admin-3-8 .acf-input-append {
+ padding: 3px 5px;
+ border-color: #dddddd;
+ min-height: 28px;
+}
+
+.acf-input-prepend {
+ float: left;
+ border-right-width: 0;
+ border-radius: 3px 0 0 3px;
+}
+
+.acf-input-append {
+ float: right;
+ border-left-width: 0;
+ border-radius: 0 3px 3px 0;
+}
+
+.acf-input-wrap {
+ position: relative;
+ overflow: hidden;
+}
+.acf-input-wrap .acf-is-prepended {
+ border-radius: 0 3px 3px 0 !important;
+}
+.acf-input-wrap .acf-is-appended {
+ border-radius: 3px 0 0 3px !important;
+}
+.acf-input-wrap .acf-is-prepended.acf-is-appended {
+ border-radius: 0 !important;
+}
+
+/* rtl */
+html[dir=rtl] .acf-input-prepend {
+ border-left-width: 0;
+ border-right-width: 1px;
+ border-radius: 0 3px 3px 0;
+ float: right;
+}
+
+html[dir=rtl] .acf-input-append {
+ border-left-width: 1px;
+ border-right-width: 0;
+ border-radius: 3px 0 0 3px;
+ float: left;
+}
+
+html[dir=rtl] input.acf-is-prepended {
+ border-radius: 3px 0 0 3px !important;
+}
+
+html[dir=rtl] input.acf-is-appended {
+ border-radius: 0 3px 3px 0 !important;
+}
+
+html[dir=rtl] input.acf-is-prepended.acf-is-appended {
+ border-radius: 0 !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Color Picker
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-color-picker .wp-color-result {
+ border-color: #7e8993;
+}
+.acf-admin-3-8 .acf-color-picker .wp-color-result {
+ border-color: #ccd0d4;
+}
+.acf-color-picker .wp-picker-active {
+ position: relative;
+ z-index: 1;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Url
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-url i {
+ position: absolute;
+ top: 5px;
+ left: 5px;
+ opacity: 0.5;
+ color: #7e8993;
+}
+.acf-url input[type=url] {
+ padding-left: 27px !important;
+}
+.acf-url.-valid i {
+ opacity: 1;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Select2 (v3)
+*
+*---------------------------------------------------------------------------------------------*/
+.select2-container.-acf {
+ /* open */
+ /* single open */
+}
+.select2-container.-acf .select2-choices {
+ background: #fff;
+ border-color: #ddd;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
+ min-height: 31px;
+}
+.select2-container.-acf .select2-choices .select2-search-choice {
+ margin: 5px 0 5px 5px;
+ padding: 3px 5px 3px 18px;
+ border-color: #bbb;
+ background: #f9f9f9;
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
+ /* sortable item*/
+ /* sortable shadow */
+}
+.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper {
+ background: #5897fb;
+ border-color: #3f87fa;
+ color: #fff;
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
+}
+.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper a {
+ visibility: hidden;
+}
+.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-placeholder {
+ background-color: #f7f7f7;
+ border-color: #f7f7f7;
+ visibility: visible !important;
+}
+.select2-container.-acf .select2-choices .select2-search-choice-focus {
+ border-color: #999;
+}
+.select2-container.-acf .select2-choices .select2-search-field input {
+ height: 31px;
+ line-height: 22px;
+ margin: 0;
+ padding: 5px 5px 5px 7px;
+}
+.select2-container.-acf .select2-choice {
+ border-color: #BBBBBB;
+}
+.select2-container.-acf .select2-choice .select2-arrow {
+ background: transparent;
+ border-left-color: #DFDFDF;
+ padding-left: 1px;
+}
+.select2-container.-acf .select2-choice .select2-result-description {
+ display: none;
+}
+.select2-container.-acf.select2-container-active .select2-choices, .select2-container.-acf.select2-dropdown-open .select2-choices {
+ border-color: #5B9DD9;
+ border-radius: 3px 3px 0 0;
+}
+.select2-container.-acf.select2-dropdown-open .select2-choice {
+ background: #fff;
+ border-color: #5B9DD9;
+}
+
+/* rtl */
+html[dir=rtl] .select2-container.-acf .select2-search-choice-close {
+ left: 24px;
+}
+html[dir=rtl] .select2-container.-acf .select2-choice > .select2-chosen {
+ margin-left: 42px;
+}
+html[dir=rtl] .select2-container.-acf .select2-choice .select2-arrow {
+ padding-left: 0;
+ padding-right: 1px;
+}
+
+/* description */
+.select2-drop {
+ /* search*/
+ /* result */
+}
+.select2-drop .select2-search {
+ padding: 4px 4px 0;
+}
+.select2-drop .select2-result {
+ /* hover*/
+}
+.select2-drop .select2-result .select2-result-description {
+ color: #999;
+ font-size: 12px;
+ margin-left: 5px;
+}
+.select2-drop .select2-result.select2-highlighted .select2-result-description {
+ color: #fff;
+ opacity: 0.75;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Select2 (v4)
+*
+*---------------------------------------------------------------------------------------------*/
+.select2-container.-acf li {
+ margin-bottom: 0;
+}
+.select2-container.-acf .select2-selection {
+ border-color: #7e8993;
+}
+.acf-admin-3-8 .select2-container.-acf .select2-selection {
+ border-color: #aaa;
+}
+.select2-container.-acf .select2-selection--multiple .select2-search--inline:first-child {
+ float: none;
+}
+.select2-container.-acf .select2-selection--multiple .select2-search--inline:first-child input {
+ width: 100% !important;
+}
+.select2-container.-acf .select2-selection--multiple .select2-selection__rendered {
+ padding-right: 0;
+}
+.select2-container.-acf .select2-selection--multiple .select2-selection__choice {
+ background-color: #f7f7f7;
+ border-color: #cccccc;
+ max-width: 100%;
+ overflow: hidden;
+ word-wrap: normal !important;
+ white-space: normal;
+}
+.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper {
+ background: #5897fb;
+ border-color: #3f87fa;
+ color: #fff;
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
+}
+.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper span {
+ visibility: hidden;
+}
+.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-placeholder {
+ background-color: #f7f7f7;
+ border-color: #f7f7f7;
+ visibility: visible !important;
+}
+.select2-container.-acf .select2-selection--multiple .select2-search__field {
+ box-shadow: none !important;
+ min-height: 0;
+}
+.acf-row .select2-container.-acf .select2-selection--single {
+ overflow: hidden;
+}
+.acf-row .select2-container.-acf .select2-selection--single .select2-selection__rendered {
+ white-space: normal;
+}
+
+.select2-container .select2-dropdown {
+ z-index: 900000;
+}
+.select2-container .select2-dropdown .select2-search__field {
+ line-height: 1.4;
+ min-height: 0;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Link
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-link .link-wrap {
+ display: none;
+ border: #ccd0d4 solid 1px;
+ border-radius: 3px;
+ padding: 5px;
+ line-height: 26px;
+ background: #fff;
+ word-wrap: break-word;
+ word-break: break-all;
+}
+.acf-link .link-wrap .link-title {
+ padding: 0 5px;
+}
+.acf-link.-value .button {
+ display: none;
+}
+.acf-link.-value .acf-icon.-link-ext {
+ display: none;
+}
+.acf-link.-value .link-wrap {
+ display: inline-block;
+}
+.acf-link.-external .acf-icon.-link-ext {
+ display: inline-block;
+}
+
+#wp-link-backdrop {
+ z-index: 900000 !important;
+}
+
+#wp-link-wrap {
+ z-index: 900001 !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Radio
+*
+*---------------------------------------------------------------------------------------------*/
+ul.acf-radio-list,
+ul.acf-checkbox-list {
+ background: transparent;
+ position: relative;
+ padding: 1px;
+ margin: 0;
+ /* hl */
+ /* rtl */
+}
+ul.acf-radio-list li,
+ul.acf-checkbox-list li {
+ font-size: 13px;
+ line-height: 22px;
+ margin: 0;
+ position: relative;
+ word-wrap: break-word;
+ /* attachment sidebar fix*/
+}
+ul.acf-radio-list li label,
+ul.acf-checkbox-list li label {
+ display: inline;
+}
+ul.acf-radio-list li input[type=checkbox],
+ul.acf-radio-list li input[type=radio],
+ul.acf-checkbox-list li input[type=checkbox],
+ul.acf-checkbox-list li input[type=radio] {
+ margin: -1px 4px 0 0;
+ vertical-align: middle;
+}
+ul.acf-radio-list li input[type=text],
+ul.acf-checkbox-list li input[type=text] {
+ width: auto;
+ vertical-align: middle;
+ margin: 2px 0;
+}
+ul.acf-radio-list li span,
+ul.acf-checkbox-list li span {
+ float: none;
+}
+ul.acf-radio-list li i,
+ul.acf-checkbox-list li i {
+ vertical-align: middle;
+}
+ul.acf-radio-list.acf-hl li,
+ul.acf-checkbox-list.acf-hl li {
+ margin-right: 20px;
+ clear: none;
+}
+html[dir=rtl] ul.acf-radio-list input[type=checkbox],
+html[dir=rtl] ul.acf-radio-list input[type=radio],
+html[dir=rtl] ul.acf-checkbox-list input[type=checkbox],
+html[dir=rtl] ul.acf-checkbox-list input[type=radio] {
+ margin-left: 4px;
+ margin-right: 0;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Button Group
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-button-group {
+ display: inline-block;
+ /* default (horizontal) */
+ /* vertical */
+}
+.acf-button-group label {
+ display: inline-block;
+ border: #7e8993 solid 1px;
+ position: relative;
+ z-index: 1;
+ padding: 5px 10px;
+ background: #fff;
+}
+.acf-button-group label:hover {
+ color: #016087;
+ background: #f3f5f6;
+ border-color: #0071a1;
+ z-index: 2;
+}
+.acf-button-group label.selected {
+ border-color: #007cba;
+ background: #008dd4;
+ color: #fff;
+ z-index: 2;
+}
+.acf-button-group input {
+ display: none !important;
+}
+.acf-button-group {
+ padding-left: 1px;
+ display: inline-flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+}
+.acf-button-group label {
+ margin: 0 0 0 -1px;
+ flex: 1;
+ text-align: center;
+ white-space: nowrap;
+}
+.acf-button-group label:first-child {
+ border-radius: 3px 0 0 3px;
+}
+html[dir=rtl] .acf-button-group label:first-child {
+ border-radius: 0 3px 3px 0;
+}
+.acf-button-group label:last-child {
+ border-radius: 0 3px 3px 0;
+}
+html[dir=rtl] .acf-button-group label:last-child {
+ border-radius: 3px 0 0 3px;
+}
+.acf-button-group label:only-child {
+ border-radius: 3px;
+}
+.acf-button-group.-vertical {
+ padding-left: 0;
+ padding-top: 1px;
+ flex-direction: column;
+}
+.acf-button-group.-vertical label {
+ margin: -1px 0 0 0;
+}
+.acf-button-group.-vertical label:first-child {
+ border-radius: 3px 3px 0 0;
+}
+.acf-button-group.-vertical label:last-child {
+ border-radius: 0 0 3px 3px;
+}
+.acf-button-group.-vertical label:only-child {
+ border-radius: 3px;
+}
+.acf-admin-3-8 .acf-button-group label {
+ border-color: #ccd0d4;
+}
+.acf-admin-3-8 .acf-button-group label:hover {
+ border-color: #0071a1;
+}
+.acf-admin-3-8 .acf-button-group label.selected {
+ border-color: #007cba;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Checkbox
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-checkbox-list .button {
+ margin: 10px 0 0;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* True / False
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-switch {
+ display: inline-block;
+ border-radius: 5px;
+ cursor: pointer;
+ position: relative;
+ background: #f5f5f5;
+ height: 30px;
+ vertical-align: middle;
+ border: #7e8993 solid 1px;
+ -webkit-transition: background 0.25s ease;
+ -moz-transition: background 0.25s ease;
+ -o-transition: background 0.25s ease;
+ transition: background 0.25s ease;
+ /* hover */
+ /* active */
+ /* message */
+}
+.acf-switch span {
+ display: inline-block;
+ float: left;
+ text-align: center;
+ font-size: 13px;
+ line-height: 22px;
+ padding: 4px 10px;
+ min-width: 15px;
+}
+.acf-switch span i {
+ vertical-align: middle;
+}
+.acf-switch .acf-switch-on {
+ color: #fff;
+ text-shadow: #007cba 0 1px 0;
+}
+.acf-switch .acf-switch-slider {
+ position: absolute;
+ top: 2px;
+ left: 2px;
+ bottom: 2px;
+ right: 50%;
+ z-index: 1;
+ background: #fff;
+ border-radius: 3px;
+ border: #7e8993 solid 1px;
+ -webkit-transition: all 0.25s ease;
+ -moz-transition: all 0.25s ease;
+ -o-transition: all 0.25s ease;
+ transition: all 0.25s ease;
+ transition-property: left, right;
+}
+.acf-switch:hover, .acf-switch.-focus {
+ border-color: #0071a1;
+ background: #f3f5f6;
+ color: #016087;
+}
+.acf-switch:hover .acf-switch-slider, .acf-switch.-focus .acf-switch-slider {
+ border-color: #0071a1;
+}
+.acf-switch.-on {
+ background: #0d99d5;
+ border-color: #007cba;
+ /* hover */
+}
+.acf-switch.-on .acf-switch-slider {
+ left: 50%;
+ right: 2px;
+ border-color: #007cba;
+}
+.acf-switch.-on:hover {
+ border-color: #007cba;
+}
+.acf-switch + span {
+ margin-left: 6px;
+}
+.acf-admin-3-8 .acf-switch {
+ border-color: #ccd0d4;
+}
+.acf-admin-3-8 .acf-switch .acf-switch-slider {
+ border-color: #ccd0d4;
+}
+.acf-admin-3-8 .acf-switch:hover, .acf-admin-3-8 .acf-switch.-focus {
+ border-color: #0071a1;
+}
+.acf-admin-3-8 .acf-switch:hover .acf-switch-slider, .acf-admin-3-8 .acf-switch.-focus .acf-switch-slider {
+ border-color: #0071a1;
+}
+.acf-admin-3-8 .acf-switch.-on {
+ border-color: #007cba;
+}
+.acf-admin-3-8 .acf-switch.-on .acf-switch-slider {
+ border-color: #007cba;
+}
+.acf-admin-3-8 .acf-switch.-on:hover {
+ border-color: #007cba;
+}
+
+/* checkbox */
+.acf-switch-input {
+ opacity: 0;
+ position: absolute;
+ margin: 0;
+}
+
+/* in media modal */
+.compat-item .acf-true-false .message {
+ float: none;
+ padding: 0;
+ vertical-align: middle;
+}
+
+/*--------------------------------------------------------------------------
+*
+* Google Map
+*
+*-------------------------------------------------------------------------*/
+.acf-google-map {
+ position: relative;
+ border: #ccd0d4 solid 1px;
+ background: #fff;
+}
+.acf-google-map .title {
+ position: relative;
+ border-bottom: #ccd0d4 solid 1px;
+}
+.acf-google-map .title .search {
+ margin: 0;
+ font-size: 14px;
+ line-height: 30px;
+ height: 40px;
+ padding: 5px 10px;
+ border: 0 none;
+ box-shadow: none;
+ border-radius: 0;
+ font-family: inherit;
+ cursor: text;
+}
+.acf-google-map .title .acf-loading {
+ position: absolute;
+ top: 10px;
+ right: 11px;
+ display: none;
+}
+.acf-google-map .title .acf-icon:active {
+ display: inline-block !important;
+}
+.acf-google-map .canvas {
+ height: 400px;
+}
+.acf-google-map:hover .title .acf-actions {
+ display: block;
+}
+.acf-google-map .title .acf-icon.-location {
+ display: inline-block;
+}
+.acf-google-map .title .acf-icon.-cancel,
+.acf-google-map .title .acf-icon.-search {
+ display: none;
+}
+.acf-google-map.-value .title .search {
+ font-weight: bold;
+}
+.acf-google-map.-value .title .acf-icon.-location {
+ display: none;
+}
+.acf-google-map.-value .title .acf-icon.-cancel {
+ display: inline-block;
+}
+.acf-google-map.-searching .title .acf-icon.-location {
+ display: none;
+}
+.acf-google-map.-searching .title .acf-icon.-cancel,
+.acf-google-map.-searching .title .acf-icon.-search {
+ display: inline-block;
+}
+.acf-google-map.-searching .title .acf-actions {
+ display: block;
+}
+.acf-google-map.-searching .title .search {
+ font-weight: normal !important;
+}
+.acf-google-map.-loading .title a {
+ display: none !important;
+}
+.acf-google-map.-loading .title i {
+ display: inline-block;
+}
+
+/* autocomplete */
+.pac-container {
+ border-width: 1px 0;
+ box-shadow: none;
+}
+
+.pac-container:after {
+ display: none;
+}
+
+.pac-container .pac-item:first-child {
+ border-top: 0 none;
+}
+
+.pac-container .pac-item {
+ padding: 5px 10px;
+ cursor: pointer;
+}
+
+html[dir=rtl] .pac-container .pac-item {
+ text-align: right;
+}
+
+/*--------------------------------------------------------------------------
+*
+* Relationship
+*
+*-------------------------------------------------------------------------*/
+.acf-relationship {
+ background: #fff;
+ border: #ccd0d4 solid 1px;
+ /* list */
+ /* selection (bottom) */
+}
+.acf-relationship .filters {
+ border-bottom: #ccd0d4 solid 1px;
+ background: #fff;
+ /* widths */
+}
+.acf-relationship .filters:after {
+ display: block;
+ clear: both;
+ content: "";
+}
+.acf-relationship .filters .filter {
+ margin: 0;
+ padding: 0;
+ float: left;
+ width: 100%;
+ box-sizing: border-box;
+ padding: 7px 7px 7px 0;
+}
+.acf-relationship .filters .filter:first-child {
+ padding-left: 7px;
+}
+.acf-relationship .filters .filter input, .acf-relationship .filters .filter select {
+ margin: 0;
+ float: none;
+ /* potential fix for media popup? */
+}
+.acf-relationship .filters .filter input:focus, .acf-relationship .filters .filter input:active, .acf-relationship .filters .filter select:focus, .acf-relationship .filters .filter select:active {
+ outline: none;
+ box-shadow: none;
+}
+.acf-relationship .filters .filter input {
+ border-color: transparent;
+ box-shadow: none;
+ padding-left: 3px;
+ padding-right: 3px;
+}
+.acf-relationship .filters.-f2 .filter {
+ width: 50%;
+}
+.acf-relationship .filters.-f3 .filter {
+ width: 25%;
+}
+.acf-relationship .filters.-f3 .filter.-search {
+ width: 50%;
+}
+.acf-relationship .list {
+ margin: 0;
+ padding: 5px;
+ height: 160px;
+ overflow: auto;
+}
+.acf-relationship .list .acf-rel-label,
+.acf-relationship .list .acf-rel-item,
+.acf-relationship .list p {
+ padding: 5px;
+ margin: 0;
+ display: block;
+ position: relative;
+ min-height: 18px;
+}
+.acf-relationship .list .acf-rel-label {
+ font-weight: bold;
+}
+.acf-relationship .list .acf-rel-item {
+ cursor: pointer;
+ /* hover */
+ /* disabled */
+}
+.acf-relationship .list .acf-rel-item b {
+ text-decoration: underline;
+ font-weight: normal;
+}
+.acf-relationship .list .acf-rel-item .thumbnail {
+ background: #e0e0e0;
+ width: 22px;
+ height: 22px;
+ float: left;
+ margin: -2px 5px 0 0;
+}
+.acf-relationship .list .acf-rel-item .thumbnail img {
+ max-width: 22px;
+ max-height: 22px;
+ margin: 0 auto;
+ display: block;
+}
+.acf-relationship .list .acf-rel-item .thumbnail.-icon {
+ background: #fff;
+}
+.acf-relationship .list .acf-rel-item .thumbnail.-icon img {
+ max-height: 20px;
+ margin-top: 1px;
+}
+.acf-relationship .list .acf-rel-item:hover {
+ background: #3875D7;
+ color: #fff;
+}
+.acf-relationship .list .acf-rel-item:hover .thumbnail {
+ background: #a2bfec;
+}
+.acf-relationship .list .acf-rel-item:hover .thumbnail.-icon {
+ background: #fff;
+}
+.acf-relationship .list .acf-rel-item.disabled {
+ opacity: 0.5;
+}
+.acf-relationship .list .acf-rel-item.disabled:hover {
+ background: transparent;
+ color: #333;
+ cursor: default;
+}
+.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail {
+ background: #e0e0e0;
+}
+.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail.-icon {
+ background: #fff;
+}
+.acf-relationship .list ul {
+ padding-bottom: 5px;
+}
+.acf-relationship .list ul .acf-rel-label,
+.acf-relationship .list ul .acf-rel-item,
+.acf-relationship .list ul p {
+ padding-left: 20px;
+}
+.acf-relationship .selection {
+ position: relative;
+ /* choices */
+ /* values */
+}
+.acf-relationship .selection:after {
+ display: block;
+ clear: both;
+ content: "";
+}
+.acf-relationship .selection .values,
+.acf-relationship .selection .choices {
+ width: 50%;
+ background: #fff;
+ float: left;
+}
+.acf-relationship .selection .choices {
+ background: #F9F9F9;
+}
+.acf-relationship .selection .choices .list {
+ border-right: #DFDFDF solid 1px;
+}
+.acf-relationship .selection .values .acf-icon {
+ position: absolute;
+ top: 4px;
+ right: 7px;
+ display: none;
+ /* rtl */
+}
+html[dir=rtl] .acf-relationship .selection .values .acf-icon {
+ right: auto;
+ left: 7px;
+}
+.acf-relationship .selection .values .acf-rel-item:hover .acf-icon {
+ display: block;
+}
+.acf-relationship .selection .values .acf-rel-item {
+ cursor: move;
+}
+.acf-relationship .selection .values .acf-rel-item b {
+ text-decoration: none;
+}
+
+/* menu item fix */
+.menu-item .acf-relationship ul {
+ width: auto;
+}
+.menu-item .acf-relationship li {
+ display: block;
+}
+
+/*--------------------------------------------------------------------------
+*
+* WYSIWYG
+*
+*-------------------------------------------------------------------------*/
+.acf-editor-wrap.delay .acf-editor-toolbar {
+ content: "";
+ display: block;
+ background: #f5f5f5;
+ border-bottom: #dddddd solid 1px;
+ color: #555d66;
+ padding: 10px;
+}
+.acf-editor-wrap.delay .wp-editor-area {
+ padding: 10px;
+ border: none;
+ color: inherit !important;
+}
+.acf-editor-wrap iframe {
+ min-height: 200px;
+}
+.acf-editor-wrap .wp-editor-container {
+ border: 1px solid #ccd0d4;
+ box-shadow: none !important;
+}
+.acf-editor-wrap .wp-editor-tabs {
+ box-sizing: content-box;
+}
+.acf-editor-wrap .wp-switch-editor {
+ border-color: #ccd0d4;
+ border-bottom-color: transparent;
+}
+
+#mce_fullscreen_container {
+ z-index: 900000 !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Tab
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-tab {
+ display: none !important;
+}
+
+.hidden-by-tab {
+ display: none !important;
+}
+
+.acf-tab-wrap {
+ clear: both;
+ z-index: 1;
+}
+
+.acf-tab-group {
+ border-bottom: #ccc solid 1px;
+ padding: 10px 10px 0;
+}
+.acf-tab-group li {
+ margin: 0 0.5em 0 0;
+}
+.acf-tab-group li a {
+ padding: 5px 10px;
+ display: block;
+ color: #555;
+ font-size: 14px;
+ font-weight: 600;
+ line-height: 24px;
+ border: #ccc solid 1px;
+ border-bottom: 0 none;
+ text-decoration: none;
+ background: #e5e5e5;
+ transition: none;
+}
+.acf-tab-group li a:hover {
+ background: #FFF;
+}
+.acf-tab-group li a:focus {
+ outline: none;
+ box-shadow: none;
+}
+.acf-tab-group li a:empty {
+ display: none;
+}
+html[dir=rtl] .acf-tab-group li {
+ margin: 0 0 0 0.5em;
+}
+.acf-tab-group li.active a {
+ background: #F1F1F1;
+ color: #000;
+ padding-bottom: 6px;
+ margin-bottom: -1px;
+ position: relative;
+ z-index: 1;
+}
+
+.acf-fields > .acf-tab-wrap {
+ background: #F9F9F9;
+}
+.acf-fields > .acf-tab-wrap .acf-tab-group {
+ position: relative;
+ border-top: #ccd0d4 solid 1px;
+ border-bottom: #ccd0d4 solid 1px;
+ z-index: 2;
+ margin-bottom: -1px;
+}
+.acf-fields > .acf-tab-wrap .acf-tab-group li a {
+ background: #f1f1f1;
+ border-color: #ccd0d4;
+}
+.acf-fields > .acf-tab-wrap .acf-tab-group li a:hover {
+ background: #FFF;
+}
+.acf-fields > .acf-tab-wrap .acf-tab-group li.active a {
+ background: #FFFFFF;
+}
+.acf-admin-3-8 .acf-fields > .acf-tab-wrap .acf-tab-group {
+ border-color: #dfdfdf;
+}
+.acf-fields > .acf-tab-wrap:first-child .acf-tab-group {
+ border-top: none;
+}
+
+.acf-fields.-left > .acf-tab-wrap .acf-tab-group {
+ padding-left: 20%;
+ /* mobile */
+ /* rtl */
+}
+@media screen and (max-width: 640px) {
+ .acf-fields.-left > .acf-tab-wrap .acf-tab-group {
+ padding-left: 10px;
+ }
+}
+html[dir=rtl] .acf-fields.-left > .acf-tab-wrap .acf-tab-group {
+ padding-left: 0;
+ padding-right: 20%;
+ /* mobile */
+}
+@media screen and (max-width: 850px) {
+ html[dir=rtl] .acf-fields.-left > .acf-tab-wrap .acf-tab-group {
+ padding-right: 10px;
+ }
+}
+
+.acf-tab-wrap.-left .acf-tab-group {
+ position: absolute;
+ left: 0;
+ width: 20%;
+ border: 0 none;
+ padding: 0 !important;
+ /* important overrides 'left aligned labels' */
+ margin: 1px 0 0;
+}
+.acf-tab-wrap.-left .acf-tab-group li {
+ float: none;
+ margin: -1px 0 0;
+}
+.acf-tab-wrap.-left .acf-tab-group li a {
+ border: 1px solid #ededed;
+ font-size: 13px;
+ line-height: 18px;
+ color: #0073aa;
+ padding: 10px;
+ margin: 0;
+ font-weight: normal;
+ border-width: 1px 0;
+ border-radius: 0;
+ background: transparent;
+}
+.acf-tab-wrap.-left .acf-tab-group li a:hover {
+ color: #00a0d2;
+}
+.acf-tab-wrap.-left .acf-tab-group li.active a {
+ border-color: #DFDFDF;
+ color: #000;
+ margin-right: -1px;
+ background: #fff;
+}
+html[dir=rtl] .acf-tab-wrap.-left .acf-tab-group {
+ left: auto;
+ right: 0;
+}
+html[dir=rtl] .acf-tab-wrap.-left .acf-tab-group li.active a {
+ margin-right: 0;
+ margin-left: -1px;
+}
+.acf-field + .acf-tab-wrap.-left:before {
+ content: "";
+ display: block;
+ position: relative;
+ z-index: 1;
+ height: 10px;
+ border-top: #DFDFDF solid 1px;
+ border-bottom: #DFDFDF solid 1px;
+ margin-bottom: -1px;
+}
+.acf-tab-wrap.-left:first-child .acf-tab-group li:first-child a {
+ border-top: none;
+}
+
+/* sidebar */
+.acf-fields.-sidebar {
+ padding: 0 0 0 20% !important;
+ position: relative;
+ /* before */
+ /* rtl */
+}
+.acf-fields.-sidebar:before {
+ content: "";
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 20%;
+ bottom: 0;
+ border-right: #DFDFDF solid 1px;
+ background: #F9F9F9;
+ z-index: 1;
+}
+html[dir=rtl] .acf-fields.-sidebar {
+ padding: 0 20% 0 0 !important;
+}
+html[dir=rtl] .acf-fields.-sidebar:before {
+ border-left: #DFDFDF solid 1px;
+ border-right-width: 0;
+ left: auto;
+ right: 0;
+}
+.acf-fields.-sidebar.-left {
+ padding: 0 0 0 180px !important;
+ /* rtl */
+}
+html[dir=rtl] .acf-fields.-sidebar.-left {
+ padding: 0 180px 0 0 !important;
+}
+.acf-fields.-sidebar.-left:before {
+ background: #F1F1F1;
+ border-color: #dfdfdf;
+ width: 180px;
+}
+.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group {
+ width: 180px;
+}
+.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group li a {
+ border-color: #e4e4e4;
+}
+.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group li.active a {
+ background: #F9F9F9;
+}
+.acf-fields.-sidebar > .acf-field-tab + .acf-field {
+ border-top: none;
+}
+
+.acf-fields.-clear > .acf-tab-wrap {
+ background: transparent;
+}
+.acf-fields.-clear > .acf-tab-wrap .acf-tab-group {
+ margin-top: 0;
+ border-top: none;
+ padding-left: 0;
+ padding-right: 0;
+}
+.acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a {
+ background: #e5e5e5;
+}
+.acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a:hover {
+ background: #fff;
+}
+.acf-fields.-clear > .acf-tab-wrap .acf-tab-group li.active a {
+ background: #f1f1f1;
+}
+
+/* seamless */
+.acf-postbox.seamless > .acf-fields.-sidebar {
+ margin-left: 0 !important;
+}
+.acf-postbox.seamless > .acf-fields.-sidebar:before {
+ background: transparent;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap {
+ background: transparent;
+ margin-bottom: 10px;
+ padding-left: 12px;
+ padding-right: 12px;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap .acf-tab-group {
+ border-top: 0 none;
+ border-color: #ccd0d4;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap .acf-tab-group li a {
+ background: #e5e5e5;
+ border-color: #ccd0d4;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap .acf-tab-group li a:hover {
+ background: #fff;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap .acf-tab-group li.active a {
+ background: #f1f1f1;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap.-left:before {
+ border-top: none;
+ height: auto;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap.-left .acf-tab-group {
+ margin-bottom: 0;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap.-left .acf-tab-group li a {
+ border-width: 1px 0 1px 1px !important;
+ border-color: #cccccc;
+ background: #e5e5e5;
+}
+.acf-postbox.seamless > .acf-fields > .acf-tab-wrap.-left .acf-tab-group li.active a {
+ background: #f1f1f1;
+}
+
+.menu-edit .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a,
+.widget .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a {
+ background: #f1f1f1;
+}
+.menu-edit .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a:hover, .menu-edit .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li.active a,
+.widget .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a:hover,
+.widget .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li.active a {
+ background: #fff;
+}
+
+.compat-item .acf-tab-wrap td {
+ display: block;
+}
+
+/* within gallery sidebar */
+.acf-gallery-side .acf-tab-wrap {
+ border-top: 0 none !important;
+}
+
+.acf-gallery-side .acf-tab-wrap .acf-tab-group {
+ margin: 10px 0 !important;
+ padding: 0 !important;
+}
+
+.acf-gallery-side .acf-tab-group li.active a {
+ background: #F9F9F9 !important;
+}
+
+/* withing widget */
+.widget .acf-tab-group {
+ border-bottom-color: #e8e8e8;
+}
+
+.widget .acf-tab-group li a {
+ background: #F1F1F1;
+}
+
+.widget .acf-tab-group li.active a {
+ background: #fff;
+}
+
+/* media popup (edit image) */
+.media-modal.acf-expanded .compat-attachment-fields > tbody > tr.acf-tab-wrap .acf-tab-group {
+ padding-left: 23%;
+ border-bottom-color: #DDDDDD;
+}
+
+/* table */
+.form-table > tbody > tr.acf-tab-wrap .acf-tab-group {
+ padding: 0 5px 0 210px;
+}
+
+/* rtl */
+html[dir=rtl] .form-table > tbody > tr.acf-tab-wrap .acf-tab-group {
+ padding: 0 210px 0 5px;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* oembed
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-oembed {
+ position: relative;
+ border: #ccd0d4 solid 1px;
+ background: #fff;
+}
+.acf-oembed .title {
+ position: relative;
+ border-bottom: #ccd0d4 solid 1px;
+ padding: 5px 10px;
+}
+.acf-oembed .title .input-search {
+ margin: 0;
+ font-size: 14px;
+ line-height: 30px;
+ height: 30px;
+ padding: 0;
+ border: 0 none;
+ box-shadow: none;
+ border-radius: 0;
+ font-family: inherit;
+ cursor: text;
+}
+.acf-oembed .title .acf-actions {
+ padding: 6px;
+}
+.acf-oembed .canvas {
+ position: relative;
+ min-height: 250px;
+ background: #F9F9F9;
+}
+.acf-oembed .canvas .canvas-media {
+ position: relative;
+ z-index: 1;
+}
+.acf-oembed .canvas iframe {
+ display: block;
+ margin: 0;
+ padding: 0;
+ width: 100%;
+}
+.acf-oembed .canvas .acf-icon.-picture {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ z-index: 0;
+ height: 42px;
+ width: 42px;
+ font-size: 42px;
+ color: #999;
+}
+.acf-oembed .canvas .acf-loading-overlay {
+ background: rgba(255, 255, 255, 0.9);
+}
+.acf-oembed .canvas .canvas-error {
+ position: absolute;
+ top: 50%;
+ left: 0%;
+ right: 0%;
+ margin: -9px 0 0 0;
+ text-align: center;
+ display: none;
+}
+.acf-oembed .canvas .canvas-error p {
+ padding: 8px;
+ margin: 0;
+ display: inline;
+}
+.acf-oembed.has-value .canvas {
+ min-height: 50px;
+}
+.acf-oembed.has-value .input-search {
+ font-weight: bold;
+}
+.acf-oembed.has-value .title:hover .acf-actions {
+ display: block;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* Image
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-image-uploader {
+ position: relative;
+ /* image wrap*/
+ /* input */
+ /* rtl */
+}
+.acf-image-uploader:after {
+ display: block;
+ clear: both;
+ content: "";
+}
+.acf-image-uploader p {
+ margin: 0;
+}
+.acf-image-uploader .image-wrap {
+ position: relative;
+ float: left;
+ /* hover */
+}
+.acf-image-uploader .image-wrap img {
+ max-width: 100%;
+ max-height: 100%;
+ width: auto;
+ height: auto;
+ display: block;
+ min-width: 30px;
+ min-height: 30px;
+ background: #f1f1f1;
+ margin: 0;
+ padding: 0;
+ /* svg */
+}
+.acf-image-uploader .image-wrap img[src$=".svg"] {
+ min-height: 100px;
+ min-width: 100px;
+}
+.acf-image-uploader .image-wrap:hover .acf-actions {
+ display: block;
+}
+.acf-image-uploader input.button {
+ width: auto;
+}
+html[dir=rtl] .acf-image-uploader .image-wrap {
+ float: right;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* File
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-file-uploader {
+ position: relative;
+ /* hover */
+ /* rtl */
+}
+.acf-file-uploader p {
+ margin: 0;
+}
+.acf-file-uploader .file-wrap {
+ border: #ccd0d4 solid 1px;
+ min-height: 84px;
+ position: relative;
+ background: #fff;
+}
+.acf-file-uploader .file-icon {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ padding: 10px;
+ background: #F1F1F1;
+ border-right: #d5d9dd solid 1px;
+}
+.acf-file-uploader .file-icon img {
+ display: block;
+ padding: 0;
+ margin: 0;
+ max-width: 48px;
+}
+.acf-file-uploader .file-info {
+ padding: 10px;
+ margin-left: 69px;
+}
+.acf-file-uploader .file-info p {
+ margin: 0 0 2px;
+ font-size: 13px;
+ line-height: 1.4em;
+ word-break: break-all;
+}
+.acf-file-uploader .file-info a {
+ text-decoration: none;
+}
+.acf-file-uploader:hover .acf-actions {
+ display: block;
+}
+html[dir=rtl] .acf-file-uploader .file-icon {
+ left: auto;
+ right: 0;
+ border-left: #E5E5E5 solid 1px;
+ border-right: none;
+}
+html[dir=rtl] .acf-file-uploader .file-info {
+ margin-right: 69px;
+ margin-left: 0;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Date Picker
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-ui-datepicker .ui-datepicker {
+ z-index: 900000 !important;
+}
+.acf-ui-datepicker .ui-datepicker .ui-widget-header a {
+ cursor: pointer;
+ transition: none;
+}
+
+/* fix highlight state overriding hover / active */
+.acf-ui-datepicker .ui-state-highlight.ui-state-hover {
+ border: 1px solid #98b7e8 !important;
+ background: #98b7e8 !important;
+ font-weight: normal !important;
+ color: #ffffff !important;
+}
+
+.acf-ui-datepicker .ui-state-highlight.ui-state-active {
+ border: 1px solid #3875d7 !important;
+ background: #3875d7 !important;
+ font-weight: normal !important;
+ color: #ffffff !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Separator field
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-separator {
+ /* fields */
+}
+.acf-field-separator .acf-label {
+ margin-bottom: 0;
+}
+.acf-field-separator .acf-label label {
+ font-weight: normal;
+}
+.acf-field-separator .acf-input {
+ display: none;
+}
+.acf-fields > .acf-field-separator {
+ background: #f9f9f9;
+ border-bottom: 1px solid #dfdfdf;
+ border-top: 1px solid #dfdfdf;
+ margin-bottom: -1px;
+ z-index: 2;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Taxonomy
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-taxonomy-field {
+ position: relative;
+ /* hover */
+ /* select */
+}
+.acf-taxonomy-field .categorychecklist-holder {
+ border: #ccd0d4 solid 1px;
+ border-radius: 3px;
+ max-height: 200px;
+ overflow: auto;
+}
+.acf-taxonomy-field .acf-checkbox-list {
+ margin: 0;
+ padding: 10px;
+}
+.acf-taxonomy-field .acf-checkbox-list ul.children {
+ padding-left: 18px;
+}
+.acf-taxonomy-field:hover .acf-actions {
+ display: block;
+}
+.acf-taxonomy-field[data-ftype=select] .acf-actions {
+ padding: 0;
+ margin: -9px;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Range
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-range-wrap {
+ /* rtl */
+}
+.acf-range-wrap .acf-append,
+.acf-range-wrap .acf-prepend {
+ display: inline-block;
+ vertical-align: middle;
+ line-height: 28px;
+ margin: 0 7px 0 0;
+}
+.acf-range-wrap .acf-append {
+ margin: 0 0 0 7px;
+}
+.acf-range-wrap input[type=range] {
+ display: inline-block;
+ padding: 0;
+ margin: 0;
+ vertical-align: middle;
+ height: 28px;
+}
+.acf-range-wrap input[type=range]:focus {
+ outline: none;
+}
+.acf-range-wrap input[type=number] {
+ display: inline-block;
+ min-width: 3em;
+ margin-left: 10px;
+ vertical-align: middle;
+}
+html[dir=rtl] .acf-range-wrap input[type=number] {
+ margin-right: 10px;
+ margin-left: 0;
+}
+html[dir=rtl] .acf-range-wrap .acf-append {
+ margin: 0 7px 0 0;
+}
+html[dir=rtl] .acf-range-wrap .acf-prepend {
+ margin: 0 0 0 7px;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* acf-accordion
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-accordion {
+ margin: -1px 0;
+ padding: 0;
+ background: #fff;
+ border-top: 1px solid #d5d9dd;
+ border-bottom: 1px solid #d5d9dd;
+ z-index: 1;
+}
+.acf-accordion .acf-accordion-title {
+ margin: 0;
+ padding: 12px;
+ font-weight: bold;
+ cursor: pointer;
+ font-size: inherit;
+ font-size: 13px;
+ line-height: 1.4em;
+}
+.acf-accordion .acf-accordion-title:hover {
+ background: #f3f4f5;
+}
+.acf-accordion .acf-accordion-title label {
+ margin: 0;
+ padding: 0;
+ font-size: 13px;
+ line-height: 1.4em;
+}
+.acf-accordion .acf-accordion-title p {
+ font-weight: normal;
+}
+.acf-accordion .acf-accordion-title .acf-accordion-icon {
+ float: right;
+}
+.acf-accordion .acf-accordion-title svg.acf-accordion-icon {
+ position: absolute;
+ right: 10px;
+ top: 50%;
+ transform: translateY(-50%);
+ color: #191e23;
+ fill: currentColor;
+}
+.acf-accordion .acf-accordion-content {
+ margin: 0;
+ padding: 0 12px 12px;
+ display: none;
+}
+.acf-accordion.-open > .acf-accordion-content {
+ display: block;
+}
+
+.acf-field.acf-accordion {
+ margin: -1px 0;
+ padding: 0 !important;
+ border-color: #d5d9dd;
+}
+.acf-field.acf-accordion .acf-label.acf-accordion-title {
+ padding: 12px;
+ width: auto;
+ float: none;
+ width: auto;
+}
+.acf-field.acf-accordion .acf-input.acf-accordion-content {
+ padding: 0;
+ float: none;
+ width: auto;
+}
+.acf-field.acf-accordion .acf-input.acf-accordion-content > .acf-fields {
+ border-top: #eeeeee solid 1px;
+}
+.acf-field.acf-accordion .acf-input.acf-accordion-content > .acf-fields.-clear {
+ padding: 0 12px 15px;
+}
+
+/* field specific (left) */
+.acf-fields.-left > .acf-field.acf-accordion:before {
+ display: none;
+}
+.acf-fields.-left > .acf-field.acf-accordion .acf-accordion-title {
+ width: auto;
+ margin: 0 !important;
+ padding: 12px;
+ float: none !important;
+}
+.acf-fields.-left > .acf-field.acf-accordion .acf-accordion-content {
+ padding: 0 !important;
+}
+
+/* field specific (clear) */
+.acf-fields.-clear > .acf-field.acf-accordion {
+ border: #cccccc solid 1px;
+ background: transparent;
+}
+.acf-fields.-clear > .acf-field.acf-accordion + .acf-field.acf-accordion {
+ margin-top: -16px;
+}
+
+/* table */
+tr.acf-field.acf-accordion {
+ background: transparent;
+}
+tr.acf-field.acf-accordion > .acf-input {
+ padding: 0 !important;
+ border: #cccccc solid 1px;
+}
+tr.acf-field.acf-accordion .acf-accordion-content {
+ padding: 0 12px 12px;
+}
+
+/* #addtag */
+#addtag div.acf-field.error {
+ border: 0 none;
+ padding: 8px 0;
+}
+
+#addtag > .acf-field.acf-accordion {
+ padding-right: 0;
+ margin-right: 5%;
+}
+#addtag > .acf-field.acf-accordion + p.submit {
+ margin-top: 0;
+}
+
+/* border */
+tr.acf-accordion {
+ margin: 15px 0 !important;
+}
+tr.acf-accordion + tr.acf-accordion {
+ margin-top: -16px !important;
+}
+
+/* seamless */
+.acf-postbox.seamless > .acf-fields > .acf-accordion {
+ margin-left: 12px;
+ margin-right: 12px;
+ border: #ccd0d4 solid 1px;
+}
+
+/* rtl */
+/* menu item */
+/*
+.menu-item-settings > .field-acf > .acf-field.acf-accordion {
+ border: #dfdfdf solid 1px;
+ margin: 10px -13px 10px -11px;
+
+ + .acf-field.acf-accordion {
+ margin-top: -11px;
+ }
+}
+*/
+/* widget */
+.widget .widget-content > .acf-field.acf-accordion {
+ border: #dfdfdf solid 1px;
+ margin-bottom: 10px;
+}
+.widget .widget-content > .acf-field.acf-accordion .acf-accordion-title {
+ margin-bottom: 0;
+}
+.widget .widget-content > .acf-field.acf-accordion + .acf-field.acf-accordion {
+ margin-top: -11px;
+}
+
+.media-modal .compat-attachment-fields .acf-field.acf-accordion + .acf-field.acf-accordion {
+ margin-top: -1px;
+}
+.media-modal .compat-attachment-fields .acf-field.acf-accordion > .acf-input {
+ width: 100%;
+}
+.media-modal .compat-attachment-fields .acf-field.acf-accordion .compat-attachment-fields > tbody > tr > td {
+ padding-bottom: 5px;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Block Editor
+*
+*---------------------------------------------------------------------------------------------*/
+.block-editor .edit-post-sidebar .acf-postbox > .postbox-header,
+.block-editor .edit-post-sidebar .acf-postbox > .hndle {
+ border-bottom-width: 0 !important;
+}
+.block-editor .edit-post-sidebar .acf-postbox.closed > .postbox-header,
+.block-editor .edit-post-sidebar .acf-postbox.closed > .hndle {
+ border-bottom-width: 1px !important;
+}
+.block-editor .edit-post-sidebar .acf-fields {
+ min-height: 1px;
+ overflow: auto;
+}
+.block-editor .edit-post-sidebar .acf-fields > .acf-field {
+ border-width: 0;
+ border-color: #e2e4e7;
+ margin: 16px;
+ padding: 0;
+ width: auto !important;
+ min-height: 0 !important;
+ float: none !important;
+}
+.block-editor .edit-post-sidebar .acf-fields > .acf-field > .acf-label {
+ margin-bottom: 5px;
+}
+.block-editor .edit-post-sidebar .acf-fields > .acf-field > .acf-label label {
+ font-weight: normal;
+}
+.block-editor .edit-post-sidebar .acf-fields > .acf-field.acf-accordion {
+ padding: 0;
+ margin: 0;
+ border-top-width: 1px;
+}
+.block-editor .edit-post-sidebar .acf-fields > .acf-field.acf-accordion:first-child {
+ border-top-width: 0;
+}
+.block-editor .edit-post-sidebar .acf-fields > .acf-field.acf-accordion .acf-accordion-title {
+ margin: 0;
+ padding: 15px;
+}
+.block-editor .edit-post-sidebar .acf-fields > .acf-field.acf-accordion .acf-accordion-title label {
+ font-weight: bold;
+}
+.block-editor .edit-post-sidebar .acf-fields > .acf-field.acf-accordion .acf-accordion-content > .acf-fields {
+ border-top-width: 0;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* User
+*
+*--------------------------------------------------------------------------------------------*/
+.form-table > tbody {
+ /* field */
+ /* tab wrap */
+ /* misc */
+}
+.form-table > tbody > .acf-field {
+ /* label */
+ /* input */
+}
+.form-table > tbody > .acf-field > .acf-label {
+ padding: 20px 10px 20px 0;
+ width: 210px;
+ /* rtl */
+}
+html[dir=rtl] .form-table > tbody > .acf-field > .acf-label {
+ padding: 20px 0 20px 10px;
+}
+.form-table > tbody > .acf-field > .acf-label label {
+ font-size: 14px;
+ color: #23282d;
+}
+.form-table > tbody > .acf-field > .acf-input {
+ padding: 15px 10px;
+ /* rtl */
+}
+html[dir=rtl] .form-table > tbody > .acf-field > .acf-input {
+ padding: 15px 10px 15px 5%;
+}
+.form-table > tbody > .acf-tab-wrap td {
+ padding: 15px 5% 15px 0;
+ /* rtl */
+}
+html[dir=rtl] .form-table > tbody > .acf-tab-wrap td {
+ padding: 15px 0 15px 5%;
+}
+.form-table > tbody .form-table th.acf-th {
+ width: auto;
+}
+
+#your-profile,
+#createuser {
+ /* override for user css */
+ /* allow sub fields to display correctly */
+}
+#your-profile .acf-field input[type=text],
+#your-profile .acf-field input[type=password],
+#your-profile .acf-field input[type=number],
+#your-profile .acf-field input[type=search],
+#your-profile .acf-field input[type=email],
+#your-profile .acf-field input[type=url],
+#your-profile .acf-field select,
+#createuser .acf-field input[type=text],
+#createuser .acf-field input[type=password],
+#createuser .acf-field input[type=number],
+#createuser .acf-field input[type=search],
+#createuser .acf-field input[type=email],
+#createuser .acf-field input[type=url],
+#createuser .acf-field select {
+ max-width: 25em;
+}
+#your-profile .acf-field textarea,
+#createuser .acf-field textarea {
+ max-width: 500px;
+}
+#your-profile .acf-field .acf-field input[type=text],
+#your-profile .acf-field .acf-field input[type=password],
+#your-profile .acf-field .acf-field input[type=number],
+#your-profile .acf-field .acf-field input[type=search],
+#your-profile .acf-field .acf-field input[type=email],
+#your-profile .acf-field .acf-field input[type=url],
+#your-profile .acf-field .acf-field textarea,
+#your-profile .acf-field .acf-field select,
+#createuser .acf-field .acf-field input[type=text],
+#createuser .acf-field .acf-field input[type=password],
+#createuser .acf-field .acf-field input[type=number],
+#createuser .acf-field .acf-field input[type=search],
+#createuser .acf-field .acf-field input[type=email],
+#createuser .acf-field .acf-field input[type=url],
+#createuser .acf-field .acf-field textarea,
+#createuser .acf-field .acf-field select {
+ max-width: none;
+}
+
+#registerform h2 {
+ margin: 1em 0;
+}
+#registerform .acf-field {
+ margin-top: 0;
+ /*
+ .acf-input {
+ input {
+ font-size: 24px;
+ padding: 5px;
+ height: auto;
+ }
+ }
+ */
+}
+#registerform .acf-field .acf-label {
+ margin-bottom: 0;
+}
+#registerform .acf-field .acf-label label {
+ font-weight: normal;
+ line-height: 1.5;
+}
+#registerform p.submit {
+ text-align: right;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* Term
+*
+*--------------------------------------------------------------------------------------------*/
+#acf-term-fields {
+ padding-right: 5%;
+}
+#acf-term-fields > .acf-field > .acf-label {
+ margin: 0;
+}
+#acf-term-fields > .acf-field > .acf-label label {
+ font-size: 12px;
+ font-weight: normal;
+}
+
+p.submit .spinner,
+p.submit .acf-spinner {
+ vertical-align: top;
+ float: none;
+ margin: 4px 4px 0;
+}
+
+#edittag .acf-fields.-left > .acf-field {
+ padding-left: 220px;
+}
+#edittag .acf-fields.-left > .acf-field:before {
+ width: 209px;
+}
+#edittag .acf-fields.-left > .acf-field > .acf-label {
+ width: 220px;
+ margin-left: -220px;
+ padding: 0 10px;
+}
+#edittag .acf-fields.-left > .acf-field > .acf-input {
+ padding: 0;
+}
+
+#edittag > .acf-fields.-left {
+ width: 96%;
+}
+#edittag > .acf-fields.-left > .acf-field > .acf-label {
+ padding-left: 0;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* Comment
+*
+*--------------------------------------------------------------------------------------------*/
+.editcomment td:first-child {
+ white-space: nowrap;
+ width: 131px;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* Widget
+*
+*--------------------------------------------------------------------------------------------*/
+#widgets-right .widget .acf-field .description {
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.acf-widget-fields > .acf-field .acf-label {
+ margin-bottom: 5px;
+}
+.acf-widget-fields > .acf-field .acf-label label {
+ font-weight: normal;
+ margin: 0;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* Nav Menu
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-menu-settings {
+ border-top: 1px solid #eee;
+ margin-top: 2em;
+}
+.acf-menu-settings.-seamless {
+ border-top: none;
+ margin-top: 15px;
+}
+.acf-menu-settings.-seamless > h2 {
+ display: none;
+}
+.acf-menu-settings .list li {
+ display: block;
+ margin-bottom: 0;
+}
+
+.acf-fields.acf-menu-item-fields {
+ clear: both;
+ padding-top: 1px;
+}
+.acf-fields.acf-menu-item-fields > .acf-field {
+ margin: 5px 0;
+ padding-right: 10px;
+}
+.acf-fields.acf-menu-item-fields > .acf-field .acf-label {
+ margin-bottom: 0;
+}
+.acf-fields.acf-menu-item-fields > .acf-field .acf-label label {
+ font-style: italic;
+ font-weight: normal;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Attachment Form (single)
+*
+*---------------------------------------------------------------------------------------------*/
+#post .compat-attachment-fields .compat-field-acf-form-data {
+ display: none;
+}
+#post .compat-attachment-fields,
+#post .compat-attachment-fields > tbody,
+#post .compat-attachment-fields > tbody > tr,
+#post .compat-attachment-fields > tbody > tr > th,
+#post .compat-attachment-fields > tbody > tr > td {
+ display: block;
+}
+#post .compat-attachment-fields > tbody > .acf-field {
+ margin: 15px 0;
+}
+#post .compat-attachment-fields > tbody > .acf-field > .acf-label {
+ margin: 0;
+}
+#post .compat-attachment-fields > tbody > .acf-field > .acf-label label {
+ margin: 0;
+ padding: 0;
+}
+#post .compat-attachment-fields > tbody > .acf-field > .acf-label label p {
+ margin: 0 0 3px !important;
+}
+#post .compat-attachment-fields > tbody > .acf-field > .acf-input {
+ margin: 0;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Media Model
+*
+*---------------------------------------------------------------------------------------------*/
+/* WP sets tables to act as divs. ACF uses tables, so these muct be reset */
+.media-modal .compat-attachment-fields td.acf-input table {
+ display: table;
+ table-layout: auto;
+}
+.media-modal .compat-attachment-fields td.acf-input table tbody {
+ display: table-row-group;
+}
+.media-modal .compat-attachment-fields td.acf-input table tr {
+ display: table-row;
+}
+.media-modal .compat-attachment-fields td.acf-input table td, .media-modal .compat-attachment-fields td.acf-input table th {
+ display: table-cell;
+}
+
+/* field widths floats */
+.media-modal .compat-attachment-fields > tbody > .acf-field {
+ margin: 5px 0;
+}
+.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-label {
+ min-width: 30%;
+ margin: 0;
+ padding: 0;
+ float: left;
+ text-align: right;
+ display: block;
+ float: left;
+}
+.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-label > label {
+ padding-top: 6px;
+ margin: 0;
+ color: #666666;
+ font-weight: 400;
+ line-height: 16px;
+}
+.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-input {
+ width: 65%;
+ margin: 0;
+ padding: 0;
+ float: right;
+ display: block;
+}
+.media-modal .compat-attachment-fields > tbody > .acf-field p.description {
+ margin: 0;
+}
+
+/* restricted selection (copy of WP .upload-errors)*/
+.acf-selection-error {
+ background: #ffebe8;
+ border: 1px solid #c00;
+ border-radius: 3px;
+ padding: 8px;
+ margin: 20px 0 0;
+}
+.acf-selection-error .selection-error-label {
+ background: #CC0000;
+ border-radius: 3px;
+ color: #fff;
+ font-weight: bold;
+ margin-right: 8px;
+ padding: 2px 4px;
+}
+.acf-selection-error .selection-error-message {
+ color: #b44;
+ display: block;
+ padding-top: 8px;
+ word-wrap: break-word;
+ white-space: pre-wrap;
+}
+
+/* disabled attachment */
+.media-modal .attachment.acf-disabled .thumbnail {
+ opacity: 0.25 !important;
+}
+.media-modal .attachment.acf-disabled .attachment-preview:before {
+ background: rgba(0, 0, 0, 0.15);
+ z-index: 1;
+ position: relative;
+}
+
+/* misc */
+.media-modal {
+ /* compat-item */
+ /* allow line breaks in upload error */
+ /* fix required span */
+ /* sidebar */
+ /* mobile md */
+}
+.media-modal .compat-field-acf-form-data,
+.media-modal .compat-field-acf-blank {
+ display: none !important;
+}
+.media-modal .upload-error-message {
+ white-space: pre-wrap;
+}
+.media-modal .acf-required {
+ padding: 0 !important;
+ margin: 0 !important;
+ float: none !important;
+ color: #f00 !important;
+}
+.media-modal .media-sidebar .compat-item {
+ padding-bottom: 20px;
+}
+@media (max-width: 900px) {
+ .media-modal {
+ /* label */
+ /* field */
+ }
+ .media-modal .setting span,
+.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-label {
+ width: 98%;
+ float: none;
+ text-align: left;
+ min-height: 0;
+ padding: 0;
+ }
+ .media-modal .setting input,
+.media-modal .setting textarea,
+.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-input {
+ float: none;
+ height: auto;
+ max-width: none;
+ width: 98%;
+ }
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Media Model (expand details)
+*
+*---------------------------------------------------------------------------------------------*/
+.media-modal .acf-expand-details {
+ float: right;
+ padding: 8px 10px;
+ margin-right: 6px;
+ font-size: 13px;
+ height: 18px;
+ line-height: 18px;
+ color: #666;
+ text-decoration: none;
+}
+.media-modal .acf-expand-details:focus, .media-modal .acf-expand-details:active {
+ outline: 0 none;
+ box-shadow: none;
+ color: #666;
+}
+.media-modal .acf-expand-details:hover {
+ color: #000;
+}
+.media-modal .acf-expand-details .is-open {
+ display: none;
+}
+.media-modal .acf-expand-details .is-closed {
+ display: block;
+}
+@media (max-width: 640px) {
+ .media-modal .acf-expand-details {
+ display: none;
+ }
+}
+
+/* expanded */
+.media-modal.acf-expanded {
+ /* toggle */
+}
+.media-modal.acf-expanded .acf-expand-details .is-open {
+ display: block;
+}
+.media-modal.acf-expanded .acf-expand-details .is-closed {
+ display: none;
+}
+.media-modal.acf-expanded .attachments-browser .media-toolbar,
+.media-modal.acf-expanded .attachments-browser .attachments {
+ right: 740px;
+}
+.media-modal.acf-expanded .media-sidebar {
+ width: 708px;
+}
+.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail {
+ float: left;
+ max-height: none;
+}
+.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail img {
+ max-width: 100%;
+ max-height: 200px;
+}
+.media-modal.acf-expanded .media-sidebar .attachment-info .details {
+ float: right;
+}
+.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail,
+.media-modal.acf-expanded .media-sidebar .attachment-details .setting .name,
+.media-modal.acf-expanded .media-sidebar .compat-attachment-fields > tbody > .acf-field > .acf-label {
+ min-width: 20%;
+ margin-right: 0;
+}
+.media-modal.acf-expanded .media-sidebar .attachment-info .details,
+.media-modal.acf-expanded .media-sidebar .attachment-details .setting input,
+.media-modal.acf-expanded .media-sidebar .attachment-details .setting textarea,
+.media-modal.acf-expanded .media-sidebar .attachment-details .setting + .description,
+.media-modal.acf-expanded .media-sidebar .compat-attachment-fields > tbody > .acf-field > .acf-input {
+ min-width: 77%;
+}
+@media (max-width: 900px) {
+ .media-modal.acf-expanded .attachments-browser .media-toolbar {
+ display: none;
+ }
+ .media-modal.acf-expanded .attachments {
+ display: none;
+ }
+ .media-modal.acf-expanded .media-sidebar {
+ width: auto;
+ max-width: none !important;
+ bottom: 0 !important;
+ }
+ .media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail {
+ min-width: 0;
+ max-width: none;
+ width: 30%;
+ }
+ .media-modal.acf-expanded .media-sidebar .attachment-info .details {
+ min-width: 0;
+ max-width: none;
+ width: 67%;
+ }
+}
+@media (max-width: 640px) {
+ .media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail, .media-modal.acf-expanded .media-sidebar .attachment-info .details {
+ width: 100%;
+ }
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* ACF Media Model
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-media-modal {
+ /* hide embed settings */
+}
+.acf-media-modal .media-embed .setting.align,
+.acf-media-modal .media-embed .setting.link-to {
+ display: none;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* ACF Media Model (Select Mode)
+*
+*---------------------------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------------------------
+*
+* ACF Media Model (Edit Mode)
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-media-modal.-edit {
+ /* resize modal */
+ left: 15%;
+ right: 15%;
+ top: 100px;
+ bottom: 100px;
+ /* hide elements */
+ /* full width */
+ /* tidy up incorrect distance */
+ /* title box shadow (to match media grid) */
+ /* sidebar */
+ /* mobile md */
+ /* mobile sm */
+}
+.acf-media-modal.-edit .media-frame-menu,
+.acf-media-modal.-edit .media-frame-router,
+.acf-media-modal.-edit .media-frame-content .attachments,
+.acf-media-modal.-edit .media-frame-content .media-toolbar {
+ display: none;
+}
+.acf-media-modal.-edit .media-frame-title,
+.acf-media-modal.-edit .media-frame-content,
+.acf-media-modal.-edit .media-frame-toolbar,
+.acf-media-modal.-edit .media-sidebar {
+ width: auto;
+ left: 0;
+ right: 0;
+}
+.acf-media-modal.-edit .media-frame-content {
+ top: 50px;
+}
+.acf-media-modal.-edit .media-frame-title {
+ border-bottom: 1px solid #DFDFDF;
+ box-shadow: 0 4px 4px -4px rgba(0, 0, 0, 0.1);
+}
+.acf-media-modal.-edit .media-sidebar {
+ padding: 0 16px;
+ /* WP details */
+ /* ACF fields */
+ /* WP required message */
+}
+.acf-media-modal.-edit .media-sidebar .attachment-details {
+ overflow: visible;
+ /* hide 'Attachment Details' heading */
+ /* remove overflow */
+ /* move thumbnail */
+}
+.acf-media-modal.-edit .media-sidebar .attachment-details > h3, .acf-media-modal.-edit .media-sidebar .attachment-details > h2 {
+ display: none;
+}
+.acf-media-modal.-edit .media-sidebar .attachment-details .attachment-info {
+ background: #fff;
+ border-bottom: #dddddd solid 1px;
+ padding: 16px;
+ margin: 0 -16px 16px;
+}
+.acf-media-modal.-edit .media-sidebar .attachment-details .thumbnail {
+ margin: 0 16px 0 0;
+}
+.acf-media-modal.-edit .media-sidebar .attachment-details .setting {
+ margin: 0 0 5px;
+}
+.acf-media-modal.-edit .media-sidebar .attachment-details .setting span {
+ margin: 0;
+}
+.acf-media-modal.-edit .media-sidebar .compat-attachment-fields > tbody > .acf-field {
+ margin: 0 0 5px;
+}
+.acf-media-modal.-edit .media-sidebar .compat-attachment-fields > tbody > .acf-field p.description {
+ margin-top: 3px;
+}
+.acf-media-modal.-edit .media-sidebar .media-types-required-info {
+ display: none;
+}
+@media (max-width: 900px) {
+ .acf-media-modal.-edit {
+ top: 30px;
+ right: 30px;
+ bottom: 30px;
+ left: 30px;
+ }
+}
+@media (max-width: 640px) {
+ .acf-media-modal.-edit {
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+}
+@media (max-width: 480px) {
+ .acf-media-modal.-edit .media-frame-content {
+ top: 40px;
+ }
+}
+
+.acf-temp-remove {
+ position: relative;
+ opacity: 1;
+ -webkit-transition: all 0.25s ease;
+ -moz-transition: all 0.25s ease;
+ -o-transition: all 0.25s ease;
+ transition: all 0.25s ease;
+ overflow: hidden;
+ /* overlay prevents hover */
+}
+.acf-temp-remove:after {
+ display: block;
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 99;
+}
+
+.hidden-by-conditional-logic {
+ display: none !important;
+}
+.hidden-by-conditional-logic.appear-empty {
+ display: table-cell !important;
+}
+.hidden-by-conditional-logic.appear-empty .acf-input {
+ display: none !important;
+}
+
+.acf-postbox.acf-hidden {
+ display: none !important;
+}
+
+.acf-attention {
+ transition: border 0.25s ease-out;
+}
+.acf-attention.-focused {
+ border: #23282d solid 1px !important;
+ transition: none;
+}
+
+tr.acf-attention {
+ transition: box-shadow 0.25s ease-out;
+ position: relative;
+}
+tr.acf-attention.-focused {
+ box-shadow: #23282d 0 0 0px 1px !important;
+}
+
+#editor .edit-post-layout__metaboxes {
+ padding: 0;
+}
+#editor .edit-post-layout__metaboxes .edit-post-meta-boxes-area {
+ margin: 0;
+}
+#editor .metabox-location-side .postbox-container {
+ float: none;
+}
+#editor .postbox {
+ color: #444;
+}
+#editor .postbox > .postbox-header .hndle {
+ border-bottom: none;
+}
+#editor .postbox > .postbox-header .hndle:hover {
+ background: transparent;
+}
+#editor .postbox > .postbox-header .handle-actions .handle-order-higher,
+#editor .postbox > .postbox-header .handle-actions .handle-order-lower {
+ width: 1.62rem;
+}
+#editor .postbox > .postbox-header .handle-actions .acf-hndle-cog {
+ height: 44px;
+ line-height: 44px;
+}
+#editor .postbox > .postbox-header:hover {
+ background: #f0f0f0;
+}
+#editor .postbox:last-child.closed > .postbox-header {
+ border-bottom: none;
+}
+#editor .postbox:last-child > .inside {
+ border-bottom: none;
+}
+#editor .block-editor-writing-flow__click-redirect {
+ min-height: 50px;
+}
+
+body.is-dragging-metaboxes #acf_after_title-sortables {
+ outline: 3px dashed #646970;
+ display: flow-root;
+ min-height: 60px;
+ margin-bottom: 3px !important;
+}
\ No newline at end of file
diff --git a/assets/build/css/acf-input.min.css b/assets/build/css/acf-input.min.css
new file mode 100644
index 0000000..d1da899
--- /dev/null
+++ b/assets/build/css/acf-input.min.css
@@ -0,0 +1 @@
+.acf-field,.acf-field .acf-input,.acf-field .acf-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative}.acf-field{margin:15px 0;clear:both}.acf-field p.description{display:block;margin:0;padding:0}.acf-field .acf-label{vertical-align:top;margin:0 0 10px}.acf-field .acf-label label{display:block;font-weight:700;margin:0 0 3px;padding:0}.acf-field .acf-label:empty{margin-bottom:0}.acf-field .acf-input{vertical-align:top}.acf-field .acf-input>p.description{margin-top:5px}.acf-field .acf-notice{margin:0 0 15px;background:#edf2ff;color:#0c6ca0;border-color:#2183b9}.acf-field .acf-notice.-error{background:#ffe6e6;color:#cc2727;border-color:#d12626}.acf-field .acf-notice.-success{background:#eefbe8;color:#0e7b17;border-color:#32a23b}.acf-field .acf-notice.-warning{background:#fff3e6;color:#bd4b0e;border-color:#d16226}td.acf-field,tr.acf-field{margin:0}.acf-field[data-width]{float:left;clear:none}.acf-field[data-width]+.acf-field[data-width]{border-left:1px solid #eee}html[dir=rtl] .acf-field[data-width]{float:right}html[dir=rtl] .acf-field[data-width]+.acf-field[data-width]{border-left:none;border-right:1px solid #eee}td.acf-field[data-width],tr.acf-field[data-width]{float:none}.acf-field.-c0{clear:both;border-left-width:0!important}html[dir=rtl] .acf-field.-c0{border-left-width:1px!important;border-right-width:0!important}.acf-field.-r0{border-top-width:0!important}.acf-fields{position:relative}.acf-fields:after{display:block;clear:both;content:""}.acf-fields.-border{border:#ccd0d4 solid 1px;background:#fff}.acf-fields>.acf-field{position:relative;margin:0;padding:15px 12px;border-top:#eee solid 1px}.acf-fields>.acf-field:first-child{border-top:none;margin-top:0}td.acf-fields{padding:0!important}.acf-fields.-clear>.acf-field{border:none;padding:0;margin:15px 0}.acf-fields.-clear>.acf-field[data-width]{border:none!important}.acf-fields.-clear>.acf-field>.acf-label{padding:0}.acf-fields.-clear>.acf-field>.acf-input{padding:0}.acf-fields.-left>.acf-field{padding:15px 0}.acf-fields.-left>.acf-field:after{display:block;clear:both;content:""}.acf-fields.-left>.acf-field:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border-color:#e1e1e1;border-style:solid;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acf-fields.-left>.acf-field[data-width]{float:none;width:auto!important;border-left-width:0!important;border-right-width:0!important}.acf-fields.-left>.acf-field>.acf-label{float:left;width:20%;margin:0;padding:0 12px}.acf-fields.-left>.acf-field>.acf-input{float:left;width:80%;margin:0;padding:0 12px}html[dir=rtl] .acf-fields.-left>.acf-field:before{border-width:0 0 0 1px;left:auto;right:0}html[dir=rtl] .acf-fields.-left>.acf-field>.acf-label{float:right}html[dir=rtl] .acf-fields.-left>.acf-field>.acf-input{float:right}#side-sortables .acf-fields.-left>.acf-field:before{display:none}#side-sortables .acf-fields.-left>.acf-field>.acf-label{width:100%;margin-bottom:10px}#side-sortables .acf-fields.-left>.acf-field>.acf-input{width:100%}@media screen and (max-width:640px){.acf-fields.-left>.acf-field:before{display:none}.acf-fields.-left>.acf-field>.acf-label{width:100%;margin-bottom:10px}.acf-fields.-left>.acf-field>.acf-input{width:100%}}.acf-fields.-clear.-left>.acf-field{padding:0;border:none}.acf-fields.-clear.-left>.acf-field:before{display:none}.acf-fields.-clear.-left>.acf-field>.acf-label{padding:0}.acf-fields.-clear.-left>.acf-field>.acf-input{padding:0}.acf-table tr.acf-field>td.acf-label{padding:15px 12px;margin:0;background:#f9f9f9;width:20%}.acf-table tr.acf-field>td.acf-input{padding:15px 12px;margin:0;border-left-color:#e1e1e1}.acf-sortable-tr-helper{position:relative!important;display:table-row!important}.acf-postbox{position:relative}.acf-postbox>.inside{margin:0!important;padding:0!important}.acf-postbox .acf-hndle-cog{color:#72777c;font-size:16px;line-height:36px;height:36px;width:1.62rem;position:relative;display:none}.acf-postbox .acf-hndle-cog:hover{color:#191e23}.acf-postbox>.hndle:hover .acf-hndle-cog,.acf-postbox>.postbox-header:hover .acf-hndle-cog{display:inline-block}.acf-postbox>.hndle .acf-hndle-cog{height:20px;line-height:20px;float:right;width:auto}.acf-postbox>.hndle .acf-hndle-cog:hover{color:#777}.acf-postbox .acf-replace-with-fields{padding:15px;text-align:center}#post-body-content #acf_after_title-sortables{margin:20px 0 -20px}.acf-postbox.seamless{border:0 none;background:0 0;box-shadow:none}.acf-postbox.seamless>.handlediv,.acf-postbox.seamless>.hndle,.acf-postbox.seamless>.postbox-header{display:none!important}.acf-postbox.seamless>.inside{display:block!important;margin-left:-12px!important;margin-right:-12px!important}.acf-postbox.seamless>.inside>.acf-field{border-color:transparent}.acf-postbox.seamless>.acf-fields.-left>.acf-field:before{display:none}@media screen and (max-width:782px){.acf-postbox.seamless>.acf-fields.-left>.acf-field>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field>.acf-label{padding:0}}.acf-field input[type=date],.acf-field input[type=datetime-local],.acf-field input[type=datetime],.acf-field input[type=email],.acf-field input[type=month],.acf-field input[type=number],.acf-field input[type=password],.acf-field input[type=search],.acf-field input[type=tel],.acf-field input[type=text],.acf-field input[type=time],.acf-field input[type=url],.acf-field input[type=week],.acf-field select,.acf-field textarea{width:100%;padding:4px 8px;margin:0;box-sizing:border-box;font-size:14px;line-height:1.4}.acf-admin-3-8 .acf-field input[type=date],.acf-admin-3-8 .acf-field input[type=datetime-local],.acf-admin-3-8 .acf-field input[type=datetime],.acf-admin-3-8 .acf-field input[type=email],.acf-admin-3-8 .acf-field input[type=month],.acf-admin-3-8 .acf-field input[type=number],.acf-admin-3-8 .acf-field input[type=password],.acf-admin-3-8 .acf-field input[type=search],.acf-admin-3-8 .acf-field input[type=tel],.acf-admin-3-8 .acf-field input[type=text],.acf-admin-3-8 .acf-field input[type=time],.acf-admin-3-8 .acf-field input[type=url],.acf-admin-3-8 .acf-field input[type=week],.acf-admin-3-8 .acf-field select,.acf-admin-3-8 .acf-field textarea{padding:3px 5px}.acf-field textarea{resize:vertical}body.acf-browser-firefox .acf-field select{padding:4px 5px}.acf-input-append,.acf-input-prepend,.acf-input-wrap{box-sizing:border-box}.acf-input-append,.acf-input-prepend{font-size:14px;line-height:1.4;padding:4px 8px;background:#f5f5f5;border:#7e8993 solid 1px;min-height:30px}.acf-admin-3-8 .acf-input-append,.acf-admin-3-8 .acf-input-prepend{padding:3px 5px;border-color:#ddd;min-height:28px}.acf-input-prepend{float:left;border-right-width:0;border-radius:3px 0 0 3px}.acf-input-append{float:right;border-left-width:0;border-radius:0 3px 3px 0}.acf-input-wrap{position:relative;overflow:hidden}.acf-input-wrap .acf-is-prepended{border-radius:0 3px 3px 0!important}.acf-input-wrap .acf-is-appended{border-radius:3px 0 0 3px!important}.acf-input-wrap .acf-is-prepended.acf-is-appended{border-radius:0!important}html[dir=rtl] .acf-input-prepend{border-left-width:0;border-right-width:1px;border-radius:0 3px 3px 0;float:right}html[dir=rtl] .acf-input-append{border-left-width:1px;border-right-width:0;border-radius:3px 0 0 3px;float:left}html[dir=rtl] input.acf-is-prepended{border-radius:3px 0 0 3px!important}html[dir=rtl] input.acf-is-appended{border-radius:0 3px 3px 0!important}html[dir=rtl] input.acf-is-prepended.acf-is-appended{border-radius:0!important}.acf-color-picker .wp-color-result{border-color:#7e8993}.acf-admin-3-8 .acf-color-picker .wp-color-result{border-color:#ccd0d4}.acf-color-picker .wp-picker-active{position:relative;z-index:1}.acf-url i{position:absolute;top:5px;left:5px;opacity:.5;color:#7e8993}.acf-url input[type=url]{padding-left:27px!important}.acf-url.-valid i{opacity:1}.select2-container.-acf .select2-choices{background:#fff;border-color:#ddd;box-shadow:0 1px 2px rgba(0,0,0,.07) inset;min-height:31px}.select2-container.-acf .select2-choices .select2-search-choice{margin:5px 0 5px 5px;padding:3px 5px 3px 18px;border-color:#bbb;background:#f9f9f9;box-shadow:0 1px 0 rgba(255,255,255,.25) inset}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper{background:#5897fb;border-color:#3f87fa;color:#fff;box-shadow:0 0 3px rgba(0,0,0,.1)}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper a{visibility:hidden}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-placeholder{background-color:#f7f7f7;border-color:#f7f7f7;visibility:visible!important}.select2-container.-acf .select2-choices .select2-search-choice-focus{border-color:#999}.select2-container.-acf .select2-choices .select2-search-field input{height:31px;line-height:22px;margin:0;padding:5px 5px 5px 7px}.select2-container.-acf .select2-choice{border-color:#bbb}.select2-container.-acf .select2-choice .select2-arrow{background:0 0;border-left-color:#dfdfdf;padding-left:1px}.select2-container.-acf .select2-choice .select2-result-description{display:none}.select2-container.-acf.select2-container-active .select2-choices,.select2-container.-acf.select2-dropdown-open .select2-choices{border-color:#5b9dd9;border-radius:3px 3px 0 0}.select2-container.-acf.select2-dropdown-open .select2-choice{background:#fff;border-color:#5b9dd9}html[dir=rtl] .select2-container.-acf .select2-search-choice-close{left:24px}html[dir=rtl] .select2-container.-acf .select2-choice>.select2-chosen{margin-left:42px}html[dir=rtl] .select2-container.-acf .select2-choice .select2-arrow{padding-left:0;padding-right:1px}.select2-drop .select2-search{padding:4px 4px 0}.select2-drop .select2-result .select2-result-description{color:#999;font-size:12px;margin-left:5px}.select2-drop .select2-result.select2-highlighted .select2-result-description{color:#fff;opacity:.75}.select2-container.-acf li{margin-bottom:0}.select2-container.-acf .select2-selection{border-color:#7e8993}.acf-admin-3-8 .select2-container.-acf .select2-selection{border-color:#aaa}.select2-container.-acf .select2-selection--multiple .select2-search--inline:first-child{float:none}.select2-container.-acf .select2-selection--multiple .select2-search--inline:first-child input{width:100%!important}.select2-container.-acf .select2-selection--multiple .select2-selection__rendered{padding-right:0}.select2-container.-acf .select2-selection--multiple .select2-selection__choice{background-color:#f7f7f7;border-color:#ccc;max-width:100%;overflow:hidden;word-wrap:normal!important;white-space:normal}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper{background:#5897fb;border-color:#3f87fa;color:#fff;box-shadow:0 0 3px rgba(0,0,0,.1)}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper span{visibility:hidden}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-placeholder{background-color:#f7f7f7;border-color:#f7f7f7;visibility:visible!important}.select2-container.-acf .select2-selection--multiple .select2-search__field{box-shadow:none!important;min-height:0}.acf-row .select2-container.-acf .select2-selection--single{overflow:hidden}.acf-row .select2-container.-acf .select2-selection--single .select2-selection__rendered{white-space:normal}.select2-container .select2-dropdown{z-index:900000}.select2-container .select2-dropdown .select2-search__field{line-height:1.4;min-height:0}.acf-link .link-wrap{display:none;border:#ccd0d4 solid 1px;border-radius:3px;padding:5px;line-height:26px;background:#fff;word-wrap:break-word;word-break:break-all}.acf-link .link-wrap .link-title{padding:0 5px}.acf-link.-value .button{display:none}.acf-link.-value .acf-icon.-link-ext{display:none}.acf-link.-value .link-wrap{display:inline-block}.acf-link.-external .acf-icon.-link-ext{display:inline-block}#wp-link-backdrop{z-index:900000!important}#wp-link-wrap{z-index:900001!important}ul.acf-checkbox-list,ul.acf-radio-list{background:0 0;position:relative;padding:1px;margin:0}ul.acf-checkbox-list li,ul.acf-radio-list li{font-size:13px;line-height:22px;margin:0;position:relative;word-wrap:break-word}ul.acf-checkbox-list li label,ul.acf-radio-list li label{display:inline}ul.acf-checkbox-list li input[type=checkbox],ul.acf-checkbox-list li input[type=radio],ul.acf-radio-list li input[type=checkbox],ul.acf-radio-list li input[type=radio]{margin:-1px 4px 0 0;vertical-align:middle}ul.acf-checkbox-list li input[type=text],ul.acf-radio-list li input[type=text]{width:auto;vertical-align:middle;margin:2px 0}ul.acf-checkbox-list li span,ul.acf-radio-list li span{float:none}ul.acf-checkbox-list li i,ul.acf-radio-list li i{vertical-align:middle}ul.acf-checkbox-list.acf-hl li,ul.acf-radio-list.acf-hl li{margin-right:20px;clear:none}html[dir=rtl] ul.acf-checkbox-list input[type=checkbox],html[dir=rtl] ul.acf-checkbox-list input[type=radio],html[dir=rtl] ul.acf-radio-list input[type=checkbox],html[dir=rtl] ul.acf-radio-list input[type=radio]{margin-left:4px;margin-right:0}.acf-button-group{display:inline-block}.acf-button-group label{display:inline-block;border:#7e8993 solid 1px;position:relative;z-index:1;padding:5px 10px;background:#fff}.acf-button-group label:hover{color:#016087;background:#f3f5f6;border-color:#0071a1;z-index:2}.acf-button-group label.selected{border-color:#007cba;background:#008dd4;color:#fff;z-index:2}.acf-button-group input{display:none!important}.acf-button-group{padding-left:1px;display:inline-flex;flex-direction:row;flex-wrap:nowrap}.acf-button-group label{margin:0 0 0 -1px;flex:1;text-align:center;white-space:nowrap}.acf-button-group label:first-child{border-radius:3px 0 0 3px}html[dir=rtl] .acf-button-group label:first-child{border-radius:0 3px 3px 0}.acf-button-group label:last-child{border-radius:0 3px 3px 0}html[dir=rtl] .acf-button-group label:last-child{border-radius:3px 0 0 3px}.acf-button-group label:only-child{border-radius:3px}.acf-button-group.-vertical{padding-left:0;padding-top:1px;flex-direction:column}.acf-button-group.-vertical label{margin:-1px 0 0 0}.acf-button-group.-vertical label:first-child{border-radius:3px 3px 0 0}.acf-button-group.-vertical label:last-child{border-radius:0 0 3px 3px}.acf-button-group.-vertical label:only-child{border-radius:3px}.acf-admin-3-8 .acf-button-group label{border-color:#ccd0d4}.acf-admin-3-8 .acf-button-group label:hover{border-color:#0071a1}.acf-admin-3-8 .acf-button-group label.selected{border-color:#007cba}.acf-checkbox-list .button{margin:10px 0 0}.acf-switch{display:inline-block;border-radius:5px;cursor:pointer;position:relative;background:#f5f5f5;height:30px;vertical-align:middle;border:#7e8993 solid 1px;-webkit-transition:background .25s ease;-moz-transition:background .25s ease;-o-transition:background .25s ease;transition:background .25s ease}.acf-switch span{display:inline-block;float:left;text-align:center;font-size:13px;line-height:22px;padding:4px 10px;min-width:15px}.acf-switch span i{vertical-align:middle}.acf-switch .acf-switch-on{color:#fff;text-shadow:#007cba 0 1px 0}.acf-switch .acf-switch-slider{position:absolute;top:2px;left:2px;bottom:2px;right:50%;z-index:1;background:#fff;border-radius:3px;border:#7e8993 solid 1px;-webkit-transition:all .25s ease;-moz-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;transition-property:left,right}.acf-switch.-focus,.acf-switch:hover{border-color:#0071a1;background:#f3f5f6;color:#016087}.acf-switch.-focus .acf-switch-slider,.acf-switch:hover .acf-switch-slider{border-color:#0071a1}.acf-switch.-on{background:#0d99d5;border-color:#007cba}.acf-switch.-on .acf-switch-slider{left:50%;right:2px;border-color:#007cba}.acf-switch.-on:hover{border-color:#007cba}.acf-switch+span{margin-left:6px}.acf-admin-3-8 .acf-switch{border-color:#ccd0d4}.acf-admin-3-8 .acf-switch .acf-switch-slider{border-color:#ccd0d4}.acf-admin-3-8 .acf-switch.-focus,.acf-admin-3-8 .acf-switch:hover{border-color:#0071a1}.acf-admin-3-8 .acf-switch.-focus .acf-switch-slider,.acf-admin-3-8 .acf-switch:hover .acf-switch-slider{border-color:#0071a1}.acf-admin-3-8 .acf-switch.-on{border-color:#007cba}.acf-admin-3-8 .acf-switch.-on .acf-switch-slider{border-color:#007cba}.acf-admin-3-8 .acf-switch.-on:hover{border-color:#007cba}.acf-switch-input{opacity:0;position:absolute;margin:0}.compat-item .acf-true-false .message{float:none;padding:0;vertical-align:middle}.acf-google-map{position:relative;border:#ccd0d4 solid 1px;background:#fff}.acf-google-map .title{position:relative;border-bottom:#ccd0d4 solid 1px}.acf-google-map .title .search{margin:0;font-size:14px;line-height:30px;height:40px;padding:5px 10px;border:0 none;box-shadow:none;border-radius:0;font-family:inherit;cursor:text}.acf-google-map .title .acf-loading{position:absolute;top:10px;right:11px;display:none}.acf-google-map .title .acf-icon:active{display:inline-block!important}.acf-google-map .canvas{height:400px}.acf-google-map:hover .title .acf-actions{display:block}.acf-google-map .title .acf-icon.-location{display:inline-block}.acf-google-map .title .acf-icon.-cancel,.acf-google-map .title .acf-icon.-search{display:none}.acf-google-map.-value .title .search{font-weight:700}.acf-google-map.-value .title .acf-icon.-location{display:none}.acf-google-map.-value .title .acf-icon.-cancel{display:inline-block}.acf-google-map.-searching .title .acf-icon.-location{display:none}.acf-google-map.-searching .title .acf-icon.-cancel,.acf-google-map.-searching .title .acf-icon.-search{display:inline-block}.acf-google-map.-searching .title .acf-actions{display:block}.acf-google-map.-searching .title .search{font-weight:400!important}.acf-google-map.-loading .title a{display:none!important}.acf-google-map.-loading .title i{display:inline-block}.pac-container{border-width:1px 0;box-shadow:none}.pac-container:after{display:none}.pac-container .pac-item:first-child{border-top:0 none}.pac-container .pac-item{padding:5px 10px;cursor:pointer}html[dir=rtl] .pac-container .pac-item{text-align:right}.acf-relationship{background:#fff;border:#ccd0d4 solid 1px}.acf-relationship .filters{border-bottom:#ccd0d4 solid 1px;background:#fff}.acf-relationship .filters:after{display:block;clear:both;content:""}.acf-relationship .filters .filter{margin:0;padding:0;float:left;width:100%;box-sizing:border-box;padding:7px 7px 7px 0}.acf-relationship .filters .filter:first-child{padding-left:7px}.acf-relationship .filters .filter input,.acf-relationship .filters .filter select{margin:0;float:none}.acf-relationship .filters .filter input:active,.acf-relationship .filters .filter input:focus,.acf-relationship .filters .filter select:active,.acf-relationship .filters .filter select:focus{outline:0;box-shadow:none}.acf-relationship .filters .filter input{border-color:transparent;box-shadow:none;padding-left:3px;padding-right:3px}.acf-relationship .filters.-f2 .filter{width:50%}.acf-relationship .filters.-f3 .filter{width:25%}.acf-relationship .filters.-f3 .filter.-search{width:50%}.acf-relationship .list{margin:0;padding:5px;height:160px;overflow:auto}.acf-relationship .list .acf-rel-item,.acf-relationship .list .acf-rel-label,.acf-relationship .list p{padding:5px;margin:0;display:block;position:relative;min-height:18px}.acf-relationship .list .acf-rel-label{font-weight:700}.acf-relationship .list .acf-rel-item{cursor:pointer}.acf-relationship .list .acf-rel-item b{text-decoration:underline;font-weight:400}.acf-relationship .list .acf-rel-item .thumbnail{background:#e0e0e0;width:22px;height:22px;float:left;margin:-2px 5px 0 0}.acf-relationship .list .acf-rel-item .thumbnail img{max-width:22px;max-height:22px;margin:0 auto;display:block}.acf-relationship .list .acf-rel-item .thumbnail.-icon{background:#fff}.acf-relationship .list .acf-rel-item .thumbnail.-icon img{max-height:20px;margin-top:1px}.acf-relationship .list .acf-rel-item:hover{background:#3875d7;color:#fff}.acf-relationship .list .acf-rel-item:hover .thumbnail{background:#a2bfec}.acf-relationship .list .acf-rel-item:hover .thumbnail.-icon{background:#fff}.acf-relationship .list .acf-rel-item.disabled{opacity:.5}.acf-relationship .list .acf-rel-item.disabled:hover{background:0 0;color:#333;cursor:default}.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail{background:#e0e0e0}.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail.-icon{background:#fff}.acf-relationship .list ul{padding-bottom:5px}.acf-relationship .list ul .acf-rel-item,.acf-relationship .list ul .acf-rel-label,.acf-relationship .list ul p{padding-left:20px}.acf-relationship .selection{position:relative}.acf-relationship .selection:after{display:block;clear:both;content:""}.acf-relationship .selection .choices,.acf-relationship .selection .values{width:50%;background:#fff;float:left}.acf-relationship .selection .choices{background:#f9f9f9}.acf-relationship .selection .choices .list{border-right:#dfdfdf solid 1px}.acf-relationship .selection .values .acf-icon{position:absolute;top:4px;right:7px;display:none}html[dir=rtl] .acf-relationship .selection .values .acf-icon{right:auto;left:7px}.acf-relationship .selection .values .acf-rel-item:hover .acf-icon{display:block}.acf-relationship .selection .values .acf-rel-item{cursor:move}.acf-relationship .selection .values .acf-rel-item b{text-decoration:none}.menu-item .acf-relationship ul{width:auto}.menu-item .acf-relationship li{display:block}.acf-editor-wrap.delay .acf-editor-toolbar{content:"";display:block;background:#f5f5f5;border-bottom:#ddd solid 1px;color:#555d66;padding:10px}.acf-editor-wrap.delay .wp-editor-area{padding:10px;border:none;color:inherit!important}.acf-editor-wrap iframe{min-height:200px}.acf-editor-wrap .wp-editor-container{border:1px solid #ccd0d4;box-shadow:none!important}.acf-editor-wrap .wp-editor-tabs{box-sizing:content-box}.acf-editor-wrap .wp-switch-editor{border-color:#ccd0d4;border-bottom-color:transparent}#mce_fullscreen_container{z-index:900000!important}.acf-field-tab{display:none!important}.hidden-by-tab{display:none!important}.acf-tab-wrap{clear:both;z-index:1}.acf-tab-group{border-bottom:#ccc solid 1px;padding:10px 10px 0}.acf-tab-group li{margin:0 .5em 0 0}.acf-tab-group li a{padding:5px 10px;display:block;color:#555;font-size:14px;font-weight:600;line-height:24px;border:#ccc solid 1px;border-bottom:0 none;text-decoration:none;background:#e5e5e5;transition:none}.acf-tab-group li a:hover{background:#fff}.acf-tab-group li a:focus{outline:0;box-shadow:none}.acf-tab-group li a:empty{display:none}html[dir=rtl] .acf-tab-group li{margin:0 0 0 .5em}.acf-tab-group li.active a{background:#f1f1f1;color:#000;padding-bottom:6px;margin-bottom:-1px;position:relative;z-index:1}.acf-fields>.acf-tab-wrap{background:#f9f9f9}.acf-fields>.acf-tab-wrap .acf-tab-group{position:relative;border-top:#ccd0d4 solid 1px;border-bottom:#ccd0d4 solid 1px;z-index:2;margin-bottom:-1px}.acf-fields>.acf-tab-wrap .acf-tab-group li a{background:#f1f1f1;border-color:#ccd0d4}.acf-fields>.acf-tab-wrap .acf-tab-group li a:hover{background:#fff}.acf-fields>.acf-tab-wrap .acf-tab-group li.active a{background:#fff}.acf-admin-3-8 .acf-fields>.acf-tab-wrap .acf-tab-group{border-color:#dfdfdf}.acf-fields>.acf-tab-wrap:first-child .acf-tab-group{border-top:none}.acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:20%}@media screen and (max-width:640px){.acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:10px}}html[dir=rtl] .acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:0;padding-right:20%}@media screen and (max-width:850px){html[dir=rtl] .acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-right:10px}}.acf-tab-wrap.-left .acf-tab-group{position:absolute;left:0;width:20%;border:0 none;padding:0!important;margin:1px 0 0}.acf-tab-wrap.-left .acf-tab-group li{float:none;margin:-1px 0 0}.acf-tab-wrap.-left .acf-tab-group li a{border:1px solid #ededed;font-size:13px;line-height:18px;color:#0073aa;padding:10px;margin:0;font-weight:400;border-width:1px 0;border-radius:0;background:0 0}.acf-tab-wrap.-left .acf-tab-group li a:hover{color:#00a0d2}.acf-tab-wrap.-left .acf-tab-group li.active a{border-color:#dfdfdf;color:#000;margin-right:-1px;background:#fff}html[dir=rtl] .acf-tab-wrap.-left .acf-tab-group{left:auto;right:0}html[dir=rtl] .acf-tab-wrap.-left .acf-tab-group li.active a{margin-right:0;margin-left:-1px}.acf-field+.acf-tab-wrap.-left:before{content:"";display:block;position:relative;z-index:1;height:10px;border-top:#dfdfdf solid 1px;border-bottom:#dfdfdf solid 1px;margin-bottom:-1px}.acf-tab-wrap.-left:first-child .acf-tab-group li:first-child a{border-top:none}.acf-fields.-sidebar{padding:0 0 0 20%!important;position:relative}.acf-fields.-sidebar:before{content:"";display:block;position:absolute;top:0;left:0;width:20%;bottom:0;border-right:#dfdfdf solid 1px;background:#f9f9f9;z-index:1}html[dir=rtl] .acf-fields.-sidebar{padding:0 20% 0 0!important}html[dir=rtl] .acf-fields.-sidebar:before{border-left:#dfdfdf solid 1px;border-right-width:0;left:auto;right:0}.acf-fields.-sidebar.-left{padding:0 0 0 180px!important}html[dir=rtl] .acf-fields.-sidebar.-left{padding:0 180px 0 0!important}.acf-fields.-sidebar.-left:before{background:#f1f1f1;border-color:#dfdfdf;width:180px}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group{width:180px}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li a{border-color:#e4e4e4}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li.active a{background:#f9f9f9}.acf-fields.-sidebar>.acf-field-tab+.acf-field{border-top:none}.acf-fields.-clear>.acf-tab-wrap{background:0 0}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group{margin-top:0;border-top:none;padding-left:0;padding-right:0}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a{background:#e5e5e5}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover{background:#fff}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a{background:#f1f1f1}.acf-postbox.seamless>.acf-fields.-sidebar{margin-left:0!important}.acf-postbox.seamless>.acf-fields.-sidebar:before{background:0 0}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap{background:0 0;margin-bottom:10px;padding-left:12px;padding-right:12px}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group{border-top:0 none;border-color:#ccd0d4}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li a{background:#e5e5e5;border-color:#ccd0d4}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li a:hover{background:#fff}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li.active a{background:#f1f1f1}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left:before{border-top:none;height:auto}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group{margin-bottom:0}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group li a{border-width:1px 0 1px 1px!important;border-color:#ccc;background:#e5e5e5}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group li.active a{background:#f1f1f1}.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a{background:#f1f1f1}.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover,.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a{background:#fff}.compat-item .acf-tab-wrap td{display:block}.acf-gallery-side .acf-tab-wrap{border-top:0 none!important}.acf-gallery-side .acf-tab-wrap .acf-tab-group{margin:10px 0!important;padding:0!important}.acf-gallery-side .acf-tab-group li.active a{background:#f9f9f9!important}.widget .acf-tab-group{border-bottom-color:#e8e8e8}.widget .acf-tab-group li a{background:#f1f1f1}.widget .acf-tab-group li.active a{background:#fff}.media-modal.acf-expanded .compat-attachment-fields>tbody>tr.acf-tab-wrap .acf-tab-group{padding-left:23%;border-bottom-color:#ddd}.form-table>tbody>tr.acf-tab-wrap .acf-tab-group{padding:0 5px 0 210px}html[dir=rtl] .form-table>tbody>tr.acf-tab-wrap .acf-tab-group{padding:0 210px 0 5px}.acf-oembed{position:relative;border:#ccd0d4 solid 1px;background:#fff}.acf-oembed .title{position:relative;border-bottom:#ccd0d4 solid 1px;padding:5px 10px}.acf-oembed .title .input-search{margin:0;font-size:14px;line-height:30px;height:30px;padding:0;border:0 none;box-shadow:none;border-radius:0;font-family:inherit;cursor:text}.acf-oembed .title .acf-actions{padding:6px}.acf-oembed .canvas{position:relative;min-height:250px;background:#f9f9f9}.acf-oembed .canvas .canvas-media{position:relative;z-index:1}.acf-oembed .canvas iframe{display:block;margin:0;padding:0;width:100%}.acf-oembed .canvas .acf-icon.-picture{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:0;height:42px;width:42px;font-size:42px;color:#999}.acf-oembed .canvas .acf-loading-overlay{background:rgba(255,255,255,.9)}.acf-oembed .canvas .canvas-error{position:absolute;top:50%;left:0;right:0;margin:-9px 0 0 0;text-align:center;display:none}.acf-oembed .canvas .canvas-error p{padding:8px;margin:0;display:inline}.acf-oembed.has-value .canvas{min-height:50px}.acf-oembed.has-value .input-search{font-weight:700}.acf-oembed.has-value .title:hover .acf-actions{display:block}.acf-image-uploader{position:relative}.acf-image-uploader:after{display:block;clear:both;content:""}.acf-image-uploader p{margin:0}.acf-image-uploader .image-wrap{position:relative;float:left}.acf-image-uploader .image-wrap img{max-width:100%;max-height:100%;width:auto;height:auto;display:block;min-width:30px;min-height:30px;background:#f1f1f1;margin:0;padding:0}.acf-image-uploader .image-wrap img[src$=".svg"]{min-height:100px;min-width:100px}.acf-image-uploader .image-wrap:hover .acf-actions{display:block}.acf-image-uploader input.button{width:auto}html[dir=rtl] .acf-image-uploader .image-wrap{float:right}.acf-file-uploader{position:relative}.acf-file-uploader p{margin:0}.acf-file-uploader .file-wrap{border:#ccd0d4 solid 1px;min-height:84px;position:relative;background:#fff}.acf-file-uploader .file-icon{position:absolute;top:0;left:0;bottom:0;padding:10px;background:#f1f1f1;border-right:#d5d9dd solid 1px}.acf-file-uploader .file-icon img{display:block;padding:0;margin:0;max-width:48px}.acf-file-uploader .file-info{padding:10px;margin-left:69px}.acf-file-uploader .file-info p{margin:0 0 2px;font-size:13px;line-height:1.4em;word-break:break-all}.acf-file-uploader .file-info a{text-decoration:none}.acf-file-uploader:hover .acf-actions{display:block}html[dir=rtl] .acf-file-uploader .file-icon{left:auto;right:0;border-left:#e5e5e5 solid 1px;border-right:none}html[dir=rtl] .acf-file-uploader .file-info{margin-right:69px;margin-left:0}.acf-ui-datepicker .ui-datepicker{z-index:900000!important}.acf-ui-datepicker .ui-datepicker .ui-widget-header a{cursor:pointer;transition:none}.acf-ui-datepicker .ui-state-highlight.ui-state-hover{border:1px solid #98b7e8!important;background:#98b7e8!important;font-weight:400!important;color:#fff!important}.acf-ui-datepicker .ui-state-highlight.ui-state-active{border:1px solid #3875d7!important;background:#3875d7!important;font-weight:400!important;color:#fff!important}.acf-field-separator .acf-label{margin-bottom:0}.acf-field-separator .acf-label label{font-weight:400}.acf-field-separator .acf-input{display:none}.acf-fields>.acf-field-separator{background:#f9f9f9;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;margin-bottom:-1px;z-index:2}.acf-taxonomy-field{position:relative}.acf-taxonomy-field .categorychecklist-holder{border:#ccd0d4 solid 1px;border-radius:3px;max-height:200px;overflow:auto}.acf-taxonomy-field .acf-checkbox-list{margin:0;padding:10px}.acf-taxonomy-field .acf-checkbox-list ul.children{padding-left:18px}.acf-taxonomy-field:hover .acf-actions{display:block}.acf-taxonomy-field[data-ftype=select] .acf-actions{padding:0;margin:-9px}.acf-range-wrap .acf-append,.acf-range-wrap .acf-prepend{display:inline-block;vertical-align:middle;line-height:28px;margin:0 7px 0 0}.acf-range-wrap .acf-append{margin:0 0 0 7px}.acf-range-wrap input[type=range]{display:inline-block;padding:0;margin:0;vertical-align:middle;height:28px}.acf-range-wrap input[type=range]:focus{outline:0}.acf-range-wrap input[type=number]{display:inline-block;min-width:3em;margin-left:10px;vertical-align:middle}html[dir=rtl] .acf-range-wrap input[type=number]{margin-right:10px;margin-left:0}html[dir=rtl] .acf-range-wrap .acf-append{margin:0 7px 0 0}html[dir=rtl] .acf-range-wrap .acf-prepend{margin:0 0 0 7px}.acf-accordion{margin:-1px 0;padding:0;background:#fff;border-top:1px solid #d5d9dd;border-bottom:1px solid #d5d9dd;z-index:1}.acf-accordion .acf-accordion-title{margin:0;padding:12px;font-weight:700;cursor:pointer;font-size:inherit;font-size:13px;line-height:1.4em}.acf-accordion .acf-accordion-title:hover{background:#f3f4f5}.acf-accordion .acf-accordion-title label{margin:0;padding:0;font-size:13px;line-height:1.4em}.acf-accordion .acf-accordion-title p{font-weight:400}.acf-accordion .acf-accordion-title .acf-accordion-icon{float:right}.acf-accordion .acf-accordion-title svg.acf-accordion-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#191e23;fill:currentColor}.acf-accordion .acf-accordion-content{margin:0;padding:0 12px 12px;display:none}.acf-accordion.-open>.acf-accordion-content{display:block}.acf-field.acf-accordion{margin:-1px 0;padding:0!important;border-color:#d5d9dd}.acf-field.acf-accordion .acf-label.acf-accordion-title{padding:12px;width:auto;float:none;width:auto}.acf-field.acf-accordion .acf-input.acf-accordion-content{padding:0;float:none;width:auto}.acf-field.acf-accordion .acf-input.acf-accordion-content>.acf-fields{border-top:#eee solid 1px}.acf-field.acf-accordion .acf-input.acf-accordion-content>.acf-fields.-clear{padding:0 12px 15px}.acf-fields.-left>.acf-field.acf-accordion:before{display:none}.acf-fields.-left>.acf-field.acf-accordion .acf-accordion-title{width:auto;margin:0!important;padding:12px;float:none!important}.acf-fields.-left>.acf-field.acf-accordion .acf-accordion-content{padding:0!important}.acf-fields.-clear>.acf-field.acf-accordion{border:#ccc solid 1px;background:0 0}.acf-fields.-clear>.acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-16px}tr.acf-field.acf-accordion{background:0 0}tr.acf-field.acf-accordion>.acf-input{padding:0!important;border:#ccc solid 1px}tr.acf-field.acf-accordion .acf-accordion-content{padding:0 12px 12px}#addtag div.acf-field.error{border:0 none;padding:8px 0}#addtag>.acf-field.acf-accordion{padding-right:0;margin-right:5%}#addtag>.acf-field.acf-accordion+p.submit{margin-top:0}tr.acf-accordion{margin:15px 0!important}tr.acf-accordion+tr.acf-accordion{margin-top:-16px!important}.acf-postbox.seamless>.acf-fields>.acf-accordion{margin-left:12px;margin-right:12px;border:#ccd0d4 solid 1px}.widget .widget-content>.acf-field.acf-accordion{border:#dfdfdf solid 1px;margin-bottom:10px}.widget .widget-content>.acf-field.acf-accordion .acf-accordion-title{margin-bottom:0}.widget .widget-content>.acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-11px}.media-modal .compat-attachment-fields .acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-1px}.media-modal .compat-attachment-fields .acf-field.acf-accordion>.acf-input{width:100%}.media-modal .compat-attachment-fields .acf-field.acf-accordion .compat-attachment-fields>tbody>tr>td{padding-bottom:5px}.block-editor .edit-post-sidebar .acf-postbox>.hndle,.block-editor .edit-post-sidebar .acf-postbox>.postbox-header{border-bottom-width:0!important}.block-editor .edit-post-sidebar .acf-postbox.closed>.hndle,.block-editor .edit-post-sidebar .acf-postbox.closed>.postbox-header{border-bottom-width:1px!important}.block-editor .edit-post-sidebar .acf-fields{min-height:1px;overflow:auto}.block-editor .edit-post-sidebar .acf-fields>.acf-field{border-width:0;border-color:#e2e4e7;margin:16px;padding:0;width:auto!important;min-height:0!important;float:none!important}.block-editor .edit-post-sidebar .acf-fields>.acf-field>.acf-label{margin-bottom:5px}.block-editor .edit-post-sidebar .acf-fields>.acf-field>.acf-label label{font-weight:400}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion{padding:0;margin:0;border-top-width:1px}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion:first-child{border-top-width:0}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion .acf-accordion-title{margin:0;padding:15px}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion .acf-accordion-title label{font-weight:700}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion .acf-accordion-content>.acf-fields{border-top-width:0}.form-table>tbody>.acf-field>.acf-label{padding:20px 10px 20px 0;width:210px}html[dir=rtl] .form-table>tbody>.acf-field>.acf-label{padding:20px 0 20px 10px}.form-table>tbody>.acf-field>.acf-label label{font-size:14px;color:#23282d}.form-table>tbody>.acf-field>.acf-input{padding:15px 10px}html[dir=rtl] .form-table>tbody>.acf-field>.acf-input{padding:15px 10px 15px 5%}.form-table>tbody>.acf-tab-wrap td{padding:15px 5% 15px 0}html[dir=rtl] .form-table>tbody>.acf-tab-wrap td{padding:15px 0 15px 5%}.form-table>tbody .form-table th.acf-th{width:auto}#createuser .acf-field input[type=email],#createuser .acf-field input[type=number],#createuser .acf-field input[type=password],#createuser .acf-field input[type=search],#createuser .acf-field input[type=text],#createuser .acf-field input[type=url],#createuser .acf-field select,#your-profile .acf-field input[type=email],#your-profile .acf-field input[type=number],#your-profile .acf-field input[type=password],#your-profile .acf-field input[type=search],#your-profile .acf-field input[type=text],#your-profile .acf-field input[type=url],#your-profile .acf-field select{max-width:25em}#createuser .acf-field textarea,#your-profile .acf-field textarea{max-width:500px}#createuser .acf-field .acf-field input[type=email],#createuser .acf-field .acf-field input[type=number],#createuser .acf-field .acf-field input[type=password],#createuser .acf-field .acf-field input[type=search],#createuser .acf-field .acf-field input[type=text],#createuser .acf-field .acf-field input[type=url],#createuser .acf-field .acf-field select,#createuser .acf-field .acf-field textarea,#your-profile .acf-field .acf-field input[type=email],#your-profile .acf-field .acf-field input[type=number],#your-profile .acf-field .acf-field input[type=password],#your-profile .acf-field .acf-field input[type=search],#your-profile .acf-field .acf-field input[type=text],#your-profile .acf-field .acf-field input[type=url],#your-profile .acf-field .acf-field select,#your-profile .acf-field .acf-field textarea{max-width:none}#registerform h2{margin:1em 0}#registerform .acf-field{margin-top:0}#registerform .acf-field .acf-label{margin-bottom:0}#registerform .acf-field .acf-label label{font-weight:400;line-height:1.5}#registerform p.submit{text-align:right}#acf-term-fields{padding-right:5%}#acf-term-fields>.acf-field>.acf-label{margin:0}#acf-term-fields>.acf-field>.acf-label label{font-size:12px;font-weight:400}p.submit .acf-spinner,p.submit .spinner{vertical-align:top;float:none;margin:4px 4px 0}#edittag .acf-fields.-left>.acf-field{padding-left:220px}#edittag .acf-fields.-left>.acf-field:before{width:209px}#edittag .acf-fields.-left>.acf-field>.acf-label{width:220px;margin-left:-220px;padding:0 10px}#edittag .acf-fields.-left>.acf-field>.acf-input{padding:0}#edittag>.acf-fields.-left{width:96%}#edittag>.acf-fields.-left>.acf-field>.acf-label{padding-left:0}.editcomment td:first-child{white-space:nowrap;width:131px}#widgets-right .widget .acf-field .description{padding-left:0;padding-right:0}.acf-widget-fields>.acf-field .acf-label{margin-bottom:5px}.acf-widget-fields>.acf-field .acf-label label{font-weight:400;margin:0}.acf-menu-settings{border-top:1px solid #eee;margin-top:2em}.acf-menu-settings.-seamless{border-top:none;margin-top:15px}.acf-menu-settings.-seamless>h2{display:none}.acf-menu-settings .list li{display:block;margin-bottom:0}.acf-fields.acf-menu-item-fields{clear:both;padding-top:1px}.acf-fields.acf-menu-item-fields>.acf-field{margin:5px 0;padding-right:10px}.acf-fields.acf-menu-item-fields>.acf-field .acf-label{margin-bottom:0}.acf-fields.acf-menu-item-fields>.acf-field .acf-label label{font-style:italic;font-weight:400}#post .compat-attachment-fields .compat-field-acf-form-data{display:none}#post .compat-attachment-fields,#post .compat-attachment-fields>tbody,#post .compat-attachment-fields>tbody>tr,#post .compat-attachment-fields>tbody>tr>td,#post .compat-attachment-fields>tbody>tr>th{display:block}#post .compat-attachment-fields>tbody>.acf-field{margin:15px 0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label{margin:0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label label{margin:0;padding:0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label label p{margin:0 0 3px!important}#post .compat-attachment-fields>tbody>.acf-field>.acf-input{margin:0}.media-modal .compat-attachment-fields td.acf-input table{display:table;table-layout:auto}.media-modal .compat-attachment-fields td.acf-input table tbody{display:table-row-group}.media-modal .compat-attachment-fields td.acf-input table tr{display:table-row}.media-modal .compat-attachment-fields td.acf-input table td,.media-modal .compat-attachment-fields td.acf-input table th{display:table-cell}.media-modal .compat-attachment-fields>tbody>.acf-field{margin:5px 0}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label{min-width:30%;margin:0;padding:0;float:left;text-align:right;display:block;float:left}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label>label{padding-top:6px;margin:0;color:#666;font-weight:400;line-height:16px}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-input{width:65%;margin:0;padding:0;float:right;display:block}.media-modal .compat-attachment-fields>tbody>.acf-field p.description{margin:0}.acf-selection-error{background:#ffebe8;border:1px solid #c00;border-radius:3px;padding:8px;margin:20px 0 0}.acf-selection-error .selection-error-label{background:#c00;border-radius:3px;color:#fff;font-weight:700;margin-right:8px;padding:2px 4px}.acf-selection-error .selection-error-message{color:#b44;display:block;padding-top:8px;word-wrap:break-word;white-space:pre-wrap}.media-modal .attachment.acf-disabled .thumbnail{opacity:.25!important}.media-modal .attachment.acf-disabled .attachment-preview:before{background:rgba(0,0,0,.15);z-index:1;position:relative}.media-modal .compat-field-acf-blank,.media-modal .compat-field-acf-form-data{display:none!important}.media-modal .upload-error-message{white-space:pre-wrap}.media-modal .acf-required{padding:0!important;margin:0!important;float:none!important;color:red!important}.media-modal .media-sidebar .compat-item{padding-bottom:20px}@media (max-width:900px){.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label,.media-modal .setting span{width:98%;float:none;text-align:left;min-height:0;padding:0}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-input,.media-modal .setting input,.media-modal .setting textarea{float:none;height:auto;max-width:none;width:98%}}.media-modal .acf-expand-details{float:right;padding:8px 10px;margin-right:6px;font-size:13px;height:18px;line-height:18px;color:#666;text-decoration:none}.media-modal .acf-expand-details:active,.media-modal .acf-expand-details:focus{outline:0 none;box-shadow:none;color:#666}.media-modal .acf-expand-details:hover{color:#000}.media-modal .acf-expand-details .is-open{display:none}.media-modal .acf-expand-details .is-closed{display:block}@media (max-width:640px){.media-modal .acf-expand-details{display:none}}.media-modal.acf-expanded .acf-expand-details .is-open{display:block}.media-modal.acf-expanded .acf-expand-details .is-closed{display:none}.media-modal.acf-expanded .attachments-browser .attachments,.media-modal.acf-expanded .attachments-browser .media-toolbar{right:740px}.media-modal.acf-expanded .media-sidebar{width:708px}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail{float:left;max-height:none}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail img{max-width:100%;max-height:200px}.media-modal.acf-expanded .media-sidebar .attachment-info .details{float:right}.media-modal.acf-expanded .media-sidebar .attachment-details .setting .name,.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail,.media-modal.acf-expanded .media-sidebar .compat-attachment-fields>tbody>.acf-field>.acf-label{min-width:20%;margin-right:0}.media-modal.acf-expanded .media-sidebar .attachment-details .setting input,.media-modal.acf-expanded .media-sidebar .attachment-details .setting textarea,.media-modal.acf-expanded .media-sidebar .attachment-details .setting+.description,.media-modal.acf-expanded .media-sidebar .attachment-info .details,.media-modal.acf-expanded .media-sidebar .compat-attachment-fields>tbody>.acf-field>.acf-input{min-width:77%}@media (max-width:900px){.media-modal.acf-expanded .attachments-browser .media-toolbar{display:none}.media-modal.acf-expanded .attachments{display:none}.media-modal.acf-expanded .media-sidebar{width:auto;max-width:none!important;bottom:0!important}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail{min-width:0;max-width:none;width:30%}.media-modal.acf-expanded .media-sidebar .attachment-info .details{min-width:0;max-width:none;width:67%}}@media (max-width:640px){.media-modal.acf-expanded .media-sidebar .attachment-info .details,.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail{width:100%}}.acf-media-modal .media-embed .setting.align,.acf-media-modal .media-embed .setting.link-to{display:none}.acf-media-modal.-edit{left:15%;right:15%;top:100px;bottom:100px}.acf-media-modal.-edit .media-frame-content .attachments,.acf-media-modal.-edit .media-frame-content .media-toolbar,.acf-media-modal.-edit .media-frame-menu,.acf-media-modal.-edit .media-frame-router{display:none}.acf-media-modal.-edit .media-frame-content,.acf-media-modal.-edit .media-frame-title,.acf-media-modal.-edit .media-frame-toolbar,.acf-media-modal.-edit .media-sidebar{width:auto;left:0;right:0}.acf-media-modal.-edit .media-frame-content{top:50px}.acf-media-modal.-edit .media-frame-title{border-bottom:1px solid #dfdfdf;box-shadow:0 4px 4px -4px rgba(0,0,0,.1)}.acf-media-modal.-edit .media-sidebar{padding:0 16px}.acf-media-modal.-edit .media-sidebar .attachment-details{overflow:visible}.acf-media-modal.-edit .media-sidebar .attachment-details>h2,.acf-media-modal.-edit .media-sidebar .attachment-details>h3{display:none}.acf-media-modal.-edit .media-sidebar .attachment-details .attachment-info{background:#fff;border-bottom:#ddd solid 1px;padding:16px;margin:0 -16px 16px}.acf-media-modal.-edit .media-sidebar .attachment-details .thumbnail{margin:0 16px 0 0}.acf-media-modal.-edit .media-sidebar .attachment-details .setting{margin:0 0 5px}.acf-media-modal.-edit .media-sidebar .attachment-details .setting span{margin:0}.acf-media-modal.-edit .media-sidebar .compat-attachment-fields>tbody>.acf-field{margin:0 0 5px}.acf-media-modal.-edit .media-sidebar .compat-attachment-fields>tbody>.acf-field p.description{margin-top:3px}.acf-media-modal.-edit .media-sidebar .media-types-required-info{display:none}@media (max-width:900px){.acf-media-modal.-edit{top:30px;right:30px;bottom:30px;left:30px}}@media (max-width:640px){.acf-media-modal.-edit{top:0;right:0;bottom:0;left:0}}@media (max-width:480px){.acf-media-modal.-edit .media-frame-content{top:40px}}.acf-temp-remove{position:relative;opacity:1;-webkit-transition:all .25s ease;-moz-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;overflow:hidden}.acf-temp-remove:after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.hidden-by-conditional-logic{display:none!important}.hidden-by-conditional-logic.appear-empty{display:table-cell!important}.hidden-by-conditional-logic.appear-empty .acf-input{display:none!important}.acf-postbox.acf-hidden{display:none!important}.acf-attention{transition:border .25s ease-out}.acf-attention.-focused{border:#23282d solid 1px!important;transition:none}tr.acf-attention{transition:box-shadow .25s ease-out;position:relative}tr.acf-attention.-focused{box-shadow:#23282d 0 0 0 1px!important}#editor .edit-post-layout__metaboxes{padding:0}#editor .edit-post-layout__metaboxes .edit-post-meta-boxes-area{margin:0}#editor .metabox-location-side .postbox-container{float:none}#editor .postbox{color:#444}#editor .postbox>.postbox-header .hndle{border-bottom:none}#editor .postbox>.postbox-header .hndle:hover{background:0 0}#editor .postbox>.postbox-header .handle-actions .handle-order-higher,#editor .postbox>.postbox-header .handle-actions .handle-order-lower{width:1.62rem}#editor .postbox>.postbox-header .handle-actions .acf-hndle-cog{height:44px;line-height:44px}#editor .postbox>.postbox-header:hover{background:#f0f0f0}#editor .postbox:last-child.closed>.postbox-header{border-bottom:none}#editor .postbox:last-child>.inside{border-bottom:none}#editor .block-editor-writing-flow__click-redirect{min-height:50px}body.is-dragging-metaboxes #acf_after_title-sortables{outline:3px dashed #646970;display:flow-root;min-height:60px;margin-bottom:3px!important}
\ No newline at end of file
diff --git a/assets/build/css/pro/acf-pro-field-group.css b/assets/build/css/pro/acf-pro-field-group.css
new file mode 100644
index 0000000..3a4f499
--- /dev/null
+++ b/assets/build/css/pro/acf-pro-field-group.css
@@ -0,0 +1,67 @@
+/*--------------------------------------------------------------------------------------------
+*
+* Vars
+*
+*--------------------------------------------------------------------------------------------*/
+/* colors */
+/* acf-field */
+/* responsive */
+/*--------------------------------------------------------------------------------------------
+*
+* Mixins
+*
+*--------------------------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------------------------
+*
+* Flexible Content
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-setting-fc_layout .acf-fc-meta {
+ margin: 0 0 10px;
+ padding: 0;
+}
+.acf-field-setting-fc_layout .acf-fc-meta li {
+ margin: 0 0 10px;
+ padding: 0;
+}
+.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display,
+.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-min {
+ float: left;
+ width: 33%;
+ padding-right: 10px;
+}
+.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-label .acf-input-prepend,
+.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-name .acf-input-prepend,
+.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display .acf-input-prepend {
+ min-width: 60px;
+}
+.acf-field-setting-fc_layout .acf-fl-actions {
+ visibility: hidden;
+}
+.acf-field-setting-fc_layout .acf-fl-actions .reorder-layout {
+ cursor: move;
+}
+.acf-field-setting-fc_layout .acf-fl-actions a {
+ padding: 1px 0;
+ font-size: 13px;
+ line-height: 20px;
+}
+.acf-field-setting-fc_layout:hover .acf-fl-actions, .acf-field-setting-fc_layout.-hover .acf-fl-actions {
+ visibility: visible;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Clone
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-field-object-clone {
+ /* group */
+ /* seamless */
+}
+.acf-field-object-clone[data-display=seamless] .acf-field-setting-instructions,
+.acf-field-object-clone[data-display=seamless] .acf-field-setting-layout,
+.acf-field-object-clone[data-display=seamless] .acf-field-setting-wrapper,
+.acf-field-object-clone[data-display=seamless] .acf-field-setting-conditional_logic {
+ display: none;
+}
\ No newline at end of file
diff --git a/assets/build/css/pro/acf-pro-field-group.min.css b/assets/build/css/pro/acf-pro-field-group.min.css
new file mode 100644
index 0000000..4835759
--- /dev/null
+++ b/assets/build/css/pro/acf-pro-field-group.min.css
@@ -0,0 +1 @@
+.acf-field-setting-fc_layout .acf-fc-meta{margin:0 0 10px;padding:0}.acf-field-setting-fc_layout .acf-fc-meta li{margin:0 0 10px;padding:0}.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-min{float:left;width:33%;padding-right:10px}.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display .acf-input-prepend,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-label .acf-input-prepend,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-name .acf-input-prepend{min-width:60px}.acf-field-setting-fc_layout .acf-fl-actions{visibility:hidden}.acf-field-setting-fc_layout .acf-fl-actions .reorder-layout{cursor:move}.acf-field-setting-fc_layout .acf-fl-actions a{padding:1px 0;font-size:13px;line-height:20px}.acf-field-setting-fc_layout.-hover .acf-fl-actions,.acf-field-setting-fc_layout:hover .acf-fl-actions{visibility:visible}.acf-field-object-clone[data-display=seamless] .acf-field-setting-conditional_logic,.acf-field-object-clone[data-display=seamless] .acf-field-setting-instructions,.acf-field-object-clone[data-display=seamless] .acf-field-setting-layout,.acf-field-object-clone[data-display=seamless] .acf-field-setting-wrapper{display:none}
\ No newline at end of file
diff --git a/assets/build/css/pro/acf-pro-input.css b/assets/build/css/pro/acf-pro-input.css
new file mode 100644
index 0000000..5b5893d
--- /dev/null
+++ b/assets/build/css/pro/acf-pro-input.css
@@ -0,0 +1,683 @@
+/*--------------------------------------------------------------------------------------------
+*
+* Vars
+*
+*--------------------------------------------------------------------------------------------*/
+/* colors */
+/* acf-field */
+/* responsive */
+/*--------------------------------------------------------------------------------------------
+*
+* Mixins
+*
+*--------------------------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------------------------
+*
+* Repeater
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-repeater {
+ /* table */
+ /* row handle (add/remove) */
+ /* add in spacer to th (force correct width) */
+ /* row */
+ /* sortable */
+ /* layouts */
+ /*
+ &.-row > table > tbody > tr:before,
+ &.-block > table > tbody > tr:before {
+ content: "";
+ display: table-row;
+ height: 2px;
+ background: #f00;
+ }
+ */
+ /* empty */
+ /* collapsed */
+ /* collapsed (block layout) */
+ /* collapsed (table layout) */
+}
+.acf-repeater > table {
+ margin: 0 0 8px;
+ background: #F9F9F9;
+}
+.acf-repeater .acf-row-handle {
+ width: 16px;
+ text-align: center !important;
+ vertical-align: middle !important;
+ position: relative;
+ /* icons */
+ /* .order */
+ /* remove */
+}
+.acf-repeater .acf-row-handle .acf-icon {
+ display: none;
+ position: absolute;
+ top: 0;
+ margin: -8px 0 0 -2px;
+ /* minus icon */
+}
+.acf-repeater .acf-row-handle .acf-icon.-minus {
+ top: 50%;
+ /* ie fix */
+}
+body.browser-msie .acf-repeater .acf-row-handle .acf-icon.-minus {
+ top: 25px;
+}
+.acf-repeater .acf-row-handle.order {
+ background: #f4f4f4;
+ cursor: move;
+ color: #aaa;
+ text-shadow: #fff 0 1px 0;
+}
+.acf-repeater .acf-row-handle.order:hover {
+ color: #666;
+}
+.acf-repeater .acf-row-handle.order + td {
+ border-left-color: #DFDFDF;
+}
+.acf-repeater .acf-row-handle.remove {
+ background: #F9F9F9;
+ border-left-color: #DFDFDF;
+}
+.acf-repeater th.acf-row-handle:before {
+ content: "";
+ width: 16px;
+ display: block;
+ height: 1px;
+}
+.acf-repeater .acf-row {
+ /* hide clone */
+ /* hover */
+}
+.acf-repeater .acf-row.acf-clone {
+ display: none !important;
+}
+.acf-repeater .acf-row:hover, .acf-repeater .acf-row.-hover {
+ /* icons */
+}
+.acf-repeater .acf-row:hover > .acf-row-handle .acf-icon, .acf-repeater .acf-row.-hover > .acf-row-handle .acf-icon {
+ display: block;
+}
+.acf-repeater .acf-row:hover > .acf-row-handle .acf-icon.show-on-shift, .acf-repeater .acf-row.-hover > .acf-row-handle .acf-icon.show-on-shift {
+ display: none;
+}
+body.acf-keydown-shift .acf-repeater .acf-row:hover > .acf-row-handle .acf-icon.show-on-shift, body.acf-keydown-shift .acf-repeater .acf-row.-hover > .acf-row-handle .acf-icon.show-on-shift {
+ display: block;
+}
+body.acf-keydown-shift .acf-repeater .acf-row:hover > .acf-row-handle .acf-icon.hide-on-shift, body.acf-keydown-shift .acf-repeater .acf-row.-hover > .acf-row-handle .acf-icon.hide-on-shift {
+ display: none;
+}
+.acf-repeater > table > tbody > tr.ui-sortable-helper {
+ box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
+}
+.acf-repeater > table > tbody > tr.ui-sortable-placeholder {
+ visibility: visible !important;
+}
+.acf-repeater > table > tbody > tr.ui-sortable-placeholder td {
+ background: #F9F9F9;
+}
+.acf-repeater.-row > table > tbody > tr > td, .acf-repeater.-block > table > tbody > tr > td {
+ border-top-color: #E1E1E1;
+}
+.acf-repeater.-empty > table > thead > tr > th {
+ border-bottom: 0 none;
+}
+.acf-repeater.-empty.-row > table, .acf-repeater.-empty.-block > table {
+ display: none;
+}
+.acf-repeater .acf-row.-collapsed > .acf-field {
+ display: none !important;
+}
+.acf-repeater .acf-row.-collapsed > td.acf-field.-collapsed-target {
+ display: table-cell !important;
+}
+.acf-repeater .acf-row.-collapsed > .acf-fields > * {
+ display: none !important;
+}
+.acf-repeater .acf-row.-collapsed > .acf-fields > .acf-field.-collapsed-target {
+ display: block !important;
+}
+.acf-repeater .acf-row.-collapsed > .acf-fields > .acf-field.-collapsed-target[data-width] {
+ float: none !important;
+ width: auto !important;
+}
+.acf-repeater.-table .acf-row.-collapsed .acf-field.-collapsed-target {
+ border-left-color: #dfdfdf;
+}
+.acf-repeater.-max .acf-icon[data-event=add-row] {
+ display: none !important;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Flexible Content
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-flexible-content {
+ position: relative;
+}
+.acf-flexible-content > .clones {
+ display: none;
+}
+.acf-flexible-content > .values {
+ margin: 0 0 8px;
+}
+.acf-flexible-content > .values > .ui-sortable-placeholder {
+ visibility: visible !important;
+ border: 1px dashed #b4b9be;
+ box-shadow: none;
+ background: transparent;
+}
+.acf-flexible-content .layout {
+ position: relative;
+ margin: 20px 0 0;
+ background: #fff;
+ border: 1px solid #ccd0d4;
+}
+.acf-flexible-content .layout:first-child {
+ margin-top: 0;
+}
+.acf-flexible-content .layout .acf-fc-layout-handle {
+ display: block;
+ position: relative;
+ padding: 8px 10px;
+ cursor: move;
+ border-bottom: #ccd0d4 solid 1px;
+ color: #444;
+ font-size: 14px;
+ line-height: 1.4em;
+}
+.acf-flexible-content .layout .acf-fc-layout-order {
+ display: block;
+ width: 20px;
+ height: 20px;
+ border-radius: 10px;
+ display: inline-block;
+ text-align: center;
+ line-height: 20px;
+ margin: 0 2px 0 0;
+ background: #F1F1F1;
+ font-size: 12px;
+ color: #444;
+}
+html[dir=rtl] .acf-flexible-content .layout .acf-fc-layout-order {
+ float: right;
+ margin-right: 0;
+ margin-left: 5px;
+}
+.acf-flexible-content .layout .acf-fc-layout-controls {
+ position: absolute;
+ top: 8px;
+ right: 8px;
+}
+.acf-flexible-content .layout .acf-fc-layout-controls .acf-icon {
+ display: block;
+ float: left;
+ margin: 0 0 0 5px;
+}
+.acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-plus, .acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-minus, .acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-duplicate {
+ visibility: hidden;
+}
+html[dir=rtl] .acf-flexible-content .layout .acf-fc-layout-controls {
+ right: auto;
+ left: 9px;
+}
+.acf-flexible-content .layout.is-selected {
+ border-color: #7e8993;
+}
+.acf-flexible-content .layout.is-selected .acf-fc-layout-handle {
+ border-color: #7e8993;
+}
+.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-plus, .acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-minus, .acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-duplicate, .acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-plus, .acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-minus, .acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-duplicate {
+ visibility: visible;
+}
+.acf-flexible-content .layout.-collapsed > .acf-fc-layout-handle {
+ border-bottom-width: 0;
+}
+.acf-flexible-content .layout.-collapsed > .acf-fields,
+.acf-flexible-content .layout.-collapsed > .acf-table {
+ display: none;
+}
+.acf-flexible-content .layout > .acf-table {
+ border: 0 none;
+ box-shadow: none;
+}
+.acf-flexible-content .layout > .acf-table > tbody > tr {
+ background: #fff;
+}
+.acf-flexible-content .layout > .acf-table > thead > tr > th {
+ background: #F9F9F9;
+}
+.acf-flexible-content .no-value-message {
+ padding: 19px;
+ border: #ccc dashed 2px;
+ text-align: center;
+ display: none;
+}
+.acf-flexible-content.-empty > .no-value-message {
+ display: block;
+}
+
+.acf-fc-popup {
+ padding: 5px 0;
+ z-index: 900001;
+ min-width: 135px;
+}
+.acf-fc-popup ul, .acf-fc-popup li {
+ list-style: none;
+ display: block;
+ margin: 0;
+ padding: 0;
+}
+.acf-fc-popup li {
+ position: relative;
+ float: none;
+ white-space: nowrap;
+}
+.acf-fc-popup .badge {
+ display: inline-block;
+ border-radius: 8px;
+ font-size: 9px;
+ line-height: 15px;
+ padding: 0 5px;
+ background: #d54e21;
+ text-align: center;
+ color: #fff;
+ vertical-align: top;
+ margin: 0 0 0 5px;
+}
+.acf-fc-popup a {
+ color: #eee;
+ padding: 5px 10px;
+ display: block;
+ text-decoration: none;
+ position: relative;
+}
+.acf-fc-popup a:hover {
+ background: #0073aa;
+ color: #fff;
+}
+.acf-fc-popup a.disabled {
+ color: #888;
+ background: transparent;
+}
+
+/*---------------------------------------------------------------------------------------------
+*
+* Galery
+*
+*---------------------------------------------------------------------------------------------*/
+.acf-gallery {
+ border: #ccd0d4 solid 1px;
+ height: 400px;
+ position: relative;
+ /* main */
+ /* attachments */
+ /* attachment */
+ /* toolbar */
+ /* sidebar */
+ /* side info */
+ /* side data */
+ /* column widths */
+ /* resizable */
+}
+.acf-gallery .acf-gallery-main {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background: #fff;
+ z-index: 2;
+}
+.acf-gallery .acf-gallery-attachments {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 48px;
+ left: 0;
+ padding: 5px;
+ overflow: auto;
+ overflow-x: hidden;
+}
+.acf-gallery .acf-gallery-attachment {
+ width: 25%;
+ float: left;
+ cursor: pointer;
+ position: relative;
+ /* hover */
+ /* sortable */
+ /* active */
+ /* icon */
+ /* rtl */
+}
+.acf-gallery .acf-gallery-attachment .margin {
+ margin: 5px;
+ border: #d5d9dd solid 1px;
+ position: relative;
+ overflow: hidden;
+ background: #eee;
+}
+.acf-gallery .acf-gallery-attachment .margin:before {
+ content: "";
+ display: block;
+ padding-top: 100%;
+}
+.acf-gallery .acf-gallery-attachment .thumbnail {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ transform: translate(50%, 50%);
+}
+html[dir=rtl] .acf-gallery .acf-gallery-attachment .thumbnail {
+ transform: translate(-50%, 50%);
+}
+.acf-gallery .acf-gallery-attachment .thumbnail img {
+ display: block;
+ height: auto;
+ max-height: 100%;
+ width: auto;
+ transform: translate(-50%, -50%);
+}
+html[dir=rtl] .acf-gallery .acf-gallery-attachment .thumbnail img {
+ transform: translate(50%, -50%);
+}
+.acf-gallery .acf-gallery-attachment .filename {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ padding: 5%;
+ background: #F4F4F4;
+ background: rgba(255, 255, 255, 0.8);
+ border-top: #DFDFDF solid 1px;
+ font-weight: bold;
+ text-align: center;
+ word-wrap: break-word;
+ max-height: 90%;
+ overflow: hidden;
+}
+.acf-gallery .acf-gallery-attachment .actions {
+ position: absolute;
+ top: 0;
+ right: 0;
+ display: none;
+}
+.acf-gallery .acf-gallery-attachment:hover .actions {
+ display: block;
+}
+.acf-gallery .acf-gallery-attachment.ui-sortable-helper .margin {
+ border: none;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
+}
+.acf-gallery .acf-gallery-attachment.ui-sortable-placeholder .margin {
+ background: #F1F1F1;
+ border: none;
+}
+.acf-gallery .acf-gallery-attachment.ui-sortable-placeholder .margin * {
+ display: none !important;
+}
+.acf-gallery .acf-gallery-attachment.active .margin {
+ box-shadow: 0 0 0 1px #FFFFFF, 0 0 0 5px #0073aa;
+}
+.acf-gallery .acf-gallery-attachment.-icon .thumbnail img {
+ transform: translate(-50%, -70%);
+}
+html[dir=rtl] .acf-gallery .acf-gallery-attachment {
+ float: right;
+}
+.acf-gallery.sidebar-open {
+ /* hide attachment actions when sidebar is open */
+ /* allow sidebar to move over main for small widths (widget edit box) */
+}
+.acf-gallery.sidebar-open .acf-gallery-attachment .actions {
+ display: none;
+}
+.acf-gallery.sidebar-open .acf-gallery-side {
+ z-index: 2;
+}
+.acf-gallery .acf-gallery-toolbar {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ padding: 10px;
+ border-top: #d5d9dd solid 1px;
+ background: #fff;
+ min-height: 28px;
+}
+.acf-gallery .acf-gallery-toolbar .acf-hl li {
+ line-height: 24px;
+}
+.acf-gallery .acf-gallery-toolbar .bulk-actions-select {
+ width: auto;
+ margin: 0 1px 0 0;
+}
+.acf-gallery .acf-gallery-side {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ width: 0;
+ background: #F9F9F9;
+ border-left: #ccd0d4 solid 1px;
+ z-index: 1;
+ overflow: hidden;
+}
+.acf-gallery .acf-gallery-side .acf-gallery-side-inner {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ width: 349px;
+}
+.acf-gallery .acf-gallery-side-info {
+ position: relative;
+ width: 100%;
+ padding: 10px;
+ margin: -10px 0 15px -10px;
+ background: #F1F1F1;
+ border-bottom: #DFDFDF solid 1px;
+}
+.acf-gallery .acf-gallery-side-info:after {
+ display: block;
+ clear: both;
+ content: "";
+}
+html[dir=rtl] .acf-gallery .acf-gallery-side-info {
+ margin-left: 0;
+ margin-right: -10px;
+}
+.acf-gallery .acf-gallery-side-info img {
+ float: left;
+ width: auto;
+ max-width: 65px;
+ max-height: 65px;
+ margin: 0 10px 1px 0;
+ background: #FFFFFF;
+ padding: 3px;
+ border: #ccd0d4 solid 1px;
+ border-radius: 1px;
+ /* rtl */
+}
+html[dir=rtl] .acf-gallery .acf-gallery-side-info img {
+ float: right;
+ margin: 0 0 0 10px;
+}
+.acf-gallery .acf-gallery-side-info p {
+ font-size: 13px;
+ line-height: 15px;
+ margin: 3px 0;
+ word-break: break-all;
+ color: #666;
+}
+.acf-gallery .acf-gallery-side-info p strong {
+ color: #000;
+}
+.acf-gallery .acf-gallery-side-info a {
+ text-decoration: none;
+}
+.acf-gallery .acf-gallery-side-info a.acf-gallery-edit {
+ color: #21759b;
+}
+.acf-gallery .acf-gallery-side-info a.acf-gallery-remove {
+ color: #bc0b0b;
+}
+.acf-gallery .acf-gallery-side-info a:hover {
+ text-decoration: underline;
+}
+.acf-gallery .acf-gallery-side-data {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 48px;
+ left: 0;
+ overflow: auto;
+ overflow-x: inherit;
+ padding: 10px;
+}
+.acf-gallery .acf-gallery-side-data .acf-label,
+.acf-gallery .acf-gallery-side-data th.label {
+ color: #666666;
+ font-size: 12px;
+ line-height: 25px;
+ padding: 0 4px 8px 0 !important;
+ width: auto !important;
+ vertical-align: top;
+}
+html[dir=rtl] .acf-gallery .acf-gallery-side-data .acf-label,
+html[dir=rtl] .acf-gallery .acf-gallery-side-data th.label {
+ padding: 0 0 8px 4px !important;
+}
+.acf-gallery .acf-gallery-side-data .acf-label label,
+.acf-gallery .acf-gallery-side-data th.label label {
+ font-weight: normal;
+}
+.acf-gallery .acf-gallery-side-data .acf-input,
+.acf-gallery .acf-gallery-side-data td.field {
+ padding: 0 0 8px !important;
+}
+.acf-gallery .acf-gallery-side-data textarea {
+ min-height: 0;
+ height: 60px;
+}
+.acf-gallery .acf-gallery-side-data p.help {
+ font-size: 12px;
+}
+.acf-gallery .acf-gallery-side-data p.help:hover {
+ font-weight: normal;
+}
+.acf-gallery[data-columns="1"] .acf-gallery-attachment {
+ width: 100%;
+}
+.acf-gallery[data-columns="2"] .acf-gallery-attachment {
+ width: 50%;
+}
+.acf-gallery[data-columns="3"] .acf-gallery-attachment {
+ width: 33.333%;
+}
+.acf-gallery[data-columns="4"] .acf-gallery-attachment {
+ width: 25%;
+}
+.acf-gallery[data-columns="5"] .acf-gallery-attachment {
+ width: 20%;
+}
+.acf-gallery[data-columns="6"] .acf-gallery-attachment {
+ width: 16.666%;
+}
+.acf-gallery[data-columns="7"] .acf-gallery-attachment {
+ width: 14.285%;
+}
+.acf-gallery[data-columns="8"] .acf-gallery-attachment {
+ width: 12.5%;
+}
+.acf-gallery .ui-resizable-handle {
+ display: block;
+ position: absolute;
+}
+.acf-gallery .ui-resizable-s {
+ bottom: -5px;
+ cursor: ns-resize;
+ height: 7px;
+ left: 0;
+ width: 100%;
+}
+
+/* media modal selected */
+.acf-media-modal .attachment.acf-selected {
+ box-shadow: 0 0 0 3px #fff inset, 0 0 0 7px #0073aa inset !important;
+}
+.acf-media-modal .attachment.acf-selected .check {
+ display: none !important;
+}
+.acf-media-modal .attachment.acf-selected .thumbnail {
+ opacity: 0.25 !important;
+}
+.acf-media-modal .attachment.acf-selected .attachment-preview:before {
+ background: rgba(0, 0, 0, 0.15);
+ z-index: 1;
+ position: relative;
+}
+
+/*--------------------------------------------------------------------------------------------
+*
+* ACF Blocks
+*
+*--------------------------------------------------------------------------------------------*/
+.acf-block-component .components-placeholder {
+ margin: 0;
+}
+
+.acf-block-component .acf-block-fields {
+ background: #fff;
+ text-align: left;
+ font-size: 13px;
+ line-height: 1.4em;
+ color: #444;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+}
+html[dir=rtl] .acf-block-component .acf-block-fields {
+ text-align: right;
+}
+.acf-block-component .acf-block-fields p {
+ font-size: 13px;
+ line-height: 1.5;
+}
+
+.acf-block-body .acf-block-fields {
+ border: #adb2ad solid 1px;
+}
+.acf-block-body .acf-block-fields .acf-tab-wrap .acf-tab-group {
+ margin-left: 0;
+ padding: 16px 20px 0;
+}
+.acf-block-body .acf-fields > .acf-field {
+ padding: 16px 20px;
+}
+.acf-block-body .acf-fields > .acf-field.acf-accordion {
+ border-color: #adb2ad;
+}
+.acf-block-body .acf-fields > .acf-field.acf-accordion .acf-accordion-title {
+ padding: 16px 20px;
+}
+.acf-block-body .acf-block-preview {
+ min-height: 10px;
+}
+
+.acf-block-panel .acf-block-fields {
+ border-top: #e2e4e7 solid 1px;
+ min-height: 1px;
+}
+.acf-block-panel .acf-block-fields:empty {
+ border-top: none;
+}
+.acf-block-panel .acf-block-fields .acf-tab-wrap {
+ background: transparent;
+}
+
+.components-panel__body .acf-block-panel {
+ margin: 16px -16px -16px;
+}
\ No newline at end of file
diff --git a/assets/build/css/pro/acf-pro-input.min.css b/assets/build/css/pro/acf-pro-input.min.css
new file mode 100644
index 0000000..fdedb20
--- /dev/null
+++ b/assets/build/css/pro/acf-pro-input.min.css
@@ -0,0 +1 @@
+.acf-repeater>table{margin:0 0 8px;background:#f9f9f9}.acf-repeater .acf-row-handle{width:16px;text-align:center!important;vertical-align:middle!important;position:relative}.acf-repeater .acf-row-handle .acf-icon{display:none;position:absolute;top:0;margin:-8px 0 0 -2px}.acf-repeater .acf-row-handle .acf-icon.-minus{top:50%}body.browser-msie .acf-repeater .acf-row-handle .acf-icon.-minus{top:25px}.acf-repeater .acf-row-handle.order{background:#f4f4f4;cursor:move;color:#aaa;text-shadow:#fff 0 1px 0}.acf-repeater .acf-row-handle.order:hover{color:#666}.acf-repeater .acf-row-handle.order+td{border-left-color:#dfdfdf}.acf-repeater .acf-row-handle.remove{background:#f9f9f9;border-left-color:#dfdfdf}.acf-repeater th.acf-row-handle:before{content:"";width:16px;display:block;height:1px}.acf-repeater .acf-row.acf-clone{display:none!important}.acf-repeater .acf-row.-hover>.acf-row-handle .acf-icon,.acf-repeater .acf-row:hover>.acf-row-handle .acf-icon{display:block}.acf-repeater .acf-row.-hover>.acf-row-handle .acf-icon.show-on-shift,.acf-repeater .acf-row:hover>.acf-row-handle .acf-icon.show-on-shift{display:none}body.acf-keydown-shift .acf-repeater .acf-row.-hover>.acf-row-handle .acf-icon.show-on-shift,body.acf-keydown-shift .acf-repeater .acf-row:hover>.acf-row-handle .acf-icon.show-on-shift{display:block}body.acf-keydown-shift .acf-repeater .acf-row.-hover>.acf-row-handle .acf-icon.hide-on-shift,body.acf-keydown-shift .acf-repeater .acf-row:hover>.acf-row-handle .acf-icon.hide-on-shift{display:none}.acf-repeater>table>tbody>tr.ui-sortable-helper{box-shadow:0 1px 5px rgba(0,0,0,.2)}.acf-repeater>table>tbody>tr.ui-sortable-placeholder{visibility:visible!important}.acf-repeater>table>tbody>tr.ui-sortable-placeholder td{background:#f9f9f9}.acf-repeater.-block>table>tbody>tr>td,.acf-repeater.-row>table>tbody>tr>td{border-top-color:#e1e1e1}.acf-repeater.-empty>table>thead>tr>th{border-bottom:0 none}.acf-repeater.-empty.-block>table,.acf-repeater.-empty.-row>table{display:none}.acf-repeater .acf-row.-collapsed>.acf-field{display:none!important}.acf-repeater .acf-row.-collapsed>td.acf-field.-collapsed-target{display:table-cell!important}.acf-repeater .acf-row.-collapsed>.acf-fields>*{display:none!important}.acf-repeater .acf-row.-collapsed>.acf-fields>.acf-field.-collapsed-target{display:block!important}.acf-repeater .acf-row.-collapsed>.acf-fields>.acf-field.-collapsed-target[data-width]{float:none!important;width:auto!important}.acf-repeater.-table .acf-row.-collapsed .acf-field.-collapsed-target{border-left-color:#dfdfdf}.acf-repeater.-max .acf-icon[data-event=add-row]{display:none!important}.acf-flexible-content{position:relative}.acf-flexible-content>.clones{display:none}.acf-flexible-content>.values{margin:0 0 8px}.acf-flexible-content>.values>.ui-sortable-placeholder{visibility:visible!important;border:1px dashed #b4b9be;box-shadow:none;background:0 0}.acf-flexible-content .layout{position:relative;margin:20px 0 0;background:#fff;border:1px solid #ccd0d4}.acf-flexible-content .layout:first-child{margin-top:0}.acf-flexible-content .layout .acf-fc-layout-handle{display:block;position:relative;padding:8px 10px;cursor:move;border-bottom:#ccd0d4 solid 1px;color:#444;font-size:14px;line-height:1.4em}.acf-flexible-content .layout .acf-fc-layout-order{display:block;width:20px;height:20px;border-radius:10px;display:inline-block;text-align:center;line-height:20px;margin:0 2px 0 0;background:#f1f1f1;font-size:12px;color:#444}html[dir=rtl] .acf-flexible-content .layout .acf-fc-layout-order{float:right;margin-right:0;margin-left:5px}.acf-flexible-content .layout .acf-fc-layout-controls{position:absolute;top:8px;right:8px}.acf-flexible-content .layout .acf-fc-layout-controls .acf-icon{display:block;float:left;margin:0 0 0 5px}.acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-plus{visibility:hidden}html[dir=rtl] .acf-flexible-content .layout .acf-fc-layout-controls{right:auto;left:9px}.acf-flexible-content .layout.is-selected{border-color:#7e8993}.acf-flexible-content .layout.is-selected .acf-fc-layout-handle{border-color:#7e8993}.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-plus,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-plus{visibility:visible}.acf-flexible-content .layout.-collapsed>.acf-fc-layout-handle{border-bottom-width:0}.acf-flexible-content .layout.-collapsed>.acf-fields,.acf-flexible-content .layout.-collapsed>.acf-table{display:none}.acf-flexible-content .layout>.acf-table{border:0 none;box-shadow:none}.acf-flexible-content .layout>.acf-table>tbody>tr{background:#fff}.acf-flexible-content .layout>.acf-table>thead>tr>th{background:#f9f9f9}.acf-flexible-content .no-value-message{padding:19px;border:#ccc dashed 2px;text-align:center;display:none}.acf-flexible-content.-empty>.no-value-message{display:block}.acf-fc-popup{padding:5px 0;z-index:900001;min-width:135px}.acf-fc-popup li,.acf-fc-popup ul{list-style:none;display:block;margin:0;padding:0}.acf-fc-popup li{position:relative;float:none;white-space:nowrap}.acf-fc-popup .badge{display:inline-block;border-radius:8px;font-size:9px;line-height:15px;padding:0 5px;background:#d54e21;text-align:center;color:#fff;vertical-align:top;margin:0 0 0 5px}.acf-fc-popup a{color:#eee;padding:5px 10px;display:block;text-decoration:none;position:relative}.acf-fc-popup a:hover{background:#0073aa;color:#fff}.acf-fc-popup a.disabled{color:#888;background:0 0}.acf-gallery{border:#ccd0d4 solid 1px;height:400px;position:relative}.acf-gallery .acf-gallery-main{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:2}.acf-gallery .acf-gallery-attachments{position:absolute;top:0;right:0;bottom:48px;left:0;padding:5px;overflow:auto;overflow-x:hidden}.acf-gallery .acf-gallery-attachment{width:25%;float:left;cursor:pointer;position:relative}.acf-gallery .acf-gallery-attachment .margin{margin:5px;border:#d5d9dd solid 1px;position:relative;overflow:hidden;background:#eee}.acf-gallery .acf-gallery-attachment .margin:before{content:"";display:block;padding-top:100%}.acf-gallery .acf-gallery-attachment .thumbnail{position:absolute;top:0;left:0;width:100%;height:100%;transform:translate(50%,50%)}html[dir=rtl] .acf-gallery .acf-gallery-attachment .thumbnail{transform:translate(-50%,50%)}.acf-gallery .acf-gallery-attachment .thumbnail img{display:block;height:auto;max-height:100%;width:auto;transform:translate(-50%,-50%)}html[dir=rtl] .acf-gallery .acf-gallery-attachment .thumbnail img{transform:translate(50%,-50%)}.acf-gallery .acf-gallery-attachment .filename{position:absolute;bottom:0;left:0;right:0;padding:5%;background:#f4f4f4;background:rgba(255,255,255,.8);border-top:#dfdfdf solid 1px;font-weight:700;text-align:center;word-wrap:break-word;max-height:90%;overflow:hidden}.acf-gallery .acf-gallery-attachment .actions{position:absolute;top:0;right:0;display:none}.acf-gallery .acf-gallery-attachment:hover .actions{display:block}.acf-gallery .acf-gallery-attachment.ui-sortable-helper .margin{border:none;box-shadow:0 1px 3px rgba(0,0,0,.3)}.acf-gallery .acf-gallery-attachment.ui-sortable-placeholder .margin{background:#f1f1f1;border:none}.acf-gallery .acf-gallery-attachment.ui-sortable-placeholder .margin *{display:none!important}.acf-gallery .acf-gallery-attachment.active .margin{box-shadow:0 0 0 1px #fff,0 0 0 5px #0073aa}.acf-gallery .acf-gallery-attachment.-icon .thumbnail img{transform:translate(-50%,-70%)}html[dir=rtl] .acf-gallery .acf-gallery-attachment{float:right}.acf-gallery.sidebar-open .acf-gallery-attachment .actions{display:none}.acf-gallery.sidebar-open .acf-gallery-side{z-index:2}.acf-gallery .acf-gallery-toolbar{position:absolute;right:0;bottom:0;left:0;padding:10px;border-top:#d5d9dd solid 1px;background:#fff;min-height:28px}.acf-gallery .acf-gallery-toolbar .acf-hl li{line-height:24px}.acf-gallery .acf-gallery-toolbar .bulk-actions-select{width:auto;margin:0 1px 0 0}.acf-gallery .acf-gallery-side{position:absolute;top:0;right:0;bottom:0;width:0;background:#f9f9f9;border-left:#ccd0d4 solid 1px;z-index:1;overflow:hidden}.acf-gallery .acf-gallery-side .acf-gallery-side-inner{position:absolute;top:0;left:0;bottom:0;width:349px}.acf-gallery .acf-gallery-side-info{position:relative;width:100%;padding:10px;margin:-10px 0 15px -10px;background:#f1f1f1;border-bottom:#dfdfdf solid 1px}.acf-gallery .acf-gallery-side-info:after{display:block;clear:both;content:""}html[dir=rtl] .acf-gallery .acf-gallery-side-info{margin-left:0;margin-right:-10px}.acf-gallery .acf-gallery-side-info img{float:left;width:auto;max-width:65px;max-height:65px;margin:0 10px 1px 0;background:#fff;padding:3px;border:#ccd0d4 solid 1px;border-radius:1px}html[dir=rtl] .acf-gallery .acf-gallery-side-info img{float:right;margin:0 0 0 10px}.acf-gallery .acf-gallery-side-info p{font-size:13px;line-height:15px;margin:3px 0;word-break:break-all;color:#666}.acf-gallery .acf-gallery-side-info p strong{color:#000}.acf-gallery .acf-gallery-side-info a{text-decoration:none}.acf-gallery .acf-gallery-side-info a.acf-gallery-edit{color:#21759b}.acf-gallery .acf-gallery-side-info a.acf-gallery-remove{color:#bc0b0b}.acf-gallery .acf-gallery-side-info a:hover{text-decoration:underline}.acf-gallery .acf-gallery-side-data{position:absolute;top:0;right:0;bottom:48px;left:0;overflow:auto;overflow-x:inherit;padding:10px}.acf-gallery .acf-gallery-side-data .acf-label,.acf-gallery .acf-gallery-side-data th.label{color:#666;font-size:12px;line-height:25px;padding:0 4px 8px 0!important;width:auto!important;vertical-align:top}html[dir=rtl] .acf-gallery .acf-gallery-side-data .acf-label,html[dir=rtl] .acf-gallery .acf-gallery-side-data th.label{padding:0 0 8px 4px!important}.acf-gallery .acf-gallery-side-data .acf-label label,.acf-gallery .acf-gallery-side-data th.label label{font-weight:400}.acf-gallery .acf-gallery-side-data .acf-input,.acf-gallery .acf-gallery-side-data td.field{padding:0 0 8px!important}.acf-gallery .acf-gallery-side-data textarea{min-height:0;height:60px}.acf-gallery .acf-gallery-side-data p.help{font-size:12px}.acf-gallery .acf-gallery-side-data p.help:hover{font-weight:400}.acf-gallery[data-columns="1"] .acf-gallery-attachment{width:100%}.acf-gallery[data-columns="2"] .acf-gallery-attachment{width:50%}.acf-gallery[data-columns="3"] .acf-gallery-attachment{width:33.333%}.acf-gallery[data-columns="4"] .acf-gallery-attachment{width:25%}.acf-gallery[data-columns="5"] .acf-gallery-attachment{width:20%}.acf-gallery[data-columns="6"] .acf-gallery-attachment{width:16.666%}.acf-gallery[data-columns="7"] .acf-gallery-attachment{width:14.285%}.acf-gallery[data-columns="8"] .acf-gallery-attachment{width:12.5%}.acf-gallery .ui-resizable-handle{display:block;position:absolute}.acf-gallery .ui-resizable-s{bottom:-5px;cursor:ns-resize;height:7px;left:0;width:100%}.acf-media-modal .attachment.acf-selected{box-shadow:0 0 0 3px #fff inset,0 0 0 7px #0073aa inset!important}.acf-media-modal .attachment.acf-selected .check{display:none!important}.acf-media-modal .attachment.acf-selected .thumbnail{opacity:.25!important}.acf-media-modal .attachment.acf-selected .attachment-preview:before{background:rgba(0,0,0,.15);z-index:1;position:relative}.acf-block-component .components-placeholder{margin:0}.acf-block-component .acf-block-fields{background:#fff;text-align:left;font-size:13px;line-height:1.4em;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}html[dir=rtl] .acf-block-component .acf-block-fields{text-align:right}.acf-block-component .acf-block-fields p{font-size:13px;line-height:1.5}.acf-block-body .acf-block-fields{border:#adb2ad solid 1px}.acf-block-body .acf-block-fields .acf-tab-wrap .acf-tab-group{margin-left:0;padding:16px 20px 0}.acf-block-body .acf-fields>.acf-field{padding:16px 20px}.acf-block-body .acf-fields>.acf-field.acf-accordion{border-color:#adb2ad}.acf-block-body .acf-fields>.acf-field.acf-accordion .acf-accordion-title{padding:16px 20px}.acf-block-body .acf-block-preview{min-height:10px}.acf-block-panel .acf-block-fields{border-top:#e2e4e7 solid 1px;min-height:1px}.acf-block-panel .acf-block-fields:empty{border-top:none}.acf-block-panel .acf-block-fields .acf-tab-wrap{background:0 0}.components-panel__body .acf-block-panel{margin:16px -16px -16px}
\ No newline at end of file
diff --git a/assets/build/js/acf-field-group.js b/assets/build/js/acf-field-group.js
new file mode 100644
index 0000000..a29bfdc
--- /dev/null
+++ b/assets/build/js/acf-field-group.js
@@ -0,0 +1,2050 @@
+(function ($, undefined) {
+ /**
+ * fieldGroupManager
+ *
+ * Generic field group functionality
+ *
+ * @date 15/12/17
+ * @since 5.7.0
+ *
+ * @param void
+ * @return void
+ */
+ var fieldGroupManager = new acf.Model({
+ id: 'fieldGroupManager',
+ events: {
+ 'submit #post': 'onSubmit',
+ 'click a[href="#"]': 'onClick',
+ 'click .submitdelete': 'onClickTrash'
+ },
+ filters: {
+ 'find_fields_args': 'filterFindFieldArgs'
+ },
+ onSubmit: function (e, $el) {
+ // vars
+ var $title = $('#titlewrap #title'); // empty
+
+ if (!$title.val()) {
+ // prevent default
+ e.preventDefault(); // unlock form
+
+ acf.unlockForm($el); // alert
+
+ alert(acf.__('Field group title is required')); // focus
+
+ $title.trigger('focus');
+ }
+ },
+ onClick: function (e) {
+ e.preventDefault();
+ },
+ onClickTrash: function (e) {
+ var result = confirm(acf.__('Move to trash. Are you sure?'));
+
+ if (!result) {
+ e.preventDefault();
+ }
+ },
+ filterFindFieldArgs: function (args) {
+ args.visible = true;
+ return args;
+ }
+ });
+ /**
+ * screenOptionsManager
+ *
+ * Screen options functionality
+ *
+ * @date 15/12/17
+ * @since 5.7.0
+ *
+ * @param void
+ * @return void
+ */
+
+ var screenOptionsManager = new acf.Model({
+ id: 'screenOptionsManager',
+ wait: 'prepare',
+ events: {
+ 'change': 'onChange'
+ },
+ initialize: function () {
+ // vars
+ var $div = $('#adv-settings');
+ var $append = $('#acf-append-show-on-screen'); // append
+
+ $div.find('.metabox-prefs').append($append.html());
+ $div.find('.metabox-prefs br').remove(); // clean up
+
+ $append.remove(); // initialize
+
+ this.$el = $('#acf-field-key-hide'); // render
+
+ this.render();
+ },
+ isChecked: function () {
+ return this.$el.prop('checked');
+ },
+ onChange: function (e, $el) {
+ var val = this.isChecked() ? 1 : 0;
+ acf.updateUserSetting('show_field_keys', val);
+ this.render();
+ },
+ render: function () {
+ if (this.isChecked()) {
+ $('#acf-field-group-fields').addClass('show-field-keys');
+ } else {
+ $('#acf-field-group-fields').removeClass('show-field-keys');
+ }
+ }
+ });
+ /**
+ * appendFieldManager
+ *
+ * Appends fields together
+ *
+ * @date 15/12/17
+ * @since 5.7.0
+ *
+ * @param void
+ * @return void
+ */
+
+ var appendFieldManager = new acf.Model({
+ actions: {
+ 'new_field': 'onNewField'
+ },
+ onNewField: function (field) {
+ // bail ealry if not append
+ if (!field.has('append')) return; // vars
+
+ var append = field.get('append');
+ var $sibling = field.$el.siblings('[data-name="' + append + '"]').first(); // bail early if no sibling
+
+ if (!$sibling.length) return; // ul
+
+ var $div = $sibling.children('.acf-input');
+ var $ul = $div.children('ul'); // create ul
+
+ if (!$ul.length) {
+ $div.wrapInner('
');
+ $ul = $div.children('ul');
+ } // li
+
+
+ var html = field.$('.acf-input').html();
+ var $li = $('' + html + ' ');
+ $ul.append($li);
+ $ul.attr('data-cols', $ul.children().length); // clean up
+
+ field.remove();
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ acf.FieldObject = acf.Model.extend({
+ // class used to avoid nested event triggers
+ eventScope: '.acf-field-object',
+ // events
+ events: {
+ 'click .edit-field': 'onClickEdit',
+ 'click .delete-field': 'onClickDelete',
+ 'click .duplicate-field': 'duplicate',
+ 'click .move-field': 'move',
+ 'change .field-type': 'onChangeType',
+ 'change .field-required': 'onChangeRequired',
+ 'blur .field-label': 'onChangeLabel',
+ 'blur .field-name': 'onChangeName',
+ 'change': 'onChange',
+ 'changed': 'onChanged'
+ },
+ // data
+ data: {
+ // Similar to ID, but used for HTML puposes.
+ // It is possbile for a new field to have an ID of 0, but an id of 'field_123' */
+ id: 0,
+ // The field key ('field_123')
+ key: '',
+ // The field type (text, image, etc)
+ type: '' // The $post->ID of this field
+ //ID: 0,
+ // The field's parent
+ //parent: 0,
+ // The menu order
+ //menu_order: 0
+
+ },
+ setup: function ($field) {
+ // set $el
+ this.$el = $field; // inherit $field data (id, key, type)
+
+ this.inherit($field); // load additional props
+ // - this won't trigger 'changed'
+
+ this.prop('ID');
+ this.prop('parent');
+ this.prop('menu_order');
+ },
+ $input: function (name) {
+ return $('#' + this.getInputId() + '-' + name);
+ },
+ $meta: function () {
+ return this.$('.meta:first');
+ },
+ $handle: function () {
+ return this.$('.handle:first');
+ },
+ $settings: function () {
+ return this.$('.settings:first');
+ },
+ $setting: function (name) {
+ return this.$('.acf-field-settings:first > .acf-field-setting-' + name);
+ },
+ getParent: function () {
+ return acf.getFieldObjects({
+ child: this.$el,
+ limit: 1
+ }).pop();
+ },
+ getParents: function () {
+ return acf.getFieldObjects({
+ child: this.$el
+ });
+ },
+ getFields: function () {
+ return acf.getFieldObjects({
+ parent: this.$el
+ });
+ },
+ getInputName: function () {
+ return 'acf_fields[' + this.get('id') + ']';
+ },
+ getInputId: function () {
+ return 'acf_fields-' + this.get('id');
+ },
+ newInput: function (name, value) {
+ // vars
+ var inputId = this.getInputId();
+ var inputName = this.getInputName(); // append name
+
+ if (name) {
+ inputId += '-' + name;
+ inputName += '[' + name + ']';
+ } // create input (avoid HTML + JSON value issues)
+
+
+ var $input = $(' ').attr({
+ id: inputId,
+ name: inputName,
+ value: value
+ });
+ this.$('> .meta').append($input); // return
+
+ return $input;
+ },
+ getProp: function (name) {
+ // check data
+ if (this.has(name)) {
+ return this.get(name);
+ } // get input value
+
+
+ var $input = this.$input(name);
+ var value = $input.length ? $input.val() : null; // set data silently (cache)
+
+ this.set(name, value, true); // return
+
+ return value;
+ },
+ setProp: function (name, value) {
+ // get input
+ var $input = this.$input(name);
+ var prevVal = $input.val(); // create if new
+
+ if (!$input.length) {
+ $input = this.newInput(name, value);
+ } // remove
+
+
+ if (value === null) {
+ $input.remove(); // update
+ } else {
+ $input.val(value);
+ } //console.log('setProp', name, value, this);
+ // set data silently (cache)
+
+
+ if (!this.has(name)) {
+ //console.log('setting silently');
+ this.set(name, value, true); // set data allowing 'change' event to fire
+ } else {
+ //console.log('setting loudly!');
+ this.set(name, value);
+ } // return
+
+
+ return this;
+ },
+ prop: function (name, value) {
+ if (value !== undefined) {
+ return this.setProp(name, value);
+ } else {
+ return this.getProp(name);
+ }
+ },
+ props: function (props) {
+ Object.keys(props).map(function (key) {
+ this.setProp(key, props[key]);
+ }, this);
+ },
+ getLabel: function () {
+ // get label with empty default
+ var label = this.prop('label');
+
+ if (label === '') {
+ label = acf.__('(no label)');
+ } // return
+
+
+ return label;
+ },
+ getName: function () {
+ return this.prop('name');
+ },
+ getType: function () {
+ return this.prop('type');
+ },
+ getTypeLabel: function () {
+ var type = this.prop('type');
+ var types = acf.get('fieldTypes');
+ return types[type] ? types[type].label : type;
+ },
+ getKey: function () {
+ return this.prop('key');
+ },
+ initialize: function () {
+ this.addProFields();
+ },
+ addProFields: function () {
+ // Make sure we're only running this on free version.
+ if (acf.data.fieldTypes.hasOwnProperty('clone')) {
+ return;
+ } // Make sure we haven't appended these fields before.
+
+
+ var $fieldTypeSelect = $('.field-type').not('.acf-free-field-type'); // Append pro fields to "Layout" group.
+
+ var $layoutGroup = $fieldTypeSelect.find('optgroup option[value="group"]').parent();
+ $layoutGroup.append('' + acf.__('Repeater (Pro only)') + ' ' + '' + acf.__('Flexible Content (Pro only)') + ' ' + '' + acf.__('Clone (Pro only)') + ' '); // Add pro fields to "Content" group.
+
+ var $contentGroup = $fieldTypeSelect.find('optgroup option[value="image"]').parent();
+ $contentGroup.append('' + acf.__('Gallery (Pro only)') + ' ');
+ $fieldTypeSelect.addClass('acf-free-field-type');
+ },
+ render: function () {
+ // vars
+ var $handle = this.$('.handle:first');
+ var menu_order = this.prop('menu_order');
+ var label = this.getLabel();
+ var name = this.prop('name');
+ var type = this.getTypeLabel();
+ var key = this.prop('key');
+ var required = this.$input('required').prop('checked'); // update menu order
+
+ $handle.find('.acf-icon').html(parseInt(menu_order) + 1); // update required
+
+ if (required) {
+ label += ' * ';
+ } // update label
+
+
+ $handle.find('.li-field-label strong a').html(label); // update name
+
+ $handle.find('.li-field-name').text(name); // update type
+
+ $handle.find('.li-field-type').text(type); // update key
+
+ $handle.find('.li-field-key').text(key); // action for 3rd party customization
+
+ acf.doAction('render_field_object', this);
+ },
+ refresh: function () {
+ acf.doAction('refresh_field_object', this);
+ },
+ isOpen: function () {
+ return this.$el.hasClass('open');
+ },
+ onClickEdit: function (e) {
+ this.isOpen() ? this.close() : this.open();
+ },
+ open: function () {
+ // vars
+ var $settings = this.$el.children('.settings'); // open
+
+ $settings.slideDown();
+ this.$el.addClass('open'); // action (open)
+
+ acf.doAction('open_field_object', this);
+ this.trigger('openFieldObject'); // action (show)
+
+ acf.doAction('show', $settings);
+ },
+ close: function () {
+ // vars
+ var $settings = this.$el.children('.settings'); // close
+
+ $settings.slideUp();
+ this.$el.removeClass('open'); // action (close)
+
+ acf.doAction('close_field_object', this);
+ this.trigger('closeFieldObject'); // action (hide)
+
+ acf.doAction('hide', $settings);
+ },
+ serialize: function () {
+ return acf.serialize(this.$el, this.getInputName());
+ },
+ save: function (type) {
+ // defaults
+ type = type || 'settings'; // meta, settings
+ // vars
+
+ var save = this.getProp('save'); // bail if already saving settings
+
+ if (save === 'settings') {
+ return;
+ } // prop
+
+
+ this.setProp('save', type); // debug
+
+ this.$el.attr('data-save', type); // action
+
+ acf.doAction('save_field_object', this, type);
+ },
+ submit: function () {
+ // vars
+ var inputName = this.getInputName();
+ var save = this.get('save'); // close
+
+ if (this.isOpen()) {
+ this.close();
+ } // allow all inputs to save
+
+
+ if (save == 'settings') {// do nothing
+ // allow only meta inputs to save
+ } else if (save == 'meta') {
+ this.$('> .settings [name^="' + inputName + '"]').remove(); // prevent all inputs from saving
+ } else {
+ this.$('[name^="' + inputName + '"]').remove();
+ } // action
+
+
+ acf.doAction('submit_field_object', this);
+ },
+ onChange: function (e, $el) {
+ // save settings
+ this.save(); // action for 3rd party customization
+
+ acf.doAction('change_field_object', this);
+ },
+ onChanged: function (e, $el, name, value) {
+ // ignore 'save'
+ if (name == 'save') {
+ return;
+ } // save meta
+
+
+ if (['menu_order', 'parent'].indexOf(name) > -1) {
+ this.save('meta'); // save field
+ } else {
+ this.save();
+ } // render
+
+
+ if (['menu_order', 'label', 'required', 'name', 'type', 'key'].indexOf(name) > -1) {
+ this.render();
+ } // action for 3rd party customization
+
+
+ acf.doAction('change_field_object_' + name, this, value);
+ },
+ onChangeLabel: function (e, $el) {
+ // set
+ var label = $el.val();
+ this.set('label', label); // render name
+
+ if (this.prop('name') == '') {
+ var name = acf.applyFilters('generate_field_object_name', acf.strSanitize(label), this);
+ this.prop('name', name);
+ }
+ },
+ onChangeName: function (e, $el) {
+ // set
+ var name = $el.val();
+ this.set('name', name); // error
+
+ if (name.substr(0, 6) === 'field_') {
+ alert(acf.__('The string "field_" may not be used at the start of a field name'));
+ }
+ },
+ onChangeRequired: function (e, $el) {
+ // set
+ var required = $el.prop('checked') ? 1 : 0;
+ this.set('required', required);
+ },
+ delete: function (args) {
+ // defaults
+ args = acf.parseArgs(args, {
+ animate: true
+ }); // add to remove list
+
+ var id = this.prop('ID');
+
+ if (id) {
+ var $input = $('#_acf_delete_fields');
+ var newVal = $input.val() + '|' + id;
+ $input.val(newVal);
+ } // action
+
+
+ acf.doAction('delete_field_object', this); // animate
+
+ if (args.animate) {
+ this.removeAnimate();
+ } else {
+ this.remove();
+ }
+ },
+ onClickDelete: function (e, $el) {
+ // Bypass confirmation when holding down "shift" key.
+ if (e.shiftKey) {
+ return this.delete();
+ } // add class
+
+
+ this.$el.addClass('-hover'); // add tooltip
+
+ var tooltip = acf.newTooltip({
+ confirmRemove: true,
+ target: $el,
+ context: this,
+ confirm: function () {
+ this.delete();
+ },
+ cancel: function () {
+ this.$el.removeClass('-hover');
+ }
+ });
+ },
+ removeAnimate: function () {
+ // vars
+ var field = this;
+ var $list = this.$el.parent();
+ var $fields = acf.findFieldObjects({
+ sibling: this.$el
+ }); // remove
+
+ acf.remove({
+ target: this.$el,
+ endHeight: $fields.length ? 0 : 50,
+ complete: function () {
+ field.remove();
+ acf.doAction('removed_field_object', field, $list);
+ }
+ }); // action
+
+ acf.doAction('remove_field_object', field, $list);
+ },
+ duplicate: function () {
+ // vars
+ var newKey = acf.uniqid('field_'); // duplicate
+
+ var $newField = acf.duplicate({
+ target: this.$el,
+ search: this.get('id'),
+ replace: newKey
+ }); // set new key
+
+ $newField.attr('data-key', newKey); // get instance
+
+ var newField = acf.getFieldObject($newField); // open / close
+
+ if (this.isOpen()) {
+ this.close();
+ } else {
+ newField.open();
+ } // focus label
+
+
+ var $label = newField.$setting('label input');
+ setTimeout(function () {
+ $label.trigger('focus');
+ }, 251); // update newField label / name
+
+ var label = newField.prop('label');
+ var name = newField.prop('name');
+ var end = name.split('_').pop();
+
+ var copy = acf.__('copy'); // increase suffix "1"
+
+
+ if (acf.isNumeric(end)) {
+ var i = end * 1 + 1;
+ label = label.replace(end, i);
+ name = name.replace(end, i); // increase suffix "(copy1)"
+ } else if (end.indexOf(copy) === 0) {
+ var i = end.replace(copy, '') * 1;
+ i = i ? i + 1 : 2; // replace
+
+ label = label.replace(end, copy + i);
+ name = name.replace(end, copy + i); // add default "(copy)"
+ } else {
+ label += ' (' + copy + ')';
+ name += '_' + copy;
+ }
+
+ newField.prop('ID', 0);
+ newField.prop('label', label);
+ newField.prop('name', name);
+ newField.prop('key', newKey); // action
+
+ acf.doAction('duplicate_field_object', this, newField);
+ acf.doAction('append_field_object', newField);
+ },
+ wipe: function () {
+ // vars
+ var prevId = this.get('id');
+ var prevKey = this.get('key');
+ var newKey = acf.uniqid('field_'); // rename
+
+ acf.rename({
+ target: this.$el,
+ search: prevId,
+ replace: newKey
+ }); // data
+
+ this.set('id', newKey);
+ this.set('prevId', prevId);
+ this.set('prevKey', prevKey); // props
+
+ this.prop('key', newKey);
+ this.prop('ID', 0); // attr
+
+ this.$el.attr('data-key', newKey);
+ this.$el.attr('data-id', newKey); // action
+
+ acf.doAction('wipe_field_object', this);
+ },
+ move: function () {
+ // helper
+ var hasChanged = function (field) {
+ return field.get('save') == 'settings';
+ }; // vars
+
+
+ var changed = hasChanged(this); // has sub fields changed
+
+ if (!changed) {
+ acf.getFieldObjects({
+ parent: this.$el
+ }).map(function (field) {
+ changed = hasChanged(field) || field.changed;
+ });
+ } // bail early if changed
+
+
+ if (changed) {
+ alert(acf.__('This field cannot be moved until its changes have been saved'));
+ return;
+ } // step 1.
+
+
+ var id = this.prop('ID');
+ var field = this;
+ var popup = false;
+
+ var step1 = function () {
+ // popup
+ popup = acf.newPopup({
+ title: acf.__('Move Custom Field'),
+ loading: true,
+ width: '300px'
+ }); // ajax
+
+ var ajaxData = {
+ action: 'acf/field_group/move_field',
+ field_id: id
+ }; // get HTML
+
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'html',
+ success: step2
+ });
+ };
+
+ var step2 = function (html) {
+ // update popup
+ popup.loading(false);
+ popup.content(html); // submit form
+
+ popup.on('submit', 'form', step3);
+ };
+
+ var step3 = function (e, $el) {
+ // prevent
+ e.preventDefault(); // disable
+
+ acf.startButtonLoading(popup.$('.button')); // ajax
+
+ var ajaxData = {
+ action: 'acf/field_group/move_field',
+ field_id: id,
+ field_group_id: popup.$('select').val()
+ }; // get HTML
+
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'html',
+ success: step4
+ });
+ };
+
+ var step4 = function (html) {
+ // update popup
+ popup.content(html); // remove element
+
+ field.removeAnimate();
+ }; // start
+
+
+ step1();
+ },
+ onChangeType: function (e, $el) {
+ // clea previous timout
+ if (this.changeTimeout) {
+ clearTimeout(this.changeTimeout);
+ } // set new timeout
+ // - prevents changing type multiple times whilst user types in newType
+
+
+ this.changeTimeout = this.setTimeout(function () {
+ this.changeType($el.val());
+ }, 300);
+ },
+ changeType: function (newType) {
+ // vars
+ var prevType = this.prop('type');
+ var prevClass = acf.strSlugify('acf-field-object-' + prevType);
+ var newClass = acf.strSlugify('acf-field-object-' + newType); // update props
+
+ this.$el.removeClass(prevClass).addClass(newClass);
+ this.$el.attr('data-type', newType);
+ this.$el.data('type', newType); // abort XHR if this field is already loading AJAX data
+
+ if (this.has('xhr')) {
+ this.get('xhr').abort();
+ } // store settings
+
+
+ var $tbody = this.$('> .settings > table > tbody');
+ var $settings = $tbody.children('[data-setting="' + prevType + '"]');
+ this.set('settings-' + prevType, $settings);
+ $settings.detach(); // show settings
+
+ if (this.has('settings-' + newType)) {
+ var $newSettings = this.get('settings-' + newType);
+ this.$setting('conditional_logic').before($newSettings);
+ this.set('type', newType); //this.refresh();
+
+ return;
+ } // load settings
+
+
+ var $loading = $('
');
+ this.$setting('conditional_logic').before($loading); // ajax
+
+ var ajaxData = {
+ action: 'acf/field_group/render_field_settings',
+ field: this.serialize(),
+ prefix: this.getInputName()
+ }; // ajax
+
+ var xhr = $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'html',
+ context: this,
+ success: function (html) {
+ // bail early if no settings
+ if (!html) return; // append settings
+
+ $loading.after(html); // events
+
+ acf.doAction('append', $tbody);
+ },
+ complete: function () {
+ // also triggered by xhr.abort();
+ $loading.remove();
+ this.set('type', newType); //this.refresh();
+ }
+ }); // set
+
+ this.set('xhr', xhr);
+ },
+ updateParent: function () {
+ // vars
+ var ID = acf.get('post_id'); // check parent
+
+ var parent = this.getParent();
+
+ if (parent) {
+ ID = parseInt(parent.prop('ID')) || parent.prop('key');
+ } // update
+
+
+ this.prop('parent', ID);
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * mid
+ *
+ * Calculates the model ID for a field type
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param string type
+ * @return string
+ */
+ var modelId = function (type) {
+ return acf.strPascalCase(type || '') + 'FieldSetting';
+ };
+ /**
+ * registerFieldType
+ *
+ * description
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.registerFieldSetting = function (model) {
+ var proto = model.prototype;
+ var mid = modelId(proto.type + ' ' + proto.name);
+ this.models[mid] = model;
+ };
+ /**
+ * newField
+ *
+ * description
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.newFieldSetting = function (field) {
+ // vars
+ var type = field.get('setting') || '';
+ var name = field.get('name') || '';
+ var mid = modelId(type + ' ' + name);
+ var model = acf.models[mid] || null; // bail ealry if no setting
+
+ if (model === null) return false; // instantiate
+
+ var setting = new model(field); // return
+
+ return setting;
+ };
+ /**
+ * acf.getFieldSetting
+ *
+ * description
+ *
+ * @date 19/4/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.getFieldSetting = function (field) {
+ // allow jQuery
+ if (field instanceof jQuery) {
+ field = acf.getField(field);
+ } // return
+
+
+ return field.setting;
+ };
+ /**
+ * settingsManager
+ *
+ * description
+ *
+ * @date 6/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ var settingsManager = new acf.Model({
+ actions: {
+ 'new_field': 'onNewField'
+ },
+ onNewField: function (field) {
+ field.setting = acf.newFieldSetting(field);
+ }
+ });
+ /**
+ * acf.FieldSetting
+ *
+ * description
+ *
+ * @date 6/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.FieldSetting = acf.Model.extend({
+ field: false,
+ type: '',
+ name: '',
+ wait: 'ready',
+ eventScope: '.acf-field',
+ events: {
+ 'change': 'render'
+ },
+ setup: function (field) {
+ // vars
+ var $field = field.$el; // set props
+
+ this.$el = $field;
+ this.field = field;
+ this.$fieldObject = $field.closest('.acf-field-object');
+ this.fieldObject = acf.getFieldObject(this.$fieldObject); // inherit data
+
+ $.extend(this.data, field.data);
+ },
+ initialize: function () {
+ this.render();
+ },
+ render: function () {// do nothing
+ }
+ });
+ /*
+ * Date Picker
+ *
+ * This field type requires some extra logic for its settings
+ *
+ * @type function
+ * @date 24/10/13
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ var DisplayFormatFieldSetting = acf.FieldSetting.extend({
+ type: '',
+ name: '',
+ render: function () {
+ var $input = this.$('input[type="radio"]:checked');
+
+ if ($input.val() != 'other') {
+ this.$('input[type="text"]').val($input.val());
+ }
+ }
+ });
+ var DatePickerDisplayFormatFieldSetting = DisplayFormatFieldSetting.extend({
+ type: 'date_picker',
+ name: 'display_format'
+ });
+ var DatePickerReturnFormatFieldSetting = DisplayFormatFieldSetting.extend({
+ type: 'date_picker',
+ name: 'return_format'
+ });
+ acf.registerFieldSetting(DatePickerDisplayFormatFieldSetting);
+ acf.registerFieldSetting(DatePickerReturnFormatFieldSetting);
+ /*
+ * Date Time Picker
+ *
+ * This field type requires some extra logic for its settings
+ *
+ * @type function
+ * @date 24/10/13
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ var DateTimePickerDisplayFormatFieldSetting = DisplayFormatFieldSetting.extend({
+ type: 'date_time_picker',
+ name: 'display_format'
+ });
+ var DateTimePickerReturnFormatFieldSetting = DisplayFormatFieldSetting.extend({
+ type: 'date_time_picker',
+ name: 'return_format'
+ });
+ acf.registerFieldSetting(DateTimePickerDisplayFormatFieldSetting);
+ acf.registerFieldSetting(DateTimePickerReturnFormatFieldSetting);
+ /*
+ * Time Picker
+ *
+ * This field type requires some extra logic for its settings
+ *
+ * @type function
+ * @date 24/10/13
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ var TimePickerDisplayFormatFieldSetting = DisplayFormatFieldSetting.extend({
+ type: 'time_picker',
+ name: 'display_format'
+ });
+ var TimePickerReturnFormatFieldSetting = DisplayFormatFieldSetting.extend({
+ name: 'time_picker',
+ name: 'return_format'
+ });
+ acf.registerFieldSetting(TimePickerDisplayFormatFieldSetting);
+ acf.registerFieldSetting(TimePickerReturnFormatFieldSetting);
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * ConditionalLogicFieldSetting
+ *
+ * description
+ *
+ * @date 3/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+ var ConditionalLogicFieldSetting = acf.FieldSetting.extend({
+ type: '',
+ name: 'conditional_logic',
+ events: {
+ 'change .conditions-toggle': 'onChangeToggle',
+ 'click .add-conditional-group': 'onClickAddGroup',
+ 'focus .condition-rule-field': 'onFocusField',
+ 'change .condition-rule-field': 'onChangeField',
+ 'change .condition-rule-operator': 'onChangeOperator',
+ 'click .add-conditional-rule': 'onClickAdd',
+ 'click .remove-conditional-rule': 'onClickRemove'
+ },
+ $rule: false,
+ scope: function ($rule) {
+ this.$rule = $rule;
+ return this;
+ },
+ ruleData: function (name, value) {
+ return this.$rule.data.apply(this.$rule, arguments);
+ },
+ $input: function (name) {
+ return this.$rule.find('.condition-rule-' + name);
+ },
+ $td: function (name) {
+ return this.$rule.find('td.' + name);
+ },
+ $toggle: function () {
+ return this.$('.conditions-toggle');
+ },
+ $control: function () {
+ return this.$('.rule-groups');
+ },
+ $groups: function () {
+ return this.$('.rule-group');
+ },
+ $rules: function () {
+ return this.$('.rule');
+ },
+ open: function () {
+ var $div = this.$control();
+ $div.show();
+ acf.enable($div);
+ },
+ close: function () {
+ var $div = this.$control();
+ $div.hide();
+ acf.disable($div);
+ },
+ render: function () {
+ // show
+ if (this.$toggle().prop('checked')) {
+ this.renderRules();
+ this.open(); // hide
+ } else {
+ this.close();
+ }
+ },
+ renderRules: function () {
+ // vars
+ var self = this; // loop
+
+ this.$rules().each(function () {
+ self.renderRule($(this));
+ });
+ },
+ renderRule: function ($rule) {
+ this.scope($rule);
+ this.renderField();
+ this.renderOperator();
+ this.renderValue();
+ },
+ renderField: function () {
+ // vars
+ var choices = [];
+ var validFieldTypes = [];
+ var cid = this.fieldObject.cid;
+ var $select = this.$input('field'); // loop
+
+ acf.getFieldObjects().map(function (fieldObject) {
+ // vars
+ var choice = {
+ id: fieldObject.getKey(),
+ text: fieldObject.getLabel()
+ }; // bail early if is self
+
+ if (fieldObject.cid === cid) {
+ choice.text += acf.__('(this field)');
+ choice.disabled = true;
+ } // get selected field conditions
+
+
+ var conditionTypes = acf.getConditionTypes({
+ fieldType: fieldObject.getType()
+ }); // bail early if no types
+
+ if (!conditionTypes.length) {
+ choice.disabled = true;
+ } // calulate indents
+
+
+ var indents = fieldObject.getParents().length;
+ choice.text = '- '.repeat(indents) + choice.text; // append
+
+ choices.push(choice);
+ }); // allow for scenario where only one field exists
+
+ if (!choices.length) {
+ choices.push({
+ id: '',
+ text: acf.__('No toggle fields available')
+ });
+ } // render
+
+
+ acf.renderSelect($select, choices); // set
+
+ this.ruleData('field', $select.val());
+ },
+ renderOperator: function () {
+ // bail early if no field selected
+ if (!this.ruleData('field')) {
+ return;
+ } // vars
+
+
+ var $select = this.$input('operator');
+ var val = $select.val();
+ var choices = []; // set saved value on first render
+ // - this allows the 2nd render to correctly select an option
+
+ if ($select.val() === null) {
+ acf.renderSelect($select, [{
+ id: this.ruleData('operator'),
+ text: ''
+ }]);
+ } // get selected field
+
+
+ var $field = acf.findFieldObject(this.ruleData('field'));
+ var field = acf.getFieldObject($field); // get selected field conditions
+
+ var conditionTypes = acf.getConditionTypes({
+ fieldType: field.getType()
+ }); // html
+
+ conditionTypes.map(function (model) {
+ choices.push({
+ id: model.prototype.operator,
+ text: model.prototype.label
+ });
+ }); // render
+
+ acf.renderSelect($select, choices); // set
+
+ this.ruleData('operator', $select.val());
+ },
+ renderValue: function () {
+ // bail early if no field selected
+ if (!this.ruleData('field') || !this.ruleData('operator')) {
+ return;
+ } // vars
+
+
+ var $select = this.$input('value');
+ var $td = this.$td('value');
+ var val = $select.val(); // get selected field
+
+ var $field = acf.findFieldObject(this.ruleData('field'));
+ var field = acf.getFieldObject($field); // get selected field conditions
+
+ var conditionTypes = acf.getConditionTypes({
+ fieldType: field.getType(),
+ operator: this.ruleData('operator')
+ }); // html
+
+ var conditionType = conditionTypes[0].prototype;
+ var choices = conditionType.choices(field); // create html: array
+
+ if (choices instanceof Array) {
+ var $newSelect = $(' ');
+ acf.renderSelect($newSelect, choices); // create html: string ( )
+ } else {
+ var $newSelect = $(choices);
+ } // append
+
+
+ $select.detach();
+ $td.html($newSelect); // copy attrs
+ // timeout needed to avoid browser bug where "disabled" attribute is not applied
+
+ setTimeout(function () {
+ ['class', 'name', 'id'].map(function (attr) {
+ $newSelect.attr(attr, $select.attr(attr));
+ });
+ }, 0); // select existing value (if not a disabled input)
+
+ if (!$newSelect.prop('disabled')) {
+ acf.val($newSelect, val, true);
+ } // set
+
+
+ this.ruleData('value', $newSelect.val());
+ },
+ onChangeToggle: function () {
+ this.render();
+ },
+ onClickAddGroup: function (e, $el) {
+ this.addGroup();
+ },
+ addGroup: function () {
+ // vars
+ var $group = this.$('.rule-group:last'); // duplicate
+
+ var $group2 = acf.duplicate($group); // update h4
+
+ $group2.find('h4').text(acf.__('or')); // remove all tr's except the first one
+
+ $group2.find('tr').not(':first').remove(); // save field
+
+ this.fieldObject.save();
+ },
+ onFocusField: function (e, $el) {
+ this.renderField();
+ },
+ onChangeField: function (e, $el) {
+ // scope
+ this.scope($el.closest('.rule')); // set data
+
+ this.ruleData('field', $el.val()); // render
+
+ this.renderOperator();
+ this.renderValue();
+ },
+ onChangeOperator: function (e, $el) {
+ // scope
+ this.scope($el.closest('.rule')); // set data
+
+ this.ruleData('operator', $el.val()); // render
+
+ this.renderValue();
+ },
+ onClickAdd: function (e, $el) {
+ // duplciate
+ var $rule = acf.duplicate($el.closest('.rule')); // render
+
+ this.renderRule($rule);
+ },
+ onClickRemove: function (e, $el) {
+ // vars
+ var $rule = $el.closest('.rule'); // save field
+
+ this.fieldObject.save(); // remove group
+
+ if ($rule.siblings('.rule').length == 0) {
+ $rule.closest('.rule-group').remove();
+ } // remove
+
+
+ $rule.remove();
+ }
+ });
+ acf.registerFieldSetting(ConditionalLogicFieldSetting);
+ /**
+ * conditionalLogicHelper
+ *
+ * description
+ *
+ * @date 20/4/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var conditionalLogicHelper = new acf.Model({
+ actions: {
+ 'duplicate_field_objects': 'onDuplicateFieldObjects'
+ },
+ onDuplicateFieldObjects: function (children, newField, prevField) {
+ // vars
+ var data = {};
+ var $selects = $(); // reference change in key
+
+ children.map(function (child) {
+ // store reference of changed key
+ data[child.get('prevKey')] = child.get('key'); // append condition select
+
+ $selects = $selects.add(child.$('.condition-rule-field'));
+ }); // loop
+
+ $selects.each(function () {
+ // vars
+ var $select = $(this);
+ var val = $select.val(); // bail early if val is not a ref key
+
+ if (!val || !data[val]) {
+ return;
+ } // modify selected option
+
+
+ $select.find('option:selected').attr('value', data[val]); // set new val
+
+ $select.val(data[val]);
+ });
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * acf.findFieldObject
+ *
+ * Returns a single fieldObject $el for a given field key
+ *
+ * @date 1/2/18
+ * @since 5.7.0
+ *
+ * @param string key The field key
+ * @return jQuery
+ */
+ acf.findFieldObject = function (key) {
+ return acf.findFieldObjects({
+ key: key,
+ limit: 1
+ });
+ };
+ /**
+ * acf.findFieldObjects
+ *
+ * Returns an array of fieldObject $el for the given args
+ *
+ * @date 1/2/18
+ * @since 5.7.0
+ *
+ * @param object args
+ * @return jQuery
+ */
+
+
+ acf.findFieldObjects = function (args) {
+ // vars
+ args = args || {};
+ var selector = '.acf-field-object';
+ var $fields = false; // args
+
+ args = acf.parseArgs(args, {
+ id: '',
+ key: '',
+ type: '',
+ limit: false,
+ list: null,
+ parent: false,
+ sibling: false,
+ child: false
+ }); // id
+
+ if (args.id) {
+ selector += '[data-id="' + args.id + '"]';
+ } // key
+
+
+ if (args.key) {
+ selector += '[data-key="' + args.key + '"]';
+ } // type
+
+
+ if (args.type) {
+ selector += '[data-type="' + args.type + '"]';
+ } // query
+
+
+ if (args.list) {
+ $fields = args.list.children(selector);
+ } else if (args.parent) {
+ $fields = args.parent.find(selector);
+ } else if (args.sibling) {
+ $fields = args.sibling.siblings(selector);
+ } else if (args.child) {
+ $fields = args.child.parents(selector);
+ } else {
+ $fields = $(selector);
+ } // limit
+
+
+ if (args.limit) {
+ $fields = $fields.slice(0, args.limit);
+ } // return
+
+
+ return $fields;
+ };
+ /**
+ * acf.getFieldObject
+ *
+ * Returns a single fieldObject instance for a given $el|key
+ *
+ * @date 1/2/18
+ * @since 5.7.0
+ *
+ * @param string|jQuery $field The field $el or key
+ * @return jQuery
+ */
+
+
+ acf.getFieldObject = function ($field) {
+ // allow key
+ if (typeof $field === 'string') {
+ $field = acf.findFieldObject($field);
+ } // instantiate
+
+
+ var field = $field.data('acf');
+
+ if (!field) {
+ field = acf.newFieldObject($field);
+ } // return
+
+
+ return field;
+ };
+ /**
+ * acf.getFieldObjects
+ *
+ * Returns an array of fieldObject instances for the given args
+ *
+ * @date 1/2/18
+ * @since 5.7.0
+ *
+ * @param object args
+ * @return array
+ */
+
+
+ acf.getFieldObjects = function (args) {
+ // query
+ var $fields = acf.findFieldObjects(args); // loop
+
+ var fields = [];
+ $fields.each(function () {
+ var field = acf.getFieldObject($(this));
+ fields.push(field);
+ }); // return
+
+ return fields;
+ };
+ /**
+ * acf.newFieldObject
+ *
+ * Initializes and returns a new FieldObject instance
+ *
+ * @date 1/2/18
+ * @since 5.7.0
+ *
+ * @param jQuery $field The field $el
+ * @return object
+ */
+
+
+ acf.newFieldObject = function ($field) {
+ // instantiate
+ var field = new acf.FieldObject($field); // action
+
+ acf.doAction('new_field_object', field); // return
+
+ return field;
+ };
+ /**
+ * actionManager
+ *
+ * description
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ var eventManager = new acf.Model({
+ priority: 5,
+ initialize: function () {
+ // actions
+ var actions = ['prepare', 'ready', 'append', 'remove']; // loop
+
+ actions.map(function (action) {
+ this.addFieldActions(action);
+ }, this);
+ },
+ addFieldActions: function (action) {
+ // vars
+ var pluralAction = action + '_field_objects'; // ready_field_objects
+
+ var singleAction = action + '_field_object'; // ready_field_object
+
+ var singleEvent = action + 'FieldObject'; // readyFieldObject
+ // global action
+
+ var callback = function ($el
+ /*, arg1, arg2, etc*/
+ ) {
+ // vars
+ var fieldObjects = acf.getFieldObjects({
+ parent: $el
+ }); // call plural
+
+ if (fieldObjects.length) {
+ /// get args [$el, arg1]
+ var args = acf.arrayArgs(arguments); // modify args [pluralAction, fields, arg1]
+
+ args.splice(0, 1, pluralAction, fieldObjects);
+ acf.doAction.apply(null, args);
+ }
+ }; // plural action
+
+
+ var pluralCallback = function (fieldObjects
+ /*, arg1, arg2, etc*/
+ ) {
+ /// get args [fields, arg1]
+ var args = acf.arrayArgs(arguments); // modify args [singleAction, fields, arg1]
+
+ args.unshift(singleAction); // loop
+
+ fieldObjects.map(function (fieldObject) {
+ // modify args [singleAction, field, arg1]
+ args[1] = fieldObject;
+ acf.doAction.apply(null, args);
+ });
+ }; // single action
+
+
+ var singleCallback = function (fieldObject
+ /*, arg1, arg2, etc*/
+ ) {
+ /// get args [$field, arg1]
+ var args = acf.arrayArgs(arguments); // modify args [singleAction, $field, arg1]
+
+ args.unshift(singleAction); // action variations (ready_field/type=image)
+
+ var variations = ['type', 'name', 'key'];
+ variations.map(function (variation) {
+ args[0] = singleAction + '/' + variation + '=' + fieldObject.get(variation);
+ acf.doAction.apply(null, args);
+ }); // modify args [arg1]
+
+ args.splice(0, 2); // event
+
+ fieldObject.trigger(singleEvent, args);
+ }; // add actions
+
+
+ acf.addAction(action, callback, 5);
+ acf.addAction(pluralAction, pluralCallback, 5);
+ acf.addAction(singleAction, singleCallback, 5);
+ }
+ });
+ /**
+ * fieldManager
+ *
+ * description
+ *
+ * @date 4/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var fieldManager = new acf.Model({
+ id: 'fieldManager',
+ events: {
+ 'submit #post': 'onSubmit',
+ 'mouseenter .acf-field-list': 'onHoverSortable',
+ 'click .add-field': 'onClickAdd'
+ },
+ actions: {
+ 'removed_field_object': 'onRemovedField',
+ 'sortstop_field_object': 'onReorderField',
+ 'delete_field_object': 'onDeleteField',
+ 'change_field_object_type': 'onChangeFieldType',
+ 'duplicate_field_object': 'onDuplicateField'
+ },
+ onSubmit: function (e, $el) {
+ // vars
+ var fields = acf.getFieldObjects(); // loop
+
+ fields.map(function (field) {
+ field.submit();
+ });
+ },
+ setFieldMenuOrder: function (field) {
+ this.renderFields(field.$el.parent());
+ },
+ onHoverSortable: function (e, $el) {
+ // bail early if already sortable
+ if ($el.hasClass('ui-sortable')) return; // sortable
+
+ $el.sortable({
+ handle: '.acf-sortable-handle',
+ connectWith: '.acf-field-list',
+ start: function (e, ui) {
+ var field = acf.getFieldObject(ui.item);
+ ui.placeholder.height(ui.item.height());
+ acf.doAction('sortstart_field_object', field, $el);
+ },
+ update: function (e, ui) {
+ var field = acf.getFieldObject(ui.item);
+ acf.doAction('sortstop_field_object', field, $el);
+ }
+ });
+ },
+ onRemovedField: function (field, $list) {
+ this.renderFields($list);
+ },
+ onReorderField: function (field, $list) {
+ field.updateParent();
+ this.renderFields($list);
+ },
+ onDeleteField: function (field) {
+ // delete children
+ field.getFields().map(function (child) {
+ child.delete({
+ animate: false
+ });
+ });
+ },
+ onChangeFieldType: function (field) {// this caused sub fields to disapear if changing type back...
+ //this.onDeleteField( field );
+ },
+ onDuplicateField: function (field, newField) {
+ // check for children
+ var children = newField.getFields();
+
+ if (children.length) {
+ // loop
+ children.map(function (child) {
+ // wipe field
+ child.wipe(); // update parent
+
+ child.updateParent();
+ }); // action
+
+ acf.doAction('duplicate_field_objects', children, newField, field);
+ } // set menu order
+
+
+ this.setFieldMenuOrder(newField);
+ },
+ renderFields: function ($list) {
+ // vars
+ var fields = acf.getFieldObjects({
+ list: $list
+ }); // no fields
+
+ if (!fields.length) {
+ $list.addClass('-empty');
+ return;
+ } // has fields
+
+
+ $list.removeClass('-empty'); // prop
+
+ fields.map(function (field, i) {
+ field.prop('menu_order', i);
+ });
+ },
+ onClickAdd: function (e, $el) {
+ var $list = $el.closest('.acf-tfoot').siblings('.acf-field-list');
+ this.addField($list);
+ },
+ addField: function ($list) {
+ // vars
+ var html = $('#tmpl-acf-field').html();
+ var $el = $(html);
+ var prevId = $el.data('id');
+ var newKey = acf.uniqid('field_'); // duplicate
+
+ var $newField = acf.duplicate({
+ target: $el,
+ search: prevId,
+ replace: newKey,
+ append: function ($el, $el2) {
+ $list.append($el2);
+ }
+ }); // get instance
+
+ var newField = acf.getFieldObject($newField); // props
+
+ newField.prop('key', newKey);
+ newField.prop('ID', 0);
+ newField.prop('label', '');
+ newField.prop('name', ''); // attr
+
+ $newField.attr('data-key', newKey);
+ $newField.attr('data-id', newKey); // update parent prop
+
+ newField.updateParent(); // focus label
+
+ var $label = newField.$input('label');
+ setTimeout(function () {
+ $label.trigger('focus');
+ }, 251); // open
+
+ newField.open(); // set menu order
+
+ this.renderFields($list); // action
+
+ acf.doAction('add_field_object', newField);
+ acf.doAction('append_field_object', newField);
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * locationManager
+ *
+ * Field group location rules functionality
+ *
+ * @date 15/12/17
+ * @since 5.7.0
+ *
+ * @param void
+ * @return void
+ */
+ var locationManager = new acf.Model({
+ id: 'locationManager',
+ wait: 'ready',
+ events: {
+ 'click .add-location-rule': 'onClickAddRule',
+ 'click .add-location-group': 'onClickAddGroup',
+ 'click .remove-location-rule': 'onClickRemoveRule',
+ 'change .refresh-location-rule': 'onChangeRemoveRule'
+ },
+ initialize: function () {
+ this.$el = $('#acf-field-group-locations');
+ },
+ onClickAddRule: function (e, $el) {
+ this.addRule($el.closest('tr'));
+ },
+ onClickRemoveRule: function (e, $el) {
+ this.removeRule($el.closest('tr'));
+ },
+ onChangeRemoveRule: function (e, $el) {
+ this.changeRule($el.closest('tr'));
+ },
+ onClickAddGroup: function (e, $el) {
+ this.addGroup();
+ },
+ addRule: function ($tr) {
+ acf.duplicate($tr);
+ },
+ removeRule: function ($tr) {
+ if ($tr.siblings('tr').length == 0) {
+ $tr.closest('.rule-group').remove();
+ } else {
+ $tr.remove();
+ }
+ },
+ changeRule: function ($rule) {
+ // vars
+ var $group = $rule.closest('.rule-group');
+ var prefix = $rule.find('td.param select').attr('name').replace('[param]', ''); // ajaxdata
+
+ var ajaxdata = {};
+ ajaxdata.action = 'acf/field_group/render_location_rule';
+ ajaxdata.rule = acf.serialize($rule, prefix);
+ ajaxdata.rule.id = $rule.data('id');
+ ajaxdata.rule.group = $group.data('id'); // temp disable
+
+ acf.disable($rule.find('td.value')); // ajax
+
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxdata),
+ type: 'post',
+ dataType: 'html',
+ success: function (html) {
+ if (!html) return;
+ $rule.replaceWith(html);
+ }
+ });
+ },
+ addGroup: function () {
+ // vars
+ var $group = this.$('.rule-group:last'); // duplicate
+
+ $group2 = acf.duplicate($group); // update h4
+
+ $group2.find('h4').text(acf.__('or')); // remove all tr's except the first one
+
+ $group2.find('tr').not(':first').remove();
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ var _acf = acf.getCompatibility(acf);
+ /**
+ * fieldGroupCompatibility
+ *
+ * Compatibility layer for extinct acf.field_group
+ *
+ * @date 15/12/17
+ * @since 5.7.0
+ *
+ * @param void
+ * @return void
+ */
+
+
+ _acf.field_group = {
+ save_field: function ($field, type) {
+ type = type !== undefined ? type : 'settings';
+ acf.getFieldObject($field).save(type);
+ },
+ delete_field: function ($field, animate) {
+ animate = animate !== undefined ? animate : true;
+ acf.getFieldObject($field).delete({
+ animate: animate
+ });
+ },
+ update_field_meta: function ($field, name, value) {
+ acf.getFieldObject($field).prop(name, value);
+ },
+ delete_field_meta: function ($field, name) {
+ acf.getFieldObject($field).prop(name, null);
+ }
+ };
+ /**
+ * fieldGroupCompatibility.field_object
+ *
+ * Compatibility layer for extinct acf.field_group.field_object
+ *
+ * @date 15/12/17
+ * @since 5.7.0
+ *
+ * @param void
+ * @return void
+ */
+
+ _acf.field_group.field_object = acf.model.extend({
+ // vars
+ type: '',
+ o: {},
+ $field: null,
+ $settings: null,
+ tag: function (tag) {
+ // vars
+ var type = this.type; // explode, add 'field' and implode
+ // - open => open_field
+ // - change_type => change_field_type
+
+ var tags = tag.split('_');
+ tags.splice(1, 0, 'field');
+ tag = tags.join('_'); // add type
+
+ if (type) {
+ tag += '/type=' + type;
+ } // return
+
+
+ return tag;
+ },
+ selector: function () {
+ // vars
+ var selector = '.acf-field-object';
+ var type = this.type; // add type
+
+ if (type) {
+ selector += '-' + type;
+ selector = acf.str_replace('_', '-', selector);
+ } // return
+
+
+ return selector;
+ },
+ _add_action: function (name, callback) {
+ // vars
+ var model = this; // add action
+
+ acf.add_action(this.tag(name), function ($field) {
+ // focus
+ model.set('$field', $field); // callback
+
+ model[callback].apply(model, arguments);
+ });
+ },
+ _add_filter: function (name, callback) {
+ // vars
+ var model = this; // add action
+
+ acf.add_filter(this.tag(name), function ($field) {
+ // focus
+ model.set('$field', $field); // callback
+
+ model[callback].apply(model, arguments);
+ });
+ },
+ _add_event: function (name, callback) {
+ // vars
+ var model = this;
+ var event = name.substr(0, name.indexOf(' '));
+ var selector = name.substr(name.indexOf(' ') + 1);
+ var context = this.selector(); // add event
+
+ $(document).on(event, context + ' ' + selector, function (e) {
+ // append $el to event object
+ e.$el = $(this);
+ e.$field = e.$el.closest('.acf-field-object'); // focus
+
+ model.set('$field', e.$field); // callback
+
+ model[callback].apply(model, [e]);
+ });
+ },
+ _set_$field: function () {
+ // vars
+ this.o = this.$field.data(); // els
+
+ this.$settings = this.$field.find('> .settings > table > tbody'); // focus
+
+ this.focus();
+ },
+ focus: function () {// do nothing
+ },
+ setting: function (name) {
+ return this.$settings.find('> .acf-field-setting-' + name);
+ }
+ });
+ /*
+ * field
+ *
+ * This model fires actions and filters for registered fields
+ *
+ * @type function
+ * @date 21/02/2014
+ * @since 3.5.1
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ var actionManager = new acf.Model({
+ actions: {
+ 'open_field_object': 'onOpenFieldObject',
+ 'close_field_object': 'onCloseFieldObject',
+ 'add_field_object': 'onAddFieldObject',
+ 'duplicate_field_object': 'onDuplicateFieldObject',
+ 'delete_field_object': 'onDeleteFieldObject',
+ 'change_field_object_type': 'onChangeFieldObjectType',
+ 'change_field_object_label': 'onChangeFieldObjectLabel',
+ 'change_field_object_name': 'onChangeFieldObjectName',
+ 'change_field_object_parent': 'onChangeFieldObjectParent',
+ 'sortstop_field_object': 'onChangeFieldObjectParent'
+ },
+ onOpenFieldObject: function (field) {
+ acf.doAction('open_field', field.$el);
+ acf.doAction('open_field/type=' + field.get('type'), field.$el);
+ acf.doAction('render_field_settings', field.$el);
+ acf.doAction('render_field_settings/type=' + field.get('type'), field.$el);
+ },
+ onCloseFieldObject: function (field) {
+ acf.doAction('close_field', field.$el);
+ acf.doAction('close_field/type=' + field.get('type'), field.$el);
+ },
+ onAddFieldObject: function (field) {
+ acf.doAction('add_field', field.$el);
+ acf.doAction('add_field/type=' + field.get('type'), field.$el);
+ },
+ onDuplicateFieldObject: function (field) {
+ acf.doAction('duplicate_field', field.$el);
+ acf.doAction('duplicate_field/type=' + field.get('type'), field.$el);
+ },
+ onDeleteFieldObject: function (field) {
+ acf.doAction('delete_field', field.$el);
+ acf.doAction('delete_field/type=' + field.get('type'), field.$el);
+ },
+ onChangeFieldObjectType: function (field) {
+ acf.doAction('change_field_type', field.$el);
+ acf.doAction('change_field_type/type=' + field.get('type'), field.$el);
+ acf.doAction('render_field_settings', field.$el);
+ acf.doAction('render_field_settings/type=' + field.get('type'), field.$el);
+ },
+ onChangeFieldObjectLabel: function (field) {
+ acf.doAction('change_field_label', field.$el);
+ acf.doAction('change_field_label/type=' + field.get('type'), field.$el);
+ },
+ onChangeFieldObjectName: function (field) {
+ acf.doAction('change_field_name', field.$el);
+ acf.doAction('change_field_name/type=' + field.get('type'), field.$el);
+ },
+ onChangeFieldObjectParent: function (field) {
+ acf.doAction('update_field_parent', field.$el);
+ }
+ });
+})(jQuery);
\ No newline at end of file
diff --git a/assets/build/js/acf-field-group.min.js b/assets/build/js/acf-field-group.min.js
new file mode 100644
index 0000000..41a03a0
--- /dev/null
+++ b/assets/build/js/acf-field-group.min.js
@@ -0,0 +1 @@
+!function(n){new acf.Model({id:"fieldGroupManager",events:{"submit #post":"onSubmit",'click a[href="#"]':"onClick","click .submitdelete":"onClickTrash"},filters:{find_fields_args:"filterFindFieldArgs"},onSubmit:function(e,t){var i=n("#titlewrap #title");i.val()||(e.preventDefault(),acf.unlockForm(t),alert(acf.__("Field group title is required")),i.trigger("focus"))},onClick:function(e){e.preventDefault()},onClickTrash:function(e){confirm(acf.__("Move to trash. Are you sure?"))||e.preventDefault()},filterFindFieldArgs:function(e){return e.visible=!0,e}}),new acf.Model({id:"screenOptionsManager",wait:"prepare",events:{change:"onChange"},initialize:function(){var e=n("#adv-settings"),t=n("#acf-append-show-on-screen");e.find(".metabox-prefs").append(t.html()),e.find(".metabox-prefs br").remove(),t.remove(),this.$el=n("#acf-field-key-hide"),this.render()},isChecked:function(){return this.$el.prop("checked")},onChange:function(e,t){var i=this.isChecked()?1:0;acf.updateUserSetting("show_field_keys",i),this.render()},render:function(){this.isChecked()?n("#acf-field-group-fields").addClass("show-field-keys"):n("#acf-field-group-fields").removeClass("show-field-keys")}}),new acf.Model({actions:{new_field:"onNewField"},onNewField:function(e){var t,i;e.has("append")&&(i=e.get("append"),(t=e.$el.siblings('[data-name="'+i+'"]').first()).length&&((t=(i=t.children(".acf-input")).children("ul")).length||(i.wrapInner(''),t=i.children("ul")),i=e.$(".acf-input").html(),i=n(""+i+" "),t.append(i),t.attr("data-cols",t.children().length),e.remove()))}})}(jQuery),function(r){acf.FieldObject=acf.Model.extend({eventScope:".acf-field-object",events:{"click .edit-field":"onClickEdit","click .delete-field":"onClickDelete","click .duplicate-field":"duplicate","click .move-field":"move","change .field-type":"onChangeType","change .field-required":"onChangeRequired","blur .field-label":"onChangeLabel","blur .field-name":"onChangeName",change:"onChange",changed:"onChanged"},data:{id:0,key:"",type:""},setup:function(e){this.$el=e,this.inherit(e),this.prop("ID"),this.prop("parent"),this.prop("menu_order")},$input:function(e){return r("#"+this.getInputId()+"-"+e)},$meta:function(){return this.$(".meta:first")},$handle:function(){return this.$(".handle:first")},$settings:function(){return this.$(".settings:first")},$setting:function(e){return this.$(".acf-field-settings:first > .acf-field-setting-"+e)},getParent:function(){return acf.getFieldObjects({child:this.$el,limit:1}).pop()},getParents:function(){return acf.getFieldObjects({child:this.$el})},getFields:function(){return acf.getFieldObjects({parent:this.$el})},getInputName:function(){return"acf_fields["+this.get("id")+"]"},getInputId:function(){return"acf_fields-"+this.get("id")},newInput:function(e,t){var i=this.getInputId(),n=this.getInputName();e&&(i+="-"+e,n+="["+e+"]");t=r(" ").attr({id:i,name:n,value:t});return this.$("> .meta").append(t),t},getProp:function(e){if(this.has(e))return this.get(e);var t=this.$input(e),t=t.length?t.val():null;return this.set(e,t,!0),t},setProp:function(e,t){var i=this.$input(e);i.val();return i.length||(i=this.newInput(e,t)),null===t?i.remove():i.val(t),this.has(e)?this.set(e,t):this.set(e,t,!0),this},prop:function(e,t){return void 0!==t?this.setProp(e,t):this.getProp(e)},props:function(t){Object.keys(t).map(function(e){this.setProp(e,t[e])},this)},getLabel:function(){var e=this.prop("label");return e=""===e?acf.__("(no label)"):e},getName:function(){return this.prop("name")},getType:function(){return this.prop("type")},getTypeLabel:function(){var e=this.prop("type"),t=acf.get("fieldTypes");return t[e]?t[e].label:e},getKey:function(){return this.prop("key")},initialize:function(){this.addProFields()},addProFields:function(){var e;acf.data.fieldTypes.hasOwnProperty("clone")||((e=r(".field-type").not(".acf-free-field-type")).find('optgroup option[value="group"]').parent().append(''+acf.__("Repeater (Pro only)")+' '+acf.__("Flexible Content (Pro only)")+' '+acf.__("Clone (Pro only)")+" "),e.find('optgroup option[value="image"]').parent().append(''+acf.__("Gallery (Pro only)")+" "),e.addClass("acf-free-field-type"))},render:function(){var e=this.$(".handle:first"),t=this.prop("menu_order"),i=this.getLabel(),n=this.prop("name"),a=this.getTypeLabel(),l=this.prop("key"),o=this.$input("required").prop("checked");e.find(".acf-icon").html(parseInt(t)+1),o&&(i+=' * '),e.find(".li-field-label strong a").html(i),e.find(".li-field-name").text(n),e.find(".li-field-type").text(a),e.find(".li-field-key").text(l),acf.doAction("render_field_object",this)},refresh:function(){acf.doAction("refresh_field_object",this)},isOpen:function(){return this.$el.hasClass("open")},onClickEdit:function(e){this.isOpen()?this.close():this.open()},open:function(){var e=this.$el.children(".settings");e.slideDown(),this.$el.addClass("open"),acf.doAction("open_field_object",this),this.trigger("openFieldObject"),acf.doAction("show",e)},close:function(){var e=this.$el.children(".settings");e.slideUp(),this.$el.removeClass("open"),acf.doAction("close_field_object",this),this.trigger("closeFieldObject"),acf.doAction("hide",e)},serialize:function(){return acf.serialize(this.$el,this.getInputName())},save:function(e){e=e||"settings","settings"!==this.getProp("save")&&(this.setProp("save",e),this.$el.attr("data-save",e),acf.doAction("save_field_object",this,e))},submit:function(){var e=this.getInputName(),t=this.get("save");this.isOpen()&&this.close(),"settings"==t||("meta"==t?this.$('> .settings [name^="'+e+'"]'):this.$('[name^="'+e+'"]')).remove(),acf.doAction("submit_field_object",this)},onChange:function(e,t){this.save(),acf.doAction("change_field_object",this)},onChanged:function(e,t,i,n){"save"!=i&&(-1<["menu_order","parent"].indexOf(i)?this.save("meta"):this.save(),-1<["menu_order","label","required","name","type","key"].indexOf(i)&&this.render(),acf.doAction("change_field_object_"+i,this,n))},onChangeLabel:function(e,t){t=t.val();this.set("label",t),""==this.prop("name")&&(t=acf.applyFilters("generate_field_object_name",acf.strSanitize(t),this),this.prop("name",t))},onChangeName:function(e,t){t=t.val();this.set("name",t),"field_"===t.substr(0,6)&&alert(acf.__('The string "field_" may not be used at the start of a field name'))},onChangeRequired:function(e,t){t=t.prop("checked")?1:0;this.set("required",t)},delete:function(e){e=acf.parseArgs(e,{animate:!0});var t,i=this.prop("ID");i&&(i=(t=r("#_acf_delete_fields")).val()+"|"+i,t.val(i)),acf.doAction("delete_field_object",this),e.animate?this.removeAnimate():this.remove()},onClickDelete:function(e,t){if(e.shiftKey)return this.delete();this.$el.addClass("-hover");acf.newTooltip({confirmRemove:!0,target:t,context:this,confirm:function(){this.delete()},cancel:function(){this.$el.removeClass("-hover")}})},removeAnimate:function(){var e=this,t=this.$el.parent(),i=acf.findFieldObjects({sibling:this.$el});acf.remove({target:this.$el,endHeight:i.length?0:50,complete:function(){e.remove(),acf.doAction("removed_field_object",e,t)}}),acf.doAction("remove_field_object",e,t)},duplicate:function(){var e=acf.uniqid("field_"),t=acf.duplicate({target:this.$el,search:this.get("id"),replace:e});t.attr("data-key",e);var i=acf.getFieldObject(t);this.isOpen()?this.close():i.open();var n=i.$setting("label input");setTimeout(function(){n.trigger("focus")},251);var a,l=i.prop("label"),o=i.prop("name"),c=o.split("_").pop(),t=acf.__("copy");acf.isNumeric(c)?(l=l.replace(c,a=+c+1),o=o.replace(c,a)):0===c.indexOf(t)?(a=+c.replace(t,""),l=l.replace(c,t+(a=a?a+1:2)),o=o.replace(c,t+a)):(l+=" ("+t+")",o+="_"+t),i.prop("ID",0),i.prop("label",l),i.prop("name",o),i.prop("key",e),acf.doAction("duplicate_field_object",this,i),acf.doAction("append_field_object",i)},wipe:function(){var e=this.get("id"),t=this.get("key"),i=acf.uniqid("field_");acf.rename({target:this.$el,search:e,replace:i}),this.set("id",i),this.set("prevId",e),this.set("prevKey",t),this.prop("key",i),this.prop("ID",0),this.$el.attr("data-key",i),this.$el.attr("data-id",i),acf.doAction("wipe_field_object",this)},move:function(){function t(e){return"settings"==e.get("save")}var i,n,a,l,o,c,d=t(this);d||acf.getFieldObjects({parent:this.$el}).map(function(e){d=t(e)||e.changed}),d?alert(acf.__("This field cannot be moved until its changes have been saved")):(i=this.prop("ID"),n=this,a=!1,l=function(e){a.loading(!1),a.content(e),a.on("submit","form",o)},o=function(e,t){e.preventDefault(),acf.startButtonLoading(a.$(".button"));e={action:"acf/field_group/move_field",field_id:i,field_group_id:a.$("select").val()};r.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"html",success:c})},c=function(e){a.content(e),n.removeAnimate()},function(){a=acf.newPopup({title:acf.__("Move Custom Field"),loading:!0,width:"300px"});var e={action:"acf/field_group/move_field",field_id:i};r.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"html",success:l})}())},onChangeType:function(e,t){this.changeTimeout&&clearTimeout(this.changeTimeout),this.changeTimeout=this.setTimeout(function(){this.changeType(t.val())},300)},changeType:function(e){var t=this.prop("type"),i=acf.strSlugify("acf-field-object-"+t),n=acf.strSlugify("acf-field-object-"+e);this.$el.removeClass(i).addClass(n),this.$el.attr("data-type",e),this.$el.data("type",e),this.has("xhr")&&this.get("xhr").abort();var a=this.$("> .settings > table > tbody"),n=a.children('[data-setting="'+t+'"]');if(this.set("settings-"+t,n),n.detach(),this.has("settings-"+e)){var l=this.get("settings-"+e);return this.$setting("conditional_logic").before(l),void this.set("type",e)}var o=r('
');this.$setting("conditional_logic").before(o);l={action:"acf/field_group/render_field_settings",field:this.serialize(),prefix:this.getInputName()},l=r.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(l),type:"post",dataType:"html",context:this,success:function(e){e&&(o.after(e),acf.doAction("append",a))},complete:function(){o.remove(),this.set("type",e)}});this.set("xhr",l)},updateParent:function(){var e=acf.get("post_id"),t=this.getParent();t&&(e=parseInt(t.prop("ID"))||t.prop("key")),this.prop("parent",e)}})}(jQuery),function(i){function n(e){return acf.strPascalCase(e||"")+"FieldSetting"}acf.registerFieldSetting=function(e){var t=e.prototype,t=n(t.type+" "+t.name);this.models[t]=e},acf.newFieldSetting=function(e){var t=e.get("setting")||"",i=e.get("name")||"",i=n(t+" "+i),i=acf.models[i]||null;return null!==i&&new i(e)},acf.getFieldSetting=function(e){return(e=e instanceof jQuery?acf.getField(e):e).setting};new acf.Model({actions:{new_field:"onNewField"},onNewField:function(e){e.setting=acf.newFieldSetting(e)}});acf.FieldSetting=acf.Model.extend({field:!1,type:"",name:"",wait:"ready",eventScope:".acf-field",events:{change:"render"},setup:function(e){var t=e.$el;this.$el=t,this.field=e,this.$fieldObject=t.closest(".acf-field-object"),this.fieldObject=acf.getFieldObject(this.$fieldObject),i.extend(this.data,e.data)},initialize:function(){this.render()},render:function(){}});var e=acf.FieldSetting.extend({type:"",name:"",render:function(){var e=this.$('input[type="radio"]:checked');"other"!=e.val()&&this.$('input[type="text"]').val(e.val())}}),t=e.extend({type:"date_picker",name:"display_format"}),a=e.extend({type:"date_picker",name:"return_format"});acf.registerFieldSetting(t),acf.registerFieldSetting(a);t=e.extend({type:"date_time_picker",name:"display_format"}),a=e.extend({type:"date_time_picker",name:"return_format"});acf.registerFieldSetting(t),acf.registerFieldSetting(a);a=e.extend({type:"time_picker",name:"display_format"}),e=e.extend({name:"return_format"});acf.registerFieldSetting(a),acf.registerFieldSetting(e)}(jQuery),function(l){var e=acf.FieldSetting.extend({type:"",name:"conditional_logic",events:{"change .conditions-toggle":"onChangeToggle","click .add-conditional-group":"onClickAddGroup","focus .condition-rule-field":"onFocusField","change .condition-rule-field":"onChangeField","change .condition-rule-operator":"onChangeOperator","click .add-conditional-rule":"onClickAdd","click .remove-conditional-rule":"onClickRemove"},$rule:!1,scope:function(e){return this.$rule=e,this},ruleData:function(e,t){return this.$rule.data.apply(this.$rule,arguments)},$input:function(e){return this.$rule.find(".condition-rule-"+e)},$td:function(e){return this.$rule.find("td."+e)},$toggle:function(){return this.$(".conditions-toggle")},$control:function(){return this.$(".rule-groups")},$groups:function(){return this.$(".rule-group")},$rules:function(){return this.$(".rule")},open:function(){var e=this.$control();e.show(),acf.enable(e)},close:function(){var e=this.$control();e.hide(),acf.disable(e)},render:function(){this.$toggle().prop("checked")?(this.renderRules(),this.open()):this.close()},renderRules:function(){var e=this;this.$rules().each(function(){e.renderRule(l(this))})},renderRule:function(e){this.scope(e),this.renderField(),this.renderOperator(),this.renderValue()},renderField:function(){var i=[],n=this.fieldObject.cid,e=this.$input("field");acf.getFieldObjects().map(function(e){var t={id:e.getKey(),text:e.getLabel()};e.cid===n&&(t.text+=acf.__("(this field)"),t.disabled=!0),acf.getConditionTypes({fieldType:e.getType()}).length||(t.disabled=!0);e=e.getParents().length;t.text="- ".repeat(e)+t.text,i.push(t)}),i.length||i.push({id:"",text:acf.__("No toggle fields available")}),acf.renderSelect(e,i),this.ruleData("field",e.val())},renderOperator:function(){var e,t,i;this.ruleData("field")&&((e=this.$input("operator")).val(),t=[],null===e.val()&&acf.renderSelect(e,[{id:this.ruleData("operator"),text:""}]),i=acf.findFieldObject(this.ruleData("field")),i=acf.getFieldObject(i),acf.getConditionTypes({fieldType:i.getType()}).map(function(e){t.push({id:e.prototype.operator,text:e.prototype.label})}),acf.renderSelect(e,t),this.ruleData("operator",e.val()))},renderValue:function(){var t,e,i,n,a;this.ruleData("field")&&this.ruleData("operator")&&(t=this.$input("value"),e=this.$td("value"),i=t.val(),n=acf.findFieldObject(this.ruleData("field")),n=acf.getFieldObject(n),(n=acf.getConditionTypes({fieldType:n.getType(),operator:this.ruleData("operator")})[0].prototype.choices(n))instanceof Array?(a=l(" "),acf.renderSelect(a,n)):a=l(n),t.detach(),e.html(a),setTimeout(function(){["class","name","id"].map(function(e){a.attr(e,t.attr(e))})},0),a.prop("disabled")||acf.val(a,i,!0),this.ruleData("value",a.val()))},onChangeToggle:function(){this.render()},onClickAddGroup:function(e,t){this.addGroup()},addGroup:function(){var e=this.$(".rule-group:last"),e=acf.duplicate(e);e.find("h4").text(acf.__("or")),e.find("tr").not(":first").remove(),this.fieldObject.save()},onFocusField:function(e,t){this.renderField()},onChangeField:function(e,t){this.scope(t.closest(".rule")),this.ruleData("field",t.val()),this.renderOperator(),this.renderValue()},onChangeOperator:function(e,t){this.scope(t.closest(".rule")),this.ruleData("operator",t.val()),this.renderValue()},onClickAdd:function(e,t){t=acf.duplicate(t.closest(".rule"));this.renderRule(t)},onClickRemove:function(e,t){t=t.closest(".rule");this.fieldObject.save(),0==t.siblings(".rule").length&&t.closest(".rule-group").remove(),t.remove()}});acf.registerFieldSetting(e);new acf.Model({actions:{duplicate_field_objects:"onDuplicateFieldObjects"},onDuplicateFieldObjects:function(e,t,i){var n={},a=l();e.map(function(e){n[e.get("prevKey")]=e.get("key"),a=a.add(e.$(".condition-rule-field"))}),a.each(function(){var e=l(this),t=e.val();t&&n[t]&&(e.find("option:selected").attr("value",n[t]),e.val(n[t]))})}})}(jQuery),function(l){acf.findFieldObject=function(e){return acf.findFieldObjects({key:e,limit:1})},acf.findFieldObjects=function(e){e=e||{};var t=".acf-field-object",i=!1;return(e=acf.parseArgs(e,{id:"",key:"",type:"",limit:!1,list:null,parent:!1,sibling:!1,child:!1})).id&&(t+='[data-id="'+e.id+'"]'),e.key&&(t+='[data-key="'+e.key+'"]'),e.type&&(t+='[data-type="'+e.type+'"]'),i=e.list?e.list.children(t):e.parent?e.parent.find(t):e.sibling?e.sibling.siblings(t):e.child?e.child.parents(t):l(t),i=e.limit?i.slice(0,e.limit):i},acf.getFieldObject=function(e){return(e="string"==typeof e?acf.findFieldObject(e):e).data("acf")||acf.newFieldObject(e)},acf.getFieldObjects=function(e){var e=acf.findFieldObjects(e),t=[];return e.each(function(){var e=acf.getFieldObject(l(this));t.push(e)}),t},acf.newFieldObject=function(e){e=new acf.FieldObject(e);return acf.doAction("new_field_object",e),e};new acf.Model({priority:5,initialize:function(){["prepare","ready","append","remove"].map(function(e){this.addFieldActions(e)},this)},addFieldActions:function(e){var n=e+"_field_objects",a=e+"_field_object",l=e+"FieldObject";acf.addAction(e,function(e){var t,i=acf.getFieldObjects({parent:e});i.length&&((t=acf.arrayArgs(arguments)).splice(0,1,n,i),acf.doAction.apply(null,t))},5),acf.addAction(n,function(e){var t=acf.arrayArgs(arguments);t.unshift(a),e.map(function(e){t[1]=e,acf.doAction.apply(null,t)})},5),acf.addAction(a,function(t){var i=acf.arrayArgs(arguments);i.unshift(a);["type","name","key"].map(function(e){i[0]=a+"/"+e+"="+t.get(e),acf.doAction.apply(null,i)}),i.splice(0,2),t.trigger(l,i)},5)}}),new acf.Model({id:"fieldManager",events:{"submit #post":"onSubmit","mouseenter .acf-field-list":"onHoverSortable","click .add-field":"onClickAdd"},actions:{removed_field_object:"onRemovedField",sortstop_field_object:"onReorderField",delete_field_object:"onDeleteField",change_field_object_type:"onChangeFieldType",duplicate_field_object:"onDuplicateField"},onSubmit:function(e,t){acf.getFieldObjects().map(function(e){e.submit()})},setFieldMenuOrder:function(e){this.renderFields(e.$el.parent())},onHoverSortable:function(e,n){n.hasClass("ui-sortable")||n.sortable({handle:".acf-sortable-handle",connectWith:".acf-field-list",start:function(e,t){var i=acf.getFieldObject(t.item);t.placeholder.height(t.item.height()),acf.doAction("sortstart_field_object",i,n)},update:function(e,t){t=acf.getFieldObject(t.item);acf.doAction("sortstop_field_object",t,n)}})},onRemovedField:function(e,t){this.renderFields(t)},onReorderField:function(e,t){e.updateParent(),this.renderFields(t)},onDeleteField:function(e){e.getFields().map(function(e){e.delete({animate:!1})})},onChangeFieldType:function(e){},onDuplicateField:function(e,t){var i=t.getFields();i.length&&(i.map(function(e){e.wipe(),e.updateParent()}),acf.doAction("duplicate_field_objects",i,t,e)),this.setFieldMenuOrder(t)},renderFields:function(e){var t=acf.getFieldObjects({list:e});t.length?(e.removeClass("-empty"),t.map(function(e,t){e.prop("menu_order",t)})):e.addClass("-empty")},onClickAdd:function(e,t){t=t.closest(".acf-tfoot").siblings(".acf-field-list");this.addField(t)},addField:function(i){var e=l("#tmpl-acf-field").html(),t=l(e),n=t.data("id"),e=acf.uniqid("field_"),t=acf.duplicate({target:t,search:n,replace:e,append:function(e,t){i.append(t)}}),n=acf.getFieldObject(t);n.prop("key",e),n.prop("ID",0),n.prop("label",""),n.prop("name",""),t.attr("data-key",e),t.attr("data-id",e),n.updateParent();var a=n.$input("label");setTimeout(function(){a.trigger("focus")},251),n.open(),this.renderFields(i),acf.doAction("add_field_object",n),acf.doAction("append_field_object",n)}})}(jQuery),function(a){new acf.Model({id:"locationManager",wait:"ready",events:{"click .add-location-rule":"onClickAddRule","click .add-location-group":"onClickAddGroup","click .remove-location-rule":"onClickRemoveRule","change .refresh-location-rule":"onChangeRemoveRule"},initialize:function(){this.$el=a("#acf-field-group-locations")},onClickAddRule:function(e,t){this.addRule(t.closest("tr"))},onClickRemoveRule:function(e,t){this.removeRule(t.closest("tr"))},onChangeRemoveRule:function(e,t){this.changeRule(t.closest("tr"))},onClickAddGroup:function(e,t){this.addGroup()},addRule:function(e){acf.duplicate(e)},removeRule:function(e){(0==e.siblings("tr").length?e.closest(".rule-group"):e).remove()},changeRule:function(t){var e=t.closest(".rule-group"),i=t.find("td.param select").attr("name").replace("[param]",""),n={action:"acf/field_group/render_location_rule"};n.rule=acf.serialize(t,i),n.rule.id=t.data("id"),n.rule.group=e.data("id"),acf.disable(t.find("td.value")),a.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(n),type:"post",dataType:"html",success:function(e){e&&t.replaceWith(e)}})},addGroup:function(){var e=this.$(".rule-group:last");$group2=acf.duplicate(e),$group2.find("h4").text(acf.__("or")),$group2.find("tr").not(":first").remove()}})}(jQuery),function(l){var e=acf.getCompatibility(acf);e.field_group={save_field:function(e,t){t=void 0!==t?t:"settings",acf.getFieldObject(e).save(t)},delete_field:function(e,t){t=void 0===t||t,acf.getFieldObject(e).delete({animate:t})},update_field_meta:function(e,t,i){acf.getFieldObject(e).prop(t,i)},delete_field_meta:function(e,t){acf.getFieldObject(e).prop(t,null)}},e.field_group.field_object=acf.model.extend({type:"",o:{},$field:null,$settings:null,tag:function(e){var t=this.type,i=e.split("_");return i.splice(1,0,"field"),e=i.join("_"),t&&(e+="/type="+t),e},selector:function(){var e=".acf-field-object",t=this.type;return t&&(e+="-"+t,e=acf.str_replace("_","-",e)),e},_add_action:function(e,t){var i=this;acf.add_action(this.tag(e),function(e){i.set("$field",e),i[t].apply(i,arguments)})},_add_filter:function(e,t){var i=this;acf.add_filter(this.tag(e),function(e){i.set("$field",e),i[t].apply(i,arguments)})},_add_event:function(e,t){var i=this,n=e.substr(0,e.indexOf(" ")),a=e.substr(e.indexOf(" ")+1),e=this.selector();l(document).on(n,e+" "+a,function(e){e.$el=l(this),e.$field=e.$el.closest(".acf-field-object"),i.set("$field",e.$field),i[t].apply(i,[e])})},_set_$field:function(){this.o=this.$field.data(),this.$settings=this.$field.find("> .settings > table > tbody"),this.focus()},focus:function(){},setting:function(e){return this.$settings.find("> .acf-field-setting-"+e)}});new acf.Model({actions:{open_field_object:"onOpenFieldObject",close_field_object:"onCloseFieldObject",add_field_object:"onAddFieldObject",duplicate_field_object:"onDuplicateFieldObject",delete_field_object:"onDeleteFieldObject",change_field_object_type:"onChangeFieldObjectType",change_field_object_label:"onChangeFieldObjectLabel",change_field_object_name:"onChangeFieldObjectName",change_field_object_parent:"onChangeFieldObjectParent",sortstop_field_object:"onChangeFieldObjectParent"},onOpenFieldObject:function(e){acf.doAction("open_field",e.$el),acf.doAction("open_field/type="+e.get("type"),e.$el),acf.doAction("render_field_settings",e.$el),acf.doAction("render_field_settings/type="+e.get("type"),e.$el)},onCloseFieldObject:function(e){acf.doAction("close_field",e.$el),acf.doAction("close_field/type="+e.get("type"),e.$el)},onAddFieldObject:function(e){acf.doAction("add_field",e.$el),acf.doAction("add_field/type="+e.get("type"),e.$el)},onDuplicateFieldObject:function(e){acf.doAction("duplicate_field",e.$el),acf.doAction("duplicate_field/type="+e.get("type"),e.$el)},onDeleteFieldObject:function(e){acf.doAction("delete_field",e.$el),acf.doAction("delete_field/type="+e.get("type"),e.$el)},onChangeFieldObjectType:function(e){acf.doAction("change_field_type",e.$el),acf.doAction("change_field_type/type="+e.get("type"),e.$el),acf.doAction("render_field_settings",e.$el),acf.doAction("render_field_settings/type="+e.get("type"),e.$el)},onChangeFieldObjectLabel:function(e){acf.doAction("change_field_label",e.$el),acf.doAction("change_field_label/type="+e.get("type"),e.$el)},onChangeFieldObjectName:function(e){acf.doAction("change_field_name",e.$el),acf.doAction("change_field_name/type="+e.get("type"),e.$el)},onChangeFieldObjectParent:function(e){acf.doAction("update_field_parent",e.$el)}})}(jQuery);
\ No newline at end of file
diff --git a/assets/build/js/acf-input.js b/assets/build/js/acf-input.js
new file mode 100644
index 0000000..992c08c
--- /dev/null
+++ b/assets/build/js/acf-input.js
@@ -0,0 +1,9253 @@
+(function ($, undefined) {
+ // vars
+ var storage = [];
+ /**
+ * acf.Field
+ *
+ * description
+ *
+ * @date 23/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.Field = acf.Model.extend({
+ // field type
+ type: '',
+ // class used to avoid nested event triggers
+ eventScope: '.acf-field',
+ // initialize events on 'ready'
+ wait: 'ready',
+
+ /**
+ * setup
+ *
+ * Called during the constructor function to setup this field ready for initialization
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param jQuery $field The field element.
+ * @return void
+ */
+ setup: function ($field) {
+ // set $el
+ this.$el = $field; // inherit $field data
+
+ this.inherit($field); // inherit controll data
+
+ this.inherit(this.$control());
+ },
+
+ /**
+ * val
+ *
+ * Sets or returns the field's value
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param mixed val Optional. The value to set
+ * @return mixed
+ */
+ val: function (val) {
+ // Set.
+ if (val !== undefined) {
+ return this.setValue(val); // Get.
+ } else {
+ return this.prop('disabled') ? null : this.getValue();
+ }
+ },
+
+ /**
+ * getValue
+ *
+ * returns the field's value
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return mixed
+ */
+ getValue: function () {
+ return this.$input().val();
+ },
+
+ /**
+ * setValue
+ *
+ * sets the field's value and returns true if changed
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param mixed val
+ * @return boolean. True if changed.
+ */
+ setValue: function (val) {
+ return acf.val(this.$input(), val);
+ },
+
+ /**
+ * __
+ *
+ * i18n helper to be removed
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+ __: function (string) {
+ return acf._e(this.type, string);
+ },
+
+ /**
+ * $control
+ *
+ * returns the control jQuery element used for inheriting data. Uses this.control setting.
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return jQuery
+ */
+ $control: function () {
+ return false;
+ },
+
+ /**
+ * $input
+ *
+ * returns the input jQuery element used for saving values. Uses this.input setting.
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return jQuery
+ */
+ $input: function () {
+ return this.$('[name]:first');
+ },
+
+ /**
+ * $inputWrap
+ *
+ * description
+ *
+ * @date 12/5/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+ $inputWrap: function () {
+ return this.$('.acf-input:first');
+ },
+
+ /**
+ * $inputWrap
+ *
+ * description
+ *
+ * @date 12/5/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+ $labelWrap: function () {
+ return this.$('.acf-label:first');
+ },
+
+ /**
+ * getInputName
+ *
+ * Returns the field's input name
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return string
+ */
+ getInputName: function () {
+ return this.$input().attr('name') || '';
+ },
+
+ /**
+ * parent
+ *
+ * returns the field's parent field or false on failure.
+ *
+ * @date 8/5/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return object|false
+ */
+ parent: function () {
+ // vars
+ var parents = this.parents(); // return
+
+ return parents.length ? parents[0] : false;
+ },
+
+ /**
+ * parents
+ *
+ * description
+ *
+ * @date 9/7/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+ parents: function () {
+ // vars
+ var $parents = this.$el.parents('.acf-field'); // convert
+
+ var parents = acf.getFields($parents); // return
+
+ return parents;
+ },
+ show: function (lockKey, context) {
+ // show field and store result
+ var changed = acf.show(this.$el, lockKey); // do action if visibility has changed
+
+ if (changed) {
+ this.prop('hidden', false);
+ acf.doAction('show_field', this, context);
+ } // return
+
+
+ return changed;
+ },
+ hide: function (lockKey, context) {
+ // hide field and store result
+ var changed = acf.hide(this.$el, lockKey); // do action if visibility has changed
+
+ if (changed) {
+ this.prop('hidden', true);
+ acf.doAction('hide_field', this, context);
+ } // return
+
+
+ return changed;
+ },
+ enable: function (lockKey, context) {
+ // enable field and store result
+ var changed = acf.enable(this.$el, lockKey); // do action if disabled has changed
+
+ if (changed) {
+ this.prop('disabled', false);
+ acf.doAction('enable_field', this, context);
+ } // return
+
+
+ return changed;
+ },
+ disable: function (lockKey, context) {
+ // disabled field and store result
+ var changed = acf.disable(this.$el, lockKey); // do action if disabled has changed
+
+ if (changed) {
+ this.prop('disabled', true);
+ acf.doAction('disable_field', this, context);
+ } // return
+
+
+ return changed;
+ },
+ showEnable: function (lockKey, context) {
+ // enable
+ this.enable.apply(this, arguments); // show and return true if changed
+
+ return this.show.apply(this, arguments);
+ },
+ hideDisable: function (lockKey, context) {
+ // disable
+ this.disable.apply(this, arguments); // hide and return true if changed
+
+ return this.hide.apply(this, arguments);
+ },
+ showNotice: function (props) {
+ // ensure object
+ if (typeof props !== 'object') {
+ props = {
+ text: props
+ };
+ } // remove old notice
+
+
+ if (this.notice) {
+ this.notice.remove();
+ } // create new notice
+
+
+ props.target = this.$inputWrap();
+ this.notice = acf.newNotice(props);
+ },
+ removeNotice: function (timeout) {
+ if (this.notice) {
+ this.notice.away(timeout || 0);
+ this.notice = false;
+ }
+ },
+ showError: function (message) {
+ // add class
+ this.$el.addClass('acf-error'); // add message
+
+ if (message !== undefined) {
+ this.showNotice({
+ text: message,
+ type: 'error',
+ dismiss: false
+ });
+ } // action
+
+
+ acf.doAction('invalid_field', this); // add event
+
+ this.$el.one('focus change', 'input, select, textarea', $.proxy(this.removeError, this));
+ },
+ removeError: function () {
+ // remove class
+ this.$el.removeClass('acf-error'); // remove notice
+
+ this.removeNotice(250); // action
+
+ acf.doAction('valid_field', this);
+ },
+ trigger: function (name, args, bubbles) {
+ // allow some events to bubble
+ if (name == 'invalidField') {
+ bubbles = true;
+ } // return
+
+
+ return acf.Model.prototype.trigger.apply(this, [name, args, bubbles]);
+ }
+ });
+ /**
+ * newField
+ *
+ * description
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.newField = function ($field) {
+ // vars
+ var type = $field.data('type');
+ var mid = modelId(type);
+ var model = acf.models[mid] || acf.Field; // instantiate
+
+ var field = new model($field); // actions
+
+ acf.doAction('new_field', field); // return
+
+ return field;
+ };
+ /**
+ * mid
+ *
+ * Calculates the model ID for a field type
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param string type
+ * @return string
+ */
+
+
+ var modelId = function (type) {
+ return acf.strPascalCase(type || '') + 'Field';
+ };
+ /**
+ * registerFieldType
+ *
+ * description
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.registerFieldType = function (model) {
+ // vars
+ var proto = model.prototype;
+ var type = proto.type;
+ var mid = modelId(type); // store model
+
+ acf.models[mid] = model; // store reference
+
+ storage.push(type);
+ };
+ /**
+ * acf.getFieldType
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.getFieldType = function (type) {
+ var mid = modelId(type);
+ return acf.models[mid] || false;
+ };
+ /**
+ * acf.getFieldTypes
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.getFieldTypes = function (args) {
+ // defaults
+ args = acf.parseArgs(args, {
+ category: '' // hasValue: true
+
+ }); // clonse available types
+
+ var types = []; // loop
+
+ storage.map(function (type) {
+ // vars
+ var model = acf.getFieldType(type);
+ var proto = model.prototype; // check operator
+
+ if (args.category && proto.category !== args.category) {
+ return;
+ } // append
+
+
+ types.push(model);
+ }); // return
+
+ return types;
+ };
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * findFields
+ *
+ * Returns a jQuery selection object of acf fields.
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object $args {
+ * Optional. Arguments to find fields.
+ *
+ * @type string key The field's key (data-attribute).
+ * @type string name The field's name (data-attribute).
+ * @type string type The field's type (data-attribute).
+ * @type string is jQuery selector to compare against.
+ * @type jQuery parent jQuery element to search within.
+ * @type jQuery sibling jQuery element to search alongside.
+ * @type limit int The number of fields to find.
+ * @type suppressFilters bool Whether to allow filters to add/remove results. Default behaviour will ignore clone fields.
+ * }
+ * @return jQuery
+ */
+ acf.findFields = function (args) {
+ // vars
+ var selector = '.acf-field';
+ var $fields = false; // args
+
+ args = acf.parseArgs(args, {
+ key: '',
+ name: '',
+ type: '',
+ is: '',
+ parent: false,
+ sibling: false,
+ limit: false,
+ visible: false,
+ suppressFilters: false
+ }); // filter args
+
+ if (!args.suppressFilters) {
+ args = acf.applyFilters('find_fields_args', args);
+ } // key
+
+
+ if (args.key) {
+ selector += '[data-key="' + args.key + '"]';
+ } // type
+
+
+ if (args.type) {
+ selector += '[data-type="' + args.type + '"]';
+ } // name
+
+
+ if (args.name) {
+ selector += '[data-name="' + args.name + '"]';
+ } // is
+
+
+ if (args.is) {
+ selector += args.is;
+ } // visibility
+
+
+ if (args.visible) {
+ selector += ':visible';
+ } // query
+
+
+ if (args.parent) {
+ $fields = args.parent.find(selector);
+ } else if (args.sibling) {
+ $fields = args.sibling.siblings(selector);
+ } else {
+ $fields = $(selector);
+ } // filter
+
+
+ if (!args.suppressFilters) {
+ $fields = $fields.not('.acf-clone .acf-field');
+ $fields = acf.applyFilters('find_fields', $fields);
+ } // limit
+
+
+ if (args.limit) {
+ $fields = $fields.slice(0, args.limit);
+ } // return
+
+
+ return $fields;
+ };
+ /**
+ * findField
+ *
+ * Finds a specific field with jQuery
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string key The field's key.
+ * @param jQuery $parent jQuery element to search within.
+ * @return jQuery
+ */
+
+
+ acf.findField = function (key, $parent) {
+ return acf.findFields({
+ key: key,
+ limit: 1,
+ parent: $parent,
+ suppressFilters: true
+ });
+ };
+ /**
+ * getField
+ *
+ * Returns a field instance
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param jQuery|string $field jQuery element or field key.
+ * @return object
+ */
+
+
+ acf.getField = function ($field) {
+ // allow jQuery
+ if ($field instanceof jQuery) {// find fields
+ } else {
+ $field = acf.findField($field);
+ } // instantiate
+
+
+ var field = $field.data('acf');
+
+ if (!field) {
+ field = acf.newField($field);
+ } // return
+
+
+ return field;
+ };
+ /**
+ * getFields
+ *
+ * Returns multiple field instances
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param jQuery|object $fields jQuery elements or query args.
+ * @return array
+ */
+
+
+ acf.getFields = function ($fields) {
+ // allow jQuery
+ if ($fields instanceof jQuery) {// find fields
+ } else {
+ $fields = acf.findFields($fields);
+ } // loop
+
+
+ var fields = [];
+ $fields.each(function () {
+ var field = acf.getField($(this));
+ fields.push(field);
+ }); // return
+
+ return fields;
+ };
+ /**
+ * findClosestField
+ *
+ * Returns the closest jQuery field element
+ *
+ * @date 9/4/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el
+ * @return jQuery
+ */
+
+
+ acf.findClosestField = function ($el) {
+ return $el.closest('.acf-field');
+ };
+ /**
+ * getClosestField
+ *
+ * Returns the closest field instance
+ *
+ * @date 22/1/18
+ * @since 5.6.5
+ *
+ * @param jQuery $el
+ * @return object
+ */
+
+
+ acf.getClosestField = function ($el) {
+ var $field = acf.findClosestField($el);
+ return this.getField($field);
+ };
+ /**
+ * addGlobalFieldAction
+ *
+ * Sets up callback logic for global field actions
+ *
+ * @date 15/6/18
+ * @since 5.6.9
+ *
+ * @param string action
+ * @return void
+ */
+
+
+ var addGlobalFieldAction = function (action) {
+ // vars
+ var globalAction = action;
+ var pluralAction = action + '_fields'; // ready_fields
+
+ var singleAction = action + '_field'; // ready_field
+ // global action
+
+ var globalCallback = function ($el
+ /*, arg1, arg2, etc*/
+ ) {
+ //console.log( action, arguments );
+ // get args [$el, ...]
+ var args = acf.arrayArgs(arguments);
+ var extraArgs = args.slice(1); // find fields
+
+ var fields = acf.getFields({
+ parent: $el
+ }); // check
+
+ if (fields.length) {
+ // pluralAction
+ var pluralArgs = [pluralAction, fields].concat(extraArgs);
+ acf.doAction.apply(null, pluralArgs);
+ }
+ }; // plural action
+
+
+ var pluralCallback = function (fields
+ /*, arg1, arg2, etc*/
+ ) {
+ //console.log( pluralAction, arguments );
+ // get args [fields, ...]
+ var args = acf.arrayArgs(arguments);
+ var extraArgs = args.slice(1); // loop
+
+ fields.map(function (field, i) {
+ //setTimeout(function(){
+ // singleAction
+ var singleArgs = [singleAction, field].concat(extraArgs);
+ acf.doAction.apply(null, singleArgs); //}, i * 100);
+ });
+ }; // add actions
+
+
+ acf.addAction(globalAction, globalCallback);
+ acf.addAction(pluralAction, pluralCallback); // also add single action
+
+ addSingleFieldAction(action);
+ };
+ /**
+ * addSingleFieldAction
+ *
+ * Sets up callback logic for single field actions
+ *
+ * @date 15/6/18
+ * @since 5.6.9
+ *
+ * @param string action
+ * @return void
+ */
+
+
+ var addSingleFieldAction = function (action) {
+ // vars
+ var singleAction = action + '_field'; // ready_field
+
+ var singleEvent = action + 'Field'; // readyField
+ // single action
+
+ var singleCallback = function (field
+ /*, arg1, arg2, etc*/
+ ) {
+ //console.log( singleAction, arguments );
+ // get args [field, ...]
+ var args = acf.arrayArgs(arguments);
+ var extraArgs = args.slice(1); // action variations (ready_field/type=image)
+
+ var variations = ['type', 'name', 'key'];
+ variations.map(function (variation) {
+ // vars
+ var prefix = '/' + variation + '=' + field.get(variation); // singleAction
+
+ args = [singleAction + prefix, field].concat(extraArgs);
+ acf.doAction.apply(null, args);
+ }); // event
+
+ if (singleFieldEvents.indexOf(action) > -1) {
+ field.trigger(singleEvent, extraArgs);
+ }
+ }; // add actions
+
+
+ acf.addAction(singleAction, singleCallback);
+ }; // vars
+
+
+ var globalFieldActions = ['prepare', 'ready', 'load', 'append', 'remove', 'unmount', 'remount', 'sortstart', 'sortstop', 'show', 'hide', 'unload'];
+ var singleFieldActions = ['valid', 'invalid', 'enable', 'disable', 'new', 'duplicate'];
+ var singleFieldEvents = ['remove', 'unmount', 'remount', 'sortstart', 'sortstop', 'show', 'hide', 'unload', 'valid', 'invalid', 'enable', 'disable', 'duplicate']; // add
+
+ globalFieldActions.map(addGlobalFieldAction);
+ singleFieldActions.map(addSingleFieldAction);
+ /**
+ * fieldsEventManager
+ *
+ * Manages field actions and events
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param void
+ * @param void
+ */
+
+ var fieldsEventManager = new acf.Model({
+ id: 'fieldsEventManager',
+ events: {
+ 'click .acf-field a[href="#"]': 'onClick',
+ 'change .acf-field': 'onChange'
+ },
+ onClick: function (e) {
+ // prevent default of any link with an href of #
+ e.preventDefault();
+ },
+ onChange: function () {
+ // preview hack allows post to save with no title or content
+ $('#_acf_changed').val(1);
+ }
+ });
+ var duplicateFieldsManager = new acf.Model({
+ id: 'duplicateFieldsManager',
+ actions: {
+ 'duplicate': 'onDuplicate',
+ 'duplicate_fields': 'onDuplicateFields'
+ },
+ onDuplicate: function ($el, $el2) {
+ var fields = acf.getFields({
+ parent: $el
+ });
+
+ if (fields.length) {
+ var $fields = acf.findFields({
+ parent: $el2
+ });
+ acf.doAction('duplicate_fields', fields, $fields);
+ }
+ },
+ onDuplicateFields: function (fields, duplicates) {
+ fields.map(function (field, i) {
+ acf.doAction('duplicate_field', field, $(duplicates[i]));
+ });
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ var i = 0;
+ var Field = acf.Field.extend({
+ type: 'accordion',
+ wait: '',
+ $control: function () {
+ return this.$('.acf-fields:first');
+ },
+ initialize: function () {
+ // Bail early if this is a duplicate of an existing initialized accordion.
+ if (this.$el.hasClass('acf-accordion')) {
+ return;
+ } // bail early if is cell
+
+
+ if (this.$el.is('td')) return; // enpoint
+
+ if (this.get('endpoint')) {
+ return this.remove();
+ } // vars
+
+
+ var $field = this.$el;
+ var $label = this.$labelWrap();
+ var $input = this.$inputWrap();
+ var $wrap = this.$control();
+ var $instructions = $input.children('.description'); // force description into label
+
+ if ($instructions.length) {
+ $label.append($instructions);
+ } // table
+
+
+ if (this.$el.is('tr')) {
+ // vars
+ var $table = this.$el.closest('table');
+ var $newLabel = $('
');
+ var $newInput = $('
');
+ var $newTable = $('');
+ var $newWrap = $(' '); // dom
+
+ $newLabel.append($label.html());
+ $newTable.append($newWrap);
+ $newInput.append($newTable);
+ $input.append($newLabel);
+ $input.append($newInput); // modify
+
+ $label.remove();
+ $wrap.remove();
+ $input.attr('colspan', 2); // update vars
+
+ $label = $newLabel;
+ $input = $newInput;
+ $wrap = $newWrap;
+ } // add classes
+
+
+ $field.addClass('acf-accordion');
+ $label.addClass('acf-accordion-title');
+ $input.addClass('acf-accordion-content'); // index
+
+ i++; // multi-expand
+
+ if (this.get('multi_expand')) {
+ $field.attr('multi-expand', 1);
+ } // open
+
+
+ var order = acf.getPreference('this.accordions') || [];
+
+ if (order[i - 1] !== undefined) {
+ this.set('open', order[i - 1]);
+ }
+
+ if (this.get('open')) {
+ $field.addClass('-open');
+ $input.css('display', 'block'); // needed for accordion to close smoothly
+ } // add icon
+
+
+ $label.prepend(accordionManager.iconHtml({
+ open: this.get('open')
+ })); // classes
+ // - remove 'inside' which is a #poststuff WP class
+
+ var $parent = $field.parent();
+ $wrap.addClass($parent.hasClass('-left') ? '-left' : '');
+ $wrap.addClass($parent.hasClass('-clear') ? '-clear' : ''); // append
+
+ $wrap.append($field.nextUntil('.acf-field-accordion', '.acf-field')); // clean up
+
+ $wrap.removeAttr('data-open data-multi_expand data-endpoint');
+ }
+ });
+ acf.registerFieldType(Field);
+ /**
+ * accordionManager
+ *
+ * Events manager for the acf accordion
+ *
+ * @date 14/2/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return void
+ */
+
+ var accordionManager = new acf.Model({
+ actions: {
+ 'unload': 'onUnload'
+ },
+ events: {
+ 'click .acf-accordion-title': 'onClick',
+ 'invalidField .acf-accordion': 'onInvalidField'
+ },
+ isOpen: function ($el) {
+ return $el.hasClass('-open');
+ },
+ toggle: function ($el) {
+ if (this.isOpen($el)) {
+ this.close($el);
+ } else {
+ this.open($el);
+ }
+ },
+ iconHtml: function (props) {
+ // Use SVG inside Gutenberg editor.
+ if (acf.isGutenberg()) {
+ if (props.open) {
+ return ' ';
+ } else {
+ return ' ';
+ }
+ } else {
+ if (props.open) {
+ return ' ';
+ } else {
+ return ' ';
+ }
+ }
+ },
+ open: function ($el) {
+ var duration = acf.isGutenberg() ? 0 : 300; // open
+
+ $el.find('.acf-accordion-content:first').slideDown(duration).css('display', 'block');
+ $el.find('.acf-accordion-icon:first').replaceWith(this.iconHtml({
+ open: true
+ }));
+ $el.addClass('-open'); // action
+
+ acf.doAction('show', $el); // close siblings
+
+ if (!$el.attr('multi-expand')) {
+ $el.siblings('.acf-accordion.-open').each(function () {
+ accordionManager.close($(this));
+ });
+ }
+ },
+ close: function ($el) {
+ var duration = acf.isGutenberg() ? 0 : 300; // close
+
+ $el.find('.acf-accordion-content:first').slideUp(duration);
+ $el.find('.acf-accordion-icon:first').replaceWith(this.iconHtml({
+ open: false
+ }));
+ $el.removeClass('-open'); // action
+
+ acf.doAction('hide', $el);
+ },
+ onClick: function (e, $el) {
+ // prevent Defailt
+ e.preventDefault(); // open close
+
+ this.toggle($el.parent());
+ },
+ onInvalidField: function (e, $el) {
+ // bail early if already focused
+ if (this.busy) {
+ return;
+ } // disable functionality for 1sec (allow next validation to work)
+
+
+ this.busy = true;
+ this.setTimeout(function () {
+ this.busy = false;
+ }, 1000); // open accordion
+
+ this.open($el);
+ },
+ onUnload: function (e) {
+ // vars
+ var order = []; // loop
+
+ $('.acf-accordion').each(function () {
+ var open = $(this).hasClass('-open') ? 1 : 0;
+ order.push(open);
+ }); // set
+
+ if (order.length) {
+ acf.setPreference('this.accordions', order);
+ }
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'button_group',
+ events: {
+ 'click input[type="radio"]': 'onClick'
+ },
+ $control: function () {
+ return this.$('.acf-button-group');
+ },
+ $input: function () {
+ return this.$('input:checked');
+ },
+ setValue: function (val) {
+ this.$('input[value="' + val + '"]').prop('checked', true).trigger('change');
+ },
+ onClick: function (e, $el) {
+ // vars
+ var $label = $el.parent('label');
+ var selected = $label.hasClass('selected'); // remove previous selected
+
+ this.$('.selected').removeClass('selected'); // add active class
+
+ $label.addClass('selected'); // allow null
+
+ if (this.get('allow_null') && selected) {
+ $label.removeClass('selected');
+ $el.prop('checked', false).trigger('change');
+ }
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'checkbox',
+ events: {
+ 'change input': 'onChange',
+ 'click .acf-add-checkbox': 'onClickAdd',
+ 'click .acf-checkbox-toggle': 'onClickToggle',
+ 'click .acf-checkbox-custom': 'onClickCustom'
+ },
+ $control: function () {
+ return this.$('.acf-checkbox-list');
+ },
+ $toggle: function () {
+ return this.$('.acf-checkbox-toggle');
+ },
+ $input: function () {
+ return this.$('input[type="hidden"]');
+ },
+ $inputs: function () {
+ return this.$('input[type="checkbox"]').not('.acf-checkbox-toggle');
+ },
+ getValue: function () {
+ var val = [];
+ this.$(':checked').each(function () {
+ val.push($(this).val());
+ });
+ return val.length ? val : false;
+ },
+ onChange: function (e, $el) {
+ // Vars.
+ var checked = $el.prop('checked');
+ var $label = $el.parent('label');
+ var $toggle = this.$toggle(); // Add or remove "selected" class.
+
+ if (checked) {
+ $label.addClass('selected');
+ } else {
+ $label.removeClass('selected');
+ } // Update toggle state if all inputs are checked.
+
+
+ if ($toggle.length) {
+ var $inputs = this.$inputs(); // all checked
+
+ if ($inputs.not(':checked').length == 0) {
+ $toggle.prop('checked', true);
+ } else {
+ $toggle.prop('checked', false);
+ }
+ }
+ },
+ onClickAdd: function (e, $el) {
+ var html = ' ';
+ $el.parent('li').before(html);
+ },
+ onClickToggle: function (e, $el) {
+ // Vars.
+ var checked = $el.prop('checked');
+ var $inputs = this.$('input[type="checkbox"]');
+ var $labels = this.$('label'); // Update "checked" state.
+
+ $inputs.prop('checked', checked); // Add or remove "selected" class.
+
+ if (checked) {
+ $labels.addClass('selected');
+ } else {
+ $labels.removeClass('selected');
+ }
+ },
+ onClickCustom: function (e, $el) {
+ var checked = $el.prop('checked');
+ var $text = $el.next('input[type="text"]'); // checked
+
+ if (checked) {
+ $text.prop('disabled', false); // not checked
+ } else {
+ $text.prop('disabled', true); // remove
+
+ if ($text.val() == '') {
+ $el.parent('li').remove();
+ }
+ }
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'color_picker',
+ wait: 'load',
+ events: {
+ 'duplicateField': 'onDuplicate'
+ },
+ $control: function () {
+ return this.$('.acf-color-picker');
+ },
+ $input: function () {
+ return this.$('input[type="hidden"]');
+ },
+ $inputText: function () {
+ return this.$('input[type="text"]');
+ },
+ setValue: function (val) {
+ // update input (with change)
+ acf.val(this.$input(), val); // update iris
+
+ this.$inputText().iris('color', val);
+ },
+ initialize: function () {
+ // vars
+ var $input = this.$input();
+ var $inputText = this.$inputText(); // event
+
+ var onChange = function (e) {
+ // timeout is required to ensure the $input val is correct
+ setTimeout(function () {
+ acf.val($input, $inputText.val());
+ }, 1);
+ }; // args
+
+
+ var args = {
+ defaultColor: false,
+ palettes: true,
+ hide: true,
+ change: onChange,
+ clear: onChange
+ }; // filter
+
+ var args = acf.applyFilters('color_picker_args', args, this); // initialize
+
+ $inputText.wpColorPicker(args);
+ },
+ onDuplicate: function (e, $el, $duplicate) {
+ // The wpColorPicker library does not provide a destroy method.
+ // Manually reset DOM by replacing elements back to their original state.
+ $colorPicker = $duplicate.find('.wp-picker-container');
+ $inputText = $duplicate.find('input[type="text"]');
+ $colorPicker.replaceWith($inputText);
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'date_picker',
+ events: {
+ 'blur input[type="text"]': 'onBlur',
+ 'duplicateField': 'onDuplicate'
+ },
+ $control: function () {
+ return this.$('.acf-date-picker');
+ },
+ $input: function () {
+ return this.$('input[type="hidden"]');
+ },
+ $inputText: function () {
+ return this.$('input[type="text"]');
+ },
+ initialize: function () {
+ // save_format: compatibility with ACF < 5.0.0
+ if (this.has('save_format')) {
+ return this.initializeCompatibility();
+ } // vars
+
+
+ var $input = this.$input();
+ var $inputText = this.$inputText(); // args
+
+ var args = {
+ dateFormat: this.get('date_format'),
+ altField: $input,
+ altFormat: 'yymmdd',
+ changeYear: true,
+ yearRange: "-100:+100",
+ changeMonth: true,
+ showButtonPanel: true,
+ firstDay: this.get('first_day')
+ }; // filter
+
+ args = acf.applyFilters('date_picker_args', args, this); // add date picker
+
+ acf.newDatePicker($inputText, args); // action
+
+ acf.doAction('date_picker_init', $inputText, args, this);
+ },
+ initializeCompatibility: function () {
+ // vars
+ var $input = this.$input();
+ var $inputText = this.$inputText(); // get and set value from alt field
+
+ $inputText.val($input.val()); // args
+
+ var args = {
+ dateFormat: this.get('date_format'),
+ altField: $input,
+ altFormat: this.get('save_format'),
+ changeYear: true,
+ yearRange: "-100:+100",
+ changeMonth: true,
+ showButtonPanel: true,
+ firstDay: this.get('first_day')
+ }; // filter for 3rd party customization
+
+ args = acf.applyFilters('date_picker_args', args, this); // backup
+
+ var dateFormat = args.dateFormat; // change args.dateFormat
+
+ args.dateFormat = this.get('save_format'); // add date picker
+
+ acf.newDatePicker($inputText, args); // now change the format back to how it should be.
+
+ $inputText.datepicker('option', 'dateFormat', dateFormat); // action for 3rd party customization
+
+ acf.doAction('date_picker_init', $inputText, args, this);
+ },
+ onBlur: function () {
+ if (!this.$inputText().val()) {
+ acf.val(this.$input(), '');
+ }
+ },
+ onDuplicate: function (e, $el, $duplicate) {
+ $duplicate.find('input[type="text"]').removeClass('hasDatepicker').removeAttr('id');
+ }
+ });
+ acf.registerFieldType(Field); // manager
+
+ var datePickerManager = new acf.Model({
+ priority: 5,
+ wait: 'ready',
+ initialize: function () {
+ // vars
+ var locale = acf.get('locale');
+ var rtl = acf.get('rtl');
+ var l10n = acf.get('datePickerL10n'); // bail ealry if no l10n
+
+ if (!l10n) {
+ return false;
+ } // bail ealry if no datepicker library
+
+
+ if (typeof $.datepicker === 'undefined') {
+ return false;
+ } // rtl
+
+
+ l10n.isRTL = rtl; // append
+
+ $.datepicker.regional[locale] = l10n;
+ $.datepicker.setDefaults(l10n);
+ }
+ }); // add
+
+ acf.newDatePicker = function ($input, args) {
+ // bail ealry if no datepicker library
+ if (typeof $.datepicker === 'undefined') {
+ return false;
+ } // defaults
+
+
+ args = args || {}; // initialize
+
+ $input.datepicker(args); // wrap the datepicker (only if it hasn't already been wrapped)
+
+ if ($('body > #ui-datepicker-div').exists()) {
+ $('body > #ui-datepicker-div').wrap('
');
+ }
+ };
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.models.DatePickerField.extend({
+ type: 'date_time_picker',
+ $control: function () {
+ return this.$('.acf-date-time-picker');
+ },
+ initialize: function () {
+ // vars
+ var $input = this.$input();
+ var $inputText = this.$inputText(); // args
+
+ var args = {
+ dateFormat: this.get('date_format'),
+ timeFormat: this.get('time_format'),
+ altField: $input,
+ altFieldTimeOnly: false,
+ altFormat: 'yy-mm-dd',
+ altTimeFormat: 'HH:mm:ss',
+ changeYear: true,
+ yearRange: "-100:+100",
+ changeMonth: true,
+ showButtonPanel: true,
+ firstDay: this.get('first_day'),
+ controlType: 'select',
+ oneLine: true
+ }; // filter
+
+ args = acf.applyFilters('date_time_picker_args', args, this); // add date time picker
+
+ acf.newDateTimePicker($inputText, args); // action
+
+ acf.doAction('date_time_picker_init', $inputText, args, this);
+ }
+ });
+ acf.registerFieldType(Field); // manager
+
+ var dateTimePickerManager = new acf.Model({
+ priority: 5,
+ wait: 'ready',
+ initialize: function () {
+ // vars
+ var locale = acf.get('locale');
+ var rtl = acf.get('rtl');
+ var l10n = acf.get('dateTimePickerL10n'); // bail ealry if no l10n
+
+ if (!l10n) {
+ return false;
+ } // bail ealry if no datepicker library
+
+
+ if (typeof $.timepicker === 'undefined') {
+ return false;
+ } // rtl
+
+
+ l10n.isRTL = rtl; // append
+
+ $.timepicker.regional[locale] = l10n;
+ $.timepicker.setDefaults(l10n);
+ }
+ }); // add
+
+ acf.newDateTimePicker = function ($input, args) {
+ // bail ealry if no datepicker library
+ if (typeof $.timepicker === 'undefined') {
+ return false;
+ } // defaults
+
+
+ args = args || {}; // initialize
+
+ $input.datetimepicker(args); // wrap the datepicker (only if it hasn't already been wrapped)
+
+ if ($('body > #ui-datepicker-div').exists()) {
+ $('body > #ui-datepicker-div').wrap('
');
+ }
+ };
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'google_map',
+ map: false,
+ wait: 'load',
+ events: {
+ 'click a[data-name="clear"]': 'onClickClear',
+ 'click a[data-name="locate"]': 'onClickLocate',
+ 'click a[data-name="search"]': 'onClickSearch',
+ 'keydown .search': 'onKeydownSearch',
+ 'keyup .search': 'onKeyupSearch',
+ 'focus .search': 'onFocusSearch',
+ 'blur .search': 'onBlurSearch',
+ 'showField': 'onShow'
+ },
+ $control: function () {
+ return this.$('.acf-google-map');
+ },
+ $search: function () {
+ return this.$('.search');
+ },
+ $canvas: function () {
+ return this.$('.canvas');
+ },
+ setState: function (state) {
+ // Remove previous state classes.
+ this.$control().removeClass('-value -loading -searching'); // Determine auto state based of current value.
+
+ if (state === 'default') {
+ state = this.val() ? 'value' : '';
+ } // Update state class.
+
+
+ if (state) {
+ this.$control().addClass('-' + state);
+ }
+ },
+ getValue: function () {
+ var val = this.$input().val();
+
+ if (val) {
+ return JSON.parse(val);
+ } else {
+ return false;
+ }
+ },
+ setValue: function (val, silent) {
+ // Convert input value.
+ var valAttr = '';
+
+ if (val) {
+ valAttr = JSON.stringify(val);
+ } // Update input (with change).
+
+
+ acf.val(this.$input(), valAttr); // Bail early if silent update.
+
+ if (silent) {
+ return;
+ } // Render.
+
+
+ this.renderVal(val);
+ /**
+ * Fires immediately after the value has changed.
+ *
+ * @date 12/02/2014
+ * @since 5.0.0
+ *
+ * @param object|string val The new value.
+ * @param object map The Google Map isntance.
+ * @param object field The field instance.
+ */
+
+ acf.doAction('google_map_change', val, this.map, this);
+ },
+ renderVal: function (val) {
+ // Value.
+ if (val) {
+ this.setState('value');
+ this.$search().val(val.address);
+ this.setPosition(val.lat, val.lng); // No value.
+ } else {
+ this.setState('');
+ this.$search().val('');
+ this.map.marker.setVisible(false);
+ }
+ },
+ newLatLng: function (lat, lng) {
+ return new google.maps.LatLng(parseFloat(lat), parseFloat(lng));
+ },
+ setPosition: function (lat, lng) {
+ // Update marker position.
+ this.map.marker.setPosition({
+ lat: parseFloat(lat),
+ lng: parseFloat(lng)
+ }); // Show marker.
+
+ this.map.marker.setVisible(true); // Center map.
+
+ this.center();
+ },
+ center: function () {
+ // Find marker position.
+ var position = this.map.marker.getPosition();
+
+ if (position) {
+ var lat = position.lat();
+ var lng = position.lng(); // Or find default settings.
+ } else {
+ var lat = this.get('lat');
+ var lng = this.get('lng');
+ } // Center map.
+
+
+ this.map.setCenter({
+ lat: parseFloat(lat),
+ lng: parseFloat(lng)
+ });
+ },
+ initialize: function () {
+ // Ensure Google API is loaded and then initialize map.
+ withAPI(this.initializeMap.bind(this));
+ },
+ initializeMap: function () {
+ // Get value ignoring conditional logic status.
+ var val = this.getValue(); // Construct default args.
+
+ var args = acf.parseArgs(val, {
+ zoom: this.get('zoom'),
+ lat: this.get('lat'),
+ lng: this.get('lng')
+ }); // Create Map.
+
+ var mapArgs = {
+ scrollwheel: false,
+ zoom: parseInt(args.zoom),
+ center: {
+ lat: parseFloat(args.lat),
+ lng: parseFloat(args.lng)
+ },
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
+ marker: {
+ draggable: true,
+ raiseOnDrag: true
+ },
+ autocomplete: {}
+ };
+ mapArgs = acf.applyFilters('google_map_args', mapArgs, this);
+ var map = new google.maps.Map(this.$canvas()[0], mapArgs); // Create Marker.
+
+ var markerArgs = acf.parseArgs(mapArgs.marker, {
+ draggable: true,
+ raiseOnDrag: true,
+ map: map
+ });
+ markerArgs = acf.applyFilters('google_map_marker_args', markerArgs, this);
+ var marker = new google.maps.Marker(markerArgs); // Maybe Create Autocomplete.
+
+ var autocomplete = false;
+
+ if (acf.isset(google, 'maps', 'places', 'Autocomplete')) {
+ var autocompleteArgs = mapArgs.autocomplete || {};
+ autocompleteArgs = acf.applyFilters('google_map_autocomplete_args', autocompleteArgs, this);
+ autocomplete = new google.maps.places.Autocomplete(this.$search()[0], autocompleteArgs);
+ autocomplete.bindTo('bounds', map);
+ } // Add map events.
+
+
+ this.addMapEvents(this, map, marker, autocomplete); // Append references.
+
+ map.acf = this;
+ map.marker = marker;
+ map.autocomplete = autocomplete;
+ this.map = map; // Set position.
+
+ if (val) {
+ this.setPosition(val.lat, val.lng);
+ }
+ /**
+ * Fires immediately after the Google Map has been initialized.
+ *
+ * @date 12/02/2014
+ * @since 5.0.0
+ *
+ * @param object map The Google Map isntance.
+ * @param object marker The Google Map marker isntance.
+ * @param object field The field instance.
+ */
+
+
+ acf.doAction('google_map_init', map, marker, this);
+ },
+ addMapEvents: function (field, map, marker, autocomplete) {
+ // Click map.
+ google.maps.event.addListener(map, 'click', function (e) {
+ var lat = e.latLng.lat();
+ var lng = e.latLng.lng();
+ field.searchPosition(lat, lng);
+ }); // Drag marker.
+
+ google.maps.event.addListener(marker, 'dragend', function () {
+ var lat = this.getPosition().lat();
+ var lng = this.getPosition().lng();
+ field.searchPosition(lat, lng);
+ }); // Autocomplete search.
+
+ if (autocomplete) {
+ google.maps.event.addListener(autocomplete, 'place_changed', function () {
+ var place = this.getPlace();
+ field.searchPlace(place);
+ });
+ } // Detect zoom change.
+
+
+ google.maps.event.addListener(map, 'zoom_changed', function () {
+ var val = field.val();
+
+ if (val) {
+ val.zoom = map.getZoom();
+ field.setValue(val, true);
+ }
+ });
+ },
+ searchPosition: function (lat, lng) {
+ //console.log('searchPosition', lat, lng );
+ // Start Loading.
+ this.setState('loading'); // Query Geocoder.
+
+ var latLng = {
+ lat: lat,
+ lng: lng
+ };
+ geocoder.geocode({
+ location: latLng
+ }, function (results, status) {
+ //console.log('searchPosition', arguments );
+ // End Loading.
+ this.setState(''); // Status failure.
+
+ if (status !== 'OK') {
+ this.showNotice({
+ text: acf.__('Location not found: %s').replace('%s', status),
+ type: 'warning'
+ }); // Success.
+ } else {
+ var val = this.parseResult(results[0]); // Override lat/lng to match user defined marker location.
+ // Avoids issue where marker "snaps" to nearest result.
+
+ val.lat = lat;
+ val.lng = lng;
+ this.val(val);
+ }
+ }.bind(this));
+ },
+ searchPlace: function (place) {
+ //console.log('searchPlace', place );
+ // Bail early if no place.
+ if (!place) {
+ return;
+ } // Selecting from the autocomplete dropdown will return a rich PlaceResult object.
+ // Be sure to over-write the "formatted_address" value with the one displayed to the user for best UX.
+
+
+ if (place.geometry) {
+ place.formatted_address = this.$search().val();
+ var val = this.parseResult(place);
+ this.val(val); // Searching a custom address will return an empty PlaceResult object.
+ } else if (place.name) {
+ this.searchAddress(place.name);
+ }
+ },
+ searchAddress: function (address) {
+ //console.log('searchAddress', address );
+ // Bail early if no address.
+ if (!address) {
+ return;
+ } // Allow "lat,lng" search.
+
+
+ var latLng = address.split(',');
+
+ if (latLng.length == 2) {
+ var lat = parseFloat(latLng[0]);
+ var lng = parseFloat(latLng[1]);
+
+ if (lat && lng) {
+ return this.searchPosition(lat, lng);
+ }
+ } // Start Loading.
+
+
+ this.setState('loading'); // Query Geocoder.
+
+ geocoder.geocode({
+ address: address
+ }, function (results, status) {
+ //console.log('searchPosition', arguments );
+ // End Loading.
+ this.setState(''); // Status failure.
+
+ if (status !== 'OK') {
+ this.showNotice({
+ text: acf.__('Location not found: %s').replace('%s', status),
+ type: 'warning'
+ }); // Success.
+ } else {
+ var val = this.parseResult(results[0]); // Override address data with parameter allowing custom address to be defined in search.
+
+ val.address = address; // Update value.
+
+ this.val(val);
+ }
+ }.bind(this));
+ },
+ searchLocation: function () {
+ //console.log('searchLocation' );
+ // Check HTML5 geolocation.
+ if (!navigator.geolocation) {
+ return alert(acf.__('Sorry, this browser does not support geolocation'));
+ } // Start Loading.
+
+
+ this.setState('loading'); // Query Geolocation.
+
+ navigator.geolocation.getCurrentPosition( // Success.
+ function (results) {
+ // End Loading.
+ this.setState(''); // Search position.
+
+ var lat = results.coords.latitude;
+ var lng = results.coords.longitude;
+ this.searchPosition(lat, lng);
+ }.bind(this), // Failure.
+ function (error) {
+ this.setState('');
+ }.bind(this));
+ },
+
+ /**
+ * parseResult
+ *
+ * Returns location data for the given GeocoderResult object.
+ *
+ * @date 15/10/19
+ * @since 5.8.6
+ *
+ * @param object obj A GeocoderResult object.
+ * @return object
+ */
+ parseResult: function (obj) {
+ // Construct basic data.
+ var result = {
+ address: obj.formatted_address,
+ lat: obj.geometry.location.lat(),
+ lng: obj.geometry.location.lng()
+ }; // Add zoom level.
+
+ result.zoom = this.map.getZoom(); // Add place ID.
+
+ if (obj.place_id) {
+ result.place_id = obj.place_id;
+ } // Add place name.
+
+
+ if (obj.name) {
+ result.name = obj.name;
+ } // Create search map for address component data.
+
+
+ var map = {
+ street_number: ['street_number'],
+ street_name: ['street_address', 'route'],
+ city: ['locality'],
+ state: ['administrative_area_level_1', 'administrative_area_level_2', 'administrative_area_level_3', 'administrative_area_level_4', 'administrative_area_level_5'],
+ post_code: ['postal_code'],
+ country: ['country']
+ }; // Loop over map.
+
+ for (var k in map) {
+ var keywords = map[k]; // Loop over address components.
+
+ for (var i = 0; i < obj.address_components.length; i++) {
+ var component = obj.address_components[i];
+ var component_type = component.types[0]; // Look for matching component type.
+
+ if (keywords.indexOf(component_type) !== -1) {
+ // Append to result.
+ result[k] = component.long_name; // Append short version.
+
+ if (component.long_name !== component.short_name) {
+ result[k + '_short'] = component.short_name;
+ }
+ }
+ }
+ }
+ /**
+ * Filters the parsed result.
+ *
+ * @date 18/10/19
+ * @since 5.8.6
+ *
+ * @param object result The parsed result value.
+ * @param object obj The GeocoderResult object.
+ */
+
+
+ return acf.applyFilters('google_map_result', result, obj, this.map, this);
+ },
+ onClickClear: function () {
+ this.val(false);
+ },
+ onClickLocate: function () {
+ this.searchLocation();
+ },
+ onClickSearch: function () {
+ this.searchAddress(this.$search().val());
+ },
+ onFocusSearch: function (e, $el) {
+ this.setState('searching');
+ },
+ onBlurSearch: function (e, $el) {
+ // Get saved address value.
+ var val = this.val();
+ var address = val ? val.address : ''; // Remove 'is-searching' if value has not changed.
+
+ if ($el.val() === address) {
+ this.setState('default');
+ }
+ },
+ onKeyupSearch: function (e, $el) {
+ // Clear empty value.
+ if (!$el.val()) {
+ this.val(false);
+ }
+ },
+ // Prevent form from submitting.
+ onKeydownSearch: function (e, $el) {
+ if (e.which == 13) {
+ e.preventDefault();
+ $el.blur();
+ }
+ },
+ // Center map once made visible.
+ onShow: function () {
+ if (this.map) {
+ this.setTimeout(this.center);
+ }
+ }
+ });
+ acf.registerFieldType(Field); // Vars.
+
+ var loading = false;
+ var geocoder = false;
+ /**
+ * withAPI
+ *
+ * Loads the Google Maps API library and troggers callback.
+ *
+ * @date 28/3/19
+ * @since 5.7.14
+ *
+ * @param function callback The callback to excecute.
+ * @return void
+ */
+
+ function withAPI(callback) {
+ // Check if geocoder exists.
+ if (geocoder) {
+ return callback();
+ } // Check if geocoder API exists.
+
+
+ if (acf.isset(window, 'google', 'maps', 'Geocoder')) {
+ geocoder = new google.maps.Geocoder();
+ return callback();
+ } // Geocoder will need to be loaded. Hook callback to action.
+
+
+ acf.addAction('google_map_api_loaded', callback); // Bail early if already loading API.
+
+ if (loading) {
+ return;
+ } // load api
+
+
+ var url = acf.get('google_map_api');
+
+ if (url) {
+ // Set loading status.
+ loading = true; // Load API
+
+ $.ajax({
+ url: url,
+ dataType: 'script',
+ cache: true,
+ success: function () {
+ geocoder = new google.maps.Geocoder();
+ acf.doAction('google_map_api_loaded');
+ }
+ });
+ }
+ }
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'image',
+ $control: function () {
+ return this.$('.acf-image-uploader');
+ },
+ $input: function () {
+ return this.$('input[type="hidden"]');
+ },
+ events: {
+ 'click a[data-name="add"]': 'onClickAdd',
+ 'click a[data-name="edit"]': 'onClickEdit',
+ 'click a[data-name="remove"]': 'onClickRemove',
+ 'change input[type="file"]': 'onChange'
+ },
+ initialize: function () {
+ // add attribute to form
+ if (this.get('uploader') === 'basic') {
+ this.$el.closest('form').attr('enctype', 'multipart/form-data');
+ }
+ },
+ validateAttachment: function (attachment) {
+ // Use WP attachment attributes when available.
+ if (attachment && attachment.attributes) {
+ attachment = attachment.attributes;
+ } // Apply defaults.
+
+
+ attachment = acf.parseArgs(attachment, {
+ id: 0,
+ url: '',
+ alt: '',
+ title: '',
+ caption: '',
+ description: '',
+ width: 0,
+ height: 0
+ }); // Override with "preview size".
+
+ var size = acf.isget(attachment, 'sizes', this.get('preview_size'));
+
+ if (size) {
+ attachment.url = size.url;
+ attachment.width = size.width;
+ attachment.height = size.height;
+ } // Return.
+
+
+ return attachment;
+ },
+ render: function (attachment) {
+ attachment = this.validateAttachment(attachment); // Update DOM.
+
+ this.$('img').attr({
+ src: attachment.url,
+ alt: attachment.alt
+ });
+
+ if (attachment.id) {
+ this.val(attachment.id);
+ this.$control().addClass('has-value');
+ } else {
+ this.val('');
+ this.$control().removeClass('has-value');
+ }
+ },
+ // create a new repeater row and render value
+ append: function (attachment, parent) {
+ // create function to find next available field within parent
+ var getNext = function (field, parent) {
+ // find existing file fields within parent
+ var fields = acf.getFields({
+ key: field.get('key'),
+ parent: parent.$el
+ }); // find the first field with no value
+
+ for (var i = 0; i < fields.length; i++) {
+ if (!fields[i].val()) {
+ return fields[i];
+ }
+ } // return
+
+
+ return false;
+ }; // find existing file fields within parent
+
+
+ var field = getNext(this, parent); // add new row if no available field
+
+ if (!field) {
+ parent.$('.acf-button:last').trigger('click');
+ field = getNext(this, parent);
+ } // render
+
+
+ if (field) {
+ field.render(attachment);
+ }
+ },
+ selectAttachment: function () {
+ // vars
+ var parent = this.parent();
+ var multiple = parent && parent.get('type') === 'repeater'; // new frame
+
+ var frame = acf.newMediaPopup({
+ mode: 'select',
+ type: 'image',
+ title: acf.__('Select Image'),
+ field: this.get('key'),
+ multiple: multiple,
+ library: this.get('library'),
+ allowedTypes: this.get('mime_types'),
+ select: $.proxy(function (attachment, i) {
+ if (i > 0) {
+ this.append(attachment, parent);
+ } else {
+ this.render(attachment);
+ }
+ }, this)
+ });
+ },
+ editAttachment: function () {
+ // vars
+ var val = this.val(); // bail early if no val
+
+ if (!val) return; // popup
+
+ var frame = acf.newMediaPopup({
+ mode: 'edit',
+ title: acf.__('Edit Image'),
+ button: acf.__('Update Image'),
+ attachment: val,
+ field: this.get('key'),
+ select: $.proxy(function (attachment, i) {
+ this.render(attachment);
+ }, this)
+ });
+ },
+ removeAttachment: function () {
+ this.render(false);
+ },
+ onClickAdd: function (e, $el) {
+ this.selectAttachment();
+ },
+ onClickEdit: function (e, $el) {
+ this.editAttachment();
+ },
+ onClickRemove: function (e, $el) {
+ this.removeAttachment();
+ },
+ onChange: function (e, $el) {
+ var $hiddenInput = this.$input();
+ acf.getFileInputData($el, function (data) {
+ $hiddenInput.val($.param(data));
+ });
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.models.ImageField.extend({
+ type: 'file',
+ $control: function () {
+ return this.$('.acf-file-uploader');
+ },
+ $input: function () {
+ return this.$('input[type="hidden"]');
+ },
+ validateAttachment: function (attachment) {
+ // defaults
+ attachment = attachment || {}; // WP attachment
+
+ if (attachment.id !== undefined) {
+ attachment = attachment.attributes;
+ } // args
+
+
+ attachment = acf.parseArgs(attachment, {
+ url: '',
+ alt: '',
+ title: '',
+ filename: '',
+ filesizeHumanReadable: '',
+ icon: '/wp-includes/images/media/default.png'
+ }); // return
+
+ return attachment;
+ },
+ render: function (attachment) {
+ // vars
+ attachment = this.validateAttachment(attachment); // update image
+
+ this.$('img').attr({
+ src: attachment.icon,
+ alt: attachment.alt,
+ title: attachment.title
+ }); // update elements
+
+ this.$('[data-name="title"]').text(attachment.title);
+ this.$('[data-name="filename"]').text(attachment.filename).attr('href', attachment.url);
+ this.$('[data-name="filesize"]').text(attachment.filesizeHumanReadable); // vars
+
+ var val = attachment.id || ''; // update val
+
+ acf.val(this.$input(), val); // update class
+
+ if (val) {
+ this.$control().addClass('has-value');
+ } else {
+ this.$control().removeClass('has-value');
+ }
+ },
+ selectAttachment: function () {
+ // vars
+ var parent = this.parent();
+ var multiple = parent && parent.get('type') === 'repeater'; // new frame
+
+ var frame = acf.newMediaPopup({
+ mode: 'select',
+ title: acf.__('Select File'),
+ field: this.get('key'),
+ multiple: multiple,
+ library: this.get('library'),
+ allowedTypes: this.get('mime_types'),
+ select: $.proxy(function (attachment, i) {
+ if (i > 0) {
+ this.append(attachment, parent);
+ } else {
+ this.render(attachment);
+ }
+ }, this)
+ });
+ },
+ editAttachment: function () {
+ // vars
+ var val = this.val(); // bail early if no val
+
+ if (!val) {
+ return false;
+ } // popup
+
+
+ var frame = acf.newMediaPopup({
+ mode: 'edit',
+ title: acf.__('Edit File'),
+ button: acf.__('Update File'),
+ attachment: val,
+ field: this.get('key'),
+ select: $.proxy(function (attachment, i) {
+ this.render(attachment);
+ }, this)
+ });
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'link',
+ events: {
+ 'click a[data-name="add"]': 'onClickEdit',
+ 'click a[data-name="edit"]': 'onClickEdit',
+ 'click a[data-name="remove"]': 'onClickRemove',
+ 'change .link-node': 'onChange'
+ },
+ $control: function () {
+ return this.$('.acf-link');
+ },
+ $node: function () {
+ return this.$('.link-node');
+ },
+ getValue: function () {
+ // vars
+ var $node = this.$node(); // return false if empty
+
+ if (!$node.attr('href')) {
+ return false;
+ } // return
+
+
+ return {
+ title: $node.html(),
+ url: $node.attr('href'),
+ target: $node.attr('target')
+ };
+ },
+ setValue: function (val) {
+ // default
+ val = acf.parseArgs(val, {
+ title: '',
+ url: '',
+ target: ''
+ }); // vars
+
+ var $div = this.$control();
+ var $node = this.$node(); // remove class
+
+ $div.removeClass('-value -external'); // add class
+
+ if (val.url) $div.addClass('-value');
+ if (val.target === '_blank') $div.addClass('-external'); // update text
+
+ this.$('.link-title').html(val.title);
+ this.$('.link-url').attr('href', val.url).html(val.url); // update node
+
+ $node.html(val.title);
+ $node.attr('href', val.url);
+ $node.attr('target', val.target); // update inputs
+
+ this.$('.input-title').val(val.title);
+ this.$('.input-target').val(val.target);
+ this.$('.input-url').val(val.url).trigger('change');
+ },
+ onClickEdit: function (e, $el) {
+ acf.wpLink.open(this.$node());
+ },
+ onClickRemove: function (e, $el) {
+ this.setValue(false);
+ },
+ onChange: function (e, $el) {
+ // get the changed value
+ var val = this.getValue(); // update inputs
+
+ this.setValue(val);
+ }
+ });
+ acf.registerFieldType(Field); // manager
+
+ acf.wpLink = new acf.Model({
+ getNodeValue: function () {
+ var $node = this.get('node');
+ return {
+ title: acf.decode($node.html()),
+ url: $node.attr('href'),
+ target: $node.attr('target')
+ };
+ },
+ setNodeValue: function (val) {
+ var $node = this.get('node');
+ $node.text(val.title);
+ $node.attr('href', val.url);
+ $node.attr('target', val.target);
+ $node.trigger('change');
+ },
+ getInputValue: function () {
+ return {
+ title: $('#wp-link-text').val(),
+ url: $('#wp-link-url').val(),
+ target: $('#wp-link-target').prop('checked') ? '_blank' : ''
+ };
+ },
+ setInputValue: function (val) {
+ $('#wp-link-text').val(val.title);
+ $('#wp-link-url').val(val.url);
+ $('#wp-link-target').prop('checked', val.target === '_blank');
+ },
+ open: function ($node) {
+ // add events
+ this.on('wplink-open', 'onOpen');
+ this.on('wplink-close', 'onClose'); // set node
+
+ this.set('node', $node); // create textarea
+
+ var $textarea = $('');
+ $('body').append($textarea); // vars
+
+ var val = this.getNodeValue(); // open popup
+
+ wpLink.open('acf-link-textarea', val.url, val.title, null);
+ },
+ onOpen: function () {
+ // always show title (WP will hide title if empty)
+ $('#wp-link-wrap').addClass('has-text-field'); // set inputs
+
+ var val = this.getNodeValue();
+ this.setInputValue(val); // Update button text.
+
+ if (val.url && wpLinkL10n) {
+ $('#wp-link-submit').val(wpLinkL10n.update);
+ }
+ },
+ close: function () {
+ wpLink.close();
+ },
+ onClose: function () {
+ // Bail early if no node.
+ // Needed due to WP triggering this event twice.
+ if (!this.has('node')) {
+ return false;
+ } // Determine context.
+
+
+ var $submit = $('#wp-link-submit');
+ var isSubmit = $submit.is(':hover') || $submit.is(':focus'); // Set value
+
+ if (isSubmit) {
+ var val = this.getInputValue();
+ this.setNodeValue(val);
+ } // Cleanup.
+
+
+ this.off('wplink-open');
+ this.off('wplink-close');
+ $('#acf-link-textarea').remove();
+ this.set('node', null);
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'oembed',
+ events: {
+ 'click [data-name="clear-button"]': 'onClickClear',
+ 'keypress .input-search': 'onKeypressSearch',
+ 'keyup .input-search': 'onKeyupSearch',
+ 'change .input-search': 'onChangeSearch'
+ },
+ $control: function () {
+ return this.$('.acf-oembed');
+ },
+ $input: function () {
+ return this.$('.input-value');
+ },
+ $search: function () {
+ return this.$('.input-search');
+ },
+ getValue: function () {
+ return this.$input().val();
+ },
+ getSearchVal: function () {
+ return this.$search().val();
+ },
+ setValue: function (val) {
+ // class
+ if (val) {
+ this.$control().addClass('has-value');
+ } else {
+ this.$control().removeClass('has-value');
+ }
+
+ acf.val(this.$input(), val);
+ },
+ showLoading: function (show) {
+ acf.showLoading(this.$('.canvas'));
+ },
+ hideLoading: function () {
+ acf.hideLoading(this.$('.canvas'));
+ },
+ maybeSearch: function () {
+ // vars
+ var prevUrl = this.val();
+ var url = this.getSearchVal(); // no value
+
+ if (!url) {
+ return this.clear();
+ } // fix missing 'http://' - causes the oembed code to error and fail
+
+
+ if (url.substr(0, 4) != 'http') {
+ url = 'http://' + url;
+ } // bail early if no change
+
+
+ if (url === prevUrl) return; // clear existing timeout
+
+ var timeout = this.get('timeout');
+
+ if (timeout) {
+ clearTimeout(timeout);
+ } // set new timeout
+
+
+ var callback = $.proxy(this.search, this, url);
+ this.set('timeout', setTimeout(callback, 300));
+ },
+ search: function (url) {
+ // ajax
+ var ajaxData = {
+ action: 'acf/fields/oembed/search',
+ s: url,
+ field_key: this.get('key')
+ }; // clear existing timeout
+
+ var xhr = this.get('xhr');
+
+ if (xhr) {
+ xhr.abort();
+ } // loading
+
+
+ this.showLoading(); // query
+
+ var xhr = $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'json',
+ context: this,
+ success: function (json) {
+ // error
+ if (!json || !json.html) {
+ json = {
+ url: false,
+ html: ''
+ };
+ } // update vars
+
+
+ this.val(json.url);
+ this.$('.canvas-media').html(json.html);
+ },
+ complete: function () {
+ this.hideLoading();
+ }
+ });
+ this.set('xhr', xhr);
+ },
+ clear: function () {
+ this.val('');
+ this.$search().val('');
+ this.$('.canvas-media').html('');
+ },
+ onClickClear: function (e, $el) {
+ this.clear();
+ },
+ onKeypressSearch: function (e, $el) {
+ if (e.which == 13) {
+ e.preventDefault();
+ this.maybeSearch();
+ }
+ },
+ onKeyupSearch: function (e, $el) {
+ if ($el.val()) {
+ this.maybeSearch();
+ }
+ },
+ onChangeSearch: function (e, $el) {
+ this.maybeSearch();
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'radio',
+ events: {
+ 'click input[type="radio"]': 'onClick'
+ },
+ $control: function () {
+ return this.$('.acf-radio-list');
+ },
+ $input: function () {
+ return this.$('input:checked');
+ },
+ $inputText: function () {
+ return this.$('input[type="text"]');
+ },
+ getValue: function () {
+ var val = this.$input().val();
+
+ if (val === 'other' && this.get('other_choice')) {
+ val = this.$inputText().val();
+ }
+
+ return val;
+ },
+ onClick: function (e, $el) {
+ // vars
+ var $label = $el.parent('label');
+ var selected = $label.hasClass('selected');
+ var val = $el.val(); // remove previous selected
+
+ this.$('.selected').removeClass('selected'); // add active class
+
+ $label.addClass('selected'); // allow null
+
+ if (this.get('allow_null') && selected) {
+ $label.removeClass('selected');
+ $el.prop('checked', false).trigger('change');
+ val = false;
+ } // other
+
+
+ if (this.get('other_choice')) {
+ // enable
+ if (val === 'other') {
+ this.$inputText().prop('disabled', false); // disable
+ } else {
+ this.$inputText().prop('disabled', true);
+ }
+ }
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'range',
+ events: {
+ 'input input[type="range"]': 'onChange',
+ 'change input': 'onChange'
+ },
+ $input: function () {
+ return this.$('input[type="range"]');
+ },
+ $inputAlt: function () {
+ return this.$('input[type="number"]');
+ },
+ setValue: function (val) {
+ this.busy = true; // Update range input (with change).
+
+ acf.val(this.$input(), val); // Update alt input (without change).
+ // Read in input value to inherit min/max validation.
+
+ acf.val(this.$inputAlt(), this.$input().val(), true);
+ this.busy = false;
+ },
+ onChange: function (e, $el) {
+ if (!this.busy) {
+ this.setValue($el.val());
+ }
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'relationship',
+ events: {
+ 'keypress [data-filter]': 'onKeypressFilter',
+ 'change [data-filter]': 'onChangeFilter',
+ 'keyup [data-filter]': 'onChangeFilter',
+ 'click .choices-list .acf-rel-item': 'onClickAdd',
+ 'click [data-name="remove_item"]': 'onClickRemove'
+ },
+ $control: function () {
+ return this.$('.acf-relationship');
+ },
+ $list: function (list) {
+ return this.$('.' + list + '-list');
+ },
+ $listItems: function (list) {
+ return this.$list(list).find('.acf-rel-item');
+ },
+ $listItem: function (list, id) {
+ return this.$list(list).find('.acf-rel-item[data-id="' + id + '"]');
+ },
+ getValue: function () {
+ var val = [];
+ this.$listItems('values').each(function () {
+ val.push($(this).data('id'));
+ });
+ return val.length ? val : false;
+ },
+ newChoice: function (props) {
+ return ['', '' + props.text + ' ', ' '].join('');
+ },
+ newValue: function (props) {
+ return ['', ' ', '' + props.text, ' ', ' ', ' '].join('');
+ },
+ initialize: function () {
+ // Delay initialization until "interacted with" or "in view".
+ var delayed = this.proxy(acf.once(function () {
+ // Add sortable.
+ this.$list('values').sortable({
+ items: 'li',
+ forceHelperSize: true,
+ forcePlaceholderSize: true,
+ scroll: true,
+ update: this.proxy(function () {
+ this.$input().trigger('change');
+ })
+ }); // Avoid browser remembering old scroll position and add event.
+
+ this.$list('choices').scrollTop(0).on('scroll', this.proxy(this.onScrollChoices)); // Fetch choices.
+
+ this.fetch();
+ })); // Bind "interacted with".
+
+ this.$el.one('mouseover', delayed);
+ this.$el.one('focus', 'input', delayed); // Bind "in view".
+
+ acf.onceInView(this.$el, delayed);
+ },
+ onScrollChoices: function (e) {
+ // bail early if no more results
+ if (this.get('loading') || !this.get('more')) {
+ return;
+ } // Scrolled to bottom
+
+
+ var $list = this.$list('choices');
+ var scrollTop = Math.ceil($list.scrollTop());
+ var scrollHeight = Math.ceil($list[0].scrollHeight);
+ var innerHeight = Math.ceil($list.innerHeight());
+ var paged = this.get('paged') || 1;
+
+ if (scrollTop + innerHeight >= scrollHeight) {
+ // update paged
+ this.set('paged', paged + 1); // fetch
+
+ this.fetch();
+ }
+ },
+ onKeypressFilter: function (e, $el) {
+ // don't submit form
+ if (e.which == 13) {
+ e.preventDefault();
+ }
+ },
+ onChangeFilter: function (e, $el) {
+ // vars
+ var val = $el.val();
+ var filter = $el.data('filter'); // Bail early if filter has not changed
+
+ if (this.get(filter) === val) {
+ return;
+ } // update attr
+
+
+ this.set(filter, val); // reset paged
+
+ this.set('paged', 1); // fetch
+
+ if ($el.is('select')) {
+ this.fetch(); // search must go through timeout
+ } else {
+ this.maybeFetch();
+ }
+ },
+ onClickAdd: function (e, $el) {
+ // vars
+ var val = this.val();
+ var max = parseInt(this.get('max')); // can be added?
+
+ if ($el.hasClass('disabled')) {
+ return false;
+ } // validate
+
+
+ if (max > 0 && val && val.length >= max) {
+ // add notice
+ this.showNotice({
+ text: acf.__('Maximum values reached ( {max} values )').replace('{max}', max),
+ type: 'warning'
+ });
+ return false;
+ } // disable
+
+
+ $el.addClass('disabled'); // add
+
+ var html = this.newValue({
+ id: $el.data('id'),
+ text: $el.html()
+ });
+ this.$list('values').append(html); // trigger change
+
+ this.$input().trigger('change');
+ },
+ onClickRemove: function (e, $el) {
+ // Prevent default here because generic handler wont be triggered.
+ e.preventDefault(); // vars
+
+ var $span = $el.parent();
+ var $li = $span.parent();
+ var id = $span.data('id'); // remove value
+
+ $li.remove(); // show choice
+
+ this.$listItem('choices', id).removeClass('disabled'); // trigger change
+
+ this.$input().trigger('change');
+ },
+ maybeFetch: function () {
+ // vars
+ var timeout = this.get('timeout'); // abort timeout
+
+ if (timeout) {
+ clearTimeout(timeout);
+ } // fetch
+
+
+ timeout = this.setTimeout(this.fetch, 300);
+ this.set('timeout', timeout);
+ },
+ getAjaxData: function () {
+ // load data based on element attributes
+ var ajaxData = this.$control().data();
+
+ for (var name in ajaxData) {
+ ajaxData[name] = this.get(name);
+ } // extra
+
+
+ ajaxData.action = 'acf/fields/relationship/query';
+ ajaxData.field_key = this.get('key'); // Filter.
+
+ ajaxData = acf.applyFilters('relationship_ajax_data', ajaxData, this); // return
+
+ return ajaxData;
+ },
+ fetch: function () {
+ // abort XHR if this field is already loading AJAX data
+ var xhr = this.get('xhr');
+
+ if (xhr) {
+ xhr.abort();
+ } // add to this.o
+
+
+ var ajaxData = this.getAjaxData(); // clear html if is new query
+
+ var $choiceslist = this.$list('choices');
+
+ if (ajaxData.paged == 1) {
+ $choiceslist.html('');
+ } // loading
+
+
+ var $loading = $(' ' + acf.__('Loading') + ' ');
+ $choiceslist.append($loading);
+ this.set('loading', true); // callback
+
+ var onComplete = function () {
+ this.set('loading', false);
+ $loading.remove();
+ };
+
+ var onSuccess = function (json) {
+ // no results
+ if (!json || !json.results || !json.results.length) {
+ // prevent pagination
+ this.set('more', false); // add message
+
+ if (this.get('paged') == 1) {
+ this.$list('choices').append('' + acf.__('No matches found') + ' ');
+ } // return
+
+
+ return;
+ } // set more (allows pagination scroll)
+
+
+ this.set('more', json.more); // get new results
+
+ var html = this.walkChoices(json.results);
+ var $html = $(html); // apply .disabled to left li's
+
+ var val = this.val();
+
+ if (val && val.length) {
+ val.map(function (id) {
+ $html.find('.acf-rel-item[data-id="' + id + '"]').addClass('disabled');
+ });
+ } // append
+
+
+ $choiceslist.append($html); // merge together groups
+
+ var $prevLabel = false;
+ var $prevList = false;
+ $choiceslist.find('.acf-rel-label').each(function () {
+ var $label = $(this);
+ var $list = $label.siblings('ul');
+
+ if ($prevLabel && $prevLabel.text() == $label.text()) {
+ $prevList.append($list.children());
+ $(this).parent().remove();
+ return;
+ } // update vars
+
+
+ $prevLabel = $label;
+ $prevList = $list;
+ });
+ }; // get results
+
+
+ var xhr = $.ajax({
+ url: acf.get('ajaxurl'),
+ dataType: 'json',
+ type: 'post',
+ data: acf.prepareForAjax(ajaxData),
+ context: this,
+ success: onSuccess,
+ complete: onComplete
+ }); // set
+
+ this.set('xhr', xhr);
+ },
+ walkChoices: function (data) {
+ // walker
+ var walk = function (data) {
+ // vars
+ var html = ''; // is array
+
+ if ($.isArray(data)) {
+ data.map(function (item) {
+ html += walk(item);
+ }); // is item
+ } else if ($.isPlainObject(data)) {
+ // group
+ if (data.children !== undefined) {
+ html += '' + acf.escHtml(data.text) + ' ';
+ html += walk(data.children);
+ html += ' '; // single
+ } else {
+ html += '' + acf.escHtml(data.text) + ' ';
+ }
+ } // return
+
+
+ return html;
+ };
+
+ return walk(data);
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'select',
+ select2: false,
+ wait: 'load',
+ events: {
+ 'removeField': 'onRemove',
+ 'duplicateField': 'onDuplicate'
+ },
+ $input: function () {
+ return this.$('select');
+ },
+ initialize: function () {
+ // vars
+ var $select = this.$input(); // inherit data
+
+ this.inherit($select); // select2
+
+ if (this.get('ui')) {
+ // populate ajax_data (allowing custom attribute to already exist)
+ var ajaxAction = this.get('ajax_action');
+
+ if (!ajaxAction) {
+ ajaxAction = 'acf/fields/' + this.get('type') + '/query';
+ } // select2
+
+
+ this.select2 = acf.newSelect2($select, {
+ field: this,
+ ajax: this.get('ajax'),
+ multiple: this.get('multiple'),
+ placeholder: this.get('placeholder'),
+ allowNull: this.get('allow_null'),
+ ajaxAction: ajaxAction
+ });
+ }
+ },
+ onRemove: function () {
+ if (this.select2) {
+ this.select2.destroy();
+ }
+ },
+ onDuplicate: function (e, $el, $duplicate) {
+ if (this.select2) {
+ $duplicate.find('.select2-container').remove();
+ $duplicate.find('select').removeClass('select2-hidden-accessible');
+ }
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ // vars
+ var CONTEXT = 'tab';
+ var Field = acf.Field.extend({
+ type: 'tab',
+ wait: '',
+ tabs: false,
+ tab: false,
+ events: {
+ 'duplicateField': 'onDuplicate'
+ },
+ findFields: function () {
+ return this.$el.nextUntil('.acf-field-tab', '.acf-field');
+ },
+ getFields: function () {
+ return acf.getFields(this.findFields());
+ },
+ findTabs: function () {
+ return this.$el.prevAll('.acf-tab-wrap:first');
+ },
+ findTab: function () {
+ return this.$('.acf-tab-button');
+ },
+ initialize: function () {
+ // bail early if is td
+ if (this.$el.is('td')) {
+ this.events = {};
+ return false;
+ } // vars
+
+
+ var $tabs = this.findTabs();
+ var $tab = this.findTab();
+ var settings = acf.parseArgs($tab.data(), {
+ endpoint: false,
+ placement: '',
+ before: this.$el
+ }); // create wrap
+
+ if (!$tabs.length || settings.endpoint) {
+ this.tabs = new Tabs(settings);
+ } else {
+ this.tabs = $tabs.data('acf');
+ } // add tab
+
+
+ this.tab = this.tabs.addTab($tab, this);
+ },
+ isActive: function () {
+ return this.tab.isActive();
+ },
+ showFields: function () {
+ // show fields
+ this.getFields().map(function (field) {
+ field.show(this.cid, CONTEXT);
+ field.hiddenByTab = false;
+ }, this);
+ },
+ hideFields: function () {
+ // hide fields
+ this.getFields().map(function (field) {
+ field.hide(this.cid, CONTEXT);
+ field.hiddenByTab = this.tab;
+ }, this);
+ },
+ show: function (lockKey) {
+ // show field and store result
+ var visible = acf.Field.prototype.show.apply(this, arguments); // check if now visible
+
+ if (visible) {
+ // show tab
+ this.tab.show(); // check active tabs
+
+ this.tabs.refresh();
+ } // return
+
+
+ return visible;
+ },
+ hide: function (lockKey) {
+ // hide field and store result
+ var hidden = acf.Field.prototype.hide.apply(this, arguments); // check if now hidden
+
+ if (hidden) {
+ // hide tab
+ this.tab.hide(); // reset tabs if this was active
+
+ if (this.isActive()) {
+ this.tabs.reset();
+ }
+ } // return
+
+
+ return hidden;
+ },
+ enable: function (lockKey) {
+ // enable fields
+ this.getFields().map(function (field) {
+ field.enable(CONTEXT);
+ });
+ },
+ disable: function (lockKey) {
+ // disable fields
+ this.getFields().map(function (field) {
+ field.disable(CONTEXT);
+ });
+ },
+ onDuplicate: function (e, $el, $duplicate) {
+ if (this.isActive()) {
+ $duplicate.prevAll('.acf-tab-wrap:first').remove();
+ }
+ }
+ });
+ acf.registerFieldType(Field);
+ /**
+ * tabs
+ *
+ * description
+ *
+ * @date 8/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var i = 0;
+ var Tabs = acf.Model.extend({
+ tabs: [],
+ active: false,
+ actions: {
+ 'refresh': 'onRefresh'
+ },
+ data: {
+ before: false,
+ placement: 'top',
+ index: 0,
+ initialized: false
+ },
+ setup: function (settings) {
+ // data
+ $.extend(this.data, settings); // define this prop to avoid scope issues
+
+ this.tabs = [];
+ this.active = false; // vars
+
+ var placement = this.get('placement');
+ var $before = this.get('before');
+ var $parent = $before.parent(); // add sidebar for left placement
+
+ if (placement == 'left' && $parent.hasClass('acf-fields')) {
+ $parent.addClass('-sidebar');
+ } // create wrap
+
+
+ if ($before.is('tr')) {
+ this.$el = $(' ');
+ } else {
+ this.$el = $('');
+ } // append
+
+
+ $before.before(this.$el); // set index
+
+ this.set('index', i, true);
+ i++;
+ },
+ initializeTabs: function () {
+ // find first visible tab
+ var tab = this.getVisible().shift(); // remember previous tab state
+
+ var order = acf.getPreference('this.tabs') || [];
+ var groupIndex = this.get('index');
+ var tabIndex = order[groupIndex];
+
+ if (this.tabs[tabIndex] && this.tabs[tabIndex].isVisible()) {
+ tab = this.tabs[tabIndex];
+ } // select
+
+
+ if (tab) {
+ this.selectTab(tab);
+ } else {
+ this.closeTabs();
+ } // set local variable used by tabsManager
+
+
+ this.set('initialized', true);
+ },
+ getVisible: function () {
+ return this.tabs.filter(function (tab) {
+ return tab.isVisible();
+ });
+ },
+ getActive: function () {
+ return this.active;
+ },
+ setActive: function (tab) {
+ return this.active = tab;
+ },
+ hasActive: function () {
+ return this.active !== false;
+ },
+ isActive: function (tab) {
+ var active = this.getActive();
+ return active && active.cid === tab.cid;
+ },
+ closeActive: function () {
+ if (this.hasActive()) {
+ this.closeTab(this.getActive());
+ }
+ },
+ openTab: function (tab) {
+ // close existing tab
+ this.closeActive(); // open
+
+ tab.open(); // set active
+
+ this.setActive(tab);
+ },
+ closeTab: function (tab) {
+ // close
+ tab.close(); // set active
+
+ this.setActive(false);
+ },
+ closeTabs: function () {
+ this.tabs.map(this.closeTab, this);
+ },
+ selectTab: function (tab) {
+ // close other tabs
+ this.tabs.map(function (t) {
+ if (tab.cid !== t.cid) {
+ this.closeTab(t);
+ }
+ }, this); // open
+
+ this.openTab(tab);
+ },
+ addTab: function ($a, field) {
+ // create
+ var $li = $(' ' + $a.outerHTML() + ' '); // append
+
+ this.$('ul').append($li); // initialize
+
+ var tab = new Tab({
+ $el: $li,
+ field: field,
+ group: this
+ }); // store
+
+ this.tabs.push(tab); // return
+
+ return tab;
+ },
+ reset: function () {
+ // close existing tab
+ this.closeActive(); // find and active a tab
+
+ return this.refresh();
+ },
+ refresh: function () {
+ // bail early if active already exists
+ if (this.hasActive()) {
+ return false;
+ } // find next active tab
+
+
+ var tab = this.getVisible().shift(); // open tab
+
+ if (tab) {
+ this.openTab(tab);
+ } // return
+
+
+ return tab;
+ },
+ onRefresh: function () {
+ // only for left placements
+ if (this.get('placement') !== 'left') {
+ return;
+ } // vars
+
+
+ var $parent = this.$el.parent();
+ var $list = this.$el.children('ul');
+ var attribute = $parent.is('td') ? 'height' : 'min-height'; // find height (minus 1 for border-bottom)
+
+ var height = $list.position().top + $list.outerHeight(true) - 1; // add css
+
+ $parent.css(attribute, height);
+ }
+ });
+ var Tab = acf.Model.extend({
+ group: false,
+ field: false,
+ events: {
+ 'click a': 'onClick'
+ },
+ index: function () {
+ return this.$el.index();
+ },
+ isVisible: function () {
+ return acf.isVisible(this.$el);
+ },
+ isActive: function () {
+ return this.$el.hasClass('active');
+ },
+ open: function () {
+ // add class
+ this.$el.addClass('active'); // show field
+
+ this.field.showFields();
+ },
+ close: function () {
+ // remove class
+ this.$el.removeClass('active'); // hide field
+
+ this.field.hideFields();
+ },
+ onClick: function (e, $el) {
+ // prevent default
+ e.preventDefault(); // toggle
+
+ this.toggle();
+ },
+ toggle: function () {
+ // bail early if already active
+ if (this.isActive()) {
+ return;
+ } // toggle this tab
+
+
+ this.group.openTab(this);
+ }
+ });
+ var tabsManager = new acf.Model({
+ priority: 50,
+ actions: {
+ 'prepare': 'render',
+ 'append': 'render',
+ 'unload': 'onUnload',
+ 'invalid_field': 'onInvalidField'
+ },
+ findTabs: function () {
+ return $('.acf-tab-wrap');
+ },
+ getTabs: function () {
+ return acf.getInstances(this.findTabs());
+ },
+ render: function ($el) {
+ this.getTabs().map(function (tabs) {
+ if (!tabs.get('initialized')) {
+ tabs.initializeTabs();
+ }
+ });
+ },
+ onInvalidField: function (field) {
+ // bail early if busy
+ if (this.busy) {
+ return;
+ } // ignore if not hidden by tab
+
+
+ if (!field.hiddenByTab) {
+ return;
+ } // toggle tab
+
+
+ field.hiddenByTab.toggle(); // ignore other invalid fields
+
+ this.busy = true;
+ this.setTimeout(function () {
+ this.busy = false;
+ }, 100);
+ },
+ onUnload: function () {
+ // vars
+ var order = []; // loop
+
+ this.getTabs().map(function (group) {
+ var active = group.hasActive() ? group.getActive().index() : 0;
+ order.push(active);
+ }); // bail if no tabs
+
+ if (!order.length) {
+ return;
+ } // update
+
+
+ acf.setPreference('this.tabs', order);
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.models.SelectField.extend({
+ type: 'post_object'
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.models.SelectField.extend({
+ type: 'page_link'
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.models.SelectField.extend({
+ type: 'user'
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'taxonomy',
+ data: {
+ 'ftype': 'select'
+ },
+ select2: false,
+ wait: 'load',
+ events: {
+ 'click a[data-name="add"]': 'onClickAdd',
+ 'click input[type="radio"]': 'onClickRadio',
+ 'removeField': 'onRemove'
+ },
+ $control: function () {
+ return this.$('.acf-taxonomy-field');
+ },
+ $input: function () {
+ return this.getRelatedPrototype().$input.apply(this, arguments);
+ },
+ getRelatedType: function () {
+ // vars
+ var fieldType = this.get('ftype'); // normalize
+
+ if (fieldType == 'multi_select') {
+ fieldType = 'select';
+ } // return
+
+
+ return fieldType;
+ },
+ getRelatedPrototype: function () {
+ return acf.getFieldType(this.getRelatedType()).prototype;
+ },
+ getValue: function () {
+ return this.getRelatedPrototype().getValue.apply(this, arguments);
+ },
+ setValue: function () {
+ return this.getRelatedPrototype().setValue.apply(this, arguments);
+ },
+ initialize: function () {
+ this.getRelatedPrototype().initialize.apply(this, arguments);
+ },
+ onRemove: function () {
+ var proto = this.getRelatedPrototype();
+
+ if (proto.onRemove) {
+ proto.onRemove.apply(this, arguments);
+ }
+ },
+ onClickAdd: function (e, $el) {
+ // vars
+ var field = this;
+ var popup = false;
+ var $form = false;
+ var $name = false;
+ var $parent = false;
+ var $button = false;
+ var $message = false;
+ var notice = false; // step 1.
+
+ var step1 = function () {
+ // popup
+ popup = acf.newPopup({
+ title: $el.attr('title'),
+ loading: true,
+ width: '300px'
+ }); // ajax
+
+ var ajaxData = {
+ action: 'acf/fields/taxonomy/add_term',
+ field_key: field.get('key')
+ }; // get HTML
+
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'html',
+ success: step2
+ });
+ }; // step 2.
+
+
+ var step2 = function (html) {
+ // update popup
+ popup.loading(false);
+ popup.content(html); // vars
+
+ $form = popup.$('form');
+ $name = popup.$('input[name="term_name"]');
+ $parent = popup.$('select[name="term_parent"]');
+ $button = popup.$('.acf-submit-button'); // focus
+
+ $name.trigger('focus'); // submit form
+
+ popup.on('submit', 'form', step3);
+ }; // step 3.
+
+
+ var step3 = function (e, $el) {
+ // prevent
+ e.preventDefault();
+ e.stopImmediatePropagation(); // basic validation
+
+ if ($name.val() === '') {
+ $name.trigger('focus');
+ return false;
+ } // disable
+
+
+ acf.startButtonLoading($button); // ajax
+
+ var ajaxData = {
+ action: 'acf/fields/taxonomy/add_term',
+ field_key: field.get('key'),
+ term_name: $name.val(),
+ term_parent: $parent.length ? $parent.val() : 0
+ };
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'json',
+ success: step4
+ });
+ }; // step 4.
+
+
+ var step4 = function (json) {
+ // enable
+ acf.stopButtonLoading($button); // remove prev notice
+
+ if (notice) {
+ notice.remove();
+ } // success
+
+
+ if (acf.isAjaxSuccess(json)) {
+ // clear name
+ $name.val(''); // update term lists
+
+ step5(json.data); // notice
+
+ notice = acf.newNotice({
+ type: 'success',
+ text: acf.getAjaxMessage(json),
+ target: $form,
+ timeout: 2000,
+ dismiss: false
+ });
+ } else {
+ // notice
+ notice = acf.newNotice({
+ type: 'error',
+ text: acf.getAjaxError(json),
+ target: $form,
+ timeout: 2000,
+ dismiss: false
+ });
+ } // focus
+
+
+ $name.trigger('focus');
+ }; // step 5.
+
+
+ var step5 = function (term) {
+ // update parent dropdown
+ var $option = $('' + term.term_label + ' ');
+
+ if (term.term_parent) {
+ $parent.children('option[value="' + term.term_parent + '"]').after($option);
+ } else {
+ $parent.append($option);
+ } // add this new term to all taxonomy field
+
+
+ var fields = acf.getFields({
+ type: 'taxonomy'
+ });
+ fields.map(function (otherField) {
+ if (otherField.get('taxonomy') == field.get('taxonomy')) {
+ otherField.appendTerm(term);
+ }
+ }); // select
+
+ field.selectTerm(term.term_id);
+ }; // run
+
+
+ step1();
+ },
+ appendTerm: function (term) {
+ if (this.getRelatedType() == 'select') {
+ this.appendTermSelect(term);
+ } else {
+ this.appendTermCheckbox(term);
+ }
+ },
+ appendTermSelect: function (term) {
+ this.select2.addOption({
+ id: term.term_id,
+ text: term.term_label
+ });
+ },
+ appendTermCheckbox: function (term) {
+ // vars
+ var name = this.$('[name]:first').attr('name');
+ var $ul = this.$('ul:first'); // allow multiple selection
+
+ if (this.getRelatedType() == 'checkbox') {
+ name += '[]';
+ } // create new li
+
+
+ var $li = $(['', '', ' ', '' + term.term_name + ' ', ' ', ' '].join('')); // find parent
+
+ if (term.term_parent) {
+ // vars
+ var $parent = $ul.find('li[data-id="' + term.term_parent + '"]'); // update vars
+
+ $ul = $parent.children('ul'); // create ul
+
+ if (!$ul.exists()) {
+ $ul = $('');
+ $parent.append($ul);
+ }
+ } // append
+
+
+ $ul.append($li);
+ },
+ selectTerm: function (id) {
+ if (this.getRelatedType() == 'select') {
+ this.select2.selectOption(id);
+ } else {
+ var $input = this.$('input[value="' + id + '"]');
+ $input.prop('checked', true).trigger('change');
+ }
+ },
+ onClickRadio: function (e, $el) {
+ // vars
+ var $label = $el.parent('label');
+ var selected = $label.hasClass('selected'); // remove previous selected
+
+ this.$('.selected').removeClass('selected'); // add active class
+
+ $label.addClass('selected'); // allow null
+
+ if (this.get('allow_null') && selected) {
+ $label.removeClass('selected');
+ $el.prop('checked', false).trigger('change');
+ }
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.models.DatePickerField.extend({
+ type: 'time_picker',
+ $control: function () {
+ return this.$('.acf-time-picker');
+ },
+ initialize: function () {
+ // vars
+ var $input = this.$input();
+ var $inputText = this.$inputText(); // args
+
+ var args = {
+ timeFormat: this.get('time_format'),
+ altField: $input,
+ altFieldTimeOnly: false,
+ altTimeFormat: 'HH:mm:ss',
+ showButtonPanel: true,
+ controlType: 'select',
+ oneLine: true,
+ closeText: acf.get('dateTimePickerL10n').selectText,
+ timeOnly: true
+ }; // add custom 'Close = Select' functionality
+
+ args.onClose = function (value, dp_instance, t_instance) {
+ // vars
+ var $close = dp_instance.dpDiv.find('.ui-datepicker-close'); // if clicking close button
+
+ if (!value && $close.is(':hover')) {
+ t_instance._updateDateTime();
+ }
+ }; // filter
+
+
+ args = acf.applyFilters('time_picker_args', args, this); // add date time picker
+
+ acf.newTimePicker($inputText, args); // action
+
+ acf.doAction('time_picker_init', $inputText, args, this);
+ }
+ });
+ acf.registerFieldType(Field); // add
+
+ acf.newTimePicker = function ($input, args) {
+ // bail ealry if no datepicker library
+ if (typeof $.timepicker === 'undefined') {
+ return false;
+ } // defaults
+
+
+ args = args || {}; // initialize
+
+ $input.timepicker(args); // wrap the datepicker (only if it hasn't already been wrapped)
+
+ if ($('body > #ui-datepicker-div').exists()) {
+ $('body > #ui-datepicker-div').wrap('
');
+ }
+ };
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'true_false',
+ events: {
+ 'change .acf-switch-input': 'onChange',
+ 'focus .acf-switch-input': 'onFocus',
+ 'blur .acf-switch-input': 'onBlur',
+ 'keypress .acf-switch-input': 'onKeypress'
+ },
+ $input: function () {
+ return this.$('input[type="checkbox"]');
+ },
+ $switch: function () {
+ return this.$('.acf-switch');
+ },
+ getValue: function () {
+ return this.$input().prop('checked') ? 1 : 0;
+ },
+ initialize: function () {
+ this.render();
+ },
+ render: function () {
+ // vars
+ var $switch = this.$switch(); // bail ealry if no $switch
+
+ if (!$switch.length) return; // vars
+
+ var $on = $switch.children('.acf-switch-on');
+ var $off = $switch.children('.acf-switch-off');
+ var width = Math.max($on.width(), $off.width()); // bail ealry if no width
+
+ if (!width) return; // set widths
+
+ $on.css('min-width', width);
+ $off.css('min-width', width);
+ },
+ switchOn: function () {
+ this.$input().prop('checked', true);
+ this.$switch().addClass('-on');
+ },
+ switchOff: function () {
+ this.$input().prop('checked', false);
+ this.$switch().removeClass('-on');
+ },
+ onChange: function (e, $el) {
+ if ($el.prop('checked')) {
+ this.switchOn();
+ } else {
+ this.switchOff();
+ }
+ },
+ onFocus: function (e, $el) {
+ this.$switch().addClass('-focus');
+ },
+ onBlur: function (e, $el) {
+ this.$switch().removeClass('-focus');
+ },
+ onKeypress: function (e, $el) {
+ // left
+ if (e.keyCode === 37) {
+ return this.switchOff();
+ } // right
+
+
+ if (e.keyCode === 39) {
+ return this.switchOn();
+ }
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'url',
+ events: {
+ 'keyup input[type="url"]': 'onkeyup'
+ },
+ $control: function () {
+ return this.$('.acf-input-wrap');
+ },
+ $input: function () {
+ return this.$('input[type="url"]');
+ },
+ initialize: function () {
+ this.render();
+ },
+ isValid: function () {
+ // vars
+ var val = this.val(); // bail early if no val
+
+ if (!val) {
+ return false;
+ } // url
+
+
+ if (val.indexOf('://') !== -1) {
+ return true;
+ } // protocol relative url
+
+
+ if (val.indexOf('//') === 0) {
+ return true;
+ } // return
+
+
+ return false;
+ },
+ render: function () {
+ // add class
+ if (this.isValid()) {
+ this.$control().addClass('-valid');
+ } else {
+ this.$control().removeClass('-valid');
+ }
+ },
+ onkeyup: function (e, $el) {
+ this.render();
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ var Field = acf.Field.extend({
+ type: 'wysiwyg',
+ wait: 'load',
+ events: {
+ 'mousedown .acf-editor-wrap.delay': 'onMousedown',
+ 'unmountField': 'disableEditor',
+ 'remountField': 'enableEditor',
+ 'removeField': 'disableEditor'
+ },
+ $control: function () {
+ return this.$('.acf-editor-wrap');
+ },
+ $input: function () {
+ return this.$('textarea');
+ },
+ getMode: function () {
+ return this.$control().hasClass('tmce-active') ? 'visual' : 'text';
+ },
+ initialize: function () {
+ // initializeEditor if no delay
+ if (!this.$control().hasClass('delay')) {
+ this.initializeEditor();
+ }
+ },
+ initializeEditor: function () {
+ // vars
+ var $wrap = this.$control();
+ var $textarea = this.$input();
+ var args = {
+ tinymce: true,
+ quicktags: true,
+ toolbar: this.get('toolbar'),
+ mode: this.getMode(),
+ field: this
+ }; // generate new id
+
+ var oldId = $textarea.attr('id');
+ var newId = acf.uniqueId('acf-editor-'); // Backup textarea data.
+
+ var inputData = $textarea.data();
+ var inputVal = $textarea.val(); // rename
+
+ acf.rename({
+ target: $wrap,
+ search: oldId,
+ replace: newId,
+ destructive: true
+ }); // update id
+
+ this.set('id', newId, true); // apply data to new textarea (acf.rename creates a new textarea element due to destructive mode)
+ // fixes bug where conditional logic "disabled" is lost during "screen_check"
+
+ this.$input().data(inputData).val(inputVal); // initialize
+
+ acf.tinymce.initialize(newId, args);
+ },
+ onMousedown: function (e) {
+ // prevent default
+ e.preventDefault(); // remove delay class
+
+ var $wrap = this.$control();
+ $wrap.removeClass('delay');
+ $wrap.find('.acf-editor-toolbar').remove(); // initialize
+
+ this.initializeEditor();
+ },
+ enableEditor: function () {
+ if (this.getMode() == 'visual') {
+ acf.tinymce.enable(this.get('id'));
+ }
+ },
+ disableEditor: function () {
+ acf.tinymce.destroy(this.get('id'));
+ }
+ });
+ acf.registerFieldType(Field);
+})(jQuery);
+
+(function ($, undefined) {
+ // vars
+ var storage = [];
+ /**
+ * acf.Condition
+ *
+ * description
+ *
+ * @date 23/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.Condition = acf.Model.extend({
+ type: '',
+ // used for model name
+ operator: '==',
+ // rule operator
+ label: '',
+ // label shown when editing fields
+ choiceType: 'input',
+ // input, select
+ fieldTypes: [],
+ // auto connect this conditions with these field types
+ data: {
+ conditions: false,
+ // the parent instance
+ field: false,
+ // the field which we query against
+ rule: {} // the rule [field, operator, value]
+
+ },
+ events: {
+ 'change': 'change',
+ 'keyup': 'change',
+ 'enableField': 'change',
+ 'disableField': 'change'
+ },
+ setup: function (props) {
+ $.extend(this.data, props);
+ },
+ getEventTarget: function ($el, event) {
+ return $el || this.get('field').$el;
+ },
+ change: function (e, $el) {
+ this.get('conditions').change(e);
+ },
+ match: function (rule, field) {
+ return false;
+ },
+ calculate: function () {
+ return this.match(this.get('rule'), this.get('field'));
+ },
+ choices: function (field) {
+ return ' ';
+ }
+ });
+ /**
+ * acf.newCondition
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.newCondition = function (rule, conditions) {
+ // currently setting up conditions for fieldX, this field is the 'target'
+ var target = conditions.get('field'); // use the 'target' to find the 'trigger' field.
+ // - this field is used to setup the conditional logic events
+
+ var field = target.getField(rule.field); // bail ealry if no target or no field (possible if field doesn't exist due to HTML error)
+
+ if (!target || !field) {
+ return false;
+ } // vars
+
+
+ var args = {
+ rule: rule,
+ target: target,
+ conditions: conditions,
+ field: field
+ }; // vars
+
+ var fieldType = field.get('type');
+ var operator = rule.operator; // get avaibale conditions
+
+ var conditionTypes = acf.getConditionTypes({
+ fieldType: fieldType,
+ operator: operator
+ }); // instantiate
+
+ var model = conditionTypes[0] || acf.Condition; // instantiate
+
+ var condition = new model(args); // return
+
+ return condition;
+ };
+ /**
+ * mid
+ *
+ * Calculates the model ID for a field type
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param string type
+ * @return string
+ */
+
+
+ var modelId = function (type) {
+ return acf.strPascalCase(type || '') + 'Condition';
+ };
+ /**
+ * acf.registerConditionType
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.registerConditionType = function (model) {
+ // vars
+ var proto = model.prototype;
+ var type = proto.type;
+ var mid = modelId(type); // store model
+
+ acf.models[mid] = model; // store reference
+
+ storage.push(type);
+ };
+ /**
+ * acf.getConditionType
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.getConditionType = function (type) {
+ var mid = modelId(type);
+ return acf.models[mid] || false;
+ };
+ /**
+ * acf.registerConditionForFieldType
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.registerConditionForFieldType = function (conditionType, fieldType) {
+ // get model
+ var model = acf.getConditionType(conditionType); // append
+
+ if (model) {
+ model.prototype.fieldTypes.push(fieldType);
+ }
+ };
+ /**
+ * acf.getConditionTypes
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.getConditionTypes = function (args) {
+ // defaults
+ args = acf.parseArgs(args, {
+ fieldType: '',
+ operator: ''
+ }); // clonse available types
+
+ var types = []; // loop
+
+ storage.map(function (type) {
+ // vars
+ var model = acf.getConditionType(type);
+ var ProtoFieldTypes = model.prototype.fieldTypes;
+ var ProtoOperator = model.prototype.operator; // check fieldType
+
+ if (args.fieldType && ProtoFieldTypes.indexOf(args.fieldType) === -1) {
+ return;
+ } // check operator
+
+
+ if (args.operator && ProtoOperator !== args.operator) {
+ return;
+ } // append
+
+
+ types.push(model);
+ }); // return
+
+ return types;
+ };
+})(jQuery);
+
+(function ($, undefined) {
+ // vars
+ var CONTEXT = 'conditional_logic';
+ /**
+ * conditionsManager
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var conditionsManager = new acf.Model({
+ id: 'conditionsManager',
+ priority: 20,
+ // run actions later
+ actions: {
+ 'new_field': 'onNewField'
+ },
+ onNewField: function (field) {
+ if (field.has('conditions')) {
+ field.getConditions().render();
+ }
+ }
+ });
+ /**
+ * acf.Field.prototype.getField
+ *
+ * Finds a field that is related to another field
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var getSiblingField = function (field, key) {
+ // find sibling (very fast)
+ var fields = acf.getFields({
+ key: key,
+ sibling: field.$el,
+ suppressFilters: true
+ }); // find sibling-children (fast)
+ // needed for group fields, accordions, etc
+
+ if (!fields.length) {
+ fields = acf.getFields({
+ key: key,
+ parent: field.$el.parent(),
+ suppressFilters: true
+ });
+ } // return
+
+
+ if (fields.length) {
+ return fields[0];
+ }
+
+ return false;
+ };
+
+ acf.Field.prototype.getField = function (key) {
+ // get sibling field
+ var field = getSiblingField(this, key); // return early
+
+ if (field) {
+ return field;
+ } // move up through each parent and try again
+
+
+ var parents = this.parents();
+
+ for (var i = 0; i < parents.length; i++) {
+ // get sibling field
+ field = getSiblingField(parents[i], key); // return early
+
+ if (field) {
+ return field;
+ }
+ } // return
+
+
+ return false;
+ };
+ /**
+ * acf.Field.prototype.getConditions
+ *
+ * Returns the field's conditions instance
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.Field.prototype.getConditions = function () {
+ // instantiate
+ if (!this.conditions) {
+ this.conditions = new Conditions(this);
+ } // return
+
+
+ return this.conditions;
+ };
+ /**
+ * Conditions
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ var timeout = false;
+ var Conditions = acf.Model.extend({
+ id: 'Conditions',
+ data: {
+ field: false,
+ // The field with "data-conditions" (target).
+ timeStamp: false,
+ // Reference used during "change" event.
+ groups: [] // The groups of condition instances.
+
+ },
+ setup: function (field) {
+ // data
+ this.data.field = field; // vars
+
+ var conditions = field.get('conditions'); // detect groups
+
+ if (conditions instanceof Array) {
+ // detect groups
+ if (conditions[0] instanceof Array) {
+ // loop
+ conditions.map(function (rules, i) {
+ this.addRules(rules, i);
+ }, this); // detect rules
+ } else {
+ this.addRules(conditions);
+ } // detect rule
+
+ } else {
+ this.addRule(conditions);
+ }
+ },
+ change: function (e) {
+ // this function may be triggered multiple times per event due to multiple condition classes
+ // compare timestamp to allow only 1 trigger per event
+ if (this.get('timeStamp') === e.timeStamp) {
+ return false;
+ } else {
+ this.set('timeStamp', e.timeStamp, true);
+ } // render condition and store result
+
+
+ var changed = this.render();
+ },
+ render: function () {
+ return this.calculate() ? this.show() : this.hide();
+ },
+ show: function () {
+ return this.get('field').showEnable(this.cid, CONTEXT);
+ },
+ hide: function () {
+ return this.get('field').hideDisable(this.cid, CONTEXT);
+ },
+ calculate: function () {
+ // vars
+ var pass = false; // loop
+
+ this.getGroups().map(function (group) {
+ // igrnore this group if another group passed
+ if (pass) return; // find passed
+
+ var passed = group.filter(function (condition) {
+ return condition.calculate();
+ }); // if all conditions passed, update the global var
+
+ if (passed.length == group.length) {
+ pass = true;
+ }
+ });
+ return pass;
+ },
+ hasGroups: function () {
+ return this.data.groups != null;
+ },
+ getGroups: function () {
+ return this.data.groups;
+ },
+ addGroup: function () {
+ var group = [];
+ this.data.groups.push(group);
+ return group;
+ },
+ hasGroup: function (i) {
+ return this.data.groups[i] != null;
+ },
+ getGroup: function (i) {
+ return this.data.groups[i];
+ },
+ removeGroup: function (i) {
+ this.data.groups[i].delete;
+ return this;
+ },
+ addRules: function (rules, group) {
+ rules.map(function (rule) {
+ this.addRule(rule, group);
+ }, this);
+ },
+ addRule: function (rule, group) {
+ // defaults
+ group = group || 0; // vars
+
+ var groupArray; // get group
+
+ if (this.hasGroup(group)) {
+ groupArray = this.getGroup(group);
+ } else {
+ groupArray = this.addGroup();
+ } // instantiate
+
+
+ var condition = acf.newCondition(rule, this); // bail ealry if condition failed (field did not exist)
+
+ if (!condition) {
+ return false;
+ } // add rule
+
+
+ groupArray.push(condition);
+ },
+ hasRule: function () {},
+ getRule: function (rule, group) {
+ // defaults
+ rule = rule || 0;
+ group = group || 0;
+ return this.data.groups[group][rule];
+ },
+ removeRule: function () {}
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ var __ = acf.__;
+
+ var parseString = function (val) {
+ return val ? '' + val : '';
+ };
+
+ var isEqualTo = function (v1, v2) {
+ return parseString(v1).toLowerCase() === parseString(v2).toLowerCase();
+ };
+
+ var isEqualToNumber = function (v1, v2) {
+ return parseFloat(v1) === parseFloat(v2);
+ };
+
+ var isGreaterThan = function (v1, v2) {
+ return parseFloat(v1) > parseFloat(v2);
+ };
+
+ var isLessThan = function (v1, v2) {
+ return parseFloat(v1) < parseFloat(v2);
+ };
+
+ var inArray = function (v1, array) {
+ // cast all values as string
+ array = array.map(function (v2) {
+ return parseString(v2);
+ });
+ return array.indexOf(v1) > -1;
+ };
+
+ var containsString = function (haystack, needle) {
+ return parseString(haystack).indexOf(parseString(needle)) > -1;
+ };
+
+ var matchesPattern = function (v1, pattern) {
+ var regexp = new RegExp(parseString(pattern), 'gi');
+ return parseString(v1).match(regexp);
+ };
+ /**
+ * hasValue
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+
+ var HasValue = acf.Condition.extend({
+ type: 'hasValue',
+ operator: '!=empty',
+ label: __('Has any value'),
+ fieldTypes: ['text', 'textarea', 'number', 'range', 'email', 'url', 'password', 'image', 'file', 'wysiwyg', 'oembed', 'select', 'checkbox', 'radio', 'button_group', 'link', 'post_object', 'page_link', 'relationship', 'taxonomy', 'user', 'google_map', 'date_picker', 'date_time_picker', 'time_picker', 'color_picker'],
+ match: function (rule, field) {
+ return field.val() ? true : false;
+ },
+ choices: function (fieldObject) {
+ return ' ';
+ }
+ });
+ acf.registerConditionType(HasValue);
+ /**
+ * hasValue
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var HasNoValue = HasValue.extend({
+ type: 'hasNoValue',
+ operator: '==empty',
+ label: __('Has no value'),
+ match: function (rule, field) {
+ return !HasValue.prototype.match.apply(this, arguments);
+ }
+ });
+ acf.registerConditionType(HasNoValue);
+ /**
+ * EqualTo
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var EqualTo = acf.Condition.extend({
+ type: 'equalTo',
+ operator: '==',
+ label: __('Value is equal to'),
+ fieldTypes: ['text', 'textarea', 'number', 'range', 'email', 'url', 'password'],
+ match: function (rule, field) {
+ if (acf.isNumeric(rule.value)) {
+ return isEqualToNumber(rule.value, field.val());
+ } else {
+ return isEqualTo(rule.value, field.val());
+ }
+ },
+ choices: function (fieldObject) {
+ return ' ';
+ }
+ });
+ acf.registerConditionType(EqualTo);
+ /**
+ * NotEqualTo
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var NotEqualTo = EqualTo.extend({
+ type: 'notEqualTo',
+ operator: '!=',
+ label: __('Value is not equal to'),
+ match: function (rule, field) {
+ return !EqualTo.prototype.match.apply(this, arguments);
+ }
+ });
+ acf.registerConditionType(NotEqualTo);
+ /**
+ * PatternMatch
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var PatternMatch = acf.Condition.extend({
+ type: 'patternMatch',
+ operator: '==pattern',
+ label: __('Value matches pattern'),
+ fieldTypes: ['text', 'textarea', 'email', 'url', 'password', 'wysiwyg'],
+ match: function (rule, field) {
+ return matchesPattern(field.val(), rule.value);
+ },
+ choices: function (fieldObject) {
+ return ' ';
+ }
+ });
+ acf.registerConditionType(PatternMatch);
+ /**
+ * Contains
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var Contains = acf.Condition.extend({
+ type: 'contains',
+ operator: '==contains',
+ label: __('Value contains'),
+ fieldTypes: ['text', 'textarea', 'number', 'email', 'url', 'password', 'wysiwyg', 'oembed', 'select'],
+ match: function (rule, field) {
+ return containsString(field.val(), rule.value);
+ },
+ choices: function (fieldObject) {
+ return ' ';
+ }
+ });
+ acf.registerConditionType(Contains);
+ /**
+ * TrueFalseEqualTo
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var TrueFalseEqualTo = EqualTo.extend({
+ type: 'trueFalseEqualTo',
+ choiceType: 'select',
+ fieldTypes: ['true_false'],
+ choices: function (field) {
+ return [{
+ id: 1,
+ text: __('Checked')
+ }];
+ }
+ });
+ acf.registerConditionType(TrueFalseEqualTo);
+ /**
+ * TrueFalseNotEqualTo
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var TrueFalseNotEqualTo = NotEqualTo.extend({
+ type: 'trueFalseNotEqualTo',
+ choiceType: 'select',
+ fieldTypes: ['true_false'],
+ choices: function (field) {
+ return [{
+ id: 1,
+ text: __('Checked')
+ }];
+ }
+ });
+ acf.registerConditionType(TrueFalseNotEqualTo);
+ /**
+ * SelectEqualTo
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var SelectEqualTo = acf.Condition.extend({
+ type: 'selectEqualTo',
+ operator: '==',
+ label: __('Value is equal to'),
+ fieldTypes: ['select', 'checkbox', 'radio', 'button_group'],
+ match: function (rule, field) {
+ var val = field.val();
+
+ if (val instanceof Array) {
+ return inArray(rule.value, val);
+ } else {
+ return isEqualTo(rule.value, val);
+ }
+ },
+ choices: function (fieldObject) {
+ // vars
+ var choices = [];
+ var lines = fieldObject.$setting('choices textarea').val().split("\n"); // allow null
+
+ if (fieldObject.$input('allow_null').prop('checked')) {
+ choices.push({
+ id: '',
+ text: __('Null')
+ });
+ } // loop
+
+
+ lines.map(function (line) {
+ // split
+ line = line.split(':'); // default label to value
+
+ line[1] = line[1] || line[0]; // append
+
+ choices.push({
+ id: line[0].trim(),
+ text: line[1].trim()
+ });
+ }); // return
+
+ return choices;
+ }
+ });
+ acf.registerConditionType(SelectEqualTo);
+ /**
+ * SelectNotEqualTo
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var SelectNotEqualTo = SelectEqualTo.extend({
+ type: 'selectNotEqualTo',
+ operator: '!=',
+ label: __('Value is not equal to'),
+ match: function (rule, field) {
+ return !SelectEqualTo.prototype.match.apply(this, arguments);
+ }
+ });
+ acf.registerConditionType(SelectNotEqualTo);
+ /**
+ * GreaterThan
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var GreaterThan = acf.Condition.extend({
+ type: 'greaterThan',
+ operator: '>',
+ label: __('Value is greater than'),
+ fieldTypes: ['number', 'range'],
+ match: function (rule, field) {
+ var val = field.val();
+
+ if (val instanceof Array) {
+ val = val.length;
+ }
+
+ return isGreaterThan(val, rule.value);
+ },
+ choices: function (fieldObject) {
+ return ' ';
+ }
+ });
+ acf.registerConditionType(GreaterThan);
+ /**
+ * LessThan
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var LessThan = GreaterThan.extend({
+ type: 'lessThan',
+ operator: '<',
+ label: __('Value is less than'),
+ match: function (rule, field) {
+ var val = field.val();
+
+ if (val instanceof Array) {
+ val = val.length;
+ }
+
+ return isLessThan(val, rule.value);
+ },
+ choices: function (fieldObject) {
+ return ' ';
+ }
+ });
+ acf.registerConditionType(LessThan);
+ /**
+ * SelectedGreaterThan
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var SelectionGreaterThan = GreaterThan.extend({
+ type: 'selectionGreaterThan',
+ label: __('Selection is greater than'),
+ fieldTypes: ['checkbox', 'select', 'post_object', 'page_link', 'relationship', 'taxonomy', 'user']
+ });
+ acf.registerConditionType(SelectionGreaterThan);
+ /**
+ * SelectedGreaterThan
+ *
+ * description
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param void
+ * @return void
+ */
+
+ var SelectionLessThan = LessThan.extend({
+ type: 'selectionLessThan',
+ label: __('Selection is less than'),
+ fieldTypes: ['checkbox', 'select', 'post_object', 'page_link', 'relationship', 'taxonomy', 'user']
+ });
+ acf.registerConditionType(SelectionLessThan);
+})(jQuery);
+
+(function ($, undefined) {
+ acf.unload = new acf.Model({
+ wait: 'load',
+ active: true,
+ changed: false,
+ actions: {
+ 'validation_failure': 'startListening',
+ 'validation_success': 'stopListening'
+ },
+ events: {
+ 'change form .acf-field': 'startListening',
+ 'submit form': 'stopListening'
+ },
+ enable: function () {
+ this.active = true;
+ },
+ disable: function () {
+ this.active = false;
+ },
+ reset: function () {
+ this.stopListening();
+ },
+ startListening: function () {
+ // bail ealry if already changed, not active
+ if (this.changed || !this.active) {
+ return;
+ } // update
+
+
+ this.changed = true; // add event
+
+ $(window).on('beforeunload', this.onUnload);
+ },
+ stopListening: function () {
+ // update
+ this.changed = false; // remove event
+
+ $(window).off('beforeunload', this.onUnload);
+ },
+ onUnload: function () {
+ return acf.__('The changes you made will be lost if you navigate away from this page');
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * postboxManager
+ *
+ * Manages postboxes on the screen.
+ *
+ * @date 25/5/19
+ * @since 5.8.1
+ *
+ * @param void
+ * @return void
+ */
+ var postboxManager = new acf.Model({
+ wait: 'prepare',
+ priority: 1,
+ initialize: function () {
+ (acf.get('postboxes') || []).map(acf.newPostbox);
+ }
+ });
+ /**
+ * acf.getPostbox
+ *
+ * Returns a postbox instance.
+ *
+ * @date 23/9/18
+ * @since 5.7.7
+ *
+ * @param mixed $el Either a jQuery element or the postbox id.
+ * @return object
+ */
+
+ acf.getPostbox = function ($el) {
+ // allow string parameter
+ if (typeof arguments[0] == 'string') {
+ $el = $('#' + arguments[0]);
+ } // return instance
+
+
+ return acf.getInstance($el);
+ };
+ /**
+ * acf.getPostboxes
+ *
+ * Returns an array of postbox instances.
+ *
+ * @date 23/9/18
+ * @since 5.7.7
+ *
+ * @param void
+ * @return array
+ */
+
+
+ acf.getPostboxes = function () {
+ return acf.getInstances($('.acf-postbox'));
+ };
+ /**
+ * acf.newPostbox
+ *
+ * Returns a new postbox instance for the given props.
+ *
+ * @date 20/9/18
+ * @since 5.7.6
+ *
+ * @param object props The postbox properties.
+ * @return object
+ */
+
+
+ acf.newPostbox = function (props) {
+ return new acf.models.Postbox(props);
+ };
+ /**
+ * acf.models.Postbox
+ *
+ * The postbox model.
+ *
+ * @date 20/9/18
+ * @since 5.7.6
+ *
+ * @param void
+ * @return void
+ */
+
+
+ acf.models.Postbox = acf.Model.extend({
+ data: {
+ id: '',
+ key: '',
+ style: 'default',
+ label: 'top',
+ edit: ''
+ },
+ setup: function (props) {
+ // compatibilty
+ if (props.editLink) {
+ props.edit = props.editLink;
+ } // extend data
+
+
+ $.extend(this.data, props); // set $el
+
+ this.$el = this.$postbox();
+ },
+ $postbox: function () {
+ return $('#' + this.get('id'));
+ },
+ $hide: function () {
+ return $('#' + this.get('id') + '-hide');
+ },
+ $hideLabel: function () {
+ return this.$hide().parent();
+ },
+ $hndle: function () {
+ return this.$('> .hndle');
+ },
+ $handleActions: function () {
+ return this.$('> .postbox-header .handle-actions');
+ },
+ $inside: function () {
+ return this.$('> .inside');
+ },
+ isVisible: function () {
+ return this.$el.hasClass('acf-hidden');
+ },
+ initialize: function () {
+ // Add default class.
+ this.$el.addClass('acf-postbox'); // Remove 'hide-if-js class.
+ // This class is added by WP to postboxes that are hidden via the "Screen Options" tab.
+
+ this.$el.removeClass('hide-if-js'); // Add field group style class (ignore in block editor).
+
+ if (acf.get('editor') !== 'block') {
+ var style = this.get('style');
+
+ if (style !== 'default') {
+ this.$el.addClass(style);
+ }
+ } // Add .inside class.
+
+
+ this.$inside().addClass('acf-fields').addClass('-' + this.get('label')); // Append edit link.
+
+ var edit = this.get('edit');
+
+ if (edit) {
+ var html = ' ';
+ var $handleActions = this.$handleActions();
+
+ if ($handleActions.length) {
+ $handleActions.prepend(html);
+ } else {
+ this.$hndle().append(html);
+ }
+ } // Show postbox.
+
+
+ this.show();
+ },
+ show: function () {
+ // Show label.
+ this.$hideLabel().show(); // toggle on checkbox
+
+ this.$hide().prop('checked', true); // Show postbox
+
+ this.$el.show().removeClass('acf-hidden'); // Do action.
+
+ acf.doAction('show_postbox', this);
+ },
+ enable: function () {
+ acf.enable(this.$el, 'postbox');
+ },
+ showEnable: function () {
+ this.enable();
+ this.show();
+ },
+ hide: function () {
+ // Hide label.
+ this.$hideLabel().hide(); // Hide postbox
+
+ this.$el.hide().addClass('acf-hidden'); // Do action.
+
+ acf.doAction('hide_postbox', this);
+ },
+ disable: function () {
+ acf.disable(this.$el, 'postbox');
+ },
+ hideDisable: function () {
+ this.disable();
+ this.hide();
+ },
+ html: function (html) {
+ // Update HTML.
+ this.$inside().html(html); // Do action.
+
+ acf.doAction('append', this.$el);
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * acf.newMediaPopup
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+ acf.newMediaPopup = function (args) {
+ // args
+ var popup = null;
+ var args = acf.parseArgs(args, {
+ mode: 'select',
+ // 'select', 'edit'
+ title: '',
+ // 'Upload Image'
+ button: '',
+ // 'Select Image'
+ type: '',
+ // 'image', ''
+ field: false,
+ // field instance
+ allowedTypes: '',
+ // '.jpg, .png, etc'
+ library: 'all',
+ // 'all', 'uploadedTo'
+ multiple: false,
+ // false, true, 'add'
+ attachment: 0,
+ // the attachment to edit
+ autoOpen: true,
+ // open the popup automatically
+ open: function () {},
+ // callback after close
+ select: function () {},
+ // callback after select
+ close: function () {} // callback after close
+
+ }); // initialize
+
+ if (args.mode == 'edit') {
+ popup = new acf.models.EditMediaPopup(args);
+ } else {
+ popup = new acf.models.SelectMediaPopup(args);
+ } // open popup (allow frame customization before opening)
+
+
+ if (args.autoOpen) {
+ setTimeout(function () {
+ popup.open();
+ }, 1);
+ } // action
+
+
+ acf.doAction('new_media_popup', popup); // return
+
+ return popup;
+ };
+ /**
+ * getPostID
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ var getPostID = function () {
+ var postID = acf.get('post_id');
+ return acf.isNumeric(postID) ? postID : 0;
+ };
+ /**
+ * acf.getMimeTypes
+ *
+ * description
+ *
+ * @date 11/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ acf.getMimeTypes = function () {
+ return this.get('mimeTypes');
+ };
+
+ acf.getMimeType = function (name) {
+ // vars
+ var allTypes = acf.getMimeTypes(); // search
+
+ if (allTypes[name] !== undefined) {
+ return allTypes[name];
+ } // some types contain a mixed key such as "jpg|jpeg|jpe"
+
+
+ for (var key in allTypes) {
+ if (key.indexOf(name) !== -1) {
+ return allTypes[key];
+ }
+ } // return
+
+
+ return false;
+ };
+ /**
+ * MediaPopup
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ var MediaPopup = acf.Model.extend({
+ id: 'MediaPopup',
+ data: {},
+ defaults: {},
+ frame: false,
+ setup: function (props) {
+ $.extend(this.data, props);
+ },
+ initialize: function () {
+ // vars
+ var options = this.getFrameOptions(); // add states
+
+ this.addFrameStates(options); // create frame
+
+ var frame = wp.media(options); // add args reference
+
+ frame.acf = this; // add events
+
+ this.addFrameEvents(frame, options); // strore frame
+
+ this.frame = frame;
+ },
+ open: function () {
+ this.frame.open();
+ },
+ close: function () {
+ this.frame.close();
+ },
+ remove: function () {
+ this.frame.detach();
+ this.frame.remove();
+ },
+ getFrameOptions: function () {
+ // vars
+ var options = {
+ title: this.get('title'),
+ multiple: this.get('multiple'),
+ library: {},
+ states: []
+ }; // type
+
+ if (this.get('type')) {
+ options.library.type = this.get('type');
+ } // type
+
+
+ if (this.get('library') === 'uploadedTo') {
+ options.library.uploadedTo = getPostID();
+ } // attachment
+
+
+ if (this.get('attachment')) {
+ options.library.post__in = [this.get('attachment')];
+ } // button
+
+
+ if (this.get('button')) {
+ options.button = {
+ text: this.get('button')
+ };
+ } // return
+
+
+ return options;
+ },
+ addFrameStates: function (options) {
+ // create query
+ var Query = wp.media.query(options.library); // add _acfuploader
+ // this is super wack!
+ // if you add _acfuploader to the options.library args, new uploads will not be added to the library view.
+ // this has been traced back to the wp.media.model.Query initialize function (which can't be overriden)
+ // Adding any custom args will cause the Attahcments to not observe the uploader queue
+ // To bypass this security issue, we add in the args AFTER the Query has been initialized
+ // options.library._acfuploader = settings.field;
+
+ if (this.get('field') && acf.isset(Query, 'mirroring', 'args')) {
+ Query.mirroring.args._acfuploader = this.get('field');
+ } // add states
+
+
+ options.states.push( // main state
+ new wp.media.controller.Library({
+ library: Query,
+ multiple: this.get('multiple'),
+ title: this.get('title'),
+ priority: 20,
+ filterable: 'all',
+ editable: true,
+ allowLocalEdits: true
+ })); // edit image functionality (added in WP 3.9)
+
+ if (acf.isset(wp, 'media', 'controller', 'EditImage')) {
+ options.states.push(new wp.media.controller.EditImage());
+ }
+ },
+ addFrameEvents: function (frame, options) {
+ // log all events
+ //frame.on('all', function( e ) {
+ // console.log( 'frame all: %o', e );
+ //});
+ // add class
+ frame.on('open', function () {
+ this.$el.closest('.media-modal').addClass('acf-media-modal -' + this.acf.get('mode'));
+ }, frame); // edit image view
+ // source: media-views.js:2410 editImageContent()
+
+ frame.on('content:render:edit-image', function () {
+ var image = this.state().get('image');
+ var view = new wp.media.view.EditImage({
+ model: image,
+ controller: this
+ }).render();
+ this.content.set(view); // after creating the wrapper view, load the actual editor via an ajax call
+
+ view.loadEditor();
+ }, frame); // update toolbar button
+ //frame.on( 'toolbar:create:select', function( toolbar ) {
+ // toolbar.view = new wp.media.view.Toolbar.Select({
+ // text: frame.options._button,
+ // controller: this
+ // });
+ //}, frame );
+ // on select
+
+ frame.on('select', function () {
+ // vars
+ var selection = frame.state().get('selection'); // if selecting images
+
+ if (selection) {
+ // loop
+ selection.each(function (attachment, i) {
+ frame.acf.get('select').apply(frame.acf, [attachment, i]);
+ });
+ }
+ }); // on close
+
+ frame.on('close', function () {
+ // callback and remove
+ setTimeout(function () {
+ frame.acf.get('close').apply(frame.acf);
+ frame.acf.remove();
+ }, 1);
+ });
+ }
+ });
+ /**
+ * acf.models.SelectMediaPopup
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.models.SelectMediaPopup = MediaPopup.extend({
+ id: 'SelectMediaPopup',
+ setup: function (props) {
+ // default button
+ if (!props.button) {
+ props.button = acf._x('Select', 'verb');
+ } // parent
+
+
+ MediaPopup.prototype.setup.apply(this, arguments);
+ },
+ addFrameEvents: function (frame, options) {
+ // plupload
+ // adds _acfuploader param to validate uploads
+ if (acf.isset(_wpPluploadSettings, 'defaults', 'multipart_params')) {
+ // add _acfuploader so that Uploader will inherit
+ _wpPluploadSettings.defaults.multipart_params._acfuploader = this.get('field'); // remove acf_field so future Uploaders won't inherit
+
+ frame.on('open', function () {
+ delete _wpPluploadSettings.defaults.multipart_params._acfuploader;
+ });
+ } // browse
+
+
+ frame.on('content:activate:browse', function () {
+ // vars
+ var toolbar = false; // populate above vars making sure to allow for failure
+ // perhaps toolbar does not exist because the frame open is Upload Files
+
+ try {
+ toolbar = frame.content.get().toolbar;
+ } catch (e) {
+ console.log(e);
+ return;
+ } // callback
+
+
+ frame.acf.customizeFilters.apply(frame.acf, [toolbar]);
+ }); // parent
+
+ MediaPopup.prototype.addFrameEvents.apply(this, arguments);
+ },
+ customizeFilters: function (toolbar) {
+ // vars
+ var filters = toolbar.get('filters'); // image
+
+ if (this.get('type') == 'image') {
+ // update all
+ filters.filters.all.text = acf.__('All images'); // remove some filters
+
+ delete filters.filters.audio;
+ delete filters.filters.video;
+ delete filters.filters.image; // update all filters to show images
+
+ $.each(filters.filters, function (i, filter) {
+ filter.props.type = filter.props.type || 'image';
+ });
+ } // specific types
+
+
+ if (this.get('allowedTypes')) {
+ // convert ".jpg, .png" into ["jpg", "png"]
+ var allowedTypes = this.get('allowedTypes').split(' ').join('').split('.').join('').split(','); // loop
+
+ allowedTypes.map(function (name) {
+ // get type
+ var mimeType = acf.getMimeType(name); // bail early if no type
+
+ if (!mimeType) return; // create new filter
+
+ var newFilter = {
+ text: mimeType,
+ props: {
+ status: null,
+ type: mimeType,
+ uploadedTo: null,
+ orderby: 'date',
+ order: 'DESC'
+ },
+ priority: 20
+ }; // append
+
+ filters.filters[mimeType] = newFilter;
+ });
+ } // uploaded to post
+
+
+ if (this.get('library') === 'uploadedTo') {
+ // vars
+ var uploadedTo = this.frame.options.library.uploadedTo; // remove some filters
+
+ delete filters.filters.unattached;
+ delete filters.filters.uploaded; // add uploadedTo to filters
+
+ $.each(filters.filters, function (i, filter) {
+ filter.text += ' (' + acf.__('Uploaded to this post') + ')';
+ filter.props.uploadedTo = uploadedTo;
+ });
+ } // add _acfuploader to filters
+
+
+ var field = this.get('field');
+ $.each(filters.filters, function (k, filter) {
+ filter.props._acfuploader = field;
+ }); // add _acfuplaoder to search
+
+ var search = toolbar.get('search');
+ search.model.attributes._acfuploader = field; // render (custom function added to prototype)
+
+ if (filters.renderFilters) {
+ filters.renderFilters();
+ }
+ }
+ });
+ /**
+ * acf.models.EditMediaPopup
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.models.EditMediaPopup = MediaPopup.extend({
+ id: 'SelectMediaPopup',
+ setup: function (props) {
+ // default button
+ if (!props.button) {
+ props.button = acf._x('Update', 'verb');
+ } // parent
+
+
+ MediaPopup.prototype.setup.apply(this, arguments);
+ },
+ addFrameEvents: function (frame, options) {
+ // add class
+ frame.on('open', function () {
+ // add class
+ this.$el.closest('.media-modal').addClass('acf-expanded'); // set to browse
+
+ if (this.content.mode() != 'browse') {
+ this.content.mode('browse');
+ } // set selection
+
+
+ var state = this.state();
+ var selection = state.get('selection');
+ var attachment = wp.media.attachment(frame.acf.get('attachment'));
+ selection.add(attachment);
+ }, frame); // parent
+
+ MediaPopup.prototype.addFrameEvents.apply(this, arguments);
+ }
+ });
+ /**
+ * customizePrototypes
+ *
+ * description
+ *
+ * @date 11/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var customizePrototypes = new acf.Model({
+ id: 'customizePrototypes',
+ wait: 'ready',
+ initialize: function () {
+ // bail early if no media views
+ if (!acf.isset(window, 'wp', 'media', 'view')) {
+ return;
+ } // fix bug where CPT without "editor" does not set post.id setting which then prevents uploadedTo from working
+
+
+ var postID = getPostID();
+
+ if (postID && acf.isset(wp, 'media', 'view', 'settings', 'post')) {
+ wp.media.view.settings.post.id = postID;
+ } // customize
+
+
+ this.customizeAttachmentsButton();
+ this.customizeAttachmentsRouter();
+ this.customizeAttachmentFilters();
+ this.customizeAttachmentCompat();
+ this.customizeAttachmentLibrary();
+ },
+ customizeAttachmentsButton: function () {
+ // validate
+ if (!acf.isset(wp, 'media', 'view', 'Button')) {
+ return;
+ } // Extend
+
+
+ var Button = wp.media.view.Button;
+ wp.media.view.Button = Button.extend({
+ // Fix bug where "Select" button appears blank after editing an image.
+ // Do this by simplifying Button initialize function and avoid deleting this.options.
+ initialize: function () {
+ var options = _.defaults(this.options, this.defaults);
+
+ this.model = new Backbone.Model(options);
+ this.listenTo(this.model, 'change', this.render);
+ }
+ });
+ },
+ customizeAttachmentsRouter: function () {
+ // validate
+ if (!acf.isset(wp, 'media', 'view', 'Router')) {
+ return;
+ } // vars
+
+
+ var Parent = wp.media.view.Router; // extend
+
+ wp.media.view.Router = Parent.extend({
+ addExpand: function () {
+ // vars
+ var $a = $(['', ' ' + acf.__('Expand Details') + ' ', ' ' + acf.__('Collapse Details') + ' ', ' '].join('')); // add events
+
+ $a.on('click', function (e) {
+ e.preventDefault();
+ var $div = $(this).closest('.media-modal');
+
+ if ($div.hasClass('acf-expanded')) {
+ $div.removeClass('acf-expanded');
+ } else {
+ $div.addClass('acf-expanded');
+ }
+ }); // append
+
+ this.$el.append($a);
+ },
+ initialize: function () {
+ // initialize
+ Parent.prototype.initialize.apply(this, arguments); // add buttons
+
+ this.addExpand(); // return
+
+ return this;
+ }
+ });
+ },
+ customizeAttachmentFilters: function () {
+ // validate
+ if (!acf.isset(wp, 'media', 'view', 'AttachmentFilters', 'All')) {
+ return;
+ } // vars
+
+
+ var Parent = wp.media.view.AttachmentFilters.All; // renderFilters
+ // copied from media-views.js:6939
+
+ Parent.prototype.renderFilters = function () {
+ // Build `` elements.
+ this.$el.html(_.chain(this.filters).map(function (filter, value) {
+ return {
+ el: $(' ').val(value).html(filter.text)[0],
+ priority: filter.priority || 50
+ };
+ }, this).sortBy('priority').pluck('el').value());
+ };
+ },
+ customizeAttachmentCompat: function () {
+ // validate
+ if (!acf.isset(wp, 'media', 'view', 'AttachmentCompat')) {
+ return;
+ } // vars
+
+
+ var AttachmentCompat = wp.media.view.AttachmentCompat;
+ var timeout = false; // extend
+
+ wp.media.view.AttachmentCompat = AttachmentCompat.extend({
+ render: function () {
+ // WP bug
+ // When multiple media frames exist on the same page (WP content, WYSIWYG, image, file ),
+ // WP creates multiple instances of this AttachmentCompat view.
+ // Each instance will attempt to render when a new modal is created.
+ // Use a property to avoid this and only render once per instance.
+ if (this.rendered) {
+ return this;
+ } // render HTML
+
+
+ AttachmentCompat.prototype.render.apply(this, arguments); // when uploading, render is called twice.
+ // ignore first render by checking for #acf-form-data element
+
+ if (!this.$('#acf-form-data').length) {
+ return this;
+ } // clear timeout
+
+
+ clearTimeout(timeout); // setTimeout
+
+ timeout = setTimeout($.proxy(function () {
+ this.rendered = true;
+ acf.doAction('append', this.$el);
+ }, this), 50); // return
+
+ return this;
+ },
+ save: function (event) {
+ var data = {};
+
+ if (event) {
+ event.preventDefault();
+ } //_.each( this.$el.serializeArray(), function( pair ) {
+ // data[ pair.name ] = pair.value;
+ //});
+ // Serialize data more thoroughly to allow chckbox inputs to save.
+
+
+ data = acf.serializeForAjax(this.$el);
+ this.controller.trigger('attachment:compat:waiting', ['waiting']);
+ this.model.saveCompat(data).always(_.bind(this.postSave, this));
+ }
+ });
+ },
+ customizeAttachmentLibrary: function () {
+ // validate
+ if (!acf.isset(wp, 'media', 'view', 'Attachment', 'Library')) {
+ return;
+ } // vars
+
+
+ var AttachmentLibrary = wp.media.view.Attachment.Library; // extend
+
+ wp.media.view.Attachment.Library = AttachmentLibrary.extend({
+ render: function () {
+ // vars
+ var popup = acf.isget(this, 'controller', 'acf');
+ var attributes = acf.isget(this, 'model', 'attributes'); // check vars exist to avoid errors
+
+ if (popup && attributes) {
+ // show errors
+ if (attributes.acf_errors) {
+ this.$el.addClass('acf-disabled');
+ } // disable selected
+
+
+ var selected = popup.get('selected');
+
+ if (selected && selected.indexOf(attributes.id) > -1) {
+ this.$el.addClass('acf-selected');
+ }
+ } // render
+
+
+ return AttachmentLibrary.prototype.render.apply(this, arguments);
+ },
+
+ /*
+ * toggleSelection
+ *
+ * This function is called before an attachment is selected
+ * A good place to check for errors and prevent the 'select' function from being fired
+ *
+ * @type function
+ * @date 29/09/2016
+ * @since 5.4.0
+ *
+ * @param options (object)
+ * @return n/a
+ */
+ toggleSelection: function (options) {
+ // vars
+ // source: wp-includes/js/media-views.js:2880
+ var collection = this.collection,
+ selection = this.options.selection,
+ model = this.model,
+ single = selection.single(); // vars
+
+ var frame = this.controller;
+ var errors = acf.isget(this, 'model', 'attributes', 'acf_errors');
+ var $sidebar = frame.$el.find('.media-frame-content .media-sidebar'); // remove previous error
+
+ $sidebar.children('.acf-selection-error').remove(); // show attachment details
+
+ $sidebar.children().removeClass('acf-hidden'); // add message
+
+ if (frame && errors) {
+ // vars
+ var filename = acf.isget(this, 'model', 'attributes', 'filename'); // hide attachment details
+ // Gallery field continues to show previously selected attachment...
+
+ $sidebar.children().addClass('acf-hidden'); // append message
+
+ $sidebar.prepend(['', '' + acf.__('Restricted') + ' ', '' + filename + ' ', '' + errors + ' ', '
'].join('')); // reset selection (unselects all attachments)
+
+ selection.reset(); // set single (attachment displayed in sidebar)
+
+ selection.single(model); // return and prevent 'select' form being fired
+
+ return;
+ } // return
+
+
+ return AttachmentLibrary.prototype.toggleSelection.apply(this, arguments);
+ }
+ });
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ acf.screen = new acf.Model({
+ active: true,
+ xhr: false,
+ timeout: false,
+ wait: 'load',
+ events: {
+ 'change #page_template': 'onChange',
+ 'change #parent_id': 'onChange',
+ 'change #post-formats-select': 'onChange',
+ 'change .categorychecklist': 'onChange',
+ 'change .tagsdiv': 'onChange',
+ 'change .acf-taxonomy-field[data-save="1"]': 'onChange',
+ 'change #product-type': 'onChange'
+ },
+ isPost: function () {
+ return acf.get('screen') === 'post';
+ },
+ isUser: function () {
+ return acf.get('screen') === 'user';
+ },
+ isTaxonomy: function () {
+ return acf.get('screen') === 'taxonomy';
+ },
+ isAttachment: function () {
+ return acf.get('screen') === 'attachment';
+ },
+ isNavMenu: function () {
+ return acf.get('screen') === 'nav_menu';
+ },
+ isWidget: function () {
+ return acf.get('screen') === 'widget';
+ },
+ isComment: function () {
+ return acf.get('screen') === 'comment';
+ },
+ getPageTemplate: function () {
+ var $el = $('#page_template');
+ return $el.length ? $el.val() : null;
+ },
+ getPageParent: function (e, $el) {
+ var $el = $('#parent_id');
+ return $el.length ? $el.val() : null;
+ },
+ getPageType: function (e, $el) {
+ return this.getPageParent() ? 'child' : 'parent';
+ },
+ getPostType: function () {
+ return $('#post_type').val();
+ },
+ getPostFormat: function (e, $el) {
+ var $el = $('#post-formats-select input:checked');
+
+ if ($el.length) {
+ var val = $el.val();
+ return val == '0' ? 'standard' : val;
+ }
+
+ return null;
+ },
+ getPostCoreTerms: function () {
+ // vars
+ var terms = {}; // serialize WP taxonomy postboxes
+
+ var data = acf.serialize($('.categorydiv, .tagsdiv')); // use tax_input (tag, custom-taxonomy) when possible.
+ // this data is already formatted in taxonomy => [terms].
+
+ if (data.tax_input) {
+ terms = data.tax_input;
+ } // append "category" which uses a different name
+
+
+ if (data.post_category) {
+ terms.category = data.post_category;
+ } // convert any string values (tags) into array format
+
+
+ for (var tax in terms) {
+ if (!acf.isArray(terms[tax])) {
+ terms[tax] = terms[tax].split(/,[\s]?/);
+ }
+ } // return
+
+
+ return terms;
+ },
+ getPostTerms: function () {
+ // Get core terms.
+ var terms = this.getPostCoreTerms(); // loop over taxonomy fields and add their values
+
+ acf.getFields({
+ type: 'taxonomy'
+ }).map(function (field) {
+ // ignore fields that don't save
+ if (!field.get('save')) {
+ return;
+ } // vars
+
+
+ var val = field.val();
+ var tax = field.get('taxonomy'); // check val
+
+ if (val) {
+ // ensure terms exists
+ terms[tax] = terms[tax] || []; // ensure val is an array
+
+ val = acf.isArray(val) ? val : [val]; // append
+
+ terms[tax] = terms[tax].concat(val);
+ }
+ }); // add WC product type
+
+ if ((productType = this.getProductType()) !== null) {
+ terms.product_type = [productType];
+ } // remove duplicate values
+
+
+ for (var tax in terms) {
+ terms[tax] = acf.uniqueArray(terms[tax]);
+ } // return
+
+
+ return terms;
+ },
+ getProductType: function () {
+ var $el = $('#product-type');
+ return $el.length ? $el.val() : null;
+ },
+ check: function () {
+ // bail early if not for post
+ if (acf.get('screen') !== 'post') {
+ return;
+ } // abort XHR if is already loading AJAX data
+
+
+ if (this.xhr) {
+ this.xhr.abort();
+ } // vars
+
+
+ var ajaxData = acf.parseArgs(this.data, {
+ action: 'acf/ajax/check_screen',
+ screen: acf.get('screen'),
+ exists: []
+ }); // post id
+
+ if (this.isPost()) {
+ ajaxData.post_id = acf.get('post_id');
+ } // post type
+
+
+ if ((postType = this.getPostType()) !== null) {
+ ajaxData.post_type = postType;
+ } // page template
+
+
+ if ((pageTemplate = this.getPageTemplate()) !== null) {
+ ajaxData.page_template = pageTemplate;
+ } // page parent
+
+
+ if ((pageParent = this.getPageParent()) !== null) {
+ ajaxData.page_parent = pageParent;
+ } // page type
+
+
+ if ((pageType = this.getPageType()) !== null) {
+ ajaxData.page_type = pageType;
+ } // post format
+
+
+ if ((postFormat = this.getPostFormat()) !== null) {
+ ajaxData.post_format = postFormat;
+ } // post terms
+
+
+ if ((postTerms = this.getPostTerms()) !== null) {
+ ajaxData.post_terms = postTerms;
+ } // add array of existing postboxes to increase performance and reduce JSON HTML
+
+
+ acf.getPostboxes().map(function (postbox) {
+ ajaxData.exists.push(postbox.get('key'));
+ }); // filter
+
+ ajaxData = acf.applyFilters('check_screen_args', ajaxData); // success
+
+ var onSuccess = function (json) {
+ // Render post screen.
+ if (acf.get('screen') == 'post') {
+ this.renderPostScreen(json); // Render user screen.
+ } else if (acf.get('screen') == 'user') {
+ this.renderUserScreen(json);
+ } // action
+
+
+ acf.doAction('check_screen_complete', json, ajaxData);
+ }; // ajax
+
+
+ this.xhr = $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'json',
+ context: this,
+ success: onSuccess
+ });
+ },
+ onChange: function (e, $el) {
+ this.setTimeout(this.check, 1);
+ },
+ renderPostScreen: function (data) {
+ // Helper function to copy events
+ var copyEvents = function ($from, $to) {
+ var events = $._data($from[0]).events;
+
+ for (var type in events) {
+ for (var i = 0; i < events[type].length; i++) {
+ $to.on(type, events[type][i].handler);
+ }
+ }
+ }; // Helper function to sort metabox.
+
+
+ var sortMetabox = function (id, ids) {
+ // Find position of id within ids.
+ var index = ids.indexOf(id); // Bail early if index not found.
+
+ if (index == -1) {
+ return false;
+ } // Loop over metaboxes behind (in reverse order).
+
+
+ for (var i = index - 1; i >= 0; i--) {
+ if ($('#' + ids[i]).length) {
+ return $('#' + ids[i]).after($('#' + id));
+ }
+ } // Loop over metaboxes infront.
+
+
+ for (var i = index + 1; i < ids.length; i++) {
+ if ($('#' + ids[i]).length) {
+ return $('#' + ids[i]).before($('#' + id));
+ }
+ } // Return false if not sorted.
+
+
+ return false;
+ }; // Keep track of visible and hidden postboxes.
+
+
+ data.visible = [];
+ data.hidden = []; // Show these postboxes.
+
+ data.results = data.results.map(function (result, i) {
+ // vars
+ var postbox = acf.getPostbox(result.id); // Prevent "acf_after_title" position in Block Editor.
+
+ if (acf.isGutenberg() && result.position == "acf_after_title") {
+ result.position = 'normal';
+ } // Create postbox if doesn't exist.
+
+
+ if (!postbox) {
+ var wpMinorVersion = parseFloat(acf.get('wp_version'));
+
+ if (wpMinorVersion >= 5.5) {
+ var postboxHeader = [''].join('');
+ } else {
+ var postboxHeader = ['', 'Toggle panel: ' + acf.escHtml(result.title) + ' ', ' ', ' ', '', '' + acf.escHtml(result.title) + ' ', ' '].join('');
+ } // Create it.
+
+
+ var $postbox = $(['', postboxHeader, '
', result.html, '
', '
'].join('')); // Create new hide toggle.
+
+ if ($('#adv-settings').length) {
+ var $prefs = $('#adv-settings .metabox-prefs');
+ var $label = $(['', ' ', ' ' + result.title, ' '].join('')); // Copy default WP events onto checkbox.
+
+ copyEvents($prefs.find('input').first(), $label.find('input')); // Append hide label
+
+ $prefs.append($label);
+ } // Copy default WP events onto metabox.
+
+
+ if ($('.postbox').length) {
+ copyEvents($('.postbox .handlediv').first(), $postbox.children('.handlediv'));
+ copyEvents($('.postbox .hndle').first(), $postbox.children('.hndle'));
+ } // Append metabox to the bottom of "side-sortables".
+
+
+ if (result.position === 'side') {
+ $('#' + result.position + '-sortables').append($postbox); // Prepend metabox to the top of "normal-sortbables".
+ } else {
+ $('#' + result.position + '-sortables').prepend($postbox);
+ } // Position metabox amongst existing ACF metaboxes within the same location.
+
+
+ var order = [];
+ data.results.map(function (_result) {
+ if (result.position === _result.position && $('#' + result.position + '-sortables #' + _result.id).length) {
+ order.push(_result.id);
+ }
+ });
+ sortMetabox(result.id, order); // Check 'sorted' for user preference.
+
+ if (data.sorted) {
+ // Loop over each position (acf_after_title, side, normal).
+ for (var position in data.sorted) {
+ // Explode string into array of ids.
+ var order = data.sorted[position].split(','); // Position metabox relative to order.
+
+ if (sortMetabox(result.id, order)) {
+ break;
+ }
+ }
+ } // Initalize it (modifies HTML).
+
+
+ postbox = acf.newPostbox(result); // Trigger action.
+
+ acf.doAction('append', $postbox);
+ acf.doAction('append_postbox', postbox);
+ } // show postbox
+
+
+ postbox.showEnable(); // append
+
+ data.visible.push(result.id); // Return result (may have changed).
+
+ return result;
+ }); // Hide these postboxes.
+
+ acf.getPostboxes().map(function (postbox) {
+ if (data.visible.indexOf(postbox.get('id')) === -1) {
+ // Hide postbox.
+ postbox.hideDisable(); // Append to data.
+
+ data.hidden.push(postbox.get('id'));
+ }
+ }); // Update style.
+
+ $('#acf-style').html(data.style); // Do action.
+
+ acf.doAction('refresh_post_screen', data);
+ },
+ renderUserScreen: function (json) {}
+ });
+ /**
+ * gutenScreen
+ *
+ * Adds compatibility with the Gutenberg edit screen.
+ *
+ * @date 11/12/18
+ * @since 5.8.0
+ *
+ * @param void
+ * @return void
+ */
+
+ var gutenScreen = new acf.Model({
+ // Keep a reference to the most recent post attributes.
+ postEdits: {},
+ // Wait until assets have been loaded.
+ wait: 'prepare',
+ initialize: function () {
+ // Bail early if not Gutenberg.
+ if (!acf.isGutenberg()) {
+ return;
+ } // Listen for changes (use debounced version as this can fires often).
+
+
+ wp.data.subscribe(acf.debounce(this.onChange).bind(this)); // Customize "acf.screen.get" functions.
+
+ acf.screen.getPageTemplate = this.getPageTemplate;
+ acf.screen.getPageParent = this.getPageParent;
+ acf.screen.getPostType = this.getPostType;
+ acf.screen.getPostFormat = this.getPostFormat;
+ acf.screen.getPostCoreTerms = this.getPostCoreTerms; // Disable unload
+
+ acf.unload.disable(); // Refresh metaboxes since WP 5.3.
+
+ var wpMinorVersion = parseFloat(acf.get('wp_version'));
+
+ if (wpMinorVersion >= 5.3) {
+ this.addAction('refresh_post_screen', this.onRefreshPostScreen);
+ } // Trigger "refresh" after WP has moved metaboxes into place.
+
+
+ wp.domReady(acf.refresh);
+ },
+ onChange: function () {
+ // Determine attributes that can trigger a refresh.
+ var attributes = ['template', 'parent', 'format']; // Append taxonomy attribute names to this list.
+
+ (wp.data.select('core').getTaxonomies() || []).map(function (taxonomy) {
+ attributes.push(taxonomy.rest_base);
+ }); // Get relevant current post edits.
+
+ var _postEdits = wp.data.select('core/editor').getPostEdits();
+
+ var postEdits = {};
+ attributes.map(function (k) {
+ if (_postEdits[k] !== undefined) {
+ postEdits[k] = _postEdits[k];
+ }
+ }); // Detect change.
+
+ if (JSON.stringify(postEdits) !== JSON.stringify(this.postEdits)) {
+ this.postEdits = postEdits; // Check screen.
+
+ acf.screen.check();
+ }
+ },
+ getPageTemplate: function () {
+ return wp.data.select('core/editor').getEditedPostAttribute('template');
+ },
+ getPageParent: function (e, $el) {
+ return wp.data.select('core/editor').getEditedPostAttribute('parent');
+ },
+ getPostType: function () {
+ return wp.data.select('core/editor').getEditedPostAttribute('type');
+ },
+ getPostFormat: function (e, $el) {
+ return wp.data.select('core/editor').getEditedPostAttribute('format');
+ },
+ getPostCoreTerms: function () {
+ // vars
+ var terms = {}; // Loop over taxonomies.
+
+ var taxonomies = wp.data.select('core').getTaxonomies() || [];
+ taxonomies.map(function (taxonomy) {
+ // Append selected taxonomies to terms object.
+ var postTerms = wp.data.select('core/editor').getEditedPostAttribute(taxonomy.rest_base);
+
+ if (postTerms) {
+ terms[taxonomy.slug] = postTerms;
+ }
+ }); // return
+
+ return terms;
+ },
+
+ /**
+ * onRefreshPostScreen
+ *
+ * Fires after the Post edit screen metaboxs are refreshed to update the Block Editor API state.
+ *
+ * @date 11/11/19
+ * @since 5.8.7
+ *
+ * @param object data The "check_screen" JSON response data.
+ * @return void
+ */
+ onRefreshPostScreen: function (data) {
+ // Extract vars.
+ var select = wp.data.select('core/edit-post');
+ var dispatch = wp.data.dispatch('core/edit-post'); // Load current metabox locations and data.
+
+ var locations = {};
+ select.getActiveMetaBoxLocations().map(function (location) {
+ locations[location] = select.getMetaBoxesPerLocation(location);
+ }); // Generate flat array of existing ids.
+
+ var ids = [];
+
+ for (var k in locations) {
+ locations[k].map(function (m) {
+ ids.push(m.id);
+ });
+ } // Append new ACF metaboxes (ignore those which already exist).
+
+
+ data.results.filter(function (r) {
+ return ids.indexOf(r.id) === -1;
+ }).map(function (result, i) {
+ // Ensure location exists.
+ var location = result.position;
+ locations[location] = locations[location] || []; // Append.
+
+ locations[location].push({
+ id: result.id,
+ title: result.title
+ });
+ }); // Remove hidden ACF metaboxes.
+
+ for (var k in locations) {
+ locations[k] = locations[k].filter(function (m) {
+ return data.hidden.indexOf(m.id) === -1;
+ });
+ } // Update state.
+
+
+ dispatch.setAvailableMetaBoxesPerLocation(locations);
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * acf.newSelect2
+ *
+ * description
+ *
+ * @date 13/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+ acf.newSelect2 = function ($select, props) {
+ // defaults
+ props = acf.parseArgs(props, {
+ allowNull: false,
+ placeholder: '',
+ multiple: false,
+ field: false,
+ ajax: false,
+ ajaxAction: '',
+ ajaxData: function (data) {
+ return data;
+ },
+ ajaxResults: function (json) {
+ return json;
+ }
+ }); // initialize
+
+ if (getVersion() == 4) {
+ var select2 = new Select2_4($select, props);
+ } else {
+ var select2 = new Select2_3($select, props);
+ } // actions
+
+
+ acf.doAction('new_select2', select2); // return
+
+ return select2;
+ };
+ /**
+ * getVersion
+ *
+ * description
+ *
+ * @date 13/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ function getVersion() {
+ // v4
+ if (acf.isset(window, 'jQuery', 'fn', 'select2', 'amd')) {
+ return 4;
+ } // v3
+
+
+ if (acf.isset(window, 'Select2')) {
+ return 3;
+ } // return
+
+
+ return false;
+ }
+ /**
+ * Select2
+ *
+ * description
+ *
+ * @date 13/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ var Select2 = acf.Model.extend({
+ setup: function ($select, props) {
+ $.extend(this.data, props);
+ this.$el = $select;
+ },
+ initialize: function () {},
+ selectOption: function (value) {
+ var $option = this.getOption(value);
+
+ if (!$option.prop('selected')) {
+ $option.prop('selected', true).trigger('change');
+ }
+ },
+ unselectOption: function (value) {
+ var $option = this.getOption(value);
+
+ if ($option.prop('selected')) {
+ $option.prop('selected', false).trigger('change');
+ }
+ },
+ getOption: function (value) {
+ return this.$('option[value="' + value + '"]');
+ },
+ addOption: function (option) {
+ // defaults
+ option = acf.parseArgs(option, {
+ id: '',
+ text: '',
+ selected: false
+ }); // vars
+
+ var $option = this.getOption(option.id); // append
+
+ if (!$option.length) {
+ $option = $(' ');
+ $option.html(option.text);
+ $option.attr('value', option.id);
+ $option.prop('selected', option.selected);
+ this.$el.append($option);
+ } // chain
+
+
+ return $option;
+ },
+ getValue: function () {
+ // vars
+ var val = [];
+ var $options = this.$el.find('option:selected'); // bail early if no selected
+
+ if (!$options.exists()) {
+ return val;
+ } // sort by attribute
+
+
+ $options = $options.sort(function (a, b) {
+ return +a.getAttribute('data-i') - +b.getAttribute('data-i');
+ }); // loop
+
+ $options.each(function () {
+ var $el = $(this);
+ val.push({
+ $el: $el,
+ id: $el.attr('value'),
+ text: $el.text()
+ });
+ }); // return
+
+ return val;
+ },
+ mergeOptions: function () {},
+ getChoices: function () {
+ // callback
+ var crawl = function ($parent) {
+ // vars
+ var choices = []; // loop
+
+ $parent.children().each(function () {
+ // vars
+ var $child = $(this); // optgroup
+
+ if ($child.is('optgroup')) {
+ choices.push({
+ text: $child.attr('label'),
+ children: crawl($child)
+ }); // option
+ } else {
+ choices.push({
+ id: $child.attr('value'),
+ text: $child.text()
+ });
+ }
+ }); // return
+
+ return choices;
+ }; // crawl
+
+
+ return crawl(this.$el);
+ },
+ getAjaxData: function (params) {
+ // vars
+ var ajaxData = {
+ action: this.get('ajaxAction'),
+ s: params.term || '',
+ paged: params.page || 1
+ }; // field helper
+
+ var field = this.get('field');
+
+ if (field) {
+ ajaxData.field_key = field.get('key');
+ } // callback
+
+
+ var callback = this.get('ajaxData');
+
+ if (callback) {
+ ajaxData = callback.apply(this, [ajaxData, params]);
+ } // filter
+
+
+ ajaxData = acf.applyFilters('select2_ajax_data', ajaxData, this.data, this.$el, field || false, this); // return
+
+ return acf.prepareForAjax(ajaxData);
+ },
+ getAjaxResults: function (json, params) {
+ // defaults
+ json = acf.parseArgs(json, {
+ results: false,
+ more: false
+ }); // callback
+
+ var callback = this.get('ajaxResults');
+
+ if (callback) {
+ json = callback.apply(this, [json, params]);
+ } // filter
+
+
+ json = acf.applyFilters('select2_ajax_results', json, params, this); // return
+
+ return json;
+ },
+ processAjaxResults: function (json, params) {
+ // vars
+ var json = this.getAjaxResults(json, params); // change more to pagination
+
+ if (json.more) {
+ json.pagination = {
+ more: true
+ };
+ } // merge together groups
+
+
+ setTimeout($.proxy(this.mergeOptions, this), 1); // return
+
+ return json;
+ },
+ destroy: function () {
+ // destroy via api
+ if (this.$el.data('select2')) {
+ this.$el.select2('destroy');
+ } // destory via HTML (duplicating HTML does not contain data)
+
+
+ this.$el.siblings('.select2-container').remove();
+ }
+ });
+ /**
+ * Select2_4
+ *
+ * description
+ *
+ * @date 13/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var Select2_4 = Select2.extend({
+ initialize: function () {
+ // vars
+ var $select = this.$el;
+ var options = {
+ width: '100%',
+ allowClear: this.get('allowNull'),
+ placeholder: this.get('placeholder'),
+ multiple: this.get('multiple'),
+ data: [],
+ escapeMarkup: function (string) {
+ return acf.escHtml(string);
+ }
+ }; // multiple
+
+ if (options.multiple) {
+ // reorder options
+ this.getValue().map(function (item) {
+ item.$el.detach().appendTo($select);
+ });
+ } // Temporarily remove conflicting attribute.
+
+
+ var attrAjax = $select.attr('data-ajax');
+
+ if (attrAjax !== undefined) {
+ $select.removeData('ajax');
+ $select.removeAttr('data-ajax');
+ } // ajax
+
+
+ if (this.get('ajax')) {
+ options.ajax = {
+ url: acf.get('ajaxurl'),
+ delay: 250,
+ dataType: 'json',
+ type: 'post',
+ cache: false,
+ data: $.proxy(this.getAjaxData, this),
+ processResults: $.proxy(this.processAjaxResults, this)
+ };
+ } // filter for 3rd party customization
+ //options = acf.applyFilters( 'select2_args', options, $select, this );
+
+
+ var field = this.get('field');
+ options = acf.applyFilters('select2_args', options, $select, this.data, field || false, this); // add select2
+
+ $select.select2(options); // get container (Select2 v4 does not return this from constructor)
+
+ var $container = $select.next('.select2-container'); // multiple
+
+ if (options.multiple) {
+ // vars
+ var $ul = $container.find('ul'); // sortable
+
+ $ul.sortable({
+ stop: function (e) {
+ // loop
+ $ul.find('.select2-selection__choice').each(function () {
+ // vars
+ var $option = $($(this).data('data').element); // detach and re-append to end
+
+ $option.detach().appendTo($select);
+ }); // trigger change on input (JS error if trigger on select)
+
+ $select.trigger('change');
+ }
+ }); // on select, move to end
+
+ $select.on('select2:select', this.proxy(function (e) {
+ this.getOption(e.params.data.id).detach().appendTo(this.$el);
+ }));
+ } // add class
+
+
+ $container.addClass('-acf'); // Add back temporarily removed attr.
+
+ if (attrAjax !== undefined) {
+ $select.attr('data-ajax', attrAjax);
+ } // action for 3rd party customization
+
+
+ acf.doAction('select2_init', $select, options, this.data, field || false, this);
+ },
+ mergeOptions: function () {
+ // vars
+ var $prevOptions = false;
+ var $prevGroup = false; // loop
+
+ $('.select2-results__option[role="group"]').each(function () {
+ // vars
+ var $options = $(this).children('ul');
+ var $group = $(this).children('strong'); // compare to previous
+
+ if ($prevGroup && $prevGroup.text() === $group.text()) {
+ $prevOptions.append($options.children());
+ $(this).remove();
+ return;
+ } // update vars
+
+
+ $prevOptions = $options;
+ $prevGroup = $group;
+ });
+ }
+ });
+ /**
+ * Select2_3
+ *
+ * description
+ *
+ * @date 13/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var Select2_3 = Select2.extend({
+ initialize: function () {
+ // vars
+ var $select = this.$el;
+ var value = this.getValue();
+ var multiple = this.get('multiple');
+ var options = {
+ width: '100%',
+ allowClear: this.get('allowNull'),
+ placeholder: this.get('placeholder'),
+ separator: '||',
+ multiple: this.get('multiple'),
+ data: this.getChoices(),
+ escapeMarkup: function (string) {
+ return acf.escHtml(string);
+ },
+ dropdownCss: {
+ 'z-index': '999999999'
+ },
+ initSelection: function (element, callback) {
+ if (multiple) {
+ callback(value);
+ } else {
+ callback(value.shift());
+ }
+ }
+ }; // get hidden input
+
+ var $input = $select.siblings('input');
+
+ if (!$input.length) {
+ $input = $(' ');
+ $select.before($input);
+ } // set input value
+
+
+ inputValue = value.map(function (item) {
+ return item.id;
+ }).join('||');
+ $input.val(inputValue); // multiple
+
+ if (options.multiple) {
+ // reorder options
+ value.map(function (item) {
+ item.$el.detach().appendTo($select);
+ });
+ } // remove blank option as we have a clear all button
+
+
+ if (options.allowClear) {
+ options.data = options.data.filter(function (item) {
+ return item.id !== '';
+ });
+ } // remove conflicting atts
+
+
+ $select.removeData('ajax');
+ $select.removeAttr('data-ajax'); // ajax
+
+ if (this.get('ajax')) {
+ options.ajax = {
+ url: acf.get('ajaxurl'),
+ quietMillis: 250,
+ dataType: 'json',
+ type: 'post',
+ cache: false,
+ data: $.proxy(this.getAjaxData, this),
+ results: $.proxy(this.processAjaxResults, this)
+ };
+ } // filter for 3rd party customization
+
+
+ var field = this.get('field');
+ options = acf.applyFilters('select2_args', options, $select, this.data, field || false, this); // add select2
+
+ $input.select2(options); // get container
+
+ var $container = $input.select2('container'); // helper to find this select's option
+
+ var getOption = $.proxy(this.getOption, this); // multiple
+
+ if (options.multiple) {
+ // vars
+ var $ul = $container.find('ul'); // sortable
+
+ $ul.sortable({
+ stop: function () {
+ // loop
+ $ul.find('.select2-search-choice').each(function () {
+ // vars
+ var data = $(this).data('select2Data');
+ var $option = getOption(data.id); // detach and re-append to end
+
+ $option.detach().appendTo($select);
+ }); // trigger change on input (JS error if trigger on select)
+
+ $select.trigger('change');
+ }
+ });
+ } // on select, create option and move to end
+
+
+ $input.on('select2-selecting', function (e) {
+ // vars
+ var item = e.choice;
+ var $option = getOption(item.id); // create if doesn't exist
+
+ if (!$option.length) {
+ $option = $('' + item.text + ' ');
+ } // detach and re-append to end
+
+
+ $option.detach().appendTo($select);
+ }); // add class
+
+ $container.addClass('-acf'); // action for 3rd party customization
+
+ acf.doAction('select2_init', $select, options, this.data, field || false, this); // change
+
+ $input.on('change', function () {
+ var val = $input.val();
+
+ if (val.indexOf('||')) {
+ val = val.split('||');
+ }
+
+ $select.val(val).trigger('change');
+ }); // hide select
+
+ $select.hide();
+ },
+ mergeOptions: function () {
+ // vars
+ var $prevOptions = false;
+ var $prevGroup = false; // loop
+
+ $('#select2-drop .select2-result-with-children').each(function () {
+ // vars
+ var $options = $(this).children('ul');
+ var $group = $(this).children('.select2-result-label'); // compare to previous
+
+ if ($prevGroup && $prevGroup.text() === $group.text()) {
+ $prevGroup.append($options.children());
+ $(this).remove();
+ return;
+ } // update vars
+
+
+ $prevOptions = $options;
+ $prevGroup = $group;
+ });
+ },
+ getAjaxData: function (term, page) {
+ // create Select2 v4 params
+ var params = {
+ term: term,
+ page: page
+ }; // return
+
+ return Select2.prototype.getAjaxData.apply(this, [params]);
+ }
+ }); // manager
+
+ var select2Manager = new acf.Model({
+ priority: 5,
+ wait: 'prepare',
+ actions: {
+ 'duplicate': 'onDuplicate'
+ },
+ initialize: function () {
+ // vars
+ var locale = acf.get('locale');
+ var rtl = acf.get('rtl');
+ var l10n = acf.get('select2L10n');
+ var version = getVersion(); // bail ealry if no l10n
+
+ if (!l10n) {
+ return false;
+ } // bail early if 'en'
+
+
+ if (locale.indexOf('en') === 0) {
+ return false;
+ } // initialize
+
+
+ if (version == 4) {
+ this.addTranslations4();
+ } else if (version == 3) {
+ this.addTranslations3();
+ }
+ },
+ addTranslations4: function () {
+ // vars
+ var l10n = acf.get('select2L10n');
+ var locale = acf.get('locale'); // modify local to match html[lang] attribute (used by Select2)
+
+ locale = locale.replace('_', '-'); // select2L10n
+
+ var select2L10n = {
+ errorLoading: function () {
+ return l10n.load_fail;
+ },
+ inputTooLong: function (args) {
+ var overChars = args.input.length - args.maximum;
+
+ if (overChars > 1) {
+ return l10n.input_too_long_n.replace('%d', overChars);
+ }
+
+ return l10n.input_too_long_1;
+ },
+ inputTooShort: function (args) {
+ var remainingChars = args.minimum - args.input.length;
+
+ if (remainingChars > 1) {
+ return l10n.input_too_short_n.replace('%d', remainingChars);
+ }
+
+ return l10n.input_too_short_1;
+ },
+ loadingMore: function () {
+ return l10n.load_more;
+ },
+ maximumSelected: function (args) {
+ var maximum = args.maximum;
+
+ if (maximum > 1) {
+ return l10n.selection_too_long_n.replace('%d', maximum);
+ }
+
+ return l10n.selection_too_long_1;
+ },
+ noResults: function () {
+ return l10n.matches_0;
+ },
+ searching: function () {
+ return l10n.searching;
+ }
+ }; // append
+
+ jQuery.fn.select2.amd.define('select2/i18n/' + locale, [], function () {
+ return select2L10n;
+ });
+ },
+ addTranslations3: function () {
+ // vars
+ var l10n = acf.get('select2L10n');
+ var locale = acf.get('locale'); // modify local to match html[lang] attribute (used by Select2)
+
+ locale = locale.replace('_', '-'); // select2L10n
+
+ var select2L10n = {
+ formatMatches: function (matches) {
+ if (matches > 1) {
+ return l10n.matches_n.replace('%d', matches);
+ }
+
+ return l10n.matches_1;
+ },
+ formatNoMatches: function () {
+ return l10n.matches_0;
+ },
+ formatAjaxError: function () {
+ return l10n.load_fail;
+ },
+ formatInputTooShort: function (input, min) {
+ var remainingChars = min - input.length;
+
+ if (remainingChars > 1) {
+ return l10n.input_too_short_n.replace('%d', remainingChars);
+ }
+
+ return l10n.input_too_short_1;
+ },
+ formatInputTooLong: function (input, max) {
+ var overChars = input.length - max;
+
+ if (overChars > 1) {
+ return l10n.input_too_long_n.replace('%d', overChars);
+ }
+
+ return l10n.input_too_long_1;
+ },
+ formatSelectionTooBig: function (maximum) {
+ if (maximum > 1) {
+ return l10n.selection_too_long_n.replace('%d', maximum);
+ }
+
+ return l10n.selection_too_long_1;
+ },
+ formatLoadMore: function () {
+ return l10n.load_more;
+ },
+ formatSearching: function () {
+ return l10n.searching;
+ }
+ }; // ensure locales exists
+
+ $.fn.select2.locales = $.fn.select2.locales || {}; // append
+
+ $.fn.select2.locales[locale] = select2L10n;
+ $.extend($.fn.select2.defaults, select2L10n);
+ },
+ onDuplicate: function ($el, $el2) {
+ $el2.find('.select2-container').remove();
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ acf.tinymce = {
+ /*
+ * defaults
+ *
+ * This function will return default mce and qt settings
+ *
+ * @type function
+ * @date 18/8/17
+ * @since 5.6.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+ defaults: function () {
+ // bail early if no tinyMCEPreInit
+ if (typeof tinyMCEPreInit === 'undefined') return false; // vars
+
+ var defaults = {
+ tinymce: tinyMCEPreInit.mceInit.acf_content,
+ quicktags: tinyMCEPreInit.qtInit.acf_content
+ }; // return
+
+ return defaults;
+ },
+
+ /*
+ * initialize
+ *
+ * This function will initialize the tinymce and quicktags instances
+ *
+ * @type function
+ * @date 18/8/17
+ * @since 5.6.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+ initialize: function (id, args) {
+ // defaults
+ args = acf.parseArgs(args, {
+ tinymce: true,
+ quicktags: true,
+ toolbar: 'full',
+ mode: 'visual',
+ // visual,text
+ field: false
+ }); // tinymce
+
+ if (args.tinymce) {
+ this.initializeTinymce(id, args);
+ } // quicktags
+
+
+ if (args.quicktags) {
+ this.initializeQuicktags(id, args);
+ }
+ },
+
+ /*
+ * initializeTinymce
+ *
+ * This function will initialize the tinymce instance
+ *
+ * @type function
+ * @date 18/8/17
+ * @since 5.6.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+ initializeTinymce: function (id, args) {
+ // vars
+ var $textarea = $('#' + id);
+ var defaults = this.defaults();
+ var toolbars = acf.get('toolbars');
+ var field = args.field || false;
+ var $field = field.$el || false; // bail early
+
+ if (typeof tinymce === 'undefined') return false;
+ if (!defaults) return false; // check if exists
+
+ if (tinymce.get(id)) {
+ return this.enable(id);
+ } // settings
+
+
+ var init = $.extend({}, defaults.tinymce, args.tinymce);
+ init.id = id;
+ init.selector = '#' + id; // toolbar
+
+ var toolbar = args.toolbar;
+
+ if (toolbar && toolbars && toolbars[toolbar]) {
+ for (var i = 1; i <= 4; i++) {
+ init['toolbar' + i] = toolbars[toolbar][i] || '';
+ }
+ } // event
+
+
+ init.setup = function (ed) {
+ ed.on('change', function (e) {
+ ed.save(); // save to textarea
+
+ $textarea.trigger('change');
+ }); // Fix bug where Gutenberg does not hear "mouseup" event and tries to select multiple blocks.
+
+ ed.on('mouseup', function (e) {
+ var event = new MouseEvent('mouseup');
+ window.dispatchEvent(event);
+ }); // Temporarily comment out. May not be necessary due to wysiwyg field actions.
+ //ed.on('unload', function(e) {
+ // acf.tinymce.remove( id );
+ //});
+ }; // disable wp_autoresize_on (no solution yet for fixed toolbar)
+
+
+ init.wp_autoresize_on = false; // Enable wpautop allowing value to save without tags.
+ // Only if the "TinyMCE Advanced" plugin hasn't already set this functionality.
+
+ if (!init.tadv_noautop) {
+ init.wpautop = true;
+ } // hook for 3rd party customization
+
+
+ init = acf.applyFilters('wysiwyg_tinymce_settings', init, id, field); // z-index fix (caused too many conflicts)
+ //if( acf.isset(tinymce,'ui','FloatPanel') ) {
+ // tinymce.ui.FloatPanel.zIndex = 900000;
+ //}
+ // store settings
+
+ tinyMCEPreInit.mceInit[id] = init; // visual tab is active
+
+ if (args.mode == 'visual') {
+ // init
+ var result = tinymce.init(init); // get editor
+
+ var ed = tinymce.get(id); // validate
+
+ if (!ed) {
+ return false;
+ } // add reference
+
+
+ ed.acf = args.field; // action
+
+ acf.doAction('wysiwyg_tinymce_init', ed, ed.id, init, field);
+ }
+ },
+
+ /*
+ * initializeQuicktags
+ *
+ * This function will initialize the quicktags instance
+ *
+ * @type function
+ * @date 18/8/17
+ * @since 5.6.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+ initializeQuicktags: function (id, args) {
+ // vars
+ var defaults = this.defaults(); // bail early
+
+ if (typeof quicktags === 'undefined') return false;
+ if (!defaults) return false; // settings
+
+ var init = $.extend({}, defaults.quicktags, args.quicktags);
+ init.id = id; // filter
+
+ var field = args.field || false;
+ var $field = field.$el || false;
+ init = acf.applyFilters('wysiwyg_quicktags_settings', init, init.id, field); // store settings
+
+ tinyMCEPreInit.qtInit[id] = init; // init
+
+ var ed = quicktags(init); // validate
+
+ if (!ed) {
+ return false;
+ } // generate HTML
+
+
+ this.buildQuicktags(ed); // action for 3rd party customization
+
+ acf.doAction('wysiwyg_quicktags_init', ed, ed.id, init, field);
+ },
+
+ /*
+ * buildQuicktags
+ *
+ * This function will build the quicktags HTML
+ *
+ * @type function
+ * @date 18/8/17
+ * @since 5.6.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+ buildQuicktags: function (ed) {
+ var canvas,
+ name,
+ settings,
+ theButtons,
+ html,
+ ed,
+ id,
+ i,
+ use,
+ instanceId,
+ defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,';
+ canvas = ed.canvas;
+ name = ed.name;
+ settings = ed.settings;
+ html = '';
+ theButtons = {};
+ use = '';
+ instanceId = ed.id; // set buttons
+
+ if (settings.buttons) {
+ use = ',' + settings.buttons + ',';
+ }
+
+ for (i in edButtons) {
+ if (!edButtons[i]) {
+ continue;
+ }
+
+ id = edButtons[i].id;
+
+ if (use && defaults.indexOf(',' + id + ',') !== -1 && use.indexOf(',' + id + ',') === -1) {
+ continue;
+ }
+
+ if (!edButtons[i].instance || edButtons[i].instance === instanceId) {
+ theButtons[id] = edButtons[i];
+
+ if (edButtons[i].html) {
+ html += edButtons[i].html(name + '_');
+ }
+ }
+ }
+
+ if (use && use.indexOf(',dfw,') !== -1) {
+ theButtons.dfw = new QTags.DFWButton();
+ html += theButtons.dfw.html(name + '_');
+ }
+
+ if ('rtl' === document.getElementsByTagName('html')[0].dir) {
+ theButtons.textdirection = new QTags.TextDirectionButton();
+ html += theButtons.textdirection.html(name + '_');
+ }
+
+ ed.toolbar.innerHTML = html;
+ ed.theButtons = theButtons;
+
+ if (typeof jQuery !== 'undefined') {
+ jQuery(document).triggerHandler('quicktags-init', [ed]);
+ }
+ },
+ disable: function (id) {
+ this.destroyTinymce(id);
+ },
+ remove: function (id) {
+ this.destroyTinymce(id);
+ },
+ destroy: function (id) {
+ this.destroyTinymce(id);
+ },
+ destroyTinymce: function (id) {
+ // bail early
+ if (typeof tinymce === 'undefined') return false; // get editor
+
+ var ed = tinymce.get(id); // bail early if no editor
+
+ if (!ed) return false; // save
+
+ ed.save(); // destroy editor
+
+ ed.destroy(); // return
+
+ return true;
+ },
+ enable: function (id) {
+ this.enableTinymce(id);
+ },
+ enableTinymce: function (id) {
+ // bail early
+ if (typeof switchEditors === 'undefined') return false; // bail ealry if not initialized
+
+ if (typeof tinyMCEPreInit.mceInit[id] === 'undefined') return false; // Ensure textarea element is visible
+ // - Fixes bug in block editor when switching between "Block" and "Document" tabs.
+
+ $('#' + id).show(); // toggle
+
+ switchEditors.go(id, 'tmce'); // return
+
+ return true;
+ }
+ };
+ var editorManager = new acf.Model({
+ // hook in before fieldsEventManager, conditions, etc
+ priority: 5,
+ actions: {
+ 'prepare': 'onPrepare',
+ 'ready': 'onReady'
+ },
+ onPrepare: function () {
+ // find hidden editor which may exist within a field
+ var $div = $('#acf-hidden-wp-editor'); // move to footer
+
+ if ($div.exists()) {
+ $div.appendTo('body');
+ }
+ },
+ onReady: function () {
+ // Restore wp.editor functions used by tinymce removed in WP5.
+ if (acf.isset(window, 'wp', 'oldEditor')) {
+ wp.editor.autop = wp.oldEditor.autop;
+ wp.editor.removep = wp.oldEditor.removep;
+ } // bail early if no tinymce
+
+
+ if (!acf.isset(window, 'tinymce', 'on')) return; // restore default activeEditor
+
+ tinymce.on('AddEditor', function (data) {
+ // vars
+ var editor = data.editor; // bail early if not 'acf'
+
+ if (editor.id.substr(0, 3) !== 'acf') return; // override if 'content' exists
+
+ editor = tinymce.editors.content || editor; // update vars
+
+ tinymce.activeEditor = editor;
+ wpActiveEditor = editor.id;
+ });
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * Validator
+ *
+ * The model for validating forms
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return void
+ */
+ var Validator = acf.Model.extend({
+ /** @var string The model identifier. */
+ id: 'Validator',
+
+ /** @var object The model data. */
+ data: {
+ /** @var array The form errors. */
+ errors: [],
+
+ /** @var object The form notice. */
+ notice: null,
+
+ /** @var string The form status. loading, invalid, valid */
+ status: ''
+ },
+
+ /** @var object The model events. */
+ events: {
+ 'changed:status': 'onChangeStatus'
+ },
+
+ /**
+ * addErrors
+ *
+ * Adds errors to the form.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param array errors An array of errors.
+ * @return void
+ */
+ addErrors: function (errors) {
+ errors.map(this.addError, this);
+ },
+
+ /**
+ * addError
+ *
+ * Adds and error to the form.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param object error An error object containing input and message.
+ * @return void
+ */
+ addError: function (error) {
+ this.data.errors.push(error);
+ },
+
+ /**
+ * hasErrors
+ *
+ * Returns true if the form has errors.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return bool
+ */
+ hasErrors: function () {
+ return this.data.errors.length;
+ },
+
+ /**
+ * clearErrors
+ *
+ * Removes any errors.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return void
+ */
+ clearErrors: function () {
+ return this.data.errors = [];
+ },
+
+ /**
+ * getErrors
+ *
+ * Returns the forms errors.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return array
+ */
+ getErrors: function () {
+ return this.data.errors;
+ },
+
+ /**
+ * getFieldErrors
+ *
+ * Returns the forms field errors.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return array
+ */
+ getFieldErrors: function () {
+ // vars
+ var errors = [];
+ var inputs = []; // loop
+
+ this.getErrors().map(function (error) {
+ // bail early if global
+ if (!error.input) return; // update if exists
+
+ var i = inputs.indexOf(error.input);
+
+ if (i > -1) {
+ errors[i] = error; // update
+ } else {
+ errors.push(error);
+ inputs.push(error.input);
+ }
+ }); // return
+
+ return errors;
+ },
+
+ /**
+ * getGlobalErrors
+ *
+ * Returns the forms global errors (errors without a specific input).
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return array
+ */
+ getGlobalErrors: function () {
+ // return array of errors that contain no input
+ return this.getErrors().filter(function (error) {
+ return !error.input;
+ });
+ },
+
+ /**
+ * showErrors
+ *
+ * Displays all errors for this form.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return void
+ */
+ showErrors: function () {
+ // bail early if no errors
+ if (!this.hasErrors()) {
+ return;
+ } // vars
+
+
+ var fieldErrors = this.getFieldErrors();
+ var globalErrors = this.getGlobalErrors(); // vars
+
+ var errorCount = 0;
+ var $scrollTo = false; // loop
+
+ fieldErrors.map(function (error) {
+ // get input
+ var $input = this.$('[name="' + error.input + '"]').first(); // if $_POST value was an array, this $input may not exist
+
+ if (!$input.length) {
+ $input = this.$('[name^="' + error.input + '"]').first();
+ } // bail early if input doesn't exist
+
+
+ if (!$input.length) {
+ return;
+ } // increase
+
+
+ errorCount++; // get field
+
+ var field = acf.getClosestField($input); // show error
+
+ field.showError(error.message); // set $scrollTo
+
+ if (!$scrollTo) {
+ $scrollTo = field.$el;
+ }
+ }, this); // errorMessage
+
+ var errorMessage = acf.__('Validation failed');
+
+ globalErrors.map(function (error) {
+ errorMessage += '. ' + error.message;
+ });
+
+ if (errorCount == 1) {
+ errorMessage += '. ' + acf.__('1 field requires attention');
+ } else if (errorCount > 1) {
+ errorMessage += '. ' + acf.__('%d fields require attention').replace('%d', errorCount);
+ } // notice
+
+
+ if (this.has('notice')) {
+ this.get('notice').update({
+ type: 'error',
+ text: errorMessage
+ });
+ } else {
+ var notice = acf.newNotice({
+ type: 'error',
+ text: errorMessage,
+ target: this.$el
+ });
+ this.set('notice', notice);
+ } // if no $scrollTo, set to message
+
+
+ if (!$scrollTo) {
+ $scrollTo = this.get('notice').$el;
+ } // timeout
+
+
+ setTimeout(function () {
+ $("html, body").animate({
+ scrollTop: $scrollTo.offset().top - $(window).height() / 2
+ }, 500);
+ }, 10);
+ },
+
+ /**
+ * onChangeStatus
+ *
+ * Update the form class when changing the 'status' data
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param object e The event object.
+ * @param jQuery $el The form element.
+ * @param string value The new status.
+ * @param string prevValue The old status.
+ * @return void
+ */
+ onChangeStatus: function (e, $el, value, prevValue) {
+ this.$el.removeClass('is-' + prevValue).addClass('is-' + value);
+ },
+
+ /**
+ * validate
+ *
+ * Vaildates the form via AJAX.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param object args A list of settings to customize the validation process.
+ * @return bool True if the form is valid.
+ */
+ validate: function (args) {
+ // default args
+ args = acf.parseArgs(args, {
+ // trigger event
+ event: false,
+ // reset the form after submit
+ reset: false,
+ // loading callback
+ loading: function () {},
+ // complete callback
+ complete: function () {},
+ // failure callback
+ failure: function () {},
+ // success callback
+ success: function ($form) {
+ $form.submit();
+ }
+ }); // return true if is valid - allows form submit
+
+ if (this.get('status') == 'valid') {
+ return true;
+ } // return false if is currently validating - prevents form submit
+
+
+ if (this.get('status') == 'validating') {
+ return false;
+ } // return true if no ACF fields exist (no need to validate)
+
+
+ if (!this.$('.acf-field').length) {
+ return true;
+ } // if event is provided, create a new success callback.
+
+
+ if (args.event) {
+ var event = $.Event(null, args.event);
+
+ args.success = function () {
+ acf.enableSubmit($(event.target)).trigger(event);
+ };
+ } // action for 3rd party
+
+
+ acf.doAction('validation_begin', this.$el); // lock form
+
+ acf.lockForm(this.$el); // loading callback
+
+ args.loading(this.$el, this); // update status
+
+ this.set('status', 'validating'); // success callback
+
+ var onSuccess = function (json) {
+ // validate
+ if (!acf.isAjaxSuccess(json)) {
+ return;
+ } // filter
+
+
+ var data = acf.applyFilters('validation_complete', json.data, this.$el, this); // add errors
+
+ if (!data.valid) {
+ this.addErrors(data.errors);
+ }
+ }; // complete
+
+
+ var onComplete = function () {
+ // unlock form
+ acf.unlockForm(this.$el); // failure
+
+ if (this.hasErrors()) {
+ // update status
+ this.set('status', 'invalid'); // action
+
+ acf.doAction('validation_failure', this.$el, this); // display errors
+
+ this.showErrors(); // failure callback
+
+ args.failure(this.$el, this); // success
+ } else {
+ // update status
+ this.set('status', 'valid'); // remove previous error message
+
+ if (this.has('notice')) {
+ this.get('notice').update({
+ type: 'success',
+ text: acf.__('Validation successful'),
+ timeout: 1000
+ });
+ } // action
+
+
+ acf.doAction('validation_success', this.$el, this);
+ acf.doAction('submit', this.$el); // success callback (submit form)
+
+ args.success(this.$el, this); // lock form
+
+ acf.lockForm(this.$el); // reset
+
+ if (args.reset) {
+ this.reset();
+ }
+ } // complete callback
+
+
+ args.complete(this.$el, this); // clear errors
+
+ this.clearErrors();
+ }; // serialize form data
+
+
+ var data = acf.serialize(this.$el);
+ data.action = 'acf/validate_save_post'; // ajax
+
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(data),
+ type: 'post',
+ dataType: 'json',
+ context: this,
+ success: onSuccess,
+ complete: onComplete
+ }); // return false to fail validation and allow AJAX
+
+ return false;
+ },
+
+ /**
+ * setup
+ *
+ * Called during the constructor function to setup this instance
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $form The form element.
+ * @return void
+ */
+ setup: function ($form) {
+ // set $el
+ this.$el = $form;
+ },
+
+ /**
+ * reset
+ *
+ * Rests the validation to be used again.
+ *
+ * @date 6/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return void
+ */
+ reset: function () {
+ // reset data
+ this.set('errors', []);
+ this.set('notice', null);
+ this.set('status', ''); // unlock form
+
+ acf.unlockForm(this.$el);
+ }
+ });
+ /**
+ * getValidator
+ *
+ * Returns the instance for a given form element.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $el The form element.
+ * @return object
+ */
+
+ var getValidator = function ($el) {
+ // instantiate
+ var validator = $el.data('acf');
+
+ if (!validator) {
+ validator = new Validator($el);
+ } // return
+
+
+ return validator;
+ };
+ /**
+ * acf.validateForm
+ *
+ * A helper function for the Validator.validate() function.
+ * Returns true if form is valid, or fetches a validation request and returns false.
+ *
+ * @date 4/4/18
+ * @since 5.6.9
+ *
+ * @param object args A list of settings to customize the validation process.
+ * @return bool
+ */
+
+
+ acf.validateForm = function (args) {
+ return getValidator(args.form).validate(args);
+ };
+ /**
+ * acf.enableSubmit
+ *
+ * Enables a submit button and returns the element.
+ *
+ * @date 30/8/18
+ * @since 5.7.4
+ *
+ * @param jQuery $submit The submit button.
+ * @return jQuery
+ */
+
+
+ acf.enableSubmit = function ($submit) {
+ return $submit.removeClass('disabled');
+ };
+ /**
+ * acf.disableSubmit
+ *
+ * Disables a submit button and returns the element.
+ *
+ * @date 30/8/18
+ * @since 5.7.4
+ *
+ * @param jQuery $submit The submit button.
+ * @return jQuery
+ */
+
+
+ acf.disableSubmit = function ($submit) {
+ return $submit.addClass('disabled');
+ };
+ /**
+ * acf.showSpinner
+ *
+ * Shows the spinner element.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $spinner The spinner element.
+ * @return jQuery
+ */
+
+
+ acf.showSpinner = function ($spinner) {
+ $spinner.addClass('is-active'); // add class (WP > 4.2)
+
+ $spinner.css('display', 'inline-block'); // css (WP < 4.2)
+
+ return $spinner;
+ };
+ /**
+ * acf.hideSpinner
+ *
+ * Hides the spinner element.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $spinner The spinner element.
+ * @return jQuery
+ */
+
+
+ acf.hideSpinner = function ($spinner) {
+ $spinner.removeClass('is-active'); // add class (WP > 4.2)
+
+ $spinner.css('display', 'none'); // css (WP < 4.2)
+
+ return $spinner;
+ };
+ /**
+ * acf.lockForm
+ *
+ * Locks a form by disabeling its primary inputs and showing a spinner.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $form The form element.
+ * @return jQuery
+ */
+
+
+ acf.lockForm = function ($form) {
+ // vars
+ var $wrap = findSubmitWrap($form);
+ var $submit = $wrap.find('.button, [type="submit"]');
+ var $spinner = $wrap.find('.spinner, .acf-spinner'); // hide all spinners (hides the preview spinner)
+
+ acf.hideSpinner($spinner); // lock
+
+ acf.disableSubmit($submit);
+ acf.showSpinner($spinner.last());
+ return $form;
+ };
+ /**
+ * acf.unlockForm
+ *
+ * Unlocks a form by enabeling its primary inputs and hiding all spinners.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $form The form element.
+ * @return jQuery
+ */
+
+
+ acf.unlockForm = function ($form) {
+ // vars
+ var $wrap = findSubmitWrap($form);
+ var $submit = $wrap.find('.button, [type="submit"]');
+ var $spinner = $wrap.find('.spinner, .acf-spinner'); // unlock
+
+ acf.enableSubmit($submit);
+ acf.hideSpinner($spinner);
+ return $form;
+ };
+ /**
+ * findSubmitWrap
+ *
+ * An internal function to find the 'primary' form submit wrapping element.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $form The form element.
+ * @return jQuery
+ */
+
+
+ var findSubmitWrap = function ($form) {
+ // default post submit div
+ var $wrap = $form.find('#submitdiv');
+
+ if ($wrap.length) {
+ return $wrap;
+ } // 3rd party publish box
+
+
+ var $wrap = $form.find('#submitpost');
+
+ if ($wrap.length) {
+ return $wrap;
+ } // term, user
+
+
+ var $wrap = $form.find('p.submit').last();
+
+ if ($wrap.length) {
+ return $wrap;
+ } // front end form
+
+
+ var $wrap = $form.find('.acf-form-submit');
+
+ if ($wrap.length) {
+ return $wrap;
+ } // default
+
+
+ return $form;
+ };
+ /**
+ * A debounced function to trigger a form submission.
+ *
+ * @date 15/07/2020
+ * @since 5.9.0
+ *
+ * @param type Var Description.
+ * @return type Description.
+ */
+
+
+ var submitFormDebounced = acf.debounce(function ($form) {
+ $form.submit();
+ });
+ /**
+ * acf.validation
+ *
+ * Global validation logic
+ *
+ * @date 4/4/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return void
+ */
+
+ acf.validation = new acf.Model({
+ /** @var string The model identifier. */
+ id: 'validation',
+
+ /** @var bool The active state. Set to false before 'prepare' to prevent validation. */
+ active: true,
+
+ /** @var string The model initialize time. */
+ wait: 'prepare',
+
+ /** @var object The model actions. */
+ actions: {
+ 'ready': 'addInputEvents',
+ 'append': 'addInputEvents'
+ },
+
+ /** @var object The model events. */
+ events: {
+ 'click input[type="submit"]': 'onClickSubmit',
+ 'click button[type="submit"]': 'onClickSubmit',
+ //'click #editor .editor-post-publish-button': 'onClickSubmitGutenberg',
+ 'click #save-post': 'onClickSave',
+ 'submit form#post': 'onSubmitPost',
+ 'submit form': 'onSubmit'
+ },
+
+ /**
+ * initialize
+ *
+ * Called when initializing the model.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return void
+ */
+ initialize: function () {
+ // check 'validation' setting
+ if (!acf.get('validation')) {
+ this.active = false;
+ this.actions = {};
+ this.events = {};
+ }
+ },
+
+ /**
+ * enable
+ *
+ * Enables validation.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return void
+ */
+ enable: function () {
+ this.active = true;
+ },
+
+ /**
+ * disable
+ *
+ * Disables validation.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param void
+ * @return void
+ */
+ disable: function () {
+ this.active = false;
+ },
+
+ /**
+ * reset
+ *
+ * Rests the form validation to be used again
+ *
+ * @date 6/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $form The form element.
+ * @return void
+ */
+ reset: function ($form) {
+ getValidator($form).reset();
+ },
+
+ /**
+ * addInputEvents
+ *
+ * Adds 'invalid' event listeners to HTML inputs.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param jQuery $el The element being added / readied.
+ * @return void
+ */
+ addInputEvents: function ($el) {
+ // Bug exists in Safari where custom "invalid" handeling prevents draft from saving.
+ if (acf.get('browser') === 'safari') return; // vars
+
+ var $inputs = $('.acf-field [name]', $el); // check
+
+ if ($inputs.length) {
+ this.on($inputs, 'invalid', 'onInvalid');
+ }
+ },
+
+ /**
+ * onInvalid
+ *
+ * Callback for the 'invalid' event.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param object e The event object.
+ * @param jQuery $el The input element.
+ * @return void
+ */
+ onInvalid: function (e, $el) {
+ // prevent default
+ // - prevents browser error message
+ // - also fixes chrome bug where 'hidden-by-tab' field throws focus error
+ e.preventDefault(); // vars
+
+ var $form = $el.closest('form'); // check form exists
+
+ if ($form.length) {
+ // add error to validator
+ getValidator($form).addError({
+ input: $el.attr('name'),
+ message: acf.strEscape(e.target.validationMessage)
+ }); // trigger submit on $form
+ // - allows for "save", "preview" and "publish" to work
+
+ submitFormDebounced($form);
+ }
+ },
+
+ /**
+ * onClickSubmit
+ *
+ * Callback when clicking submit.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param object e The event object.
+ * @param jQuery $el The input element.
+ * @return void
+ */
+ onClickSubmit: function (e, $el) {
+ // store the "click event" for later use in this.onSubmit()
+ this.set('originalEvent', e);
+ },
+
+ /**
+ * onClickSave
+ *
+ * Set ignore to true when saving a draft.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param object e The event object.
+ * @param jQuery $el The input element.
+ * @return void
+ */
+ onClickSave: function (e, $el) {
+ this.set('ignore', true);
+ },
+
+ /**
+ * onClickSubmitGutenberg
+ *
+ * Custom validation event for the gutenberg editor.
+ *
+ * @date 29/10/18
+ * @since 5.8.0
+ *
+ * @param object e The event object.
+ * @param jQuery $el The input element.
+ * @return void
+ */
+ onClickSubmitGutenberg: function (e, $el) {
+ // validate
+ var valid = acf.validateForm({
+ form: $('#editor'),
+ event: e,
+ reset: true,
+ failure: function ($form, validator) {
+ var $notice = validator.get('notice').$el;
+ $notice.appendTo('.components-notice-list');
+ $notice.find('.acf-notice-dismiss').removeClass('small');
+ }
+ }); // if not valid, stop event and allow validation to continue
+
+ if (!valid) {
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ }
+ },
+
+ /**
+ * onSubmitPost
+ *
+ * Callback when the 'post' form is submit.
+ *
+ * @date 5/3/19
+ * @since 5.7.13
+ *
+ * @param object e The event object.
+ * @param jQuery $el The input element.
+ * @return void
+ */
+ onSubmitPost: function (e, $el) {
+ // Check if is preview.
+ if ($('input#wp-preview').val() === 'dopreview') {
+ // Ignore validation.
+ this.set('ignore', true); // Unlock form to fix conflict with core "submit.edit-post" event causing all submit buttons to be disabled.
+
+ acf.unlockForm($el);
+ }
+ },
+
+ /**
+ * onSubmit
+ *
+ * Callback when the form is submit.
+ *
+ * @date 4/9/18
+ * @since 5.7.5
+ *
+ * @param object e The event object.
+ * @param jQuery $el The input element.
+ * @return void
+ */
+ onSubmit: function (e, $el) {
+ // Allow form to submit if...
+ if ( // Validation has been disabled.
+ !this.active // Or this event is to be ignored.
+ || this.get('ignore') // Or this event has already been prevented.
+ || e.isDefaultPrevented()) {
+ // Return early and call reset function.
+ return this.allowSubmit();
+ } // Validate form.
+
+
+ var valid = acf.validateForm({
+ form: $el,
+ event: this.get('originalEvent')
+ }); // If not valid, stop event to prevent form submit.
+
+ if (!valid) {
+ e.preventDefault();
+ }
+ },
+
+ /**
+ * allowSubmit
+ *
+ * Resets data during onSubmit when the form is allowed to submit.
+ *
+ * @date 5/3/19
+ * @since 5.7.13
+ *
+ * @param void
+ * @return void
+ */
+ allowSubmit: function () {
+ // Reset "ignore" state.
+ this.set('ignore', false); // Reset "originalEvent" object.
+
+ this.set('originalEvent', false); // Return true
+
+ return true;
+ }
+ });
+ var gutenbergValidation = new acf.Model({
+ wait: 'prepare',
+ initialize: function () {
+ // Bail early if not Gutenberg.
+ if (!acf.isGutenberg()) {
+ return;
+ } // Custommize the editor.
+
+
+ this.customizeEditor();
+ },
+ customizeEditor: function () {
+ // Extract vars.
+ var editor = wp.data.dispatch('core/editor');
+ var editorSelect = wp.data.select('core/editor');
+ var notices = wp.data.dispatch('core/notices'); // Backup original method.
+
+ var savePost = editor.savePost; // Listen for changes to post status and perform actions:
+ // a) Enable validation for "publish" action.
+ // b) Remember last non "publish" status used for restoring after validation fail.
+
+ var useValidation = false;
+ var lastPostStatus = '';
+ wp.data.subscribe(function () {
+ var postStatus = editorSelect.getEditedPostAttribute('status');
+ useValidation = postStatus === 'publish';
+ lastPostStatus = postStatus !== 'publish' ? postStatus : lastPostStatus;
+ }); // Create validation version.
+
+ editor.savePost = function (options) {
+ options = options || {}; // Backup vars.
+
+ var _this = this;
+
+ var _args = arguments; // Perform validation within a Promise.
+
+ return new Promise(function (resolve, reject) {
+ // Bail early if is autosave or preview.
+ if (options.isAutosave || options.isPreview) {
+ return resolve('Validation ignored (autosave).');
+ } // Bail early if validation is not neeed.
+
+
+ if (!useValidation) {
+ return resolve('Validation ignored (draft).');
+ } // Validate the editor form.
+
+
+ var valid = acf.validateForm({
+ form: $('#editor'),
+ reset: true,
+ complete: function ($form, validator) {
+ // Always unlock the form after AJAX.
+ editor.unlockPostSaving('acf');
+ },
+ failure: function ($form, validator) {
+ // Get validation error and append to Gutenberg notices.
+ var notice = validator.get('notice');
+ notices.createErrorNotice(notice.get('text'), {
+ id: 'acf-validation',
+ isDismissible: true
+ });
+ notice.remove(); // Restore last non "publish" status.
+
+ if (lastPostStatus) {
+ editor.editPost({
+ status: lastPostStatus
+ });
+ } // Rejext promise and prevent savePost().
+
+
+ reject('Validation failed.');
+ },
+ success: function () {
+ notices.removeNotice('acf-validation'); // Resolve promise and allow savePost().
+
+ resolve('Validation success.');
+ }
+ }); // Resolve promise and allow savePost() if no validation is needed.
+
+ if (valid) {
+ resolve('Validation bypassed.'); // Otherwise, lock the form and wait for AJAX response.
+ } else {
+ editor.lockPostSaving('acf');
+ }
+ }).then(function () {
+ return savePost.apply(_this, _args);
+ });
+ };
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * refreshHelper
+ *
+ * description
+ *
+ * @date 1/7/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+ var refreshHelper = new acf.Model({
+ priority: 90,
+ actions: {
+ 'new_field': 'refresh',
+ 'show_field': 'refresh',
+ 'hide_field': 'refresh',
+ 'remove_field': 'refresh',
+ 'unmount_field': 'refresh',
+ 'remount_field': 'refresh'
+ },
+ refresh: function () {
+ acf.refresh();
+ }
+ });
+ /**
+ * mountHelper
+ *
+ * Adds compatiblity for the 'unmount' and 'remount' actions added in 5.8.0
+ *
+ * @date 7/3/19
+ * @since 5.7.14
+ *
+ * @param void
+ * @return void
+ */
+
+ var mountHelper = new acf.Model({
+ priority: 1,
+ actions: {
+ 'sortstart': 'onSortstart',
+ 'sortstop': 'onSortstop'
+ },
+ onSortstart: function ($item) {
+ acf.doAction('unmount', $item);
+ },
+ onSortstop: function ($item) {
+ acf.doAction('remount', $item);
+ }
+ });
+ /**
+ * sortableHelper
+ *
+ * Adds compatibility for sorting a
element
+ *
+ * @date 6/3/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return void
+ */
+
+ var sortableHelper = new acf.Model({
+ actions: {
+ 'sortstart': 'onSortstart'
+ },
+ onSortstart: function ($item, $placeholder) {
+ // if $item is a tr, apply some css to the elements
+ if ($item.is('tr')) {
+ // replace $placeholder children with a single td
+ // fixes "width calculation issues" due to conditional logic hiding some children
+ $placeholder.html(' '); // add helper class to remove absolute positioning
+
+ $item.addClass('acf-sortable-tr-helper'); // set fixed widths for children
+
+ $item.children().each(function () {
+ $(this).width($(this).width());
+ }); // mimic height
+
+ $placeholder.height($item.height() + 'px'); // remove class
+
+ $item.removeClass('acf-sortable-tr-helper');
+ }
+ }
+ });
+ /**
+ * duplicateHelper
+ *
+ * Fixes browser bugs when duplicating an element
+ *
+ * @date 6/3/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return void
+ */
+
+ var duplicateHelper = new acf.Model({
+ actions: {
+ 'after_duplicate': 'onAfterDuplicate'
+ },
+ onAfterDuplicate: function ($el, $el2) {
+ // get original values
+ var vals = [];
+ $el.find('select').each(function (i) {
+ vals.push($(this).val());
+ }); // set duplicate values
+
+ $el2.find('select').each(function (i) {
+ $(this).val(vals[i]);
+ });
+ }
+ });
+ /**
+ * tableHelper
+ *
+ * description
+ *
+ * @date 6/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var tableHelper = new acf.Model({
+ id: 'tableHelper',
+ priority: 20,
+ actions: {
+ 'refresh': 'renderTables'
+ },
+ renderTables: function ($el) {
+ // loop
+ var self = this;
+ $('.acf-table:visible').each(function () {
+ self.renderTable($(this));
+ });
+ },
+ renderTable: function ($table) {
+ // vars
+ var $ths = $table.find('> thead > tr:visible > th[data-key]');
+ var $tds = $table.find('> tbody > tr:visible > td[data-key]'); // bail early if no thead
+
+ if (!$ths.length || !$tds.length) {
+ return false;
+ } // visiblity
+
+
+ $ths.each(function (i) {
+ // vars
+ var $th = $(this);
+ var key = $th.data('key');
+ var $cells = $tds.filter('[data-key="' + key + '"]');
+ var $hidden = $cells.filter('.acf-hidden'); // always remove empty and allow cells to be hidden
+
+ $cells.removeClass('acf-empty'); // hide $th if all cells are hidden
+
+ if ($cells.length === $hidden.length) {
+ acf.hide($th); // force all hidden cells to appear empty
+ } else {
+ acf.show($th);
+ $hidden.addClass('acf-empty');
+ }
+ }); // clear width
+
+ $ths.css('width', 'auto'); // get visible
+
+ $ths = $ths.not('.acf-hidden'); // vars
+
+ var availableWidth = 100;
+ var colspan = $ths.length; // set custom widths first
+
+ var $fixedWidths = $ths.filter('[data-width]');
+ $fixedWidths.each(function () {
+ var width = $(this).data('width');
+ $(this).css('width', width + '%');
+ availableWidth -= width;
+ }); // set auto widths
+
+ var $auoWidths = $ths.not('[data-width]');
+
+ if ($auoWidths.length) {
+ var width = availableWidth / $auoWidths.length;
+ $auoWidths.css('width', width + '%');
+ availableWidth = 0;
+ } // avoid stretching issue
+
+
+ if (availableWidth > 0) {
+ $ths.last().css('width', 'auto');
+ } // update colspan on collapsed
+
+
+ $tds.filter('.-collapsed-target').each(function () {
+ // vars
+ var $td = $(this); // check if collapsed
+
+ if ($td.parent().hasClass('-collapsed')) {
+ $td.attr('colspan', $ths.length);
+ } else {
+ $td.removeAttr('colspan');
+ }
+ });
+ }
+ });
+ /**
+ * fieldsHelper
+ *
+ * description
+ *
+ * @date 6/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var fieldsHelper = new acf.Model({
+ id: 'fieldsHelper',
+ priority: 30,
+ actions: {
+ 'refresh': 'renderGroups'
+ },
+ renderGroups: function () {
+ // loop
+ var self = this;
+ $('.acf-fields:visible').each(function () {
+ self.renderGroup($(this));
+ });
+ },
+ renderGroup: function ($el) {
+ // vars
+ var top = 0;
+ var height = 0;
+ var $row = $(); // get fields
+
+ var $fields = $el.children('.acf-field[data-width]:visible'); // bail early if no fields
+
+ if (!$fields.length) {
+ return false;
+ } // bail ealry if is .-left
+
+
+ if ($el.hasClass('-left')) {
+ $fields.removeAttr('data-width');
+ $fields.css('width', 'auto');
+ return false;
+ } // reset fields
+
+
+ $fields.removeClass('-r0 -c0').css({
+ 'min-height': 0
+ }); // loop
+
+ $fields.each(function (i) {
+ // vars
+ var $field = $(this);
+ var position = $field.position();
+ var thisTop = Math.ceil(position.top);
+ var thisLeft = Math.ceil(position.left); // detect change in row
+
+ if ($row.length && thisTop > top) {
+ // set previous heights
+ $row.css({
+ 'min-height': height + 'px'
+ }); // update position due to change in row above
+
+ position = $field.position();
+ thisTop = Math.ceil(position.top);
+ thisLeft = Math.ceil(position.left); // reset vars
+
+ top = 0;
+ height = 0;
+ $row = $();
+ } // rtl
+
+
+ if (acf.get('rtl')) {
+ thisLeft = Math.ceil($field.parent().width() - (position.left + $field.outerWidth()));
+ } // add classes
+
+
+ if (thisTop == 0) {
+ $field.addClass('-r0');
+ } else if (thisLeft == 0) {
+ $field.addClass('-c0');
+ } // get height after class change
+ // - add 1 for subpixel rendering
+
+
+ var thisHeight = Math.ceil($field.outerHeight()) + 1; // set height
+
+ height = Math.max(height, thisHeight); // set y
+
+ top = Math.max(top, thisTop); // append
+
+ $row = $row.add($field);
+ }); // clean up
+
+ if ($row.length) {
+ $row.css({
+ 'min-height': height + 'px'
+ });
+ }
+ }
+ });
+ /**
+ * Adds a body class when holding down the "shift" key.
+ *
+ * @date 06/05/2020
+ * @since 5.9.0
+ */
+
+ var bodyClassShiftHelper = new acf.Model({
+ id: 'bodyClassShiftHelper',
+ events: {
+ 'keydown': 'onKeyDown',
+ 'keyup': 'onKeyUp'
+ },
+ isShiftKey: function (e) {
+ return e.keyCode === 16;
+ },
+ onKeyDown: function (e) {
+ if (this.isShiftKey(e)) {
+ $('body').addClass('acf-keydown-shift');
+ }
+ },
+ onKeyUp: function (e) {
+ if (this.isShiftKey(e)) {
+ $('body').removeClass('acf-keydown-shift');
+ }
+ }
+ });
+})(jQuery);
+
+(function ($, undefined) {
+ /**
+ * acf.newCompatibility
+ *
+ * Inserts a new __proto__ object compatibility layer
+ *
+ * @date 15/2/18
+ * @since 5.6.9
+ *
+ * @param object instance The object to modify.
+ * @param object compatibilty Optional. The compatibilty layer.
+ * @return object compatibilty
+ */
+ acf.newCompatibility = function (instance, compatibilty) {
+ // defaults
+ compatibilty = compatibilty || {}; // inherit __proto_-
+
+ compatibilty.__proto__ = instance.__proto__; // inject
+
+ instance.__proto__ = compatibilty; // reference
+
+ instance.compatibility = compatibilty; // return
+
+ return compatibilty;
+ };
+ /**
+ * acf.getCompatibility
+ *
+ * Returns the compatibility layer for a given instance
+ *
+ * @date 13/3/18
+ * @since 5.6.9
+ *
+ * @param object instance The object to look in.
+ * @return object|null compatibility The compatibility object or null on failure.
+ */
+
+
+ acf.getCompatibility = function (instance) {
+ return instance.compatibility || null;
+ };
+ /**
+ * acf (compatibility)
+ *
+ * Compatibility layer for the acf object
+ *
+ * @date 15/2/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return void
+ */
+
+
+ var _acf = acf.newCompatibility(acf, {
+ // storage
+ l10n: {},
+ o: {},
+ fields: {},
+ // changed function names
+ update: acf.set,
+ add_action: acf.addAction,
+ remove_action: acf.removeAction,
+ do_action: acf.doAction,
+ add_filter: acf.addFilter,
+ remove_filter: acf.removeFilter,
+ apply_filters: acf.applyFilters,
+ parse_args: acf.parseArgs,
+ disable_el: acf.disable,
+ disable_form: acf.disable,
+ enable_el: acf.enable,
+ enable_form: acf.enable,
+ update_user_setting: acf.updateUserSetting,
+ prepare_for_ajax: acf.prepareForAjax,
+ is_ajax_success: acf.isAjaxSuccess,
+ remove_el: acf.remove,
+ remove_tr: acf.remove,
+ str_replace: acf.strReplace,
+ render_select: acf.renderSelect,
+ get_uniqid: acf.uniqid,
+ serialize_form: acf.serialize,
+ esc_html: acf.strEscape,
+ str_sanitize: acf.strSanitize
+ });
+
+ _acf._e = function (k1, k2) {
+ // defaults
+ k1 = k1 || '';
+ k2 = k2 || ''; // compability
+
+ var compatKey = k2 ? k1 + '.' + k2 : k1;
+ var compats = {
+ 'image.select': 'Select Image',
+ 'image.edit': 'Edit Image',
+ 'image.update': 'Update Image'
+ };
+
+ if (compats[compatKey]) {
+ return acf.__(compats[compatKey]);
+ } // try k1
+
+
+ var string = this.l10n[k1] || ''; // try k2
+
+ if (k2) {
+ string = string[k2] || '';
+ } // return
+
+
+ return string;
+ };
+
+ _acf.get_selector = function (s) {
+ // vars
+ var selector = '.acf-field'; // bail early if no search
+
+ if (!s) {
+ return selector;
+ } // compatibility with object
+
+
+ if ($.isPlainObject(s)) {
+ if ($.isEmptyObject(s)) {
+ return selector;
+ } else {
+ for (var k in s) {
+ s = s[k];
+ break;
+ }
+ }
+ } // append
+
+
+ selector += '-' + s; // replace underscores (split/join replaces all and is faster than regex!)
+
+ selector = acf.strReplace('_', '-', selector); // remove potential double up
+
+ selector = acf.strReplace('field-field-', 'field-', selector); // return
+
+ return selector;
+ };
+
+ _acf.get_fields = function (s, $el, all) {
+ // args
+ var args = {
+ is: s || '',
+ parent: $el || false,
+ suppressFilters: all || false
+ }; // change 'field_123' to '.acf-field-123'
+
+ if (args.is) {
+ args.is = this.get_selector(args.is);
+ } // return
+
+
+ return acf.findFields(args);
+ };
+
+ _acf.get_field = function (s, $el) {
+ // get fields
+ var $fields = this.get_fields.apply(this, arguments); // return
+
+ if ($fields.length) {
+ return $fields.first();
+ } else {
+ return false;
+ }
+ };
+
+ _acf.get_closest_field = function ($el, s) {
+ return $el.closest(this.get_selector(s));
+ };
+
+ _acf.get_field_wrap = function ($el) {
+ return $el.closest(this.get_selector());
+ };
+
+ _acf.get_field_key = function ($field) {
+ return $field.data('key');
+ };
+
+ _acf.get_field_type = function ($field) {
+ return $field.data('type');
+ };
+
+ _acf.get_data = function ($el, defaults) {
+ return acf.parseArgs($el.data(), defaults);
+ };
+
+ _acf.maybe_get = function (obj, key, value) {
+ // default
+ if (value === undefined) {
+ value = null;
+ } // get keys
+
+
+ keys = String(key).split('.'); // acf.isget
+
+ for (var i = 0; i < keys.length; i++) {
+ if (!obj.hasOwnProperty(keys[i])) {
+ return value;
+ }
+
+ obj = obj[keys[i]];
+ }
+
+ return obj;
+ };
+ /**
+ * hooks
+ *
+ * Modify add_action and add_filter functions to add compatibility with changed $field parameter
+ * Using the acf.add_action() or acf.add_filter() functions will interpret new field parameters as jQuery $field
+ *
+ * @date 12/5/18
+ * @since 5.6.9
+ *
+ * @param void
+ * @return void
+ */
+
+
+ var compatibleArgument = function (arg) {
+ return arg instanceof acf.Field ? arg.$el : arg;
+ };
+
+ var compatibleArguments = function (args) {
+ return acf.arrayArgs(args).map(compatibleArgument);
+ };
+
+ var compatibleCallback = function (origCallback) {
+ return function () {
+ // convert to compatible arguments
+ if (arguments.length) {
+ var args = compatibleArguments(arguments); // add default argument for 'ready', 'append' and 'load' events
+ } else {
+ var args = [$(document)];
+ } // return
+
+
+ return origCallback.apply(this, args);
+ };
+ };
+
+ _acf.add_action = function (action, callback, priority, context) {
+ // handle multiple actions
+ var actions = action.split(' ');
+ var length = actions.length;
+
+ if (length > 1) {
+ for (var i = 0; i < length; i++) {
+ action = actions[i];
+
+ _acf.add_action.apply(this, arguments);
+ }
+
+ return this;
+ } // single
+
+
+ var callback = compatibleCallback(callback);
+ return acf.addAction.apply(this, arguments);
+ };
+
+ _acf.add_filter = function (action, callback, priority, context) {
+ var callback = compatibleCallback(callback);
+ return acf.addFilter.apply(this, arguments);
+ };
+ /*
+ * acf.model
+ *
+ * This model acts as a scafold for action.event driven modules
+ *
+ * @type object
+ * @date 8/09/2014
+ * @since 5.0.0
+ *
+ * @param (object)
+ * @return (object)
+ */
+
+
+ _acf.model = {
+ actions: {},
+ filters: {},
+ events: {},
+ extend: function (args) {
+ // extend
+ var model = $.extend({}, this, args); // setup actions
+
+ $.each(model.actions, function (name, callback) {
+ model._add_action(name, callback);
+ }); // setup filters
+
+ $.each(model.filters, function (name, callback) {
+ model._add_filter(name, callback);
+ }); // setup events
+
+ $.each(model.events, function (name, callback) {
+ model._add_event(name, callback);
+ }); // return
+
+ return model;
+ },
+ _add_action: function (name, callback) {
+ // split
+ var model = this,
+ data = name.split(' '); // add missing priority
+
+ var name = data[0] || '',
+ priority = data[1] || 10; // add action
+
+ acf.add_action(name, model[callback], priority, model);
+ },
+ _add_filter: function (name, callback) {
+ // split
+ var model = this,
+ data = name.split(' '); // add missing priority
+
+ var name = data[0] || '',
+ priority = data[1] || 10; // add action
+
+ acf.add_filter(name, model[callback], priority, model);
+ },
+ _add_event: function (name, callback) {
+ // vars
+ var model = this,
+ i = name.indexOf(' '),
+ event = i > 0 ? name.substr(0, i) : name,
+ selector = i > 0 ? name.substr(i + 1) : ''; // event
+
+ var fn = function (e) {
+ // append $el to event object
+ e.$el = $(this); // append $field to event object (used in field group)
+
+ if (acf.field_group) {
+ e.$field = e.$el.closest('.acf-field-object');
+ } // event
+
+
+ if (typeof model.event === 'function') {
+ e = model.event(e);
+ } // callback
+
+
+ model[callback].apply(model, arguments);
+ }; // add event
+
+
+ if (selector) {
+ $(document).on(event, selector, fn);
+ } else {
+ $(document).on(event, fn);
+ }
+ },
+ get: function (name, value) {
+ // defaults
+ value = value || null; // get
+
+ if (typeof this[name] !== 'undefined') {
+ value = this[name];
+ } // return
+
+
+ return value;
+ },
+ set: function (name, value) {
+ // set
+ this[name] = value; // function for 3rd party
+
+ if (typeof this['_set_' + name] === 'function') {
+ this['_set_' + name].apply(this);
+ } // return for chaining
+
+
+ return this;
+ }
+ };
+ /*
+ * field
+ *
+ * This model sets up many of the field's interactions
+ *
+ * @type function
+ * @date 21/02/2014
+ * @since 3.5.1
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ _acf.field = acf.model.extend({
+ type: '',
+ o: {},
+ $field: null,
+ _add_action: function (name, callback) {
+ // vars
+ var model = this; // update name
+
+ name = name + '_field/type=' + model.type; // add action
+
+ acf.add_action(name, function ($field) {
+ // focus
+ model.set('$field', $field); // callback
+
+ model[callback].apply(model, arguments);
+ });
+ },
+ _add_filter: function (name, callback) {
+ // vars
+ var model = this; // update name
+
+ name = name + '_field/type=' + model.type; // add action
+
+ acf.add_filter(name, function ($field) {
+ // focus
+ model.set('$field', $field); // callback
+
+ model[callback].apply(model, arguments);
+ });
+ },
+ _add_event: function (name, callback) {
+ // vars
+ var model = this,
+ event = name.substr(0, name.indexOf(' ')),
+ selector = name.substr(name.indexOf(' ') + 1),
+ context = acf.get_selector(model.type); // add event
+
+ $(document).on(event, context + ' ' + selector, function (e) {
+ // vars
+ var $el = $(this);
+ var $field = acf.get_closest_field($el, model.type); // bail early if no field
+
+ if (!$field.length) return; // focus
+
+ if (!$field.is(model.$field)) {
+ model.set('$field', $field);
+ } // append to event
+
+
+ e.$el = $el;
+ e.$field = $field; // callback
+
+ model[callback].apply(model, [e]);
+ });
+ },
+ _set_$field: function () {
+ // callback
+ if (typeof this.focus === 'function') {
+ this.focus();
+ }
+ },
+ // depreciated
+ doFocus: function ($field) {
+ return this.set('$field', $field);
+ }
+ });
+ /**
+ * validation
+ *
+ * description
+ *
+ * @date 15/2/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var _validation = acf.newCompatibility(acf.validation, {
+ remove_error: function ($field) {
+ acf.getField($field).removeError();
+ },
+ add_warning: function ($field, message) {
+ acf.getField($field).showNotice({
+ text: message,
+ type: 'warning',
+ timeout: 1000
+ });
+ },
+ fetch: acf.validateForm,
+ enableSubmit: acf.enableSubmit,
+ disableSubmit: acf.disableSubmit,
+ showSpinner: acf.showSpinner,
+ hideSpinner: acf.hideSpinner,
+ unlockForm: acf.unlockForm,
+ lockForm: acf.lockForm
+ });
+ /**
+ * tooltip
+ *
+ * description
+ *
+ * @date 15/2/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+
+ _acf.tooltip = {
+ tooltip: function (text, $el) {
+ var tooltip = acf.newTooltip({
+ text: text,
+ target: $el
+ }); // return
+
+ return tooltip.$el;
+ },
+ temp: function (text, $el) {
+ var tooltip = acf.newTooltip({
+ text: text,
+ target: $el,
+ timeout: 250
+ });
+ },
+ confirm: function ($el, callback, text, button_y, button_n) {
+ var tooltip = acf.newTooltip({
+ confirm: true,
+ text: text,
+ target: $el,
+ confirm: function () {
+ callback(true);
+ },
+ cancel: function () {
+ callback(false);
+ }
+ });
+ },
+ confirm_remove: function ($el, callback) {
+ var tooltip = acf.newTooltip({
+ confirmRemove: true,
+ target: $el,
+ confirm: function () {
+ callback(true);
+ },
+ cancel: function () {
+ callback(false);
+ }
+ });
+ }
+ };
+ /**
+ * tooltip
+ *
+ * description
+ *
+ * @date 15/2/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ _acf.media = new acf.Model({
+ activeFrame: false,
+ actions: {
+ 'new_media_popup': 'onNewMediaPopup'
+ },
+ frame: function () {
+ return this.activeFrame;
+ },
+ onNewMediaPopup: function (popup) {
+ this.activeFrame = popup.frame;
+ },
+ popup: function (props) {
+ // update props
+ if (props.mime_types) {
+ props.allowedTypes = props.mime_types;
+ }
+
+ if (props.id) {
+ props.attachment = props.id;
+ } // new
+
+
+ var popup = acf.newMediaPopup(props); // append
+
+ /*
+ if( props.selected ) {
+ popup.selected = props.selected;
+ }
+ */
+ // return
+
+ return popup.frame;
+ }
+ });
+ /**
+ * Select2
+ *
+ * description
+ *
+ * @date 11/6/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ _acf.select2 = {
+ init: function ($select, args, $field) {
+ // compatible args
+ if (args.allow_null) {
+ args.allowNull = args.allow_null;
+ }
+
+ if (args.ajax_action) {
+ args.ajaxAction = args.ajax_action;
+ }
+
+ if ($field) {
+ args.field = acf.getField($field);
+ } // return
+
+
+ return acf.newSelect2($select, args);
+ },
+ destroy: function ($select) {
+ return acf.getInstance($select).destroy();
+ }
+ };
+ /**
+ * postbox
+ *
+ * description
+ *
+ * @date 11/6/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ _acf.postbox = {
+ render: function (args) {
+ // compatible args
+ if (args.edit_url) {
+ args.editLink = args.edit_url;
+ }
+
+ if (args.edit_title) {
+ args.editTitle = args.edit_title;
+ } // return
+
+
+ return acf.newPostbox(args);
+ }
+ };
+ /**
+ * acf.screen
+ *
+ * description
+ *
+ * @date 11/6/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.newCompatibility(acf.screen, {
+ update: function () {
+ return this.set.apply(this, arguments);
+ },
+ fetch: acf.screen.check
+ });
+ _acf.ajax = acf.screen;
+})(jQuery);
\ No newline at end of file
diff --git a/assets/build/js/acf-input.min.js b/assets/build/js/acf-input.min.js
new file mode 100644
index 0000000..fd1d9f4
--- /dev/null
+++ b/assets/build/js/acf-input.min.js
@@ -0,0 +1 @@
+!function(e,i){var a=[];acf.Field=acf.Model.extend({type:"",eventScope:".acf-field",wait:"ready",setup:function(t){this.$el=t,this.inherit(t),this.inherit(this.$control())},val:function(t){return t!==i?this.setValue(t):this.prop("disabled")?null:this.getValue()},getValue:function(){return this.$input().val()},setValue:function(t){return acf.val(this.$input(),t)},__:function(t){return acf._e(this.type,t)},$control:function(){return!1},$input:function(){return this.$("[name]:first")},$inputWrap:function(){return this.$(".acf-input:first")},$labelWrap:function(){return this.$(".acf-label:first")},getInputName:function(){return this.$input().attr("name")||""},parent:function(){var t=this.parents();return!!t.length&&t[0]},parents:function(){var t=this.$el.parents(".acf-field");return acf.getFields(t)},show:function(t,e){t=acf.show(this.$el,t);return t&&(this.prop("hidden",!1),acf.doAction("show_field",this,e)),t},hide:function(t,e){t=acf.hide(this.$el,t);return t&&(this.prop("hidden",!0),acf.doAction("hide_field",this,e)),t},enable:function(t,e){t=acf.enable(this.$el,t);return t&&(this.prop("disabled",!1),acf.doAction("enable_field",this,e)),t},disable:function(t,e){t=acf.disable(this.$el,t);return t&&(this.prop("disabled",!0),acf.doAction("disable_field",this,e)),t},showEnable:function(t,e){return this.enable.apply(this,arguments),this.show.apply(this,arguments)},hideDisable:function(t,e){return this.disable.apply(this,arguments),this.hide.apply(this,arguments)},showNotice:function(t){"object"!=typeof t&&(t={text:t}),this.notice&&this.notice.remove(),t.target=this.$inputWrap(),this.notice=acf.newNotice(t)},removeNotice:function(t){this.notice&&(this.notice.away(t||0),this.notice=!1)},showError:function(t){this.$el.addClass("acf-error"),t!==i&&this.showNotice({text:t,type:"error",dismiss:!1}),acf.doAction("invalid_field",this),this.$el.one("focus change","input, select, textarea",e.proxy(this.removeError,this))},removeError:function(){this.$el.removeClass("acf-error"),this.removeNotice(250),acf.doAction("valid_field",this)},trigger:function(t,e,i){return"invalidField"==t&&(i=!0),acf.Model.prototype.trigger.apply(this,[t,e,i])}}),acf.newField=function(t){var e=t.data("type"),e=n(e),t=new(acf.models[e]||acf.Field)(t);return acf.doAction("new_field",t),t};var n=function(t){return acf.strPascalCase(t||"")+"Field"};acf.registerFieldType=function(t){var e=t.prototype.type,i=n(e);acf.models[i]=t,a.push(e)},acf.getFieldType=function(t){t=n(t);return acf.models[t]||!1},acf.getFieldTypes=function(i){i=acf.parseArgs(i,{category:""});var n=[];return a.map(function(t){var e=acf.getFieldType(t),t=e.prototype;i.category&&t.category!==i.category||n.push(e)}),n}}(jQuery),function(n){acf.findFields=function(t){var e=".acf-field",i=!1;return(t=!(t=acf.parseArgs(t,{key:"",name:"",type:"",is:"",parent:!1,sibling:!1,limit:!1,visible:!1,suppressFilters:!1})).suppressFilters?acf.applyFilters("find_fields_args",t):t).key&&(e+='[data-key="'+t.key+'"]'),t.type&&(e+='[data-type="'+t.type+'"]'),t.name&&(e+='[data-name="'+t.name+'"]'),t.is&&(e+=t.is),t.visible&&(e+=":visible"),i=t.parent?t.parent.find(e):t.sibling?t.sibling.siblings(e):n(e),t.suppressFilters||(i=i.not(".acf-clone .acf-field"),i=acf.applyFilters("find_fields",i)),i=t.limit?i.slice(0,t.limit):i},acf.findField=function(t,e){return acf.findFields({key:t,limit:1,parent:e,suppressFilters:!0})},acf.getField=function(t){return(t=!(t instanceof jQuery)?acf.findField(t):t).data("acf")||acf.newField(t)},acf.getFields=function(t){t instanceof jQuery||(t=acf.findFields(t));var e=[];return t.each(function(){var t=acf.getField(n(this));e.push(t)}),e},acf.findClosestField=function(t){return t.closest(".acf-field")},acf.getClosestField=function(t){t=acf.findClosestField(t);return this.getField(t)};var e=function(t){var a=t+"_field",s=t+"Field";acf.addAction(a,function(e){var i=acf.arrayArgs(arguments),n=i.slice(1);["type","name","key"].map(function(t){t="/"+t+"="+e.get(t);i=[a+t,e].concat(n),acf.doAction.apply(null,i)}),-1 '),e=c('
'),o=c(''),r=c(" "),t.append(n.html()),o.append(r),e.append(o),a.append(t),a.append(e),n.remove(),s.remove(),a.attr("colspan",2),n=t,a=e,s=r),i.addClass("acf-accordion"),n.addClass("acf-accordion-title"),a.addClass("acf-accordion-content"),l++,this.get("multi_expand")&&i.attr("multi-expand",1);var r=acf.getPreference("this.accordions")||[];void 0!==r[l-1]&&this.set("open",r[l-1]),this.get("open")&&(i.addClass("-open"),a.css("display","block")),n.prepend(d.iconHtml({open:this.get("open")}));n=i.parent();s.addClass(n.hasClass("-left")?"-left":""),s.addClass(n.hasClass("-clear")?"-clear":""),s.append(i.nextUntil(".acf-field-accordion",".acf-field")),s.removeAttr("data-open data-multi_expand data-endpoint")}}});acf.registerFieldType(t);var d=new acf.Model({actions:{unload:"onUnload"},events:{"click .acf-accordion-title":"onClick","invalidField .acf-accordion":"onInvalidField"},isOpen:function(t){return t.hasClass("-open")},toggle:function(t){this.isOpen(t)?this.close(t):this.open(t)},iconHtml:function(t){return acf.isGutenberg()?t.open?' ':' ':t.open?' ':' '},open:function(t){var e=acf.isGutenberg()?0:300;t.find(".acf-accordion-content:first").slideDown(e).css("display","block"),t.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!0})),t.addClass("-open"),acf.doAction("show",t),t.attr("multi-expand")||t.siblings(".acf-accordion.-open").each(function(){d.close(c(this))})},close:function(t){var e=acf.isGutenberg()?0:300;t.find(".acf-accordion-content:first").slideUp(e),t.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!1})),t.removeClass("-open"),acf.doAction("hide",t)},onClick:function(t,e){t.preventDefault(),this.toggle(e.parent())},onInvalidField:function(t,e){this.busy||(this.busy=!0,this.setTimeout(function(){this.busy=!1},1e3),this.open(e))},onUnload:function(t){var e=[];c(".acf-accordion").each(function(){var t=c(this).hasClass("-open")?1:0;e.push(t)}),e.length&&acf.setPreference("this.accordions",e)}})}(jQuery),function(){var t=acf.Field.extend({type:"button_group",events:{'click input[type="radio"]':"onClick"},$control:function(){return this.$(".acf-button-group")},$input:function(){return this.$("input:checked")},setValue:function(t){this.$('input[value="'+t+'"]').prop("checked",!0).trigger("change")},onClick:function(t,e){var i=e.parent("label"),n=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&n&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"))}});acf.registerFieldType(t)}(jQuery),function(e){var t=acf.Field.extend({type:"checkbox",events:{"change input":"onChange","click .acf-add-checkbox":"onClickAdd","click .acf-checkbox-toggle":"onClickToggle","click .acf-checkbox-custom":"onClickCustom"},$control:function(){return this.$(".acf-checkbox-list")},$toggle:function(){return this.$(".acf-checkbox-toggle")},$input:function(){return this.$('input[type="hidden"]')},$inputs:function(){return this.$('input[type="checkbox"]').not(".acf-checkbox-toggle")},getValue:function(){var t=[];return this.$(":checked").each(function(){t.push(e(this).val())}),!!t.length&&t},onChange:function(t,e){var i=e.prop("checked"),n=e.parent("label"),e=this.$toggle();i?n.addClass("selected"):n.removeClass("selected"),e.length&&(0==this.$inputs().not(":checked").length?e.prop("checked",!0):e.prop("checked",!1))},onClickAdd:function(t,e){var i=' ';e.parent("li").before(i)},onClickToggle:function(t,e){var i=e.prop("checked"),n=this.$('input[type="checkbox"]'),e=this.$("label");n.prop("checked",i),i?e.addClass("selected"):e.removeClass("selected")},onClickCustom:function(t,e){var i=e.prop("checked"),n=e.next('input[type="text"]');i?n.prop("disabled",!1):(n.prop("disabled",!0),""==n.val()&&e.parent("li").remove())}});acf.registerFieldType(t)}(jQuery),function(){var t=acf.Field.extend({type:"color_picker",wait:"load",events:{duplicateField:"onDuplicate"},$control:function(){return this.$(".acf-color-picker")},$input:function(){return this.$('input[type="hidden"]')},$inputText:function(){return this.$('input[type="text"]')},setValue:function(t){acf.val(this.$input(),t),this.$inputText().iris("color",t)},initialize:function(){var e=this.$input(),i=this.$inputText(),t=function(t){setTimeout(function(){acf.val(e,i.val())},1)},t={defaultColor:!1,palettes:!0,hide:!0,change:t,clear:t},t=acf.applyFilters("color_picker_args",t,this);i.wpColorPicker(t)},onDuplicate:function(t,e,i){$colorPicker=i.find(".wp-picker-container"),$inputText=i.find('input[type="text"]'),$colorPicker.replaceWith($inputText)}});acf.registerFieldType(t)}(jQuery),function(n){var t=acf.Field.extend({type:"date_picker",events:{'blur input[type="text"]':"onBlur",duplicateField:"onDuplicate"},$control:function(){return this.$(".acf-date-picker")},$input:function(){return this.$('input[type="hidden"]')},$inputText:function(){return this.$('input[type="text"]')},initialize:function(){if(this.has("save_format"))return this.initializeCompatibility();var t=this.$input(),e=this.$inputText(),t={dateFormat:this.get("date_format"),altField:t,altFormat:"yymmdd",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")},t=acf.applyFilters("date_picker_args",t,this);acf.newDatePicker(e,t),acf.doAction("date_picker_init",e,t,this)},initializeCompatibility:function(){var t=this.$input(),e=this.$inputText();e.val(t.val());var i={dateFormat:this.get("date_format"),altField:t,altFormat:this.get("save_format"),changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")},t=(i=acf.applyFilters("date_picker_args",i,this)).dateFormat;i.dateFormat=this.get("save_format"),acf.newDatePicker(e,i),e.datepicker("option","dateFormat",t),acf.doAction("date_picker_init",e,i,this)},onBlur:function(){this.$inputText().val()||acf.val(this.$input(),"")},onDuplicate:function(t,e,i){i.find('input[type="text"]').removeClass("hasDatepicker").removeAttr("id")}});acf.registerFieldType(t);new acf.Model({priority:5,wait:"ready",initialize:function(){var t=acf.get("locale"),e=acf.get("rtl"),i=acf.get("datePickerL10n");return!!i&&(void 0!==n.datepicker&&(i.isRTL=e,n.datepicker.regional[t]=i,void n.datepicker.setDefaults(i)))}});acf.newDatePicker=function(t,e){if(void 0===n.datepicker)return!1;t.datepicker(e=e||{}),n("body > #ui-datepicker-div").exists()&&n("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(n){var t=acf.models.DatePickerField.extend({type:"date_time_picker",$control:function(){return this.$(".acf-date-time-picker")},initialize:function(){var t=this.$input(),e=this.$inputText(),t={dateFormat:this.get("date_format"),timeFormat:this.get("time_format"),altField:t,altFieldTimeOnly:!1,altFormat:"yy-mm-dd",altTimeFormat:"HH:mm:ss",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day"),controlType:"select",oneLine:!0},t=acf.applyFilters("date_time_picker_args",t,this);acf.newDateTimePicker(e,t),acf.doAction("date_time_picker_init",e,t,this)}});acf.registerFieldType(t);new acf.Model({priority:5,wait:"ready",initialize:function(){var t=acf.get("locale"),e=acf.get("rtl"),i=acf.get("dateTimePickerL10n");return!!i&&(void 0!==n.timepicker&&(i.isRTL=e,n.timepicker.regional[t]=i,void n.timepicker.setDefaults(i)))}});acf.newDateTimePicker=function(t,e){if(void 0===n.timepicker)return!1;t.datetimepicker(e=e||{}),n("body > #ui-datepicker-div").exists()&&n("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(e){var t=acf.Field.extend({type:"google_map",map:!1,wait:"load",events:{'click a[data-name="clear"]':"onClickClear",'click a[data-name="locate"]':"onClickLocate",'click a[data-name="search"]':"onClickSearch","keydown .search":"onKeydownSearch","keyup .search":"onKeyupSearch","focus .search":"onFocusSearch","blur .search":"onBlurSearch",showField:"onShow"},$control:function(){return this.$(".acf-google-map")},$search:function(){return this.$(".search")},$canvas:function(){return this.$(".canvas")},setState:function(t){this.$control().removeClass("-value -loading -searching"),(t="default"===t?this.val()?"value":"":t)&&this.$control().addClass("-"+t)},getValue:function(){var t=this.$input().val();return!!t&&JSON.parse(t)},setValue:function(t,e){var i="";t&&(i=JSON.stringify(t)),acf.val(this.$input(),i),e||(this.renderVal(t),acf.doAction("google_map_change",t,this.map,this))},renderVal:function(t){t?(this.setState("value"),this.$search().val(t.address),this.setPosition(t.lat,t.lng)):(this.setState(""),this.$search().val(""),this.map.marker.setVisible(!1))},newLatLng:function(t,e){return new google.maps.LatLng(parseFloat(t),parseFloat(e))},setPosition:function(t,e){this.map.marker.setPosition({lat:parseFloat(t),lng:parseFloat(e)}),this.map.marker.setVisible(!0),this.center()},center:function(){var t,e=this.map.marker.getPosition();e=e?(t=e.lat(),e.lng()):(t=this.get("lat"),this.get("lng")),this.map.setCenter({lat:parseFloat(t),lng:parseFloat(e)})},initialize:function(){!function(t){if(a)return t();if(acf.isset(window,"google","maps","Geocoder"))return a=new google.maps.Geocoder,t();acf.addAction("google_map_api_loaded",t),i||(t=acf.get("google_map_api"))&&(i=!0,e.ajax({url:t,dataType:"script",cache:!0,success:function(){a=new google.maps.Geocoder,acf.doAction("google_map_api_loaded")}}))}(this.initializeMap.bind(this))},initializeMap:function(){var t=this.getValue(),e=acf.parseArgs(t,{zoom:this.get("zoom"),lat:this.get("lat"),lng:this.get("lng")}),i={scrollwheel:!1,zoom:parseInt(e.zoom),center:{lat:parseFloat(e.lat),lng:parseFloat(e.lng)},mapTypeId:google.maps.MapTypeId.ROADMAP,marker:{draggable:!0,raiseOnDrag:!0},autocomplete:{}},i=acf.applyFilters("google_map_args",i,this),n=new google.maps.Map(this.$canvas()[0],i),a=acf.parseArgs(i.marker,{draggable:!0,raiseOnDrag:!0,map:n}),a=acf.applyFilters("google_map_marker_args",a,this),e=new google.maps.Marker(a),a=!1;acf.isset(google,"maps","places","Autocomplete")&&(i=i.autocomplete||{},i=acf.applyFilters("google_map_autocomplete_args",i,this),(a=new google.maps.places.Autocomplete(this.$search()[0],i)).bindTo("bounds",n)),this.addMapEvents(this,n,e,a),n.acf=this,n.marker=e,n.autocomplete=a,this.map=n,t&&this.setPosition(t.lat,t.lng),acf.doAction("google_map_init",n,e,this)},addMapEvents:function(i,e,t,n){google.maps.event.addListener(e,"click",function(t){var e=t.latLng.lat(),t=t.latLng.lng();i.searchPosition(e,t)}),google.maps.event.addListener(t,"dragend",function(){var t=this.getPosition().lat(),e=this.getPosition().lng();i.searchPosition(t,e)}),n&&google.maps.event.addListener(n,"place_changed",function(){var t=this.getPlace();i.searchPlace(t)}),google.maps.event.addListener(e,"zoom_changed",function(){var t=i.val();t&&(t.zoom=e.getZoom(),i.setValue(t,!0))})},searchPosition:function(i,n){this.setState("loading"),a.geocode({location:{lat:i,lng:n}},function(t,e){this.setState(""),"OK"!==e?this.showNotice({text:acf.__("Location not found: %s").replace("%s",e),type:"warning"}):((t=this.parseResult(t[0])).lat=i,t.lng=n,this.val(t))}.bind(this))},searchPlace:function(t){var e;t&&(t.geometry?(t.formatted_address=this.$search().val(),e=this.parseResult(t),this.val(e)):t.name&&this.searchAddress(t.name))},searchAddress:function(i){if(i){var t=i.split(",");if(2==t.length){var e=parseFloat(t[0]),t=parseFloat(t[1]);if(e&&t)return this.searchPosition(e,t)}this.setState("loading"),a.geocode({address:i},function(t,e){this.setState(""),"OK"!==e?this.showNotice({text:acf.__("Location not found: %s").replace("%s",e),type:"warning"}):((t=this.parseResult(t[0])).address=i,this.val(t))}.bind(this))}},searchLocation:function(){if(!navigator.geolocation)return alert(acf.__("Sorry, this browser does not support geolocation"));this.setState("loading"),navigator.geolocation.getCurrentPosition(function(t){this.setState("");var e=t.coords.latitude,t=t.coords.longitude;this.searchPosition(e,t)}.bind(this),function(t){this.setState("")}.bind(this))},parseResult:function(t){var e={address:t.formatted_address,lat:t.geometry.location.lat(),lng:t.geometry.location.lng()};e.zoom=this.map.getZoom(),t.place_id&&(e.place_id=t.place_id),t.name&&(e.name=t.name);var i,n={street_number:["street_number"],street_name:["street_address","route"],city:["locality"],state:["administrative_area_level_1","administrative_area_level_2","administrative_area_level_3","administrative_area_level_4","administrative_area_level_5"],post_code:["postal_code"],country:["country"]};for(i in n)for(var a=n[i],s=0;s');e("body").append(t);t=this.getNodeValue();wpLink.open("acf-link-textarea",t.url,t.title,null)},onOpen:function(){e("#wp-link-wrap").addClass("has-text-field");var t=this.getNodeValue();this.setInputValue(t),t.url&&wpLinkL10n&&e("#wp-link-submit").val(wpLinkL10n.update)},close:function(){wpLink.close()},onClose:function(){if(!this.has("node"))return!1;var t=e("#wp-link-submit");(t.is(":hover")||t.is(":focus"))&&(t=this.getInputValue(),this.setNodeValue(t)),this.off("wplink-open"),this.off("wplink-close"),e("#acf-link-textarea").remove(),this.set("node",null)}})}(jQuery),function(i){var t=acf.Field.extend({type:"oembed",events:{'click [data-name="clear-button"]':"onClickClear","keypress .input-search":"onKeypressSearch","keyup .input-search":"onKeyupSearch","change .input-search":"onChangeSearch"},$control:function(){return this.$(".acf-oembed")},$input:function(){return this.$(".input-value")},$search:function(){return this.$(".input-search")},getValue:function(){return this.$input().val()},getSearchVal:function(){return this.$search().val()},setValue:function(t){t?this.$control().addClass("has-value"):this.$control().removeClass("has-value"),acf.val(this.$input(),t)},showLoading:function(t){acf.showLoading(this.$(".canvas"))},hideLoading:function(){acf.hideLoading(this.$(".canvas"))},maybeSearch:function(){var t=this.val(),e=this.getSearchVal();if(!e)return this.clear();(e="http"!=e.substr(0,4)?"http://"+e:e)!==t&&((t=this.get("timeout"))&&clearTimeout(t),e=i.proxy(this.search,this,e),this.set("timeout",setTimeout(e,300)))},search:function(t){var e={action:"acf/fields/oembed/search",s:t,field_key:this.get("key")};(t=this.get("xhr"))&&t.abort(),this.showLoading();t=i.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"json",context:this,success:function(t){t&&t.html||(t={url:!1,html:""}),this.val(t.url),this.$(".canvas-media").html(t.html)},complete:function(){this.hideLoading()}});this.set("xhr",t)},clear:function(){this.val(""),this.$search().val(""),this.$(".canvas-media").html("")},onClickClear:function(t,e){this.clear()},onKeypressSearch:function(t,e){13==t.which&&(t.preventDefault(),this.maybeSearch())},onKeyupSearch:function(t,e){e.val()&&this.maybeSearch()},onChangeSearch:function(t,e){this.maybeSearch()}});acf.registerFieldType(t)}(jQuery),function(){var t=acf.Field.extend({type:"radio",events:{'click input[type="radio"]':"onClick"},$control:function(){return this.$(".acf-radio-list")},$input:function(){return this.$("input:checked")},$inputText:function(){return this.$('input[type="text"]')},getValue:function(){var t=this.$input().val();return t="other"===t&&this.get("other_choice")?this.$inputText().val():t},onClick:function(t,e){var i=e.parent("label"),n=i.hasClass("selected"),a=e.val();this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&n&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"),a=!1),this.get("other_choice")&&("other"===a?this.$inputText().prop("disabled",!1):this.$inputText().prop("disabled",!0))}});acf.registerFieldType(t)}(jQuery),function(){var t=acf.Field.extend({type:"range",events:{'input input[type="range"]':"onChange","change input":"onChange"},$input:function(){return this.$('input[type="range"]')},$inputAlt:function(){return this.$('input[type="number"]')},setValue:function(t){this.busy=!0,acf.val(this.$input(),t),acf.val(this.$inputAlt(),this.$input().val(),!0),this.busy=!1},onChange:function(t,e){this.busy||this.setValue(e.val())}});acf.registerFieldType(t)}(jQuery),function(s){var t=acf.Field.extend({type:"relationship",events:{"keypress [data-filter]":"onKeypressFilter","change [data-filter]":"onChangeFilter","keyup [data-filter]":"onChangeFilter","click .choices-list .acf-rel-item":"onClickAdd",'click [data-name="remove_item"]':"onClickRemove"},$control:function(){return this.$(".acf-relationship")},$list:function(t){return this.$("."+t+"-list")},$listItems:function(t){return this.$list(t).find(".acf-rel-item")},$listItem:function(t,e){return this.$list(t).find('.acf-rel-item[data-id="'+e+'"]')},getValue:function(){var t=[];return this.$listItems("values").each(function(){t.push(s(this).data("id"))}),!!t.length&&t},newChoice:function(t){return["",''+t.text+" "," "].join("")},newValue:function(t){return["",' ',''+t.text,' '," "," "].join("")},initialize:function(){var t=this.proxy(acf.once(function(){this.$list("values").sortable({items:"li",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,update:this.proxy(function(){this.$input().trigger("change")})}),this.$list("choices").scrollTop(0).on("scroll",this.proxy(this.onScrollChoices)),this.fetch()}));this.$el.one("mouseover",t),this.$el.one("focus","input",t),acf.onceInView(this.$el,t)},onScrollChoices:function(t){var e,i,n,a;!this.get("loading")&&this.get("more")&&(a=this.$list("choices"),e=Math.ceil(a.scrollTop()),i=Math.ceil(a[0].scrollHeight),n=Math.ceil(a.innerHeight()),a=this.get("paged")||1,i<=e+n&&(this.set("paged",a+1),this.fetch()))},onKeypressFilter:function(t,e){13==t.which&&t.preventDefault()},onChangeFilter:function(t,e){var i=e.val(),n=e.data("filter");this.get(n)!==i&&(this.set(n,i),this.set("paged",1),e.is("select")?this.fetch():this.maybeFetch())},onClickAdd:function(t,e){var i=this.val(),n=parseInt(this.get("max"));if(e.hasClass("disabled"))return!1;if(0=n)return this.showNotice({text:acf.__("Maximum values reached ( {max} values )").replace("{max}",n),type:"warning"}),!1;e.addClass("disabled");e=this.newValue({id:e.data("id"),text:e.html()});this.$list("values").append(e),this.$input().trigger("change")},onClickRemove:function(t,e){t.preventDefault();t=e.parent(),e=t.parent(),t=t.data("id");e.remove(),this.$listItem("choices",t).removeClass("disabled"),this.$input().trigger("change")},maybeFetch:function(){var t=this.get("timeout");t&&clearTimeout(t),t=this.setTimeout(this.fetch,300),this.set("timeout",t)},getAjaxData:function(){var t,e=this.$control().data();for(t in e)e[t]=this.get(t);return e.action="acf/fields/relationship/query",e.field_key=this.get("key"),e=acf.applyFilters("relationship_ajax_data",e,this)},fetch:function(){(i=this.get("xhr"))&&i.abort();var t=this.getAjaxData(),a=this.$list("choices");1==t.paged&&a.html("");var e=s(' '+acf.__("Loading")+" ");a.append(e),this.set("loading",!0);var i=s.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",data:acf.prepareForAjax(t),context:this,success:function(t){if(!t||!t.results||!t.results.length)return this.set("more",!1),void(1==this.get("paged")&&this.$list("choices").append(""+acf.__("No matches found")+" "));this.set("more",t.more);var t=this.walkChoices(t.results),e=s(t),t=this.val();t&&t.length&&t.map(function(t){e.find('.acf-rel-item[data-id="'+t+'"]').addClass("disabled")}),a.append(e);var i=!1,n=!1;a.find(".acf-rel-label").each(function(){var t=s(this),e=t.siblings("ul");if(i&&i.text()==t.text())return n.append(e.children()),void s(this).parent().remove();i=t,n=e})},complete:function(){this.set("loading",!1),e.remove()}});this.set("xhr",i)},walkChoices:function(t){var i=function(t){var e="";return s.isArray(t)?t.map(function(t){e+=i(t)}):s.isPlainObject(t)&&(void 0!==t.children?(e+=''+acf.escHtml(t.text)+' "):e+=''+acf.escHtml(t.text)+" "),e};return i(t)}});acf.registerFieldType(t)}(jQuery),function(){var t=acf.Field.extend({type:"select",select2:!1,wait:"load",events:{removeField:"onRemove",duplicateField:"onDuplicate"},$input:function(){return this.$("select")},initialize:function(){var t,e=this.$input();this.inherit(e),this.get("ui")&&(t=(t=this.get("ajax_action"))||"acf/fields/"+this.get("type")+"/query",this.select2=acf.newSelect2(e,{field:this,ajax:this.get("ajax"),multiple:this.get("multiple"),placeholder:this.get("placeholder"),allowNull:this.get("allow_null"),ajaxAction:t}))},onRemove:function(){this.select2&&this.select2.destroy()},onDuplicate:function(t,e,i){this.select2&&(i.find(".select2-container").remove(),i.find("select").removeClass("select2-hidden-accessible"))}});acf.registerFieldType(t)}(jQuery),function(n){var e="tab",t=acf.Field.extend({type:"tab",wait:"",tabs:!1,tab:!1,events:{duplicateField:"onDuplicate"},findFields:function(){return this.$el.nextUntil(".acf-field-tab",".acf-field")},getFields:function(){return acf.getFields(this.findFields())},findTabs:function(){return this.$el.prevAll(".acf-tab-wrap:first")},findTab:function(){return this.$(".acf-tab-button")},initialize:function(){if(this.$el.is("td"))return!(this.events={});var t=this.findTabs(),e=this.findTab(),i=acf.parseArgs(e.data(),{endpoint:!1,placement:"",before:this.$el});!t.length||i.endpoint?this.tabs=new s(i):this.tabs=t.data("acf"),this.tab=this.tabs.addTab(e,this)},isActive:function(){return this.tab.isActive()},showFields:function(){this.getFields().map(function(t){t.show(this.cid,e),t.hiddenByTab=!1},this)},hideFields:function(){this.getFields().map(function(t){t.hide(this.cid,e),t.hiddenByTab=this.tab},this)},show:function(t){var e=acf.Field.prototype.show.apply(this,arguments);return e&&(this.tab.show(),this.tabs.refresh()),e},hide:function(t){var e=acf.Field.prototype.hide.apply(this,arguments);return e&&(this.tab.hide(),this.isActive()&&this.tabs.reset()),e},enable:function(t){this.getFields().map(function(t){t.enable(e)})},disable:function(t){this.getFields().map(function(t){t.disable(e)})},onDuplicate:function(t,e,i){this.isActive()&&i.prevAll(".acf-tab-wrap:first").remove()}});acf.registerFieldType(t);var a=0,s=acf.Model.extend({tabs:[],active:!1,actions:{refresh:"onRefresh"},data:{before:!1,placement:"top",index:0,initialized:!1},setup:function(t){n.extend(this.data,t),this.tabs=[],this.active=!1;var e=this.get("placement"),i=this.get("before"),t=i.parent();"left"==e&&t.hasClass("acf-fields")&&t.addClass("-sidebar"),i.is("tr")?this.$el=n(' '):this.$el=n(''),i.before(this.$el),this.set("index",a,!0),a++},initializeTabs:function(){var t=this.getVisible().shift(),e=(acf.getPreference("this.tabs")||[])[this.get("index")];(t=this.tabs[e]&&this.tabs[e].isVisible()?this.tabs[e]:t)?this.selectTab(t):this.closeTabs(),this.set("initialized",!0)},getVisible:function(){return this.tabs.filter(function(t){return t.isVisible()})},getActive:function(){return this.active},setActive:function(t){return this.active=t},hasActive:function(){return!1!==this.active},isActive:function(t){var e=this.getActive();return e&&e.cid===t.cid},closeActive:function(){this.hasActive()&&this.closeTab(this.getActive())},openTab:function(t){this.closeActive(),t.open(),this.setActive(t)},closeTab:function(t){t.close(),this.setActive(!1)},closeTabs:function(){this.tabs.map(this.closeTab,this)},selectTab:function(e){this.tabs.map(function(t){e.cid!==t.cid&&this.closeTab(t)},this),this.openTab(e)},addTab:function(t,e){t=n(""+t.outerHTML()+" ");this.$("ul").append(t);e=new i({$el:t,field:e,group:this});return this.tabs.push(e),e},reset:function(){return this.closeActive(),this.refresh()},refresh:function(){if(this.hasActive())return!1;var t=this.getVisible().shift();return t&&this.openTab(t),t},onRefresh:function(){var t,e,i;"left"===this.get("placement")&&(t=this.$el.parent(),i=this.$el.children("ul"),e=t.is("td")?"height":"min-height",i=i.position().top+i.outerHeight(!0)-1,t.css(e,i))}}),i=acf.Model.extend({group:!1,field:!1,events:{"click a":"onClick"},index:function(){return this.$el.index()},isVisible:function(){return acf.isVisible(this.$el)},isActive:function(){return this.$el.hasClass("active")},open:function(){this.$el.addClass("active"),this.field.showFields()},close:function(){this.$el.removeClass("active"),this.field.hideFields()},onClick:function(t,e){t.preventDefault(),this.toggle()},toggle:function(){this.isActive()||this.group.openTab(this)}});new acf.Model({priority:50,actions:{prepare:"render",append:"render",unload:"onUnload",invalid_field:"onInvalidField"},findTabs:function(){return n(".acf-tab-wrap")},getTabs:function(){return acf.getInstances(this.findTabs())},render:function(t){this.getTabs().map(function(t){t.get("initialized")||t.initializeTabs()})},onInvalidField:function(t){this.busy||t.hiddenByTab&&(t.hiddenByTab.toggle(),this.busy=!0,this.setTimeout(function(){this.busy=!1},100))},onUnload:function(){var e=[];this.getTabs().map(function(t){t=t.hasActive()?t.getActive().index():0;e.push(t)}),e.length&&acf.setPreference("this.tabs",e)}})}(jQuery),function(){var t=acf.models.SelectField.extend({type:"post_object"});acf.registerFieldType(t)}(jQuery),function(){var t=acf.models.SelectField.extend({type:"page_link"});acf.registerFieldType(t)}(jQuery),function(){var t=acf.models.SelectField.extend({type:"user"});acf.registerFieldType(t)}(jQuery),function(p){var t=acf.Field.extend({type:"taxonomy",data:{ftype:"select"},select2:!1,wait:"load",events:{'click a[data-name="add"]':"onClickAdd",'click input[type="radio"]':"onClickRadio",removeField:"onRemove"},$control:function(){return this.$(".acf-taxonomy-field")},$input:function(){return this.getRelatedPrototype().$input.apply(this,arguments)},getRelatedType:function(){var t=this.get("ftype");return t="multi_select"==t?"select":t},getRelatedPrototype:function(){return acf.getFieldType(this.getRelatedType()).prototype},getValue:function(){return this.getRelatedPrototype().getValue.apply(this,arguments)},setValue:function(){return this.getRelatedPrototype().setValue.apply(this,arguments)},initialize:function(){this.getRelatedPrototype().initialize.apply(this,arguments)},onRemove:function(){var t=this.getRelatedPrototype();t.onRemove&&t.onRemove.apply(this,arguments)},onClickAdd:function(t,e){var i=this,n=!1,a=!1,s=!1,o=!1,r=!1,c=!1,l=function(t){n.loading(!1),n.content(t),a=n.$("form"),s=n.$('input[name="term_name"]'),o=n.$('select[name="term_parent"]'),r=n.$(".acf-submit-button"),s.trigger("focus"),n.on("submit","form",d)},d=function(t,e){if(t.preventDefault(),t.stopImmediatePropagation(),""===s.val())return s.trigger("focus"),!1;acf.startButtonLoading(r);t={action:"acf/fields/taxonomy/add_term",field_key:i.get("key"),term_name:s.val(),term_parent:o.length?o.val():0};p.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(t),type:"post",dataType:"json",success:u})},u=function(t){acf.stopButtonLoading(r),c&&c.remove(),c=acf.isAjaxSuccess(t)?(s.val(""),f(t.data),acf.newNotice({type:"success",text:acf.getAjaxMessage(t),target:a,timeout:2e3,dismiss:!1})):acf.newNotice({type:"error",text:acf.getAjaxError(t),target:a,timeout:2e3,dismiss:!1}),s.trigger("focus")},f=function(e){var t=p(''+e.term_label+" ");e.term_parent?o.children('option[value="'+e.term_parent+'"]').after(t):o.append(t),acf.getFields({type:"taxonomy"}).map(function(t){t.get("taxonomy")==i.get("taxonomy")&&t.appendTerm(e)}),i.selectTerm(e.term_id)};!function(){n=acf.newPopup({title:e.attr("title"),loading:!0,width:"300px"});var t={action:"acf/fields/taxonomy/add_term",field_key:i.get("key")};p.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(t),type:"post",dataType:"html",success:l})}()},appendTerm:function(t){"select"==this.getRelatedType()?this.appendTermSelect(t):this.appendTermCheckbox(t)},appendTermSelect:function(t){this.select2.addOption({id:t.term_id,text:t.term_label})},appendTermCheckbox:function(t){var e=this.$("[name]:first").attr("name"),i=this.$("ul:first");"checkbox"==this.getRelatedType()&&(e+="[]");e=p(['',"",' ',""+t.term_name+" "," "," "].join(""));t.term_parent&&((i=(t=i.find('li[data-id="'+t.term_parent+'"]')).children("ul")).exists()||(i=p(''),t.append(i))),i.append(e)},selectTerm:function(t){"select"==this.getRelatedType()?this.select2.selectOption(t):this.$('input[value="'+t+'"]').prop("checked",!0).trigger("change")},onClickRadio:function(t,e){var i=e.parent("label"),n=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&n&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"))}});acf.registerFieldType(t)}(jQuery),function(i){var t=acf.models.DatePickerField.extend({type:"time_picker",$control:function(){return this.$(".acf-time-picker")},initialize:function(){var t=this.$input(),e=this.$inputText(),t={timeFormat:this.get("time_format"),altField:t,altFieldTimeOnly:!1,altTimeFormat:"HH:mm:ss",showButtonPanel:!0,controlType:"select",oneLine:!0,closeText:acf.get("dateTimePickerL10n").selectText,timeOnly:!0,onClose:function(t,e,i){e=e.dpDiv.find(".ui-datepicker-close");!t&&e.is(":hover")&&i._updateDateTime()}},t=acf.applyFilters("time_picker_args",t,this);acf.newTimePicker(e,t),acf.doAction("time_picker_init",e,t,this)}});acf.registerFieldType(t),acf.newTimePicker=function(t,e){if(void 0===i.timepicker)return!1;t.timepicker(e=e||{}),i("body > #ui-datepicker-div").exists()&&i("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(){var t=acf.Field.extend({type:"true_false",events:{"change .acf-switch-input":"onChange","focus .acf-switch-input":"onFocus","blur .acf-switch-input":"onBlur","keypress .acf-switch-input":"onKeypress"},$input:function(){return this.$('input[type="checkbox"]')},$switch:function(){return this.$(".acf-switch")},getValue:function(){return this.$input().prop("checked")?1:0},initialize:function(){this.render()},render:function(){var t,e,i=this.$switch();i.length&&(t=i.children(".acf-switch-on"),e=i.children(".acf-switch-off"),(i=Math.max(t.width(),e.width()))&&(t.css("min-width",i),e.css("min-width",i)))},switchOn:function(){this.$input().prop("checked",!0),this.$switch().addClass("-on")},switchOff:function(){this.$input().prop("checked",!1),this.$switch().removeClass("-on")},onChange:function(t,e){e.prop("checked")?this.switchOn():this.switchOff()},onFocus:function(t,e){this.$switch().addClass("-focus")},onBlur:function(t,e){this.$switch().removeClass("-focus")},onKeypress:function(t,e){return 37===t.keyCode?this.switchOff():39===t.keyCode?this.switchOn():void 0}});acf.registerFieldType(t)}(jQuery),function(){var t=acf.Field.extend({type:"url",events:{'keyup input[type="url"]':"onkeyup"},$control:function(){return this.$(".acf-input-wrap")},$input:function(){return this.$('input[type="url"]')},initialize:function(){this.render()},isValid:function(){var t=this.val();return!!t&&(-1!==t.indexOf("://")||0===t.indexOf("//"))},render:function(){this.isValid()?this.$control().addClass("-valid"):this.$control().removeClass("-valid")},onkeyup:function(t,e){this.render()}});acf.registerFieldType(t)}(jQuery),function(){var t=acf.Field.extend({type:"wysiwyg",wait:"load",events:{"mousedown .acf-editor-wrap.delay":"onMousedown",unmountField:"disableEditor",remountField:"enableEditor",removeField:"disableEditor"},$control:function(){return this.$(".acf-editor-wrap")},$input:function(){return this.$("textarea")},getMode:function(){return this.$control().hasClass("tmce-active")?"visual":"text"},initialize:function(){this.$control().hasClass("delay")||this.initializeEditor()},initializeEditor:function(){var t=this.$control(),e=this.$input(),i={tinymce:!0,quicktags:!0,toolbar:this.get("toolbar"),mode:this.getMode(),field:this},n=e.attr("id"),a=acf.uniqueId("acf-editor-"),s=e.data(),e=e.val();acf.rename({target:t,search:n,replace:a,destructive:!0}),this.set("id",a,!0),this.$input().data(s).val(e),acf.tinymce.initialize(a,i)},onMousedown:function(t){t.preventDefault();t=this.$control();t.removeClass("delay"),t.find(".acf-editor-toolbar").remove(),this.initializeEditor()},enableEditor:function(){"visual"==this.getMode()&&acf.tinymce.enable(this.get("id"))},disableEditor:function(){acf.tinymce.destroy(this.get("id"))}});acf.registerFieldType(t)}(jQuery),function(e){var s=[];acf.Condition=acf.Model.extend({type:"",operator:"==",label:"",choiceType:"input",fieldTypes:[],data:{conditions:!1,field:!1,rule:{}},events:{change:"change",keyup:"change",enableField:"change",disableField:"change"},setup:function(t){e.extend(this.data,t)},getEventTarget:function(t,e){return t||this.get("field").$el},change:function(t,e){this.get("conditions").change(t)},match:function(t,e){return!1},calculate:function(){return this.match(this.get("rule"),this.get("field"))},choices:function(t){return' '}}),acf.newCondition=function(t,e){var i=e.get("field"),n=i.getField(t.field);if(!i||!n)return!1;e={rule:t,target:i,conditions:e,field:n},n=n.get("type"),t=t.operator;return new(acf.getConditionTypes({fieldType:n,operator:t})[0]||acf.Condition)(e)};function n(t){return acf.strPascalCase(t||"")+"Condition"}acf.registerConditionType=function(t){var e=t.prototype.type,i=n(e);acf.models[i]=t,s.push(e)},acf.getConditionType=function(t){t=n(t);return acf.models[t]||!1},acf.registerConditionForFieldType=function(t,e){t=acf.getConditionType(t);t&&t.prototype.fieldTypes.push(e)},acf.getConditionTypes=function(n){n=acf.parseArgs(n,{fieldType:"",operator:""});var a=[];return s.map(function(t){var e=acf.getConditionType(t),i=e.prototype.fieldTypes,t=e.prototype.operator;n.fieldType&&-1===i.indexOf(n.fieldType)||n.operator&&t!==n.operator||a.push(e)}),a}}(jQuery),function(){function a(t,e){var i=acf.getFields({key:e,sibling:t.$el,suppressFilters:!0});return!!(i=!i.length?acf.getFields({key:e,parent:t.$el.parent(),suppressFilters:!0}):i).length&&i[0]}var t="conditional_logic";new acf.Model({id:"conditionsManager",priority:20,actions:{new_field:"onNewField"},onNewField:function(t){t.has("conditions")&&t.getConditions().render()}});acf.Field.prototype.getField=function(t){var e=a(this,t);if(e)return e;for(var i=this.parents(),n=0;n '}});acf.registerConditionType(i);var t=i.extend({type:"hasNoValue",operator:"==empty",label:s("Has no value"),match:function(t,e){return!i.prototype.match.apply(this,arguments)}});acf.registerConditionType(t);var o=acf.Condition.extend({type:"equalTo",operator:"==",label:s("Value is equal to"),fieldTypes:["text","textarea","number","range","email","url","password"],match:function(t,e){return acf.isNumeric(t.value)?(i=t.value,n=e.val(),parseFloat(i)===parseFloat(n)):a(t.value,e.val());var i,n},choices:function(t){return' '}});acf.registerConditionType(o);var e=o.extend({type:"notEqualTo",operator:"!=",label:s("Value is not equal to"),match:function(t,e){return!o.prototype.match.apply(this,arguments)}});acf.registerConditionType(e);t=acf.Condition.extend({type:"patternMatch",operator:"==pattern",label:s("Value matches pattern"),fieldTypes:["text","textarea","email","url","password","wysiwyg"],match:function(t,e){return function(t,e){e=new RegExp(n(e),"gi");return n(t).match(e)}(e.val(),t.value)},choices:function(t){return' '}});acf.registerConditionType(t);t=acf.Condition.extend({type:"contains",operator:"==contains",label:s("Value contains"),fieldTypes:["text","textarea","number","email","url","password","wysiwyg","oembed","select"],match:function(t,e){return e=e.val(),t=t.value,-1 '}});acf.registerConditionType(t);t=o.extend({type:"trueFalseEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(t){return[{id:1,text:s("Checked")}]}});acf.registerConditionType(t);t=e.extend({type:"trueFalseNotEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(t){return[{id:1,text:s("Checked")}]}});acf.registerConditionType(t);var r=acf.Condition.extend({type:"selectEqualTo",operator:"==",label:s("Value is equal to"),fieldTypes:["select","checkbox","radio","button_group"],match:function(t,e){var i=e.val();return i instanceof Array?(e=t.value,-1",label:s("Value is greater than"),fieldTypes:["number","range"],match:function(t,e){e=e.val();return e instanceof Array&&(e=e.length),e=e,t=t.value,parseFloat(e)>parseFloat(t)},choices:function(t){return' '}});acf.registerConditionType(t);e=t.extend({type:"lessThan",operator:"<",label:s("Value is less than"),match:function(t,e){e=e.val();return e instanceof Array&&(e=e.length),e=e,t=t.value,parseFloat(e) '}});acf.registerConditionType(e);t=t.extend({type:"selectionGreaterThan",label:s("Selection is greater than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType(t);e=e.extend({type:"selectionLessThan",label:s("Selection is less than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType(e)}(jQuery),function(t){acf.unload=new acf.Model({wait:"load",active:!0,changed:!1,actions:{validation_failure:"startListening",validation_success:"stopListening"},events:{"change form .acf-field":"startListening","submit form":"stopListening"},enable:function(){this.active=!0},disable:function(){this.active=!1},reset:function(){this.stopListening()},startListening:function(){!this.changed&&this.active&&(this.changed=!0,t(window).on("beforeunload",this.onUnload))},stopListening:function(){this.changed=!1,t(window).off("beforeunload",this.onUnload)},onUnload:function(){return acf.__("The changes you made will be lost if you navigate away from this page")}})}(jQuery),function(e){new acf.Model({wait:"prepare",priority:1,initialize:function(){(acf.get("postboxes")||[]).map(acf.newPostbox)}});acf.getPostbox=function(t){return"string"==typeof arguments[0]&&(t=e("#"+arguments[0])),acf.getInstance(t)},acf.getPostboxes=function(){return acf.getInstances(e(".acf-postbox"))},acf.newPostbox=function(t){return new acf.models.Postbox(t)},acf.models.Postbox=acf.Model.extend({data:{id:"",key:"",style:"default",label:"top",edit:""},setup:function(t){t.editLink&&(t.edit=t.editLink),e.extend(this.data,t),this.$el=this.$postbox()},$postbox:function(){return e("#"+this.get("id"))},$hide:function(){return e("#"+this.get("id")+"-hide")},$hideLabel:function(){return this.$hide().parent()},$hndle:function(){return this.$("> .hndle")},$handleActions:function(){return this.$("> .postbox-header .handle-actions")},$inside:function(){return this.$("> .inside")},isVisible:function(){return this.$el.hasClass("acf-hidden")},initialize:function(){this.$el.addClass("acf-postbox"),this.$el.removeClass("hide-if-js"),"block"===acf.get("editor")||"default"!==(t=this.get("style"))&&this.$el.addClass(t),this.$inside().addClass("acf-fields").addClass("-"+this.get("label"));var t,e=this.get("edit");e&&(t=' ',(e=this.$handleActions()).length?e.prepend(t):this.$hndle().append(t)),this.show()},show:function(){this.$hideLabel().show(),this.$hide().prop("checked",!0),this.$el.show().removeClass("acf-hidden"),acf.doAction("show_postbox",this)},enable:function(){acf.enable(this.$el,"postbox")},showEnable:function(){this.enable(),this.show()},hide:function(){this.$hideLabel().hide(),this.$el.hide().addClass("acf-hidden"),acf.doAction("hide_postbox",this)},disable:function(){acf.disable(this.$el,"postbox")},hideDisable:function(){this.disable(),this.hide()},html:function(t){this.$inside().html(t),acf.doAction("append",this.$el)}})}(jQuery),function(a){acf.newMediaPopup=function(t){var e=null,e=new("edit"==(t=acf.parseArgs(t,{mode:"select",title:"",button:"",type:"",field:!1,allowedTypes:"",library:"all",multiple:!1,attachment:0,autoOpen:!0,open:function(){},select:function(){},close:function(){}})).mode?acf.models.EditMediaPopup:acf.models.SelectMediaPopup)(t);return t.autoOpen&&setTimeout(function(){e.open()},1),acf.doAction("new_media_popup",e),e};function e(){var t=acf.get("post_id");return acf.isNumeric(t)?t:0}acf.getMimeTypes=function(){return this.get("mimeTypes")},acf.getMimeType=function(t){var e,i=acf.getMimeTypes();if(void 0!==i[t])return i[t];for(e in i)if(-1!==e.indexOf(t))return i[e];return!1};var n=acf.Model.extend({id:"MediaPopup",data:{},defaults:{},frame:!1,setup:function(t){a.extend(this.data,t)},initialize:function(){var t=this.getFrameOptions();this.addFrameStates(t);var e=wp.media(t);(e.acf=this).addFrameEvents(e,t),this.frame=e},open:function(){this.frame.open()},close:function(){this.frame.close()},remove:function(){this.frame.detach(),this.frame.remove()},getFrameOptions:function(){var t={title:this.get("title"),multiple:this.get("multiple"),library:{},states:[]};return this.get("type")&&(t.library.type=this.get("type")),"uploadedTo"===this.get("library")&&(t.library.uploadedTo=e()),this.get("attachment")&&(t.library.post__in=[this.get("attachment")]),this.get("button")&&(t.button={text:this.get("button")}),t},addFrameStates:function(t){var e=wp.media.query(t.library);this.get("field")&&acf.isset(e,"mirroring","args")&&(e.mirroring.args._acfuploader=this.get("field")),t.states.push(new wp.media.controller.Library({library:e,multiple:this.get("multiple"),title:this.get("title"),priority:20,filterable:"all",editable:!0,allowLocalEdits:!0})),acf.isset(wp,"media","controller","EditImage")&&t.states.push(new wp.media.controller.EditImage)},addFrameEvents:function(i,t){i.on("open",function(){this.$el.closest(".media-modal").addClass("acf-media-modal -"+this.acf.get("mode"))},i),i.on("content:render:edit-image",function(){var t=this.state().get("image"),t=new wp.media.view.EditImage({model:t,controller:this}).render();this.content.set(t),t.loadEditor()},i),i.on("select",function(){var t=i.state().get("selection");t&&t.each(function(t,e){i.acf.get("select").apply(i.acf,[t,e])})}),i.on("close",function(){setTimeout(function(){i.acf.get("close").apply(i.acf),i.acf.remove()},1)})}});acf.models.SelectMediaPopup=n.extend({id:"SelectMediaPopup",setup:function(t){t.button||(t.button=acf._x("Select","verb")),n.prototype.setup.apply(this,arguments)},addFrameEvents:function(e,t){acf.isset(_wpPluploadSettings,"defaults","multipart_params")&&(_wpPluploadSettings.defaults.multipart_params._acfuploader=this.get("field"),e.on("open",function(){delete _wpPluploadSettings.defaults.multipart_params._acfuploader})),e.on("content:activate:browse",function(){var t=!1;try{t=e.content.get().toolbar}catch(t){return void console.log(t)}e.acf.customizeFilters.apply(e.acf,[t])}),n.prototype.addFrameEvents.apply(this,arguments)},customizeFilters:function(t){var i,e=t.get("filters");"image"==this.get("type")&&(e.filters.all.text=acf.__("All images"),delete e.filters.audio,delete e.filters.video,delete e.filters.image,a.each(e.filters,function(t,e){e.props.type=e.props.type||"image"})),this.get("allowedTypes")&&this.get("allowedTypes").split(" ").join("").split(".").join("").split(",").map(function(t){t=acf.getMimeType(t);t&&(e.filters[t]={text:t,props:{status:null,type:t,uploadedTo:null,orderby:"date",order:"DESC"},priority:20})}),"uploadedTo"===this.get("library")&&(i=this.frame.options.library.uploadedTo,delete e.filters.unattached,delete e.filters.uploaded,a.each(e.filters,function(t,e){e.text+=" ("+acf.__("Uploaded to this post")+")",e.props.uploadedTo=i}));var n=this.get("field");a.each(e.filters,function(t,e){e.props._acfuploader=n}),t.get("search").model.attributes._acfuploader=n,e.renderFilters&&e.renderFilters()}}),acf.models.EditMediaPopup=n.extend({id:"SelectMediaPopup",setup:function(t){t.button||(t.button=acf._x("Update","verb")),n.prototype.setup.apply(this,arguments)},addFrameEvents:function(i,t){i.on("open",function(){this.$el.closest(".media-modal").addClass("acf-expanded"),"browse"!=this.content.mode()&&this.content.mode("browse");var t=this.state().get("selection"),e=wp.media.attachment(i.acf.get("attachment"));t.add(e)},i),n.prototype.addFrameEvents.apply(this,arguments)}});new acf.Model({id:"customizePrototypes",wait:"ready",initialize:function(){var t;acf.isset(window,"wp","media","view")&&((t=e())&&acf.isset(wp,"media","view","settings","post")&&(wp.media.view.settings.post.id=t),this.customizeAttachmentsButton(),this.customizeAttachmentsRouter(),this.customizeAttachmentFilters(),this.customizeAttachmentCompat(),this.customizeAttachmentLibrary())},customizeAttachmentsButton:function(){var t;acf.isset(wp,"media","view","Button")&&(t=wp.media.view.Button,wp.media.view.Button=t.extend({initialize:function(){var t=_.defaults(this.options,this.defaults);this.model=new Backbone.Model(t),this.listenTo(this.model,"change",this.render)}}))},customizeAttachmentsRouter:function(){var t;acf.isset(wp,"media","view","Router")&&(t=wp.media.view.Router,wp.media.view.Router=t.extend({addExpand:function(){var t=a(['',' '+acf.__("Expand Details")+" ",' '+acf.__("Collapse Details")+" "," "].join(""));t.on("click",function(t){t.preventDefault();t=a(this).closest(".media-modal");t.hasClass("acf-expanded")?t.removeClass("acf-expanded"):t.addClass("acf-expanded")}),this.$el.append(t)},initialize:function(){return t.prototype.initialize.apply(this,arguments),this.addExpand(),this}}))},customizeAttachmentFilters:function(){acf.isset(wp,"media","view","AttachmentFilters","All")&&(wp.media.view.AttachmentFilters.All.prototype.renderFilters=function(){this.$el.html(_.chain(this.filters).map(function(t,e){return{el:a(" ").val(e).html(t.text)[0],priority:t.priority||50}},this).sortBy("priority").pluck("el").value())})},customizeAttachmentCompat:function(){var t,e;acf.isset(wp,"media","view","AttachmentCompat")&&(t=wp.media.view.AttachmentCompat,e=!1,wp.media.view.AttachmentCompat=t.extend({render:function(){return this.rendered?this:(t.prototype.render.apply(this,arguments),this.$("#acf-form-data").length&&(clearTimeout(e),e=setTimeout(a.proxy(function(){this.rendered=!0,acf.doAction("append",this.$el)},this),50)),this)},save:function(t){var e;t&&t.preventDefault(),e=acf.serializeForAjax(this.$el),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(e).always(_.bind(this.postSave,this))}}))},customizeAttachmentLibrary:function(){var o;acf.isset(wp,"media","view","Attachment","Library")&&(o=wp.media.view.Attachment.Library,wp.media.view.Attachment.Library=o.extend({render:function(){var t=acf.isget(this,"controller","acf"),e=acf.isget(this,"model","attributes");return t&&e&&(e.acf_errors&&this.$el.addClass("acf-disabled"),(t=t.get("selected"))&&-1',''+acf.__("Restricted")+" ",''+n+" ",''+a+" ",""].join("")),e.reset(),void e.single(i)}return o.prototype.toggleSelection.apply(this,arguments)}}))}})}(jQuery),function(u){acf.screen=new acf.Model({active:!0,xhr:!1,timeout:!1,wait:"load",events:{"change #page_template":"onChange","change #parent_id":"onChange","change #post-formats-select":"onChange","change .categorychecklist":"onChange","change .tagsdiv":"onChange",'change .acf-taxonomy-field[data-save="1"]':"onChange","change #product-type":"onChange"},isPost:function(){return"post"===acf.get("screen")},isUser:function(){return"user"===acf.get("screen")},isTaxonomy:function(){return"taxonomy"===acf.get("screen")},isAttachment:function(){return"attachment"===acf.get("screen")},isNavMenu:function(){return"nav_menu"===acf.get("screen")},isWidget:function(){return"widget"===acf.get("screen")},isComment:function(){return"comment"===acf.get("screen")},getPageTemplate:function(){var t=u("#page_template");return t.length?t.val():null},getPageParent:function(t,e){return(e=u("#parent_id")).length?e.val():null},getPageType:function(t,e){return this.getPageParent()?"child":"parent"},getPostType:function(){return u("#post_type").val()},getPostFormat:function(t,e){if((e=u("#post-formats-select input:checked")).length){e=e.val();return"0"==e?"standard":e}return null},getPostCoreTerms:function(){var t,e={},i=acf.serialize(u(".categorydiv, .tagsdiv"));for(t in i.tax_input&&(e=i.tax_input),i.post_category&&(e.category=i.post_category),e)acf.isArray(e[t])||(e[t]=e[t].split(/,[\s]?/));return e},getPostTerms:function(){var t,i=this.getPostCoreTerms();for(t in acf.getFields({type:"taxonomy"}).map(function(t){var e;t.get("save")&&(e=t.val(),t=t.get("taxonomy"),e&&(i[t]=i[t]||[],e=acf.isArray(e)?e:[e],i[t]=i[t].concat(e)))}),null!==(productType=this.getProductType())&&(i.product_type=[productType]),i)i[t]=acf.uniqueArray(i[t]);return i},getProductType:function(){var t=u("#product-type");return t.length?t.val():null},check:function(){var e;"post"===acf.get("screen")&&(this.xhr&&this.xhr.abort(),e=acf.parseArgs(this.data,{action:"acf/ajax/check_screen",screen:acf.get("screen"),exists:[]}),this.isPost()&&(e.post_id=acf.get("post_id")),null!==(postType=this.getPostType())&&(e.post_type=postType),null!==(pageTemplate=this.getPageTemplate())&&(e.page_template=pageTemplate),null!==(pageParent=this.getPageParent())&&(e.page_parent=pageParent),null!==(pageType=this.getPageType())&&(e.page_type=pageType),null!==(postFormat=this.getPostFormat())&&(e.post_format=postFormat),null!==(postTerms=this.getPostTerms())&&(e.post_terms=postTerms),acf.getPostboxes().map(function(t){e.exists.push(t.get("key"))}),e=acf.applyFilters("check_screen_args",e),this.xhr=u.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"json",context:this,success:function(t){"post"==acf.get("screen")?this.renderPostScreen(t):"user"==acf.get("screen")&&this.renderUserScreen(t),acf.doAction("check_screen_complete",t,e)}}))},onChange:function(t,e){this.setTimeout(this.check,1)},renderPostScreen:function(c){function l(t,e){var i,n=u._data(t[0]).events;for(i in n)for(var a=0;a